diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..45f8f1f --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,41 @@ +name: ci + +on: + workflow_dispatch: { } + push: { } + +jobs: + + test: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - uses: Swatinem/rust-cache@v1 + - run: cargo install just + - run: just test + + publish: + runs-on: ubuntu-latest + permissions: + contents: read + + if: >- + ((github.event_name == 'workflow_dispatch') || (github.event_name == 'push')) && + startsWith(github.ref, 'refs/tags/v') + needs: [ "test" ] + + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - uses: katyo/publish-crates@v1 + with: + registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fa8d85a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +Cargo.lock +target diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..4e9f121 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,63 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to make participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies within all project spaces, and it also applies when +an individual is representing the project or its community in public spaces. +Examples of representing a project or community include using an official +project e-mail address, posting via an official social media account, or acting +as an appointed representative at an online or offline event. Representation of +a project may be further defined and clarified by project maintainers. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..50d7fe2 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "atproto" +edition = "2021" +version = "0.0.1" + +[dependencies] +futures = "0.3.25" +httpclient = "0.20.2" +serde_json = "1.0.81" + +[dependencies.chrono] +version = "0.4.26" +features = ["serde"] + +[dependencies.serde] +version = "1.0.137" +features = ["derive"] + +[dev-dependencies.tokio] +version = "1.18.2" +features = ["full"] diff --git a/Justfile b/Justfile new file mode 100644 index 0000000..55cc5df --- /dev/null +++ b/Justfile @@ -0,0 +1,58 @@ +set dotenv-load := true + +help: + @just --list --unsorted + +build: + cargo build +alias b := build + +run *args: + cargo run {{args}} +alias r := run + +release: + cargo build --release + +install: + cargo install --path . + +bootstrap: + cargo install cargo-edit + +test *args: + cargo test {{args}} + +check: + cargo check +alias c := check + +fix: + cargo clippy --fix + +# Bump version. level=major,minor,patch +version level: + git diff-index --exit-code HEAD > /dev/null || ! echo You have untracked changes. Commit your changes before bumping the version. + cargo set-version --bump {{level}} + cargo update # This bumps Cargo.lock + VERSION=$(rg "version = \"([0-9.]+)\"" -or '$1' Cargo.toml | head -n1) && \ + git commit -am "Bump version {{level}} to $VERSION" && \ + git tag v$VERSION && \ + git push origin v$VERSION + git push + +publish: + cargo publish + +patch: test + just version patch + just publish + +doc: + cargo doc --no-deps --open + +test-full: + #!/usr/bin/env bash -euxo pipefail + for file in $(ls examples); do + cargo run --example "$(basename "$file" .rs)" + done \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6f7eee1 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2024 syui (http://syui.ai) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/api.json b/api.json new file mode 100644 index 0000000..b1efefb --- /dev/null +++ b/api.json @@ -0,0 +1,15457 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "AT Protocol XRPC API", + "summary": "An unofficial conversion of AT Protocol's lexicons to OpenAPI's schema format.", + "version": "0.0.0", + "license": { + "name": "MIT License", + "identifier": "MIT" + } + }, + "servers": [ + { + "url": "https://bsky.social/xrpc/", + "description": "AT Protocol PDS XRPC server" + }, + { + "url": "https://api.bsky.app/xrpc/", + "description": "AT Protocol AppView XRPC server" + }, + { + "url": "https://syu.is/xrpc/", + "description": "self-host server pds" + }, + { + "url": "https://api.syu.is/xrpc/", + "description": "self-host server bsky" + } + ], + "paths": { + "/app.bsky.actor.getPreferences": { + "get": { + "tags": [ + "app.bsky.actor" + ], + "summary": "Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth.", + "operationId": "app.bsky.actor.getPreferences", + "security": [ + { + "Bearer": [] + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "preferences" + ], + "properties": { + "preferences": { + "$ref": "#/components/schemas/app.bsky.actor.defs.preferences" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.actor.getProfile": { + "get": { + "tags": [ + "app.bsky.actor" + ], + "summary": "Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth.", + "operationId": "app.bsky.actor.getProfile", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "actor", + "in": "query", + "description": "Handle or DID of account to fetch profile of.", + "required": true, + "schema": { + "type": "string", + "description": "Handle or DID of account to fetch profile of.", + "format": "at-identifier" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileViewDetailed" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.actor.getProfiles": { + "get": { + "tags": [ + "app.bsky.actor" + ], + "summary": "Get detailed profile views of multiple actors.", + "operationId": "app.bsky.actor.getProfiles", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "actors", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "at-identifier" + }, + "maxItems": 25 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "profiles" + ], + "properties": { + "profiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileViewDetailed" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.actor.getSuggestions": { + "get": { + "tags": [ + "app.bsky.actor" + ], + "summary": "Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding.", + "operationId": "app.bsky.actor.getSuggestions", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "actors" + ], + "properties": { + "cursor": { + "type": "string" + }, + "actors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileView" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.actor.putPreferences": { + "post": { + "tags": [ + "app.bsky.actor" + ], + "summary": "Set the private preferences attached to the account.", + "operationId": "app.bsky.actor.putPreferences", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "preferences" + ], + "properties": { + "preferences": { + "$ref": "#/components/schemas/app.bsky.actor.defs.preferences" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.actor.searchActors": { + "get": { + "tags": [ + "app.bsky.actor" + ], + "summary": "Find actors (profiles) matching search criteria. Does not require auth.", + "operationId": "app.bsky.actor.searchActors", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "term", + "in": "query", + "description": "DEPRECATED: use 'q' instead.", + "required": false, + "schema": { + "type": "string", + "description": "DEPRECATED: use 'q' instead." + } + }, + { + "name": "q", + "in": "query", + "description": "Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.", + "required": false, + "schema": { + "type": "string", + "description": "Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended." + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 25 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "actors" + ], + "properties": { + "cursor": { + "type": "string" + }, + "actors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileView" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.actor.searchActorsTypeahead": { + "get": { + "tags": [ + "app.bsky.actor" + ], + "summary": "Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth.", + "operationId": "app.bsky.actor.searchActorsTypeahead", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "term", + "in": "query", + "description": "DEPRECATED: use 'q' instead.", + "required": false, + "schema": { + "type": "string", + "description": "DEPRECATED: use 'q' instead." + } + }, + { + "name": "q", + "in": "query", + "description": "Search query prefix; not a full query string.", + "required": false, + "schema": { + "type": "string", + "description": "Search query prefix; not a full query string." + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 10 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "actors" + ], + "properties": { + "actors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileViewBasic" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.feed.getActorFeeds": { + "get": { + "tags": [ + "app.bsky.feed" + ], + "summary": "Get a list of feeds (feed generator records) created by the actor (in the actor's repo).", + "operationId": "app.bsky.feed.getActorFeeds", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "actor", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "at-identifier" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "feeds" + ], + "properties": { + "cursor": { + "type": "string" + }, + "feeds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.feed.defs.generatorView" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.feed.getActorLikes": { + "get": { + "tags": [ + "app.bsky.feed" + ], + "summary": "Get a list of posts liked by an actor. Does not require auth.", + "operationId": "app.bsky.feed.getActorLikes", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "actor", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "at-identifier" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "feed" + ], + "properties": { + "cursor": { + "type": "string" + }, + "feed": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.feed.defs.feedViewPost" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + }, + { + "const": "BlockedActor" + }, + { + "const": "BlockedByActor" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.feed.getAuthorFeed": { + "get": { + "tags": [ + "app.bsky.feed" + ], + "summary": "Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth.", + "operationId": "app.bsky.feed.getAuthorFeed", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "actor", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "at-identifier" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "in": "query", + "description": "Combinations of post/repost types to include in response.", + "required": false, + "schema": { + "type": "string", + "description": "Combinations of post/repost types to include in response.", + "default": "posts_with_replies", + "enum": [ + "posts_with_replies", + "posts_no_replies", + "posts_with_media", + "posts_and_author_threads" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "feed" + ], + "properties": { + "cursor": { + "type": "string" + }, + "feed": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.feed.defs.feedViewPost" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + }, + { + "const": "BlockedActor" + }, + { + "const": "BlockedByActor" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.feed.getFeed": { + "get": { + "tags": [ + "app.bsky.feed" + ], + "summary": "Get a hydrated feed from an actor's selected feed generator. Implemented by App View.", + "operationId": "app.bsky.feed.getFeed", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "feed", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "at-uri" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "feed" + ], + "properties": { + "cursor": { + "type": "string" + }, + "feed": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.feed.defs.feedViewPost" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + }, + { + "const": "UnknownFeed" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.feed.getFeedGenerator": { + "get": { + "tags": [ + "app.bsky.feed" + ], + "summary": "Get information about a feed generator. Implemented by AppView.", + "operationId": "app.bsky.feed.getFeedGenerator", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "feed", + "in": "query", + "description": "AT-URI of the feed generator record.", + "required": true, + "schema": { + "type": "string", + "description": "AT-URI of the feed generator record.", + "format": "at-uri" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "view", + "isOnline", + "isValid" + ], + "properties": { + "view": { + "$ref": "#/components/schemas/app.bsky.feed.defs.generatorView" + }, + "isOnline": { + "type": "boolean", + "description": "Indicates whether the feed generator service has been online recently, or else seems to be inactive." + }, + "isValid": { + "type": "boolean", + "description": "Indicates whether the feed generator service is compatible with the record declaration." + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.feed.getFeedGenerators": { + "get": { + "tags": [ + "app.bsky.feed" + ], + "summary": "Get information about a list of feed generators.", + "operationId": "app.bsky.feed.getFeedGenerators", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "feeds", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "at-uri" + } + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "feeds" + ], + "properties": { + "feeds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.feed.defs.generatorView" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.feed.getLikes": { + "get": { + "tags": [ + "app.bsky.feed" + ], + "summary": "Get like records which reference a subject (by AT-URI and CID).", + "operationId": "app.bsky.feed.getLikes", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "uri", + "in": "query", + "description": "AT-URI of the subject (eg, a post record).", + "required": true, + "schema": { + "type": "string", + "description": "AT-URI of the subject (eg, a post record).", + "format": "at-uri" + } + }, + { + "name": "cid", + "in": "query", + "description": "CID of the subject record (aka, specific version of record), to filter likes.", + "required": false, + "schema": { + "type": "string", + "description": "CID of the subject record (aka, specific version of record), to filter likes.", + "format": "cid" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "uri", + "likes" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "cid": { + "type": "string", + "format": "cid" + }, + "cursor": { + "type": "string" + }, + "likes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.feed.getLikes.like" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.feed.getListFeed": { + "get": { + "tags": [ + "app.bsky.feed" + ], + "summary": "Get a feed of recent posts from a list (posts and reposts from any actors on the list). Does not require auth.", + "operationId": "app.bsky.feed.getListFeed", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "list", + "in": "query", + "description": "Reference (AT-URI) to the list record.", + "required": true, + "schema": { + "type": "string", + "description": "Reference (AT-URI) to the list record.", + "format": "at-uri" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "feed" + ], + "properties": { + "cursor": { + "type": "string" + }, + "feed": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.feed.defs.feedViewPost" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + }, + { + "const": "UnknownList" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.feed.getPostThread": { + "get": { + "tags": [ + "app.bsky.feed" + ], + "summary": "Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests.", + "operationId": "app.bsky.feed.getPostThread", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "uri", + "in": "query", + "description": "Reference (AT-URI) to post record.", + "required": true, + "schema": { + "type": "string", + "description": "Reference (AT-URI) to post record.", + "format": "at-uri" + } + }, + { + "name": "depth", + "in": "query", + "description": "How many levels of reply depth should be included in response.", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "maximum": 1000, + "default": 6 + } + }, + { + "name": "parentHeight", + "in": "query", + "description": "How many levels of parent (and grandparent, etc) post to include.", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "maximum": 1000, + "default": 80 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "thread" + ], + "properties": { + "thread": { + "oneOf": [ + { + "$ref": "#/components/schemas/app.bsky.feed.defs.threadViewPost" + }, + { + "$ref": "#/components/schemas/app.bsky.feed.defs.notFoundPost" + }, + { + "$ref": "#/components/schemas/app.bsky.feed.defs.blockedPost" + } + ] + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + }, + { + "const": "NotFound" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.feed.getPosts": { + "get": { + "tags": [ + "app.bsky.feed" + ], + "summary": "Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.", + "operationId": "app.bsky.feed.getPosts", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "uris", + "in": "query", + "description": "List of post AT-URIs to return hydrated views for.", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "at-uri" + }, + "maxItems": 25 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "posts" + ], + "properties": { + "posts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.feed.defs.postView" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.feed.getRepostedBy": { + "get": { + "tags": [ + "app.bsky.feed" + ], + "summary": "Get a list of reposts for a given post.", + "operationId": "app.bsky.feed.getRepostedBy", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "uri", + "in": "query", + "description": "Reference (AT-URI) of post record", + "required": true, + "schema": { + "type": "string", + "description": "Reference (AT-URI) of post record", + "format": "at-uri" + } + }, + { + "name": "cid", + "in": "query", + "description": "If supplied, filters to reposts of specific version (by CID) of the post record.", + "required": false, + "schema": { + "type": "string", + "description": "If supplied, filters to reposts of specific version (by CID) of the post record.", + "format": "cid" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "uri", + "repostedBy" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "cid": { + "type": "string", + "format": "cid" + }, + "cursor": { + "type": "string" + }, + "repostedBy": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileView" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.feed.getSuggestedFeeds": { + "get": { + "tags": [ + "app.bsky.feed" + ], + "summary": "Get a list of suggested feeds (feed generators) for the requesting account.", + "operationId": "app.bsky.feed.getSuggestedFeeds", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "feeds" + ], + "properties": { + "cursor": { + "type": "string" + }, + "feeds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.feed.defs.generatorView" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.feed.getTimeline": { + "get": { + "tags": [ + "app.bsky.feed" + ], + "summary": "Get a view of the requesting account's home timeline. This is expected to be some form of reverse-chronological feed.", + "operationId": "app.bsky.feed.getTimeline", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "algorithm", + "in": "query", + "description": "Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism.", + "required": false, + "schema": { + "type": "string", + "description": "Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism." + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "feed" + ], + "properties": { + "cursor": { + "type": "string" + }, + "feed": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.feed.defs.feedViewPost" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.feed.searchPosts": { + "get": { + "tags": [ + "app.bsky.feed" + ], + "summary": "Find posts matching search criteria, returning views of those posts.", + "operationId": "app.bsky.feed.searchPosts", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "q", + "in": "query", + "description": "Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.", + "required": true, + "schema": { + "type": "string", + "description": "Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended." + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 25 + } + }, + { + "name": "cursor", + "in": "query", + "description": "Optional pagination mechanism; may not necessarily allow scrolling through entire result set.", + "required": false, + "schema": { + "type": "string", + "description": "Optional pagination mechanism; may not necessarily allow scrolling through entire result set." + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "posts" + ], + "properties": { + "cursor": { + "type": "string" + }, + "hitsTotal": { + "type": "integer" + }, + "posts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.feed.defs.postView" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + }, + { + "const": "BadQueryString" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.graph.getBlocks": { + "get": { + "tags": [ + "app.bsky.graph" + ], + "summary": "Enumerates which accounts the requesting account is currently blocking. Requires auth.", + "operationId": "app.bsky.graph.getBlocks", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "blocks" + ], + "properties": { + "cursor": { + "type": "string" + }, + "blocks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileView" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.graph.getFollowers": { + "get": { + "tags": [ + "app.bsky.graph" + ], + "summary": "Enumerates accounts which follow a specified account (actor).", + "operationId": "app.bsky.graph.getFollowers", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "actor", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "at-identifier" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "subject", + "followers" + ], + "properties": { + "subject": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileView" + }, + "cursor": { + "type": "string" + }, + "followers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileView" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.graph.getFollows": { + "get": { + "tags": [ + "app.bsky.graph" + ], + "summary": "Enumerates accounts which a specified account (actor) follows.", + "operationId": "app.bsky.graph.getFollows", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "actor", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "at-identifier" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "subject", + "follows" + ], + "properties": { + "subject": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileView" + }, + "cursor": { + "type": "string" + }, + "follows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileView" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.graph.getList": { + "get": { + "tags": [ + "app.bsky.graph" + ], + "summary": "Gets a 'view' (with additional context) of a specified list.", + "operationId": "app.bsky.graph.getList", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "list", + "in": "query", + "description": "Reference (AT-URI) of the list record to hydrate.", + "required": true, + "schema": { + "type": "string", + "description": "Reference (AT-URI) of the list record to hydrate.", + "format": "at-uri" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "list", + "items" + ], + "properties": { + "cursor": { + "type": "string" + }, + "list": { + "$ref": "#/components/schemas/app.bsky.graph.defs.listView" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.graph.defs.listItemView" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.graph.getListBlocks": { + "get": { + "tags": [ + "app.bsky.graph" + ], + "summary": "Get mod lists that the requesting account (actor) is blocking. Requires auth.", + "operationId": "app.bsky.graph.getListBlocks", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "lists" + ], + "properties": { + "cursor": { + "type": "string" + }, + "lists": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.graph.defs.listView" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.graph.getListMutes": { + "get": { + "tags": [ + "app.bsky.graph" + ], + "summary": "Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth.", + "operationId": "app.bsky.graph.getListMutes", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "lists" + ], + "properties": { + "cursor": { + "type": "string" + }, + "lists": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.graph.defs.listView" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.graph.getLists": { + "get": { + "tags": [ + "app.bsky.graph" + ], + "summary": "Enumerates the lists created by a specified account (actor).", + "operationId": "app.bsky.graph.getLists", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "actor", + "in": "query", + "description": "The account (actor) to enumerate lists from.", + "required": true, + "schema": { + "type": "string", + "description": "The account (actor) to enumerate lists from.", + "format": "at-identifier" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "lists" + ], + "properties": { + "cursor": { + "type": "string" + }, + "lists": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.graph.defs.listView" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.graph.getMutes": { + "get": { + "tags": [ + "app.bsky.graph" + ], + "summary": "Enumerates accounts that the requesting account (actor) currently has muted. Requires auth.", + "operationId": "app.bsky.graph.getMutes", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "mutes" + ], + "properties": { + "cursor": { + "type": "string" + }, + "mutes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileView" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.graph.getSuggestedFollowsByActor": { + "get": { + "tags": [ + "app.bsky.graph" + ], + "summary": "Enumerates follows similar to a given account (actor). Expected use is to recommend additional accounts immediately after following one account.", + "operationId": "app.bsky.graph.getSuggestedFollowsByActor", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "actor", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "at-identifier" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "suggestions" + ], + "properties": { + "suggestions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileView" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.graph.muteActor": { + "post": { + "tags": [ + "app.bsky.graph" + ], + "summary": "Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth.", + "operationId": "app.bsky.graph.muteActor", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "actor" + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.graph.muteActorList": { + "post": { + "tags": [ + "app.bsky.graph" + ], + "summary": "Creates a mute relationship for the specified list of accounts. Mutes are private in Bluesky. Requires auth.", + "operationId": "app.bsky.graph.muteActorList", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "list" + ], + "properties": { + "list": { + "type": "string", + "format": "at-uri" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.graph.unmuteActor": { + "post": { + "tags": [ + "app.bsky.graph" + ], + "summary": "Unmutes the specified account. Requires auth.", + "operationId": "app.bsky.graph.unmuteActor", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "actor" + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.graph.unmuteActorList": { + "post": { + "tags": [ + "app.bsky.graph" + ], + "summary": "Unmutes the specified list of accounts. Requires auth.", + "operationId": "app.bsky.graph.unmuteActorList", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "list" + ], + "properties": { + "list": { + "type": "string", + "format": "at-uri" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.labeler.getServices": { + "get": { + "tags": [ + "app.bsky.labeler" + ], + "summary": "Get information about a list of labeler services.", + "operationId": "app.bsky.labeler.getServices", + "parameters": [ + { + "name": "dids", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "did" + } + } + }, + { + "name": "detailed", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "views" + ], + "properties": { + "views": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/app.bsky.labeler.defs.labelerView" + }, + { + "$ref": "#/components/schemas/app.bsky.labeler.defs.labelerViewDetailed" + } + ] + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.notification.getUnreadCount": { + "get": { + "tags": [ + "app.bsky.notification" + ], + "summary": "Count the number of unread notifications for the requesting account. Requires auth.", + "operationId": "app.bsky.notification.getUnreadCount", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "seenAt", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.notification.listNotifications": { + "get": { + "tags": [ + "app.bsky.notification" + ], + "summary": "Enumerate notifications for the requesting account. Requires auth.", + "operationId": "app.bsky.notification.listNotifications", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "seenAt", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "notifications" + ], + "properties": { + "cursor": { + "type": "string" + }, + "notifications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.notification.listNotifications.notification" + } + }, + "seenAt": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.notification.registerPush": { + "post": { + "tags": [ + "app.bsky.notification" + ], + "summary": "Register to receive push notifications, via a specified service, for the requesting account. Requires auth.", + "operationId": "app.bsky.notification.registerPush", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "serviceDid", + "token", + "platform", + "appId" + ], + "properties": { + "serviceDid": { + "type": "string", + "format": "did" + }, + "token": { + "type": "string" + }, + "platform": { + "type": "string", + "enum": [ + "ios", + "android", + "web" + ] + }, + "appId": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.notification.updateSeen": { + "post": { + "tags": [ + "app.bsky.notification" + ], + "summary": "Notify server that the requesting account has seen notifications. Requires auth.", + "operationId": "app.bsky.notification.updateSeen", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "seenAt" + ], + "properties": { + "seenAt": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.unspecced.applyLabels": { + "post": { + "tags": [ + "app.bsky.unspecced" + ], + "summary": "Allow a labeler to apply labels directly.", + "operationId": "app.bsky.unspecced.applyLabels", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "labels" + ], + "properties": { + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.label.defs.label" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.unspecced.getPopular": { + "get": { + "tags": [ + "app.bsky.unspecced" + ], + "summary": "DEPRECATED: will be removed soon. Use a feed generator alternative.", + "operationId": "app.bsky.unspecced.getPopular", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "includeNsfw", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "feed" + ], + "properties": { + "cursor": { + "type": "string" + }, + "feed": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.feed.defs.feedViewPost" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.unspecced.getPopularFeedGenerators": { + "get": { + "tags": [ + "app.bsky.unspecced" + ], + "summary": "An unspecced view of globally popular feed generators.", + "operationId": "app.bsky.unspecced.getPopularFeedGenerators", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "query", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "feeds" + ], + "properties": { + "cursor": { + "type": "string" + }, + "feeds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.feed.defs.generatorView" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/app.bsky.unspecced.getTaggedSuggestions": { + "get": { + "tags": [ + "app.bsky.unspecced" + ], + "summary": "Get a list of suggestions (feeds and users) tagged with categories", + "operationId": "app.bsky.unspecced.getTaggedSuggestions", + "security": [ + { + "Bearer": [] + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "suggestions" + ], + "properties": { + "suggestions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.unspecced.getTaggedSuggestions.suggestion" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.identity.getRecommendedDidCredentials": { + "get": { + "tags": [ + "com.atproto.identity" + ], + "summary": "Describe the credentials that should be included in the DID doc of an account that is migrating to this service.", + "operationId": "com.atproto.identity.getRecommendedDidCredentials", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "rotationKeys": { + "type": "array", + "items": { + "type": "string" + } + }, + "alsoKnownAs": { + "type": "array", + "items": { + "type": "string" + } + }, + "verificationMethods": {}, + "services": {} + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.identity.requestPlcOperationSignature": { + "post": { + "tags": [ + "com.atproto.identity" + ], + "summary": "Request an email with a code to in order to request a signed PLC operation. Requires Auth.", + "operationId": "com.atproto.identity.requestPlcOperationSignature", + "security": [ + { + "Bearer": [] + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.identity.resolveHandle": { + "get": { + "tags": [ + "com.atproto.identity" + ], + "summary": "Resolves a handle (domain name) to a DID.", + "operationId": "com.atproto.identity.resolveHandle", + "parameters": [ + { + "name": "handle", + "in": "query", + "description": "The handle to resolve.", + "required": true, + "schema": { + "type": "string", + "description": "The handle to resolve.", + "format": "handle" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "did" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.identity.signPlcOperation": { + "post": { + "tags": [ + "com.atproto.identity" + ], + "summary": "Signs a PLC operation to update some value(s) in the requesting DID's document.", + "operationId": "com.atproto.identity.signPlcOperation", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "type": "string", + "description": "A token received through com.atproto.identity.requestPlcOperationSignature" + }, + "rotationKeys": { + "type": "array", + "items": { + "type": "string" + } + }, + "alsoKnownAs": { + "type": "array", + "items": { + "type": "string" + } + }, + "verificationMethods": {}, + "services": {} + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "operation" + ], + "properties": { + "operation": {} + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.identity.submitPlcOperation": { + "post": { + "tags": [ + "com.atproto.identity" + ], + "summary": "Validates a PLC operation to ensure that it doesn't violate a service's constraints or get the identity into a bad state, then submits it to the PLC registry", + "operationId": "com.atproto.identity.submitPlcOperation", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "operation" + ], + "properties": { + "operation": {} + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.identity.updateHandle": { + "post": { + "tags": [ + "com.atproto.identity" + ], + "summary": "Updates the current account's handle. Verifies handle validity, and updates did:plc document if necessary. Implemented by PDS, and requires auth.", + "operationId": "com.atproto.identity.updateHandle", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "handle" + ], + "properties": { + "handle": { + "type": "string", + "description": "The new handle.", + "format": "handle" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.moderation.createReport": { + "post": { + "tags": [ + "com.atproto.moderation" + ], + "summary": "Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth.", + "operationId": "com.atproto.moderation.createReport", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "reasonType", + "subject" + ], + "properties": { + "reasonType": { + "$ref": "#/components/schemas/com.atproto.moderation.defs.reasonType" + }, + "reason": { + "type": "string", + "description": "Additional context about the content and violation." + }, + "subject": { + "oneOf": [ + { + "$ref": "#/components/schemas/com.atproto.admin.defs.repoRef" + }, + { + "$ref": "#/components/schemas/com.atproto.repo.strongRef" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "reasonType", + "subject", + "reportedBy", + "createdAt" + ], + "properties": { + "id": { + "type": "integer" + }, + "reasonType": { + "$ref": "#/components/schemas/com.atproto.moderation.defs.reasonType" + }, + "reason": { + "type": "string", + "maxLength": 20000 + }, + "subject": { + "oneOf": [ + { + "$ref": "#/components/schemas/com.atproto.admin.defs.repoRef" + }, + { + "$ref": "#/components/schemas/com.atproto.repo.strongRef" + } + ] + }, + "reportedBy": { + "type": "string", + "format": "did" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.repo.applyWrites": { + "post": { + "tags": [ + "com.atproto.repo" + ], + "summary": "Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.", + "operationId": "com.atproto.repo.applyWrites", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "repo", + "writes" + ], + "properties": { + "repo": { + "type": "string", + "description": "The handle or DID of the repo (aka, current account).", + "format": "at-identifier" + }, + "validate": { + "type": "boolean", + "description": "Can be set to 'false' to skip Lexicon schema validation of record data, for all operations.", + "default": true + }, + "writes": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/com.atproto.repo.applyWrites.create" + }, + { + "$ref": "#/components/schemas/com.atproto.repo.applyWrites.update" + }, + { + "$ref": "#/components/schemas/com.atproto.repo.applyWrites.delete" + } + ] + } + }, + "swapCommit": { + "type": "string", + "description": "If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations.", + "format": "cid" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + }, + { + "const": "InvalidSwap" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.repo.createRecord": { + "post": { + "tags": [ + "com.atproto.repo" + ], + "summary": "Create a single new repository record. Requires auth, implemented by PDS.", + "operationId": "com.atproto.repo.createRecord", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "repo", + "collection", + "record" + ], + "properties": { + "repo": { + "type": "string", + "description": "The handle or DID of the repo (aka, current account).", + "format": "at-identifier" + }, + "collection": { + "type": "string", + "description": "The NSID of the record collection.", + "format": "nsid" + }, + "rkey": { + "type": "string", + "description": "The Record Key.", + "maxLength": 15 + }, + "validate": { + "type": "boolean", + "description": "Can be set to 'false' to skip Lexicon schema validation of record data.", + "default": true + }, + "record": {}, + "swapCommit": { + "type": "string", + "description": "Compare and swap with the previous commit by CID.", + "format": "cid" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "uri", + "cid" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "cid": { + "type": "string", + "format": "cid" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + }, + { + "const": "InvalidSwap" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.repo.deleteRecord": { + "post": { + "tags": [ + "com.atproto.repo" + ], + "summary": "Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.", + "operationId": "com.atproto.repo.deleteRecord", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "repo", + "collection", + "rkey" + ], + "properties": { + "repo": { + "type": "string", + "description": "The handle or DID of the repo (aka, current account).", + "format": "at-identifier" + }, + "collection": { + "type": "string", + "description": "The NSID of the record collection.", + "format": "nsid" + }, + "rkey": { + "type": "string", + "description": "The Record Key." + }, + "swapRecord": { + "type": "string", + "description": "Compare and swap with the previous record by CID.", + "format": "cid" + }, + "swapCommit": { + "type": "string", + "description": "Compare and swap with the previous commit by CID.", + "format": "cid" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + }, + { + "const": "InvalidSwap" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.repo.describeRepo": { + "get": { + "tags": [ + "com.atproto.repo" + ], + "summary": "Get information about an account and repository, including the list of collections. Does not require auth.", + "operationId": "com.atproto.repo.describeRepo", + "parameters": [ + { + "name": "repo", + "in": "query", + "description": "The handle or DID of the repo.", + "required": true, + "schema": { + "type": "string", + "description": "The handle or DID of the repo.", + "format": "at-identifier" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "handle", + "did", + "didDoc", + "collections", + "handleIsCorrect" + ], + "properties": { + "handle": { + "type": "string", + "format": "handle" + }, + "did": { + "type": "string", + "format": "did" + }, + "didDoc": {}, + "collections": { + "type": "array", + "items": { + "type": "string", + "format": "nsid" + } + }, + "handleIsCorrect": { + "type": "boolean", + "description": "Indicates if handle is currently valid (resolves bi-directionally)" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.repo.getRecord": { + "get": { + "tags": [ + "com.atproto.repo" + ], + "summary": "Get a single record from a repository. Does not require auth.", + "operationId": "com.atproto.repo.getRecord", + "parameters": [ + { + "name": "repo", + "in": "query", + "description": "The handle or DID of the repo.", + "required": true, + "schema": { + "type": "string", + "description": "The handle or DID of the repo.", + "format": "at-identifier" + } + }, + { + "name": "collection", + "in": "query", + "description": "The NSID of the record collection.", + "required": true, + "schema": { + "type": "string", + "description": "The NSID of the record collection.", + "format": "nsid" + } + }, + { + "name": "rkey", + "in": "query", + "description": "The Record Key.", + "required": true, + "schema": { + "type": "string", + "description": "The Record Key." + } + }, + { + "name": "cid", + "in": "query", + "description": "The CID of the version of the record. If not specified, then return the most recent version.", + "required": false, + "schema": { + "type": "string", + "description": "The CID of the version of the record. If not specified, then return the most recent version.", + "format": "cid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "uri", + "value" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "cid": { + "type": "string", + "format": "cid" + }, + "value": {} + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.repo.importRepo": { + "post": { + "tags": [ + "com.atproto.repo" + ], + "summary": "Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set.", + "operationId": "com.atproto.repo.importRepo", + "requestBody": { + "required": true, + "content": { + "application/vnd.ipld.car": {} + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.repo.listMissingBlobs": { + "get": { + "tags": [ + "com.atproto.repo" + ], + "summary": "Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow.", + "operationId": "com.atproto.repo.listMissingBlobs", + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 500 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "blobs" + ], + "properties": { + "cursor": { + "type": "string" + }, + "blobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.repo.listMissingBlobs.recordBlob" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.repo.listRecords": { + "get": { + "tags": [ + "com.atproto.repo" + ], + "summary": "List a range of records in a repository, matching a specific collection. Does not require auth.", + "operationId": "com.atproto.repo.listRecords", + "parameters": [ + { + "name": "repo", + "in": "query", + "description": "The handle or DID of the repo.", + "required": true, + "schema": { + "type": "string", + "description": "The handle or DID of the repo.", + "format": "at-identifier" + } + }, + { + "name": "collection", + "in": "query", + "description": "The NSID of the record type.", + "required": true, + "schema": { + "type": "string", + "description": "The NSID of the record type.", + "format": "nsid" + } + }, + { + "name": "limit", + "in": "query", + "description": "The number of records to return.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "rkeyStart", + "in": "query", + "description": "DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)", + "required": false, + "schema": { + "type": "string", + "description": "DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)" + } + }, + { + "name": "rkeyEnd", + "in": "query", + "description": "DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)", + "required": false, + "schema": { + "type": "string", + "description": "DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)" + } + }, + { + "name": "reverse", + "in": "query", + "description": "Flag to reverse the order of the returned records.", + "required": false, + "schema": { + "type": "boolean", + "description": "Flag to reverse the order of the returned records." + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "records" + ], + "properties": { + "cursor": { + "type": "string" + }, + "records": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.repo.listRecords.record" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.repo.putRecord": { + "post": { + "tags": [ + "com.atproto.repo" + ], + "summary": "Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.", + "operationId": "com.atproto.repo.putRecord", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "repo", + "collection", + "rkey", + "record" + ], + "properties": { + "repo": { + "type": "string", + "description": "The handle or DID of the repo (aka, current account).", + "format": "at-identifier" + }, + "collection": { + "type": "string", + "description": "The NSID of the record collection.", + "format": "nsid" + }, + "rkey": { + "type": "string", + "description": "The Record Key.", + "maxLength": 15 + }, + "validate": { + "type": "boolean", + "description": "Can be set to 'false' to skip Lexicon schema validation of record data.", + "default": true + }, + "record": {}, + "swapRecord": { + "type": "string", + "description": "Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation", + "format": "cid" + }, + "swapCommit": { + "type": "string", + "description": "Compare and swap with the previous commit by CID.", + "format": "cid" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "uri", + "cid" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "cid": { + "type": "string", + "format": "cid" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + }, + { + "const": "InvalidSwap" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.repo.rebaseRepo": { + "post": { + "tags": [ + "com.atproto.repo" + ], + "summary": "Simple rebase of repo that deletes history", + "operationId": "com.atproto.repo.rebaseRepo", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "repo" + ], + "properties": { + "repo": { + "type": "string", + "description": "The handle or DID of the repo.", + "format": "at-identifier" + }, + "swapCommit": { + "type": "string", + "description": "Compare and swap with the previous commit by cid.", + "format": "cid" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "InvalidSwap" + }, + { + "const": "ConcurrentWrites" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.repo.uploadBlob": { + "post": { + "tags": [ + "com.atproto.repo" + ], + "summary": "Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS.", + "operationId": "com.atproto.repo.uploadBlob", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "*/*": {} + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "blob" + ], + "properties": { + "blob": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.activateAccount": { + "post": { + "tags": [ + "com.atproto.server" + ], + "summary": "Activates a currently deactivated account. Used to finalize account migration after the account's repo is imported and identity is setup.", + "operationId": "com.atproto.server.activateAccount", + "security": [ + { + "Bearer": [] + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.checkAccountStatus": { + "get": { + "tags": [ + "com.atproto.server" + ], + "summary": "Returns the status of an account, especially as pertaining to import or recovery. Can be called many times over the course of an account migration. Requires auth and can only be called pertaining to oneself.", + "operationId": "com.atproto.server.checkAccountStatus", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "activated", + "validDid", + "repoCommit", + "repoRev", + "repoBlocks", + "indexedRecords", + "privateStateValues", + "expectedBlobs", + "importedBlobs" + ], + "properties": { + "activated": { + "type": "boolean" + }, + "validDid": { + "type": "boolean" + }, + "repoCommit": { + "type": "string", + "format": "cid" + }, + "repoRev": { + "type": "string" + }, + "repoBlocks": { + "type": "integer" + }, + "indexedRecords": { + "type": "integer" + }, + "privateStateValues": { + "type": "integer" + }, + "expectedBlobs": { + "type": "integer" + }, + "importedBlobs": { + "type": "integer" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.confirmEmail": { + "post": { + "tags": [ + "com.atproto.server" + ], + "summary": "Confirm an email using a token from com.atproto.server.requestEmailConfirmation.", + "operationId": "com.atproto.server.confirmEmail", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "email", + "token" + ], + "properties": { + "email": { + "type": "string" + }, + "token": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + }, + { + "const": "AccountNotFound" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + }, + { + "const": "InvalidEmail" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.createAccount": { + "post": { + "tags": [ + "com.atproto.server" + ], + "summary": "Create an account. Implemented by PDS.", + "operationId": "com.atproto.server.createAccount", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "handle" + ], + "properties": { + "email": { + "type": "string" + }, + "handle": { + "type": "string", + "description": "Requested handle for the account.", + "format": "handle" + }, + "did": { + "type": "string", + "description": "Pre-existing atproto DID, being imported to a new account.", + "format": "did" + }, + "inviteCode": { + "type": "string" + }, + "verificationCode": { + "type": "string" + }, + "verificationPhone": { + "type": "string" + }, + "password": { + "type": "string", + "description": "Initial account password. May need to meet instance-specific password strength requirements." + }, + "recoveryKey": { + "type": "string", + "description": "DID PLC rotation key (aka, recovery key) to be included in PLC creation operation." + }, + "plcOp": {} + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Account login session returned on successful account creation.", + "required": [ + "accessJwt", + "refreshJwt", + "handle", + "did" + ], + "properties": { + "accessJwt": { + "type": "string" + }, + "refreshJwt": { + "type": "string" + }, + "handle": { + "type": "string", + "format": "handle" + }, + "did": { + "type": "string", + "description": "The DID of the new account.", + "format": "did" + }, + "didDoc": {} + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "InvalidHandle" + }, + { + "const": "InvalidPassword" + }, + { + "const": "InvalidInviteCode" + }, + { + "const": "HandleNotAvailable" + }, + { + "const": "UnsupportedDomain" + }, + { + "const": "UnresolvableDid" + }, + { + "const": "IncompatibleDidDoc" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.createAppPassword": { + "post": { + "tags": [ + "com.atproto.server" + ], + "summary": "Create an App Password.", + "operationId": "com.atproto.server.createAppPassword", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "A short name for the App Password, to help distinguish them." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.atproto.server.createAppPassword.appPassword" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + }, + { + "const": "AccountTakedown" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.createInviteCode": { + "post": { + "tags": [ + "com.atproto.server" + ], + "summary": "Create an invite code.", + "operationId": "com.atproto.server.createInviteCode", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "useCount" + ], + "properties": { + "useCount": { + "type": "integer" + }, + "forAccount": { + "type": "string", + "format": "did" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.createInviteCodes": { + "post": { + "tags": [ + "com.atproto.server" + ], + "summary": "Create invite codes.", + "operationId": "com.atproto.server.createInviteCodes", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "codeCount", + "useCount" + ], + "properties": { + "codeCount": { + "type": "integer", + "default": 1 + }, + "useCount": { + "type": "integer" + }, + "forAccounts": { + "type": "array", + "items": { + "type": "string", + "format": "did" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "codes" + ], + "properties": { + "codes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.server.createInviteCodes.accountCodes" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.createSession": { + "post": { + "tags": [ + "com.atproto.server" + ], + "summary": "Create an authentication session.", + "operationId": "com.atproto.server.createSession", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "identifier", + "password" + ], + "properties": { + "identifier": { + "type": "string", + "description": "Handle or other identifier supported by the server for the authenticating user." + }, + "password": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "accessJwt", + "refreshJwt", + "handle", + "did" + ], + "properties": { + "accessJwt": { + "type": "string" + }, + "refreshJwt": { + "type": "string" + }, + "handle": { + "type": "string", + "format": "handle" + }, + "did": { + "type": "string", + "format": "did" + }, + "didDoc": {}, + "email": { + "type": "string" + }, + "emailConfirmed": { + "type": "boolean" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "AccountTakedown" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.deactivateAccount": { + "post": { + "tags": [ + "com.atproto.server" + ], + "summary": "Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host.", + "operationId": "com.atproto.server.deactivateAccount", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deleteAfter": { + "type": "string", + "description": "A recommendation to server as to how long they should hold onto the deactivated account before deleting.", + "format": "date-time" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.deleteAccount": { + "post": { + "tags": [ + "com.atproto.server" + ], + "summary": "Delete an actor's account with a token and password. Can only be called after requesting a deletion token. Requires auth.", + "operationId": "com.atproto.server.deleteAccount", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "did", + "password", + "token" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + }, + "password": { + "type": "string" + }, + "token": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.deleteSession": { + "post": { + "tags": [ + "com.atproto.server" + ], + "summary": "Delete the current session. Requires auth.", + "operationId": "com.atproto.server.deleteSession", + "security": [ + { + "Bearer": [] + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.describeServer": { + "get": { + "tags": [ + "com.atproto.server" + ], + "summary": "Describes the server's account creation requirements and capabilities. Implemented by PDS.", + "operationId": "com.atproto.server.describeServer", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "did", + "availableUserDomains" + ], + "properties": { + "inviteCodeRequired": { + "type": "boolean", + "description": "If true, an invite code must be supplied to create an account on this instance." + }, + "phoneVerificationRequired": { + "type": "boolean", + "description": "If true, a phone verification token must be supplied to create an account on this instance." + }, + "availableUserDomains": { + "type": "array", + "items": { + "type": "string" + } + }, + "links": { + "$ref": "#/components/schemas/com.atproto.server.describeServer.links" + }, + "did": { + "type": "string", + "format": "did" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.getAccountInviteCodes": { + "get": { + "tags": [ + "com.atproto.server" + ], + "summary": "Get all invite codes for the current account. Requires auth.", + "operationId": "com.atproto.server.getAccountInviteCodes", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "includeUsed", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "createAvailable", + "in": "query", + "description": "Controls whether any new 'earned' but not 'created' invites should be created.", + "required": false, + "schema": { + "type": "boolean", + "description": "Controls whether any new 'earned' but not 'created' invites should be created.", + "default": true + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "codes" + ], + "properties": { + "codes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.server.defs.inviteCode" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + }, + { + "const": "DuplicateCreate" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.getServiceAuth": { + "get": { + "tags": [ + "com.atproto.server" + ], + "summary": "Get a signed token on behalf of the requesting DID for the requested service.", + "operationId": "com.atproto.server.getServiceAuth", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "aud", + "in": "query", + "description": "The DID of the service that the token will be used to authenticate with", + "required": true, + "schema": { + "type": "string", + "description": "The DID of the service that the token will be used to authenticate with", + "format": "did" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.getSession": { + "get": { + "tags": [ + "com.atproto.server" + ], + "summary": "Get information about the current auth session. Requires auth.", + "operationId": "com.atproto.server.getSession", + "security": [ + { + "Bearer": [] + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "handle", + "did" + ], + "properties": { + "handle": { + "type": "string", + "format": "handle" + }, + "did": { + "type": "string", + "format": "did" + }, + "email": { + "type": "string" + }, + "emailConfirmed": { + "type": "boolean" + }, + "didDoc": {} + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.listAppPasswords": { + "get": { + "tags": [ + "com.atproto.server" + ], + "summary": "List all App Passwords.", + "operationId": "com.atproto.server.listAppPasswords", + "security": [ + { + "Bearer": [] + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "passwords" + ], + "properties": { + "passwords": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.server.listAppPasswords.appPassword" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + }, + { + "const": "AccountTakedown" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.refreshSession": { + "post": { + "tags": [ + "com.atproto.server" + ], + "summary": "Refresh an authentication session. Requires auth using the 'refreshJwt' (not the 'accessJwt').", + "operationId": "com.atproto.server.refreshSession", + "security": [ + { + "Bearer": [] + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "accessJwt", + "refreshJwt", + "handle", + "did" + ], + "properties": { + "accessJwt": { + "type": "string" + }, + "refreshJwt": { + "type": "string" + }, + "handle": { + "type": "string", + "format": "handle" + }, + "did": { + "type": "string", + "format": "did" + }, + "didDoc": {} + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + }, + { + "const": "AccountTakedown" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.requestAccountDelete": { + "post": { + "tags": [ + "com.atproto.server" + ], + "summary": "Initiate a user account deletion via email.", + "operationId": "com.atproto.server.requestAccountDelete", + "security": [ + { + "Bearer": [] + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.requestEmailConfirmation": { + "post": { + "tags": [ + "com.atproto.server" + ], + "summary": "Request an email with a code to confirm ownership of email.", + "operationId": "com.atproto.server.requestEmailConfirmation", + "security": [ + { + "Bearer": [] + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.requestEmailUpdate": { + "post": { + "tags": [ + "com.atproto.server" + ], + "summary": "Request a token in order to update email.", + "operationId": "com.atproto.server.requestEmailUpdate", + "security": [ + { + "Bearer": [] + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "tokenRequired" + ], + "properties": { + "tokenRequired": { + "type": "boolean" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.requestPasswordReset": { + "post": { + "tags": [ + "com.atproto.server" + ], + "summary": "Initiate a user account password reset via email.", + "operationId": "com.atproto.server.requestPasswordReset", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "email" + ], + "properties": { + "email": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.reserveSigningKey": { + "post": { + "tags": [ + "com.atproto.server" + ], + "summary": "Reserve a repo signing key, for use with account creation. Necessary so that a DID PLC update operation can be constructed during an account migraiton. Public and does not require auth; implemented by PDS. NOTE: this endpoint may change when full account migration is implemented.", + "operationId": "com.atproto.server.reserveSigningKey", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "did": { + "type": "string", + "description": "The DID to reserve a key for.", + "format": "did" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "signingKey" + ], + "properties": { + "signingKey": { + "type": "string", + "description": "The public key for the reserved signing key, in did:key serialization." + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.resetPassword": { + "post": { + "tags": [ + "com.atproto.server" + ], + "summary": "Reset a user account password using a token.", + "operationId": "com.atproto.server.resetPassword", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "token", + "password" + ], + "properties": { + "token": { + "type": "string" + }, + "password": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.revokeAppPassword": { + "post": { + "tags": [ + "com.atproto.server" + ], + "summary": "Revoke an App Password by name.", + "operationId": "com.atproto.server.revokeAppPassword", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.server.updateEmail": { + "post": { + "tags": [ + "com.atproto.server" + ], + "summary": "Update an account's email.", + "operationId": "com.atproto.server.updateEmail", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "email" + ], + "properties": { + "email": { + "type": "string" + }, + "token": { + "type": "string", + "description": "Requires a token from com.atproto.sever.requestEmailUpdate if the account's email has been confirmed." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + }, + { + "const": "TokenRequired" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.sync.getBlob": { + "get": { + "tags": [ + "com.atproto.sync" + ], + "summary": "Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS.", + "operationId": "com.atproto.sync.getBlob", + "parameters": [ + { + "name": "did", + "in": "query", + "description": "The DID of the account.", + "required": true, + "schema": { + "type": "string", + "description": "The DID of the account.", + "format": "did" + } + }, + { + "name": "cid", + "in": "query", + "description": "The CID of the blob to fetch", + "required": true, + "schema": { + "type": "string", + "description": "The CID of the blob to fetch", + "format": "cid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": {} + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.sync.getBlocks": { + "get": { + "tags": [ + "com.atproto.sync" + ], + "summary": "Get data blocks from a given repo, by CID. For example, intermediate MST nodes, or records. Does not require auth; implemented by PDS.", + "operationId": "com.atproto.sync.getBlocks", + "parameters": [ + { + "name": "did", + "in": "query", + "description": "The DID of the repo.", + "required": true, + "schema": { + "type": "string", + "description": "The DID of the repo.", + "format": "did" + } + }, + { + "name": "cids", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "cid" + } + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/vnd.ipld.car": {} + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.sync.getCheckout": { + "get": { + "tags": [ + "com.atproto.sync" + ], + "summary": "DEPRECATED - please use com.atproto.sync.getRepo instead", + "operationId": "com.atproto.sync.getCheckout", + "parameters": [ + { + "name": "did", + "in": "query", + "description": "The DID of the repo.", + "required": true, + "schema": { + "type": "string", + "description": "The DID of the repo.", + "format": "did" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/vnd.ipld.car": {} + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.sync.getCommitPath": { + "get": { + "tags": [ + "com.atproto.sync" + ], + "summary": "Gets the path of repo commits", + "operationId": "com.atproto.sync.getCommitPath", + "parameters": [ + { + "name": "did", + "in": "query", + "description": "The DID of the repo.", + "required": true, + "schema": { + "type": "string", + "description": "The DID of the repo.", + "format": "did" + } + }, + { + "name": "latest", + "in": "query", + "description": "The most recent commit", + "required": false, + "schema": { + "type": "string", + "description": "The most recent commit", + "format": "cid" + } + }, + { + "name": "earliest", + "in": "query", + "description": "The earliest commit to start from", + "required": false, + "schema": { + "type": "string", + "description": "The earliest commit to start from", + "format": "cid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "commits" + ], + "properties": { + "commits": { + "type": "array", + "items": { + "type": "string", + "format": "cid" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.sync.getHead": { + "get": { + "tags": [ + "com.atproto.sync" + ], + "summary": "DEPRECATED - please use com.atproto.sync.getLatestCommit instead", + "operationId": "com.atproto.sync.getHead", + "parameters": [ + { + "name": "did", + "in": "query", + "description": "The DID of the repo.", + "required": true, + "schema": { + "type": "string", + "description": "The DID of the repo.", + "format": "did" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "root" + ], + "properties": { + "root": { + "type": "string", + "format": "cid" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "HeadNotFound" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.sync.getLatestCommit": { + "get": { + "tags": [ + "com.atproto.sync" + ], + "summary": "Get the current commit CID & revision of the specified repo. Does not require auth.", + "operationId": "com.atproto.sync.getLatestCommit", + "parameters": [ + { + "name": "did", + "in": "query", + "description": "The DID of the repo.", + "required": true, + "schema": { + "type": "string", + "description": "The DID of the repo.", + "format": "did" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "cid", + "rev" + ], + "properties": { + "cid": { + "type": "string", + "format": "cid" + }, + "rev": { + "type": "string" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "RepoNotFound" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.sync.getRecord": { + "get": { + "tags": [ + "com.atproto.sync" + ], + "summary": "Get data blocks needed to prove the existence or non-existence of record in the current version of repo. Does not require auth.", + "operationId": "com.atproto.sync.getRecord", + "parameters": [ + { + "name": "did", + "in": "query", + "description": "The DID of the repo.", + "required": true, + "schema": { + "type": "string", + "description": "The DID of the repo.", + "format": "did" + } + }, + { + "name": "collection", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "nsid" + } + }, + { + "name": "rkey", + "in": "query", + "description": "Record Key", + "required": true, + "schema": { + "type": "string", + "description": "Record Key" + } + }, + { + "name": "commit", + "in": "query", + "description": "An optional past commit CID.", + "required": false, + "schema": { + "type": "string", + "description": "An optional past commit CID.", + "format": "cid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/vnd.ipld.car": {} + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.sync.getRepo": { + "get": { + "tags": [ + "com.atproto.sync" + ], + "summary": "Download a repository export as CAR file. Optionally only a 'diff' since a previous revision. Does not require auth; implemented by PDS.", + "operationId": "com.atproto.sync.getRepo", + "parameters": [ + { + "name": "did", + "in": "query", + "description": "The DID of the repo.", + "required": true, + "schema": { + "type": "string", + "description": "The DID of the repo.", + "format": "did" + } + }, + { + "name": "since", + "in": "query", + "description": "The revision ('rev') of the repo to create a diff from.", + "required": false, + "schema": { + "type": "string", + "description": "The revision ('rev') of the repo to create a diff from." + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/vnd.ipld.car": {} + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.sync.listBlobs": { + "get": { + "tags": [ + "com.atproto.sync" + ], + "summary": "List blob CIDso for an account, since some repo revision. Does not require auth; implemented by PDS.", + "operationId": "com.atproto.sync.listBlobs", + "parameters": [ + { + "name": "did", + "in": "query", + "description": "The DID of the repo.", + "required": true, + "schema": { + "type": "string", + "description": "The DID of the repo.", + "format": "did" + } + }, + { + "name": "since", + "in": "query", + "description": "Optional revision of the repo to list blobs since.", + "required": false, + "schema": { + "type": "string", + "description": "Optional revision of the repo to list blobs since." + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 500 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "cids" + ], + "properties": { + "cursor": { + "type": "string" + }, + "cids": { + "type": "array", + "items": { + "type": "string", + "format": "cid" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.sync.listRepos": { + "get": { + "tags": [ + "com.atproto.sync" + ], + "summary": "Enumerates all the DID, rev, and commit CID for all repos hosted by this service. Does not require auth; implemented by PDS and Relay.", + "operationId": "com.atproto.sync.listRepos", + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 500 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "repos" + ], + "properties": { + "cursor": { + "type": "string" + }, + "repos": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.sync.listRepos.repo" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.temp.checkSignupQueue": { + "get": { + "tags": [ + "com.atproto.temp" + ], + "summary": "Check accounts location in signup queue.", + "operationId": "com.atproto.temp.checkSignupQueue", + "security": [ + { + "Bearer": [] + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "activated" + ], + "properties": { + "activated": { + "type": "boolean" + }, + "placeInQueue": { + "type": "integer" + }, + "estimatedTimeMs": { + "type": "integer" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.temp.requestPhoneVerification": { + "post": { + "tags": [ + "com.atproto.temp" + ], + "summary": "Request a verification code to be sent to the supplied phone number", + "operationId": "com.atproto.temp.requestPhoneVerification", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "phoneNumber" + ], + "properties": { + "phoneNumber": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/com.atproto.temp.upgradeRepoVersion": { + "post": { + "tags": [ + "com.atproto.temp" + ], + "summary": "Upgrade a repo to v3", + "operationId": "com.atproto.temp.upgradeRepoVersion", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "did" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + }, + "force": { + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/tools.ozone.communication.createTemplate": { + "post": { + "tags": [ + "tools.ozone.communication" + ], + "summary": "Administrative action to create a new, re-usable communication (email for now) template.", + "operationId": "tools.ozone.communication.createTemplate", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "subject", + "contentMarkdown", + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the template." + }, + "contentMarkdown": { + "type": "string", + "description": "Content of the template, markdown supported, can contain variable placeholders." + }, + "subject": { + "type": "string", + "description": "Subject of the message, used in emails." + }, + "createdBy": { + "type": "string", + "description": "DID of the user who is creating the template.", + "format": "did" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tools.ozone.communication.defs.templateView" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/tools.ozone.communication.deleteTemplate": { + "post": { + "tags": [ + "tools.ozone.communication" + ], + "summary": "Delete a communication template.", + "operationId": "tools.ozone.communication.deleteTemplate", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/tools.ozone.communication.listTemplates": { + "get": { + "tags": [ + "tools.ozone.communication" + ], + "summary": "Get list of all communication templates.", + "operationId": "tools.ozone.communication.listTemplates", + "security": [ + { + "Bearer": [] + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "communicationTemplates" + ], + "properties": { + "communicationTemplates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/tools.ozone.communication.defs.templateView" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/tools.ozone.communication.updateTemplate": { + "post": { + "tags": [ + "tools.ozone.communication" + ], + "summary": "Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only.", + "operationId": "tools.ozone.communication.updateTemplate", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "description": "ID of the template to be updated." + }, + "name": { + "type": "string", + "description": "Name of the template." + }, + "contentMarkdown": { + "type": "string", + "description": "Content of the template, markdown supported, can contain variable placeholders." + }, + "subject": { + "type": "string", + "description": "Subject of the message, used in emails." + }, + "updatedBy": { + "type": "string", + "description": "DID of the user who is updating the template.", + "format": "did" + }, + "disabled": { + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tools.ozone.communication.defs.templateView" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/tools.ozone.moderation.emitEvent": { + "post": { + "tags": [ + "tools.ozone.moderation" + ], + "summary": "Take a moderation action on an actor.", + "operationId": "tools.ozone.moderation.emitEvent", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "event", + "subject", + "createdBy" + ], + "properties": { + "event": { + "oneOf": [ + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventTakedown" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventAcknowledge" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventEscalate" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventComment" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventLabel" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventReport" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventMute" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventReverseTakedown" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventUnmute" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventEmail" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventTag" + } + ] + }, + "subject": { + "oneOf": [ + { + "$ref": "#/components/schemas/com.atproto.admin.defs.repoRef" + }, + { + "$ref": "#/components/schemas/com.atproto.repo.strongRef" + } + ] + }, + "subjectBlobCids": { + "type": "array", + "items": { + "type": "string", + "format": "cid" + } + }, + "createdBy": { + "type": "string", + "format": "did" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventView" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + }, + { + "const": "SubjectHasAction" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/tools.ozone.moderation.getEvent": { + "get": { + "tags": [ + "tools.ozone.moderation" + ], + "summary": "Get details about a moderation event.", + "operationId": "tools.ozone.moderation.getEvent", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventViewDetail" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/tools.ozone.moderation.getRecord": { + "get": { + "tags": [ + "tools.ozone.moderation" + ], + "summary": "Get details about a record.", + "operationId": "tools.ozone.moderation.getRecord", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "uri", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "at-uri" + } + }, + { + "name": "cid", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "cid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.recordViewDetail" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + }, + { + "const": "RecordNotFound" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/tools.ozone.moderation.getRepo": { + "get": { + "tags": [ + "tools.ozone.moderation" + ], + "summary": "Get details about a repository.", + "operationId": "tools.ozone.moderation.getRepo", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "did", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "did" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.repoViewDetail" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + }, + { + "const": "RepoNotFound" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/tools.ozone.moderation.queryEvents": { + "get": { + "tags": [ + "tools.ozone.moderation" + ], + "summary": "List moderation events related to a subject.", + "operationId": "tools.ozone.moderation.queryEvents", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "types", + "in": "query", + "description": "The types of events (fully qualified string in the format of tools.ozone.moderation.defs#modEvent) to filter by. If not specified, all events are returned.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "createdBy", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "did" + } + }, + { + "name": "sortDirection", + "in": "query", + "description": "Sort direction for the events. Defaults to descending order of created at timestamp.", + "required": false, + "schema": { + "type": "string", + "description": "Sort direction for the events. Defaults to descending order of created at timestamp.", + "default": "desc" + } + }, + { + "name": "createdAfter", + "in": "query", + "description": "Retrieve events created after a given timestamp", + "required": false, + "schema": { + "type": "string", + "description": "Retrieve events created after a given timestamp", + "format": "date-time" + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Retrieve events created before a given timestamp", + "required": false, + "schema": { + "type": "string", + "description": "Retrieve events created before a given timestamp", + "format": "date-time" + } + }, + { + "name": "subject", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uri" + } + }, + { + "name": "includeAllUserRecords", + "in": "query", + "description": "If true, events on all record types (posts, lists, profile etc.) owned by the did are returned", + "required": false, + "schema": { + "type": "boolean", + "description": "If true, events on all record types (posts, lists, profile etc.) owned by the did are returned" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "hasComment", + "in": "query", + "description": "If true, only events with comments are returned", + "required": false, + "schema": { + "type": "boolean", + "description": "If true, only events with comments are returned" + } + }, + { + "name": "comment", + "in": "query", + "description": "If specified, only events with comments containing the keyword are returned", + "required": false, + "schema": { + "type": "string", + "description": "If specified, only events with comments containing the keyword are returned" + } + }, + { + "name": "addedLabels", + "in": "query", + "description": "If specified, only events where all of these labels were added are returned", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "removedLabels", + "in": "query", + "description": "If specified, only events where all of these labels were removed are returned", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "addedTags", + "in": "query", + "description": "If specified, only events where all of these tags were added are returned", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "removedTags", + "in": "query", + "description": "If specified, only events where all of these tags were removed are returned", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "reportTypes", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "events" + ], + "properties": { + "cursor": { + "type": "string" + }, + "events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventView" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/tools.ozone.moderation.queryStatuses": { + "get": { + "tags": [ + "tools.ozone.moderation" + ], + "summary": "View moderation statuses of subjects (record or repo).", + "operationId": "tools.ozone.moderation.queryStatuses", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "subject", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uri" + } + }, + { + "name": "comment", + "in": "query", + "description": "Search subjects by keyword from comments", + "required": false, + "schema": { + "type": "string", + "description": "Search subjects by keyword from comments" + } + }, + { + "name": "reportedAfter", + "in": "query", + "description": "Search subjects reported after a given timestamp", + "required": false, + "schema": { + "type": "string", + "description": "Search subjects reported after a given timestamp", + "format": "date-time" + } + }, + { + "name": "reportedBefore", + "in": "query", + "description": "Search subjects reported before a given timestamp", + "required": false, + "schema": { + "type": "string", + "description": "Search subjects reported before a given timestamp", + "format": "date-time" + } + }, + { + "name": "reviewedAfter", + "in": "query", + "description": "Search subjects reviewed after a given timestamp", + "required": false, + "schema": { + "type": "string", + "description": "Search subjects reviewed after a given timestamp", + "format": "date-time" + } + }, + { + "name": "reviewedBefore", + "in": "query", + "description": "Search subjects reviewed before a given timestamp", + "required": false, + "schema": { + "type": "string", + "description": "Search subjects reviewed before a given timestamp", + "format": "date-time" + } + }, + { + "name": "includeMuted", + "in": "query", + "description": "By default, we don't include muted subjects in the results. Set this to true to include them.", + "required": false, + "schema": { + "type": "boolean", + "description": "By default, we don't include muted subjects in the results. Set this to true to include them." + } + }, + { + "name": "reviewState", + "in": "query", + "description": "Specify when fetching subjects in a certain state", + "required": false, + "schema": { + "type": "string", + "description": "Specify when fetching subjects in a certain state" + } + }, + { + "name": "ignoreSubjects", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + } + }, + { + "name": "lastReviewedBy", + "in": "query", + "description": "Get all subject statuses that were reviewed by a specific moderator", + "required": false, + "schema": { + "type": "string", + "description": "Get all subject statuses that were reviewed by a specific moderator", + "format": "did" + } + }, + { + "name": "sortField", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "lastReportedAt" + } + }, + { + "name": "sortDirection", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "desc" + } + }, + { + "name": "takendown", + "in": "query", + "description": "Get subjects that were taken down", + "required": false, + "schema": { + "type": "boolean", + "description": "Get subjects that were taken down" + } + }, + { + "name": "appealed", + "in": "query", + "description": "Get subjects in unresolved appealed status", + "required": false, + "schema": { + "type": "boolean", + "description": "Get subjects in unresolved appealed status" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "tags", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "excludeTags", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "subjectStatuses" + ], + "properties": { + "cursor": { + "type": "string" + }, + "subjectStatuses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.subjectStatusView" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/tools.ozone.moderation.searchRepos": { + "get": { + "tags": [ + "tools.ozone.moderation" + ], + "summary": "Find repositories based on a search term.", + "operationId": "tools.ozone.moderation.searchRepos", + "security": [ + { + "Bearer": [] + } + ], + "parameters": [ + { + "name": "term", + "in": "query", + "description": "DEPRECATED: use 'q' instead", + "required": false, + "schema": { + "type": "string", + "description": "DEPRECATED: use 'q' instead" + } + }, + { + "name": "q", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "repos" + ], + "properties": { + "cursor": { + "type": "string" + }, + "repos": { + "type": "array", + "items": { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.repoView" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "oneOf": [ + { + "const": "InvalidRequest" + }, + { + "const": "ExpiredToken" + }, + { + "const": "InvalidToken" + } + ] + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "const": "AuthMissing" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "app.bsky.actor.defs.profileViewBasic": { + "type": "object", + "required": [ + "did", + "handle" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + }, + "handle": { + "type": "string", + "format": "handle" + }, + "displayName": { + "type": "string", + "maxLength": 640 + }, + "avatar": { + "type": "string" + }, + "viewer": { + "$ref": "#/components/schemas/app.bsky.actor.defs.viewerState" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.label.defs.label" + } + } + } + }, + "app.bsky.actor.defs.profileView": { + "type": "object", + "required": [ + "did", + "handle" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + }, + "handle": { + "type": "string", + "format": "handle" + }, + "displayName": { + "type": "string", + "maxLength": 640 + }, + "description": { + "type": "string", + "maxLength": 2560 + }, + "avatar": { + "type": "string" + }, + "indexedAt": { + "type": "string", + "format": "date-time" + }, + "viewer": { + "$ref": "#/components/schemas/app.bsky.actor.defs.viewerState" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.label.defs.label" + } + } + } + }, + "app.bsky.actor.defs.profileViewDetailed": { + "type": "object", + "required": [ + "did", + "handle" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + }, + "handle": { + "type": "string", + "format": "handle" + }, + "displayName": { + "type": "string", + "maxLength": 640 + }, + "description": { + "type": "string", + "maxLength": 2560 + }, + "avatar": { + "type": "string" + }, + "banner": { + "type": "string" + }, + "followersCount": { + "type": "integer" + }, + "followsCount": { + "type": "integer" + }, + "postsCount": { + "type": "integer" + }, + "associated": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileAssociated" + }, + "indexedAt": { + "type": "string", + "format": "date-time" + }, + "viewer": { + "$ref": "#/components/schemas/app.bsky.actor.defs.viewerState" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.label.defs.label" + } + } + } + }, + "app.bsky.actor.defs.profileAssociated": { + "type": "object", + "properties": { + "lists": { + "type": "integer" + }, + "feedgens": { + "type": "integer" + }, + "labeler": { + "type": "boolean" + } + } + }, + "app.bsky.actor.defs.viewerState": { + "type": "object", + "description": "Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.", + "properties": { + "muted": { + "type": "boolean" + }, + "mutedByList": { + "$ref": "#/components/schemas/app.bsky.graph.defs.listViewBasic" + }, + "blockedBy": { + "type": "boolean" + }, + "blocking": { + "type": "string", + "format": "at-uri" + }, + "blockingByList": { + "$ref": "#/components/schemas/app.bsky.graph.defs.listViewBasic" + }, + "following": { + "type": "string", + "format": "at-uri" + }, + "followedBy": { + "type": "string", + "format": "at-uri" + } + } + }, + "app.bsky.actor.defs.preferences": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/app.bsky.actor.defs.adultContentPref" + }, + { + "$ref": "#/components/schemas/app.bsky.actor.defs.contentLabelPref" + }, + { + "$ref": "#/components/schemas/app.bsky.actor.defs.savedFeedsPref" + }, + { + "$ref": "#/components/schemas/app.bsky.actor.defs.personalDetailsPref" + }, + { + "$ref": "#/components/schemas/app.bsky.actor.defs.feedViewPref" + }, + { + "$ref": "#/components/schemas/app.bsky.actor.defs.threadViewPref" + }, + { + "$ref": "#/components/schemas/app.bsky.actor.defs.interestsPref" + }, + { + "$ref": "#/components/schemas/app.bsky.actor.defs.mutedWordsPref" + }, + { + "$ref": "#/components/schemas/app.bsky.actor.defs.hiddenPostsPref" + } + ] + } + }, + "app.bsky.actor.defs.adultContentPref": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "app.bsky.actor.defs.contentLabelPref": { + "type": "object", + "required": [ + "label", + "visibility" + ], + "properties": { + "labelerDid": { + "type": "string", + "description": "Which labeler does this preference apply to? If undefined, applies globally.", + "format": "did" + }, + "label": { + "type": "string" + }, + "visibility": { + "type": "string", + "enum": [ + "ignore", + "show", + "warn", + "hide" + ] + } + } + }, + "app.bsky.actor.defs.savedFeedsPref": { + "type": "object", + "required": [ + "pinned", + "saved" + ], + "properties": { + "pinned": { + "type": "array", + "items": { + "type": "string", + "format": "at-uri" + } + }, + "saved": { + "type": "array", + "items": { + "type": "string", + "format": "at-uri" + } + }, + "timelineIndex": { + "type": "integer" + } + } + }, + "app.bsky.actor.defs.personalDetailsPref": { + "type": "object", + "properties": { + "birthDate": { + "type": "string", + "description": "The birth date of account owner.", + "format": "date-time" + } + } + }, + "app.bsky.actor.defs.feedViewPref": { + "type": "object", + "required": [ + "feed" + ], + "properties": { + "feed": { + "type": "string", + "description": "The URI of the feed, or an identifier which describes the feed." + }, + "hideReplies": { + "type": "boolean", + "description": "Hide replies in the feed." + }, + "hideRepliesByUnfollowed": { + "type": "boolean", + "description": "Hide replies in the feed if they are not by followed users.", + "default": true + }, + "hideRepliesByLikeCount": { + "type": "integer" + }, + "hideReposts": { + "type": "boolean", + "description": "Hide reposts in the feed." + }, + "hideQuotePosts": { + "type": "boolean", + "description": "Hide quote posts in the feed." + } + } + }, + "app.bsky.actor.defs.threadViewPref": { + "type": "object", + "properties": { + "sort": { + "type": "string", + "description": "Sorting mode for threads.", + "enum": [ + "oldest", + "newest", + "most-likes", + "random" + ] + }, + "prioritizeFollowedUsers": { + "type": "boolean", + "description": "Show followed users at the top of all replies." + } + } + }, + "app.bsky.actor.defs.interestsPref": { + "type": "object", + "required": [ + "tags" + ], + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string", + "maxLength": 640 + }, + "maxItems": 100 + } + } + }, + "app.bsky.actor.defs.mutedWordTarget": { + "type": "string", + "maxLength": 640, + "enum": [ + "content", + "tag" + ] + }, + "app.bsky.actor.defs.mutedWord": { + "type": "object", + "description": "A word that the account owner has muted.", + "required": [ + "value", + "targets" + ], + "properties": { + "value": { + "type": "string", + "description": "The muted word itself.", + "maxLength": 10000 + }, + "targets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.actor.defs.mutedWordTarget" + } + } + } + }, + "app.bsky.actor.defs.mutedWordsPref": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.actor.defs.mutedWord" + } + } + } + }, + "app.bsky.actor.defs.hiddenPostsPref": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "at-uri" + } + } + } + }, + "app.bsky.actor.defs.labelersPref": { + "type": "object", + "required": [ + "labelers" + ], + "properties": { + "labelers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.actor.defs.labelerPrefItem" + } + } + } + }, + "app.bsky.actor.defs.labelerPrefItem": { + "type": "object", + "required": [ + "did" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + } + } + }, + "app.bsky.actor.profile": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "maxLength": 640 + }, + "description": { + "type": "string", + "description": "Free-form profile description text.", + "maxLength": 2560 + }, + "avatar": { + "type": "string", + "format": "binary", + "maxLength": 1000000 + }, + "banner": { + "type": "string", + "format": "binary", + "maxLength": 1000000 + }, + "labels": { + "oneOf": [ + { + "$ref": "#/components/schemas/com.atproto.label.defs.selfLabels" + } + ] + } + } + }, + "app.bsky.embed.external": { + "type": "object", + "description": "A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post).", + "required": [ + "external" + ], + "properties": { + "external": { + "$ref": "#/components/schemas/app.bsky.embed.external.external" + } + } + }, + "app.bsky.embed.external.external": { + "type": "object", + "required": [ + "uri", + "title", + "description" + ], + "properties": { + "uri": { + "type": "string", + "format": "uri" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "thumb": { + "type": "string", + "format": "binary", + "maxLength": 1000000 + } + } + }, + "app.bsky.embed.external.view": { + "type": "object", + "required": [ + "external" + ], + "properties": { + "external": { + "$ref": "#/components/schemas/app.bsky.embed.external.viewExternal" + } + } + }, + "app.bsky.embed.external.viewExternal": { + "type": "object", + "required": [ + "uri", + "title", + "description" + ], + "properties": { + "uri": { + "type": "string", + "format": "uri" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "thumb": { + "type": "string" + } + } + }, + "app.bsky.embed.images": { + "type": "object", + "required": [ + "images" + ], + "properties": { + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.embed.images.image" + }, + "maxItems": 4 + } + } + }, + "app.bsky.embed.images.image": { + "type": "object", + "required": [ + "image", + "alt" + ], + "properties": { + "image": { + "type": "string", + "format": "binary", + "maxLength": 1000000 + }, + "alt": { + "type": "string", + "description": "Alt text description of the image, for accessibility." + }, + "aspectRatio": { + "$ref": "#/components/schemas/app.bsky.embed.images.aspectRatio" + } + } + }, + "app.bsky.embed.images.aspectRatio": { + "type": "object", + "description": "width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.", + "required": [ + "width", + "height" + ], + "properties": { + "width": { + "type": "integer", + "minimum": 1 + }, + "height": { + "type": "integer", + "minimum": 1 + } + } + }, + "app.bsky.embed.images.view": { + "type": "object", + "required": [ + "images" + ], + "properties": { + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.embed.images.viewImage" + }, + "maxItems": 4 + } + } + }, + "app.bsky.embed.images.viewImage": { + "type": "object", + "required": [ + "thumb", + "fullsize", + "alt" + ], + "properties": { + "thumb": { + "type": "string", + "description": "Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View." + }, + "fullsize": { + "type": "string", + "description": "Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View." + }, + "alt": { + "type": "string", + "description": "Alt text description of the image, for accessibility." + }, + "aspectRatio": { + "$ref": "#/components/schemas/app.bsky.embed.images.aspectRatio" + } + } + }, + "app.bsky.embed.record": { + "type": "object", + "required": [ + "record" + ], + "properties": { + "record": { + "$ref": "#/components/schemas/com.atproto.repo.strongRef" + } + } + }, + "app.bsky.embed.record.view": { + "type": "object", + "required": [ + "record" + ], + "properties": { + "record": { + "oneOf": [ + { + "$ref": "#/components/schemas/app.bsky.embed.record.viewRecord" + }, + { + "$ref": "#/components/schemas/app.bsky.embed.record.viewNotFound" + }, + { + "$ref": "#/components/schemas/app.bsky.embed.record.viewBlocked" + }, + { + "$ref": "#/components/schemas/app.bsky.feed.defs.generatorView" + }, + { + "$ref": "#/components/schemas/app.bsky.graph.defs.listView" + }, + { + "$ref": "#/components/schemas/app.bsky.labeler.defs.labelerView" + } + ] + } + } + }, + "app.bsky.embed.record.viewRecord": { + "type": "object", + "required": [ + "uri", + "cid", + "author", + "value", + "indexedAt" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "cid": { + "type": "string", + "format": "cid" + }, + "author": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileViewBasic" + }, + "value": {}, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.label.defs.label" + } + }, + "embeds": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/app.bsky.embed.images.view" + }, + { + "$ref": "#/components/schemas/app.bsky.embed.external.view" + }, + { + "$ref": "#/components/schemas/app.bsky.embed.record.view" + }, + { + "$ref": "#/components/schemas/app.bsky.embed.recordWithMedia.view" + } + ] + } + }, + "indexedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "app.bsky.embed.record.viewNotFound": { + "type": "object", + "required": [ + "uri", + "notFound" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "notFound": { + "type": "boolean", + "default": true + } + } + }, + "app.bsky.embed.record.viewBlocked": { + "type": "object", + "required": [ + "uri", + "blocked", + "author" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "blocked": { + "type": "boolean", + "default": true + }, + "author": { + "$ref": "#/components/schemas/app.bsky.feed.defs.blockedAuthor" + } + } + }, + "app.bsky.embed.recordWithMedia": { + "type": "object", + "required": [ + "record", + "media" + ], + "properties": { + "record": { + "$ref": "#/components/schemas/app.bsky.embed.record" + }, + "media": { + "oneOf": [ + { + "$ref": "#/components/schemas/app.bsky.embed.images" + }, + { + "$ref": "#/components/schemas/app.bsky.embed.external" + } + ] + } + } + }, + "app.bsky.embed.recordWithMedia.view": { + "type": "object", + "required": [ + "record", + "media" + ], + "properties": { + "record": { + "$ref": "#/components/schemas/app.bsky.embed.record.view" + }, + "media": { + "oneOf": [ + { + "$ref": "#/components/schemas/app.bsky.embed.images.view" + }, + { + "$ref": "#/components/schemas/app.bsky.embed.external.view" + } + ] + } + } + }, + "app.bsky.feed.defs.postView": { + "type": "object", + "required": [ + "uri", + "cid", + "author", + "record", + "indexedAt" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "cid": { + "type": "string", + "format": "cid" + }, + "author": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileViewBasic" + }, + "record": {}, + "embed": { + "oneOf": [ + { + "$ref": "#/components/schemas/app.bsky.embed.images.view" + }, + { + "$ref": "#/components/schemas/app.bsky.embed.external.view" + }, + { + "$ref": "#/components/schemas/app.bsky.embed.record.view" + }, + { + "$ref": "#/components/schemas/app.bsky.embed.recordWithMedia.view" + } + ] + }, + "replyCount": { + "type": "integer" + }, + "repostCount": { + "type": "integer" + }, + "likeCount": { + "type": "integer" + }, + "indexedAt": { + "type": "string", + "format": "date-time" + }, + "viewer": { + "$ref": "#/components/schemas/app.bsky.feed.defs.viewerState" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.label.defs.label" + } + }, + "threadgate": { + "$ref": "#/components/schemas/app.bsky.feed.defs.threadgateView" + } + } + }, + "app.bsky.feed.defs.viewerState": { + "type": "object", + "description": "Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.", + "properties": { + "repost": { + "type": "string", + "format": "at-uri" + }, + "like": { + "type": "string", + "format": "at-uri" + }, + "replyDisabled": { + "type": "boolean" + } + } + }, + "app.bsky.feed.defs.feedViewPost": { + "type": "object", + "required": [ + "post" + ], + "properties": { + "post": { + "$ref": "#/components/schemas/app.bsky.feed.defs.postView" + }, + "reply": { + "$ref": "#/components/schemas/app.bsky.feed.defs.replyRef" + }, + "reason": { + "oneOf": [ + { + "$ref": "#/components/schemas/app.bsky.feed.defs.reasonRepost" + } + ] + } + } + }, + "app.bsky.feed.defs.replyRef": { + "type": "object", + "required": [ + "root", + "parent" + ], + "properties": { + "root": { + "oneOf": [ + { + "$ref": "#/components/schemas/app.bsky.feed.defs.postView" + }, + { + "$ref": "#/components/schemas/app.bsky.feed.defs.notFoundPost" + }, + { + "$ref": "#/components/schemas/app.bsky.feed.defs.blockedPost" + } + ] + }, + "parent": { + "oneOf": [ + { + "$ref": "#/components/schemas/app.bsky.feed.defs.postView" + }, + { + "$ref": "#/components/schemas/app.bsky.feed.defs.notFoundPost" + }, + { + "$ref": "#/components/schemas/app.bsky.feed.defs.blockedPost" + } + ] + } + } + }, + "app.bsky.feed.defs.reasonRepost": { + "type": "object", + "required": [ + "by", + "indexedAt" + ], + "properties": { + "by": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileViewBasic" + }, + "indexedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "app.bsky.feed.defs.threadViewPost": { + "type": "object", + "required": [ + "post" + ], + "properties": { + "post": { + "$ref": "#/components/schemas/app.bsky.feed.defs.postView" + }, + "parent": { + "oneOf": [ + { + "$ref": "#/components/schemas/app.bsky.feed.defs.threadViewPost" + }, + { + "$ref": "#/components/schemas/app.bsky.feed.defs.notFoundPost" + }, + { + "$ref": "#/components/schemas/app.bsky.feed.defs.blockedPost" + } + ] + }, + "replies": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/app.bsky.feed.defs.threadViewPost" + }, + { + "$ref": "#/components/schemas/app.bsky.feed.defs.notFoundPost" + }, + { + "$ref": "#/components/schemas/app.bsky.feed.defs.blockedPost" + } + ] + } + } + } + }, + "app.bsky.feed.defs.notFoundPost": { + "type": "object", + "required": [ + "uri", + "notFound" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "notFound": { + "type": "boolean", + "default": true + } + } + }, + "app.bsky.feed.defs.blockedPost": { + "type": "object", + "required": [ + "uri", + "blocked", + "author" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "blocked": { + "type": "boolean", + "default": true + }, + "author": { + "$ref": "#/components/schemas/app.bsky.feed.defs.blockedAuthor" + } + } + }, + "app.bsky.feed.defs.blockedAuthor": { + "type": "object", + "required": [ + "did" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + }, + "viewer": { + "$ref": "#/components/schemas/app.bsky.actor.defs.viewerState" + } + } + }, + "app.bsky.feed.defs.generatorView": { + "type": "object", + "required": [ + "uri", + "cid", + "did", + "creator", + "displayName", + "indexedAt" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "cid": { + "type": "string", + "format": "cid" + }, + "did": { + "type": "string", + "format": "did" + }, + "creator": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileView" + }, + "displayName": { + "type": "string" + }, + "description": { + "type": "string", + "maxLength": 3000 + }, + "descriptionFacets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.richtext.facet" + } + }, + "avatar": { + "type": "string" + }, + "likeCount": { + "type": "integer", + "minimum": 0 + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.label.defs.label" + } + }, + "viewer": { + "$ref": "#/components/schemas/app.bsky.feed.defs.generatorViewerState" + }, + "indexedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "app.bsky.feed.defs.generatorViewerState": { + "type": "object", + "properties": { + "like": { + "type": "string", + "format": "at-uri" + } + } + }, + "app.bsky.feed.defs.skeletonFeedPost": { + "type": "object", + "required": [ + "post" + ], + "properties": { + "post": { + "type": "string", + "format": "at-uri" + }, + "reason": { + "oneOf": [ + { + "$ref": "#/components/schemas/app.bsky.feed.defs.skeletonReasonRepost" + } + ] + } + } + }, + "app.bsky.feed.defs.skeletonReasonRepost": { + "type": "object", + "required": [ + "repost" + ], + "properties": { + "repost": { + "type": "string", + "format": "at-uri" + } + } + }, + "app.bsky.feed.defs.threadgateView": { + "type": "object", + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "cid": { + "type": "string", + "format": "cid" + }, + "record": {}, + "lists": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.graph.defs.listViewBasic" + } + } + } + }, + "app.bsky.feed.describeFeedGenerator.feed": { + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + } + } + }, + "app.bsky.feed.describeFeedGenerator.links": { + "type": "object", + "properties": { + "privacyPolicy": { + "type": "string" + }, + "termsOfService": { + "type": "string" + } + } + }, + "app.bsky.feed.generator": { + "type": "object", + "required": [ + "did", + "displayName", + "createdAt" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + }, + "displayName": { + "type": "string", + "maxLength": 240 + }, + "description": { + "type": "string", + "maxLength": 3000 + }, + "descriptionFacets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.richtext.facet" + } + }, + "avatar": { + "type": "string", + "format": "binary", + "maxLength": 1000000 + }, + "labels": { + "oneOf": [ + { + "$ref": "#/components/schemas/com.atproto.label.defs.selfLabels" + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, + "app.bsky.feed.getLikes.like": { + "type": "object", + "required": [ + "indexedAt", + "createdAt", + "actor" + ], + "properties": { + "indexedAt": { + "type": "string", + "format": "date-time" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "actor": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileView" + } + } + }, + "app.bsky.feed.like": { + "type": "object", + "required": [ + "subject", + "createdAt" + ], + "properties": { + "subject": { + "$ref": "#/components/schemas/com.atproto.repo.strongRef" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, + "app.bsky.feed.post": { + "type": "object", + "required": [ + "text", + "createdAt" + ], + "properties": { + "text": { + "type": "string", + "description": "The primary post content. May be an empty string, if there are embeds.", + "maxLength": 3000 + }, + "entities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.feed.post.entity" + } + }, + "facets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.richtext.facet" + } + }, + "reply": { + "$ref": "#/components/schemas/app.bsky.feed.post.replyRef" + }, + "embed": { + "oneOf": [ + { + "$ref": "#/components/schemas/app.bsky.embed.images" + }, + { + "$ref": "#/components/schemas/app.bsky.embed.external" + }, + { + "$ref": "#/components/schemas/app.bsky.embed.record" + }, + { + "$ref": "#/components/schemas/app.bsky.embed.recordWithMedia" + } + ] + }, + "langs": { + "type": "array", + "items": { + "type": "string", + "format": "language" + }, + "maxItems": 3 + }, + "labels": { + "oneOf": [ + { + "$ref": "#/components/schemas/com.atproto.label.defs.selfLabels" + } + ] + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "maxLength": 640 + }, + "maxItems": 8 + }, + "createdAt": { + "type": "string", + "description": "Client-declared timestamp when this post was originally created.", + "format": "date-time" + } + } + }, + "app.bsky.feed.post.replyRef": { + "type": "object", + "required": [ + "root", + "parent" + ], + "properties": { + "root": { + "$ref": "#/components/schemas/com.atproto.repo.strongRef" + }, + "parent": { + "$ref": "#/components/schemas/com.atproto.repo.strongRef" + } + } + }, + "app.bsky.feed.post.entity": { + "type": "object", + "description": "Deprecated: use facets instead.", + "required": [ + "index", + "type", + "value" + ], + "properties": { + "index": { + "$ref": "#/components/schemas/app.bsky.feed.post.textSlice" + }, + "type": { + "type": "string", + "description": "Expected values are 'mention' and 'link'." + }, + "value": { + "type": "string" + } + } + }, + "app.bsky.feed.post.textSlice": { + "type": "object", + "description": "Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings.", + "required": [ + "start", + "end" + ], + "properties": { + "start": { + "type": "integer", + "minimum": 0 + }, + "end": { + "type": "integer", + "minimum": 0 + } + } + }, + "app.bsky.feed.repost": { + "type": "object", + "required": [ + "subject", + "createdAt" + ], + "properties": { + "subject": { + "$ref": "#/components/schemas/com.atproto.repo.strongRef" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, + "app.bsky.feed.threadgate": { + "type": "object", + "required": [ + "post", + "createdAt" + ], + "properties": { + "post": { + "type": "string", + "description": "Reference (AT-URI) to the post record.", + "format": "at-uri" + }, + "allow": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/app.bsky.feed.threadgate.mentionRule" + }, + { + "$ref": "#/components/schemas/app.bsky.feed.threadgate.followingRule" + }, + { + "$ref": "#/components/schemas/app.bsky.feed.threadgate.listRule" + } + ] + }, + "maxItems": 5 + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, + "app.bsky.feed.threadgate.mentionRule": { + "type": "object", + "description": "Allow replies from actors mentioned in your post.", + "properties": {} + }, + "app.bsky.feed.threadgate.followingRule": { + "type": "object", + "description": "Allow replies from actors you follow.", + "properties": {} + }, + "app.bsky.feed.threadgate.listRule": { + "type": "object", + "description": "Allow replies from actors on a list.", + "required": [ + "list" + ], + "properties": { + "list": { + "type": "string", + "format": "at-uri" + } + } + }, + "app.bsky.graph.block": { + "type": "object", + "required": [ + "subject", + "createdAt" + ], + "properties": { + "subject": { + "type": "string", + "description": "DID of the account to be blocked.", + "format": "did" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, + "app.bsky.graph.defs.listViewBasic": { + "type": "object", + "required": [ + "uri", + "cid", + "name", + "purpose" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "cid": { + "type": "string", + "format": "cid" + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 64 + }, + "purpose": { + "$ref": "#/components/schemas/app.bsky.graph.defs.listPurpose" + }, + "avatar": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.label.defs.label" + } + }, + "viewer": { + "$ref": "#/components/schemas/app.bsky.graph.defs.listViewerState" + }, + "indexedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "app.bsky.graph.defs.listView": { + "type": "object", + "required": [ + "uri", + "cid", + "creator", + "name", + "purpose", + "indexedAt" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "cid": { + "type": "string", + "format": "cid" + }, + "creator": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileView" + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 64 + }, + "purpose": { + "$ref": "#/components/schemas/app.bsky.graph.defs.listPurpose" + }, + "description": { + "type": "string", + "maxLength": 3000 + }, + "descriptionFacets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.richtext.facet" + } + }, + "avatar": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.label.defs.label" + } + }, + "viewer": { + "$ref": "#/components/schemas/app.bsky.graph.defs.listViewerState" + }, + "indexedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "app.bsky.graph.defs.listItemView": { + "type": "object", + "required": [ + "uri", + "subject" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "subject": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileView" + } + } + }, + "app.bsky.graph.defs.listPurpose": { + "oneOf": [ + { + "$ref": "#/components/schemas/app.bsky.graph.defs.modlist" + }, + { + "$ref": "#/components/schemas/app.bsky.graph.defs.curatelist" + } + ] + }, + "app.bsky.graph.defs.modlist": { + "type": "string", + "format": "token", + "description": "A list of actors to apply an aggregate moderation action (mute/block) on." + }, + "app.bsky.graph.defs.curatelist": { + "type": "string", + "format": "token", + "description": "A list of actors used for curation purposes such as list feeds or interaction gating." + }, + "app.bsky.graph.defs.listViewerState": { + "type": "object", + "properties": { + "muted": { + "type": "boolean" + }, + "blocked": { + "type": "string", + "format": "at-uri" + } + } + }, + "app.bsky.graph.defs.notFoundActor": { + "type": "object", + "description": "indicates that a handle or DID could not be resolved", + "required": [ + "actor", + "notFound" + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier" + }, + "notFound": { + "type": "boolean", + "default": true + } + } + }, + "app.bsky.graph.defs.relationship": { + "type": "object", + "description": "lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)", + "required": [ + "did" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + }, + "following": { + "type": "string", + "description": "if the actor follows this DID, this is the AT-URI of the follow record", + "format": "at-uri" + }, + "followedBy": { + "type": "string", + "description": "if the actor is followed by this DID, contains the AT-URI of the follow record", + "format": "at-uri" + } + } + }, + "app.bsky.graph.follow": { + "type": "object", + "required": [ + "subject", + "createdAt" + ], + "properties": { + "subject": { + "type": "string", + "format": "did" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, + "app.bsky.graph.list": { + "type": "object", + "required": [ + "name", + "purpose", + "createdAt" + ], + "properties": { + "purpose": { + "$ref": "#/components/schemas/app.bsky.graph.defs.listPurpose" + }, + "name": { + "type": "string", + "description": "Display name for list; can not be empty.", + "minLength": 1, + "maxLength": 64 + }, + "description": { + "type": "string", + "maxLength": 3000 + }, + "descriptionFacets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/app.bsky.richtext.facet" + } + }, + "avatar": { + "type": "string", + "format": "binary", + "maxLength": 1000000 + }, + "labels": { + "oneOf": [ + { + "$ref": "#/components/schemas/com.atproto.label.defs.selfLabels" + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, + "app.bsky.graph.listblock": { + "type": "object", + "required": [ + "subject", + "createdAt" + ], + "properties": { + "subject": { + "type": "string", + "description": "Reference (AT-URI) to the mod list record.", + "format": "at-uri" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, + "app.bsky.graph.listitem": { + "type": "object", + "required": [ + "subject", + "list", + "createdAt" + ], + "properties": { + "subject": { + "type": "string", + "description": "The account which is included on the list.", + "format": "did" + }, + "list": { + "type": "string", + "description": "Reference (AT-URI) to the list record (app.bsky.graph.list).", + "format": "at-uri" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, + "app.bsky.labeler.defs.labelerView": { + "type": "object", + "required": [ + "uri", + "cid", + "creator", + "indexedAt" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "cid": { + "type": "string", + "format": "cid" + }, + "creator": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileView" + }, + "likeCount": { + "type": "integer", + "minimum": 0 + }, + "viewer": { + "$ref": "#/components/schemas/app.bsky.labeler.defs.labelerViewerState" + }, + "indexedAt": { + "type": "string", + "format": "date-time" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.label.defs.label" + } + } + } + }, + "app.bsky.labeler.defs.labelerViewDetailed": { + "type": "object", + "required": [ + "uri", + "cid", + "creator", + "policies", + "indexedAt" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "cid": { + "type": "string", + "format": "cid" + }, + "creator": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileView" + }, + "policies": { + "$ref": "#/components/schemas/app.bsky.labeler.defs.labelerPolicies" + }, + "likeCount": { + "type": "integer", + "minimum": 0 + }, + "viewer": { + "$ref": "#/components/schemas/app.bsky.labeler.defs.labelerViewerState" + }, + "indexedAt": { + "type": "string", + "format": "date-time" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.label.defs.label" + } + } + } + }, + "app.bsky.labeler.defs.labelerViewerState": { + "type": "object", + "properties": { + "like": { + "type": "string", + "format": "at-uri" + } + } + }, + "app.bsky.labeler.defs.labelerPolicies": { + "type": "object", + "required": [ + "labelValues" + ], + "properties": { + "labelValues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.label.defs.labelValue" + } + }, + "labelValueDefinitions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.label.defs.labelValueDefinition" + } + } + } + }, + "app.bsky.labeler.service": { + "type": "object", + "required": [ + "policies", + "createdAt" + ], + "properties": { + "policies": { + "$ref": "#/components/schemas/app.bsky.labeler.defs.labelerPolicies" + }, + "labels": { + "oneOf": [ + { + "$ref": "#/components/schemas/com.atproto.label.defs.selfLabels" + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, + "app.bsky.notification.listNotifications.notification": { + "type": "object", + "required": [ + "uri", + "cid", + "author", + "reason", + "record", + "isRead", + "indexedAt" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "cid": { + "type": "string", + "format": "cid" + }, + "author": { + "$ref": "#/components/schemas/app.bsky.actor.defs.profileView" + }, + "reason": { + "type": "string", + "description": "Expected values are 'like', 'repost', 'follow', 'mention', 'reply', and 'quote'.", + "enum": [ + "like", + "repost", + "follow", + "mention", + "reply", + "quote" + ] + }, + "reasonSubject": { + "type": "string", + "format": "at-uri" + }, + "record": {}, + "isRead": { + "type": "boolean" + }, + "indexedAt": { + "type": "string", + "format": "date-time" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.label.defs.label" + } + } + } + }, + "app.bsky.richtext.facet": { + "type": "object", + "description": "Annotation of a sub-string within rich text.", + "required": [ + "index", + "features" + ], + "properties": { + "index": { + "$ref": "#/components/schemas/app.bsky.richtext.facet.byteSlice" + }, + "features": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/app.bsky.richtext.facet.mention" + }, + { + "$ref": "#/components/schemas/app.bsky.richtext.facet.link" + }, + { + "$ref": "#/components/schemas/app.bsky.richtext.facet.tag" + } + ] + } + } + } + }, + "app.bsky.richtext.facet.mention": { + "type": "object", + "description": "Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID.", + "required": [ + "did" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + } + } + }, + "app.bsky.richtext.facet.link": { + "type": "object", + "description": "Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string", + "format": "uri" + } + } + }, + "app.bsky.richtext.facet.tag": { + "type": "object", + "description": "Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags').", + "required": [ + "tag" + ], + "properties": { + "tag": { + "type": "string", + "maxLength": 640 + } + } + }, + "app.bsky.richtext.facet.byteSlice": { + "type": "object", + "description": "Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets.", + "required": [ + "byteStart", + "byteEnd" + ], + "properties": { + "byteStart": { + "type": "integer", + "minimum": 0 + }, + "byteEnd": { + "type": "integer", + "minimum": 0 + } + } + }, + "app.bsky.unspecced.defs.skeletonSearchPost": { + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + } + } + }, + "app.bsky.unspecced.defs.skeletonSearchActor": { + "type": "object", + "required": [ + "did" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + } + } + }, + "app.bsky.unspecced.getTaggedSuggestions.suggestion": { + "type": "object", + "required": [ + "tag", + "subjectType", + "subject" + ], + "properties": { + "tag": { + "type": "string" + }, + "subjectType": { + "type": "string", + "enum": [ + "actor", + "feed" + ] + }, + "subject": { + "type": "string", + "format": "uri" + } + } + }, + "com.atproto.admin.defs.statusAttr": { + "type": "object", + "required": [ + "applied" + ], + "properties": { + "applied": { + "type": "boolean" + }, + "ref": { + "type": "string" + } + } + }, + "com.atproto.admin.defs.accountView": { + "type": "object", + "required": [ + "did", + "handle", + "indexedAt" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + }, + "handle": { + "type": "string", + "format": "handle" + }, + "email": { + "type": "string" + }, + "relatedRecords": { + "type": "array", + "items": {} + }, + "indexedAt": { + "type": "string", + "format": "date-time" + }, + "invitedBy": { + "$ref": "#/components/schemas/com.atproto.server.defs.inviteCode" + }, + "invites": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.server.defs.inviteCode" + } + }, + "invitesDisabled": { + "type": "boolean" + }, + "emailConfirmedAt": { + "type": "string", + "format": "date-time" + }, + "inviteNote": { + "type": "string" + } + } + }, + "com.atproto.admin.defs.repoRef": { + "type": "object", + "required": [ + "did" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + } + } + }, + "com.atproto.admin.defs.repoBlobRef": { + "type": "object", + "required": [ + "did", + "cid" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + }, + "cid": { + "type": "string", + "format": "cid" + }, + "recordUri": { + "type": "string", + "format": "at-uri" + } + } + }, + "com.atproto.label.defs.label": { + "type": "object", + "description": "Metadata tag on an atproto resource (eg, repo or record).", + "required": [ + "src", + "uri", + "val", + "cts" + ], + "properties": { + "ver": { + "type": "integer" + }, + "src": { + "type": "string", + "description": "DID of the actor who created this label.", + "format": "did" + }, + "uri": { + "type": "string", + "description": "AT URI of the record, repository (account), or other resource that this label applies to.", + "format": "uri" + }, + "cid": { + "type": "string", + "description": "Optionally, CID specifying the specific version of 'uri' resource this label applies to.", + "format": "cid" + }, + "val": { + "type": "string", + "description": "The short string name of the value or type of this label.", + "maxLength": 128 + }, + "neg": { + "type": "boolean", + "description": "If true, this is a negation label, overwriting a previous label." + }, + "cts": { + "type": "string", + "description": "Timestamp when this label was created.", + "format": "date-time" + }, + "exp": { + "type": "string", + "description": "Timestamp at which this label expires (no longer applies).", + "format": "date-time" + }, + "sig": { + "type": "string", + "format": "byte", + "description": "Signature of dag-cbor encoded label." + } + } + }, + "com.atproto.label.defs.selfLabels": { + "type": "object", + "description": "Metadata tags on an atproto record, published by the author within the record.", + "required": [ + "values" + ], + "properties": { + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.label.defs.selfLabel" + }, + "maxItems": 10 + } + } + }, + "com.atproto.label.defs.selfLabel": { + "type": "object", + "description": "Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.", + "required": [ + "val" + ], + "properties": { + "val": { + "type": "string", + "description": "The short string name of the value or type of this label.", + "maxLength": 128 + } + } + }, + "com.atproto.label.defs.labelValueDefinition": { + "type": "object", + "description": "Declares a label value and its expected interpertations and behaviors.", + "required": [ + "identifier", + "severity", + "blurs", + "locales" + ], + "properties": { + "identifier": { + "type": "string", + "description": "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).", + "maxLength": 100 + }, + "severity": { + "type": "string", + "description": "How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.", + "enum": [ + "inform", + "alert", + "none" + ] + }, + "blurs": { + "type": "string", + "description": "What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing.", + "enum": [ + "content", + "media", + "none" + ] + }, + "defaultSetting": { + "type": "string", + "description": "The default setting for this label.", + "default": "warn", + "enum": [ + "ignore", + "warn", + "hide" + ] + }, + "adultOnly": { + "type": "boolean", + "description": "Does the user need to have adult content enabled in order to configure this label?" + }, + "locales": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.label.defs.labelValueDefinitionStrings" + } + } + } + }, + "com.atproto.label.defs.labelValueDefinitionStrings": { + "type": "object", + "description": "Strings which describe the label in the UI, localized into a specific language.", + "required": [ + "lang", + "name", + "description" + ], + "properties": { + "lang": { + "type": "string", + "description": "The code of the language these strings are written in.", + "format": "language" + }, + "name": { + "type": "string", + "description": "A short human-readable name for the label.", + "maxLength": 640 + }, + "description": { + "type": "string", + "description": "A longer description of what the label means and why it might be applied.", + "maxLength": 100000 + } + } + }, + "com.atproto.label.defs.labelValue": { + "type": "string", + "enum": [ + "!hide", + "!no-promote", + "!warn", + "!no-unauthenticated", + "dmca-violation", + "doxxing", + "porn", + "sexual", + "nudity", + "nsfl", + "gore" + ] + }, + "com.atproto.label.subscribeLabels.labels": { + "type": "object", + "required": [ + "seq", + "labels" + ], + "properties": { + "seq": { + "type": "integer" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.label.defs.label" + } + } + } + }, + "com.atproto.label.subscribeLabels.info": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "OutdatedCursor" + ] + }, + "message": { + "type": "string" + } + } + }, + "com.atproto.moderation.defs.reasonType": { + "oneOf": [ + { + "$ref": "#/components/schemas/com.atproto.moderation.defs.reasonSpam" + }, + { + "$ref": "#/components/schemas/com.atproto.moderation.defs.reasonViolation" + }, + { + "$ref": "#/components/schemas/com.atproto.moderation.defs.reasonMisleading" + }, + { + "$ref": "#/components/schemas/com.atproto.moderation.defs.reasonSexual" + }, + { + "$ref": "#/components/schemas/com.atproto.moderation.defs.reasonRude" + }, + { + "$ref": "#/components/schemas/com.atproto.moderation.defs.reasonOther" + }, + { + "$ref": "#/components/schemas/com.atproto.moderation.defs.reasonAppeal" + } + ] + }, + "com.atproto.moderation.defs.reasonSpam": { + "type": "string", + "format": "token", + "description": "Spam: frequent unwanted promotion, replies, mentions" + }, + "com.atproto.moderation.defs.reasonViolation": { + "type": "string", + "format": "token", + "description": "Direct violation of server rules, laws, terms of service" + }, + "com.atproto.moderation.defs.reasonMisleading": { + "type": "string", + "format": "token", + "description": "Misleading identity, affiliation, or content" + }, + "com.atproto.moderation.defs.reasonSexual": { + "type": "string", + "format": "token", + "description": "Unwanted or mislabeled sexual content" + }, + "com.atproto.moderation.defs.reasonRude": { + "type": "string", + "format": "token", + "description": "Rude, harassing, explicit, or otherwise unwelcoming behavior" + }, + "com.atproto.moderation.defs.reasonOther": { + "type": "string", + "format": "token", + "description": "Other: reports not falling under another report category" + }, + "com.atproto.moderation.defs.reasonAppeal": { + "type": "string", + "format": "token", + "description": "Appeal: appeal a previously taken moderation action" + }, + "com.atproto.repo.applyWrites.create": { + "type": "object", + "description": "Operation which creates a new record.", + "required": [ + "collection", + "value" + ], + "properties": { + "collection": { + "type": "string", + "format": "nsid" + }, + "rkey": { + "type": "string", + "maxLength": 15 + }, + "value": {} + } + }, + "com.atproto.repo.applyWrites.update": { + "type": "object", + "description": "Operation which updates an existing record.", + "required": [ + "collection", + "rkey", + "value" + ], + "properties": { + "collection": { + "type": "string", + "format": "nsid" + }, + "rkey": { + "type": "string" + }, + "value": {} + } + }, + "com.atproto.repo.applyWrites.delete": { + "type": "object", + "description": "Operation which deletes an existing record.", + "required": [ + "collection", + "rkey" + ], + "properties": { + "collection": { + "type": "string", + "format": "nsid" + }, + "rkey": { + "type": "string" + } + } + }, + "com.atproto.repo.listMissingBlobs.recordBlob": { + "type": "object", + "required": [ + "cid", + "recordUri" + ], + "properties": { + "cid": { + "type": "string", + "format": "cid" + }, + "recordUri": { + "type": "string", + "format": "at-uri" + } + } + }, + "com.atproto.repo.listRecords.record": { + "type": "object", + "required": [ + "uri", + "cid", + "value" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "cid": { + "type": "string", + "format": "cid" + }, + "value": {} + } + }, + "com.atproto.repo.strongRef": { + "type": "object", + "required": [ + "uri", + "cid" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "cid": { + "type": "string", + "format": "cid" + } + } + }, + "com.atproto.server.createAppPassword.appPassword": { + "type": "object", + "required": [ + "name", + "password", + "createdAt" + ], + "properties": { + "name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, + "com.atproto.server.createInviteCodes.accountCodes": { + "type": "object", + "required": [ + "account", + "codes" + ], + "properties": { + "account": { + "type": "string" + }, + "codes": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "com.atproto.server.defs.inviteCode": { + "type": "object", + "required": [ + "code", + "available", + "disabled", + "forAccount", + "createdBy", + "createdAt", + "uses" + ], + "properties": { + "code": { + "type": "string" + }, + "available": { + "type": "integer" + }, + "disabled": { + "type": "boolean" + }, + "forAccount": { + "type": "string" + }, + "createdBy": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "uses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.server.defs.inviteCodeUse" + } + } + } + }, + "com.atproto.server.defs.inviteCodeUse": { + "type": "object", + "required": [ + "usedBy", + "usedAt" + ], + "properties": { + "usedBy": { + "type": "string", + "format": "did" + }, + "usedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "com.atproto.server.describeServer.links": { + "type": "object", + "properties": { + "privacyPolicy": { + "type": "string" + }, + "termsOfService": { + "type": "string" + } + } + }, + "com.atproto.server.listAppPasswords.appPassword": { + "type": "object", + "required": [ + "name", + "createdAt" + ], + "properties": { + "name": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, + "com.atproto.sync.listRepos.repo": { + "type": "object", + "required": [ + "did", + "head", + "rev" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + }, + "head": { + "type": "string", + "description": "Current repo commit CID", + "format": "cid" + }, + "rev": { + "type": "string" + } + } + }, + "com.atproto.sync.subscribeRepos.commit": { + "type": "object", + "description": "Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature.", + "required": [ + "seq", + "rebase", + "tooBig", + "repo", + "commit", + "rev", + "since", + "blocks", + "ops", + "blobs", + "time" + ], + "properties": { + "seq": { + "type": "integer" + }, + "rebase": { + "type": "boolean", + "description": "DEPRECATED -- unused" + }, + "tooBig": { + "type": "boolean", + "description": "Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data." + }, + "repo": { + "type": "string", + "description": "The repo this event comes from.", + "format": "did" + }, + "commit": { + "type": "string", + "format": "cid-link" + }, + "prev": { + "type": "string", + "format": "cid-link" + }, + "rev": { + "type": "string", + "description": "The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event." + }, + "since": { + "type": "string", + "description": "The rev of the last emitted commit from this repo (if any)." + }, + "blocks": { + "type": "string", + "format": "byte", + "description": "CAR file containing relevant blocks, as a diff since the previous repo state.", + "maxLength": 1000000 + }, + "ops": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.sync.subscribeRepos.repoOp" + }, + "maxItems": 200 + }, + "blobs": { + "type": "array", + "items": { + "type": "string", + "format": "cid-link" + } + }, + "time": { + "type": "string", + "description": "Timestamp of when this message was originally broadcast.", + "format": "date-time" + } + } + }, + "com.atproto.sync.subscribeRepos.identity": { + "type": "object", + "description": "Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache.", + "required": [ + "seq", + "did", + "time" + ], + "properties": { + "seq": { + "type": "integer" + }, + "did": { + "type": "string", + "format": "did" + }, + "time": { + "type": "string", + "format": "date-time" + } + } + }, + "com.atproto.sync.subscribeRepos.handle": { + "type": "object", + "description": "Represents an update of the account's handle, or transition to/from invalid state. NOTE: Will be deprecated in favor of #identity.", + "required": [ + "seq", + "did", + "handle", + "time" + ], + "properties": { + "seq": { + "type": "integer" + }, + "did": { + "type": "string", + "format": "did" + }, + "handle": { + "type": "string", + "format": "handle" + }, + "time": { + "type": "string", + "format": "date-time" + } + } + }, + "com.atproto.sync.subscribeRepos.migrate": { + "type": "object", + "description": "Represents an account moving from one PDS instance to another. NOTE: not implemented; account migration uses #identity instead", + "required": [ + "seq", + "did", + "migrateTo", + "time" + ], + "properties": { + "seq": { + "type": "integer" + }, + "did": { + "type": "string", + "format": "did" + }, + "migrateTo": { + "type": "string" + }, + "time": { + "type": "string", + "format": "date-time" + } + } + }, + "com.atproto.sync.subscribeRepos.tombstone": { + "type": "object", + "description": "Indicates that an account has been deleted. NOTE: may be deprecated in favor of #identity or a future #account event", + "required": [ + "seq", + "did", + "time" + ], + "properties": { + "seq": { + "type": "integer" + }, + "did": { + "type": "string", + "format": "did" + }, + "time": { + "type": "string", + "format": "date-time" + } + } + }, + "com.atproto.sync.subscribeRepos.info": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "OutdatedCursor" + ] + }, + "message": { + "type": "string" + } + } + }, + "com.atproto.sync.subscribeRepos.repoOp": { + "type": "object", + "description": "A repo operation, ie a mutation of a single record.", + "required": [ + "action", + "path", + "cid" + ], + "properties": { + "action": { + "type": "string", + "enum": [ + "create", + "update", + "delete" + ] + }, + "path": { + "type": "string" + }, + "cid": { + "type": "string", + "format": "cid-link" + } + } + }, + "tools.ozone.communication.defs.templateView": { + "type": "object", + "required": [ + "id", + "name", + "contentMarkdown", + "disabled", + "lastUpdatedBy", + "createdAt", + "updatedAt" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string", + "description": "Name of the template." + }, + "subject": { + "type": "string", + "description": "Content of the template, can contain markdown and variable placeholders." + }, + "contentMarkdown": { + "type": "string", + "description": "Subject of the message, used in emails." + }, + "disabled": { + "type": "boolean" + }, + "lastUpdatedBy": { + "type": "string", + "description": "DID of the user who last updated the template.", + "format": "did" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "tools.ozone.moderation.defs.modEventView": { + "type": "object", + "required": [ + "id", + "event", + "subject", + "subjectBlobCids", + "createdBy", + "createdAt" + ], + "properties": { + "id": { + "type": "integer" + }, + "event": { + "oneOf": [ + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventTakedown" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventReverseTakedown" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventComment" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventReport" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventLabel" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventAcknowledge" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventEscalate" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventMute" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventEmail" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventResolveAppeal" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventDivert" + } + ] + }, + "subject": { + "oneOf": [ + { + "$ref": "#/components/schemas/com.atproto.admin.defs.repoRef" + }, + { + "$ref": "#/components/schemas/com.atproto.repo.strongRef" + } + ] + }, + "subjectBlobCids": { + "type": "array", + "items": { + "type": "string" + } + }, + "createdBy": { + "type": "string", + "format": "did" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "creatorHandle": { + "type": "string" + }, + "subjectHandle": { + "type": "string" + } + } + }, + "tools.ozone.moderation.defs.modEventViewDetail": { + "type": "object", + "required": [ + "id", + "event", + "subject", + "subjectBlobs", + "createdBy", + "createdAt" + ], + "properties": { + "id": { + "type": "integer" + }, + "event": { + "oneOf": [ + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventTakedown" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventReverseTakedown" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventComment" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventReport" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventLabel" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventAcknowledge" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventEscalate" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventMute" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventEmail" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventResolveAppeal" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.modEventDivert" + } + ] + }, + "subject": { + "oneOf": [ + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.repoView" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.repoViewNotFound" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.recordView" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.recordViewNotFound" + } + ] + }, + "subjectBlobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.blobView" + } + }, + "createdBy": { + "type": "string", + "format": "did" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, + "tools.ozone.moderation.defs.subjectStatusView": { + "type": "object", + "required": [ + "id", + "subject", + "createdAt", + "updatedAt", + "reviewState" + ], + "properties": { + "id": { + "type": "integer" + }, + "subject": { + "oneOf": [ + { + "$ref": "#/components/schemas/com.atproto.admin.defs.repoRef" + }, + { + "$ref": "#/components/schemas/com.atproto.repo.strongRef" + } + ] + }, + "subjectBlobCids": { + "type": "array", + "items": { + "type": "string", + "format": "cid" + } + }, + "subjectRepoHandle": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "description": "Timestamp referencing when the last update was made to the moderation status of the subject", + "format": "date-time" + }, + "createdAt": { + "type": "string", + "description": "Timestamp referencing the first moderation status impacting event was emitted on the subject", + "format": "date-time" + }, + "reviewState": { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.subjectReviewState" + }, + "comment": { + "type": "string", + "description": "Sticky comment on the subject." + }, + "muteUntil": { + "type": "string", + "format": "date-time" + }, + "lastReviewedBy": { + "type": "string", + "format": "did" + }, + "lastReviewedAt": { + "type": "string", + "format": "date-time" + }, + "lastReportedAt": { + "type": "string", + "format": "date-time" + }, + "lastAppealedAt": { + "type": "string", + "description": "Timestamp referencing when the author of the subject appealed a moderation action", + "format": "date-time" + }, + "takendown": { + "type": "boolean" + }, + "appealed": { + "type": "boolean", + "description": "True indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators." + }, + "suspendUntil": { + "type": "string", + "format": "date-time" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "tools.ozone.moderation.defs.subjectReviewState": { + "type": "string", + "enum": [ + "#reviewOpen", + "#reviewEscalated", + "#reviewClosed", + "#reviewNone" + ] + }, + "tools.ozone.moderation.defs.reviewOpen": { + "type": "string", + "format": "token", + "description": "Moderator review status of a subject: Open. Indicates that the subject needs to be reviewed by a moderator" + }, + "tools.ozone.moderation.defs.reviewEscalated": { + "type": "string", + "format": "token", + "description": "Moderator review status of a subject: Escalated. Indicates that the subject was escalated for review by a moderator" + }, + "tools.ozone.moderation.defs.reviewClosed": { + "type": "string", + "format": "token", + "description": "Moderator review status of a subject: Closed. Indicates that the subject was already reviewed and resolved by a moderator" + }, + "tools.ozone.moderation.defs.reviewNone": { + "type": "string", + "format": "token", + "description": "Moderator review status of a subject: Unnecessary. Indicates that the subject does not need a review at the moment but there is probably some moderation related metadata available for it" + }, + "tools.ozone.moderation.defs.modEventTakedown": { + "type": "object", + "description": "Take down a subject permanently or temporarily", + "properties": { + "comment": { + "type": "string" + }, + "durationInHours": { + "type": "integer" + } + } + }, + "tools.ozone.moderation.defs.modEventReverseTakedown": { + "type": "object", + "description": "Revert take down action on a subject", + "properties": { + "comment": { + "type": "string", + "description": "Describe reasoning behind the reversal." + } + } + }, + "tools.ozone.moderation.defs.modEventResolveAppeal": { + "type": "object", + "description": "Resolve appeal on a subject", + "properties": { + "comment": { + "type": "string", + "description": "Describe resolution." + } + } + }, + "tools.ozone.moderation.defs.modEventComment": { + "type": "object", + "description": "Add a comment to a subject", + "required": [ + "comment" + ], + "properties": { + "comment": { + "type": "string" + }, + "sticky": { + "type": "boolean", + "description": "Make the comment persistent on the subject" + } + } + }, + "tools.ozone.moderation.defs.modEventReport": { + "type": "object", + "description": "Report a subject", + "required": [ + "reportType" + ], + "properties": { + "comment": { + "type": "string" + }, + "reportType": { + "$ref": "#/components/schemas/com.atproto.moderation.defs.reasonType" + } + } + }, + "tools.ozone.moderation.defs.modEventLabel": { + "type": "object", + "description": "Apply/Negate labels on a subject", + "required": [ + "createLabelVals", + "negateLabelVals" + ], + "properties": { + "comment": { + "type": "string" + }, + "createLabelVals": { + "type": "array", + "items": { + "type": "string" + } + }, + "negateLabelVals": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "tools.ozone.moderation.defs.modEventAcknowledge": { + "type": "object", + "properties": { + "comment": { + "type": "string" + } + } + }, + "tools.ozone.moderation.defs.modEventEscalate": { + "type": "object", + "properties": { + "comment": { + "type": "string" + } + } + }, + "tools.ozone.moderation.defs.modEventMute": { + "type": "object", + "description": "Mute incoming reports on a subject", + "required": [ + "durationInHours" + ], + "properties": { + "comment": { + "type": "string" + }, + "durationInHours": { + "type": "integer" + } + } + }, + "tools.ozone.moderation.defs.modEventUnmute": { + "type": "object", + "description": "Unmute action on a subject", + "properties": { + "comment": { + "type": "string", + "description": "Describe reasoning behind the reversal." + } + } + }, + "tools.ozone.moderation.defs.modEventEmail": { + "type": "object", + "description": "Keep a log of outgoing email to a user", + "required": [ + "subjectLine" + ], + "properties": { + "subjectLine": { + "type": "string", + "description": "The subject line of the email sent to the user." + }, + "content": { + "type": "string", + "description": "The content of the email sent to the user." + }, + "comment": { + "type": "string", + "description": "Additional comment about the outgoing comm." + } + } + }, + "tools.ozone.moderation.defs.modEventDivert": { + "type": "object", + "description": "Divert a record's blobs to a 3rd party service for further scanning/tagging", + "properties": { + "comment": { + "type": "string" + } + } + }, + "tools.ozone.moderation.defs.modEventTag": { + "type": "object", + "description": "Add/Remove a tag on a subject", + "required": [ + "add", + "remove" + ], + "properties": { + "add": { + "type": "array", + "items": { + "type": "string" + } + }, + "remove": { + "type": "array", + "items": { + "type": "string" + } + }, + "comment": { + "type": "string", + "description": "Additional comment about added/removed tags." + } + } + }, + "tools.ozone.moderation.defs.repoView": { + "type": "object", + "required": [ + "did", + "handle", + "relatedRecords", + "indexedAt", + "moderation" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + }, + "handle": { + "type": "string", + "format": "handle" + }, + "email": { + "type": "string" + }, + "relatedRecords": { + "type": "array", + "items": {} + }, + "indexedAt": { + "type": "string", + "format": "date-time" + }, + "moderation": { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.moderation" + }, + "invitedBy": { + "$ref": "#/components/schemas/com.atproto.server.defs.inviteCode" + }, + "invitesDisabled": { + "type": "boolean" + }, + "inviteNote": { + "type": "string" + } + } + }, + "tools.ozone.moderation.defs.repoViewDetail": { + "type": "object", + "required": [ + "did", + "handle", + "relatedRecords", + "indexedAt", + "moderation" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + }, + "handle": { + "type": "string", + "format": "handle" + }, + "email": { + "type": "string" + }, + "relatedRecords": { + "type": "array", + "items": {} + }, + "indexedAt": { + "type": "string", + "format": "date-time" + }, + "moderation": { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.moderationDetail" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.label.defs.label" + } + }, + "invitedBy": { + "$ref": "#/components/schemas/com.atproto.server.defs.inviteCode" + }, + "invites": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.server.defs.inviteCode" + } + }, + "invitesDisabled": { + "type": "boolean" + }, + "inviteNote": { + "type": "string" + }, + "emailConfirmedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "tools.ozone.moderation.defs.repoViewNotFound": { + "type": "object", + "required": [ + "did" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + } + } + }, + "tools.ozone.moderation.defs.recordView": { + "type": "object", + "required": [ + "uri", + "cid", + "value", + "blobCids", + "indexedAt", + "moderation", + "repo" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "cid": { + "type": "string", + "format": "cid" + }, + "value": {}, + "blobCids": { + "type": "array", + "items": { + "type": "string", + "format": "cid" + } + }, + "indexedAt": { + "type": "string", + "format": "date-time" + }, + "moderation": { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.moderation" + }, + "repo": { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.repoView" + } + } + }, + "tools.ozone.moderation.defs.recordViewDetail": { + "type": "object", + "required": [ + "uri", + "cid", + "value", + "blobs", + "indexedAt", + "moderation", + "repo" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "cid": { + "type": "string", + "format": "cid" + }, + "value": {}, + "blobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.blobView" + } + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/com.atproto.label.defs.label" + } + }, + "indexedAt": { + "type": "string", + "format": "date-time" + }, + "moderation": { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.moderationDetail" + }, + "repo": { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.repoView" + } + } + }, + "tools.ozone.moderation.defs.recordViewNotFound": { + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + } + } + }, + "tools.ozone.moderation.defs.moderation": { + "type": "object", + "properties": { + "subjectStatus": { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.subjectStatusView" + } + } + }, + "tools.ozone.moderation.defs.moderationDetail": { + "type": "object", + "properties": { + "subjectStatus": { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.subjectStatusView" + } + } + }, + "tools.ozone.moderation.defs.blobView": { + "type": "object", + "required": [ + "cid", + "mimeType", + "size", + "createdAt" + ], + "properties": { + "cid": { + "type": "string", + "format": "cid" + }, + "mimeType": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "details": { + "oneOf": [ + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.imageDetails" + }, + { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.videoDetails" + } + ] + }, + "moderation": { + "$ref": "#/components/schemas/tools.ozone.moderation.defs.moderation" + } + } + }, + "tools.ozone.moderation.defs.imageDetails": { + "type": "object", + "required": [ + "width", + "height" + ], + "properties": { + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + } + } + }, + "tools.ozone.moderation.defs.videoDetails": { + "type": "object", + "required": [ + "width", + "height", + "length" + ], + "properties": { + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "length": { + "type": "integer" + } + } + } + }, + "securitySchemes": { + "Bearer": { + "type": "http", + "scheme": "bearer" + } + } + }, + "tags": [ + { + "name": "app.bsky.actor" + }, + { + "name": "app.bsky.embed" + }, + { + "name": "app.bsky.feed" + }, + { + "name": "app.bsky.graph" + }, + { + "name": "app.bsky.labeler" + }, + { + "name": "app.bsky.notification" + }, + { + "name": "app.bsky.richtext" + }, + { + "name": "app.bsky.unspecced" + }, + { + "name": "com.atproto.admin" + }, + { + "name": "com.atproto.identity" + }, + { + "name": "com.atproto.label" + }, + { + "name": "com.atproto.moderation" + }, + { + "name": "com.atproto.repo" + }, + { + "name": "com.atproto.server" + }, + { + "name": "com.atproto.sync" + }, + { + "name": "com.atproto.temp" + }, + { + "name": "tools.ozone.communication" + }, + { + "name": "tools.ozone.moderation" + } + ] +} diff --git a/examples/app_bsky_actor_get_preferences.rs b/examples/app_bsky_actor_get_preferences.rs new file mode 100644 index 0000000..7bab9bc --- /dev/null +++ b/examples/app_bsky_actor_get_preferences.rs @@ -0,0 +1,9 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client.app_bsky_actor_get_preferences().await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_actor_get_profile.rs b/examples/app_bsky_actor_get_profile.rs new file mode 100644 index 0000000..5186400 --- /dev/null +++ b/examples/app_bsky_actor_get_profile.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let actor = "your actor"; + let response = client.app_bsky_actor_get_profile(actor).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_actor_get_profiles.rs b/examples/app_bsky_actor_get_profiles.rs new file mode 100644 index 0000000..8bf145f --- /dev/null +++ b/examples/app_bsky_actor_get_profiles.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let actors = &["your actors"]; + let response = client.app_bsky_actor_get_profiles(actors).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_actor_get_suggestions.rs b/examples/app_bsky_actor_get_suggestions.rs new file mode 100644 index 0000000..bcb6cec --- /dev/null +++ b/examples/app_bsky_actor_get_suggestions.rs @@ -0,0 +1,14 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .app_bsky_actor_get_suggestions() + .cursor("your cursor") + .limit(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_actor_put_preferences.rs b/examples/app_bsky_actor_put_preferences.rs new file mode 100644 index 0000000..a7e64c3 --- /dev/null +++ b/examples/app_bsky_actor_put_preferences.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let preferences = AppBskyActorDefsPreferences(vec![serde_json::json!({})]); + let response = client.app_bsky_actor_put_preferences(preferences).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_actor_search_actors.rs b/examples/app_bsky_actor_search_actors.rs new file mode 100644 index 0000000..e67ba74 --- /dev/null +++ b/examples/app_bsky_actor_search_actors.rs @@ -0,0 +1,16 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .app_bsky_actor_search_actors() + .cursor("your cursor") + .limit(1) + .q("your q") + .term("your term") + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_actor_search_actors_typeahead.rs b/examples/app_bsky_actor_search_actors_typeahead.rs new file mode 100644 index 0000000..7ee643c --- /dev/null +++ b/examples/app_bsky_actor_search_actors_typeahead.rs @@ -0,0 +1,15 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .app_bsky_actor_search_actors_typeahead() + .limit(1) + .q("your q") + .term("your term") + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_feed_get_actor_feeds.rs b/examples/app_bsky_feed_get_actor_feeds.rs new file mode 100644 index 0000000..b994621 --- /dev/null +++ b/examples/app_bsky_feed_get_actor_feeds.rs @@ -0,0 +1,15 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let actor = "your actor"; + let response = client + .app_bsky_feed_get_actor_feeds(actor) + .cursor("your cursor") + .limit(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_feed_get_actor_likes.rs b/examples/app_bsky_feed_get_actor_likes.rs new file mode 100644 index 0000000..1427a1d --- /dev/null +++ b/examples/app_bsky_feed_get_actor_likes.rs @@ -0,0 +1,15 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let actor = "your actor"; + let response = client + .app_bsky_feed_get_actor_likes(actor) + .cursor("your cursor") + .limit(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_feed_get_author_feed.rs b/examples/app_bsky_feed_get_author_feed.rs new file mode 100644 index 0000000..6842f84 --- /dev/null +++ b/examples/app_bsky_feed_get_author_feed.rs @@ -0,0 +1,16 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let actor = "your actor"; + let response = client + .app_bsky_feed_get_author_feed(actor) + .cursor("your cursor") + .filter("your filter") + .limit(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_feed_get_feed.rs b/examples/app_bsky_feed_get_feed.rs new file mode 100644 index 0000000..01842fc --- /dev/null +++ b/examples/app_bsky_feed_get_feed.rs @@ -0,0 +1,15 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let feed = "your feed"; + let response = client + .app_bsky_feed_get_feed(feed) + .cursor("your cursor") + .limit(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_feed_get_feed_generator.rs b/examples/app_bsky_feed_get_feed_generator.rs new file mode 100644 index 0000000..96d6c59 --- /dev/null +++ b/examples/app_bsky_feed_get_feed_generator.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let feed = "your feed"; + let response = client.app_bsky_feed_get_feed_generator(feed).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_feed_get_feed_generators.rs b/examples/app_bsky_feed_get_feed_generators.rs new file mode 100644 index 0000000..a4fef2a --- /dev/null +++ b/examples/app_bsky_feed_get_feed_generators.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let feeds = &["your feeds"]; + let response = client.app_bsky_feed_get_feed_generators(feeds).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_feed_get_likes.rs b/examples/app_bsky_feed_get_likes.rs new file mode 100644 index 0000000..7c52bdb --- /dev/null +++ b/examples/app_bsky_feed_get_likes.rs @@ -0,0 +1,16 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let uri = "your uri"; + let response = client + .app_bsky_feed_get_likes(uri) + .cid("your cid") + .cursor("your cursor") + .limit(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_feed_get_list_feed.rs b/examples/app_bsky_feed_get_list_feed.rs new file mode 100644 index 0000000..7c98548 --- /dev/null +++ b/examples/app_bsky_feed_get_list_feed.rs @@ -0,0 +1,15 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let list = "your list"; + let response = client + .app_bsky_feed_get_list_feed(list) + .cursor("your cursor") + .limit(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_feed_get_post_thread.rs b/examples/app_bsky_feed_get_post_thread.rs new file mode 100644 index 0000000..fc2880a --- /dev/null +++ b/examples/app_bsky_feed_get_post_thread.rs @@ -0,0 +1,15 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let uri = "your uri"; + let response = client + .app_bsky_feed_get_post_thread(uri) + .depth(1) + .parent_height(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_feed_get_posts.rs b/examples/app_bsky_feed_get_posts.rs new file mode 100644 index 0000000..280f63c --- /dev/null +++ b/examples/app_bsky_feed_get_posts.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let uris = &["your uris"]; + let response = client.app_bsky_feed_get_posts(uris).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_feed_get_reposted_by.rs b/examples/app_bsky_feed_get_reposted_by.rs new file mode 100644 index 0000000..65712c0 --- /dev/null +++ b/examples/app_bsky_feed_get_reposted_by.rs @@ -0,0 +1,16 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let uri = "your uri"; + let response = client + .app_bsky_feed_get_reposted_by(uri) + .cid("your cid") + .cursor("your cursor") + .limit(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_feed_get_suggested_feeds.rs b/examples/app_bsky_feed_get_suggested_feeds.rs new file mode 100644 index 0000000..a927f07 --- /dev/null +++ b/examples/app_bsky_feed_get_suggested_feeds.rs @@ -0,0 +1,14 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .app_bsky_feed_get_suggested_feeds() + .cursor("your cursor") + .limit(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_feed_get_timeline.rs b/examples/app_bsky_feed_get_timeline.rs new file mode 100644 index 0000000..b31d86e --- /dev/null +++ b/examples/app_bsky_feed_get_timeline.rs @@ -0,0 +1,15 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .app_bsky_feed_get_timeline() + .algorithm("your algorithm") + .cursor("your cursor") + .limit(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_feed_search_posts.rs b/examples/app_bsky_feed_search_posts.rs new file mode 100644 index 0000000..78344aa --- /dev/null +++ b/examples/app_bsky_feed_search_posts.rs @@ -0,0 +1,15 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let q = "your q"; + let response = client + .app_bsky_feed_search_posts(q) + .cursor("your cursor") + .limit(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_graph_get_blocks.rs b/examples/app_bsky_graph_get_blocks.rs new file mode 100644 index 0000000..c10cf00 --- /dev/null +++ b/examples/app_bsky_graph_get_blocks.rs @@ -0,0 +1,14 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .app_bsky_graph_get_blocks() + .cursor("your cursor") + .limit(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_graph_get_followers.rs b/examples/app_bsky_graph_get_followers.rs new file mode 100644 index 0000000..2e9ecfc --- /dev/null +++ b/examples/app_bsky_graph_get_followers.rs @@ -0,0 +1,15 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let actor = "your actor"; + let response = client + .app_bsky_graph_get_followers(actor) + .cursor("your cursor") + .limit(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_graph_get_follows.rs b/examples/app_bsky_graph_get_follows.rs new file mode 100644 index 0000000..18af9cf --- /dev/null +++ b/examples/app_bsky_graph_get_follows.rs @@ -0,0 +1,15 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let actor = "your actor"; + let response = client + .app_bsky_graph_get_follows(actor) + .cursor("your cursor") + .limit(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_graph_get_list.rs b/examples/app_bsky_graph_get_list.rs new file mode 100644 index 0000000..3a2d6af --- /dev/null +++ b/examples/app_bsky_graph_get_list.rs @@ -0,0 +1,15 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let list = "your list"; + let response = client + .app_bsky_graph_get_list(list) + .cursor("your cursor") + .limit(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_graph_get_list_blocks.rs b/examples/app_bsky_graph_get_list_blocks.rs new file mode 100644 index 0000000..4c32462 --- /dev/null +++ b/examples/app_bsky_graph_get_list_blocks.rs @@ -0,0 +1,14 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .app_bsky_graph_get_list_blocks() + .cursor("your cursor") + .limit(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_graph_get_list_mutes.rs b/examples/app_bsky_graph_get_list_mutes.rs new file mode 100644 index 0000000..8ed395d --- /dev/null +++ b/examples/app_bsky_graph_get_list_mutes.rs @@ -0,0 +1,14 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .app_bsky_graph_get_list_mutes() + .cursor("your cursor") + .limit(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_graph_get_lists.rs b/examples/app_bsky_graph_get_lists.rs new file mode 100644 index 0000000..927b4bc --- /dev/null +++ b/examples/app_bsky_graph_get_lists.rs @@ -0,0 +1,15 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let actor = "your actor"; + let response = client + .app_bsky_graph_get_lists(actor) + .cursor("your cursor") + .limit(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_graph_get_mutes.rs b/examples/app_bsky_graph_get_mutes.rs new file mode 100644 index 0000000..62dbc3f --- /dev/null +++ b/examples/app_bsky_graph_get_mutes.rs @@ -0,0 +1,14 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .app_bsky_graph_get_mutes() + .cursor("your cursor") + .limit(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_graph_get_suggested_follows_by_actor.rs b/examples/app_bsky_graph_get_suggested_follows_by_actor.rs new file mode 100644 index 0000000..2065d93 --- /dev/null +++ b/examples/app_bsky_graph_get_suggested_follows_by_actor.rs @@ -0,0 +1,13 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let actor = "your actor"; + let response = client + .app_bsky_graph_get_suggested_follows_by_actor(actor) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_graph_mute_actor.rs b/examples/app_bsky_graph_mute_actor.rs new file mode 100644 index 0000000..9bea58a --- /dev/null +++ b/examples/app_bsky_graph_mute_actor.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let actor = "your actor"; + let response = client.app_bsky_graph_mute_actor(actor).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_graph_mute_actor_list.rs b/examples/app_bsky_graph_mute_actor_list.rs new file mode 100644 index 0000000..eeefa87 --- /dev/null +++ b/examples/app_bsky_graph_mute_actor_list.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let list = "your list"; + let response = client.app_bsky_graph_mute_actor_list(list).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_graph_unmute_actor.rs b/examples/app_bsky_graph_unmute_actor.rs new file mode 100644 index 0000000..b88acac --- /dev/null +++ b/examples/app_bsky_graph_unmute_actor.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let actor = "your actor"; + let response = client.app_bsky_graph_unmute_actor(actor).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_graph_unmute_actor_list.rs b/examples/app_bsky_graph_unmute_actor_list.rs new file mode 100644 index 0000000..52770eb --- /dev/null +++ b/examples/app_bsky_graph_unmute_actor_list.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let list = "your list"; + let response = client.app_bsky_graph_unmute_actor_list(list).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_labeler_get_services.rs b/examples/app_bsky_labeler_get_services.rs new file mode 100644 index 0000000..460b55d --- /dev/null +++ b/examples/app_bsky_labeler_get_services.rs @@ -0,0 +1,14 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let dids = &["your dids"]; + let response = client + .app_bsky_labeler_get_services(dids) + .detailed(true) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_notification_get_unread_count.rs b/examples/app_bsky_notification_get_unread_count.rs new file mode 100644 index 0000000..46923bc --- /dev/null +++ b/examples/app_bsky_notification_get_unread_count.rs @@ -0,0 +1,13 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .app_bsky_notification_get_unread_count() + .seen_at(chrono::Utc::now()) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_notification_list_notifications.rs b/examples/app_bsky_notification_list_notifications.rs new file mode 100644 index 0000000..cccf8e7 --- /dev/null +++ b/examples/app_bsky_notification_list_notifications.rs @@ -0,0 +1,15 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .app_bsky_notification_list_notifications() + .cursor("your cursor") + .limit(1) + .seen_at(chrono::Utc::now()) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_notification_register_push.rs b/examples/app_bsky_notification_register_push.rs new file mode 100644 index 0000000..e50a6f9 --- /dev/null +++ b/examples/app_bsky_notification_register_push.rs @@ -0,0 +1,16 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +use atproto::request::AppBskyNotificationRegisterPushRequired; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let args = AppBskyNotificationRegisterPushRequired { + app_id: "your app id", + platform: "your platform", + service_did: "your service did", + token: "your token", + }; + let response = client.app_bsky_notification_register_push(args).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_notification_update_seen.rs b/examples/app_bsky_notification_update_seen.rs new file mode 100644 index 0000000..b81ca50 --- /dev/null +++ b/examples/app_bsky_notification_update_seen.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let seen_at = chrono::Utc::now(); + let response = client.app_bsky_notification_update_seen(seen_at).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_unspecced_apply_labels.rs b/examples/app_bsky_unspecced_apply_labels.rs new file mode 100644 index 0000000..6c0424b --- /dev/null +++ b/examples/app_bsky_unspecced_apply_labels.rs @@ -0,0 +1,15 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let labels = vec![ + ComAtprotoLabelDefsLabel { cid : Some("your cid".to_owned()), cts : + chrono::Utc::now(), exp : Some(chrono::Utc::now()), neg : Some(true), sig : + Some("your sig".to_owned()), src : "your src".to_owned(), uri : "your uri" + .to_owned(), val : "your val".to_owned(), ver : Some(1) } + ]; + let response = client.app_bsky_unspecced_apply_labels(labels).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_unspecced_get_popular.rs b/examples/app_bsky_unspecced_get_popular.rs new file mode 100644 index 0000000..605cc53 --- /dev/null +++ b/examples/app_bsky_unspecced_get_popular.rs @@ -0,0 +1,15 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .app_bsky_unspecced_get_popular() + .cursor("your cursor") + .include_nsfw(true) + .limit(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_unspecced_get_popular_feed_generators.rs b/examples/app_bsky_unspecced_get_popular_feed_generators.rs new file mode 100644 index 0000000..e02f04f --- /dev/null +++ b/examples/app_bsky_unspecced_get_popular_feed_generators.rs @@ -0,0 +1,15 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .app_bsky_unspecced_get_popular_feed_generators() + .cursor("your cursor") + .limit(1) + .query("your query") + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/app_bsky_unspecced_get_tagged_suggestions.rs b/examples/app_bsky_unspecced_get_tagged_suggestions.rs new file mode 100644 index 0000000..5160d6c --- /dev/null +++ b/examples/app_bsky_unspecced_get_tagged_suggestions.rs @@ -0,0 +1,9 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client.app_bsky_unspecced_get_tagged_suggestions().await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_identity_get_recommended_did_credentials.rs b/examples/com_atproto_identity_get_recommended_did_credentials.rs new file mode 100644 index 0000000..127e758 --- /dev/null +++ b/examples/com_atproto_identity_get_recommended_did_credentials.rs @@ -0,0 +1,12 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .com_atproto_identity_get_recommended_did_credentials() + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_identity_request_plc_operation_signature.rs b/examples/com_atproto_identity_request_plc_operation_signature.rs new file mode 100644 index 0000000..5c6e554 --- /dev/null +++ b/examples/com_atproto_identity_request_plc_operation_signature.rs @@ -0,0 +1,12 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .com_atproto_identity_request_plc_operation_signature() + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_identity_resolve_handle.rs b/examples/com_atproto_identity_resolve_handle.rs new file mode 100644 index 0000000..010ebfa --- /dev/null +++ b/examples/com_atproto_identity_resolve_handle.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let handle = "your handle"; + let response = client.com_atproto_identity_resolve_handle(handle).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_identity_sign_plc_operation.rs b/examples/com_atproto_identity_sign_plc_operation.rs new file mode 100644 index 0000000..a15903a --- /dev/null +++ b/examples/com_atproto_identity_sign_plc_operation.rs @@ -0,0 +1,17 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .com_atproto_identity_sign_plc_operation() + .also_known_as(&["your also known as"]) + .rotation_keys(&["your rotation keys"]) + .services(serde_json::json!({})) + .token("your token") + .verification_methods(serde_json::json!({})) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_identity_submit_plc_operation.rs b/examples/com_atproto_identity_submit_plc_operation.rs new file mode 100644 index 0000000..8343d45 --- /dev/null +++ b/examples/com_atproto_identity_submit_plc_operation.rs @@ -0,0 +1,13 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let operation = serde_json::json!({}); + let response = client + .com_atproto_identity_submit_plc_operation(operation) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_identity_update_handle.rs b/examples/com_atproto_identity_update_handle.rs new file mode 100644 index 0000000..15cccf5 --- /dev/null +++ b/examples/com_atproto_identity_update_handle.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let handle = "your handle"; + let response = client.com_atproto_identity_update_handle(handle).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_moderation_create_report.rs b/examples/com_atproto_moderation_create_report.rs new file mode 100644 index 0000000..b578ad8 --- /dev/null +++ b/examples/com_atproto_moderation_create_report.rs @@ -0,0 +1,15 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let reason_type = ComAtprotoModerationDefsReasonType(serde_json::json!({})); + let subject = serde_json::json!({}); + let response = client + .com_atproto_moderation_create_report(reason_type, subject) + .reason("your reason") + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_repo_apply_writes.rs b/examples/com_atproto_repo_apply_writes.rs new file mode 100644 index 0000000..257c0ea --- /dev/null +++ b/examples/com_atproto_repo_apply_writes.rs @@ -0,0 +1,16 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let repo = "your repo"; + let writes = vec![serde_json::json!({})]; + let response = client + .com_atproto_repo_apply_writes(repo, writes) + .swap_commit("your swap commit") + .validate(true) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_repo_create_record.rs b/examples/com_atproto_repo_create_record.rs new file mode 100644 index 0000000..2f51130 --- /dev/null +++ b/examples/com_atproto_repo_create_record.rs @@ -0,0 +1,18 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let collection = "your collection"; + let record = serde_json::json!({}); + let repo = "your repo"; + let response = client + .com_atproto_repo_create_record(collection, record, repo) + .rkey("your rkey") + .swap_commit("your swap commit") + .validate(true) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_repo_delete_record.rs b/examples/com_atproto_repo_delete_record.rs new file mode 100644 index 0000000..511f6d5 --- /dev/null +++ b/examples/com_atproto_repo_delete_record.rs @@ -0,0 +1,17 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let collection = "your collection"; + let repo = "your repo"; + let rkey = "your rkey"; + let response = client + .com_atproto_repo_delete_record(collection, repo, rkey) + .swap_commit("your swap commit") + .swap_record("your swap record") + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_repo_describe_repo.rs b/examples/com_atproto_repo_describe_repo.rs new file mode 100644 index 0000000..262b26d --- /dev/null +++ b/examples/com_atproto_repo_describe_repo.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let repo = "your repo"; + let response = client.com_atproto_repo_describe_repo(repo).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_repo_get_record.rs b/examples/com_atproto_repo_get_record.rs new file mode 100644 index 0000000..2dfd9f6 --- /dev/null +++ b/examples/com_atproto_repo_get_record.rs @@ -0,0 +1,16 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let collection = "your collection"; + let repo = "your repo"; + let rkey = "your rkey"; + let response = client + .com_atproto_repo_get_record(collection, repo, rkey) + .cid("your cid") + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_repo_import_repo.rs b/examples/com_atproto_repo_import_repo.rs new file mode 100644 index 0000000..50df04f --- /dev/null +++ b/examples/com_atproto_repo_import_repo.rs @@ -0,0 +1,9 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client.com_atproto_repo_import_repo().await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_repo_list_missing_blobs.rs b/examples/com_atproto_repo_list_missing_blobs.rs new file mode 100644 index 0000000..17f1d77 --- /dev/null +++ b/examples/com_atproto_repo_list_missing_blobs.rs @@ -0,0 +1,14 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .com_atproto_repo_list_missing_blobs() + .cursor("your cursor") + .limit(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_repo_list_records.rs b/examples/com_atproto_repo_list_records.rs new file mode 100644 index 0000000..7042fab --- /dev/null +++ b/examples/com_atproto_repo_list_records.rs @@ -0,0 +1,19 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let collection = "your collection"; + let repo = "your repo"; + let response = client + .com_atproto_repo_list_records(collection, repo) + .cursor("your cursor") + .limit(1) + .reverse(true) + .rkey_end("your rkey end") + .rkey_start("your rkey start") + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_repo_put_record.rs b/examples/com_atproto_repo_put_record.rs new file mode 100644 index 0000000..0be2a38 --- /dev/null +++ b/examples/com_atproto_repo_put_record.rs @@ -0,0 +1,22 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +use atproto::request::ComAtprotoRepoPutRecordRequired; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let args = ComAtprotoRepoPutRecordRequired { + collection: "your collection", + record: serde_json::json!({}), + repo: "your repo", + rkey: "your rkey", + }; + let response = client + .com_atproto_repo_put_record(args) + .swap_commit("your swap commit") + .swap_record("your swap record") + .validate(true) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_repo_rebase_repo.rs b/examples/com_atproto_repo_rebase_repo.rs new file mode 100644 index 0000000..6ff0f44 --- /dev/null +++ b/examples/com_atproto_repo_rebase_repo.rs @@ -0,0 +1,14 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let repo = "your repo"; + let response = client + .com_atproto_repo_rebase_repo(repo) + .swap_commit("your swap commit") + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_repo_upload_blob.rs b/examples/com_atproto_repo_upload_blob.rs new file mode 100644 index 0000000..1db2694 --- /dev/null +++ b/examples/com_atproto_repo_upload_blob.rs @@ -0,0 +1,9 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client.com_atproto_repo_upload_blob().await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_activate_account.rs b/examples/com_atproto_server_activate_account.rs new file mode 100644 index 0000000..d84506f --- /dev/null +++ b/examples/com_atproto_server_activate_account.rs @@ -0,0 +1,9 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client.com_atproto_server_activate_account().await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_check_account_status.rs b/examples/com_atproto_server_check_account_status.rs new file mode 100644 index 0000000..f1152b2 --- /dev/null +++ b/examples/com_atproto_server_check_account_status.rs @@ -0,0 +1,9 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client.com_atproto_server_check_account_status().await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_confirm_email.rs b/examples/com_atproto_server_confirm_email.rs new file mode 100644 index 0000000..dc89e9f --- /dev/null +++ b/examples/com_atproto_server_confirm_email.rs @@ -0,0 +1,11 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let email = "your email"; + let token = "your token"; + let response = client.com_atproto_server_confirm_email(email, token).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_create_account.rs b/examples/com_atproto_server_create_account.rs new file mode 100644 index 0000000..625c564 --- /dev/null +++ b/examples/com_atproto_server_create_account.rs @@ -0,0 +1,21 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let handle = "your handle"; + let response = client + .com_atproto_server_create_account(handle) + .did("your did") + .email("your email") + .invite_code("your invite code") + .password("your password") + .plc_op(serde_json::json!({})) + .recovery_key("your recovery key") + .verification_code("your verification code") + .verification_phone("your verification phone") + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_create_app_password.rs b/examples/com_atproto_server_create_app_password.rs new file mode 100644 index 0000000..448bd2a --- /dev/null +++ b/examples/com_atproto_server_create_app_password.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let name = "your name"; + let response = client.com_atproto_server_create_app_password(name).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_create_invite_code.rs b/examples/com_atproto_server_create_invite_code.rs new file mode 100644 index 0000000..e712029 --- /dev/null +++ b/examples/com_atproto_server_create_invite_code.rs @@ -0,0 +1,14 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let use_count = 1; + let response = client + .com_atproto_server_create_invite_code(use_count) + .for_account("your for account") + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_create_invite_codes.rs b/examples/com_atproto_server_create_invite_codes.rs new file mode 100644 index 0000000..4ed3a27 --- /dev/null +++ b/examples/com_atproto_server_create_invite_codes.rs @@ -0,0 +1,15 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let code_count = 1; + let use_count = 1; + let response = client + .com_atproto_server_create_invite_codes(code_count, use_count) + .for_accounts(&["your for accounts"]) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_create_session.rs b/examples/com_atproto_server_create_session.rs new file mode 100644 index 0000000..7c4d1c3 --- /dev/null +++ b/examples/com_atproto_server_create_session.rs @@ -0,0 +1,14 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let identifier = "your identifier"; + let password = "your password"; + let response = client + .com_atproto_server_create_session(identifier, password) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_deactivate_account.rs b/examples/com_atproto_server_deactivate_account.rs new file mode 100644 index 0000000..bac0969 --- /dev/null +++ b/examples/com_atproto_server_deactivate_account.rs @@ -0,0 +1,13 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .com_atproto_server_deactivate_account() + .delete_after(chrono::Utc::now()) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_delete_account.rs b/examples/com_atproto_server_delete_account.rs new file mode 100644 index 0000000..30d6fb5 --- /dev/null +++ b/examples/com_atproto_server_delete_account.rs @@ -0,0 +1,15 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let did = "your did"; + let password = "your password"; + let token = "your token"; + let response = client + .com_atproto_server_delete_account(did, password, token) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_delete_session.rs b/examples/com_atproto_server_delete_session.rs new file mode 100644 index 0000000..75a9eaa --- /dev/null +++ b/examples/com_atproto_server_delete_session.rs @@ -0,0 +1,9 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client.com_atproto_server_delete_session().await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_describe_server.rs b/examples/com_atproto_server_describe_server.rs new file mode 100644 index 0000000..2bc953f --- /dev/null +++ b/examples/com_atproto_server_describe_server.rs @@ -0,0 +1,9 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client.com_atproto_server_describe_server().await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_get_account_invite_codes.rs b/examples/com_atproto_server_get_account_invite_codes.rs new file mode 100644 index 0000000..b9745a8 --- /dev/null +++ b/examples/com_atproto_server_get_account_invite_codes.rs @@ -0,0 +1,14 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .com_atproto_server_get_account_invite_codes() + .create_available(true) + .include_used(true) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_get_service_auth.rs b/examples/com_atproto_server_get_service_auth.rs new file mode 100644 index 0000000..ca25d51 --- /dev/null +++ b/examples/com_atproto_server_get_service_auth.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let aud = "your aud"; + let response = client.com_atproto_server_get_service_auth(aud).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_get_session.rs b/examples/com_atproto_server_get_session.rs new file mode 100644 index 0000000..716bcdf --- /dev/null +++ b/examples/com_atproto_server_get_session.rs @@ -0,0 +1,9 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client.com_atproto_server_get_session().await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_list_app_passwords.rs b/examples/com_atproto_server_list_app_passwords.rs new file mode 100644 index 0000000..3742b32 --- /dev/null +++ b/examples/com_atproto_server_list_app_passwords.rs @@ -0,0 +1,9 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client.com_atproto_server_list_app_passwords().await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_refresh_session.rs b/examples/com_atproto_server_refresh_session.rs new file mode 100644 index 0000000..8ffc82f --- /dev/null +++ b/examples/com_atproto_server_refresh_session.rs @@ -0,0 +1,9 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client.com_atproto_server_refresh_session().await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_request_account_delete.rs b/examples/com_atproto_server_request_account_delete.rs new file mode 100644 index 0000000..ae3a60a --- /dev/null +++ b/examples/com_atproto_server_request_account_delete.rs @@ -0,0 +1,9 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client.com_atproto_server_request_account_delete().await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_request_email_confirmation.rs b/examples/com_atproto_server_request_email_confirmation.rs new file mode 100644 index 0000000..bd70d20 --- /dev/null +++ b/examples/com_atproto_server_request_email_confirmation.rs @@ -0,0 +1,9 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client.com_atproto_server_request_email_confirmation().await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_request_email_update.rs b/examples/com_atproto_server_request_email_update.rs new file mode 100644 index 0000000..06dca26 --- /dev/null +++ b/examples/com_atproto_server_request_email_update.rs @@ -0,0 +1,9 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client.com_atproto_server_request_email_update().await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_request_password_reset.rs b/examples/com_atproto_server_request_password_reset.rs new file mode 100644 index 0000000..b614015 --- /dev/null +++ b/examples/com_atproto_server_request_password_reset.rs @@ -0,0 +1,13 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let email = "your email"; + let response = client + .com_atproto_server_request_password_reset(email) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_reserve_signing_key.rs b/examples/com_atproto_server_reserve_signing_key.rs new file mode 100644 index 0000000..ca1ff42 --- /dev/null +++ b/examples/com_atproto_server_reserve_signing_key.rs @@ -0,0 +1,13 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .com_atproto_server_reserve_signing_key() + .did("your did") + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_reset_password.rs b/examples/com_atproto_server_reset_password.rs new file mode 100644 index 0000000..26260eb --- /dev/null +++ b/examples/com_atproto_server_reset_password.rs @@ -0,0 +1,14 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let password = "your password"; + let token = "your token"; + let response = client + .com_atproto_server_reset_password(password, token) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_revoke_app_password.rs b/examples/com_atproto_server_revoke_app_password.rs new file mode 100644 index 0000000..8c8a2c0 --- /dev/null +++ b/examples/com_atproto_server_revoke_app_password.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let name = "your name"; + let response = client.com_atproto_server_revoke_app_password(name).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_server_update_email.rs b/examples/com_atproto_server_update_email.rs new file mode 100644 index 0000000..a571e31 --- /dev/null +++ b/examples/com_atproto_server_update_email.rs @@ -0,0 +1,14 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let email = "your email"; + let response = client + .com_atproto_server_update_email(email) + .token("your token") + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_sync_get_blob.rs b/examples/com_atproto_sync_get_blob.rs new file mode 100644 index 0000000..1ac1a78 --- /dev/null +++ b/examples/com_atproto_sync_get_blob.rs @@ -0,0 +1,11 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let cid = "your cid"; + let did = "your did"; + let response = client.com_atproto_sync_get_blob(cid, did).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_sync_get_blocks.rs b/examples/com_atproto_sync_get_blocks.rs new file mode 100644 index 0000000..a0ed600 --- /dev/null +++ b/examples/com_atproto_sync_get_blocks.rs @@ -0,0 +1,11 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let cids = &["your cids"]; + let did = "your did"; + let response = client.com_atproto_sync_get_blocks(cids, did).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_sync_get_checkout.rs b/examples/com_atproto_sync_get_checkout.rs new file mode 100644 index 0000000..48da410 --- /dev/null +++ b/examples/com_atproto_sync_get_checkout.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let did = "your did"; + let response = client.com_atproto_sync_get_checkout(did).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_sync_get_commit_path.rs b/examples/com_atproto_sync_get_commit_path.rs new file mode 100644 index 0000000..c53fdf2 --- /dev/null +++ b/examples/com_atproto_sync_get_commit_path.rs @@ -0,0 +1,15 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let did = "your did"; + let response = client + .com_atproto_sync_get_commit_path(did) + .earliest("your earliest") + .latest("your latest") + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_sync_get_head.rs b/examples/com_atproto_sync_get_head.rs new file mode 100644 index 0000000..ee999b5 --- /dev/null +++ b/examples/com_atproto_sync_get_head.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let did = "your did"; + let response = client.com_atproto_sync_get_head(did).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_sync_get_latest_commit.rs b/examples/com_atproto_sync_get_latest_commit.rs new file mode 100644 index 0000000..41a1508 --- /dev/null +++ b/examples/com_atproto_sync_get_latest_commit.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let did = "your did"; + let response = client.com_atproto_sync_get_latest_commit(did).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_sync_get_record.rs b/examples/com_atproto_sync_get_record.rs new file mode 100644 index 0000000..a6bae72 --- /dev/null +++ b/examples/com_atproto_sync_get_record.rs @@ -0,0 +1,16 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let collection = "your collection"; + let did = "your did"; + let rkey = "your rkey"; + let response = client + .com_atproto_sync_get_record(collection, did, rkey) + .commit("your commit") + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_sync_get_repo.rs b/examples/com_atproto_sync_get_repo.rs new file mode 100644 index 0000000..902a64a --- /dev/null +++ b/examples/com_atproto_sync_get_repo.rs @@ -0,0 +1,14 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let did = "your did"; + let response = client + .com_atproto_sync_get_repo(did) + .since("your since") + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_sync_list_blobs.rs b/examples/com_atproto_sync_list_blobs.rs new file mode 100644 index 0000000..0b18b1f --- /dev/null +++ b/examples/com_atproto_sync_list_blobs.rs @@ -0,0 +1,16 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let did = "your did"; + let response = client + .com_atproto_sync_list_blobs(did) + .cursor("your cursor") + .limit(1) + .since("your since") + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_sync_list_repos.rs b/examples/com_atproto_sync_list_repos.rs new file mode 100644 index 0000000..84bc389 --- /dev/null +++ b/examples/com_atproto_sync_list_repos.rs @@ -0,0 +1,14 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .com_atproto_sync_list_repos() + .cursor("your cursor") + .limit(1) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_temp_check_signup_queue.rs b/examples/com_atproto_temp_check_signup_queue.rs new file mode 100644 index 0000000..e11094f --- /dev/null +++ b/examples/com_atproto_temp_check_signup_queue.rs @@ -0,0 +1,9 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client.com_atproto_temp_check_signup_queue().await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_temp_request_phone_verification.rs b/examples/com_atproto_temp_request_phone_verification.rs new file mode 100644 index 0000000..5197582 --- /dev/null +++ b/examples/com_atproto_temp_request_phone_verification.rs @@ -0,0 +1,13 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let phone_number = "your phone number"; + let response = client + .com_atproto_temp_request_phone_verification(phone_number) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/com_atproto_temp_upgrade_repo_version.rs b/examples/com_atproto_temp_upgrade_repo_version.rs new file mode 100644 index 0000000..a9272f1 --- /dev/null +++ b/examples/com_atproto_temp_upgrade_repo_version.rs @@ -0,0 +1,14 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let did = "your did"; + let response = client + .com_atproto_temp_upgrade_repo_version(did) + .force(true) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/tools_ozone_communication_create_template.rs b/examples/tools_ozone_communication_create_template.rs new file mode 100644 index 0000000..6c21398 --- /dev/null +++ b/examples/tools_ozone_communication_create_template.rs @@ -0,0 +1,16 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let content_markdown = "your content markdown"; + let name = "your name"; + let subject = "your subject"; + let response = client + .tools_ozone_communication_create_template(content_markdown, name, subject) + .created_by("your created by") + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/tools_ozone_communication_delete_template.rs b/examples/tools_ozone_communication_delete_template.rs new file mode 100644 index 0000000..77734cf --- /dev/null +++ b/examples/tools_ozone_communication_delete_template.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let id = "your id"; + let response = client.tools_ozone_communication_delete_template(id).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/tools_ozone_communication_list_templates.rs b/examples/tools_ozone_communication_list_templates.rs new file mode 100644 index 0000000..6856a9f --- /dev/null +++ b/examples/tools_ozone_communication_list_templates.rs @@ -0,0 +1,9 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client.tools_ozone_communication_list_templates().await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/tools_ozone_communication_update_template.rs b/examples/tools_ozone_communication_update_template.rs new file mode 100644 index 0000000..d7563b9 --- /dev/null +++ b/examples/tools_ozone_communication_update_template.rs @@ -0,0 +1,18 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let id = "your id"; + let response = client + .tools_ozone_communication_update_template(id) + .content_markdown("your content markdown") + .disabled(true) + .name("your name") + .subject("your subject") + .updated_by("your updated by") + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/tools_ozone_moderation_emit_event.rs b/examples/tools_ozone_moderation_emit_event.rs new file mode 100644 index 0000000..2a84bf9 --- /dev/null +++ b/examples/tools_ozone_moderation_emit_event.rs @@ -0,0 +1,16 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let created_by = "your created by"; + let event = serde_json::json!({}); + let subject = serde_json::json!({}); + let response = client + .tools_ozone_moderation_emit_event(created_by, event, subject) + .subject_blob_cids(&["your subject blob cids"]) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/tools_ozone_moderation_get_event.rs b/examples/tools_ozone_moderation_get_event.rs new file mode 100644 index 0000000..5aebd49 --- /dev/null +++ b/examples/tools_ozone_moderation_get_event.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let id = 1; + let response = client.tools_ozone_moderation_get_event(id).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/tools_ozone_moderation_get_record.rs b/examples/tools_ozone_moderation_get_record.rs new file mode 100644 index 0000000..1a069c9 --- /dev/null +++ b/examples/tools_ozone_moderation_get_record.rs @@ -0,0 +1,14 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let uri = "your uri"; + let response = client + .tools_ozone_moderation_get_record(uri) + .cid("your cid") + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/tools_ozone_moderation_get_repo.rs b/examples/tools_ozone_moderation_get_repo.rs new file mode 100644 index 0000000..7da12c2 --- /dev/null +++ b/examples/tools_ozone_moderation_get_repo.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let did = "your did"; + let response = client.tools_ozone_moderation_get_repo(did).await.unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/tools_ozone_moderation_query_events.rs b/examples/tools_ozone_moderation_query_events.rs new file mode 100644 index 0000000..8e8b6f3 --- /dev/null +++ b/examples/tools_ozone_moderation_query_events.rs @@ -0,0 +1,28 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .tools_ozone_moderation_query_events() + .added_labels(&["your added labels"]) + .added_tags(&["your added tags"]) + .comment("your comment") + .created_after(chrono::Utc::now()) + .created_before(chrono::Utc::now()) + .created_by("your created by") + .cursor("your cursor") + .has_comment(true) + .include_all_user_records(true) + .limit(1) + .removed_labels(&["your removed labels"]) + .removed_tags(&["your removed tags"]) + .report_types(&["your report types"]) + .sort_direction("your sort direction") + .subject("your subject") + .types(&["your types"]) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/tools_ozone_moderation_query_statuses.rs b/examples/tools_ozone_moderation_query_statuses.rs new file mode 100644 index 0000000..488384f --- /dev/null +++ b/examples/tools_ozone_moderation_query_statuses.rs @@ -0,0 +1,30 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .tools_ozone_moderation_query_statuses() + .appealed(true) + .comment("your comment") + .cursor("your cursor") + .exclude_tags(&["your exclude tags"]) + .ignore_subjects(&["your ignore subjects"]) + .include_muted(true) + .last_reviewed_by("your last reviewed by") + .limit(1) + .reported_after(chrono::Utc::now()) + .reported_before(chrono::Utc::now()) + .review_state("your review state") + .reviewed_after(chrono::Utc::now()) + .reviewed_before(chrono::Utc::now()) + .sort_direction("your sort direction") + .sort_field("your sort field") + .subject("your subject") + .tags(&["your tags"]) + .takendown(true) + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/examples/tools_ozone_moderation_search_repos.rs b/examples/tools_ozone_moderation_search_repos.rs new file mode 100644 index 0000000..77fce00 --- /dev/null +++ b/examples/tools_ozone_moderation_search_repos.rs @@ -0,0 +1,16 @@ +#![allow(unused_imports)] +use atproto::AtprotoClient; +use atproto::model::*; +#[tokio::main] +async fn main() { + let client = AtprotoClient::from_env(); + let response = client + .tools_ozone_moderation_search_repos() + .cursor("your cursor") + .limit(1) + .q("your q") + .term("your term") + .await + .unwrap(); + println!("{:#?}", response); +} \ No newline at end of file diff --git a/readme.md b/readme.md index 8b13789..2d58a6d 100644 --- a/readme.md +++ b/readme.md @@ -1 +1,17 @@ +# atproto-sdk-rust + +```sh +just test +``` + +```sh +export ATPROTO_BASE_URL=https://bsky.social +just test-full +``` + +## ref + +- https://swagger.io +- https://github.com/kurtbuilds/libninja +- https://github.com/rdmurphy/atproto-openapi-types diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..1bcb434 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,1516 @@ +//! [`AtprotoClient`](struct.AtprotoClient.html) is the main entry point for this library. +//! +//! Library created with [`libninja`](https://www.libninja.com). +#![allow(non_camel_case_types)] +#![allow(unused)] +pub mod model; +pub mod request; +pub use httpclient::{Error, Result, InMemoryResponseExt}; +use std::sync::{Arc, OnceLock}; +use std::borrow::Cow; +use crate::model::*; +mod serde; +static SHARED_HTTPCLIENT: OnceLock = OnceLock::new(); +pub fn default_http_client() -> httpclient::Client { + httpclient::Client::new() + .base_url( + std::env::var("ATPROTO_BASE_URL") + .expect("Missing environment variable ATPROTO_BASE_URL") + .as_str(), + ) +} +/// Use this method if you want to add custom middleware to the httpclient. +/// It must be called before any requests are made, otherwise it will have no effect. +/// Example usage: +/// +//pub fn init_http_client(init: httpclient::Client) { +// let _ = SHARED_HTTPCLIENT.set(init); +//} +fn shared_http_client() -> Cow<'static, httpclient::Client> { + Cow::Borrowed(SHARED_HTTPCLIENT.get_or_init(default_http_client)) +} +#[derive(Clone)] +pub struct FluentRequest<'a, T> { + pub(crate) client: &'a AtprotoClient, + pub params: T, +} +pub struct AtprotoClient { + client: Cow<'static, httpclient::Client>, +} +impl AtprotoClient { + pub fn from_env() -> Self { + Self { + client: shared_http_client(), + } + } + pub fn new() -> Self { + Self { + client: shared_http_client(), + } + } + pub fn new_with(client: httpclient::Client) -> Self { + //pub fn new_with(client: httpclient::Client, authentication: AtprotoAuth) -> Self { + Self { + client: Cow::Owned(client), + //authentication, + } + } +} +impl AtprotoClient { + ///Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth. + pub fn app_bsky_actor_get_preferences( + &self, + ) -> FluentRequest<'_, request::AppBskyActorGetPreferencesRequest> { + FluentRequest { + client: self, + params: request::AppBskyActorGetPreferencesRequest { + }, + } + } + ///Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth. + pub fn app_bsky_actor_get_profile( + &self, + actor: &str, + ) -> FluentRequest<'_, request::AppBskyActorGetProfileRequest> { + FluentRequest { + client: self, + params: request::AppBskyActorGetProfileRequest { + actor: actor.to_owned(), + }, + } + } + ///Get detailed profile views of multiple actors. + pub fn app_bsky_actor_get_profiles( + &self, + actors: &[&str], + ) -> FluentRequest<'_, request::AppBskyActorGetProfilesRequest> { + FluentRequest { + client: self, + params: request::AppBskyActorGetProfilesRequest { + actors: actors.iter().map(|&x| x.to_owned()).collect(), + }, + } + } + ///Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding. + pub fn app_bsky_actor_get_suggestions( + &self, + ) -> FluentRequest<'_, request::AppBskyActorGetSuggestionsRequest> { + FluentRequest { + client: self, + params: request::AppBskyActorGetSuggestionsRequest { + cursor: None, + limit: None, + }, + } + } + ///Set the private preferences attached to the account. + pub fn app_bsky_actor_put_preferences( + &self, + preferences: AppBskyActorDefsPreferences, + ) -> FluentRequest<'_, request::AppBskyActorPutPreferencesRequest> { + FluentRequest { + client: self, + params: request::AppBskyActorPutPreferencesRequest { + preferences, + }, + } + } + ///Find actors (profiles) matching search criteria. Does not require auth. + pub fn app_bsky_actor_search_actors( + &self, + ) -> FluentRequest<'_, request::AppBskyActorSearchActorsRequest> { + FluentRequest { + client: self, + params: request::AppBskyActorSearchActorsRequest { + cursor: None, + limit: None, + q: None, + term: None, + }, + } + } + ///Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth. + pub fn app_bsky_actor_search_actors_typeahead( + &self, + ) -> FluentRequest<'_, request::AppBskyActorSearchActorsTypeaheadRequest> { + FluentRequest { + client: self, + params: request::AppBskyActorSearchActorsTypeaheadRequest { + limit: None, + q: None, + term: None, + }, + } + } + ///Get a list of feeds (feed generator records) created by the actor (in the actor's repo). + pub fn app_bsky_feed_get_actor_feeds( + &self, + actor: &str, + ) -> FluentRequest<'_, request::AppBskyFeedGetActorFeedsRequest> { + FluentRequest { + client: self, + params: request::AppBskyFeedGetActorFeedsRequest { + actor: actor.to_owned(), + cursor: None, + limit: None, + }, + } + } + ///Get a list of posts liked by an actor. Does not require auth. + pub fn app_bsky_feed_get_actor_likes( + &self, + actor: &str, + ) -> FluentRequest<'_, request::AppBskyFeedGetActorLikesRequest> { + FluentRequest { + client: self, + params: request::AppBskyFeedGetActorLikesRequest { + actor: actor.to_owned(), + cursor: None, + limit: None, + }, + } + } + ///Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth. + pub fn app_bsky_feed_get_author_feed( + &self, + actor: &str, + ) -> FluentRequest<'_, request::AppBskyFeedGetAuthorFeedRequest> { + FluentRequest { + client: self, + params: request::AppBskyFeedGetAuthorFeedRequest { + actor: actor.to_owned(), + cursor: None, + filter: None, + limit: None, + }, + } + } + ///Get a hydrated feed from an actor's selected feed generator. Implemented by App View. + pub fn app_bsky_feed_get_feed( + &self, + feed: &str, + ) -> FluentRequest<'_, request::AppBskyFeedGetFeedRequest> { + FluentRequest { + client: self, + params: request::AppBskyFeedGetFeedRequest { + cursor: None, + feed: feed.to_owned(), + limit: None, + }, + } + } + ///Get information about a feed generator. Implemented by AppView. + pub fn app_bsky_feed_get_feed_generator( + &self, + feed: &str, + ) -> FluentRequest<'_, request::AppBskyFeedGetFeedGeneratorRequest> { + FluentRequest { + client: self, + params: request::AppBskyFeedGetFeedGeneratorRequest { + feed: feed.to_owned(), + }, + } + } + ///Get information about a list of feed generators. + pub fn app_bsky_feed_get_feed_generators( + &self, + feeds: &[&str], + ) -> FluentRequest<'_, request::AppBskyFeedGetFeedGeneratorsRequest> { + FluentRequest { + client: self, + params: request::AppBskyFeedGetFeedGeneratorsRequest { + feeds: feeds.iter().map(|&x| x.to_owned()).collect(), + }, + } + } + ///Get like records which reference a subject (by AT-URI and CID). + pub fn app_bsky_feed_get_likes( + &self, + uri: &str, + ) -> FluentRequest<'_, request::AppBskyFeedGetLikesRequest> { + FluentRequest { + client: self, + params: request::AppBskyFeedGetLikesRequest { + cid: None, + cursor: None, + limit: None, + uri: uri.to_owned(), + }, + } + } + ///Get a feed of recent posts from a list (posts and reposts from any actors on the list). Does not require auth. + pub fn app_bsky_feed_get_list_feed( + &self, + list: &str, + ) -> FluentRequest<'_, request::AppBskyFeedGetListFeedRequest> { + FluentRequest { + client: self, + params: request::AppBskyFeedGetListFeedRequest { + cursor: None, + limit: None, + list: list.to_owned(), + }, + } + } + ///Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests. + pub fn app_bsky_feed_get_post_thread( + &self, + uri: &str, + ) -> FluentRequest<'_, request::AppBskyFeedGetPostThreadRequest> { + FluentRequest { + client: self, + params: request::AppBskyFeedGetPostThreadRequest { + depth: None, + parent_height: None, + uri: uri.to_owned(), + }, + } + } + ///Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'. + pub fn app_bsky_feed_get_posts( + &self, + uris: &[&str], + ) -> FluentRequest<'_, request::AppBskyFeedGetPostsRequest> { + FluentRequest { + client: self, + params: request::AppBskyFeedGetPostsRequest { + uris: uris.iter().map(|&x| x.to_owned()).collect(), + }, + } + } + ///Get a list of reposts for a given post. + pub fn app_bsky_feed_get_reposted_by( + &self, + uri: &str, + ) -> FluentRequest<'_, request::AppBskyFeedGetRepostedByRequest> { + FluentRequest { + client: self, + params: request::AppBskyFeedGetRepostedByRequest { + cid: None, + cursor: None, + limit: None, + uri: uri.to_owned(), + }, + } + } + ///Get a list of suggested feeds (feed generators) for the requesting account. + pub fn app_bsky_feed_get_suggested_feeds( + &self, + ) -> FluentRequest<'_, request::AppBskyFeedGetSuggestedFeedsRequest> { + FluentRequest { + client: self, + params: request::AppBskyFeedGetSuggestedFeedsRequest { + cursor: None, + limit: None, + }, + } + } + ///Get a view of the requesting account's home timeline. This is expected to be some form of reverse-chronological feed. + pub fn app_bsky_feed_get_timeline( + &self, + ) -> FluentRequest<'_, request::AppBskyFeedGetTimelineRequest> { + FluentRequest { + client: self, + params: request::AppBskyFeedGetTimelineRequest { + algorithm: None, + cursor: None, + limit: None, + }, + } + } + ///Find posts matching search criteria, returning views of those posts. + pub fn app_bsky_feed_search_posts( + &self, + q: &str, + ) -> FluentRequest<'_, request::AppBskyFeedSearchPostsRequest> { + FluentRequest { + client: self, + params: request::AppBskyFeedSearchPostsRequest { + cursor: None, + limit: None, + q: q.to_owned(), + }, + } + } + ///Enumerates which accounts the requesting account is currently blocking. Requires auth. + pub fn app_bsky_graph_get_blocks( + &self, + ) -> FluentRequest<'_, request::AppBskyGraphGetBlocksRequest> { + FluentRequest { + client: self, + params: request::AppBskyGraphGetBlocksRequest { + cursor: None, + limit: None, + }, + } + } + ///Enumerates accounts which follow a specified account (actor). + pub fn app_bsky_graph_get_followers( + &self, + actor: &str, + ) -> FluentRequest<'_, request::AppBskyGraphGetFollowersRequest> { + FluentRequest { + client: self, + params: request::AppBskyGraphGetFollowersRequest { + actor: actor.to_owned(), + cursor: None, + limit: None, + }, + } + } + ///Enumerates accounts which a specified account (actor) follows. + pub fn app_bsky_graph_get_follows( + &self, + actor: &str, + ) -> FluentRequest<'_, request::AppBskyGraphGetFollowsRequest> { + FluentRequest { + client: self, + params: request::AppBskyGraphGetFollowsRequest { + actor: actor.to_owned(), + cursor: None, + limit: None, + }, + } + } + ///Gets a 'view' (with additional context) of a specified list. + pub fn app_bsky_graph_get_list( + &self, + list: &str, + ) -> FluentRequest<'_, request::AppBskyGraphGetListRequest> { + FluentRequest { + client: self, + params: request::AppBskyGraphGetListRequest { + cursor: None, + limit: None, + list: list.to_owned(), + }, + } + } + ///Get mod lists that the requesting account (actor) is blocking. Requires auth. + pub fn app_bsky_graph_get_list_blocks( + &self, + ) -> FluentRequest<'_, request::AppBskyGraphGetListBlocksRequest> { + FluentRequest { + client: self, + params: request::AppBskyGraphGetListBlocksRequest { + cursor: None, + limit: None, + }, + } + } + ///Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth. + pub fn app_bsky_graph_get_list_mutes( + &self, + ) -> FluentRequest<'_, request::AppBskyGraphGetListMutesRequest> { + FluentRequest { + client: self, + params: request::AppBskyGraphGetListMutesRequest { + cursor: None, + limit: None, + }, + } + } + ///Enumerates the lists created by a specified account (actor). + pub fn app_bsky_graph_get_lists( + &self, + actor: &str, + ) -> FluentRequest<'_, request::AppBskyGraphGetListsRequest> { + FluentRequest { + client: self, + params: request::AppBskyGraphGetListsRequest { + actor: actor.to_owned(), + cursor: None, + limit: None, + }, + } + } + ///Enumerates accounts that the requesting account (actor) currently has muted. Requires auth. + pub fn app_bsky_graph_get_mutes( + &self, + ) -> FluentRequest<'_, request::AppBskyGraphGetMutesRequest> { + FluentRequest { + client: self, + params: request::AppBskyGraphGetMutesRequest { + cursor: None, + limit: None, + }, + } + } + ///Enumerates follows similar to a given account (actor). Expected use is to recommend additional accounts immediately after following one account. + pub fn app_bsky_graph_get_suggested_follows_by_actor( + &self, + actor: &str, + ) -> FluentRequest<'_, request::AppBskyGraphGetSuggestedFollowsByActorRequest> { + FluentRequest { + client: self, + params: request::AppBskyGraphGetSuggestedFollowsByActorRequest { + actor: actor.to_owned(), + }, + } + } + ///Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth. + pub fn app_bsky_graph_mute_actor( + &self, + actor: &str, + ) -> FluentRequest<'_, request::AppBskyGraphMuteActorRequest> { + FluentRequest { + client: self, + params: request::AppBskyGraphMuteActorRequest { + actor: actor.to_owned(), + }, + } + } + ///Creates a mute relationship for the specified list of accounts. Mutes are private in Bluesky. Requires auth. + pub fn app_bsky_graph_mute_actor_list( + &self, + list: &str, + ) -> FluentRequest<'_, request::AppBskyGraphMuteActorListRequest> { + FluentRequest { + client: self, + params: request::AppBskyGraphMuteActorListRequest { + list: list.to_owned(), + }, + } + } + ///Unmutes the specified account. Requires auth. + pub fn app_bsky_graph_unmute_actor( + &self, + actor: &str, + ) -> FluentRequest<'_, request::AppBskyGraphUnmuteActorRequest> { + FluentRequest { + client: self, + params: request::AppBskyGraphUnmuteActorRequest { + actor: actor.to_owned(), + }, + } + } + ///Unmutes the specified list of accounts. Requires auth. + pub fn app_bsky_graph_unmute_actor_list( + &self, + list: &str, + ) -> FluentRequest<'_, request::AppBskyGraphUnmuteActorListRequest> { + FluentRequest { + client: self, + params: request::AppBskyGraphUnmuteActorListRequest { + list: list.to_owned(), + }, + } + } + ///Get information about a list of labeler services. + pub fn app_bsky_labeler_get_services( + &self, + dids: &[&str], + ) -> FluentRequest<'_, request::AppBskyLabelerGetServicesRequest> { + FluentRequest { + client: self, + params: request::AppBskyLabelerGetServicesRequest { + detailed: None, + dids: dids.iter().map(|&x| x.to_owned()).collect(), + }, + } + } + ///Count the number of unread notifications for the requesting account. Requires auth. + pub fn app_bsky_notification_get_unread_count( + &self, + ) -> FluentRequest<'_, request::AppBskyNotificationGetUnreadCountRequest> { + FluentRequest { + client: self, + params: request::AppBskyNotificationGetUnreadCountRequest { + seen_at: None, + }, + } + } + ///Enumerate notifications for the requesting account. Requires auth. + pub fn app_bsky_notification_list_notifications( + &self, + ) -> FluentRequest<'_, request::AppBskyNotificationListNotificationsRequest> { + FluentRequest { + client: self, + params: request::AppBskyNotificationListNotificationsRequest { + cursor: None, + limit: None, + seen_at: None, + }, + } + } + ///Register to receive push notifications, via a specified service, for the requesting account. Requires auth. + pub fn app_bsky_notification_register_push( + &self, + args: request::AppBskyNotificationRegisterPushRequired, + ) -> FluentRequest<'_, request::AppBskyNotificationRegisterPushRequest> { + FluentRequest { + client: self, + params: request::AppBskyNotificationRegisterPushRequest { + app_id: args.app_id.to_owned(), + platform: args.platform.to_owned(), + service_did: args.service_did.to_owned(), + token: args.token.to_owned(), + }, + } + } + ///Notify server that the requesting account has seen notifications. Requires auth. + pub fn app_bsky_notification_update_seen( + &self, + seen_at: chrono::DateTime, + ) -> FluentRequest<'_, request::AppBskyNotificationUpdateSeenRequest> { + FluentRequest { + client: self, + params: request::AppBskyNotificationUpdateSeenRequest { + seen_at, + }, + } + } + ///Allow a labeler to apply labels directly. + pub fn app_bsky_unspecced_apply_labels( + &self, + labels: Vec, + ) -> FluentRequest<'_, request::AppBskyUnspeccedApplyLabelsRequest> { + FluentRequest { + client: self, + params: request::AppBskyUnspeccedApplyLabelsRequest { + labels, + }, + } + } + ///DEPRECATED: will be removed soon. Use a feed generator alternative. + pub fn app_bsky_unspecced_get_popular( + &self, + ) -> FluentRequest<'_, request::AppBskyUnspeccedGetPopularRequest> { + FluentRequest { + client: self, + params: request::AppBskyUnspeccedGetPopularRequest { + cursor: None, + include_nsfw: None, + limit: None, + }, + } + } + ///An unspecced view of globally popular feed generators. + pub fn app_bsky_unspecced_get_popular_feed_generators( + &self, + ) -> FluentRequest<'_, request::AppBskyUnspeccedGetPopularFeedGeneratorsRequest> { + FluentRequest { + client: self, + params: request::AppBskyUnspeccedGetPopularFeedGeneratorsRequest { + cursor: None, + limit: None, + query: None, + }, + } + } + ///Get a list of suggestions (feeds and users) tagged with categories + pub fn app_bsky_unspecced_get_tagged_suggestions( + &self, + ) -> FluentRequest<'_, request::AppBskyUnspeccedGetTaggedSuggestionsRequest> { + FluentRequest { + client: self, + params: request::AppBskyUnspeccedGetTaggedSuggestionsRequest { + }, + } + } + ///Describe the credentials that should be included in the DID doc of an account that is migrating to this service. + pub fn com_atproto_identity_get_recommended_did_credentials( + &self, + ) -> FluentRequest< + '_, + request::ComAtprotoIdentityGetRecommendedDidCredentialsRequest, + > { + FluentRequest { + client: self, + params: request::ComAtprotoIdentityGetRecommendedDidCredentialsRequest { + }, + } + } + ///Request an email with a code to in order to request a signed PLC operation. Requires Auth. + pub fn com_atproto_identity_request_plc_operation_signature( + &self, + ) -> FluentRequest< + '_, + request::ComAtprotoIdentityRequestPlcOperationSignatureRequest, + > { + FluentRequest { + client: self, + params: request::ComAtprotoIdentityRequestPlcOperationSignatureRequest { + }, + } + } + ///Resolves a handle (domain name) to a DID. + pub fn com_atproto_identity_resolve_handle( + &self, + handle: &str, + ) -> FluentRequest<'_, request::ComAtprotoIdentityResolveHandleRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoIdentityResolveHandleRequest { + handle: handle.to_owned(), + }, + } + } + ///Signs a PLC operation to update some value(s) in the requesting DID's document. + pub fn com_atproto_identity_sign_plc_operation( + &self, + ) -> FluentRequest<'_, request::ComAtprotoIdentitySignPlcOperationRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoIdentitySignPlcOperationRequest { + also_known_as: None, + rotation_keys: None, + services: None, + token: None, + verification_methods: None, + }, + } + } + ///Validates a PLC operation to ensure that it doesn't violate a service's constraints or get the identity into a bad state, then submits it to the PLC registry + pub fn com_atproto_identity_submit_plc_operation( + &self, + operation: serde_json::Value, + ) -> FluentRequest<'_, request::ComAtprotoIdentitySubmitPlcOperationRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoIdentitySubmitPlcOperationRequest { + operation, + }, + } + } + ///Updates the current account's handle. Verifies handle validity, and updates did:plc document if necessary. Implemented by PDS, and requires auth. + pub fn com_atproto_identity_update_handle( + &self, + handle: &str, + ) -> FluentRequest<'_, request::ComAtprotoIdentityUpdateHandleRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoIdentityUpdateHandleRequest { + handle: handle.to_owned(), + }, + } + } + ///Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth. + pub fn com_atproto_moderation_create_report( + &self, + reason_type: ComAtprotoModerationDefsReasonType, + subject: serde_json::Value, + ) -> FluentRequest<'_, request::ComAtprotoModerationCreateReportRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoModerationCreateReportRequest { + reason: None, + reason_type, + subject, + }, + } + } + ///Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS. + pub fn com_atproto_repo_apply_writes( + &self, + repo: &str, + writes: Vec, + ) -> FluentRequest<'_, request::ComAtprotoRepoApplyWritesRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoRepoApplyWritesRequest { + repo: repo.to_owned(), + swap_commit: None, + validate: None, + writes, + }, + } + } + ///Create a single new repository record. Requires auth, implemented by PDS. + pub fn com_atproto_repo_create_record( + &self, + collection: &str, + record: serde_json::Value, + repo: &str, + ) -> FluentRequest<'_, request::ComAtprotoRepoCreateRecordRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoRepoCreateRecordRequest { + collection: collection.to_owned(), + record, + repo: repo.to_owned(), + rkey: None, + swap_commit: None, + validate: None, + }, + } + } + ///Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS. + pub fn com_atproto_repo_delete_record( + &self, + collection: &str, + repo: &str, + rkey: &str, + ) -> FluentRequest<'_, request::ComAtprotoRepoDeleteRecordRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoRepoDeleteRecordRequest { + collection: collection.to_owned(), + repo: repo.to_owned(), + rkey: rkey.to_owned(), + swap_commit: None, + swap_record: None, + }, + } + } + ///Get information about an account and repository, including the list of collections. Does not require auth. + pub fn com_atproto_repo_describe_repo( + &self, + repo: &str, + ) -> FluentRequest<'_, request::ComAtprotoRepoDescribeRepoRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoRepoDescribeRepoRequest { + repo: repo.to_owned(), + }, + } + } + ///Get a single record from a repository. Does not require auth. + pub fn com_atproto_repo_get_record( + &self, + collection: &str, + repo: &str, + rkey: &str, + ) -> FluentRequest<'_, request::ComAtprotoRepoGetRecordRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoRepoGetRecordRequest { + cid: None, + collection: collection.to_owned(), + repo: repo.to_owned(), + rkey: rkey.to_owned(), + }, + } + } + ///Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set. + pub fn com_atproto_repo_import_repo( + &self, + ) -> FluentRequest<'_, request::ComAtprotoRepoImportRepoRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoRepoImportRepoRequest { + }, + } + } + ///Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow. + pub fn com_atproto_repo_list_missing_blobs( + &self, + ) -> FluentRequest<'_, request::ComAtprotoRepoListMissingBlobsRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoRepoListMissingBlobsRequest { + cursor: None, + limit: None, + }, + } + } + ///List a range of records in a repository, matching a specific collection. Does not require auth. + pub fn com_atproto_repo_list_records( + &self, + collection: &str, + repo: &str, + ) -> FluentRequest<'_, request::ComAtprotoRepoListRecordsRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoRepoListRecordsRequest { + collection: collection.to_owned(), + cursor: None, + limit: None, + repo: repo.to_owned(), + reverse: None, + rkey_end: None, + rkey_start: None, + }, + } + } + ///Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS. + pub fn com_atproto_repo_put_record( + &self, + args: request::ComAtprotoRepoPutRecordRequired, + ) -> FluentRequest<'_, request::ComAtprotoRepoPutRecordRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoRepoPutRecordRequest { + collection: args.collection.to_owned(), + record: args.record, + repo: args.repo.to_owned(), + rkey: args.rkey.to_owned(), + swap_commit: None, + swap_record: None, + validate: None, + }, + } + } + ///Simple rebase of repo that deletes history + pub fn com_atproto_repo_rebase_repo( + &self, + repo: &str, + ) -> FluentRequest<'_, request::ComAtprotoRepoRebaseRepoRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoRepoRebaseRepoRequest { + repo: repo.to_owned(), + swap_commit: None, + }, + } + } + ///Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS. + pub fn com_atproto_repo_upload_blob( + &self, + ) -> FluentRequest<'_, request::ComAtprotoRepoUploadBlobRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoRepoUploadBlobRequest { + }, + } + } + ///Activates a currently deactivated account. Used to finalize account migration after the account's repo is imported and identity is setup. + pub fn com_atproto_server_activate_account( + &self, + ) -> FluentRequest<'_, request::ComAtprotoServerActivateAccountRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerActivateAccountRequest { + }, + } + } + ///Returns the status of an account, especially as pertaining to import or recovery. Can be called many times over the course of an account migration. Requires auth and can only be called pertaining to oneself. + pub fn com_atproto_server_check_account_status( + &self, + ) -> FluentRequest<'_, request::ComAtprotoServerCheckAccountStatusRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerCheckAccountStatusRequest { + }, + } + } + ///Confirm an email using a token from com.atproto.server.requestEmailConfirmation. + pub fn com_atproto_server_confirm_email( + &self, + email: &str, + token: &str, + ) -> FluentRequest<'_, request::ComAtprotoServerConfirmEmailRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerConfirmEmailRequest { + email: email.to_owned(), + token: token.to_owned(), + }, + } + } + ///Create an account. Implemented by PDS. + pub fn com_atproto_server_create_account( + &self, + handle: &str, + ) -> FluentRequest<'_, request::ComAtprotoServerCreateAccountRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerCreateAccountRequest { + did: None, + email: None, + handle: handle.to_owned(), + invite_code: None, + password: None, + plc_op: None, + recovery_key: None, + verification_code: None, + verification_phone: None, + }, + } + } + ///Create an App Password. + pub fn com_atproto_server_create_app_password( + &self, + name: &str, + ) -> FluentRequest<'_, request::ComAtprotoServerCreateAppPasswordRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerCreateAppPasswordRequest { + name: name.to_owned(), + }, + } + } + ///Create an invite code. + pub fn com_atproto_server_create_invite_code( + &self, + use_count: i64, + ) -> FluentRequest<'_, request::ComAtprotoServerCreateInviteCodeRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerCreateInviteCodeRequest { + for_account: None, + use_count, + }, + } + } + ///Create invite codes. + pub fn com_atproto_server_create_invite_codes( + &self, + code_count: i64, + use_count: i64, + ) -> FluentRequest<'_, request::ComAtprotoServerCreateInviteCodesRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerCreateInviteCodesRequest { + code_count, + for_accounts: None, + use_count, + }, + } + } + ///Create an authentication session. + pub fn com_atproto_server_create_session( + &self, + identifier: &str, + password: &str, + ) -> FluentRequest<'_, request::ComAtprotoServerCreateSessionRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerCreateSessionRequest { + identifier: identifier.to_owned(), + password: password.to_owned(), + }, + } + } + ///Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host. + pub fn com_atproto_server_deactivate_account( + &self, + ) -> FluentRequest<'_, request::ComAtprotoServerDeactivateAccountRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerDeactivateAccountRequest { + delete_after: None, + }, + } + } + ///Delete an actor's account with a token and password. Can only be called after requesting a deletion token. Requires auth. + pub fn com_atproto_server_delete_account( + &self, + did: &str, + password: &str, + token: &str, + ) -> FluentRequest<'_, request::ComAtprotoServerDeleteAccountRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerDeleteAccountRequest { + did: did.to_owned(), + password: password.to_owned(), + token: token.to_owned(), + }, + } + } + ///Delete the current session. Requires auth. + pub fn com_atproto_server_delete_session( + &self, + ) -> FluentRequest<'_, request::ComAtprotoServerDeleteSessionRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerDeleteSessionRequest { + }, + } + } + ///Describes the server's account creation requirements and capabilities. Implemented by PDS. + pub fn com_atproto_server_describe_server( + &self, + ) -> FluentRequest<'_, request::ComAtprotoServerDescribeServerRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerDescribeServerRequest { + }, + } + } + ///Get all invite codes for the current account. Requires auth. + pub fn com_atproto_server_get_account_invite_codes( + &self, + ) -> FluentRequest<'_, request::ComAtprotoServerGetAccountInviteCodesRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerGetAccountInviteCodesRequest { + create_available: None, + include_used: None, + }, + } + } + ///Get a signed token on behalf of the requesting DID for the requested service. + pub fn com_atproto_server_get_service_auth( + &self, + aud: &str, + ) -> FluentRequest<'_, request::ComAtprotoServerGetServiceAuthRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerGetServiceAuthRequest { + aud: aud.to_owned(), + }, + } + } + ///Get information about the current auth session. Requires auth. + pub fn com_atproto_server_get_session( + &self, + ) -> FluentRequest<'_, request::ComAtprotoServerGetSessionRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerGetSessionRequest { + }, + } + } + ///List all App Passwords. + pub fn com_atproto_server_list_app_passwords( + &self, + ) -> FluentRequest<'_, request::ComAtprotoServerListAppPasswordsRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerListAppPasswordsRequest { + }, + } + } + ///Refresh an authentication session. Requires auth using the 'refreshJwt' (not the 'accessJwt'). + pub fn com_atproto_server_refresh_session( + &self, + ) -> FluentRequest<'_, request::ComAtprotoServerRefreshSessionRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerRefreshSessionRequest { + }, + } + } + ///Initiate a user account deletion via email. + pub fn com_atproto_server_request_account_delete( + &self, + ) -> FluentRequest<'_, request::ComAtprotoServerRequestAccountDeleteRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerRequestAccountDeleteRequest { + }, + } + } + ///Request an email with a code to confirm ownership of email. + pub fn com_atproto_server_request_email_confirmation( + &self, + ) -> FluentRequest<'_, request::ComAtprotoServerRequestEmailConfirmationRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerRequestEmailConfirmationRequest { + }, + } + } + ///Request a token in order to update email. + pub fn com_atproto_server_request_email_update( + &self, + ) -> FluentRequest<'_, request::ComAtprotoServerRequestEmailUpdateRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerRequestEmailUpdateRequest { + }, + } + } + ///Initiate a user account password reset via email. + pub fn com_atproto_server_request_password_reset( + &self, + email: &str, + ) -> FluentRequest<'_, request::ComAtprotoServerRequestPasswordResetRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerRequestPasswordResetRequest { + email: email.to_owned(), + }, + } + } + ///Reserve a repo signing key, for use with account creation. Necessary so that a DID PLC update operation can be constructed during an account migraiton. Public and does not require auth; implemented by PDS. NOTE: this endpoint may change when full account migration is implemented. + pub fn com_atproto_server_reserve_signing_key( + &self, + ) -> FluentRequest<'_, request::ComAtprotoServerReserveSigningKeyRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerReserveSigningKeyRequest { + did: None, + }, + } + } + ///Reset a user account password using a token. + pub fn com_atproto_server_reset_password( + &self, + password: &str, + token: &str, + ) -> FluentRequest<'_, request::ComAtprotoServerResetPasswordRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerResetPasswordRequest { + password: password.to_owned(), + token: token.to_owned(), + }, + } + } + ///Revoke an App Password by name. + pub fn com_atproto_server_revoke_app_password( + &self, + name: &str, + ) -> FluentRequest<'_, request::ComAtprotoServerRevokeAppPasswordRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerRevokeAppPasswordRequest { + name: name.to_owned(), + }, + } + } + ///Update an account's email. + pub fn com_atproto_server_update_email( + &self, + email: &str, + ) -> FluentRequest<'_, request::ComAtprotoServerUpdateEmailRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoServerUpdateEmailRequest { + email: email.to_owned(), + token: None, + }, + } + } + ///Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS. + pub fn com_atproto_sync_get_blob( + &self, + cid: &str, + did: &str, + ) -> FluentRequest<'_, request::ComAtprotoSyncGetBlobRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoSyncGetBlobRequest { + cid: cid.to_owned(), + did: did.to_owned(), + }, + } + } + ///Get data blocks from a given repo, by CID. For example, intermediate MST nodes, or records. Does not require auth; implemented by PDS. + pub fn com_atproto_sync_get_blocks( + &self, + cids: &[&str], + did: &str, + ) -> FluentRequest<'_, request::ComAtprotoSyncGetBlocksRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoSyncGetBlocksRequest { + cids: cids.iter().map(|&x| x.to_owned()).collect(), + did: did.to_owned(), + }, + } + } + ///DEPRECATED - please use com.atproto.sync.getRepo instead + pub fn com_atproto_sync_get_checkout( + &self, + did: &str, + ) -> FluentRequest<'_, request::ComAtprotoSyncGetCheckoutRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoSyncGetCheckoutRequest { + did: did.to_owned(), + }, + } + } + ///Gets the path of repo commits + pub fn com_atproto_sync_get_commit_path( + &self, + did: &str, + ) -> FluentRequest<'_, request::ComAtprotoSyncGetCommitPathRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoSyncGetCommitPathRequest { + did: did.to_owned(), + earliest: None, + latest: None, + }, + } + } + ///DEPRECATED - please use com.atproto.sync.getLatestCommit instead + pub fn com_atproto_sync_get_head( + &self, + did: &str, + ) -> FluentRequest<'_, request::ComAtprotoSyncGetHeadRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoSyncGetHeadRequest { + did: did.to_owned(), + }, + } + } + ///Get the current commit CID & revision of the specified repo. Does not require auth. + pub fn com_atproto_sync_get_latest_commit( + &self, + did: &str, + ) -> FluentRequest<'_, request::ComAtprotoSyncGetLatestCommitRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoSyncGetLatestCommitRequest { + did: did.to_owned(), + }, + } + } + ///Get data blocks needed to prove the existence or non-existence of record in the current version of repo. Does not require auth. + pub fn com_atproto_sync_get_record( + &self, + collection: &str, + did: &str, + rkey: &str, + ) -> FluentRequest<'_, request::ComAtprotoSyncGetRecordRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoSyncGetRecordRequest { + collection: collection.to_owned(), + commit: None, + did: did.to_owned(), + rkey: rkey.to_owned(), + }, + } + } + ///Download a repository export as CAR file. Optionally only a 'diff' since a previous revision. Does not require auth; implemented by PDS. + pub fn com_atproto_sync_get_repo( + &self, + did: &str, + ) -> FluentRequest<'_, request::ComAtprotoSyncGetRepoRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoSyncGetRepoRequest { + did: did.to_owned(), + since: None, + }, + } + } + ///List blob CIDso for an account, since some repo revision. Does not require auth; implemented by PDS. + pub fn com_atproto_sync_list_blobs( + &self, + did: &str, + ) -> FluentRequest<'_, request::ComAtprotoSyncListBlobsRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoSyncListBlobsRequest { + cursor: None, + did: did.to_owned(), + limit: None, + since: None, + }, + } + } + ///Enumerates all the DID, rev, and commit CID for all repos hosted by this service. Does not require auth; implemented by PDS and Relay. + pub fn com_atproto_sync_list_repos( + &self, + ) -> FluentRequest<'_, request::ComAtprotoSyncListReposRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoSyncListReposRequest { + cursor: None, + limit: None, + }, + } + } + ///Check accounts location in signup queue. + pub fn com_atproto_temp_check_signup_queue( + &self, + ) -> FluentRequest<'_, request::ComAtprotoTempCheckSignupQueueRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoTempCheckSignupQueueRequest { + }, + } + } + ///Request a verification code to be sent to the supplied phone number + pub fn com_atproto_temp_request_phone_verification( + &self, + phone_number: &str, + ) -> FluentRequest<'_, request::ComAtprotoTempRequestPhoneVerificationRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoTempRequestPhoneVerificationRequest { + phone_number: phone_number.to_owned(), + }, + } + } + ///Upgrade a repo to v3 + pub fn com_atproto_temp_upgrade_repo_version( + &self, + did: &str, + ) -> FluentRequest<'_, request::ComAtprotoTempUpgradeRepoVersionRequest> { + FluentRequest { + client: self, + params: request::ComAtprotoTempUpgradeRepoVersionRequest { + did: did.to_owned(), + force: None, + }, + } + } + ///Administrative action to create a new, re-usable communication (email for now) template. + pub fn tools_ozone_communication_create_template( + &self, + content_markdown: &str, + name: &str, + subject: &str, + ) -> FluentRequest<'_, request::ToolsOzoneCommunicationCreateTemplateRequest> { + FluentRequest { + client: self, + params: request::ToolsOzoneCommunicationCreateTemplateRequest { + content_markdown: content_markdown.to_owned(), + created_by: None, + name: name.to_owned(), + subject: subject.to_owned(), + }, + } + } + ///Delete a communication template. + pub fn tools_ozone_communication_delete_template( + &self, + id: &str, + ) -> FluentRequest<'_, request::ToolsOzoneCommunicationDeleteTemplateRequest> { + FluentRequest { + client: self, + params: request::ToolsOzoneCommunicationDeleteTemplateRequest { + id: id.to_owned(), + }, + } + } + ///Get list of all communication templates. + pub fn tools_ozone_communication_list_templates( + &self, + ) -> FluentRequest<'_, request::ToolsOzoneCommunicationListTemplatesRequest> { + FluentRequest { + client: self, + params: request::ToolsOzoneCommunicationListTemplatesRequest { + }, + } + } + ///Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only. + pub fn tools_ozone_communication_update_template( + &self, + id: &str, + ) -> FluentRequest<'_, request::ToolsOzoneCommunicationUpdateTemplateRequest> { + FluentRequest { + client: self, + params: request::ToolsOzoneCommunicationUpdateTemplateRequest { + content_markdown: None, + disabled: None, + id: id.to_owned(), + name: None, + subject: None, + updated_by: None, + }, + } + } + ///Take a moderation action on an actor. + pub fn tools_ozone_moderation_emit_event( + &self, + created_by: &str, + event: serde_json::Value, + subject: serde_json::Value, + ) -> FluentRequest<'_, request::ToolsOzoneModerationEmitEventRequest> { + FluentRequest { + client: self, + params: request::ToolsOzoneModerationEmitEventRequest { + created_by: created_by.to_owned(), + event, + subject, + subject_blob_cids: None, + }, + } + } + ///Get details about a moderation event. + pub fn tools_ozone_moderation_get_event( + &self, + id: i64, + ) -> FluentRequest<'_, request::ToolsOzoneModerationGetEventRequest> { + FluentRequest { + client: self, + params: request::ToolsOzoneModerationGetEventRequest { + id, + }, + } + } + ///Get details about a record. + pub fn tools_ozone_moderation_get_record( + &self, + uri: &str, + ) -> FluentRequest<'_, request::ToolsOzoneModerationGetRecordRequest> { + FluentRequest { + client: self, + params: request::ToolsOzoneModerationGetRecordRequest { + cid: None, + uri: uri.to_owned(), + }, + } + } + ///Get details about a repository. + pub fn tools_ozone_moderation_get_repo( + &self, + did: &str, + ) -> FluentRequest<'_, request::ToolsOzoneModerationGetRepoRequest> { + FluentRequest { + client: self, + params: request::ToolsOzoneModerationGetRepoRequest { + did: did.to_owned(), + }, + } + } + ///List moderation events related to a subject. + pub fn tools_ozone_moderation_query_events( + &self, + ) -> FluentRequest<'_, request::ToolsOzoneModerationQueryEventsRequest> { + FluentRequest { + client: self, + params: request::ToolsOzoneModerationQueryEventsRequest { + added_labels: None, + added_tags: None, + comment: None, + created_after: None, + created_before: None, + created_by: None, + cursor: None, + has_comment: None, + include_all_user_records: None, + limit: None, + removed_labels: None, + removed_tags: None, + report_types: None, + sort_direction: None, + subject: None, + types: None, + }, + } + } + ///View moderation statuses of subjects (record or repo). + pub fn tools_ozone_moderation_query_statuses( + &self, + ) -> FluentRequest<'_, request::ToolsOzoneModerationQueryStatusesRequest> { + FluentRequest { + client: self, + params: request::ToolsOzoneModerationQueryStatusesRequest { + appealed: None, + comment: None, + cursor: None, + exclude_tags: None, + ignore_subjects: None, + include_muted: None, + last_reviewed_by: None, + limit: None, + reported_after: None, + reported_before: None, + review_state: None, + reviewed_after: None, + reviewed_before: None, + sort_direction: None, + sort_field: None, + subject: None, + tags: None, + takendown: None, + }, + } + } + ///Find repositories based on a search term. + pub fn tools_ozone_moderation_search_repos( + &self, + ) -> FluentRequest<'_, request::ToolsOzoneModerationSearchReposRequest> { + FluentRequest { + client: self, + params: request::ToolsOzoneModerationSearchReposRequest { + cursor: None, + limit: None, + q: None, + term: None, + }, + } + } +} diff --git a/src/model.rs b/src/model.rs new file mode 100644 index 0000000..5f63056 --- /dev/null +++ b/src/model.rs @@ -0,0 +1,236 @@ + + +pub use app_bsky_actor_defs_preferences::*; +pub use app_bsky_actor_defs_profile_associated::*; +pub use app_bsky_actor_defs_profile_view::*; +pub use app_bsky_actor_defs_profile_view_basic::*; +pub use app_bsky_actor_defs_profile_view_detailed::*; +pub use app_bsky_actor_defs_viewer_state::*; +pub use app_bsky_embed_images_aspect_ratio::*; +pub use app_bsky_feed_defs_feed_view_post::*; +pub use app_bsky_feed_defs_generator_view::*; +pub use app_bsky_feed_defs_generator_viewer_state::*; +pub use app_bsky_feed_defs_post_view::*; +pub use app_bsky_feed_defs_reply_ref::*; +pub use app_bsky_feed_defs_threadgate_view::*; +pub use app_bsky_feed_defs_viewer_state::*; +pub use app_bsky_feed_get_likes_like::*; +pub use app_bsky_feed_post_text_slice::*; +pub use app_bsky_graph_defs_list_item_view::*; +pub use app_bsky_graph_defs_list_purpose::*; +pub use app_bsky_graph_defs_list_view::*; +pub use app_bsky_graph_defs_list_view_basic::*; +pub use app_bsky_graph_defs_list_viewer_state::*; +pub use app_bsky_notification_list_notifications_notification::*; +pub use app_bsky_richtext_facet::*; +pub use app_bsky_richtext_facet_byte_slice::*; +pub use app_bsky_unspecced_get_tagged_suggestions_suggestion::*; +pub use app_bsky_actor_get_preferences_response::*; +pub use app_bsky_actor_get_profiles_response::*; +pub use app_bsky_actor_get_suggestions_response::*; +pub use app_bsky_actor_search_actors_response::*; +pub use app_bsky_actor_search_actors_typeahead_response::*; +pub use app_bsky_feed_get_actor_feeds_response::*; +pub use app_bsky_feed_get_actor_likes_response::*; +pub use app_bsky_feed_get_author_feed_response::*; +pub use app_bsky_feed_get_feed_generator_response::*; +pub use app_bsky_feed_get_feed_generators_response::*; +pub use app_bsky_feed_get_feed_response::*; +pub use app_bsky_feed_get_likes_response::*; +pub use app_bsky_feed_get_list_feed_response::*; +pub use app_bsky_feed_get_post_thread_response::*; +pub use app_bsky_feed_get_posts_response::*; +pub use app_bsky_feed_get_reposted_by_response::*; +pub use app_bsky_feed_get_suggested_feeds_response::*; +pub use app_bsky_feed_get_timeline_response::*; +pub use app_bsky_feed_search_posts_response::*; +pub use app_bsky_graph_get_blocks_response::*; +pub use app_bsky_graph_get_followers_response::*; +pub use app_bsky_graph_get_follows_response::*; +pub use app_bsky_graph_get_list_blocks_response::*; +pub use app_bsky_graph_get_list_mutes_response::*; +pub use app_bsky_graph_get_list_response::*; +pub use app_bsky_graph_get_lists_response::*; +pub use app_bsky_graph_get_mutes_response::*; +pub use app_bsky_graph_get_suggested_follows_by_actor_response::*; +pub use app_bsky_labeler_get_services_response::*; +pub use app_bsky_notification_get_unread_count_response::*; +pub use app_bsky_notification_list_notifications_response::*; +pub use app_bsky_unspecced_get_popular_feed_generators_response::*; +pub use app_bsky_unspecced_get_popular_response::*; +pub use app_bsky_unspecced_get_tagged_suggestions_response::*; +pub use com_atproto_label_defs_label::*; +pub use com_atproto_label_defs_label_value_definition::*; +pub use com_atproto_label_defs_label_value_definition_strings::*; +pub use com_atproto_moderation_defs_reason_type::*; +pub use com_atproto_repo_list_missing_blobs_record_blob::*; +pub use com_atproto_repo_list_records_record::*; +pub use com_atproto_repo_strong_ref::*; +pub use com_atproto_server_create_app_password_app_password::*; +pub use com_atproto_server_create_invite_codes_account_codes::*; +pub use com_atproto_server_defs_invite_code::*; +pub use com_atproto_server_defs_invite_code_use::*; +pub use com_atproto_server_describe_server_links::*; +pub use com_atproto_server_list_app_passwords_app_password::*; +pub use com_atproto_sync_list_repos_repo::*; +pub use com_atproto_identity_get_recommended_did_credentials_response::*; +pub use com_atproto_identity_resolve_handle_response::*; +pub use com_atproto_identity_sign_plc_operation_response::*; +pub use com_atproto_moderation_create_report_response::*; +pub use com_atproto_repo_create_record_response::*; +pub use com_atproto_repo_describe_repo_response::*; +pub use com_atproto_repo_get_record_response::*; +pub use com_atproto_repo_list_missing_blobs_response::*; +pub use com_atproto_repo_list_records_response::*; +pub use com_atproto_repo_put_record_response::*; +pub use com_atproto_repo_upload_blob_response::*; +pub use com_atproto_server_check_account_status_response::*; +pub use com_atproto_server_create_account_response::*; +pub use com_atproto_server_create_invite_code_response::*; +pub use com_atproto_server_create_invite_codes_response::*; +pub use com_atproto_server_create_session_response::*; +pub use com_atproto_server_describe_server_response::*; +pub use com_atproto_server_get_account_invite_codes_response::*; +pub use com_atproto_server_get_service_auth_response::*; +pub use com_atproto_server_get_session_response::*; +pub use com_atproto_server_list_app_passwords_response::*; +pub use com_atproto_server_refresh_session_response::*; +pub use com_atproto_server_request_email_update_response::*; +pub use com_atproto_server_reserve_signing_key_response::*; +pub use com_atproto_sync_get_commit_path_response::*; +pub use com_atproto_sync_get_head_response::*; +pub use com_atproto_sync_get_latest_commit_response::*; +pub use com_atproto_sync_list_blobs_response::*; +pub use com_atproto_sync_list_repos_response::*; +pub use com_atproto_temp_check_signup_queue_response::*; +pub use tools_ozone_communication_defs_template_view::*; +pub use tools_ozone_moderation_defs_blob_view::*; +pub use tools_ozone_moderation_defs_mod_event_view::*; +pub use tools_ozone_moderation_defs_mod_event_view_detail::*; +pub use tools_ozone_moderation_defs_moderation::*; +pub use tools_ozone_moderation_defs_moderation_detail::*; +pub use tools_ozone_moderation_defs_record_view_detail::*; +pub use tools_ozone_moderation_defs_repo_view::*; +pub use tools_ozone_moderation_defs_repo_view_detail::*; +pub use tools_ozone_moderation_defs_subject_status_view::*; +pub use tools_ozone_communication_list_templates_response::*; +pub use tools_ozone_moderation_query_events_response::*; +pub use tools_ozone_moderation_query_statuses_response::*; +pub use tools_ozone_moderation_search_repos_response::*; +mod app_bsky_actor_defs_preferences; +mod app_bsky_actor_defs_profile_associated; +mod app_bsky_actor_defs_profile_view; +mod app_bsky_actor_defs_profile_view_basic; +mod app_bsky_actor_defs_profile_view_detailed; +mod app_bsky_actor_defs_viewer_state; +mod app_bsky_embed_images_aspect_ratio; +mod app_bsky_feed_defs_feed_view_post; +mod app_bsky_feed_defs_generator_view; +mod app_bsky_feed_defs_generator_viewer_state; +mod app_bsky_feed_defs_post_view; +mod app_bsky_feed_defs_reply_ref; +mod app_bsky_feed_defs_threadgate_view; +mod app_bsky_feed_defs_viewer_state; +mod app_bsky_feed_get_likes_like; +mod app_bsky_feed_post_text_slice; +mod app_bsky_graph_defs_list_item_view; +mod app_bsky_graph_defs_list_purpose; +mod app_bsky_graph_defs_list_view; +mod app_bsky_graph_defs_list_view_basic; +mod app_bsky_graph_defs_list_viewer_state; +mod app_bsky_notification_list_notifications_notification; +mod app_bsky_richtext_facet; +mod app_bsky_richtext_facet_byte_slice; +mod app_bsky_unspecced_get_tagged_suggestions_suggestion; +mod app_bsky_actor_get_preferences_response; +mod app_bsky_actor_get_profiles_response; +mod app_bsky_actor_get_suggestions_response; +mod app_bsky_actor_search_actors_response; +mod app_bsky_actor_search_actors_typeahead_response; +mod app_bsky_feed_get_actor_feeds_response; +mod app_bsky_feed_get_actor_likes_response; +mod app_bsky_feed_get_author_feed_response; +mod app_bsky_feed_get_feed_generator_response; +mod app_bsky_feed_get_feed_generators_response; +mod app_bsky_feed_get_feed_response; +mod app_bsky_feed_get_likes_response; +mod app_bsky_feed_get_list_feed_response; +mod app_bsky_feed_get_post_thread_response; +mod app_bsky_feed_get_posts_response; +mod app_bsky_feed_get_reposted_by_response; +mod app_bsky_feed_get_suggested_feeds_response; +mod app_bsky_feed_get_timeline_response; +mod app_bsky_feed_search_posts_response; +mod app_bsky_graph_get_blocks_response; +mod app_bsky_graph_get_followers_response; +mod app_bsky_graph_get_follows_response; +mod app_bsky_graph_get_list_blocks_response; +mod app_bsky_graph_get_list_mutes_response; +mod app_bsky_graph_get_list_response; +mod app_bsky_graph_get_lists_response; +mod app_bsky_graph_get_mutes_response; +mod app_bsky_graph_get_suggested_follows_by_actor_response; +mod app_bsky_labeler_get_services_response; +mod app_bsky_notification_get_unread_count_response; +mod app_bsky_notification_list_notifications_response; +mod app_bsky_unspecced_get_popular_feed_generators_response; +mod app_bsky_unspecced_get_popular_response; +mod app_bsky_unspecced_get_tagged_suggestions_response; +mod com_atproto_label_defs_label; +mod com_atproto_label_defs_label_value_definition; +mod com_atproto_label_defs_label_value_definition_strings; +mod com_atproto_moderation_defs_reason_type; +mod com_atproto_repo_list_missing_blobs_record_blob; +mod com_atproto_repo_list_records_record; +mod com_atproto_repo_strong_ref; +mod com_atproto_server_create_app_password_app_password; +mod com_atproto_server_create_invite_codes_account_codes; +mod com_atproto_server_defs_invite_code; +mod com_atproto_server_defs_invite_code_use; +mod com_atproto_server_describe_server_links; +mod com_atproto_server_list_app_passwords_app_password; +mod com_atproto_sync_list_repos_repo; +mod com_atproto_identity_get_recommended_did_credentials_response; +mod com_atproto_identity_resolve_handle_response; +mod com_atproto_identity_sign_plc_operation_response; +mod com_atproto_moderation_create_report_response; +mod com_atproto_repo_create_record_response; +mod com_atproto_repo_describe_repo_response; +mod com_atproto_repo_get_record_response; +mod com_atproto_repo_list_missing_blobs_response; +mod com_atproto_repo_list_records_response; +mod com_atproto_repo_put_record_response; +mod com_atproto_repo_upload_blob_response; +mod com_atproto_server_check_account_status_response; +mod com_atproto_server_create_account_response; +mod com_atproto_server_create_invite_code_response; +mod com_atproto_server_create_invite_codes_response; +mod com_atproto_server_create_session_response; +mod com_atproto_server_describe_server_response; +mod com_atproto_server_get_account_invite_codes_response; +mod com_atproto_server_get_service_auth_response; +mod com_atproto_server_get_session_response; +mod com_atproto_server_list_app_passwords_response; +mod com_atproto_server_refresh_session_response; +mod com_atproto_server_request_email_update_response; +mod com_atproto_server_reserve_signing_key_response; +mod com_atproto_sync_get_commit_path_response; +mod com_atproto_sync_get_head_response; +mod com_atproto_sync_get_latest_commit_response; +mod com_atproto_sync_list_blobs_response; +mod com_atproto_sync_list_repos_response; +mod com_atproto_temp_check_signup_queue_response; +mod tools_ozone_communication_defs_template_view; +mod tools_ozone_moderation_defs_blob_view; +mod tools_ozone_moderation_defs_mod_event_view; +mod tools_ozone_moderation_defs_mod_event_view_detail; +mod tools_ozone_moderation_defs_moderation; +mod tools_ozone_moderation_defs_moderation_detail; +mod tools_ozone_moderation_defs_record_view_detail; +mod tools_ozone_moderation_defs_repo_view; +mod tools_ozone_moderation_defs_repo_view_detail; +mod tools_ozone_moderation_defs_subject_status_view; +mod tools_ozone_communication_list_templates_response; +mod tools_ozone_moderation_query_events_response; +mod tools_ozone_moderation_query_statuses_response; +mod tools_ozone_moderation_search_repos_response; diff --git a/src/model/app_bsky_actor_defs_preferences.rs b/src/model/app_bsky_actor_defs_preferences.rs new file mode 100644 index 0000000..ce0794a --- /dev/null +++ b/src/model/app_bsky_actor_defs_preferences.rs @@ -0,0 +1,3 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyActorDefsPreferences(pub Vec); \ No newline at end of file diff --git a/src/model/app_bsky_actor_defs_profile_associated.rs b/src/model/app_bsky_actor_defs_profile_associated.rs new file mode 100644 index 0000000..0887fd6 --- /dev/null +++ b/src/model/app_bsky_actor_defs_profile_associated.rs @@ -0,0 +1,15 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyActorDefsProfileAssociated { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub feedgens: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub labeler: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub lists: Option, +} +impl std::fmt::Display for AppBskyActorDefsProfileAssociated { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_actor_defs_profile_view.rs b/src/model/app_bsky_actor_defs_profile_view.rs new file mode 100644 index 0000000..97add98 --- /dev/null +++ b/src/model/app_bsky_actor_defs_profile_view.rs @@ -0,0 +1,27 @@ +use serde::{Serialize, Deserialize}; +use super::{AppBskyActorDefsViewerState, ComAtprotoLabelDefsLabel}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyActorDefsProfileView { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub avatar: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub description: Option, + pub did: String, + #[serde(rename = "displayName")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub display_name: Option, + pub handle: String, + #[serde(rename = "indexedAt")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub indexed_at: Option>, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub labels: Option>, + ///Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub viewer: Option, +} +impl std::fmt::Display for AppBskyActorDefsProfileView { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_actor_defs_profile_view_basic.rs b/src/model/app_bsky_actor_defs_profile_view_basic.rs new file mode 100644 index 0000000..04755f4 --- /dev/null +++ b/src/model/app_bsky_actor_defs_profile_view_basic.rs @@ -0,0 +1,22 @@ +use serde::{Serialize, Deserialize}; +use super::{AppBskyActorDefsViewerState, ComAtprotoLabelDefsLabel}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyActorDefsProfileViewBasic { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub avatar: Option, + pub did: String, + #[serde(rename = "displayName")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub display_name: Option, + pub handle: String, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub labels: Option>, + ///Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub viewer: Option, +} +impl std::fmt::Display for AppBskyActorDefsProfileViewBasic { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_actor_defs_profile_view_detailed.rs b/src/model/app_bsky_actor_defs_profile_view_detailed.rs new file mode 100644 index 0000000..be07845 --- /dev/null +++ b/src/model/app_bsky_actor_defs_profile_view_detailed.rs @@ -0,0 +1,43 @@ +use serde::{Serialize, Deserialize}; +use super::{ + AppBskyActorDefsProfileAssociated, AppBskyActorDefsViewerState, + ComAtprotoLabelDefsLabel, +}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyActorDefsProfileViewDetailed { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub associated: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub avatar: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub banner: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub description: Option, + pub did: String, + #[serde(rename = "displayName")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub display_name: Option, + #[serde(rename = "followersCount")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub followers_count: Option, + #[serde(rename = "followsCount")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub follows_count: Option, + pub handle: String, + #[serde(rename = "indexedAt")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub indexed_at: Option>, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub labels: Option>, + #[serde(rename = "postsCount")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub posts_count: Option, + ///Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub viewer: Option, +} +impl std::fmt::Display for AppBskyActorDefsProfileViewDetailed { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_actor_defs_viewer_state.rs b/src/model/app_bsky_actor_defs_viewer_state.rs new file mode 100644 index 0000000..b686ebb --- /dev/null +++ b/src/model/app_bsky_actor_defs_viewer_state.rs @@ -0,0 +1,29 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyGraphDefsListViewBasic; +///Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests. +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyActorDefsViewerState { + #[serde(rename = "blockedBy")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub blocked_by: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub blocking: Option, + #[serde(rename = "blockingByList")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub blocking_by_list: Option, + #[serde(rename = "followedBy")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub followed_by: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub following: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub muted: Option, + #[serde(rename = "mutedByList")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub muted_by_list: Option, +} +impl std::fmt::Display for AppBskyActorDefsViewerState { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_actor_get_preferences_response.rs b/src/model/app_bsky_actor_get_preferences_response.rs new file mode 100644 index 0000000..fe2ef71 --- /dev/null +++ b/src/model/app_bsky_actor_get_preferences_response.rs @@ -0,0 +1,11 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyActorDefsPreferences; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyActorGetPreferencesResponse { + pub preferences: AppBskyActorDefsPreferences, +} +impl std::fmt::Display for AppBskyActorGetPreferencesResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_actor_get_profiles_response.rs b/src/model/app_bsky_actor_get_profiles_response.rs new file mode 100644 index 0000000..27115db --- /dev/null +++ b/src/model/app_bsky_actor_get_profiles_response.rs @@ -0,0 +1,12 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyActorDefsProfileViewDetailed; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyActorGetProfilesResponse { + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub profiles: Vec, +} +impl std::fmt::Display for AppBskyActorGetProfilesResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_actor_get_suggestions_response.rs b/src/model/app_bsky_actor_get_suggestions_response.rs new file mode 100644 index 0000000..d601437 --- /dev/null +++ b/src/model/app_bsky_actor_get_suggestions_response.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyActorDefsProfileView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyActorGetSuggestionsResponse { + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub actors: Vec, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, +} +impl std::fmt::Display for AppBskyActorGetSuggestionsResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_actor_search_actors_response.rs b/src/model/app_bsky_actor_search_actors_response.rs new file mode 100644 index 0000000..ca6584a --- /dev/null +++ b/src/model/app_bsky_actor_search_actors_response.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyActorDefsProfileView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyActorSearchActorsResponse { + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub actors: Vec, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, +} +impl std::fmt::Display for AppBskyActorSearchActorsResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_actor_search_actors_typeahead_response.rs b/src/model/app_bsky_actor_search_actors_typeahead_response.rs new file mode 100644 index 0000000..f930b10 --- /dev/null +++ b/src/model/app_bsky_actor_search_actors_typeahead_response.rs @@ -0,0 +1,12 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyActorDefsProfileViewBasic; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyActorSearchActorsTypeaheadResponse { + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub actors: Vec, +} +impl std::fmt::Display for AppBskyActorSearchActorsTypeaheadResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_embed_images_aspect_ratio.rs b/src/model/app_bsky_embed_images_aspect_ratio.rs new file mode 100644 index 0000000..8f2ce04 --- /dev/null +++ b/src/model/app_bsky_embed_images_aspect_ratio.rs @@ -0,0 +1,12 @@ +use serde::{Serialize, Deserialize}; +///width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit. +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyEmbedImagesAspectRatio { + pub height: i64, + pub width: i64, +} +impl std::fmt::Display for AppBskyEmbedImagesAspectRatio { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_defs_feed_view_post.rs b/src/model/app_bsky_feed_defs_feed_view_post.rs new file mode 100644 index 0000000..88c70a3 --- /dev/null +++ b/src/model/app_bsky_feed_defs_feed_view_post.rs @@ -0,0 +1,15 @@ +use serde::{Serialize, Deserialize}; +use super::{AppBskyFeedDefsPostView, AppBskyFeedDefsReplyRef}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedDefsFeedViewPost { + pub post: AppBskyFeedDefsPostView, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub reason: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub reply: Option, +} +impl std::fmt::Display for AppBskyFeedDefsFeedViewPost { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_defs_generator_view.rs b/src/model/app_bsky_feed_defs_generator_view.rs new file mode 100644 index 0000000..921400e --- /dev/null +++ b/src/model/app_bsky_feed_defs_generator_view.rs @@ -0,0 +1,35 @@ +use serde::{Serialize, Deserialize}; +use super::{ + AppBskyActorDefsProfileView, AppBskyFeedDefsGeneratorViewerState, + AppBskyRichtextFacet, ComAtprotoLabelDefsLabel, +}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedDefsGeneratorView { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub avatar: Option, + pub cid: String, + pub creator: AppBskyActorDefsProfileView, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "descriptionFacets")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub description_facets: Option>, + pub did: String, + #[serde(rename = "displayName")] + pub display_name: String, + #[serde(rename = "indexedAt")] + pub indexed_at: chrono::DateTime, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub labels: Option>, + #[serde(rename = "likeCount")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub like_count: Option, + pub uri: String, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub viewer: Option, +} +impl std::fmt::Display for AppBskyFeedDefsGeneratorView { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_defs_generator_viewer_state.rs b/src/model/app_bsky_feed_defs_generator_viewer_state.rs new file mode 100644 index 0000000..5cd49a9 --- /dev/null +++ b/src/model/app_bsky_feed_defs_generator_viewer_state.rs @@ -0,0 +1,11 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedDefsGeneratorViewerState { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub like: Option, +} +impl std::fmt::Display for AppBskyFeedDefsGeneratorViewerState { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_defs_post_view.rs b/src/model/app_bsky_feed_defs_post_view.rs new file mode 100644 index 0000000..9c4abfa --- /dev/null +++ b/src/model/app_bsky_feed_defs_post_view.rs @@ -0,0 +1,38 @@ +use serde::{Serialize, Deserialize}; +use super::{ + AppBskyActorDefsProfileViewBasic, AppBskyFeedDefsThreadgateView, + AppBskyFeedDefsViewerState, ComAtprotoLabelDefsLabel, +}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedDefsPostView { + pub author: AppBskyActorDefsProfileViewBasic, + pub cid: String, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub embed: Option, + #[serde(rename = "indexedAt")] + pub indexed_at: chrono::DateTime, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub labels: Option>, + #[serde(rename = "likeCount")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub like_count: Option, + #[serde(default, skip_serializing_if = "serde_json::Value::is_null")] + pub record: serde_json::Value, + #[serde(rename = "replyCount")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub reply_count: Option, + #[serde(rename = "repostCount")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub repost_count: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub threadgate: Option, + pub uri: String, + ///Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub viewer: Option, +} +impl std::fmt::Display for AppBskyFeedDefsPostView { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_defs_reply_ref.rs b/src/model/app_bsky_feed_defs_reply_ref.rs new file mode 100644 index 0000000..75a2ade --- /dev/null +++ b/src/model/app_bsky_feed_defs_reply_ref.rs @@ -0,0 +1,13 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedDefsReplyRef { + #[serde(default, skip_serializing_if = "serde_json::Value::is_null")] + pub parent: serde_json::Value, + #[serde(default, skip_serializing_if = "serde_json::Value::is_null")] + pub root: serde_json::Value, +} +impl std::fmt::Display for AppBskyFeedDefsReplyRef { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_defs_threadgate_view.rs b/src/model/app_bsky_feed_defs_threadgate_view.rs new file mode 100644 index 0000000..ce68718 --- /dev/null +++ b/src/model/app_bsky_feed_defs_threadgate_view.rs @@ -0,0 +1,18 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyGraphDefsListViewBasic; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedDefsThreadgateView { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cid: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub lists: Option>, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub record: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub uri: Option, +} +impl std::fmt::Display for AppBskyFeedDefsThreadgateView { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_defs_viewer_state.rs b/src/model/app_bsky_feed_defs_viewer_state.rs new file mode 100644 index 0000000..1b7882e --- /dev/null +++ b/src/model/app_bsky_feed_defs_viewer_state.rs @@ -0,0 +1,17 @@ +use serde::{Serialize, Deserialize}; +///Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests. +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedDefsViewerState { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub like: Option, + #[serde(rename = "replyDisabled")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub reply_disabled: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub repost: Option, +} +impl std::fmt::Display for AppBskyFeedDefsViewerState { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_get_actor_feeds_response.rs b/src/model/app_bsky_feed_get_actor_feeds_response.rs new file mode 100644 index 0000000..115138d --- /dev/null +++ b/src/model/app_bsky_feed_get_actor_feeds_response.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyFeedDefsGeneratorView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedGetActorFeedsResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub feeds: Vec, +} +impl std::fmt::Display for AppBskyFeedGetActorFeedsResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_get_actor_likes_response.rs b/src/model/app_bsky_feed_get_actor_likes_response.rs new file mode 100644 index 0000000..f937d80 --- /dev/null +++ b/src/model/app_bsky_feed_get_actor_likes_response.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyFeedDefsFeedViewPost; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedGetActorLikesResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub feed: Vec, +} +impl std::fmt::Display for AppBskyFeedGetActorLikesResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_get_author_feed_response.rs b/src/model/app_bsky_feed_get_author_feed_response.rs new file mode 100644 index 0000000..1ecd65f --- /dev/null +++ b/src/model/app_bsky_feed_get_author_feed_response.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyFeedDefsFeedViewPost; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedGetAuthorFeedResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub feed: Vec, +} +impl std::fmt::Display for AppBskyFeedGetAuthorFeedResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_get_feed_generator_response.rs b/src/model/app_bsky_feed_get_feed_generator_response.rs new file mode 100644 index 0000000..2dd26d1 --- /dev/null +++ b/src/model/app_bsky_feed_get_feed_generator_response.rs @@ -0,0 +1,17 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyFeedDefsGeneratorView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedGetFeedGeneratorResponse { + ///Indicates whether the feed generator service has been online recently, or else seems to be inactive. + #[serde(rename = "isOnline")] + pub is_online: bool, + ///Indicates whether the feed generator service is compatible with the record declaration. + #[serde(rename = "isValid")] + pub is_valid: bool, + pub view: AppBskyFeedDefsGeneratorView, +} +impl std::fmt::Display for AppBskyFeedGetFeedGeneratorResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_get_feed_generators_response.rs b/src/model/app_bsky_feed_get_feed_generators_response.rs new file mode 100644 index 0000000..0f0d963 --- /dev/null +++ b/src/model/app_bsky_feed_get_feed_generators_response.rs @@ -0,0 +1,12 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyFeedDefsGeneratorView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedGetFeedGeneratorsResponse { + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub feeds: Vec, +} +impl std::fmt::Display for AppBskyFeedGetFeedGeneratorsResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_get_feed_response.rs b/src/model/app_bsky_feed_get_feed_response.rs new file mode 100644 index 0000000..900cd9f --- /dev/null +++ b/src/model/app_bsky_feed_get_feed_response.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyFeedDefsFeedViewPost; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedGetFeedResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub feed: Vec, +} +impl std::fmt::Display for AppBskyFeedGetFeedResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_get_likes_like.rs b/src/model/app_bsky_feed_get_likes_like.rs new file mode 100644 index 0000000..9422eb8 --- /dev/null +++ b/src/model/app_bsky_feed_get_likes_like.rs @@ -0,0 +1,15 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyActorDefsProfileView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedGetLikesLike { + pub actor: AppBskyActorDefsProfileView, + #[serde(rename = "createdAt")] + pub created_at: chrono::DateTime, + #[serde(rename = "indexedAt")] + pub indexed_at: chrono::DateTime, +} +impl std::fmt::Display for AppBskyFeedGetLikesLike { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_get_likes_response.rs b/src/model/app_bsky_feed_get_likes_response.rs new file mode 100644 index 0000000..3f75a3b --- /dev/null +++ b/src/model/app_bsky_feed_get_likes_response.rs @@ -0,0 +1,17 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyFeedGetLikesLike; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedGetLikesResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cid: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub likes: Vec, + pub uri: String, +} +impl std::fmt::Display for AppBskyFeedGetLikesResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_get_list_feed_response.rs b/src/model/app_bsky_feed_get_list_feed_response.rs new file mode 100644 index 0000000..70c8f91 --- /dev/null +++ b/src/model/app_bsky_feed_get_list_feed_response.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyFeedDefsFeedViewPost; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedGetListFeedResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub feed: Vec, +} +impl std::fmt::Display for AppBskyFeedGetListFeedResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_get_post_thread_response.rs b/src/model/app_bsky_feed_get_post_thread_response.rs new file mode 100644 index 0000000..bfedc9c --- /dev/null +++ b/src/model/app_bsky_feed_get_post_thread_response.rs @@ -0,0 +1,11 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedGetPostThreadResponse { + #[serde(default, skip_serializing_if = "serde_json::Value::is_null")] + pub thread: serde_json::Value, +} +impl std::fmt::Display for AppBskyFeedGetPostThreadResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_get_posts_response.rs b/src/model/app_bsky_feed_get_posts_response.rs new file mode 100644 index 0000000..eb39dee --- /dev/null +++ b/src/model/app_bsky_feed_get_posts_response.rs @@ -0,0 +1,12 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyFeedDefsPostView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedGetPostsResponse { + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub posts: Vec, +} +impl std::fmt::Display for AppBskyFeedGetPostsResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_get_reposted_by_response.rs b/src/model/app_bsky_feed_get_reposted_by_response.rs new file mode 100644 index 0000000..1ebdfce --- /dev/null +++ b/src/model/app_bsky_feed_get_reposted_by_response.rs @@ -0,0 +1,18 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyActorDefsProfileView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedGetRepostedByResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cid: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(rename = "repostedBy")] + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub reposted_by: Vec, + pub uri: String, +} +impl std::fmt::Display for AppBskyFeedGetRepostedByResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_get_suggested_feeds_response.rs b/src/model/app_bsky_feed_get_suggested_feeds_response.rs new file mode 100644 index 0000000..018e7b9 --- /dev/null +++ b/src/model/app_bsky_feed_get_suggested_feeds_response.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyFeedDefsGeneratorView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedGetSuggestedFeedsResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub feeds: Vec, +} +impl std::fmt::Display for AppBskyFeedGetSuggestedFeedsResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_get_timeline_response.rs b/src/model/app_bsky_feed_get_timeline_response.rs new file mode 100644 index 0000000..16ec24a --- /dev/null +++ b/src/model/app_bsky_feed_get_timeline_response.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyFeedDefsFeedViewPost; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedGetTimelineResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub feed: Vec, +} +impl std::fmt::Display for AppBskyFeedGetTimelineResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_post_text_slice.rs b/src/model/app_bsky_feed_post_text_slice.rs new file mode 100644 index 0000000..b7dfc91 --- /dev/null +++ b/src/model/app_bsky_feed_post_text_slice.rs @@ -0,0 +1,12 @@ +use serde::{Serialize, Deserialize}; +///Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings. +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedPostTextSlice { + pub end: i64, + pub start: i64, +} +impl std::fmt::Display for AppBskyFeedPostTextSlice { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_feed_search_posts_response.rs b/src/model/app_bsky_feed_search_posts_response.rs new file mode 100644 index 0000000..30ccb9e --- /dev/null +++ b/src/model/app_bsky_feed_search_posts_response.rs @@ -0,0 +1,17 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyFeedDefsPostView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyFeedSearchPostsResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(rename = "hitsTotal")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub hits_total: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub posts: Vec, +} +impl std::fmt::Display for AppBskyFeedSearchPostsResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_graph_defs_list_item_view.rs b/src/model/app_bsky_graph_defs_list_item_view.rs new file mode 100644 index 0000000..3e0757b --- /dev/null +++ b/src/model/app_bsky_graph_defs_list_item_view.rs @@ -0,0 +1,12 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyActorDefsProfileView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyGraphDefsListItemView { + pub subject: AppBskyActorDefsProfileView, + pub uri: String, +} +impl std::fmt::Display for AppBskyGraphDefsListItemView { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_graph_defs_list_purpose.rs b/src/model/app_bsky_graph_defs_list_purpose.rs new file mode 100644 index 0000000..e6dfd44 --- /dev/null +++ b/src/model/app_bsky_graph_defs_list_purpose.rs @@ -0,0 +1,3 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyGraphDefsListPurpose(pub serde_json::Value); \ No newline at end of file diff --git a/src/model/app_bsky_graph_defs_list_view.rs b/src/model/app_bsky_graph_defs_list_view.rs new file mode 100644 index 0000000..eabeba3 --- /dev/null +++ b/src/model/app_bsky_graph_defs_list_view.rs @@ -0,0 +1,31 @@ +use serde::{Serialize, Deserialize}; +use super::{ + AppBskyActorDefsProfileView, AppBskyGraphDefsListPurpose, + AppBskyGraphDefsListViewerState, AppBskyRichtextFacet, ComAtprotoLabelDefsLabel, +}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyGraphDefsListView { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub avatar: Option, + pub cid: String, + pub creator: AppBskyActorDefsProfileView, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "descriptionFacets")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub description_facets: Option>, + #[serde(rename = "indexedAt")] + pub indexed_at: chrono::DateTime, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub labels: Option>, + pub name: String, + pub purpose: AppBskyGraphDefsListPurpose, + pub uri: String, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub viewer: Option, +} +impl std::fmt::Display for AppBskyGraphDefsListView { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_graph_defs_list_view_basic.rs b/src/model/app_bsky_graph_defs_list_view_basic.rs new file mode 100644 index 0000000..2262cee --- /dev/null +++ b/src/model/app_bsky_graph_defs_list_view_basic.rs @@ -0,0 +1,26 @@ +use serde::{Serialize, Deserialize}; +use super::{ + AppBskyGraphDefsListPurpose, AppBskyGraphDefsListViewerState, + ComAtprotoLabelDefsLabel, +}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyGraphDefsListViewBasic { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub avatar: Option, + pub cid: String, + #[serde(rename = "indexedAt")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub indexed_at: Option>, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub labels: Option>, + pub name: String, + pub purpose: AppBskyGraphDefsListPurpose, + pub uri: String, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub viewer: Option, +} +impl std::fmt::Display for AppBskyGraphDefsListViewBasic { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_graph_defs_list_viewer_state.rs b/src/model/app_bsky_graph_defs_list_viewer_state.rs new file mode 100644 index 0000000..e592d24 --- /dev/null +++ b/src/model/app_bsky_graph_defs_list_viewer_state.rs @@ -0,0 +1,13 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyGraphDefsListViewerState { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub blocked: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub muted: Option, +} +impl std::fmt::Display for AppBskyGraphDefsListViewerState { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_graph_get_blocks_response.rs b/src/model/app_bsky_graph_get_blocks_response.rs new file mode 100644 index 0000000..6e162f7 --- /dev/null +++ b/src/model/app_bsky_graph_get_blocks_response.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyActorDefsProfileView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyGraphGetBlocksResponse { + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub blocks: Vec, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, +} +impl std::fmt::Display for AppBskyGraphGetBlocksResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_graph_get_followers_response.rs b/src/model/app_bsky_graph_get_followers_response.rs new file mode 100644 index 0000000..9bd0750 --- /dev/null +++ b/src/model/app_bsky_graph_get_followers_response.rs @@ -0,0 +1,15 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyActorDefsProfileView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyGraphGetFollowersResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub followers: Vec, + pub subject: AppBskyActorDefsProfileView, +} +impl std::fmt::Display for AppBskyGraphGetFollowersResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_graph_get_follows_response.rs b/src/model/app_bsky_graph_get_follows_response.rs new file mode 100644 index 0000000..c547bcf --- /dev/null +++ b/src/model/app_bsky_graph_get_follows_response.rs @@ -0,0 +1,15 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyActorDefsProfileView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyGraphGetFollowsResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub follows: Vec, + pub subject: AppBskyActorDefsProfileView, +} +impl std::fmt::Display for AppBskyGraphGetFollowsResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_graph_get_list_blocks_response.rs b/src/model/app_bsky_graph_get_list_blocks_response.rs new file mode 100644 index 0000000..076be42 --- /dev/null +++ b/src/model/app_bsky_graph_get_list_blocks_response.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyGraphDefsListView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyGraphGetListBlocksResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub lists: Vec, +} +impl std::fmt::Display for AppBskyGraphGetListBlocksResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_graph_get_list_mutes_response.rs b/src/model/app_bsky_graph_get_list_mutes_response.rs new file mode 100644 index 0000000..dc4ef38 --- /dev/null +++ b/src/model/app_bsky_graph_get_list_mutes_response.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyGraphDefsListView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyGraphGetListMutesResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub lists: Vec, +} +impl std::fmt::Display for AppBskyGraphGetListMutesResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_graph_get_list_response.rs b/src/model/app_bsky_graph_get_list_response.rs new file mode 100644 index 0000000..a1b1700 --- /dev/null +++ b/src/model/app_bsky_graph_get_list_response.rs @@ -0,0 +1,15 @@ +use serde::{Serialize, Deserialize}; +use super::{AppBskyGraphDefsListItemView, AppBskyGraphDefsListView}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyGraphGetListResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub items: Vec, + pub list: AppBskyGraphDefsListView, +} +impl std::fmt::Display for AppBskyGraphGetListResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_graph_get_lists_response.rs b/src/model/app_bsky_graph_get_lists_response.rs new file mode 100644 index 0000000..3967deb --- /dev/null +++ b/src/model/app_bsky_graph_get_lists_response.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyGraphDefsListView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyGraphGetListsResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub lists: Vec, +} +impl std::fmt::Display for AppBskyGraphGetListsResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_graph_get_mutes_response.rs b/src/model/app_bsky_graph_get_mutes_response.rs new file mode 100644 index 0000000..ddeda84 --- /dev/null +++ b/src/model/app_bsky_graph_get_mutes_response.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyActorDefsProfileView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyGraphGetMutesResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub mutes: Vec, +} +impl std::fmt::Display for AppBskyGraphGetMutesResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_graph_get_suggested_follows_by_actor_response.rs b/src/model/app_bsky_graph_get_suggested_follows_by_actor_response.rs new file mode 100644 index 0000000..4d7a144 --- /dev/null +++ b/src/model/app_bsky_graph_get_suggested_follows_by_actor_response.rs @@ -0,0 +1,12 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyActorDefsProfileView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyGraphGetSuggestedFollowsByActorResponse { + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub suggestions: Vec, +} +impl std::fmt::Display for AppBskyGraphGetSuggestedFollowsByActorResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_labeler_get_services_response.rs b/src/model/app_bsky_labeler_get_services_response.rs new file mode 100644 index 0000000..52660e0 --- /dev/null +++ b/src/model/app_bsky_labeler_get_services_response.rs @@ -0,0 +1,11 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyLabelerGetServicesResponse { + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub views: Vec, +} +impl std::fmt::Display for AppBskyLabelerGetServicesResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_notification_get_unread_count_response.rs b/src/model/app_bsky_notification_get_unread_count_response.rs new file mode 100644 index 0000000..f48b36e --- /dev/null +++ b/src/model/app_bsky_notification_get_unread_count_response.rs @@ -0,0 +1,10 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyNotificationGetUnreadCountResponse { + pub count: i64, +} +impl std::fmt::Display for AppBskyNotificationGetUnreadCountResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_notification_list_notifications_notification.rs b/src/model/app_bsky_notification_list_notifications_notification.rs new file mode 100644 index 0000000..0b97723 --- /dev/null +++ b/src/model/app_bsky_notification_list_notifications_notification.rs @@ -0,0 +1,26 @@ +use serde::{Serialize, Deserialize}; +use super::{AppBskyActorDefsProfileView, ComAtprotoLabelDefsLabel}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyNotificationListNotificationsNotification { + pub author: AppBskyActorDefsProfileView, + pub cid: String, + #[serde(rename = "indexedAt")] + pub indexed_at: chrono::DateTime, + #[serde(rename = "isRead")] + pub is_read: bool, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub labels: Option>, + ///Expected values are 'like', 'repost', 'follow', 'mention', 'reply', and 'quote'. + pub reason: String, + #[serde(rename = "reasonSubject")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub reason_subject: Option, + #[serde(default, skip_serializing_if = "serde_json::Value::is_null")] + pub record: serde_json::Value, + pub uri: String, +} +impl std::fmt::Display for AppBskyNotificationListNotificationsNotification { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_notification_list_notifications_response.rs b/src/model/app_bsky_notification_list_notifications_response.rs new file mode 100644 index 0000000..2cbf77b --- /dev/null +++ b/src/model/app_bsky_notification_list_notifications_response.rs @@ -0,0 +1,17 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyNotificationListNotificationsNotification; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyNotificationListNotificationsResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub notifications: Vec, + #[serde(rename = "seenAt")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub seen_at: Option>, +} +impl std::fmt::Display for AppBskyNotificationListNotificationsResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_richtext_facet.rs b/src/model/app_bsky_richtext_facet.rs new file mode 100644 index 0000000..f85e098 --- /dev/null +++ b/src/model/app_bsky_richtext_facet.rs @@ -0,0 +1,15 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyRichtextFacetByteSlice; +///Annotation of a sub-string within rich text. +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyRichtextFacet { + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub features: Vec, + ///Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets. + pub index: AppBskyRichtextFacetByteSlice, +} +impl std::fmt::Display for AppBskyRichtextFacet { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_richtext_facet_byte_slice.rs b/src/model/app_bsky_richtext_facet_byte_slice.rs new file mode 100644 index 0000000..cbe2cdc --- /dev/null +++ b/src/model/app_bsky_richtext_facet_byte_slice.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +///Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets. +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyRichtextFacetByteSlice { + #[serde(rename = "byteEnd")] + pub byte_end: i64, + #[serde(rename = "byteStart")] + pub byte_start: i64, +} +impl std::fmt::Display for AppBskyRichtextFacetByteSlice { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_unspecced_get_popular_feed_generators_response.rs b/src/model/app_bsky_unspecced_get_popular_feed_generators_response.rs new file mode 100644 index 0000000..acf8edf --- /dev/null +++ b/src/model/app_bsky_unspecced_get_popular_feed_generators_response.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyFeedDefsGeneratorView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyUnspeccedGetPopularFeedGeneratorsResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub feeds: Vec, +} +impl std::fmt::Display for AppBskyUnspeccedGetPopularFeedGeneratorsResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_unspecced_get_popular_response.rs b/src/model/app_bsky_unspecced_get_popular_response.rs new file mode 100644 index 0000000..b02dc88 --- /dev/null +++ b/src/model/app_bsky_unspecced_get_popular_response.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyFeedDefsFeedViewPost; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyUnspeccedGetPopularResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub feed: Vec, +} +impl std::fmt::Display for AppBskyUnspeccedGetPopularResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_unspecced_get_tagged_suggestions_response.rs b/src/model/app_bsky_unspecced_get_tagged_suggestions_response.rs new file mode 100644 index 0000000..aa82cea --- /dev/null +++ b/src/model/app_bsky_unspecced_get_tagged_suggestions_response.rs @@ -0,0 +1,12 @@ +use serde::{Serialize, Deserialize}; +use super::AppBskyUnspeccedGetTaggedSuggestionsSuggestion; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyUnspeccedGetTaggedSuggestionsResponse { + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub suggestions: Vec, +} +impl std::fmt::Display for AppBskyUnspeccedGetTaggedSuggestionsResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/app_bsky_unspecced_get_tagged_suggestions_suggestion.rs b/src/model/app_bsky_unspecced_get_tagged_suggestions_suggestion.rs new file mode 100644 index 0000000..94fcdef --- /dev/null +++ b/src/model/app_bsky_unspecced_get_tagged_suggestions_suggestion.rs @@ -0,0 +1,13 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct AppBskyUnspeccedGetTaggedSuggestionsSuggestion { + pub subject: String, + #[serde(rename = "subjectType")] + pub subject_type: String, + pub tag: String, +} +impl std::fmt::Display for AppBskyUnspeccedGetTaggedSuggestionsSuggestion { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_identity_get_recommended_did_credentials_response.rs b/src/model/com_atproto_identity_get_recommended_did_credentials_response.rs new file mode 100644 index 0000000..e7bf06c --- /dev/null +++ b/src/model/com_atproto_identity_get_recommended_did_credentials_response.rs @@ -0,0 +1,20 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoIdentityGetRecommendedDidCredentialsResponse { + #[serde(rename = "alsoKnownAs")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub also_known_as: Option>, + #[serde(rename = "rotationKeys")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub rotation_keys: Option>, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub services: Option, + #[serde(rename = "verificationMethods")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub verification_methods: Option, +} +impl std::fmt::Display for ComAtprotoIdentityGetRecommendedDidCredentialsResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_identity_resolve_handle_response.rs b/src/model/com_atproto_identity_resolve_handle_response.rs new file mode 100644 index 0000000..e015018 --- /dev/null +++ b/src/model/com_atproto_identity_resolve_handle_response.rs @@ -0,0 +1,10 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoIdentityResolveHandleResponse { + pub did: String, +} +impl std::fmt::Display for ComAtprotoIdentityResolveHandleResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_identity_sign_plc_operation_response.rs b/src/model/com_atproto_identity_sign_plc_operation_response.rs new file mode 100644 index 0000000..33c56db --- /dev/null +++ b/src/model/com_atproto_identity_sign_plc_operation_response.rs @@ -0,0 +1,11 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoIdentitySignPlcOperationResponse { + #[serde(default, skip_serializing_if = "serde_json::Value::is_null")] + pub operation: serde_json::Value, +} +impl std::fmt::Display for ComAtprotoIdentitySignPlcOperationResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_label_defs_label.rs b/src/model/com_atproto_label_defs_label.rs new file mode 100644 index 0000000..34697c7 --- /dev/null +++ b/src/model/com_atproto_label_defs_label.rs @@ -0,0 +1,32 @@ +use serde::{Serialize, Deserialize}; +///Metadata tag on an atproto resource (eg, repo or record). +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoLabelDefsLabel { + ///Optionally, CID specifying the specific version of 'uri' resource this label applies to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cid: Option, + ///Timestamp when this label was created. + pub cts: chrono::DateTime, + ///Timestamp at which this label expires (no longer applies). + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exp: Option>, + ///If true, this is a negation label, overwriting a previous label. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub neg: Option, + ///Signature of dag-cbor encoded label. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub sig: Option, + ///DID of the actor who created this label. + pub src: String, + ///AT URI of the record, repository (account), or other resource that this label applies to. + pub uri: String, + ///The short string name of the value or type of this label. + pub val: String, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub ver: Option, +} +impl std::fmt::Display for ComAtprotoLabelDefsLabel { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_label_defs_label_value_definition.rs b/src/model/com_atproto_label_defs_label_value_definition.rs new file mode 100644 index 0000000..0b9f1b0 --- /dev/null +++ b/src/model/com_atproto_label_defs_label_value_definition.rs @@ -0,0 +1,27 @@ +use serde::{Serialize, Deserialize}; +use super::ComAtprotoLabelDefsLabelValueDefinitionStrings; +///Declares a label value and its expected interpertations and behaviors. +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoLabelDefsLabelValueDefinition { + ///Does the user need to have adult content enabled in order to configure this label? + #[serde(rename = "adultOnly")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub adult_only: Option, + ///What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing. + pub blurs: String, + ///The default setting for this label. + #[serde(rename = "defaultSetting")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub default_setting: Option, + ///The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+). + pub identifier: String, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub locales: Vec, + ///How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing. + pub severity: String, +} +impl std::fmt::Display for ComAtprotoLabelDefsLabelValueDefinition { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_label_defs_label_value_definition_strings.rs b/src/model/com_atproto_label_defs_label_value_definition_strings.rs new file mode 100644 index 0000000..2e02071 --- /dev/null +++ b/src/model/com_atproto_label_defs_label_value_definition_strings.rs @@ -0,0 +1,16 @@ +use serde::{Serialize, Deserialize}; +///Strings which describe the label in the UI, localized into a specific language. +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoLabelDefsLabelValueDefinitionStrings { + ///A longer description of what the label means and why it might be applied. + pub description: String, + ///The code of the language these strings are written in. + pub lang: String, + ///A short human-readable name for the label. + pub name: String, +} +impl std::fmt::Display for ComAtprotoLabelDefsLabelValueDefinitionStrings { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_moderation_create_report_response.rs b/src/model/com_atproto_moderation_create_report_response.rs new file mode 100644 index 0000000..68bb529 --- /dev/null +++ b/src/model/com_atproto_moderation_create_report_response.rs @@ -0,0 +1,21 @@ +use serde::{Serialize, Deserialize}; +use super::ComAtprotoModerationDefsReasonType; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoModerationCreateReportResponse { + #[serde(rename = "createdAt")] + pub created_at: chrono::DateTime, + pub id: i64, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub reason: Option, + #[serde(rename = "reasonType")] + pub reason_type: ComAtprotoModerationDefsReasonType, + #[serde(rename = "reportedBy")] + pub reported_by: String, + #[serde(default, skip_serializing_if = "serde_json::Value::is_null")] + pub subject: serde_json::Value, +} +impl std::fmt::Display for ComAtprotoModerationCreateReportResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_moderation_defs_reason_type.rs b/src/model/com_atproto_moderation_defs_reason_type.rs new file mode 100644 index 0000000..370d82c --- /dev/null +++ b/src/model/com_atproto_moderation_defs_reason_type.rs @@ -0,0 +1,3 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoModerationDefsReasonType(pub serde_json::Value); \ No newline at end of file diff --git a/src/model/com_atproto_repo_create_record_response.rs b/src/model/com_atproto_repo_create_record_response.rs new file mode 100644 index 0000000..d5c06b6 --- /dev/null +++ b/src/model/com_atproto_repo_create_record_response.rs @@ -0,0 +1,11 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoRepoCreateRecordResponse { + pub cid: String, + pub uri: String, +} +impl std::fmt::Display for ComAtprotoRepoCreateRecordResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_repo_describe_repo_response.rs b/src/model/com_atproto_repo_describe_repo_response.rs new file mode 100644 index 0000000..d6a743c --- /dev/null +++ b/src/model/com_atproto_repo_describe_repo_response.rs @@ -0,0 +1,19 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoRepoDescribeRepoResponse { + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub collections: Vec, + pub did: String, + #[serde(rename = "didDoc")] + #[serde(default, skip_serializing_if = "serde_json::Value::is_null")] + pub did_doc: serde_json::Value, + pub handle: String, + ///Indicates if handle is currently valid (resolves bi-directionally) + #[serde(rename = "handleIsCorrect")] + pub handle_is_correct: bool, +} +impl std::fmt::Display for ComAtprotoRepoDescribeRepoResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_repo_get_record_response.rs b/src/model/com_atproto_repo_get_record_response.rs new file mode 100644 index 0000000..8e58501 --- /dev/null +++ b/src/model/com_atproto_repo_get_record_response.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoRepoGetRecordResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cid: Option, + pub uri: String, + #[serde(default, skip_serializing_if = "serde_json::Value::is_null")] + pub value: serde_json::Value, +} +impl std::fmt::Display for ComAtprotoRepoGetRecordResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_repo_list_missing_blobs_record_blob.rs b/src/model/com_atproto_repo_list_missing_blobs_record_blob.rs new file mode 100644 index 0000000..843fed8 --- /dev/null +++ b/src/model/com_atproto_repo_list_missing_blobs_record_blob.rs @@ -0,0 +1,12 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoRepoListMissingBlobsRecordBlob { + pub cid: String, + #[serde(rename = "recordUri")] + pub record_uri: String, +} +impl std::fmt::Display for ComAtprotoRepoListMissingBlobsRecordBlob { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_repo_list_missing_blobs_response.rs b/src/model/com_atproto_repo_list_missing_blobs_response.rs new file mode 100644 index 0000000..784f5f8 --- /dev/null +++ b/src/model/com_atproto_repo_list_missing_blobs_response.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +use super::ComAtprotoRepoListMissingBlobsRecordBlob; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoRepoListMissingBlobsResponse { + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub blobs: Vec, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, +} +impl std::fmt::Display for ComAtprotoRepoListMissingBlobsResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_repo_list_records_record.rs b/src/model/com_atproto_repo_list_records_record.rs new file mode 100644 index 0000000..b2b2219 --- /dev/null +++ b/src/model/com_atproto_repo_list_records_record.rs @@ -0,0 +1,13 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoRepoListRecordsRecord { + pub cid: String, + pub uri: String, + #[serde(default, skip_serializing_if = "serde_json::Value::is_null")] + pub value: serde_json::Value, +} +impl std::fmt::Display for ComAtprotoRepoListRecordsRecord { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_repo_list_records_response.rs b/src/model/com_atproto_repo_list_records_response.rs new file mode 100644 index 0000000..baa41aa --- /dev/null +++ b/src/model/com_atproto_repo_list_records_response.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +use super::ComAtprotoRepoListRecordsRecord; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoRepoListRecordsResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub records: Vec, +} +impl std::fmt::Display for ComAtprotoRepoListRecordsResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_repo_put_record_response.rs b/src/model/com_atproto_repo_put_record_response.rs new file mode 100644 index 0000000..d5148a6 --- /dev/null +++ b/src/model/com_atproto_repo_put_record_response.rs @@ -0,0 +1,11 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoRepoPutRecordResponse { + pub cid: String, + pub uri: String, +} +impl std::fmt::Display for ComAtprotoRepoPutRecordResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_repo_strong_ref.rs b/src/model/com_atproto_repo_strong_ref.rs new file mode 100644 index 0000000..d8fe198 --- /dev/null +++ b/src/model/com_atproto_repo_strong_ref.rs @@ -0,0 +1,11 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoRepoStrongRef { + pub cid: String, + pub uri: String, +} +impl std::fmt::Display for ComAtprotoRepoStrongRef { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_repo_upload_blob_response.rs b/src/model/com_atproto_repo_upload_blob_response.rs new file mode 100644 index 0000000..5422789 --- /dev/null +++ b/src/model/com_atproto_repo_upload_blob_response.rs @@ -0,0 +1,10 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoRepoUploadBlobResponse { + pub blob: String, +} +impl std::fmt::Display for ComAtprotoRepoUploadBlobResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_server_check_account_status_response.rs b/src/model/com_atproto_server_check_account_status_response.rs new file mode 100644 index 0000000..9227048 --- /dev/null +++ b/src/model/com_atproto_server_check_account_status_response.rs @@ -0,0 +1,26 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoServerCheckAccountStatusResponse { + pub activated: bool, + #[serde(rename = "expectedBlobs")] + pub expected_blobs: i64, + #[serde(rename = "importedBlobs")] + pub imported_blobs: i64, + #[serde(rename = "indexedRecords")] + pub indexed_records: i64, + #[serde(rename = "privateStateValues")] + pub private_state_values: i64, + #[serde(rename = "repoBlocks")] + pub repo_blocks: i64, + #[serde(rename = "repoCommit")] + pub repo_commit: String, + #[serde(rename = "repoRev")] + pub repo_rev: String, + #[serde(rename = "validDid")] + pub valid_did: bool, +} +impl std::fmt::Display for ComAtprotoServerCheckAccountStatusResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_server_create_account_response.rs b/src/model/com_atproto_server_create_account_response.rs new file mode 100644 index 0000000..0b8b481 --- /dev/null +++ b/src/model/com_atproto_server_create_account_response.rs @@ -0,0 +1,20 @@ +use serde::{Serialize, Deserialize}; +///Account login session returned on successful account creation. +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoServerCreateAccountResponse { + #[serde(rename = "accessJwt")] + pub access_jwt: String, + ///The DID of the new account. + pub did: String, + #[serde(rename = "didDoc")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub did_doc: Option, + pub handle: String, + #[serde(rename = "refreshJwt")] + pub refresh_jwt: String, +} +impl std::fmt::Display for ComAtprotoServerCreateAccountResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_server_create_app_password_app_password.rs b/src/model/com_atproto_server_create_app_password_app_password.rs new file mode 100644 index 0000000..a62d2ff --- /dev/null +++ b/src/model/com_atproto_server_create_app_password_app_password.rs @@ -0,0 +1,13 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoServerCreateAppPasswordAppPassword { + #[serde(rename = "createdAt")] + pub created_at: chrono::DateTime, + pub name: String, + pub password: String, +} +impl std::fmt::Display for ComAtprotoServerCreateAppPasswordAppPassword { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_server_create_invite_code_response.rs b/src/model/com_atproto_server_create_invite_code_response.rs new file mode 100644 index 0000000..d76c68c --- /dev/null +++ b/src/model/com_atproto_server_create_invite_code_response.rs @@ -0,0 +1,10 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoServerCreateInviteCodeResponse { + pub code: String, +} +impl std::fmt::Display for ComAtprotoServerCreateInviteCodeResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_server_create_invite_codes_account_codes.rs b/src/model/com_atproto_server_create_invite_codes_account_codes.rs new file mode 100644 index 0000000..bb11fe4 --- /dev/null +++ b/src/model/com_atproto_server_create_invite_codes_account_codes.rs @@ -0,0 +1,12 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoServerCreateInviteCodesAccountCodes { + pub account: String, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub codes: Vec, +} +impl std::fmt::Display for ComAtprotoServerCreateInviteCodesAccountCodes { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_server_create_invite_codes_response.rs b/src/model/com_atproto_server_create_invite_codes_response.rs new file mode 100644 index 0000000..62296b9 --- /dev/null +++ b/src/model/com_atproto_server_create_invite_codes_response.rs @@ -0,0 +1,12 @@ +use serde::{Serialize, Deserialize}; +use super::ComAtprotoServerCreateInviteCodesAccountCodes; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoServerCreateInviteCodesResponse { + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub codes: Vec, +} +impl std::fmt::Display for ComAtprotoServerCreateInviteCodesResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_server_create_session_response.rs b/src/model/com_atproto_server_create_session_response.rs new file mode 100644 index 0000000..eba42b4 --- /dev/null +++ b/src/model/com_atproto_server_create_session_response.rs @@ -0,0 +1,23 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoServerCreateSessionResponse { + #[serde(rename = "accessJwt")] + pub access_jwt: String, + pub did: String, + #[serde(rename = "didDoc")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub did_doc: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub email: Option, + #[serde(rename = "emailConfirmed")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub email_confirmed: Option, + pub handle: String, + #[serde(rename = "refreshJwt")] + pub refresh_jwt: String, +} +impl std::fmt::Display for ComAtprotoServerCreateSessionResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_server_defs_invite_code.rs b/src/model/com_atproto_server_defs_invite_code.rs new file mode 100644 index 0000000..d15dec9 --- /dev/null +++ b/src/model/com_atproto_server_defs_invite_code.rs @@ -0,0 +1,21 @@ +use serde::{Serialize, Deserialize}; +use super::ComAtprotoServerDefsInviteCodeUse; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoServerDefsInviteCode { + pub available: i64, + pub code: String, + #[serde(rename = "createdAt")] + pub created_at: chrono::DateTime, + #[serde(rename = "createdBy")] + pub created_by: String, + pub disabled: bool, + #[serde(rename = "forAccount")] + pub for_account: String, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub uses: Vec, +} +impl std::fmt::Display for ComAtprotoServerDefsInviteCode { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_server_defs_invite_code_use.rs b/src/model/com_atproto_server_defs_invite_code_use.rs new file mode 100644 index 0000000..7e744d8 --- /dev/null +++ b/src/model/com_atproto_server_defs_invite_code_use.rs @@ -0,0 +1,13 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoServerDefsInviteCodeUse { + #[serde(rename = "usedAt")] + pub used_at: chrono::DateTime, + #[serde(rename = "usedBy")] + pub used_by: String, +} +impl std::fmt::Display for ComAtprotoServerDefsInviteCodeUse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_server_describe_server_links.rs b/src/model/com_atproto_server_describe_server_links.rs new file mode 100644 index 0000000..b733fd1 --- /dev/null +++ b/src/model/com_atproto_server_describe_server_links.rs @@ -0,0 +1,15 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoServerDescribeServerLinks { + #[serde(rename = "privacyPolicy")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub privacy_policy: Option, + #[serde(rename = "termsOfService")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub terms_of_service: Option, +} +impl std::fmt::Display for ComAtprotoServerDescribeServerLinks { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_server_describe_server_response.rs b/src/model/com_atproto_server_describe_server_response.rs new file mode 100644 index 0000000..fe00b74 --- /dev/null +++ b/src/model/com_atproto_server_describe_server_response.rs @@ -0,0 +1,24 @@ +use serde::{Serialize, Deserialize}; +use super::ComAtprotoServerDescribeServerLinks; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoServerDescribeServerResponse { + #[serde(rename = "availableUserDomains")] + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub available_user_domains: Vec, + pub did: String, + ///If true, an invite code must be supplied to create an account on this instance. + #[serde(rename = "inviteCodeRequired")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub invite_code_required: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub links: Option, + ///If true, a phone verification token must be supplied to create an account on this instance. + #[serde(rename = "phoneVerificationRequired")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub phone_verification_required: Option, +} +impl std::fmt::Display for ComAtprotoServerDescribeServerResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_server_get_account_invite_codes_response.rs b/src/model/com_atproto_server_get_account_invite_codes_response.rs new file mode 100644 index 0000000..5ceb8d5 --- /dev/null +++ b/src/model/com_atproto_server_get_account_invite_codes_response.rs @@ -0,0 +1,12 @@ +use serde::{Serialize, Deserialize}; +use super::ComAtprotoServerDefsInviteCode; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoServerGetAccountInviteCodesResponse { + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub codes: Vec, +} +impl std::fmt::Display for ComAtprotoServerGetAccountInviteCodesResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_server_get_service_auth_response.rs b/src/model/com_atproto_server_get_service_auth_response.rs new file mode 100644 index 0000000..6466bad --- /dev/null +++ b/src/model/com_atproto_server_get_service_auth_response.rs @@ -0,0 +1,10 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoServerGetServiceAuthResponse { + pub token: String, +} +impl std::fmt::Display for ComAtprotoServerGetServiceAuthResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_server_get_session_response.rs b/src/model/com_atproto_server_get_session_response.rs new file mode 100644 index 0000000..f0f0459 --- /dev/null +++ b/src/model/com_atproto_server_get_session_response.rs @@ -0,0 +1,19 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoServerGetSessionResponse { + pub did: String, + #[serde(rename = "didDoc")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub did_doc: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub email: Option, + #[serde(rename = "emailConfirmed")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub email_confirmed: Option, + pub handle: String, +} +impl std::fmt::Display for ComAtprotoServerGetSessionResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_server_list_app_passwords_app_password.rs b/src/model/com_atproto_server_list_app_passwords_app_password.rs new file mode 100644 index 0000000..3d81b13 --- /dev/null +++ b/src/model/com_atproto_server_list_app_passwords_app_password.rs @@ -0,0 +1,12 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoServerListAppPasswordsAppPassword { + #[serde(rename = "createdAt")] + pub created_at: chrono::DateTime, + pub name: String, +} +impl std::fmt::Display for ComAtprotoServerListAppPasswordsAppPassword { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_server_list_app_passwords_response.rs b/src/model/com_atproto_server_list_app_passwords_response.rs new file mode 100644 index 0000000..b0a17a6 --- /dev/null +++ b/src/model/com_atproto_server_list_app_passwords_response.rs @@ -0,0 +1,12 @@ +use serde::{Serialize, Deserialize}; +use super::ComAtprotoServerListAppPasswordsAppPassword; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoServerListAppPasswordsResponse { + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub passwords: Vec, +} +impl std::fmt::Display for ComAtprotoServerListAppPasswordsResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_server_refresh_session_response.rs b/src/model/com_atproto_server_refresh_session_response.rs new file mode 100644 index 0000000..b931213 --- /dev/null +++ b/src/model/com_atproto_server_refresh_session_response.rs @@ -0,0 +1,18 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoServerRefreshSessionResponse { + #[serde(rename = "accessJwt")] + pub access_jwt: String, + pub did: String, + #[serde(rename = "didDoc")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub did_doc: Option, + pub handle: String, + #[serde(rename = "refreshJwt")] + pub refresh_jwt: String, +} +impl std::fmt::Display for ComAtprotoServerRefreshSessionResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_server_request_email_update_response.rs b/src/model/com_atproto_server_request_email_update_response.rs new file mode 100644 index 0000000..3d39c63 --- /dev/null +++ b/src/model/com_atproto_server_request_email_update_response.rs @@ -0,0 +1,11 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoServerRequestEmailUpdateResponse { + #[serde(rename = "tokenRequired")] + pub token_required: bool, +} +impl std::fmt::Display for ComAtprotoServerRequestEmailUpdateResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_server_reserve_signing_key_response.rs b/src/model/com_atproto_server_reserve_signing_key_response.rs new file mode 100644 index 0000000..df85d0a --- /dev/null +++ b/src/model/com_atproto_server_reserve_signing_key_response.rs @@ -0,0 +1,12 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoServerReserveSigningKeyResponse { + ///The public key for the reserved signing key, in did:key serialization. + #[serde(rename = "signingKey")] + pub signing_key: String, +} +impl std::fmt::Display for ComAtprotoServerReserveSigningKeyResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_sync_get_commit_path_response.rs b/src/model/com_atproto_sync_get_commit_path_response.rs new file mode 100644 index 0000000..a6a4ae2 --- /dev/null +++ b/src/model/com_atproto_sync_get_commit_path_response.rs @@ -0,0 +1,11 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoSyncGetCommitPathResponse { + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub commits: Vec, +} +impl std::fmt::Display for ComAtprotoSyncGetCommitPathResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_sync_get_head_response.rs b/src/model/com_atproto_sync_get_head_response.rs new file mode 100644 index 0000000..79479bd --- /dev/null +++ b/src/model/com_atproto_sync_get_head_response.rs @@ -0,0 +1,10 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoSyncGetHeadResponse { + pub root: String, +} +impl std::fmt::Display for ComAtprotoSyncGetHeadResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_sync_get_latest_commit_response.rs b/src/model/com_atproto_sync_get_latest_commit_response.rs new file mode 100644 index 0000000..48c30ba --- /dev/null +++ b/src/model/com_atproto_sync_get_latest_commit_response.rs @@ -0,0 +1,11 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoSyncGetLatestCommitResponse { + pub cid: String, + pub rev: String, +} +impl std::fmt::Display for ComAtprotoSyncGetLatestCommitResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_sync_list_blobs_response.rs b/src/model/com_atproto_sync_list_blobs_response.rs new file mode 100644 index 0000000..a183cc9 --- /dev/null +++ b/src/model/com_atproto_sync_list_blobs_response.rs @@ -0,0 +1,13 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoSyncListBlobsResponse { + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub cids: Vec, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, +} +impl std::fmt::Display for ComAtprotoSyncListBlobsResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_sync_list_repos_repo.rs b/src/model/com_atproto_sync_list_repos_repo.rs new file mode 100644 index 0000000..825cc72 --- /dev/null +++ b/src/model/com_atproto_sync_list_repos_repo.rs @@ -0,0 +1,13 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoSyncListReposRepo { + pub did: String, + ///Current repo commit CID + pub head: String, + pub rev: String, +} +impl std::fmt::Display for ComAtprotoSyncListReposRepo { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_sync_list_repos_response.rs b/src/model/com_atproto_sync_list_repos_response.rs new file mode 100644 index 0000000..7d119d1 --- /dev/null +++ b/src/model/com_atproto_sync_list_repos_response.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +use super::ComAtprotoSyncListReposRepo; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoSyncListReposResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub repos: Vec, +} +impl std::fmt::Display for ComAtprotoSyncListReposResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/com_atproto_temp_check_signup_queue_response.rs b/src/model/com_atproto_temp_check_signup_queue_response.rs new file mode 100644 index 0000000..1a52228 --- /dev/null +++ b/src/model/com_atproto_temp_check_signup_queue_response.rs @@ -0,0 +1,16 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ComAtprotoTempCheckSignupQueueResponse { + pub activated: bool, + #[serde(rename = "estimatedTimeMs")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub estimated_time_ms: Option, + #[serde(rename = "placeInQueue")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub place_in_queue: Option, +} +impl std::fmt::Display for ComAtprotoTempCheckSignupQueueResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/tools_ozone_communication_defs_template_view.rs b/src/model/tools_ozone_communication_defs_template_view.rs new file mode 100644 index 0000000..16a01e4 --- /dev/null +++ b/src/model/tools_ozone_communication_defs_template_view.rs @@ -0,0 +1,26 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ToolsOzoneCommunicationDefsTemplateView { + ///Subject of the message, used in emails. + #[serde(rename = "contentMarkdown")] + pub content_markdown: String, + #[serde(rename = "createdAt")] + pub created_at: chrono::DateTime, + pub disabled: bool, + pub id: String, + ///DID of the user who last updated the template. + #[serde(rename = "lastUpdatedBy")] + pub last_updated_by: String, + ///Name of the template. + pub name: String, + ///Content of the template, can contain markdown and variable placeholders. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub subject: Option, + #[serde(rename = "updatedAt")] + pub updated_at: chrono::DateTime, +} +impl std::fmt::Display for ToolsOzoneCommunicationDefsTemplateView { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/tools_ozone_communication_list_templates_response.rs b/src/model/tools_ozone_communication_list_templates_response.rs new file mode 100644 index 0000000..8f8d491 --- /dev/null +++ b/src/model/tools_ozone_communication_list_templates_response.rs @@ -0,0 +1,13 @@ +use serde::{Serialize, Deserialize}; +use super::ToolsOzoneCommunicationDefsTemplateView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ToolsOzoneCommunicationListTemplatesResponse { + #[serde(rename = "communicationTemplates")] + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub communication_templates: Vec, +} +impl std::fmt::Display for ToolsOzoneCommunicationListTemplatesResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/tools_ozone_moderation_defs_blob_view.rs b/src/model/tools_ozone_moderation_defs_blob_view.rs new file mode 100644 index 0000000..470465b --- /dev/null +++ b/src/model/tools_ozone_moderation_defs_blob_view.rs @@ -0,0 +1,20 @@ +use serde::{Serialize, Deserialize}; +use super::ToolsOzoneModerationDefsModeration; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ToolsOzoneModerationDefsBlobView { + pub cid: String, + #[serde(rename = "createdAt")] + pub created_at: chrono::DateTime, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub details: Option, + #[serde(rename = "mimeType")] + pub mime_type: String, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub moderation: Option, + pub size: i64, +} +impl std::fmt::Display for ToolsOzoneModerationDefsBlobView { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/tools_ozone_moderation_defs_mod_event_view.rs b/src/model/tools_ozone_moderation_defs_mod_event_view.rs new file mode 100644 index 0000000..7465440 --- /dev/null +++ b/src/model/tools_ozone_moderation_defs_mod_event_view.rs @@ -0,0 +1,27 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ToolsOzoneModerationDefsModEventView { + #[serde(rename = "createdAt")] + pub created_at: chrono::DateTime, + #[serde(rename = "createdBy")] + pub created_by: String, + #[serde(rename = "creatorHandle")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub creator_handle: Option, + #[serde(default, skip_serializing_if = "serde_json::Value::is_null")] + pub event: serde_json::Value, + pub id: i64, + #[serde(default, skip_serializing_if = "serde_json::Value::is_null")] + pub subject: serde_json::Value, + #[serde(rename = "subjectBlobCids")] + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub subject_blob_cids: Vec, + #[serde(rename = "subjectHandle")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub subject_handle: Option, +} +impl std::fmt::Display for ToolsOzoneModerationDefsModEventView { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/tools_ozone_moderation_defs_mod_event_view_detail.rs b/src/model/tools_ozone_moderation_defs_mod_event_view_detail.rs new file mode 100644 index 0000000..2257359 --- /dev/null +++ b/src/model/tools_ozone_moderation_defs_mod_event_view_detail.rs @@ -0,0 +1,22 @@ +use serde::{Serialize, Deserialize}; +use super::ToolsOzoneModerationDefsBlobView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ToolsOzoneModerationDefsModEventViewDetail { + #[serde(rename = "createdAt")] + pub created_at: chrono::DateTime, + #[serde(rename = "createdBy")] + pub created_by: String, + #[serde(default, skip_serializing_if = "serde_json::Value::is_null")] + pub event: serde_json::Value, + pub id: i64, + #[serde(default, skip_serializing_if = "serde_json::Value::is_null")] + pub subject: serde_json::Value, + #[serde(rename = "subjectBlobs")] + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub subject_blobs: Vec, +} +impl std::fmt::Display for ToolsOzoneModerationDefsModEventViewDetail { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/tools_ozone_moderation_defs_moderation.rs b/src/model/tools_ozone_moderation_defs_moderation.rs new file mode 100644 index 0000000..d8d92ee --- /dev/null +++ b/src/model/tools_ozone_moderation_defs_moderation.rs @@ -0,0 +1,13 @@ +use serde::{Serialize, Deserialize}; +use super::ToolsOzoneModerationDefsSubjectStatusView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ToolsOzoneModerationDefsModeration { + #[serde(rename = "subjectStatus")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub subject_status: Option, +} +impl std::fmt::Display for ToolsOzoneModerationDefsModeration { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/tools_ozone_moderation_defs_moderation_detail.rs b/src/model/tools_ozone_moderation_defs_moderation_detail.rs new file mode 100644 index 0000000..1c06743 --- /dev/null +++ b/src/model/tools_ozone_moderation_defs_moderation_detail.rs @@ -0,0 +1,13 @@ +use serde::{Serialize, Deserialize}; +use super::ToolsOzoneModerationDefsSubjectStatusView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ToolsOzoneModerationDefsModerationDetail { + #[serde(rename = "subjectStatus")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub subject_status: Option, +} +impl std::fmt::Display for ToolsOzoneModerationDefsModerationDetail { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/tools_ozone_moderation_defs_record_view_detail.rs b/src/model/tools_ozone_moderation_defs_record_view_detail.rs new file mode 100644 index 0000000..cf2b168 --- /dev/null +++ b/src/model/tools_ozone_moderation_defs_record_view_detail.rs @@ -0,0 +1,25 @@ +use serde::{Serialize, Deserialize}; +use super::{ + ComAtprotoLabelDefsLabel, ToolsOzoneModerationDefsBlobView, + ToolsOzoneModerationDefsModerationDetail, ToolsOzoneModerationDefsRepoView, +}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ToolsOzoneModerationDefsRecordViewDetail { + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub blobs: Vec, + pub cid: String, + #[serde(rename = "indexedAt")] + pub indexed_at: chrono::DateTime, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub labels: Option>, + pub moderation: ToolsOzoneModerationDefsModerationDetail, + pub repo: ToolsOzoneModerationDefsRepoView, + pub uri: String, + #[serde(default, skip_serializing_if = "serde_json::Value::is_null")] + pub value: serde_json::Value, +} +impl std::fmt::Display for ToolsOzoneModerationDefsRecordViewDetail { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/tools_ozone_moderation_defs_repo_view.rs b/src/model/tools_ozone_moderation_defs_repo_view.rs new file mode 100644 index 0000000..65c1cee --- /dev/null +++ b/src/model/tools_ozone_moderation_defs_repo_view.rs @@ -0,0 +1,29 @@ +use serde::{Serialize, Deserialize}; +use super::{ComAtprotoServerDefsInviteCode, ToolsOzoneModerationDefsModeration}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ToolsOzoneModerationDefsRepoView { + pub did: String, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub email: Option, + pub handle: String, + #[serde(rename = "indexedAt")] + pub indexed_at: chrono::DateTime, + #[serde(rename = "inviteNote")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub invite_note: Option, + #[serde(rename = "invitedBy")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub invited_by: Option, + #[serde(rename = "invitesDisabled")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub invites_disabled: Option, + pub moderation: ToolsOzoneModerationDefsModeration, + #[serde(rename = "relatedRecords")] + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub related_records: Vec, +} +impl std::fmt::Display for ToolsOzoneModerationDefsRepoView { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/tools_ozone_moderation_defs_repo_view_detail.rs b/src/model/tools_ozone_moderation_defs_repo_view_detail.rs new file mode 100644 index 0000000..2818f59 --- /dev/null +++ b/src/model/tools_ozone_moderation_defs_repo_view_detail.rs @@ -0,0 +1,39 @@ +use serde::{Serialize, Deserialize}; +use super::{ + ComAtprotoLabelDefsLabel, ComAtprotoServerDefsInviteCode, + ToolsOzoneModerationDefsModerationDetail, +}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ToolsOzoneModerationDefsRepoViewDetail { + pub did: String, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub email: Option, + #[serde(rename = "emailConfirmedAt")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub email_confirmed_at: Option>, + pub handle: String, + #[serde(rename = "indexedAt")] + pub indexed_at: chrono::DateTime, + #[serde(rename = "inviteNote")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub invite_note: Option, + #[serde(rename = "invitedBy")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub invited_by: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub invites: Option>, + #[serde(rename = "invitesDisabled")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub invites_disabled: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub labels: Option>, + pub moderation: ToolsOzoneModerationDefsModerationDetail, + #[serde(rename = "relatedRecords")] + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub related_records: Vec, +} +impl std::fmt::Display for ToolsOzoneModerationDefsRepoViewDetail { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/tools_ozone_moderation_defs_subject_status_view.rs b/src/model/tools_ozone_moderation_defs_subject_status_view.rs new file mode 100644 index 0000000..0ac9ac9 --- /dev/null +++ b/src/model/tools_ozone_moderation_defs_subject_status_view.rs @@ -0,0 +1,55 @@ +use serde::{Serialize, Deserialize}; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ToolsOzoneModerationDefsSubjectStatusView { + ///True indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub appealed: Option, + ///Sticky comment on the subject. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub comment: Option, + ///Timestamp referencing the first moderation status impacting event was emitted on the subject + #[serde(rename = "createdAt")] + pub created_at: chrono::DateTime, + pub id: i64, + ///Timestamp referencing when the author of the subject appealed a moderation action + #[serde(rename = "lastAppealedAt")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub last_appealed_at: Option>, + #[serde(rename = "lastReportedAt")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub last_reported_at: Option>, + #[serde(rename = "lastReviewedAt")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub last_reviewed_at: Option>, + #[serde(rename = "lastReviewedBy")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub last_reviewed_by: Option, + #[serde(rename = "muteUntil")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub mute_until: Option>, + #[serde(rename = "reviewState")] + pub review_state: String, + #[serde(default, skip_serializing_if = "serde_json::Value::is_null")] + pub subject: serde_json::Value, + #[serde(rename = "subjectBlobCids")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub subject_blob_cids: Option>, + #[serde(rename = "subjectRepoHandle")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub subject_repo_handle: Option, + #[serde(rename = "suspendUntil")] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub suspend_until: Option>, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub tags: Option>, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub takendown: Option, + ///Timestamp referencing when the last update was made to the moderation status of the subject + #[serde(rename = "updatedAt")] + pub updated_at: chrono::DateTime, +} +impl std::fmt::Display for ToolsOzoneModerationDefsSubjectStatusView { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/tools_ozone_moderation_query_events_response.rs b/src/model/tools_ozone_moderation_query_events_response.rs new file mode 100644 index 0000000..02927df --- /dev/null +++ b/src/model/tools_ozone_moderation_query_events_response.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +use super::ToolsOzoneModerationDefsModEventView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ToolsOzoneModerationQueryEventsResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub events: Vec, +} +impl std::fmt::Display for ToolsOzoneModerationQueryEventsResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/tools_ozone_moderation_query_statuses_response.rs b/src/model/tools_ozone_moderation_query_statuses_response.rs new file mode 100644 index 0000000..09c5d6c --- /dev/null +++ b/src/model/tools_ozone_moderation_query_statuses_response.rs @@ -0,0 +1,15 @@ +use serde::{Serialize, Deserialize}; +use super::ToolsOzoneModerationDefsSubjectStatusView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ToolsOzoneModerationQueryStatusesResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(rename = "subjectStatuses")] + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub subject_statuses: Vec, +} +impl std::fmt::Display for ToolsOzoneModerationQueryStatusesResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/model/tools_ozone_moderation_search_repos_response.rs b/src/model/tools_ozone_moderation_search_repos_response.rs new file mode 100644 index 0000000..4055b19 --- /dev/null +++ b/src/model/tools_ozone_moderation_search_repos_response.rs @@ -0,0 +1,14 @@ +use serde::{Serialize, Deserialize}; +use super::ToolsOzoneModerationDefsRepoView; +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ToolsOzoneModerationSearchReposResponse { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cursor: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub repos: Vec, +} +impl std::fmt::Display for ToolsOzoneModerationSearchReposResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} \ No newline at end of file diff --git a/src/request.rs b/src/request.rs new file mode 100644 index 0000000..44545ed --- /dev/null +++ b/src/request.rs @@ -0,0 +1,224 @@ +pub mod app_bsky_actor_get_preferences; +pub mod app_bsky_actor_get_profile; +pub mod app_bsky_actor_get_profiles; +pub mod app_bsky_actor_get_suggestions; +pub mod app_bsky_actor_put_preferences; +pub mod app_bsky_actor_search_actors; +pub mod app_bsky_actor_search_actors_typeahead; +pub mod app_bsky_feed_get_actor_feeds; +pub mod app_bsky_feed_get_actor_likes; +pub mod app_bsky_feed_get_author_feed; +pub mod app_bsky_feed_get_feed; +pub mod app_bsky_feed_get_feed_generator; +pub mod app_bsky_feed_get_feed_generators; +pub mod app_bsky_feed_get_likes; +pub mod app_bsky_feed_get_list_feed; +pub mod app_bsky_feed_get_post_thread; +pub mod app_bsky_feed_get_posts; +pub mod app_bsky_feed_get_reposted_by; +pub mod app_bsky_feed_get_suggested_feeds; +pub mod app_bsky_feed_get_timeline; +pub mod app_bsky_feed_search_posts; +pub mod app_bsky_graph_get_blocks; +pub mod app_bsky_graph_get_followers; +pub mod app_bsky_graph_get_follows; +pub mod app_bsky_graph_get_list; +pub mod app_bsky_graph_get_list_blocks; +pub mod app_bsky_graph_get_list_mutes; +pub mod app_bsky_graph_get_lists; +pub mod app_bsky_graph_get_mutes; +pub mod app_bsky_graph_get_suggested_follows_by_actor; +pub mod app_bsky_graph_mute_actor; +pub mod app_bsky_graph_mute_actor_list; +pub mod app_bsky_graph_unmute_actor; +pub mod app_bsky_graph_unmute_actor_list; +pub mod app_bsky_labeler_get_services; +pub mod app_bsky_notification_get_unread_count; +pub mod app_bsky_notification_list_notifications; +pub mod app_bsky_notification_register_push; +pub mod app_bsky_notification_update_seen; +pub mod app_bsky_unspecced_apply_labels; +pub mod app_bsky_unspecced_get_popular; +pub mod app_bsky_unspecced_get_popular_feed_generators; +pub mod app_bsky_unspecced_get_tagged_suggestions; +pub mod com_atproto_identity_get_recommended_did_credentials; +pub mod com_atproto_identity_request_plc_operation_signature; +pub mod com_atproto_identity_resolve_handle; +pub mod com_atproto_identity_sign_plc_operation; +pub mod com_atproto_identity_submit_plc_operation; +pub mod com_atproto_identity_update_handle; +pub mod com_atproto_moderation_create_report; +pub mod com_atproto_repo_apply_writes; +pub mod com_atproto_repo_create_record; +pub mod com_atproto_repo_delete_record; +pub mod com_atproto_repo_describe_repo; +pub mod com_atproto_repo_get_record; +pub mod com_atproto_repo_import_repo; +pub mod com_atproto_repo_list_missing_blobs; +pub mod com_atproto_repo_list_records; +pub mod com_atproto_repo_put_record; +pub mod com_atproto_repo_rebase_repo; +pub mod com_atproto_repo_upload_blob; +pub mod com_atproto_server_activate_account; +pub mod com_atproto_server_check_account_status; +pub mod com_atproto_server_confirm_email; +pub mod com_atproto_server_create_account; +pub mod com_atproto_server_create_app_password; +pub mod com_atproto_server_create_invite_code; +pub mod com_atproto_server_create_invite_codes; +pub mod com_atproto_server_create_session; +pub mod com_atproto_server_deactivate_account; +pub mod com_atproto_server_delete_account; +pub mod com_atproto_server_delete_session; +pub mod com_atproto_server_describe_server; +pub mod com_atproto_server_get_account_invite_codes; +pub mod com_atproto_server_get_service_auth; +pub mod com_atproto_server_get_session; +pub mod com_atproto_server_list_app_passwords; +pub mod com_atproto_server_refresh_session; +pub mod com_atproto_server_request_account_delete; +pub mod com_atproto_server_request_email_confirmation; +pub mod com_atproto_server_request_email_update; +pub mod com_atproto_server_request_password_reset; +pub mod com_atproto_server_reserve_signing_key; +pub mod com_atproto_server_reset_password; +pub mod com_atproto_server_revoke_app_password; +pub mod com_atproto_server_update_email; +pub mod com_atproto_sync_get_blob; +pub mod com_atproto_sync_get_blocks; +pub mod com_atproto_sync_get_checkout; +pub mod com_atproto_sync_get_commit_path; +pub mod com_atproto_sync_get_head; +pub mod com_atproto_sync_get_latest_commit; +pub mod com_atproto_sync_get_record; +pub mod com_atproto_sync_get_repo; +pub mod com_atproto_sync_list_blobs; +pub mod com_atproto_sync_list_repos; +pub mod com_atproto_temp_check_signup_queue; +pub mod com_atproto_temp_request_phone_verification; +pub mod com_atproto_temp_upgrade_repo_version; +pub mod tools_ozone_communication_create_template; +pub mod tools_ozone_communication_delete_template; +pub mod tools_ozone_communication_list_templates; +pub mod tools_ozone_communication_update_template; +pub mod tools_ozone_moderation_emit_event; +pub mod tools_ozone_moderation_get_event; +pub mod tools_ozone_moderation_get_record; +pub mod tools_ozone_moderation_get_repo; +pub mod tools_ozone_moderation_query_events; +pub mod tools_ozone_moderation_query_statuses; +pub mod tools_ozone_moderation_search_repos; +pub use app_bsky_actor_get_preferences::AppBskyActorGetPreferencesRequest; +pub use app_bsky_actor_get_profile::AppBskyActorGetProfileRequest; +pub use app_bsky_actor_get_profiles::AppBskyActorGetProfilesRequest; +pub use app_bsky_actor_get_suggestions::AppBskyActorGetSuggestionsRequest; +pub use app_bsky_actor_put_preferences::AppBskyActorPutPreferencesRequest; +pub use app_bsky_actor_search_actors::AppBskyActorSearchActorsRequest; +pub use app_bsky_actor_search_actors_typeahead::AppBskyActorSearchActorsTypeaheadRequest; +pub use app_bsky_feed_get_actor_feeds::AppBskyFeedGetActorFeedsRequest; +pub use app_bsky_feed_get_actor_likes::AppBskyFeedGetActorLikesRequest; +pub use app_bsky_feed_get_author_feed::AppBskyFeedGetAuthorFeedRequest; +pub use app_bsky_feed_get_feed::AppBskyFeedGetFeedRequest; +pub use app_bsky_feed_get_feed_generator::AppBskyFeedGetFeedGeneratorRequest; +pub use app_bsky_feed_get_feed_generators::AppBskyFeedGetFeedGeneratorsRequest; +pub use app_bsky_feed_get_likes::AppBskyFeedGetLikesRequest; +pub use app_bsky_feed_get_list_feed::AppBskyFeedGetListFeedRequest; +pub use app_bsky_feed_get_post_thread::AppBskyFeedGetPostThreadRequest; +pub use app_bsky_feed_get_posts::AppBskyFeedGetPostsRequest; +pub use app_bsky_feed_get_reposted_by::AppBskyFeedGetRepostedByRequest; +pub use app_bsky_feed_get_suggested_feeds::AppBskyFeedGetSuggestedFeedsRequest; +pub use app_bsky_feed_get_timeline::AppBskyFeedGetTimelineRequest; +pub use app_bsky_feed_search_posts::AppBskyFeedSearchPostsRequest; +pub use app_bsky_graph_get_blocks::AppBskyGraphGetBlocksRequest; +pub use app_bsky_graph_get_followers::AppBskyGraphGetFollowersRequest; +pub use app_bsky_graph_get_follows::AppBskyGraphGetFollowsRequest; +pub use app_bsky_graph_get_list::AppBskyGraphGetListRequest; +pub use app_bsky_graph_get_list_blocks::AppBskyGraphGetListBlocksRequest; +pub use app_bsky_graph_get_list_mutes::AppBskyGraphGetListMutesRequest; +pub use app_bsky_graph_get_lists::AppBskyGraphGetListsRequest; +pub use app_bsky_graph_get_mutes::AppBskyGraphGetMutesRequest; +pub use app_bsky_graph_get_suggested_follows_by_actor::AppBskyGraphGetSuggestedFollowsByActorRequest; +pub use app_bsky_graph_mute_actor::AppBskyGraphMuteActorRequest; +pub use app_bsky_graph_mute_actor_list::AppBskyGraphMuteActorListRequest; +pub use app_bsky_graph_unmute_actor::AppBskyGraphUnmuteActorRequest; +pub use app_bsky_graph_unmute_actor_list::AppBskyGraphUnmuteActorListRequest; +pub use app_bsky_labeler_get_services::AppBskyLabelerGetServicesRequest; +pub use app_bsky_notification_get_unread_count::AppBskyNotificationGetUnreadCountRequest; +pub use app_bsky_notification_list_notifications::AppBskyNotificationListNotificationsRequest; +pub use app_bsky_notification_register_push::{ + AppBskyNotificationRegisterPushRequest, AppBskyNotificationRegisterPushRequired, +}; +pub use app_bsky_notification_update_seen::AppBskyNotificationUpdateSeenRequest; +pub use app_bsky_unspecced_apply_labels::AppBskyUnspeccedApplyLabelsRequest; +pub use app_bsky_unspecced_get_popular::AppBskyUnspeccedGetPopularRequest; +pub use app_bsky_unspecced_get_popular_feed_generators::AppBskyUnspeccedGetPopularFeedGeneratorsRequest; +pub use app_bsky_unspecced_get_tagged_suggestions::AppBskyUnspeccedGetTaggedSuggestionsRequest; +pub use com_atproto_identity_get_recommended_did_credentials::ComAtprotoIdentityGetRecommendedDidCredentialsRequest; +pub use com_atproto_identity_request_plc_operation_signature::ComAtprotoIdentityRequestPlcOperationSignatureRequest; +pub use com_atproto_identity_resolve_handle::ComAtprotoIdentityResolveHandleRequest; +pub use com_atproto_identity_sign_plc_operation::ComAtprotoIdentitySignPlcOperationRequest; +pub use com_atproto_identity_submit_plc_operation::ComAtprotoIdentitySubmitPlcOperationRequest; +pub use com_atproto_identity_update_handle::ComAtprotoIdentityUpdateHandleRequest; +pub use com_atproto_moderation_create_report::ComAtprotoModerationCreateReportRequest; +pub use com_atproto_repo_apply_writes::ComAtprotoRepoApplyWritesRequest; +pub use com_atproto_repo_create_record::ComAtprotoRepoCreateRecordRequest; +pub use com_atproto_repo_delete_record::ComAtprotoRepoDeleteRecordRequest; +pub use com_atproto_repo_describe_repo::ComAtprotoRepoDescribeRepoRequest; +pub use com_atproto_repo_get_record::ComAtprotoRepoGetRecordRequest; +pub use com_atproto_repo_import_repo::ComAtprotoRepoImportRepoRequest; +pub use com_atproto_repo_list_missing_blobs::ComAtprotoRepoListMissingBlobsRequest; +pub use com_atproto_repo_list_records::ComAtprotoRepoListRecordsRequest; +pub use com_atproto_repo_put_record::{ + ComAtprotoRepoPutRecordRequest, ComAtprotoRepoPutRecordRequired, +}; +pub use com_atproto_repo_rebase_repo::ComAtprotoRepoRebaseRepoRequest; +pub use com_atproto_repo_upload_blob::ComAtprotoRepoUploadBlobRequest; +pub use com_atproto_server_activate_account::ComAtprotoServerActivateAccountRequest; +pub use com_atproto_server_check_account_status::ComAtprotoServerCheckAccountStatusRequest; +pub use com_atproto_server_confirm_email::ComAtprotoServerConfirmEmailRequest; +pub use com_atproto_server_create_account::ComAtprotoServerCreateAccountRequest; +pub use com_atproto_server_create_app_password::ComAtprotoServerCreateAppPasswordRequest; +pub use com_atproto_server_create_invite_code::ComAtprotoServerCreateInviteCodeRequest; +pub use com_atproto_server_create_invite_codes::ComAtprotoServerCreateInviteCodesRequest; +pub use com_atproto_server_create_session::ComAtprotoServerCreateSessionRequest; +pub use com_atproto_server_deactivate_account::ComAtprotoServerDeactivateAccountRequest; +pub use com_atproto_server_delete_account::ComAtprotoServerDeleteAccountRequest; +pub use com_atproto_server_delete_session::ComAtprotoServerDeleteSessionRequest; +pub use com_atproto_server_describe_server::ComAtprotoServerDescribeServerRequest; +pub use com_atproto_server_get_account_invite_codes::ComAtprotoServerGetAccountInviteCodesRequest; +pub use com_atproto_server_get_service_auth::ComAtprotoServerGetServiceAuthRequest; +pub use com_atproto_server_get_session::ComAtprotoServerGetSessionRequest; +pub use com_atproto_server_list_app_passwords::ComAtprotoServerListAppPasswordsRequest; +pub use com_atproto_server_refresh_session::ComAtprotoServerRefreshSessionRequest; +pub use com_atproto_server_request_account_delete::ComAtprotoServerRequestAccountDeleteRequest; +pub use com_atproto_server_request_email_confirmation::ComAtprotoServerRequestEmailConfirmationRequest; +pub use com_atproto_server_request_email_update::ComAtprotoServerRequestEmailUpdateRequest; +pub use com_atproto_server_request_password_reset::ComAtprotoServerRequestPasswordResetRequest; +pub use com_atproto_server_reserve_signing_key::ComAtprotoServerReserveSigningKeyRequest; +pub use com_atproto_server_reset_password::ComAtprotoServerResetPasswordRequest; +pub use com_atproto_server_revoke_app_password::ComAtprotoServerRevokeAppPasswordRequest; +pub use com_atproto_server_update_email::ComAtprotoServerUpdateEmailRequest; +pub use com_atproto_sync_get_blob::ComAtprotoSyncGetBlobRequest; +pub use com_atproto_sync_get_blocks::ComAtprotoSyncGetBlocksRequest; +pub use com_atproto_sync_get_checkout::ComAtprotoSyncGetCheckoutRequest; +pub use com_atproto_sync_get_commit_path::ComAtprotoSyncGetCommitPathRequest; +pub use com_atproto_sync_get_head::ComAtprotoSyncGetHeadRequest; +pub use com_atproto_sync_get_latest_commit::ComAtprotoSyncGetLatestCommitRequest; +pub use com_atproto_sync_get_record::ComAtprotoSyncGetRecordRequest; +pub use com_atproto_sync_get_repo::ComAtprotoSyncGetRepoRequest; +pub use com_atproto_sync_list_blobs::ComAtprotoSyncListBlobsRequest; +pub use com_atproto_sync_list_repos::ComAtprotoSyncListReposRequest; +pub use com_atproto_temp_check_signup_queue::ComAtprotoTempCheckSignupQueueRequest; +pub use com_atproto_temp_request_phone_verification::ComAtprotoTempRequestPhoneVerificationRequest; +pub use com_atproto_temp_upgrade_repo_version::ComAtprotoTempUpgradeRepoVersionRequest; +pub use tools_ozone_communication_create_template::ToolsOzoneCommunicationCreateTemplateRequest; +pub use tools_ozone_communication_delete_template::ToolsOzoneCommunicationDeleteTemplateRequest; +pub use tools_ozone_communication_list_templates::ToolsOzoneCommunicationListTemplatesRequest; +pub use tools_ozone_communication_update_template::ToolsOzoneCommunicationUpdateTemplateRequest; +pub use tools_ozone_moderation_emit_event::ToolsOzoneModerationEmitEventRequest; +pub use tools_ozone_moderation_get_event::ToolsOzoneModerationGetEventRequest; +pub use tools_ozone_moderation_get_record::ToolsOzoneModerationGetRecordRequest; +pub use tools_ozone_moderation_get_repo::ToolsOzoneModerationGetRepoRequest; +pub use tools_ozone_moderation_query_events::ToolsOzoneModerationQueryEventsRequest; +pub use tools_ozone_moderation_query_statuses::ToolsOzoneModerationQueryStatusesRequest; +pub use tools_ozone_moderation_search_repos::ToolsOzoneModerationSearchReposRequest; \ No newline at end of file diff --git a/src/request/app_bsky_actor_get_preferences.rs b/src/request/app_bsky_actor_get_preferences.rs new file mode 100644 index 0000000..f2fd7d4 --- /dev/null +++ b/src/request/app_bsky_actor_get_preferences.rs @@ -0,0 +1,27 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_actor_get_preferences`]. + +On request success, this will return a [`AppBskyActorGetPreferencesResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyActorGetPreferencesRequest {} +impl AppBskyActorGetPreferencesRequest {} +impl FluentRequest<'_, AppBskyActorGetPreferencesRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyActorGetPreferencesRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.actor.getPreferences"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_actor_get_profile.rs b/src/request/app_bsky_actor_get_profile.rs new file mode 100644 index 0000000..d147241 --- /dev/null +++ b/src/request/app_bsky_actor_get_profile.rs @@ -0,0 +1,28 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_actor_get_profile`]. + +On request success, this will return a [`AppBskyActorDefsProfileViewDetailed`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyActorGetProfileRequest { + pub actor: String, +} +impl AppBskyActorGetProfileRequest {} +impl FluentRequest<'_, AppBskyActorGetProfileRequest> {} +impl<'a> ::std::future::IntoFuture for FluentRequest<'a, AppBskyActorGetProfileRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.actor.getProfile"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_actor_get_profiles.rs b/src/request/app_bsky_actor_get_profiles.rs new file mode 100644 index 0000000..ede588e --- /dev/null +++ b/src/request/app_bsky_actor_get_profiles.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_actor_get_profiles`]. + +On request success, this will return a [`AppBskyActorGetProfilesResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyActorGetProfilesRequest { + pub actors: Vec, +} +impl AppBskyActorGetProfilesRequest {} +impl FluentRequest<'_, AppBskyActorGetProfilesRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyActorGetProfilesRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.actor.getProfiles"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_actor_get_suggestions.rs b/src/request/app_bsky_actor_get_suggestions.rs new file mode 100644 index 0000000..405b845 --- /dev/null +++ b/src/request/app_bsky_actor_get_suggestions.rs @@ -0,0 +1,41 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_actor_get_suggestions`]. + +On request success, this will return a [`AppBskyActorGetSuggestionsResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyActorGetSuggestionsRequest { + pub cursor: Option, + pub limit: Option, +} +impl AppBskyActorGetSuggestionsRequest {} +impl FluentRequest<'_, AppBskyActorGetSuggestionsRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyActorGetSuggestionsRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.actor.getSuggestions"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_actor_put_preferences.rs b/src/request/app_bsky_actor_put_preferences.rs new file mode 100644 index 0000000..f9f500e --- /dev/null +++ b/src/request/app_bsky_actor_put_preferences.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_actor_put_preferences`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyActorPutPreferencesRequest { + pub preferences: AppBskyActorDefsPreferences, +} +impl AppBskyActorPutPreferencesRequest {} +impl FluentRequest<'_, AppBskyActorPutPreferencesRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyActorPutPreferencesRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.actor.putPreferences"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "preferences" : self.params.preferences })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_actor_search_actors.rs b/src/request/app_bsky_actor_search_actors.rs new file mode 100644 index 0000000..4354ff2 --- /dev/null +++ b/src/request/app_bsky_actor_search_actors.rs @@ -0,0 +1,53 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_actor_search_actors`]. + +On request success, this will return a [`AppBskyActorSearchActorsResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyActorSearchActorsRequest { + pub cursor: Option, + pub limit: Option, + pub q: Option, + pub term: Option, +} +impl AppBskyActorSearchActorsRequest {} +impl FluentRequest<'_, AppBskyActorSearchActorsRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } + ///Set the value of the q field. + pub fn q(mut self, q: &str) -> Self { + self.params.q = Some(q.to_owned()); + self + } + ///Set the value of the term field. + pub fn term(mut self, term: &str) -> Self { + self.params.term = Some(term.to_owned()); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyActorSearchActorsRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.actor.searchActors"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_actor_search_actors_typeahead.rs b/src/request/app_bsky_actor_search_actors_typeahead.rs new file mode 100644 index 0000000..5b3b3f6 --- /dev/null +++ b/src/request/app_bsky_actor_search_actors_typeahead.rs @@ -0,0 +1,47 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_actor_search_actors_typeahead`]. + +On request success, this will return a [`AppBskyActorSearchActorsTypeaheadResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyActorSearchActorsTypeaheadRequest { + pub limit: Option, + pub q: Option, + pub term: Option, +} +impl AppBskyActorSearchActorsTypeaheadRequest {} +impl FluentRequest<'_, AppBskyActorSearchActorsTypeaheadRequest> { + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } + ///Set the value of the q field. + pub fn q(mut self, q: &str) -> Self { + self.params.q = Some(q.to_owned()); + self + } + ///Set the value of the term field. + pub fn term(mut self, term: &str) -> Self { + self.params.term = Some(term.to_owned()); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyActorSearchActorsTypeaheadRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.actor.searchActorsTypeahead"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_feed_get_actor_feeds.rs b/src/request/app_bsky_feed_get_actor_feeds.rs new file mode 100644 index 0000000..6524c07 --- /dev/null +++ b/src/request/app_bsky_feed_get_actor_feeds.rs @@ -0,0 +1,42 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_feed_get_actor_feeds`]. + +On request success, this will return a [`AppBskyFeedGetActorFeedsResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyFeedGetActorFeedsRequest { + pub actor: String, + pub cursor: Option, + pub limit: Option, +} +impl AppBskyFeedGetActorFeedsRequest {} +impl FluentRequest<'_, AppBskyFeedGetActorFeedsRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyFeedGetActorFeedsRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.feed.getActorFeeds"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_feed_get_actor_likes.rs b/src/request/app_bsky_feed_get_actor_likes.rs new file mode 100644 index 0000000..cde21f4 --- /dev/null +++ b/src/request/app_bsky_feed_get_actor_likes.rs @@ -0,0 +1,42 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_feed_get_actor_likes`]. + +On request success, this will return a [`AppBskyFeedGetActorLikesResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyFeedGetActorLikesRequest { + pub actor: String, + pub cursor: Option, + pub limit: Option, +} +impl AppBskyFeedGetActorLikesRequest {} +impl FluentRequest<'_, AppBskyFeedGetActorLikesRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyFeedGetActorLikesRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.feed.getActorLikes"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_feed_get_author_feed.rs b/src/request/app_bsky_feed_get_author_feed.rs new file mode 100644 index 0000000..e9f8334 --- /dev/null +++ b/src/request/app_bsky_feed_get_author_feed.rs @@ -0,0 +1,48 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_feed_get_author_feed`]. + +On request success, this will return a [`AppBskyFeedGetAuthorFeedResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyFeedGetAuthorFeedRequest { + pub actor: String, + pub cursor: Option, + pub filter: Option, + pub limit: Option, +} +impl AppBskyFeedGetAuthorFeedRequest {} +impl FluentRequest<'_, AppBskyFeedGetAuthorFeedRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the filter field. + pub fn filter(mut self, filter: &str) -> Self { + self.params.filter = Some(filter.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyFeedGetAuthorFeedRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.feed.getAuthorFeed"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_feed_get_feed.rs b/src/request/app_bsky_feed_get_feed.rs new file mode 100644 index 0000000..2439f6e --- /dev/null +++ b/src/request/app_bsky_feed_get_feed.rs @@ -0,0 +1,41 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_feed_get_feed`]. + +On request success, this will return a [`AppBskyFeedGetFeedResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyFeedGetFeedRequest { + pub cursor: Option, + pub feed: String, + pub limit: Option, +} +impl AppBskyFeedGetFeedRequest {} +impl FluentRequest<'_, AppBskyFeedGetFeedRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } +} +impl<'a> ::std::future::IntoFuture for FluentRequest<'a, AppBskyFeedGetFeedRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.feed.getFeed"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_feed_get_feed_generator.rs b/src/request/app_bsky_feed_get_feed_generator.rs new file mode 100644 index 0000000..798ebd6 --- /dev/null +++ b/src/request/app_bsky_feed_get_feed_generator.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_feed_get_feed_generator`]. + +On request success, this will return a [`AppBskyFeedGetFeedGeneratorResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyFeedGetFeedGeneratorRequest { + pub feed: String, +} +impl AppBskyFeedGetFeedGeneratorRequest {} +impl FluentRequest<'_, AppBskyFeedGetFeedGeneratorRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyFeedGetFeedGeneratorRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.feed.getFeedGenerator"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_feed_get_feed_generators.rs b/src/request/app_bsky_feed_get_feed_generators.rs new file mode 100644 index 0000000..ef4c1b4 --- /dev/null +++ b/src/request/app_bsky_feed_get_feed_generators.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_feed_get_feed_generators`]. + +On request success, this will return a [`AppBskyFeedGetFeedGeneratorsResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyFeedGetFeedGeneratorsRequest { + pub feeds: Vec, +} +impl AppBskyFeedGetFeedGeneratorsRequest {} +impl FluentRequest<'_, AppBskyFeedGetFeedGeneratorsRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyFeedGetFeedGeneratorsRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.feed.getFeedGenerators"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_feed_get_likes.rs b/src/request/app_bsky_feed_get_likes.rs new file mode 100644 index 0000000..233d095 --- /dev/null +++ b/src/request/app_bsky_feed_get_likes.rs @@ -0,0 +1,47 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_feed_get_likes`]. + +On request success, this will return a [`AppBskyFeedGetLikesResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyFeedGetLikesRequest { + pub cid: Option, + pub cursor: Option, + pub limit: Option, + pub uri: String, +} +impl AppBskyFeedGetLikesRequest {} +impl FluentRequest<'_, AppBskyFeedGetLikesRequest> { + ///Set the value of the cid field. + pub fn cid(mut self, cid: &str) -> Self { + self.params.cid = Some(cid.to_owned()); + self + } + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } +} +impl<'a> ::std::future::IntoFuture for FluentRequest<'a, AppBskyFeedGetLikesRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.feed.getLikes"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_feed_get_list_feed.rs b/src/request/app_bsky_feed_get_list_feed.rs new file mode 100644 index 0000000..7089a15 --- /dev/null +++ b/src/request/app_bsky_feed_get_list_feed.rs @@ -0,0 +1,41 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_feed_get_list_feed`]. + +On request success, this will return a [`AppBskyFeedGetListFeedResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyFeedGetListFeedRequest { + pub cursor: Option, + pub limit: Option, + pub list: String, +} +impl AppBskyFeedGetListFeedRequest {} +impl FluentRequest<'_, AppBskyFeedGetListFeedRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } +} +impl<'a> ::std::future::IntoFuture for FluentRequest<'a, AppBskyFeedGetListFeedRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.feed.getListFeed"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_feed_get_post_thread.rs b/src/request/app_bsky_feed_get_post_thread.rs new file mode 100644 index 0000000..04b1d19 --- /dev/null +++ b/src/request/app_bsky_feed_get_post_thread.rs @@ -0,0 +1,42 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_feed_get_post_thread`]. + +On request success, this will return a [`AppBskyFeedGetPostThreadResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyFeedGetPostThreadRequest { + pub depth: Option, + pub parent_height: Option, + pub uri: String, +} +impl AppBskyFeedGetPostThreadRequest {} +impl FluentRequest<'_, AppBskyFeedGetPostThreadRequest> { + ///Set the value of the depth field. + pub fn depth(mut self, depth: i64) -> Self { + self.params.depth = Some(depth); + self + } + ///Set the value of the parent_height field. + pub fn parent_height(mut self, parent_height: i64) -> Self { + self.params.parent_height = Some(parent_height); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyFeedGetPostThreadRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.feed.getPostThread"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_feed_get_posts.rs b/src/request/app_bsky_feed_get_posts.rs new file mode 100644 index 0000000..4a62198 --- /dev/null +++ b/src/request/app_bsky_feed_get_posts.rs @@ -0,0 +1,28 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_feed_get_posts`]. + +On request success, this will return a [`AppBskyFeedGetPostsResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyFeedGetPostsRequest { + pub uris: Vec, +} +impl AppBskyFeedGetPostsRequest {} +impl FluentRequest<'_, AppBskyFeedGetPostsRequest> {} +impl<'a> ::std::future::IntoFuture for FluentRequest<'a, AppBskyFeedGetPostsRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.feed.getPosts"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_feed_get_reposted_by.rs b/src/request/app_bsky_feed_get_reposted_by.rs new file mode 100644 index 0000000..6b880b7 --- /dev/null +++ b/src/request/app_bsky_feed_get_reposted_by.rs @@ -0,0 +1,48 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_feed_get_reposted_by`]. + +On request success, this will return a [`AppBskyFeedGetRepostedByResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyFeedGetRepostedByRequest { + pub cid: Option, + pub cursor: Option, + pub limit: Option, + pub uri: String, +} +impl AppBskyFeedGetRepostedByRequest {} +impl FluentRequest<'_, AppBskyFeedGetRepostedByRequest> { + ///Set the value of the cid field. + pub fn cid(mut self, cid: &str) -> Self { + self.params.cid = Some(cid.to_owned()); + self + } + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyFeedGetRepostedByRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.feed.getRepostedBy"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_feed_get_suggested_feeds.rs b/src/request/app_bsky_feed_get_suggested_feeds.rs new file mode 100644 index 0000000..4ee16bf --- /dev/null +++ b/src/request/app_bsky_feed_get_suggested_feeds.rs @@ -0,0 +1,41 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_feed_get_suggested_feeds`]. + +On request success, this will return a [`AppBskyFeedGetSuggestedFeedsResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyFeedGetSuggestedFeedsRequest { + pub cursor: Option, + pub limit: Option, +} +impl AppBskyFeedGetSuggestedFeedsRequest {} +impl FluentRequest<'_, AppBskyFeedGetSuggestedFeedsRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyFeedGetSuggestedFeedsRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.feed.getSuggestedFeeds"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_feed_get_timeline.rs b/src/request/app_bsky_feed_get_timeline.rs new file mode 100644 index 0000000..89079da --- /dev/null +++ b/src/request/app_bsky_feed_get_timeline.rs @@ -0,0 +1,46 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_feed_get_timeline`]. + +On request success, this will return a [`AppBskyFeedGetTimelineResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyFeedGetTimelineRequest { + pub algorithm: Option, + pub cursor: Option, + pub limit: Option, +} +impl AppBskyFeedGetTimelineRequest {} +impl FluentRequest<'_, AppBskyFeedGetTimelineRequest> { + ///Set the value of the algorithm field. + pub fn algorithm(mut self, algorithm: &str) -> Self { + self.params.algorithm = Some(algorithm.to_owned()); + self + } + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } +} +impl<'a> ::std::future::IntoFuture for FluentRequest<'a, AppBskyFeedGetTimelineRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.feed.getTimeline"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_feed_search_posts.rs b/src/request/app_bsky_feed_search_posts.rs new file mode 100644 index 0000000..8f2a6ee --- /dev/null +++ b/src/request/app_bsky_feed_search_posts.rs @@ -0,0 +1,41 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_feed_search_posts`]. + +On request success, this will return a [`AppBskyFeedSearchPostsResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyFeedSearchPostsRequest { + pub cursor: Option, + pub limit: Option, + pub q: String, +} +impl AppBskyFeedSearchPostsRequest {} +impl FluentRequest<'_, AppBskyFeedSearchPostsRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } +} +impl<'a> ::std::future::IntoFuture for FluentRequest<'a, AppBskyFeedSearchPostsRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.feed.searchPosts"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_graph_get_blocks.rs b/src/request/app_bsky_graph_get_blocks.rs new file mode 100644 index 0000000..15a1d02 --- /dev/null +++ b/src/request/app_bsky_graph_get_blocks.rs @@ -0,0 +1,40 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_graph_get_blocks`]. + +On request success, this will return a [`AppBskyGraphGetBlocksResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyGraphGetBlocksRequest { + pub cursor: Option, + pub limit: Option, +} +impl AppBskyGraphGetBlocksRequest {} +impl FluentRequest<'_, AppBskyGraphGetBlocksRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } +} +impl<'a> ::std::future::IntoFuture for FluentRequest<'a, AppBskyGraphGetBlocksRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.graph.getBlocks"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_graph_get_followers.rs b/src/request/app_bsky_graph_get_followers.rs new file mode 100644 index 0000000..32f315e --- /dev/null +++ b/src/request/app_bsky_graph_get_followers.rs @@ -0,0 +1,42 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_graph_get_followers`]. + +On request success, this will return a [`AppBskyGraphGetFollowersResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyGraphGetFollowersRequest { + pub actor: String, + pub cursor: Option, + pub limit: Option, +} +impl AppBskyGraphGetFollowersRequest {} +impl FluentRequest<'_, AppBskyGraphGetFollowersRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyGraphGetFollowersRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.graph.getFollowers"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_graph_get_follows.rs b/src/request/app_bsky_graph_get_follows.rs new file mode 100644 index 0000000..7c054ae --- /dev/null +++ b/src/request/app_bsky_graph_get_follows.rs @@ -0,0 +1,41 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_graph_get_follows`]. + +On request success, this will return a [`AppBskyGraphGetFollowsResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyGraphGetFollowsRequest { + pub actor: String, + pub cursor: Option, + pub limit: Option, +} +impl AppBskyGraphGetFollowsRequest {} +impl FluentRequest<'_, AppBskyGraphGetFollowsRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } +} +impl<'a> ::std::future::IntoFuture for FluentRequest<'a, AppBskyGraphGetFollowsRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.graph.getFollows"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_graph_get_list.rs b/src/request/app_bsky_graph_get_list.rs new file mode 100644 index 0000000..5c62d1c --- /dev/null +++ b/src/request/app_bsky_graph_get_list.rs @@ -0,0 +1,41 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_graph_get_list`]. + +On request success, this will return a [`AppBskyGraphGetListResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyGraphGetListRequest { + pub cursor: Option, + pub limit: Option, + pub list: String, +} +impl AppBskyGraphGetListRequest {} +impl FluentRequest<'_, AppBskyGraphGetListRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } +} +impl<'a> ::std::future::IntoFuture for FluentRequest<'a, AppBskyGraphGetListRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.graph.getList"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_graph_get_list_blocks.rs b/src/request/app_bsky_graph_get_list_blocks.rs new file mode 100644 index 0000000..74a61c4 --- /dev/null +++ b/src/request/app_bsky_graph_get_list_blocks.rs @@ -0,0 +1,41 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_graph_get_list_blocks`]. + +On request success, this will return a [`AppBskyGraphGetListBlocksResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyGraphGetListBlocksRequest { + pub cursor: Option, + pub limit: Option, +} +impl AppBskyGraphGetListBlocksRequest {} +impl FluentRequest<'_, AppBskyGraphGetListBlocksRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyGraphGetListBlocksRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.graph.getListBlocks"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_graph_get_list_mutes.rs b/src/request/app_bsky_graph_get_list_mutes.rs new file mode 100644 index 0000000..238993f --- /dev/null +++ b/src/request/app_bsky_graph_get_list_mutes.rs @@ -0,0 +1,41 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_graph_get_list_mutes`]. + +On request success, this will return a [`AppBskyGraphGetListMutesResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyGraphGetListMutesRequest { + pub cursor: Option, + pub limit: Option, +} +impl AppBskyGraphGetListMutesRequest {} +impl FluentRequest<'_, AppBskyGraphGetListMutesRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyGraphGetListMutesRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.graph.getListMutes"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_graph_get_lists.rs b/src/request/app_bsky_graph_get_lists.rs new file mode 100644 index 0000000..fcab9a6 --- /dev/null +++ b/src/request/app_bsky_graph_get_lists.rs @@ -0,0 +1,41 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_graph_get_lists`]. + +On request success, this will return a [`AppBskyGraphGetListsResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyGraphGetListsRequest { + pub actor: String, + pub cursor: Option, + pub limit: Option, +} +impl AppBskyGraphGetListsRequest {} +impl FluentRequest<'_, AppBskyGraphGetListsRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } +} +impl<'a> ::std::future::IntoFuture for FluentRequest<'a, AppBskyGraphGetListsRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.graph.getLists"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_graph_get_mutes.rs b/src/request/app_bsky_graph_get_mutes.rs new file mode 100644 index 0000000..c74c592 --- /dev/null +++ b/src/request/app_bsky_graph_get_mutes.rs @@ -0,0 +1,40 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_graph_get_mutes`]. + +On request success, this will return a [`AppBskyGraphGetMutesResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyGraphGetMutesRequest { + pub cursor: Option, + pub limit: Option, +} +impl AppBskyGraphGetMutesRequest {} +impl FluentRequest<'_, AppBskyGraphGetMutesRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } +} +impl<'a> ::std::future::IntoFuture for FluentRequest<'a, AppBskyGraphGetMutesRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.graph.getMutes"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_graph_get_suggested_follows_by_actor.rs b/src/request/app_bsky_graph_get_suggested_follows_by_actor.rs new file mode 100644 index 0000000..7d35400 --- /dev/null +++ b/src/request/app_bsky_graph_get_suggested_follows_by_actor.rs @@ -0,0 +1,31 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_graph_get_suggested_follows_by_actor`]. + +On request success, this will return a [`AppBskyGraphGetSuggestedFollowsByActorResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyGraphGetSuggestedFollowsByActorRequest { + pub actor: String, +} +impl AppBskyGraphGetSuggestedFollowsByActorRequest {} +impl FluentRequest<'_, AppBskyGraphGetSuggestedFollowsByActorRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyGraphGetSuggestedFollowsByActorRequest> { + type Output = httpclient::InMemoryResult< + AppBskyGraphGetSuggestedFollowsByActorResponse, + >; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.graph.getSuggestedFollowsByActor"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_graph_mute_actor.rs b/src/request/app_bsky_graph_mute_actor.rs new file mode 100644 index 0000000..b9323b7 --- /dev/null +++ b/src/request/app_bsky_graph_mute_actor.rs @@ -0,0 +1,28 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_graph_mute_actor`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyGraphMuteActorRequest { + pub actor: String, +} +impl AppBskyGraphMuteActorRequest {} +impl FluentRequest<'_, AppBskyGraphMuteActorRequest> {} +impl<'a> ::std::future::IntoFuture for FluentRequest<'a, AppBskyGraphMuteActorRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.graph.muteActor"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "actor" : self.params.actor })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_graph_mute_actor_list.rs b/src/request/app_bsky_graph_mute_actor_list.rs new file mode 100644 index 0000000..627f868 --- /dev/null +++ b/src/request/app_bsky_graph_mute_actor_list.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_graph_mute_actor_list`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyGraphMuteActorListRequest { + pub list: String, +} +impl AppBskyGraphMuteActorListRequest {} +impl FluentRequest<'_, AppBskyGraphMuteActorListRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyGraphMuteActorListRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.graph.muteActorList"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "list" : self.params.list })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_graph_unmute_actor.rs b/src/request/app_bsky_graph_unmute_actor.rs new file mode 100644 index 0000000..672aa91 --- /dev/null +++ b/src/request/app_bsky_graph_unmute_actor.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_graph_unmute_actor`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyGraphUnmuteActorRequest { + pub actor: String, +} +impl AppBskyGraphUnmuteActorRequest {} +impl FluentRequest<'_, AppBskyGraphUnmuteActorRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyGraphUnmuteActorRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.graph.unmuteActor"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "actor" : self.params.actor })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_graph_unmute_actor_list.rs b/src/request/app_bsky_graph_unmute_actor_list.rs new file mode 100644 index 0000000..a70fd76 --- /dev/null +++ b/src/request/app_bsky_graph_unmute_actor_list.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_graph_unmute_actor_list`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyGraphUnmuteActorListRequest { + pub list: String, +} +impl AppBskyGraphUnmuteActorListRequest {} +impl FluentRequest<'_, AppBskyGraphUnmuteActorListRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyGraphUnmuteActorListRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.graph.unmuteActorList"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "list" : self.params.list })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_labeler_get_services.rs b/src/request/app_bsky_labeler_get_services.rs new file mode 100644 index 0000000..53867d4 --- /dev/null +++ b/src/request/app_bsky_labeler_get_services.rs @@ -0,0 +1,36 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_labeler_get_services`]. + +On request success, this will return a [`AppBskyLabelerGetServicesResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyLabelerGetServicesRequest { + pub detailed: Option, + pub dids: Vec, +} +impl AppBskyLabelerGetServicesRequest {} +impl FluentRequest<'_, AppBskyLabelerGetServicesRequest> { + ///Set the value of the detailed field. + pub fn detailed(mut self, detailed: bool) -> Self { + self.params.detailed = Some(detailed); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyLabelerGetServicesRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.labeler.getServices"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_notification_get_unread_count.rs b/src/request/app_bsky_notification_get_unread_count.rs new file mode 100644 index 0000000..f4ea367 --- /dev/null +++ b/src/request/app_bsky_notification_get_unread_count.rs @@ -0,0 +1,35 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_notification_get_unread_count`]. + +On request success, this will return a [`AppBskyNotificationGetUnreadCountResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyNotificationGetUnreadCountRequest { + pub seen_at: Option>, +} +impl AppBskyNotificationGetUnreadCountRequest {} +impl FluentRequest<'_, AppBskyNotificationGetUnreadCountRequest> { + ///Set the value of the seen_at field. + pub fn seen_at(mut self, seen_at: chrono::DateTime) -> Self { + self.params.seen_at = Some(seen_at); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyNotificationGetUnreadCountRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.notification.getUnreadCount"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_notification_list_notifications.rs b/src/request/app_bsky_notification_list_notifications.rs new file mode 100644 index 0000000..27c01ed --- /dev/null +++ b/src/request/app_bsky_notification_list_notifications.rs @@ -0,0 +1,49 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_notification_list_notifications`]. + +On request success, this will return a [`AppBskyNotificationListNotificationsResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyNotificationListNotificationsRequest { + pub cursor: Option, + pub limit: Option, + pub seen_at: Option>, +} +impl AppBskyNotificationListNotificationsRequest {} +impl FluentRequest<'_, AppBskyNotificationListNotificationsRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } + ///Set the value of the seen_at field. + pub fn seen_at(mut self, seen_at: chrono::DateTime) -> Self { + self.params.seen_at = Some(seen_at); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyNotificationListNotificationsRequest> { + type Output = httpclient::InMemoryResult< + AppBskyNotificationListNotificationsResponse, + >; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.notification.listNotifications"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_notification_register_push.rs b/src/request/app_bsky_notification_register_push.rs new file mode 100644 index 0000000..a29575d --- /dev/null +++ b/src/request/app_bsky_notification_register_push.rs @@ -0,0 +1,42 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_notification_register_push`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyNotificationRegisterPushRequest { + pub app_id: String, + pub platform: String, + pub service_did: String, + pub token: String, +} +impl AppBskyNotificationRegisterPushRequest {} +pub struct AppBskyNotificationRegisterPushRequired<'a> { + pub app_id: &'a str, + pub platform: &'a str, + pub service_did: &'a str, + pub token: &'a str, +} +impl<'a> AppBskyNotificationRegisterPushRequired<'a> {} +impl FluentRequest<'_, AppBskyNotificationRegisterPushRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyNotificationRegisterPushRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.notification.registerPush"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "appId" : self.params.app_id })); + r = r.json(json!({ "platform" : self.params.platform })); + r = r.json(json!({ "serviceDid" : self.params.service_did })); + r = r.json(json!({ "token" : self.params.token })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_notification_update_seen.rs b/src/request/app_bsky_notification_update_seen.rs new file mode 100644 index 0000000..8eeb33b --- /dev/null +++ b/src/request/app_bsky_notification_update_seen.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_notification_update_seen`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyNotificationUpdateSeenRequest { + pub seen_at: chrono::DateTime, +} +impl AppBskyNotificationUpdateSeenRequest {} +impl FluentRequest<'_, AppBskyNotificationUpdateSeenRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyNotificationUpdateSeenRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.notification.updateSeen"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "seenAt" : self.params.seen_at })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_unspecced_apply_labels.rs b/src/request/app_bsky_unspecced_apply_labels.rs new file mode 100644 index 0000000..71857f7 --- /dev/null +++ b/src/request/app_bsky_unspecced_apply_labels.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_unspecced_apply_labels`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyUnspeccedApplyLabelsRequest { + pub labels: Vec, +} +impl AppBskyUnspeccedApplyLabelsRequest {} +impl FluentRequest<'_, AppBskyUnspeccedApplyLabelsRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyUnspeccedApplyLabelsRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.unspecced.applyLabels"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "labels" : self.params.labels })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_unspecced_get_popular.rs b/src/request/app_bsky_unspecced_get_popular.rs new file mode 100644 index 0000000..12dc449 --- /dev/null +++ b/src/request/app_bsky_unspecced_get_popular.rs @@ -0,0 +1,47 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_unspecced_get_popular`]. + +On request success, this will return a [`AppBskyUnspeccedGetPopularResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyUnspeccedGetPopularRequest { + pub cursor: Option, + pub include_nsfw: Option, + pub limit: Option, +} +impl AppBskyUnspeccedGetPopularRequest {} +impl FluentRequest<'_, AppBskyUnspeccedGetPopularRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the include_nsfw field. + pub fn include_nsfw(mut self, include_nsfw: bool) -> Self { + self.params.include_nsfw = Some(include_nsfw); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyUnspeccedGetPopularRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.unspecced.getPopular"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_unspecced_get_popular_feed_generators.rs b/src/request/app_bsky_unspecced_get_popular_feed_generators.rs new file mode 100644 index 0000000..6cca3cb --- /dev/null +++ b/src/request/app_bsky_unspecced_get_popular_feed_generators.rs @@ -0,0 +1,49 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_unspecced_get_popular_feed_generators`]. + +On request success, this will return a [`AppBskyUnspeccedGetPopularFeedGeneratorsResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyUnspeccedGetPopularFeedGeneratorsRequest { + pub cursor: Option, + pub limit: Option, + pub query: Option, +} +impl AppBskyUnspeccedGetPopularFeedGeneratorsRequest {} +impl FluentRequest<'_, AppBskyUnspeccedGetPopularFeedGeneratorsRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } + ///Set the value of the query field. + pub fn query(mut self, query: &str) -> Self { + self.params.query = Some(query.to_owned()); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyUnspeccedGetPopularFeedGeneratorsRequest> { + type Output = httpclient::InMemoryResult< + AppBskyUnspeccedGetPopularFeedGeneratorsResponse, + >; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.unspecced.getPopularFeedGenerators"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/app_bsky_unspecced_get_tagged_suggestions.rs b/src/request/app_bsky_unspecced_get_tagged_suggestions.rs new file mode 100644 index 0000000..332e945 --- /dev/null +++ b/src/request/app_bsky_unspecced_get_tagged_suggestions.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::app_bsky_unspecced_get_tagged_suggestions`]. + +On request success, this will return a [`AppBskyUnspeccedGetTaggedSuggestionsResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppBskyUnspeccedGetTaggedSuggestionsRequest {} +impl AppBskyUnspeccedGetTaggedSuggestionsRequest {} +impl FluentRequest<'_, AppBskyUnspeccedGetTaggedSuggestionsRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, AppBskyUnspeccedGetTaggedSuggestionsRequest> { + type Output = httpclient::InMemoryResult< + AppBskyUnspeccedGetTaggedSuggestionsResponse, + >; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/app.bsky.unspecced.getTaggedSuggestions"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_identity_get_recommended_did_credentials.rs b/src/request/com_atproto_identity_get_recommended_did_credentials.rs new file mode 100644 index 0000000..8fcbcdc --- /dev/null +++ b/src/request/com_atproto_identity_get_recommended_did_credentials.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_identity_get_recommended_did_credentials`]. + +On request success, this will return a [`ComAtprotoIdentityGetRecommendedDidCredentialsResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoIdentityGetRecommendedDidCredentialsRequest {} +impl ComAtprotoIdentityGetRecommendedDidCredentialsRequest {} +impl FluentRequest<'_, ComAtprotoIdentityGetRecommendedDidCredentialsRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoIdentityGetRecommendedDidCredentialsRequest> { + type Output = httpclient::InMemoryResult< + ComAtprotoIdentityGetRecommendedDidCredentialsResponse, + >; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.identity.getRecommendedDidCredentials"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_identity_request_plc_operation_signature.rs b/src/request/com_atproto_identity_request_plc_operation_signature.rs new file mode 100644 index 0000000..c2fea17 --- /dev/null +++ b/src/request/com_atproto_identity_request_plc_operation_signature.rs @@ -0,0 +1,27 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_identity_request_plc_operation_signature`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoIdentityRequestPlcOperationSignatureRequest {} +impl ComAtprotoIdentityRequestPlcOperationSignatureRequest {} +impl FluentRequest<'_, ComAtprotoIdentityRequestPlcOperationSignatureRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoIdentityRequestPlcOperationSignatureRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.identity.requestPlcOperationSignature"; + let mut r = self.client.client.post(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_identity_resolve_handle.rs b/src/request/com_atproto_identity_resolve_handle.rs new file mode 100644 index 0000000..4b72eae --- /dev/null +++ b/src/request/com_atproto_identity_resolve_handle.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_identity_resolve_handle`]. + +On request success, this will return a [`ComAtprotoIdentityResolveHandleResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoIdentityResolveHandleRequest { + pub handle: String, +} +impl ComAtprotoIdentityResolveHandleRequest {} +impl FluentRequest<'_, ComAtprotoIdentityResolveHandleRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoIdentityResolveHandleRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.identity.resolveHandle"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_identity_sign_plc_operation.rs b/src/request/com_atproto_identity_sign_plc_operation.rs new file mode 100644 index 0000000..41b83f2 --- /dev/null +++ b/src/request/com_atproto_identity_sign_plc_operation.rs @@ -0,0 +1,90 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_identity_sign_plc_operation`]. + +On request success, this will return a [`ComAtprotoIdentitySignPlcOperationResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoIdentitySignPlcOperationRequest { + pub also_known_as: Option>, + pub rotation_keys: Option>, + pub services: Option, + pub token: Option, + pub verification_methods: Option, +} +impl ComAtprotoIdentitySignPlcOperationRequest {} +impl FluentRequest<'_, ComAtprotoIdentitySignPlcOperationRequest> { + ///Set the value of the also_known_as field. + pub fn also_known_as( + mut self, + also_known_as: impl IntoIterator>, + ) -> Self { + self + .params + .also_known_as = Some( + also_known_as.into_iter().map(|s| s.as_ref().to_owned()).collect(), + ); + self + } + ///Set the value of the rotation_keys field. + pub fn rotation_keys( + mut self, + rotation_keys: impl IntoIterator>, + ) -> Self { + self + .params + .rotation_keys = Some( + rotation_keys.into_iter().map(|s| s.as_ref().to_owned()).collect(), + ); + self + } + ///Set the value of the services field. + pub fn services(mut self, services: serde_json::Value) -> Self { + self.params.services = Some(services); + self + } + ///Set the value of the token field. + pub fn token(mut self, token: &str) -> Self { + self.params.token = Some(token.to_owned()); + self + } + ///Set the value of the verification_methods field. + pub fn verification_methods( + mut self, + verification_methods: serde_json::Value, + ) -> Self { + self.params.verification_methods = Some(verification_methods); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoIdentitySignPlcOperationRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.identity.signPlcOperation"; + let mut r = self.client.client.post(url); + if let Some(ref unwrapped) = self.params.also_known_as { + r = r.json(json!({ "alsoKnownAs" : unwrapped })); + } + if let Some(ref unwrapped) = self.params.rotation_keys { + r = r.json(json!({ "rotationKeys" : unwrapped })); + } + if let Some(ref unwrapped) = self.params.services { + r = r.json(json!({ "services" : unwrapped })); + } + if let Some(ref unwrapped) = self.params.token { + r = r.json(json!({ "token" : unwrapped })); + } + if let Some(ref unwrapped) = self.params.verification_methods { + r = r.json(json!({ "verificationMethods" : unwrapped })); + } + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_identity_submit_plc_operation.rs b/src/request/com_atproto_identity_submit_plc_operation.rs new file mode 100644 index 0000000..5a16c3e --- /dev/null +++ b/src/request/com_atproto_identity_submit_plc_operation.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_identity_submit_plc_operation`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoIdentitySubmitPlcOperationRequest { + pub operation: serde_json::Value, +} +impl ComAtprotoIdentitySubmitPlcOperationRequest {} +impl FluentRequest<'_, ComAtprotoIdentitySubmitPlcOperationRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoIdentitySubmitPlcOperationRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.identity.submitPlcOperation"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "operation" : self.params.operation })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_identity_update_handle.rs b/src/request/com_atproto_identity_update_handle.rs new file mode 100644 index 0000000..48ae7d0 --- /dev/null +++ b/src/request/com_atproto_identity_update_handle.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_identity_update_handle`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoIdentityUpdateHandleRequest { + pub handle: String, +} +impl ComAtprotoIdentityUpdateHandleRequest {} +impl FluentRequest<'_, ComAtprotoIdentityUpdateHandleRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoIdentityUpdateHandleRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.identity.updateHandle"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "handle" : self.params.handle })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_moderation_create_report.rs b/src/request/com_atproto_moderation_create_report.rs new file mode 100644 index 0000000..a515798 --- /dev/null +++ b/src/request/com_atproto_moderation_create_report.rs @@ -0,0 +1,41 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_moderation_create_report`]. + +On request success, this will return a [`ComAtprotoModerationCreateReportResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoModerationCreateReportRequest { + pub reason: Option, + pub reason_type: ComAtprotoModerationDefsReasonType, + pub subject: serde_json::Value, +} +impl ComAtprotoModerationCreateReportRequest {} +impl FluentRequest<'_, ComAtprotoModerationCreateReportRequest> { + ///Set the value of the reason field. + pub fn reason(mut self, reason: &str) -> Self { + self.params.reason = Some(reason.to_owned()); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoModerationCreateReportRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.moderation.createReport"; + let mut r = self.client.client.post(url); + if let Some(ref unwrapped) = self.params.reason { + r = r.json(json!({ "reason" : unwrapped })); + } + r = r.json(json!({ "reasonType" : self.params.reason_type })); + r = r.json(json!({ "subject" : self.params.subject })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_repo_apply_writes.rs b/src/request/com_atproto_repo_apply_writes.rs new file mode 100644 index 0000000..634a0df --- /dev/null +++ b/src/request/com_atproto_repo_apply_writes.rs @@ -0,0 +1,50 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_repo_apply_writes`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoRepoApplyWritesRequest { + pub repo: String, + pub swap_commit: Option, + pub validate: Option, + pub writes: Vec, +} +impl ComAtprotoRepoApplyWritesRequest {} +impl FluentRequest<'_, ComAtprotoRepoApplyWritesRequest> { + ///Set the value of the swap_commit field. + pub fn swap_commit(mut self, swap_commit: &str) -> Self { + self.params.swap_commit = Some(swap_commit.to_owned()); + self + } + ///Set the value of the validate field. + pub fn validate(mut self, validate: bool) -> Self { + self.params.validate = Some(validate); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoRepoApplyWritesRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.repo.applyWrites"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "repo" : self.params.repo })); + if let Some(ref unwrapped) = self.params.swap_commit { + r = r.json(json!({ "swapCommit" : unwrapped })); + } + if let Some(ref unwrapped) = self.params.validate { + r = r.json(json!({ "validate" : unwrapped })); + } + r = r.json(json!({ "writes" : self.params.writes })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_repo_create_record.rs b/src/request/com_atproto_repo_create_record.rs new file mode 100644 index 0000000..a924d2d --- /dev/null +++ b/src/request/com_atproto_repo_create_record.rs @@ -0,0 +1,61 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_repo_create_record`]. + +On request success, this will return a [`ComAtprotoRepoCreateRecordResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoRepoCreateRecordRequest { + pub collection: String, + pub record: serde_json::Value, + pub repo: String, + pub rkey: Option, + pub swap_commit: Option, + pub validate: Option, +} +impl ComAtprotoRepoCreateRecordRequest {} +impl FluentRequest<'_, ComAtprotoRepoCreateRecordRequest> { + ///Set the value of the rkey field. + pub fn rkey(mut self, rkey: &str) -> Self { + self.params.rkey = Some(rkey.to_owned()); + self + } + ///Set the value of the swap_commit field. + pub fn swap_commit(mut self, swap_commit: &str) -> Self { + self.params.swap_commit = Some(swap_commit.to_owned()); + self + } + ///Set the value of the validate field. + pub fn validate(mut self, validate: bool) -> Self { + self.params.validate = Some(validate); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoRepoCreateRecordRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.repo.createRecord"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "collection" : self.params.collection })); + r = r.json(json!({ "record" : self.params.record })); + r = r.json(json!({ "repo" : self.params.repo })); + if let Some(ref unwrapped) = self.params.rkey { + r = r.json(json!({ "rkey" : unwrapped })); + } + if let Some(ref unwrapped) = self.params.swap_commit { + r = r.json(json!({ "swapCommit" : unwrapped })); + } + if let Some(ref unwrapped) = self.params.validate { + r = r.json(json!({ "validate" : unwrapped })); + } + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_repo_delete_record.rs b/src/request/com_atproto_repo_delete_record.rs new file mode 100644 index 0000000..27d1a09 --- /dev/null +++ b/src/request/com_atproto_repo_delete_record.rs @@ -0,0 +1,52 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_repo_delete_record`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoRepoDeleteRecordRequest { + pub collection: String, + pub repo: String, + pub rkey: String, + pub swap_commit: Option, + pub swap_record: Option, +} +impl ComAtprotoRepoDeleteRecordRequest {} +impl FluentRequest<'_, ComAtprotoRepoDeleteRecordRequest> { + ///Set the value of the swap_commit field. + pub fn swap_commit(mut self, swap_commit: &str) -> Self { + self.params.swap_commit = Some(swap_commit.to_owned()); + self + } + ///Set the value of the swap_record field. + pub fn swap_record(mut self, swap_record: &str) -> Self { + self.params.swap_record = Some(swap_record.to_owned()); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoRepoDeleteRecordRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.repo.deleteRecord"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "collection" : self.params.collection })); + r = r.json(json!({ "repo" : self.params.repo })); + r = r.json(json!({ "rkey" : self.params.rkey })); + if let Some(ref unwrapped) = self.params.swap_commit { + r = r.json(json!({ "swapCommit" : unwrapped })); + } + if let Some(ref unwrapped) = self.params.swap_record { + r = r.json(json!({ "swapRecord" : unwrapped })); + } + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_repo_describe_repo.rs b/src/request/com_atproto_repo_describe_repo.rs new file mode 100644 index 0000000..d4e05d2 --- /dev/null +++ b/src/request/com_atproto_repo_describe_repo.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_repo_describe_repo`]. + +On request success, this will return a [`ComAtprotoRepoDescribeRepoResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoRepoDescribeRepoRequest { + pub repo: String, +} +impl ComAtprotoRepoDescribeRepoRequest {} +impl FluentRequest<'_, ComAtprotoRepoDescribeRepoRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoRepoDescribeRepoRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.repo.describeRepo"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_repo_get_record.rs b/src/request/com_atproto_repo_get_record.rs new file mode 100644 index 0000000..73e93c4 --- /dev/null +++ b/src/request/com_atproto_repo_get_record.rs @@ -0,0 +1,38 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_repo_get_record`]. + +On request success, this will return a [`ComAtprotoRepoGetRecordResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoRepoGetRecordRequest { + pub cid: Option, + pub collection: String, + pub repo: String, + pub rkey: String, +} +impl ComAtprotoRepoGetRecordRequest {} +impl FluentRequest<'_, ComAtprotoRepoGetRecordRequest> { + ///Set the value of the cid field. + pub fn cid(mut self, cid: &str) -> Self { + self.params.cid = Some(cid.to_owned()); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoRepoGetRecordRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.repo.getRecord"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_repo_import_repo.rs b/src/request/com_atproto_repo_import_repo.rs new file mode 100644 index 0000000..c2024e7 --- /dev/null +++ b/src/request/com_atproto_repo_import_repo.rs @@ -0,0 +1,27 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_repo_import_repo`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoRepoImportRepoRequest {} +impl ComAtprotoRepoImportRepoRequest {} +impl FluentRequest<'_, ComAtprotoRepoImportRepoRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoRepoImportRepoRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.repo.importRepo"; + let mut r = self.client.client.post(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_repo_list_missing_blobs.rs b/src/request/com_atproto_repo_list_missing_blobs.rs new file mode 100644 index 0000000..c6306ca --- /dev/null +++ b/src/request/com_atproto_repo_list_missing_blobs.rs @@ -0,0 +1,41 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_repo_list_missing_blobs`]. + +On request success, this will return a [`ComAtprotoRepoListMissingBlobsResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoRepoListMissingBlobsRequest { + pub cursor: Option, + pub limit: Option, +} +impl ComAtprotoRepoListMissingBlobsRequest {} +impl FluentRequest<'_, ComAtprotoRepoListMissingBlobsRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoRepoListMissingBlobsRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.repo.listMissingBlobs"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_repo_list_records.rs b/src/request/com_atproto_repo_list_records.rs new file mode 100644 index 0000000..49ae505 --- /dev/null +++ b/src/request/com_atproto_repo_list_records.rs @@ -0,0 +1,61 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_repo_list_records`]. + +On request success, this will return a [`ComAtprotoRepoListRecordsResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoRepoListRecordsRequest { + pub collection: String, + pub cursor: Option, + pub limit: Option, + pub repo: String, + pub reverse: Option, + pub rkey_end: Option, + pub rkey_start: Option, +} +impl ComAtprotoRepoListRecordsRequest {} +impl FluentRequest<'_, ComAtprotoRepoListRecordsRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } + ///Set the value of the reverse field. + pub fn reverse(mut self, reverse: bool) -> Self { + self.params.reverse = Some(reverse); + self + } + ///Set the value of the rkey_end field. + pub fn rkey_end(mut self, rkey_end: &str) -> Self { + self.params.rkey_end = Some(rkey_end.to_owned()); + self + } + ///Set the value of the rkey_start field. + pub fn rkey_start(mut self, rkey_start: &str) -> Self { + self.params.rkey_start = Some(rkey_start.to_owned()); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoRepoListRecordsRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.repo.listRecords"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_repo_put_record.rs b/src/request/com_atproto_repo_put_record.rs new file mode 100644 index 0000000..d1d9696 --- /dev/null +++ b/src/request/com_atproto_repo_put_record.rs @@ -0,0 +1,70 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_repo_put_record`]. + +On request success, this will return a [`ComAtprotoRepoPutRecordResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoRepoPutRecordRequest { + pub collection: String, + pub record: serde_json::Value, + pub repo: String, + pub rkey: String, + pub swap_commit: Option, + pub swap_record: Option, + pub validate: Option, +} +impl ComAtprotoRepoPutRecordRequest {} +pub struct ComAtprotoRepoPutRecordRequired<'a> { + pub collection: &'a str, + pub record: serde_json::Value, + pub repo: &'a str, + pub rkey: &'a str, +} +impl<'a> ComAtprotoRepoPutRecordRequired<'a> {} +impl FluentRequest<'_, ComAtprotoRepoPutRecordRequest> { + ///Set the value of the swap_commit field. + pub fn swap_commit(mut self, swap_commit: &str) -> Self { + self.params.swap_commit = Some(swap_commit.to_owned()); + self + } + ///Set the value of the swap_record field. + pub fn swap_record(mut self, swap_record: &str) -> Self { + self.params.swap_record = Some(swap_record.to_owned()); + self + } + ///Set the value of the validate field. + pub fn validate(mut self, validate: bool) -> Self { + self.params.validate = Some(validate); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoRepoPutRecordRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.repo.putRecord"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "collection" : self.params.collection })); + r = r.json(json!({ "record" : self.params.record })); + r = r.json(json!({ "repo" : self.params.repo })); + r = r.json(json!({ "rkey" : self.params.rkey })); + if let Some(ref unwrapped) = self.params.swap_commit { + r = r.json(json!({ "swapCommit" : unwrapped })); + } + if let Some(ref unwrapped) = self.params.swap_record { + r = r.json(json!({ "swapRecord" : unwrapped })); + } + if let Some(ref unwrapped) = self.params.validate { + r = r.json(json!({ "validate" : unwrapped })); + } + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_repo_rebase_repo.rs b/src/request/com_atproto_repo_rebase_repo.rs new file mode 100644 index 0000000..ddd825b --- /dev/null +++ b/src/request/com_atproto_repo_rebase_repo.rs @@ -0,0 +1,39 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_repo_rebase_repo`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoRepoRebaseRepoRequest { + pub repo: String, + pub swap_commit: Option, +} +impl ComAtprotoRepoRebaseRepoRequest {} +impl FluentRequest<'_, ComAtprotoRepoRebaseRepoRequest> { + ///Set the value of the swap_commit field. + pub fn swap_commit(mut self, swap_commit: &str) -> Self { + self.params.swap_commit = Some(swap_commit.to_owned()); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoRepoRebaseRepoRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.repo.rebaseRepo"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "repo" : self.params.repo })); + if let Some(ref unwrapped) = self.params.swap_commit { + r = r.json(json!({ "swapCommit" : unwrapped })); + } + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_repo_upload_blob.rs b/src/request/com_atproto_repo_upload_blob.rs new file mode 100644 index 0000000..fa34bf6 --- /dev/null +++ b/src/request/com_atproto_repo_upload_blob.rs @@ -0,0 +1,27 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_repo_upload_blob`]. + +On request success, this will return a [`ComAtprotoRepoUploadBlobResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoRepoUploadBlobRequest {} +impl ComAtprotoRepoUploadBlobRequest {} +impl FluentRequest<'_, ComAtprotoRepoUploadBlobRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoRepoUploadBlobRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.repo.uploadBlob"; + let mut r = self.client.client.post(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_activate_account.rs b/src/request/com_atproto_server_activate_account.rs new file mode 100644 index 0000000..9e7963b --- /dev/null +++ b/src/request/com_atproto_server_activate_account.rs @@ -0,0 +1,27 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_activate_account`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerActivateAccountRequest {} +impl ComAtprotoServerActivateAccountRequest {} +impl FluentRequest<'_, ComAtprotoServerActivateAccountRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerActivateAccountRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.activateAccount"; + let mut r = self.client.client.post(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_check_account_status.rs b/src/request/com_atproto_server_check_account_status.rs new file mode 100644 index 0000000..1b54969 --- /dev/null +++ b/src/request/com_atproto_server_check_account_status.rs @@ -0,0 +1,27 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_check_account_status`]. + +On request success, this will return a [`ComAtprotoServerCheckAccountStatusResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerCheckAccountStatusRequest {} +impl ComAtprotoServerCheckAccountStatusRequest {} +impl FluentRequest<'_, ComAtprotoServerCheckAccountStatusRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerCheckAccountStatusRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.checkAccountStatus"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_confirm_email.rs b/src/request/com_atproto_server_confirm_email.rs new file mode 100644 index 0000000..58e5ef2 --- /dev/null +++ b/src/request/com_atproto_server_confirm_email.rs @@ -0,0 +1,31 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_confirm_email`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerConfirmEmailRequest { + pub email: String, + pub token: String, +} +impl ComAtprotoServerConfirmEmailRequest {} +impl FluentRequest<'_, ComAtprotoServerConfirmEmailRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerConfirmEmailRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.confirmEmail"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "email" : self.params.email })); + r = r.json(json!({ "token" : self.params.token })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_create_account.rs b/src/request/com_atproto_server_create_account.rs new file mode 100644 index 0000000..05e598d --- /dev/null +++ b/src/request/com_atproto_server_create_account.rs @@ -0,0 +1,102 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_create_account`]. + +On request success, this will return a [`ComAtprotoServerCreateAccountResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerCreateAccountRequest { + pub did: Option, + pub email: Option, + pub handle: String, + pub invite_code: Option, + pub password: Option, + pub plc_op: Option, + pub recovery_key: Option, + pub verification_code: Option, + pub verification_phone: Option, +} +impl ComAtprotoServerCreateAccountRequest {} +impl FluentRequest<'_, ComAtprotoServerCreateAccountRequest> { + ///Set the value of the did field. + pub fn did(mut self, did: &str) -> Self { + self.params.did = Some(did.to_owned()); + self + } + ///Set the value of the email field. + pub fn email(mut self, email: &str) -> Self { + self.params.email = Some(email.to_owned()); + self + } + ///Set the value of the invite_code field. + pub fn invite_code(mut self, invite_code: &str) -> Self { + self.params.invite_code = Some(invite_code.to_owned()); + self + } + ///Set the value of the password field. + pub fn password(mut self, password: &str) -> Self { + self.params.password = Some(password.to_owned()); + self + } + ///Set the value of the plc_op field. + pub fn plc_op(mut self, plc_op: serde_json::Value) -> Self { + self.params.plc_op = Some(plc_op); + self + } + ///Set the value of the recovery_key field. + pub fn recovery_key(mut self, recovery_key: &str) -> Self { + self.params.recovery_key = Some(recovery_key.to_owned()); + self + } + ///Set the value of the verification_code field. + pub fn verification_code(mut self, verification_code: &str) -> Self { + self.params.verification_code = Some(verification_code.to_owned()); + self + } + ///Set the value of the verification_phone field. + pub fn verification_phone(mut self, verification_phone: &str) -> Self { + self.params.verification_phone = Some(verification_phone.to_owned()); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerCreateAccountRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.createAccount"; + let mut r = self.client.client.post(url); + if let Some(ref unwrapped) = self.params.did { + r = r.json(json!({ "did" : unwrapped })); + } + if let Some(ref unwrapped) = self.params.email { + r = r.json(json!({ "email" : unwrapped })); + } + r = r.json(json!({ "handle" : self.params.handle })); + if let Some(ref unwrapped) = self.params.invite_code { + r = r.json(json!({ "inviteCode" : unwrapped })); + } + if let Some(ref unwrapped) = self.params.password { + r = r.json(json!({ "password" : unwrapped })); + } + if let Some(ref unwrapped) = self.params.plc_op { + r = r.json(json!({ "plcOp" : unwrapped })); + } + if let Some(ref unwrapped) = self.params.recovery_key { + r = r.json(json!({ "recoveryKey" : unwrapped })); + } + if let Some(ref unwrapped) = self.params.verification_code { + r = r.json(json!({ "verificationCode" : unwrapped })); + } + if let Some(ref unwrapped) = self.params.verification_phone { + r = r.json(json!({ "verificationPhone" : unwrapped })); + } + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_create_app_password.rs b/src/request/com_atproto_server_create_app_password.rs new file mode 100644 index 0000000..dbfaccf --- /dev/null +++ b/src/request/com_atproto_server_create_app_password.rs @@ -0,0 +1,31 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_create_app_password`]. + +On request success, this will return a [`ComAtprotoServerCreateAppPasswordAppPassword`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerCreateAppPasswordRequest { + pub name: String, +} +impl ComAtprotoServerCreateAppPasswordRequest {} +impl FluentRequest<'_, ComAtprotoServerCreateAppPasswordRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerCreateAppPasswordRequest> { + type Output = httpclient::InMemoryResult< + ComAtprotoServerCreateAppPasswordAppPassword, + >; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.createAppPassword"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "name" : self.params.name })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_create_invite_code.rs b/src/request/com_atproto_server_create_invite_code.rs new file mode 100644 index 0000000..f78498d --- /dev/null +++ b/src/request/com_atproto_server_create_invite_code.rs @@ -0,0 +1,39 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_create_invite_code`]. + +On request success, this will return a [`ComAtprotoServerCreateInviteCodeResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerCreateInviteCodeRequest { + pub for_account: Option, + pub use_count: i64, +} +impl ComAtprotoServerCreateInviteCodeRequest {} +impl FluentRequest<'_, ComAtprotoServerCreateInviteCodeRequest> { + ///Set the value of the for_account field. + pub fn for_account(mut self, for_account: &str) -> Self { + self.params.for_account = Some(for_account.to_owned()); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerCreateInviteCodeRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.createInviteCode"; + let mut r = self.client.client.post(url); + if let Some(ref unwrapped) = self.params.for_account { + r = r.json(json!({ "forAccount" : unwrapped })); + } + r = r.json(json!({ "useCount" : self.params.use_count })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_create_invite_codes.rs b/src/request/com_atproto_server_create_invite_codes.rs new file mode 100644 index 0000000..1c86072 --- /dev/null +++ b/src/request/com_atproto_server_create_invite_codes.rs @@ -0,0 +1,48 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_create_invite_codes`]. + +On request success, this will return a [`ComAtprotoServerCreateInviteCodesResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerCreateInviteCodesRequest { + pub code_count: i64, + pub for_accounts: Option>, + pub use_count: i64, +} +impl ComAtprotoServerCreateInviteCodesRequest {} +impl FluentRequest<'_, ComAtprotoServerCreateInviteCodesRequest> { + ///Set the value of the for_accounts field. + pub fn for_accounts( + mut self, + for_accounts: impl IntoIterator>, + ) -> Self { + self + .params + .for_accounts = Some( + for_accounts.into_iter().map(|s| s.as_ref().to_owned()).collect(), + ); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerCreateInviteCodesRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.createInviteCodes"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "codeCount" : self.params.code_count })); + if let Some(ref unwrapped) = self.params.for_accounts { + r = r.json(json!({ "forAccounts" : unwrapped })); + } + r = r.json(json!({ "useCount" : self.params.use_count })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_create_session.rs b/src/request/com_atproto_server_create_session.rs new file mode 100644 index 0000000..b495af6 --- /dev/null +++ b/src/request/com_atproto_server_create_session.rs @@ -0,0 +1,31 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_create_session`]. + +On request success, this will return a [`ComAtprotoServerCreateSessionResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerCreateSessionRequest { + pub identifier: String, + pub password: String, +} +impl ComAtprotoServerCreateSessionRequest {} +impl FluentRequest<'_, ComAtprotoServerCreateSessionRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerCreateSessionRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.createSession"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "identifier" : self.params.identifier })); + r = r.json(json!({ "password" : self.params.password })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_deactivate_account.rs b/src/request/com_atproto_server_deactivate_account.rs new file mode 100644 index 0000000..5979799 --- /dev/null +++ b/src/request/com_atproto_server_deactivate_account.rs @@ -0,0 +1,37 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_deactivate_account`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerDeactivateAccountRequest { + pub delete_after: Option>, +} +impl ComAtprotoServerDeactivateAccountRequest {} +impl FluentRequest<'_, ComAtprotoServerDeactivateAccountRequest> { + ///Set the value of the delete_after field. + pub fn delete_after(mut self, delete_after: chrono::DateTime) -> Self { + self.params.delete_after = Some(delete_after); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerDeactivateAccountRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.deactivateAccount"; + let mut r = self.client.client.post(url); + if let Some(ref unwrapped) = self.params.delete_after { + r = r.json(json!({ "deleteAfter" : unwrapped })); + } + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_delete_account.rs b/src/request/com_atproto_server_delete_account.rs new file mode 100644 index 0000000..5255fe2 --- /dev/null +++ b/src/request/com_atproto_server_delete_account.rs @@ -0,0 +1,33 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_delete_account`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerDeleteAccountRequest { + pub did: String, + pub password: String, + pub token: String, +} +impl ComAtprotoServerDeleteAccountRequest {} +impl FluentRequest<'_, ComAtprotoServerDeleteAccountRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerDeleteAccountRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.deleteAccount"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "did" : self.params.did })); + r = r.json(json!({ "password" : self.params.password })); + r = r.json(json!({ "token" : self.params.token })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_delete_session.rs b/src/request/com_atproto_server_delete_session.rs new file mode 100644 index 0000000..375ee61 --- /dev/null +++ b/src/request/com_atproto_server_delete_session.rs @@ -0,0 +1,27 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_delete_session`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerDeleteSessionRequest {} +impl ComAtprotoServerDeleteSessionRequest {} +impl FluentRequest<'_, ComAtprotoServerDeleteSessionRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerDeleteSessionRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.deleteSession"; + let mut r = self.client.client.post(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_describe_server.rs b/src/request/com_atproto_server_describe_server.rs new file mode 100644 index 0000000..eecbd9c --- /dev/null +++ b/src/request/com_atproto_server_describe_server.rs @@ -0,0 +1,27 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_describe_server`]. + +On request success, this will return a [`ComAtprotoServerDescribeServerResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerDescribeServerRequest {} +impl ComAtprotoServerDescribeServerRequest {} +impl FluentRequest<'_, ComAtprotoServerDescribeServerRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerDescribeServerRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.describeServer"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_get_account_invite_codes.rs b/src/request/com_atproto_server_get_account_invite_codes.rs new file mode 100644 index 0000000..f341829 --- /dev/null +++ b/src/request/com_atproto_server_get_account_invite_codes.rs @@ -0,0 +1,43 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_get_account_invite_codes`]. + +On request success, this will return a [`ComAtprotoServerGetAccountInviteCodesResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerGetAccountInviteCodesRequest { + pub create_available: Option, + pub include_used: Option, +} +impl ComAtprotoServerGetAccountInviteCodesRequest {} +impl FluentRequest<'_, ComAtprotoServerGetAccountInviteCodesRequest> { + ///Set the value of the create_available field. + pub fn create_available(mut self, create_available: bool) -> Self { + self.params.create_available = Some(create_available); + self + } + ///Set the value of the include_used field. + pub fn include_used(mut self, include_used: bool) -> Self { + self.params.include_used = Some(include_used); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerGetAccountInviteCodesRequest> { + type Output = httpclient::InMemoryResult< + ComAtprotoServerGetAccountInviteCodesResponse, + >; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.getAccountInviteCodes"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_get_service_auth.rs b/src/request/com_atproto_server_get_service_auth.rs new file mode 100644 index 0000000..fb16598 --- /dev/null +++ b/src/request/com_atproto_server_get_service_auth.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_get_service_auth`]. + +On request success, this will return a [`ComAtprotoServerGetServiceAuthResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerGetServiceAuthRequest { + pub aud: String, +} +impl ComAtprotoServerGetServiceAuthRequest {} +impl FluentRequest<'_, ComAtprotoServerGetServiceAuthRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerGetServiceAuthRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.getServiceAuth"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_get_session.rs b/src/request/com_atproto_server_get_session.rs new file mode 100644 index 0000000..11f5d84 --- /dev/null +++ b/src/request/com_atproto_server_get_session.rs @@ -0,0 +1,27 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_get_session`]. + +On request success, this will return a [`ComAtprotoServerGetSessionResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerGetSessionRequest {} +impl ComAtprotoServerGetSessionRequest {} +impl FluentRequest<'_, ComAtprotoServerGetSessionRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerGetSessionRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.getSession"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_list_app_passwords.rs b/src/request/com_atproto_server_list_app_passwords.rs new file mode 100644 index 0000000..33169ad --- /dev/null +++ b/src/request/com_atproto_server_list_app_passwords.rs @@ -0,0 +1,27 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_list_app_passwords`]. + +On request success, this will return a [`ComAtprotoServerListAppPasswordsResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerListAppPasswordsRequest {} +impl ComAtprotoServerListAppPasswordsRequest {} +impl FluentRequest<'_, ComAtprotoServerListAppPasswordsRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerListAppPasswordsRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.listAppPasswords"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_refresh_session.rs b/src/request/com_atproto_server_refresh_session.rs new file mode 100644 index 0000000..96df433 --- /dev/null +++ b/src/request/com_atproto_server_refresh_session.rs @@ -0,0 +1,27 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_refresh_session`]. + +On request success, this will return a [`ComAtprotoServerRefreshSessionResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerRefreshSessionRequest {} +impl ComAtprotoServerRefreshSessionRequest {} +impl FluentRequest<'_, ComAtprotoServerRefreshSessionRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerRefreshSessionRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.refreshSession"; + let mut r = self.client.client.post(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_request_account_delete.rs b/src/request/com_atproto_server_request_account_delete.rs new file mode 100644 index 0000000..db2a55e --- /dev/null +++ b/src/request/com_atproto_server_request_account_delete.rs @@ -0,0 +1,27 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_request_account_delete`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerRequestAccountDeleteRequest {} +impl ComAtprotoServerRequestAccountDeleteRequest {} +impl FluentRequest<'_, ComAtprotoServerRequestAccountDeleteRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerRequestAccountDeleteRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.requestAccountDelete"; + let mut r = self.client.client.post(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_request_email_confirmation.rs b/src/request/com_atproto_server_request_email_confirmation.rs new file mode 100644 index 0000000..642d5f8 --- /dev/null +++ b/src/request/com_atproto_server_request_email_confirmation.rs @@ -0,0 +1,27 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_request_email_confirmation`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerRequestEmailConfirmationRequest {} +impl ComAtprotoServerRequestEmailConfirmationRequest {} +impl FluentRequest<'_, ComAtprotoServerRequestEmailConfirmationRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerRequestEmailConfirmationRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.requestEmailConfirmation"; + let mut r = self.client.client.post(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_request_email_update.rs b/src/request/com_atproto_server_request_email_update.rs new file mode 100644 index 0000000..6ed7a1e --- /dev/null +++ b/src/request/com_atproto_server_request_email_update.rs @@ -0,0 +1,27 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_request_email_update`]. + +On request success, this will return a [`ComAtprotoServerRequestEmailUpdateResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerRequestEmailUpdateRequest {} +impl ComAtprotoServerRequestEmailUpdateRequest {} +impl FluentRequest<'_, ComAtprotoServerRequestEmailUpdateRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerRequestEmailUpdateRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.requestEmailUpdate"; + let mut r = self.client.client.post(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_request_password_reset.rs b/src/request/com_atproto_server_request_password_reset.rs new file mode 100644 index 0000000..72bc126 --- /dev/null +++ b/src/request/com_atproto_server_request_password_reset.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_request_password_reset`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerRequestPasswordResetRequest { + pub email: String, +} +impl ComAtprotoServerRequestPasswordResetRequest {} +impl FluentRequest<'_, ComAtprotoServerRequestPasswordResetRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerRequestPasswordResetRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.requestPasswordReset"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "email" : self.params.email })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_reserve_signing_key.rs b/src/request/com_atproto_server_reserve_signing_key.rs new file mode 100644 index 0000000..0ba1545 --- /dev/null +++ b/src/request/com_atproto_server_reserve_signing_key.rs @@ -0,0 +1,37 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_reserve_signing_key`]. + +On request success, this will return a [`ComAtprotoServerReserveSigningKeyResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerReserveSigningKeyRequest { + pub did: Option, +} +impl ComAtprotoServerReserveSigningKeyRequest {} +impl FluentRequest<'_, ComAtprotoServerReserveSigningKeyRequest> { + ///Set the value of the did field. + pub fn did(mut self, did: &str) -> Self { + self.params.did = Some(did.to_owned()); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerReserveSigningKeyRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.reserveSigningKey"; + let mut r = self.client.client.post(url); + if let Some(ref unwrapped) = self.params.did { + r = r.json(json!({ "did" : unwrapped })); + } + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_reset_password.rs b/src/request/com_atproto_server_reset_password.rs new file mode 100644 index 0000000..068bcdb --- /dev/null +++ b/src/request/com_atproto_server_reset_password.rs @@ -0,0 +1,31 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_reset_password`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerResetPasswordRequest { + pub password: String, + pub token: String, +} +impl ComAtprotoServerResetPasswordRequest {} +impl FluentRequest<'_, ComAtprotoServerResetPasswordRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerResetPasswordRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.resetPassword"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "password" : self.params.password })); + r = r.json(json!({ "token" : self.params.token })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_revoke_app_password.rs b/src/request/com_atproto_server_revoke_app_password.rs new file mode 100644 index 0000000..777febb --- /dev/null +++ b/src/request/com_atproto_server_revoke_app_password.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_revoke_app_password`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerRevokeAppPasswordRequest { + pub name: String, +} +impl ComAtprotoServerRevokeAppPasswordRequest {} +impl FluentRequest<'_, ComAtprotoServerRevokeAppPasswordRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerRevokeAppPasswordRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.revokeAppPassword"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "name" : self.params.name })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_server_update_email.rs b/src/request/com_atproto_server_update_email.rs new file mode 100644 index 0000000..bc83766 --- /dev/null +++ b/src/request/com_atproto_server_update_email.rs @@ -0,0 +1,39 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_server_update_email`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoServerUpdateEmailRequest { + pub email: String, + pub token: Option, +} +impl ComAtprotoServerUpdateEmailRequest {} +impl FluentRequest<'_, ComAtprotoServerUpdateEmailRequest> { + ///Set the value of the token field. + pub fn token(mut self, token: &str) -> Self { + self.params.token = Some(token.to_owned()); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoServerUpdateEmailRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.server.updateEmail"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "email" : self.params.email })); + if let Some(ref unwrapped) = self.params.token { + r = r.json(json!({ "token" : unwrapped })); + } + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_sync_get_blob.rs b/src/request/com_atproto_sync_get_blob.rs new file mode 100644 index 0000000..77afada --- /dev/null +++ b/src/request/com_atproto_sync_get_blob.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_sync_get_blob`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoSyncGetBlobRequest { + pub cid: String, + pub did: String, +} +impl ComAtprotoSyncGetBlobRequest {} +impl FluentRequest<'_, ComAtprotoSyncGetBlobRequest> {} +impl<'a> ::std::future::IntoFuture for FluentRequest<'a, ComAtprotoSyncGetBlobRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.sync.getBlob"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_sync_get_blocks.rs b/src/request/com_atproto_sync_get_blocks.rs new file mode 100644 index 0000000..36fb00b --- /dev/null +++ b/src/request/com_atproto_sync_get_blocks.rs @@ -0,0 +1,30 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_sync_get_blocks`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoSyncGetBlocksRequest { + pub cids: Vec, + pub did: String, +} +impl ComAtprotoSyncGetBlocksRequest {} +impl FluentRequest<'_, ComAtprotoSyncGetBlocksRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoSyncGetBlocksRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.sync.getBlocks"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_sync_get_checkout.rs b/src/request/com_atproto_sync_get_checkout.rs new file mode 100644 index 0000000..29c090b --- /dev/null +++ b/src/request/com_atproto_sync_get_checkout.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_sync_get_checkout`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoSyncGetCheckoutRequest { + pub did: String, +} +impl ComAtprotoSyncGetCheckoutRequest {} +impl FluentRequest<'_, ComAtprotoSyncGetCheckoutRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoSyncGetCheckoutRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.sync.getCheckout"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_sync_get_commit_path.rs b/src/request/com_atproto_sync_get_commit_path.rs new file mode 100644 index 0000000..6585eb6 --- /dev/null +++ b/src/request/com_atproto_sync_get_commit_path.rs @@ -0,0 +1,42 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_sync_get_commit_path`]. + +On request success, this will return a [`ComAtprotoSyncGetCommitPathResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoSyncGetCommitPathRequest { + pub did: String, + pub earliest: Option, + pub latest: Option, +} +impl ComAtprotoSyncGetCommitPathRequest {} +impl FluentRequest<'_, ComAtprotoSyncGetCommitPathRequest> { + ///Set the value of the earliest field. + pub fn earliest(mut self, earliest: &str) -> Self { + self.params.earliest = Some(earliest.to_owned()); + self + } + ///Set the value of the latest field. + pub fn latest(mut self, latest: &str) -> Self { + self.params.latest = Some(latest.to_owned()); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoSyncGetCommitPathRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.sync.getCommitPath"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_sync_get_head.rs b/src/request/com_atproto_sync_get_head.rs new file mode 100644 index 0000000..3bb0e5f --- /dev/null +++ b/src/request/com_atproto_sync_get_head.rs @@ -0,0 +1,28 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_sync_get_head`]. + +On request success, this will return a [`ComAtprotoSyncGetHeadResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoSyncGetHeadRequest { + pub did: String, +} +impl ComAtprotoSyncGetHeadRequest {} +impl FluentRequest<'_, ComAtprotoSyncGetHeadRequest> {} +impl<'a> ::std::future::IntoFuture for FluentRequest<'a, ComAtprotoSyncGetHeadRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.sync.getHead"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_sync_get_latest_commit.rs b/src/request/com_atproto_sync_get_latest_commit.rs new file mode 100644 index 0000000..9ad6b13 --- /dev/null +++ b/src/request/com_atproto_sync_get_latest_commit.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_sync_get_latest_commit`]. + +On request success, this will return a [`ComAtprotoSyncGetLatestCommitResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoSyncGetLatestCommitRequest { + pub did: String, +} +impl ComAtprotoSyncGetLatestCommitRequest {} +impl FluentRequest<'_, ComAtprotoSyncGetLatestCommitRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoSyncGetLatestCommitRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.sync.getLatestCommit"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_sync_get_record.rs b/src/request/com_atproto_sync_get_record.rs new file mode 100644 index 0000000..c787b50 --- /dev/null +++ b/src/request/com_atproto_sync_get_record.rs @@ -0,0 +1,38 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_sync_get_record`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoSyncGetRecordRequest { + pub collection: String, + pub commit: Option, + pub did: String, + pub rkey: String, +} +impl ComAtprotoSyncGetRecordRequest {} +impl FluentRequest<'_, ComAtprotoSyncGetRecordRequest> { + ///Set the value of the commit field. + pub fn commit(mut self, commit: &str) -> Self { + self.params.commit = Some(commit.to_owned()); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoSyncGetRecordRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.sync.getRecord"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_sync_get_repo.rs b/src/request/com_atproto_sync_get_repo.rs new file mode 100644 index 0000000..281e439 --- /dev/null +++ b/src/request/com_atproto_sync_get_repo.rs @@ -0,0 +1,35 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_sync_get_repo`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoSyncGetRepoRequest { + pub did: String, + pub since: Option, +} +impl ComAtprotoSyncGetRepoRequest {} +impl FluentRequest<'_, ComAtprotoSyncGetRepoRequest> { + ///Set the value of the since field. + pub fn since(mut self, since: &str) -> Self { + self.params.since = Some(since.to_owned()); + self + } +} +impl<'a> ::std::future::IntoFuture for FluentRequest<'a, ComAtprotoSyncGetRepoRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.sync.getRepo"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_sync_list_blobs.rs b/src/request/com_atproto_sync_list_blobs.rs new file mode 100644 index 0000000..557347a --- /dev/null +++ b/src/request/com_atproto_sync_list_blobs.rs @@ -0,0 +1,48 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_sync_list_blobs`]. + +On request success, this will return a [`ComAtprotoSyncListBlobsResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoSyncListBlobsRequest { + pub cursor: Option, + pub did: String, + pub limit: Option, + pub since: Option, +} +impl ComAtprotoSyncListBlobsRequest {} +impl FluentRequest<'_, ComAtprotoSyncListBlobsRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } + ///Set the value of the since field. + pub fn since(mut self, since: &str) -> Self { + self.params.since = Some(since.to_owned()); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoSyncListBlobsRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.sync.listBlobs"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_sync_list_repos.rs b/src/request/com_atproto_sync_list_repos.rs new file mode 100644 index 0000000..f1aa2a9 --- /dev/null +++ b/src/request/com_atproto_sync_list_repos.rs @@ -0,0 +1,41 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_sync_list_repos`]. + +On request success, this will return a [`ComAtprotoSyncListReposResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoSyncListReposRequest { + pub cursor: Option, + pub limit: Option, +} +impl ComAtprotoSyncListReposRequest {} +impl FluentRequest<'_, ComAtprotoSyncListReposRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoSyncListReposRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.sync.listRepos"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_temp_check_signup_queue.rs b/src/request/com_atproto_temp_check_signup_queue.rs new file mode 100644 index 0000000..713eb6a --- /dev/null +++ b/src/request/com_atproto_temp_check_signup_queue.rs @@ -0,0 +1,27 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_temp_check_signup_queue`]. + +On request success, this will return a [`ComAtprotoTempCheckSignupQueueResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoTempCheckSignupQueueRequest {} +impl ComAtprotoTempCheckSignupQueueRequest {} +impl FluentRequest<'_, ComAtprotoTempCheckSignupQueueRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoTempCheckSignupQueueRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.temp.checkSignupQueue"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_temp_request_phone_verification.rs b/src/request/com_atproto_temp_request_phone_verification.rs new file mode 100644 index 0000000..21020e4 --- /dev/null +++ b/src/request/com_atproto_temp_request_phone_verification.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_temp_request_phone_verification`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoTempRequestPhoneVerificationRequest { + pub phone_number: String, +} +impl ComAtprotoTempRequestPhoneVerificationRequest {} +impl FluentRequest<'_, ComAtprotoTempRequestPhoneVerificationRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoTempRequestPhoneVerificationRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.temp.requestPhoneVerification"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "phoneNumber" : self.params.phone_number })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/com_atproto_temp_upgrade_repo_version.rs b/src/request/com_atproto_temp_upgrade_repo_version.rs new file mode 100644 index 0000000..04a9d8e --- /dev/null +++ b/src/request/com_atproto_temp_upgrade_repo_version.rs @@ -0,0 +1,39 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::com_atproto_temp_upgrade_repo_version`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ComAtprotoTempUpgradeRepoVersionRequest { + pub did: String, + pub force: Option, +} +impl ComAtprotoTempUpgradeRepoVersionRequest {} +impl FluentRequest<'_, ComAtprotoTempUpgradeRepoVersionRequest> { + ///Set the value of the force field. + pub fn force(mut self, force: bool) -> Self { + self.params.force = Some(force); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ComAtprotoTempUpgradeRepoVersionRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/com.atproto.temp.upgradeRepoVersion"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "did" : self.params.did })); + if let Some(ref unwrapped) = self.params.force { + r = r.json(json!({ "force" : unwrapped })); + } + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/tools_ozone_communication_create_template.rs b/src/request/tools_ozone_communication_create_template.rs new file mode 100644 index 0000000..cef4a58 --- /dev/null +++ b/src/request/tools_ozone_communication_create_template.rs @@ -0,0 +1,43 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::tools_ozone_communication_create_template`]. + +On request success, this will return a [`ToolsOzoneCommunicationDefsTemplateView`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ToolsOzoneCommunicationCreateTemplateRequest { + pub content_markdown: String, + pub created_by: Option, + pub name: String, + pub subject: String, +} +impl ToolsOzoneCommunicationCreateTemplateRequest {} +impl FluentRequest<'_, ToolsOzoneCommunicationCreateTemplateRequest> { + ///Set the value of the created_by field. + pub fn created_by(mut self, created_by: &str) -> Self { + self.params.created_by = Some(created_by.to_owned()); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ToolsOzoneCommunicationCreateTemplateRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/tools.ozone.communication.createTemplate"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "contentMarkdown" : self.params.content_markdown })); + if let Some(ref unwrapped) = self.params.created_by { + r = r.json(json!({ "createdBy" : unwrapped })); + } + r = r.json(json!({ "name" : self.params.name })); + r = r.json(json!({ "subject" : self.params.subject })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/tools_ozone_communication_delete_template.rs b/src/request/tools_ozone_communication_delete_template.rs new file mode 100644 index 0000000..5e6c649 --- /dev/null +++ b/src/request/tools_ozone_communication_delete_template.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::tools_ozone_communication_delete_template`]. + +On request success, this will return a [`()`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ToolsOzoneCommunicationDeleteTemplateRequest { + pub id: String, +} +impl ToolsOzoneCommunicationDeleteTemplateRequest {} +impl FluentRequest<'_, ToolsOzoneCommunicationDeleteTemplateRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ToolsOzoneCommunicationDeleteTemplateRequest> { + type Output = httpclient::InMemoryResult<()>; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/tools.ozone.communication.deleteTemplate"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "id" : self.params.id })); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/tools_ozone_communication_list_templates.rs b/src/request/tools_ozone_communication_list_templates.rs new file mode 100644 index 0000000..1f86f27 --- /dev/null +++ b/src/request/tools_ozone_communication_list_templates.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::tools_ozone_communication_list_templates`]. + +On request success, this will return a [`ToolsOzoneCommunicationListTemplatesResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ToolsOzoneCommunicationListTemplatesRequest {} +impl ToolsOzoneCommunicationListTemplatesRequest {} +impl FluentRequest<'_, ToolsOzoneCommunicationListTemplatesRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ToolsOzoneCommunicationListTemplatesRequest> { + type Output = httpclient::InMemoryResult< + ToolsOzoneCommunicationListTemplatesResponse, + >; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/tools.ozone.communication.listTemplates"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/tools_ozone_communication_update_template.rs b/src/request/tools_ozone_communication_update_template.rs new file mode 100644 index 0000000..093d92d --- /dev/null +++ b/src/request/tools_ozone_communication_update_template.rs @@ -0,0 +1,75 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::tools_ozone_communication_update_template`]. + +On request success, this will return a [`ToolsOzoneCommunicationDefsTemplateView`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ToolsOzoneCommunicationUpdateTemplateRequest { + pub content_markdown: Option, + pub disabled: Option, + pub id: String, + pub name: Option, + pub subject: Option, + pub updated_by: Option, +} +impl ToolsOzoneCommunicationUpdateTemplateRequest {} +impl FluentRequest<'_, ToolsOzoneCommunicationUpdateTemplateRequest> { + ///Set the value of the content_markdown field. + pub fn content_markdown(mut self, content_markdown: &str) -> Self { + self.params.content_markdown = Some(content_markdown.to_owned()); + self + } + ///Set the value of the disabled field. + pub fn disabled(mut self, disabled: bool) -> Self { + self.params.disabled = Some(disabled); + self + } + ///Set the value of the name field. + pub fn name(mut self, name: &str) -> Self { + self.params.name = Some(name.to_owned()); + self + } + ///Set the value of the subject field. + pub fn subject(mut self, subject: &str) -> Self { + self.params.subject = Some(subject.to_owned()); + self + } + ///Set the value of the updated_by field. + pub fn updated_by(mut self, updated_by: &str) -> Self { + self.params.updated_by = Some(updated_by.to_owned()); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ToolsOzoneCommunicationUpdateTemplateRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/tools.ozone.communication.updateTemplate"; + let mut r = self.client.client.post(url); + if let Some(ref unwrapped) = self.params.content_markdown { + r = r.json(json!({ "contentMarkdown" : unwrapped })); + } + if let Some(ref unwrapped) = self.params.disabled { + r = r.json(json!({ "disabled" : unwrapped })); + } + r = r.json(json!({ "id" : self.params.id })); + if let Some(ref unwrapped) = self.params.name { + r = r.json(json!({ "name" : unwrapped })); + } + if let Some(ref unwrapped) = self.params.subject { + r = r.json(json!({ "subject" : unwrapped })); + } + if let Some(ref unwrapped) = self.params.updated_by { + r = r.json(json!({ "updatedBy" : unwrapped })); + } + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/tools_ozone_moderation_emit_event.rs b/src/request/tools_ozone_moderation_emit_event.rs new file mode 100644 index 0000000..16980f9 --- /dev/null +++ b/src/request/tools_ozone_moderation_emit_event.rs @@ -0,0 +1,50 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::tools_ozone_moderation_emit_event`]. + +On request success, this will return a [`ToolsOzoneModerationDefsModEventView`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ToolsOzoneModerationEmitEventRequest { + pub created_by: String, + pub event: serde_json::Value, + pub subject: serde_json::Value, + pub subject_blob_cids: Option>, +} +impl ToolsOzoneModerationEmitEventRequest {} +impl FluentRequest<'_, ToolsOzoneModerationEmitEventRequest> { + ///Set the value of the subject_blob_cids field. + pub fn subject_blob_cids( + mut self, + subject_blob_cids: impl IntoIterator>, + ) -> Self { + self + .params + .subject_blob_cids = Some( + subject_blob_cids.into_iter().map(|s| s.as_ref().to_owned()).collect(), + ); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ToolsOzoneModerationEmitEventRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/tools.ozone.moderation.emitEvent"; + let mut r = self.client.client.post(url); + r = r.json(json!({ "createdBy" : self.params.created_by })); + r = r.json(json!({ "event" : self.params.event })); + r = r.json(json!({ "subject" : self.params.subject })); + if let Some(ref unwrapped) = self.params.subject_blob_cids { + r = r.json(json!({ "subjectBlobCids" : unwrapped })); + } + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/tools_ozone_moderation_get_event.rs b/src/request/tools_ozone_moderation_get_event.rs new file mode 100644 index 0000000..e8f7413 --- /dev/null +++ b/src/request/tools_ozone_moderation_get_event.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::tools_ozone_moderation_get_event`]. + +On request success, this will return a [`ToolsOzoneModerationDefsModEventViewDetail`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ToolsOzoneModerationGetEventRequest { + pub id: i64, +} +impl ToolsOzoneModerationGetEventRequest {} +impl FluentRequest<'_, ToolsOzoneModerationGetEventRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ToolsOzoneModerationGetEventRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/tools.ozone.moderation.getEvent"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/tools_ozone_moderation_get_record.rs b/src/request/tools_ozone_moderation_get_record.rs new file mode 100644 index 0000000..890f47f --- /dev/null +++ b/src/request/tools_ozone_moderation_get_record.rs @@ -0,0 +1,36 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::tools_ozone_moderation_get_record`]. + +On request success, this will return a [`ToolsOzoneModerationDefsRecordViewDetail`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ToolsOzoneModerationGetRecordRequest { + pub cid: Option, + pub uri: String, +} +impl ToolsOzoneModerationGetRecordRequest {} +impl FluentRequest<'_, ToolsOzoneModerationGetRecordRequest> { + ///Set the value of the cid field. + pub fn cid(mut self, cid: &str) -> Self { + self.params.cid = Some(cid.to_owned()); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ToolsOzoneModerationGetRecordRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/tools.ozone.moderation.getRecord"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/tools_ozone_moderation_get_repo.rs b/src/request/tools_ozone_moderation_get_repo.rs new file mode 100644 index 0000000..5621c22 --- /dev/null +++ b/src/request/tools_ozone_moderation_get_repo.rs @@ -0,0 +1,29 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::tools_ozone_moderation_get_repo`]. + +On request success, this will return a [`ToolsOzoneModerationDefsRepoViewDetail`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ToolsOzoneModerationGetRepoRequest { + pub did: String, +} +impl ToolsOzoneModerationGetRepoRequest {} +impl FluentRequest<'_, ToolsOzoneModerationGetRepoRequest> {} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ToolsOzoneModerationGetRepoRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/tools.ozone.moderation.getRepo"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/tools_ozone_moderation_query_events.rs b/src/request/tools_ozone_moderation_query_events.rs new file mode 100644 index 0000000..8d63ca0 --- /dev/null +++ b/src/request/tools_ozone_moderation_query_events.rs @@ -0,0 +1,168 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::tools_ozone_moderation_query_events`]. + +On request success, this will return a [`ToolsOzoneModerationQueryEventsResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ToolsOzoneModerationQueryEventsRequest { + pub added_labels: Option>, + pub added_tags: Option>, + pub comment: Option, + pub created_after: Option>, + pub created_before: Option>, + pub created_by: Option, + pub cursor: Option, + pub has_comment: Option, + pub include_all_user_records: Option, + pub limit: Option, + pub removed_labels: Option>, + pub removed_tags: Option>, + pub report_types: Option>, + pub sort_direction: Option, + pub subject: Option, + pub types: Option>, +} +impl ToolsOzoneModerationQueryEventsRequest {} +impl FluentRequest<'_, ToolsOzoneModerationQueryEventsRequest> { + ///Set the value of the added_labels field. + pub fn added_labels( + mut self, + added_labels: impl IntoIterator>, + ) -> Self { + self + .params + .added_labels = Some( + added_labels.into_iter().map(|s| s.as_ref().to_owned()).collect(), + ); + self + } + ///Set the value of the added_tags field. + pub fn added_tags( + mut self, + added_tags: impl IntoIterator>, + ) -> Self { + self + .params + .added_tags = Some( + added_tags.into_iter().map(|s| s.as_ref().to_owned()).collect(), + ); + self + } + ///Set the value of the comment field. + pub fn comment(mut self, comment: &str) -> Self { + self.params.comment = Some(comment.to_owned()); + self + } + ///Set the value of the created_after field. + pub fn created_after( + mut self, + created_after: chrono::DateTime, + ) -> Self { + self.params.created_after = Some(created_after); + self + } + ///Set the value of the created_before field. + pub fn created_before( + mut self, + created_before: chrono::DateTime, + ) -> Self { + self.params.created_before = Some(created_before); + self + } + ///Set the value of the created_by field. + pub fn created_by(mut self, created_by: &str) -> Self { + self.params.created_by = Some(created_by.to_owned()); + self + } + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the has_comment field. + pub fn has_comment(mut self, has_comment: bool) -> Self { + self.params.has_comment = Some(has_comment); + self + } + ///Set the value of the include_all_user_records field. + pub fn include_all_user_records(mut self, include_all_user_records: bool) -> Self { + self.params.include_all_user_records = Some(include_all_user_records); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } + ///Set the value of the removed_labels field. + pub fn removed_labels( + mut self, + removed_labels: impl IntoIterator>, + ) -> Self { + self + .params + .removed_labels = Some( + removed_labels.into_iter().map(|s| s.as_ref().to_owned()).collect(), + ); + self + } + ///Set the value of the removed_tags field. + pub fn removed_tags( + mut self, + removed_tags: impl IntoIterator>, + ) -> Self { + self + .params + .removed_tags = Some( + removed_tags.into_iter().map(|s| s.as_ref().to_owned()).collect(), + ); + self + } + ///Set the value of the report_types field. + pub fn report_types( + mut self, + report_types: impl IntoIterator>, + ) -> Self { + self + .params + .report_types = Some( + report_types.into_iter().map(|s| s.as_ref().to_owned()).collect(), + ); + self + } + ///Set the value of the sort_direction field. + pub fn sort_direction(mut self, sort_direction: &str) -> Self { + self.params.sort_direction = Some(sort_direction.to_owned()); + self + } + ///Set the value of the subject field. + pub fn subject(mut self, subject: &str) -> Self { + self.params.subject = Some(subject.to_owned()); + self + } + ///Set the value of the types field. + pub fn types(mut self, types: impl IntoIterator>) -> Self { + self + .params + .types = Some(types.into_iter().map(|s| s.as_ref().to_owned()).collect()); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ToolsOzoneModerationQueryEventsRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/tools.ozone.moderation.queryEvents"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/tools_ozone_moderation_query_statuses.rs b/src/request/tools_ozone_moderation_query_statuses.rs new file mode 100644 index 0000000..83bb892 --- /dev/null +++ b/src/request/tools_ozone_moderation_query_statuses.rs @@ -0,0 +1,165 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::tools_ozone_moderation_query_statuses`]. + +On request success, this will return a [`ToolsOzoneModerationQueryStatusesResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ToolsOzoneModerationQueryStatusesRequest { + pub appealed: Option, + pub comment: Option, + pub cursor: Option, + pub exclude_tags: Option>, + pub ignore_subjects: Option>, + pub include_muted: Option, + pub last_reviewed_by: Option, + pub limit: Option, + pub reported_after: Option>, + pub reported_before: Option>, + pub review_state: Option, + pub reviewed_after: Option>, + pub reviewed_before: Option>, + pub sort_direction: Option, + pub sort_field: Option, + pub subject: Option, + pub tags: Option>, + pub takendown: Option, +} +impl ToolsOzoneModerationQueryStatusesRequest {} +impl FluentRequest<'_, ToolsOzoneModerationQueryStatusesRequest> { + ///Set the value of the appealed field. + pub fn appealed(mut self, appealed: bool) -> Self { + self.params.appealed = Some(appealed); + self + } + ///Set the value of the comment field. + pub fn comment(mut self, comment: &str) -> Self { + self.params.comment = Some(comment.to_owned()); + self + } + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the exclude_tags field. + pub fn exclude_tags( + mut self, + exclude_tags: impl IntoIterator>, + ) -> Self { + self + .params + .exclude_tags = Some( + exclude_tags.into_iter().map(|s| s.as_ref().to_owned()).collect(), + ); + self + } + ///Set the value of the ignore_subjects field. + pub fn ignore_subjects( + mut self, + ignore_subjects: impl IntoIterator>, + ) -> Self { + self + .params + .ignore_subjects = Some( + ignore_subjects.into_iter().map(|s| s.as_ref().to_owned()).collect(), + ); + self + } + ///Set the value of the include_muted field. + pub fn include_muted(mut self, include_muted: bool) -> Self { + self.params.include_muted = Some(include_muted); + self + } + ///Set the value of the last_reviewed_by field. + pub fn last_reviewed_by(mut self, last_reviewed_by: &str) -> Self { + self.params.last_reviewed_by = Some(last_reviewed_by.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } + ///Set the value of the reported_after field. + pub fn reported_after( + mut self, + reported_after: chrono::DateTime, + ) -> Self { + self.params.reported_after = Some(reported_after); + self + } + ///Set the value of the reported_before field. + pub fn reported_before( + mut self, + reported_before: chrono::DateTime, + ) -> Self { + self.params.reported_before = Some(reported_before); + self + } + ///Set the value of the review_state field. + pub fn review_state(mut self, review_state: &str) -> Self { + self.params.review_state = Some(review_state.to_owned()); + self + } + ///Set the value of the reviewed_after field. + pub fn reviewed_after( + mut self, + reviewed_after: chrono::DateTime, + ) -> Self { + self.params.reviewed_after = Some(reviewed_after); + self + } + ///Set the value of the reviewed_before field. + pub fn reviewed_before( + mut self, + reviewed_before: chrono::DateTime, + ) -> Self { + self.params.reviewed_before = Some(reviewed_before); + self + } + ///Set the value of the sort_direction field. + pub fn sort_direction(mut self, sort_direction: &str) -> Self { + self.params.sort_direction = Some(sort_direction.to_owned()); + self + } + ///Set the value of the sort_field field. + pub fn sort_field(mut self, sort_field: &str) -> Self { + self.params.sort_field = Some(sort_field.to_owned()); + self + } + ///Set the value of the subject field. + pub fn subject(mut self, subject: &str) -> Self { + self.params.subject = Some(subject.to_owned()); + self + } + ///Set the value of the tags field. + pub fn tags(mut self, tags: impl IntoIterator>) -> Self { + self + .params + .tags = Some(tags.into_iter().map(|s| s.as_ref().to_owned()).collect()); + self + } + ///Set the value of the takendown field. + pub fn takendown(mut self, takendown: bool) -> Self { + self.params.takendown = Some(takendown); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ToolsOzoneModerationQueryStatusesRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/tools.ozone.moderation.queryStatuses"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/request/tools_ozone_moderation_search_repos.rs b/src/request/tools_ozone_moderation_search_repos.rs new file mode 100644 index 0000000..bcecd57 --- /dev/null +++ b/src/request/tools_ozone_moderation_search_repos.rs @@ -0,0 +1,53 @@ +use serde_json::json; +use crate::model::*; +use crate::FluentRequest; +use serde::{Serialize, Deserialize}; +use httpclient::InMemoryResponseExt; +use crate::AtprotoClient; +/**You should use this struct via [`AtprotoClient::tools_ozone_moderation_search_repos`]. + +On request success, this will return a [`ToolsOzoneModerationSearchReposResponse`].*/ +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ToolsOzoneModerationSearchReposRequest { + pub cursor: Option, + pub limit: Option, + pub q: Option, + pub term: Option, +} +impl ToolsOzoneModerationSearchReposRequest {} +impl FluentRequest<'_, ToolsOzoneModerationSearchReposRequest> { + ///Set the value of the cursor field. + pub fn cursor(mut self, cursor: &str) -> Self { + self.params.cursor = Some(cursor.to_owned()); + self + } + ///Set the value of the limit field. + pub fn limit(mut self, limit: i64) -> Self { + self.params.limit = Some(limit); + self + } + ///Set the value of the q field. + pub fn q(mut self, q: &str) -> Self { + self.params.q = Some(q.to_owned()); + self + } + ///Set the value of the term field. + pub fn term(mut self, term: &str) -> Self { + self.params.term = Some(term.to_owned()); + self + } +} +impl<'a> ::std::future::IntoFuture +for FluentRequest<'a, ToolsOzoneModerationSearchReposRequest> { + type Output = httpclient::InMemoryResult; + type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>; + fn into_future(self) -> Self::IntoFuture { + Box::pin(async move { + let url = "/tools.ozone.moderation.searchRepos"; + let mut r = self.client.client.get(url); + r = r.set_query(self.params); + let res = r.await?; + res.json().map_err(Into::into) + }) + } +} \ No newline at end of file diff --git a/src/serde.rs b/src/serde.rs new file mode 100644 index 0000000..3c2dc55 --- /dev/null +++ b/src/serde.rs @@ -0,0 +1 @@ +pub use ::serde::*; \ No newline at end of file