diff --git a/CLAUDE.md b/CLAUDE.md index 52ecb1f..246d273 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -15,11 +15,11 @@ Jacquard is a suite of Rust crates for the AT Protocol (atproto/Bluesky). The pr This is a Cargo workspace with several crates: +- **jacquard**: Main library crate with XRPC client and public API surface (re-exports jacquard-api and jacquard-common) - **jacquard-common**: Core AT Protocol types (DIDs, handles, at-URIs, NSIDs, TIDs, CIDs, etc.) and the `CowStr` type for efficient string handling - **jacquard-lexicon**: Lexicon parsing and Rust code generation from lexicon schemas -- **jacquard-api**: Generated API bindings (currently empty/in development) -- **jacquard-derive**: Derive macros for lexicon structures -- **jacquard**: Main binary (currently minimal) +- **jacquard-api**: Generated API bindings from lexicon schemas (implementation detail, not directly used by consumers) +- **jacquard-derive**: Attribute macros (`#[lexicon]`, `#[open_union]`) for lexicon structures ## Development Commands @@ -57,6 +57,11 @@ just watch [ARGS] # Format and lint all just pre-commit-all + +# Generate API bindings from lexicon schemas +cargo run -p jacquard-lexicon --bin jacquard-codegen -- -i -o [-r ] +# Example: +cargo run -p jacquard-lexicon --bin jacquard-codegen -- -i crates/jacquard-lexicon/tests/fixtures/lexicons/atproto/lexicons -o crates/jacquard-api/src -r crate ``` ## String Type Pattern @@ -101,6 +106,18 @@ All string types should implement: - Use `cargo test ` to run specific tests - Current test coverage: 89 tests in jacquard-common +## Lexicon Code Generation + +The `jacquard-codegen` binary generates Rust types from AT Protocol Lexicon schemas: + +- Generates structs with `#[lexicon]` attribute for forward compatibility (captures unknown fields in `extra_data`) +- Generates enums with `#[open_union]` attribute for handling unknown variants (unless marked `closed` in lexicon) +- Resolves local refs (e.g., `#image` becomes `Image<'a>`) +- Extracts doc comments from lexicon `description` fields +- Adds header comments with `@generated` marker and lexicon NSID +- Handles XRPC queries, procedures, subscriptions, and errors +- Generates proper module tree with Rust 2018 style + ## Current State & Next Steps ### Completed @@ -110,6 +127,14 @@ All string types should implement: - ✅ Data serialization: Full serialize/deserialize for `Data<'_>`, `Array`, `Object` with format-specific handling (JSON vs CBOR) - ✅ CidLink wrapper type with automatic `{"$link": "cid"}` serialization in JSON - ✅ Integration test with real Bluesky thread data validates round-trip correctness +- ✅ Lexicon code generation with forward compatibility and proper lifetime handling ### Next Steps -1. **Lexicon Code Generation**: Begin work on lexicon-to-Rust code generation now that core types are stable +1. **Lexicon Resolution**: Fetch lexicons from web sources (atproto authorities, git repositories) and parse into corpus +2. **Custom Lexicon Support**: Allow users to plug in their own generated lexicons alongside jacquard-api types in the client/server layer +3. **Client Implementation**: Build HTTP client layer for XRPC operations in the main `jacquard` crate +4. **Public API**: Design the main API surface in `jacquard` that re-exports and wraps generated types +5. **DID Document Support**: Parsing, validation, and resolution of DID documents +6. **OAuth Implementation**: OAuth flow support for authentication +7. **Examples & Documentation**: Create examples and improve documentation +8. **Testing**: Comprehensive tests for generated code and round-trip serialization diff --git a/Cargo.lock b/Cargo.lock index 94c5731..11cc41f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -21,6 +21,21 @@ dependencies = [ "nom", ] +[[package]] +name = "addr2line" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + [[package]] name = "aho-corasick" version = "1.1.3" @@ -81,7 +96,7 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" dependencies = [ - "windows-sys", + "windows-sys 0.60.2", ] [[package]] @@ -92,15 +107,49 @@ checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys", + "windows-sys 0.60.2", +] + +[[package]] +name = "async-compression" +version = "0.4.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "977eb15ea9efd848bb8a4a1a2500347ed7f0bf794edf0dc3ddcf439f43d36b23" +dependencies = [ + "compression-codecs", + "compression-core", + "futures-core", + "pin-project-lite", + "tokio", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +[[package]] +name = "backtrace" +version = "0.3.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-link 0.2.0", +] + [[package]] name = "base-x" version = "0.2.11" @@ -113,6 +162,12 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "bitflags" +version = "2.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" + [[package]] name = "block-buffer" version = "0.10.4" @@ -212,7 +267,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-link", + "windows-link 0.2.0", ] [[package]] @@ -302,6 +357,33 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" +[[package]] +name = "compression-codecs" +version = "0.4.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "485abf41ac0c8047c07c87c72c8fb3eb5197f6e9d7ded615dfd1a00ae00a0f64" +dependencies = [ + "compression-core", + "flate2", + "memchr", +] + +[[package]] +name = "compression-core" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e47641d3deaf41fb1538ac1f54735925e275eaf3bf4d55c81b137fba797e5cbb" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -326,6 +408,15 @@ dependencies = [ "libc", ] +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + [[package]] name = "crunchy" version = "0.2.4" @@ -446,6 +537,15 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + [[package]] name = "enum_dispatch" version = "0.3.13" @@ -470,6 +570,16 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ced73b1dacfc750a6db6c0a0c3a3853c8b41997e2e2c563dc90804ae6867959" +[[package]] +name = "flate2" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + [[package]] name = "fnv" version = "1.0.7" @@ -485,6 +595,45 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "pin-utils", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -495,6 +644,19 @@ dependencies = [ "version_check", ] +[[package]] +name = "getrandom" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "wasm-bindgen", +] + [[package]] name = "getrandom" version = "0.3.3" @@ -502,9 +664,36 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ "cfg-if", + "js-sys", "libc", "r-efi", - "wasi", + "wasi 0.14.7+wasi-0.2.4", + "wasm-bindgen", +] + +[[package]] +name = "gimli" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" + +[[package]] +name = "h2" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap 2.11.4", + "slab", + "tokio", + "tokio-util", + "tracing", ] [[package]] @@ -553,6 +742,111 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" +[[package]] +name = "http" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hyper" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "h2", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", + "webpki-roots", +] + +[[package]] +name = "hyper-util" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "system-configuration", + "tokio", + "tower-service", + "tracing", + "windows-registry", +] + [[package]] name = "iana-time-zone" version = "0.1.64" @@ -719,6 +1013,17 @@ version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd" +[[package]] +name = "io-uring" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" +dependencies = [ + "bitflags", + "cfg-if", + "libc", +] + [[package]] name = "ipld-core" version = "0.4.2" @@ -730,6 +1035,22 @@ dependencies = [ "serde_bytes", ] +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "iri-string" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "is_terminal_polyfill" version = "1.70.1" @@ -756,7 +1077,9 @@ name = "jacquard" version = "0.1.0" dependencies = [ "clap", + "jacquard-api", "jacquard-common", + "reqwest", ] [[package]] @@ -805,7 +1128,6 @@ dependencies = [ "heck 0.5.0", "itertools", "jacquard-common", - "jacquard-lexicon", "prettyplease", "proc-macro2", "quote", @@ -875,6 +1197,12 @@ version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + [[package]] name = "memchr" version = "2.7.6" @@ -903,12 +1231,38 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + [[package]] name = "minimal-lexical" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +dependencies = [ + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.59.0", +] + [[package]] name = "multibase" version = "0.9.1" @@ -956,6 +1310,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "object" +version = "0.37.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" version = "1.21.3" @@ -998,6 +1361,18 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + [[package]] name = "potential_utf" version = "0.1.3" @@ -1078,6 +1453,61 @@ dependencies = [ "yansi", ] +[[package]] +name = "quinn" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror 2.0.17", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" +dependencies = [ + "bytes", + "getrandom 0.3.3", + "lru-slab", + "rand", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.17", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.52.0", +] + [[package]] name = "quote" version = "1.0.41" @@ -1119,7 +1549,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom", + "getrandom 0.3.3", ] [[package]] @@ -1177,6 +1607,111 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" +[[package]] +name = "reqwest" +version = "0.12.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" +dependencies = [ + "async-compression", + "base64", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "mime", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tokio-util", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.16", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" + +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] +name = "rustls" +version = "0.23.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd3c25631629d034ce7cd9940adc9d45762d46de2b0f57193c4443b92c6d4d40" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +dependencies = [ + "web-time", + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e10b3f4191e8a80e6b43eebabfac91e5dcecebb27a71f04e820c47ec41d314bf" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + [[package]] name = "rustversion" version = "1.0.22" @@ -1289,6 +1824,18 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + [[package]] name = "serde_with" version = "3.14.1" @@ -1360,6 +1907,16 @@ dependencies = [ "serde", ] +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -1398,6 +1955,12 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + [[package]] name = "syn" version = "1.0.109" @@ -1419,6 +1982,15 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + [[package]] name = "synstructure" version = "0.13.2" @@ -1430,6 +2002,27 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "thiserror" version = "1.0.69" @@ -1511,6 +2104,131 @@ dependencies = [ "zerovec", ] +[[package]] +name = "tinyvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" +dependencies = [ + "backtrace", + "bytes", + "io-uring", + "libc", + "mio", + "pin-project-lite", + "slab", + "socket2", + "windows-sys 0.59.0", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + [[package]] name = "typenum" version = "1.18.0" @@ -1535,6 +2253,12 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" version = "2.5.7" @@ -1565,6 +2289,21 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + [[package]] name = "wasi" version = "0.14.7+wasi-0.2.4" @@ -1610,6 +2349,19 @@ dependencies = [ "wasm-bindgen-shared", ] +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e038d41e478cc73bae0ff9b36c60cff1c98b8f38f8d7e8061e79ee63608ac5c" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "wasm-bindgen-macro" version = "0.2.104" @@ -1642,6 +2394,35 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "web-sys" +version = "0.3.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9367c417a924a74cae129e6a2ae3b47fabb1f8995595ab474029da749a8be120" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "windows-core" version = "0.62.1" @@ -1650,9 +2431,9 @@ checksum = "6844ee5416b285084d3d3fffd743b925a6c9385455f64f6d4fa3031c4c2749a9" dependencies = [ "windows-implement", "windows-interface", - "windows-link", - "windows-result", - "windows-strings", + "windows-link 0.2.0", + "windows-result 0.4.0", + "windows-strings 0.5.0", ] [[package]] @@ -1677,19 +2458,54 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + [[package]] name = "windows-link" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" +[[package]] +name = "windows-registry" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" +dependencies = [ + "windows-link 0.1.3", + "windows-result 0.3.4", + "windows-strings 0.4.2", +] + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link 0.1.3", +] + [[package]] name = "windows-result" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7084dcc306f89883455a206237404d3eaf961e5bd7e0f312f7c91f57eb44167f" dependencies = [ - "windows-link", + "windows-link 0.2.0", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link 0.1.3", ] [[package]] @@ -1698,7 +2514,25 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7218c655a553b0bed4426cf54b20d7ba363ef543b52d515b3e48d7fd55318dda" dependencies = [ - "windows-link", + "windows-link 0.2.0", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -1707,7 +2541,23 @@ version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets", + "windows-targets 0.53.4", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -1716,59 +2566,107 @@ version = "0.53.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d42b7b7f66d2a06854650af09cfdf8713e427a439c97ad65a6375318033ac4b" dependencies = [ - "windows-link", - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows-link 0.2.0", + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + [[package]] name = "windows_aarch64_gnullvm" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + [[package]] name = "windows_aarch64_msvc" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + [[package]] name = "windows_i686_gnu" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + [[package]] name = "windows_i686_gnullvm" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + [[package]] name = "windows_i686_msvc" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + [[package]] name = "windows_x86_64_gnu" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + [[package]] name = "windows_x86_64_gnullvm" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + [[package]] name = "windows_x86_64_msvc" version = "0.53.0" @@ -1858,6 +2756,12 @@ dependencies = [ "synstructure", ] +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" + [[package]] name = "zerotrie" version = "0.2.2" diff --git a/crates/jacquard-api/Cargo.toml b/crates/jacquard-api/Cargo.toml index 430d841..710e29e 100644 --- a/crates/jacquard-api/Cargo.toml +++ b/crates/jacquard-api/Cargo.toml @@ -11,6 +11,13 @@ documentation.workspace = true exclude.workspace = true description.workspace = true +[features] +default = ["app_bsky", "com_atproto", "tools_ozone", "chat_bsky"] +app_bsky = [] +chat_bsky = [] +com_atproto = [] +tools_ozone = [] + [dependencies] bytes = { version = "1.10.1", features = ["serde"] } jacquard-common = { version = "0.1.0", path = "../jacquard-common" } diff --git a/crates/jacquard-api/src/app_bsky/actor.rs b/crates/jacquard-api/src/app_bsky/actor.rs index 1460866..1ad9b26 100644 --- a/crates/jacquard-api/src/app_bsky/actor.rs +++ b/crates/jacquard-api/src/app_bsky/actor.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.actor.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/app_bsky/actor/get_preferences.rs b/crates/jacquard-api/src/app_bsky/actor/get_preferences.rs index 7e9cfb4..4735061 100644 --- a/crates/jacquard-api/src/app_bsky/actor/get_preferences.rs +++ b/crates/jacquard-api/src/app_bsky/actor/get_preferences.rs @@ -1,15 +1,25 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.actor.getPreferences +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetPreferencesParams {} +pub struct GetPreferences {} #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetPreferencesOutput<'a> { #[serde(borrow)] pub preferences: crate::app_bsky::actor::Preferences<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetPreferences { + const NSID: &'static str = "app.bsky.actor.getPreferences"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetPreferencesOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/actor/get_profile.rs b/crates/jacquard-api/src/app_bsky/actor/get_profile.rs index e1702ec..e20d9f4 100644 --- a/crates/jacquard-api/src/app_bsky/actor/get_profile.rs +++ b/crates/jacquard-api/src/app_bsky/actor/get_profile.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.actor.getProfile +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetProfileParams<'a> { +pub struct GetProfile<'a> { #[serde(borrow)] pub actor: jacquard_common::types::ident::AtIdentifier<'a>, } @@ -17,4 +19,12 @@ pub struct GetProfileOutput<'a> { #[serde(flatten)] #[serde(borrow)] pub value: crate::app_bsky::actor::ProfileViewDetailed<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetProfile<'_> { + const NSID: &'static str = "app.bsky.actor.getProfile"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetProfileOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/actor/get_profiles.rs b/crates/jacquard-api/src/app_bsky/actor/get_profiles.rs index c9a84a4..5480edf 100644 --- a/crates/jacquard-api/src/app_bsky/actor/get_profiles.rs +++ b/crates/jacquard-api/src/app_bsky/actor/get_profiles.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.actor.getProfiles +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetProfilesParams<'a> { +pub struct GetProfiles<'a> { #[serde(borrow)] pub actors: Vec>, } @@ -16,4 +18,12 @@ pub struct GetProfilesParams<'a> { pub struct GetProfilesOutput<'a> { #[serde(borrow)] pub profiles: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetProfiles<'_> { + const NSID: &'static str = "app.bsky.actor.getProfiles"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetProfilesOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/actor/get_suggestions.rs b/crates/jacquard-api/src/app_bsky/actor/get_suggestions.rs index e7832a5..267e0e4 100644 --- a/crates/jacquard-api/src/app_bsky/actor/get_suggestions.rs +++ b/crates/jacquard-api/src/app_bsky/actor/get_suggestions.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.actor.getSuggestions +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetSuggestionsParams<'a> { +pub struct GetSuggestions<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -13,6 +15,15 @@ pub struct GetSuggestionsParams<'a> { pub limit: std::option::Option, } +impl Default for GetSuggestions<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -25,4 +36,12 @@ pub struct GetSuggestionsOutput<'a> { ///Snowflake for this recommendation, use when submitting recommendation events. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub rec_id: std::option::Option, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetSuggestions<'_> { + const NSID: &'static str = "app.bsky.actor.getSuggestions"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetSuggestionsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/actor/profile.rs b/crates/jacquard-api/src/app_bsky/actor/profile.rs index 7b46ae6..9da7566 100644 --- a/crates/jacquard-api/src/app_bsky/actor/profile.rs +++ b/crates/jacquard-api/src/app_bsky/actor/profile.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.actor.profile +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -55,4 +57,8 @@ pub struct Profile<'a> { pub enum ProfileRecordLabels<'a> { #[serde(rename = "com.atproto.label.defs#selfLabels")] DefsSelfLabels(Box>), +} + +impl jacquard_common::types::collection::Collection for Profile<'_> { + const NSID: &'static str = "app.bsky.actor.profile"; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/actor/put_preferences.rs b/crates/jacquard-api/src/app_bsky/actor/put_preferences.rs index 85842ae..fb4a753 100644 --- a/crates/jacquard-api/src/app_bsky/actor/put_preferences.rs +++ b/crates/jacquard-api/src/app_bsky/actor/put_preferences.rs @@ -1,12 +1,24 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.actor.putPreferences +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct PutPreferencesInput<'a> { +pub struct PutPreferences<'a> { #[serde(borrow)] pub preferences: crate::app_bsky::actor::Preferences<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for PutPreferences<'_> { + const NSID: &'static str = "app.bsky.actor.putPreferences"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/actor/search_actors.rs b/crates/jacquard-api/src/app_bsky/actor/search_actors.rs index 9990843..4d196a5 100644 --- a/crates/jacquard-api/src/app_bsky/actor/search_actors.rs +++ b/crates/jacquard-api/src/app_bsky/actor/search_actors.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.actor.searchActors +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct SearchActorsParams<'a> { +pub struct SearchActors<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -19,6 +21,17 @@ pub struct SearchActorsParams<'a> { pub term: std::option::Option>, } +impl Default for SearchActors<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(25i64), + q: Default::default(), + term: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -28,4 +41,12 @@ pub struct SearchActorsOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for SearchActors<'_> { + const NSID: &'static str = "app.bsky.actor.searchActors"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = SearchActorsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/actor/search_actors_typeahead.rs b/crates/jacquard-api/src/app_bsky/actor/search_actors_typeahead.rs index 10835ac..e11fdf3 100644 --- a/crates/jacquard-api/src/app_bsky/actor/search_actors_typeahead.rs +++ b/crates/jacquard-api/src/app_bsky/actor/search_actors_typeahead.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.actor.searchActorsTypeahead +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct SearchActorsTypeaheadParams<'a> { +pub struct SearchActorsTypeahead<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -16,10 +18,28 @@ pub struct SearchActorsTypeaheadParams<'a> { pub term: std::option::Option>, } +impl Default for SearchActorsTypeahead<'_> { + fn default() -> Self { + Self { + limit: Some(10i64), + q: Default::default(), + term: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SearchActorsTypeaheadOutput<'a> { #[serde(borrow)] pub actors: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for SearchActorsTypeahead<'_> { + const NSID: &'static str = "app.bsky.actor.searchActorsTypeahead"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = SearchActorsTypeaheadOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/actor/status.rs b/crates/jacquard-api/src/app_bsky/actor/status.rs index b51e765..93405f8 100644 --- a/crates/jacquard-api/src/app_bsky/actor/status.rs +++ b/crates/jacquard-api/src/app_bsky/actor/status.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.actor.status +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -28,4 +30,8 @@ pub struct Status<'a> { pub enum StatusRecordEmbed<'a> { #[serde(rename = "app.bsky.embed.external")] External(Box>), +} + +impl jacquard_common::types::collection::Collection for Status<'_> { + const NSID: &'static str = "app.bsky.actor.status"; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/bookmark.rs b/crates/jacquard-api/src/app_bsky/bookmark.rs index 482d546..eb1d2e4 100644 --- a/crates/jacquard-api/src/app_bsky/bookmark.rs +++ b/crates/jacquard-api/src/app_bsky/bookmark.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.bookmark.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/app_bsky/bookmark/create_bookmark.rs b/crates/jacquard-api/src/app_bsky/bookmark/create_bookmark.rs index 2fddb3e..b6905fe 100644 --- a/crates/jacquard-api/src/app_bsky/bookmark/create_bookmark.rs +++ b/crates/jacquard-api/src/app_bsky/bookmark/create_bookmark.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.bookmark.createBookmark +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct CreateBookmarkInput<'a> { +pub struct CreateBookmark<'a> { #[serde(borrow)] pub cid: jacquard_common::types::string::Cid<'a>, #[serde(borrow)] @@ -45,4 +47,14 @@ impl std::fmt::Display for CreateBookmarkError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for CreateBookmark<'_> { + const NSID: &'static str = "app.bsky.bookmark.createBookmark"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = CreateBookmarkError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/bookmark/delete_bookmark.rs b/crates/jacquard-api/src/app_bsky/bookmark/delete_bookmark.rs index 7f16317..97496e3 100644 --- a/crates/jacquard-api/src/app_bsky/bookmark/delete_bookmark.rs +++ b/crates/jacquard-api/src/app_bsky/bookmark/delete_bookmark.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.bookmark.deleteBookmark +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct DeleteBookmarkInput<'a> { +pub struct DeleteBookmark<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } @@ -43,4 +45,14 @@ impl std::fmt::Display for DeleteBookmarkError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for DeleteBookmark<'_> { + const NSID: &'static str = "app.bsky.bookmark.deleteBookmark"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = DeleteBookmarkError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/bookmark/get_bookmarks.rs b/crates/jacquard-api/src/app_bsky/bookmark/get_bookmarks.rs index 46ca2af..ddb490f 100644 --- a/crates/jacquard-api/src/app_bsky/bookmark/get_bookmarks.rs +++ b/crates/jacquard-api/src/app_bsky/bookmark/get_bookmarks.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.bookmark.getBookmarks +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetBookmarksParams<'a> { +pub struct GetBookmarks<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -13,6 +15,15 @@ pub struct GetBookmarksParams<'a> { pub limit: std::option::Option, } +impl Default for GetBookmarks<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -22,4 +33,12 @@ pub struct GetBookmarksOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetBookmarks<'_> { + const NSID: &'static str = "app.bsky.bookmark.getBookmarks"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetBookmarksOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/embed.rs b/crates/jacquard-api/src/app_bsky/embed.rs index 12a3bb3..deb6967 100644 --- a/crates/jacquard-api/src/app_bsky/embed.rs +++ b/crates/jacquard-api/src/app_bsky/embed.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.embed.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/app_bsky/embed/external.rs b/crates/jacquard-api/src/app_bsky/embed/external.rs index b5ce700..661f472 100644 --- a/crates/jacquard-api/src/app_bsky/embed/external.rs +++ b/crates/jacquard-api/src/app_bsky/embed/external.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.embed.external +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/app_bsky/embed/images.rs b/crates/jacquard-api/src/app_bsky/embed/images.rs index c69ad9f..c375968 100644 --- a/crates/jacquard-api/src/app_bsky/embed/images.rs +++ b/crates/jacquard-api/src/app_bsky/embed/images.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.embed.images +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/app_bsky/embed/record.rs b/crates/jacquard-api/src/app_bsky/embed/record.rs index 0098d5f..0fe69ae 100644 --- a/crates/jacquard-api/src/app_bsky/embed/record.rs +++ b/crates/jacquard-api/src/app_bsky/embed/record.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.embed.record +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/app_bsky/embed/record_with_media.rs b/crates/jacquard-api/src/app_bsky/embed/record_with_media.rs index 6f8759b..cee725a 100644 --- a/crates/jacquard-api/src/app_bsky/embed/record_with_media.rs +++ b/crates/jacquard-api/src/app_bsky/embed/record_with_media.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.embed.recordWithMedia +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/app_bsky/embed/video.rs b/crates/jacquard-api/src/app_bsky/embed/video.rs index a8625c8..810efbd 100644 --- a/crates/jacquard-api/src/app_bsky/embed/video.rs +++ b/crates/jacquard-api/src/app_bsky/embed/video.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.embed.video +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/app_bsky/feed.rs b/crates/jacquard-api/src/app_bsky/feed.rs index de2dfbb..e3a0f56 100644 --- a/crates/jacquard-api/src/app_bsky/feed.rs +++ b/crates/jacquard-api/src/app_bsky/feed.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/app_bsky/feed/describe_feed_generator.rs b/crates/jacquard-api/src/app_bsky/feed/describe_feed_generator.rs index 279bac5..2eb68e3 100644 --- a/crates/jacquard-api/src/app_bsky/feed/describe_feed_generator.rs +++ b/crates/jacquard-api/src/app_bsky/feed/describe_feed_generator.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.describeFeedGenerator +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -34,4 +36,15 @@ pub struct DescribeFeedGeneratorOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub links: std::option::Option>, +} + +/// XRPC request marker type +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] +pub struct DescribeFeedGenerator; +impl jacquard_common::types::xrpc::XrpcRequest for DescribeFeedGenerator { + const NSID: &'static str = "app.bsky.feed.describeFeedGenerator"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = DescribeFeedGeneratorOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/generator.rs b/crates/jacquard-api/src/app_bsky/feed/generator.rs index 95ba2e0..f506a6e 100644 --- a/crates/jacquard-api/src/app_bsky/feed/generator.rs +++ b/crates/jacquard-api/src/app_bsky/feed/generator.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.generator +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -43,4 +45,8 @@ pub struct Generator<'a> { pub enum GeneratorRecordLabels<'a> { #[serde(rename = "com.atproto.label.defs#selfLabels")] DefsSelfLabels(Box>), +} + +impl jacquard_common::types::collection::Collection for Generator<'_> { + const NSID: &'static str = "app.bsky.feed.generator"; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_actor_feeds.rs b/crates/jacquard-api/src/app_bsky/feed/get_actor_feeds.rs index 1bf3e15..437320e 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_actor_feeds.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_actor_feeds.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.getActorFeeds +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetActorFeedsParams<'a> { +pub struct GetActorFeeds<'a> { #[serde(borrow)] pub actor: jacquard_common::types::ident::AtIdentifier<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -15,6 +17,16 @@ pub struct GetActorFeedsParams<'a> { pub limit: std::option::Option, } +impl Default for GetActorFeeds<'_> { + fn default() -> Self { + Self { + actor: Default::default(), + cursor: Default::default(), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -24,4 +36,12 @@ pub struct GetActorFeedsOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub feeds: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetActorFeeds<'_> { + const NSID: &'static str = "app.bsky.feed.getActorFeeds"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetActorFeedsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_actor_likes.rs b/crates/jacquard-api/src/app_bsky/feed/get_actor_likes.rs index a1dd46b..e947ccd 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_actor_likes.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_actor_likes.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.getActorLikes +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetActorLikesParams<'a> { +pub struct GetActorLikes<'a> { #[serde(borrow)] pub actor: jacquard_common::types::ident::AtIdentifier<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -15,6 +17,16 @@ pub struct GetActorLikesParams<'a> { pub limit: std::option::Option, } +impl Default for GetActorLikes<'_> { + fn default() -> Self { + Self { + actor: Default::default(), + cursor: Default::default(), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -66,4 +78,12 @@ impl std::fmt::Display for GetActorLikesError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetActorLikes<'_> { + const NSID: &'static str = "app.bsky.feed.getActorLikes"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetActorLikesOutput<'de>; + type Err<'de> = GetActorLikesError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_author_feed.rs b/crates/jacquard-api/src/app_bsky/feed/get_author_feed.rs index 45220a6..f406c09 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_author_feed.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_author_feed.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.getAuthorFeed +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetAuthorFeedParams<'a> { +pub struct GetAuthorFeed<'a> { #[serde(borrow)] pub actor: jacquard_common::types::ident::AtIdentifier<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -20,6 +22,18 @@ pub struct GetAuthorFeedParams<'a> { pub limit: std::option::Option, } +impl Default for GetAuthorFeed<'_> { + fn default() -> Self { + Self { + actor: Default::default(), + cursor: Default::default(), + filter: Some(jacquard_common::CowStr::from("posts_with_replies")), + include_pins: Some(false), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -71,4 +85,12 @@ impl std::fmt::Display for GetAuthorFeedError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetAuthorFeed<'_> { + const NSID: &'static str = "app.bsky.feed.getAuthorFeed"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetAuthorFeedOutput<'de>; + type Err<'de> = GetAuthorFeedError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_feed.rs b/crates/jacquard-api/src/app_bsky/feed/get_feed.rs index e7ba23e..b682a20 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_feed.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_feed.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.getFeed +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetFeedParams<'a> { +pub struct GetFeed<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -15,6 +17,16 @@ pub struct GetFeedParams<'a> { pub limit: std::option::Option, } +impl Default for GetFeed<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + feed: Default::default(), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -57,4 +69,12 @@ impl std::fmt::Display for GetFeedError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetFeed<'_> { + const NSID: &'static str = "app.bsky.feed.getFeed"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetFeedOutput<'de>; + type Err<'de> = GetFeedError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_feed_generator.rs b/crates/jacquard-api/src/app_bsky/feed/get_feed_generator.rs index 279a92a..1791fc3 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_feed_generator.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_feed_generator.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.getFeedGenerator +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetFeedGeneratorParams<'a> { +pub struct GetFeedGenerator<'a> { #[serde(borrow)] pub feed: jacquard_common::types::string::AtUri<'a>, } @@ -20,4 +22,12 @@ pub struct GetFeedGeneratorOutput<'a> { pub is_valid: bool, #[serde(borrow)] pub view: crate::app_bsky::feed::GeneratorView<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetFeedGenerator<'_> { + const NSID: &'static str = "app.bsky.feed.getFeedGenerator"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetFeedGeneratorOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_feed_generators.rs b/crates/jacquard-api/src/app_bsky/feed/get_feed_generators.rs index 68f612d..5eb0124 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_feed_generators.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_feed_generators.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.getFeedGenerators +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetFeedGeneratorsParams<'a> { +pub struct GetFeedGenerators<'a> { #[serde(borrow)] pub feeds: Vec>, } @@ -16,4 +18,12 @@ pub struct GetFeedGeneratorsParams<'a> { pub struct GetFeedGeneratorsOutput<'a> { #[serde(borrow)] pub feeds: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetFeedGenerators<'_> { + const NSID: &'static str = "app.bsky.feed.getFeedGenerators"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetFeedGeneratorsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_feed_skeleton.rs b/crates/jacquard-api/src/app_bsky/feed/get_feed_skeleton.rs index 23da2ec..54d3d29 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_feed_skeleton.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_feed_skeleton.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.getFeedSkeleton +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetFeedSkeletonParams<'a> { +pub struct GetFeedSkeleton<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -15,6 +17,16 @@ pub struct GetFeedSkeletonParams<'a> { pub limit: std::option::Option, } +impl Default for GetFeedSkeleton<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + feed: Default::default(), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -61,4 +73,12 @@ impl std::fmt::Display for GetFeedSkeletonError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetFeedSkeleton<'_> { + const NSID: &'static str = "app.bsky.feed.getFeedSkeleton"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetFeedSkeletonOutput<'de>; + type Err<'de> = GetFeedSkeletonError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_likes.rs b/crates/jacquard-api/src/app_bsky/feed/get_likes.rs index 7106528..d823f26 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_likes.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_likes.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.getLikes +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -13,9 +15,9 @@ pub struct Like<'a> { pub indexed_at: jacquard_common::types::string::Datetime, } -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetLikesParams<'a> { +pub struct GetLikes<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cid: std::option::Option>, @@ -28,6 +30,17 @@ pub struct GetLikesParams<'a> { pub uri: jacquard_common::types::string::AtUri<'a>, } +impl Default for GetLikes<'_> { + fn default() -> Self { + Self { + cid: Default::default(), + cursor: Default::default(), + limit: Some(50i64), + uri: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -42,4 +55,12 @@ pub struct GetLikesOutput<'a> { pub likes: Vec>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetLikes<'_> { + const NSID: &'static str = "app.bsky.feed.getLikes"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetLikesOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_list_feed.rs b/crates/jacquard-api/src/app_bsky/feed/get_list_feed.rs index 589f84b..08d10da 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_list_feed.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_list_feed.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.getListFeed +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetListFeedParams<'a> { +pub struct GetListFeed<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -15,6 +17,16 @@ pub struct GetListFeedParams<'a> { pub list: jacquard_common::types::string::AtUri<'a>, } +impl Default for GetListFeed<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(50i64), + list: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -57,4 +69,12 @@ impl std::fmt::Display for GetListFeedError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetListFeed<'_> { + const NSID: &'static str = "app.bsky.feed.getListFeed"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetListFeedOutput<'de>; + type Err<'de> = GetListFeedError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_post_thread.rs b/crates/jacquard-api/src/app_bsky/feed/get_post_thread.rs index 127cbe1..32def88 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_post_thread.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_post_thread.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.getPostThread +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetPostThreadParams<'a> { +pub struct GetPostThread<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub depth: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -14,6 +16,16 @@ pub struct GetPostThreadParams<'a> { pub uri: jacquard_common::types::string::AtUri<'a>, } +impl Default for GetPostThread<'_> { + fn default() -> Self { + Self { + depth: Some(6i64), + parent_height: Some(80i64), + uri: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -69,4 +81,12 @@ impl std::fmt::Display for GetPostThreadError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetPostThread<'_> { + const NSID: &'static str = "app.bsky.feed.getPostThread"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetPostThreadOutput<'de>; + type Err<'de> = GetPostThreadError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_posts.rs b/crates/jacquard-api/src/app_bsky/feed/get_posts.rs index cd22e6f..bca27f3 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_posts.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_posts.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.getPosts +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetPostsParams<'a> { +pub struct GetPosts<'a> { #[serde(borrow)] pub uris: Vec>, } @@ -16,4 +18,12 @@ pub struct GetPostsParams<'a> { pub struct GetPostsOutput<'a> { #[serde(borrow)] pub posts: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetPosts<'_> { + const NSID: &'static str = "app.bsky.feed.getPosts"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetPostsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_quotes.rs b/crates/jacquard-api/src/app_bsky/feed/get_quotes.rs index 3333a82..fdeb5a8 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_quotes.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_quotes.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.getQuotes +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetQuotesParams<'a> { +pub struct GetQuotes<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cid: std::option::Option>, @@ -18,6 +20,17 @@ pub struct GetQuotesParams<'a> { pub uri: jacquard_common::types::string::AtUri<'a>, } +impl Default for GetQuotes<'_> { + fn default() -> Self { + Self { + cid: Default::default(), + cursor: Default::default(), + limit: Some(50i64), + uri: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -32,4 +45,12 @@ pub struct GetQuotesOutput<'a> { pub posts: Vec>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetQuotes<'_> { + const NSID: &'static str = "app.bsky.feed.getQuotes"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetQuotesOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_reposted_by.rs b/crates/jacquard-api/src/app_bsky/feed/get_reposted_by.rs index e054a55..9993521 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_reposted_by.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_reposted_by.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.getRepostedBy +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetRepostedByParams<'a> { +pub struct GetRepostedBy<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cid: std::option::Option>, @@ -18,6 +20,17 @@ pub struct GetRepostedByParams<'a> { pub uri: jacquard_common::types::string::AtUri<'a>, } +impl Default for GetRepostedBy<'_> { + fn default() -> Self { + Self { + cid: Default::default(), + cursor: Default::default(), + limit: Some(50i64), + uri: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -32,4 +45,12 @@ pub struct GetRepostedByOutput<'a> { pub reposted_by: Vec>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetRepostedBy<'_> { + const NSID: &'static str = "app.bsky.feed.getRepostedBy"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetRepostedByOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_suggested_feeds.rs b/crates/jacquard-api/src/app_bsky/feed/get_suggested_feeds.rs index 70e7ca3..b0f4cdb 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_suggested_feeds.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_suggested_feeds.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.getSuggestedFeeds +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetSuggestedFeedsParams<'a> { +pub struct GetSuggestedFeeds<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -13,6 +15,15 @@ pub struct GetSuggestedFeedsParams<'a> { pub limit: std::option::Option, } +impl Default for GetSuggestedFeeds<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -22,4 +33,12 @@ pub struct GetSuggestedFeedsOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub feeds: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetSuggestedFeeds<'_> { + const NSID: &'static str = "app.bsky.feed.getSuggestedFeeds"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetSuggestedFeedsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_timeline.rs b/crates/jacquard-api/src/app_bsky/feed/get_timeline.rs index 4249e74..bb8daef 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_timeline.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_timeline.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.getTimeline +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetTimelineParams<'a> { +pub struct GetTimeline<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub algorithm: std::option::Option>, @@ -16,6 +18,16 @@ pub struct GetTimelineParams<'a> { pub limit: std::option::Option, } +impl Default for GetTimeline<'_> { + fn default() -> Self { + Self { + algorithm: Default::default(), + cursor: Default::default(), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -25,4 +37,12 @@ pub struct GetTimelineOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub feed: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetTimeline<'_> { + const NSID: &'static str = "app.bsky.feed.getTimeline"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetTimelineOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/like.rs b/crates/jacquard-api/src/app_bsky/feed/like.rs index 9a3c9c8..aeb9ea0 100644 --- a/crates/jacquard-api/src/app_bsky/feed/like.rs +++ b/crates/jacquard-api/src/app_bsky/feed/like.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.like +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -14,4 +16,8 @@ pub struct Like<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub via: std::option::Option>, +} + +impl jacquard_common::types::collection::Collection for Like<'_> { + const NSID: &'static str = "app.bsky.feed.like"; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/post.rs b/crates/jacquard-api/src/app_bsky/feed/post.rs index 276c88a..3da3319 100644 --- a/crates/jacquard-api/src/app_bsky/feed/post.rs +++ b/crates/jacquard-api/src/app_bsky/feed/post.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.post +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -80,6 +82,10 @@ pub enum PostRecordLabels<'a> { DefsSelfLabels(Box>), } +impl jacquard_common::types::collection::Collection for Post<'_> { + const NSID: &'static str = "app.bsky.feed.post"; +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] diff --git a/crates/jacquard-api/src/app_bsky/feed/postgate.rs b/crates/jacquard-api/src/app_bsky/feed/postgate.rs index 2a72497..f8ce042 100644 --- a/crates/jacquard-api/src/app_bsky/feed/postgate.rs +++ b/crates/jacquard-api/src/app_bsky/feed/postgate.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.postgate +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -29,4 +31,8 @@ pub struct Postgate<'a> { ///Reference (AT-URI) to the post record. #[serde(borrow)] pub post: jacquard_common::types::string::AtUri<'a>, +} + +impl jacquard_common::types::collection::Collection for Postgate<'_> { + const NSID: &'static str = "app.bsky.feed.postgate"; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/repost.rs b/crates/jacquard-api/src/app_bsky/feed/repost.rs index 9587bfc..e6cb34e 100644 --- a/crates/jacquard-api/src/app_bsky/feed/repost.rs +++ b/crates/jacquard-api/src/app_bsky/feed/repost.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.repost +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -14,4 +16,8 @@ pub struct Repost<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub via: std::option::Option>, +} + +impl jacquard_common::types::collection::Collection for Repost<'_> { + const NSID: &'static str = "app.bsky.feed.repost"; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/search_posts.rs b/crates/jacquard-api/src/app_bsky/feed/search_posts.rs index 91321cd..66aada8 100644 --- a/crates/jacquard-api/src/app_bsky/feed/search_posts.rs +++ b/crates/jacquard-api/src/app_bsky/feed/search_posts.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.searchPosts +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct SearchPostsParams<'a> { +pub struct SearchPosts<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub author: std::option::Option>, @@ -41,6 +43,25 @@ pub struct SearchPostsParams<'a> { pub url: std::option::Option>, } +impl Default for SearchPosts<'_> { + fn default() -> Self { + Self { + author: Default::default(), + cursor: Default::default(), + domain: Default::default(), + lang: Default::default(), + limit: Some(25i64), + mentions: Default::default(), + q: Default::default(), + since: Default::default(), + sort: Some(jacquard_common::CowStr::from("latest")), + tag: Default::default(), + until: Default::default(), + url: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -86,4 +107,12 @@ impl std::fmt::Display for SearchPostsError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for SearchPosts<'_> { + const NSID: &'static str = "app.bsky.feed.searchPosts"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = SearchPostsOutput<'de>; + type Err<'de> = SearchPostsError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/send_interactions.rs b/crates/jacquard-api/src/app_bsky/feed/send_interactions.rs index 27c6883..14b0c71 100644 --- a/crates/jacquard-api/src/app_bsky/feed/send_interactions.rs +++ b/crates/jacquard-api/src/app_bsky/feed/send_interactions.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.sendInteractions +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct SendInteractionsInput<'a> { +pub struct SendInteractions<'a> { #[serde(borrow)] pub interactions: Vec>, } @@ -14,4 +16,13 @@ pub struct SendInteractionsInput<'a> { #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct SendInteractionsOutput<'a> {} \ No newline at end of file +pub struct SendInteractionsOutput<'a> {} +impl jacquard_common::types::xrpc::XrpcRequest for SendInteractions<'_> { + const NSID: &'static str = "app.bsky.feed.sendInteractions"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = SendInteractionsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/threadgate.rs b/crates/jacquard-api/src/app_bsky/feed/threadgate.rs index c060b07..f6acb2f 100644 --- a/crates/jacquard-api/src/app_bsky/feed/threadgate.rs +++ b/crates/jacquard-api/src/app_bsky/feed/threadgate.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.feed.threadgate +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -43,6 +45,10 @@ pub struct Threadgate<'a> { pub post: jacquard_common::types::string::AtUri<'a>, } +impl jacquard_common::types::collection::Collection for Threadgate<'_> { + const NSID: &'static str = "app.bsky.feed.threadgate"; +} + ///Allow replies from actors mentioned in your post. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/crates/jacquard-api/src/app_bsky/graph.rs b/crates/jacquard-api/src/app_bsky/graph.rs index c3f6fdc..e882130 100644 --- a/crates/jacquard-api/src/app_bsky/graph.rs +++ b/crates/jacquard-api/src/app_bsky/graph.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/app_bsky/graph/block.rs b/crates/jacquard-api/src/app_bsky/graph/block.rs index 3a17d8d..de65c74 100644 --- a/crates/jacquard-api/src/app_bsky/graph/block.rs +++ b/crates/jacquard-api/src/app_bsky/graph/block.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.block +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -12,4 +14,8 @@ pub struct Block<'a> { ///DID of the account to be blocked. #[serde(borrow)] pub subject: jacquard_common::types::string::Did<'a>, +} + +impl jacquard_common::types::collection::Collection for Block<'_> { + const NSID: &'static str = "app.bsky.graph.block"; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/follow.rs b/crates/jacquard-api/src/app_bsky/graph/follow.rs index fffaf49..77ef115 100644 --- a/crates/jacquard-api/src/app_bsky/graph/follow.rs +++ b/crates/jacquard-api/src/app_bsky/graph/follow.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.follow +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -11,4 +13,8 @@ pub struct Follow<'a> { pub created_at: jacquard_common::types::string::Datetime, #[serde(borrow)] pub subject: jacquard_common::types::string::Did<'a>, +} + +impl jacquard_common::types::collection::Collection for Follow<'_> { + const NSID: &'static str = "app.bsky.graph.follow"; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_actor_starter_packs.rs b/crates/jacquard-api/src/app_bsky/graph/get_actor_starter_packs.rs index f6875ce..c5f731b 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_actor_starter_packs.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_actor_starter_packs.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.getActorStarterPacks +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetActorStarterPacksParams<'a> { +pub struct GetActorStarterPacks<'a> { #[serde(borrow)] pub actor: jacquard_common::types::ident::AtIdentifier<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -15,6 +17,16 @@ pub struct GetActorStarterPacksParams<'a> { pub limit: std::option::Option, } +impl Default for GetActorStarterPacks<'_> { + fn default() -> Self { + Self { + actor: Default::default(), + cursor: Default::default(), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -24,4 +36,12 @@ pub struct GetActorStarterPacksOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub starter_packs: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetActorStarterPacks<'_> { + const NSID: &'static str = "app.bsky.graph.getActorStarterPacks"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetActorStarterPacksOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_blocks.rs b/crates/jacquard-api/src/app_bsky/graph/get_blocks.rs index 2e554d3..6b74b71 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_blocks.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_blocks.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.getBlocks +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetBlocksParams<'a> { +pub struct GetBlocks<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -13,6 +15,15 @@ pub struct GetBlocksParams<'a> { pub limit: std::option::Option, } +impl Default for GetBlocks<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -22,4 +33,12 @@ pub struct GetBlocksOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetBlocks<'_> { + const NSID: &'static str = "app.bsky.graph.getBlocks"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetBlocksOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_followers.rs b/crates/jacquard-api/src/app_bsky/graph/get_followers.rs index 261bf21..5eaa8ab 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_followers.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_followers.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.getFollowers +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetFollowersParams<'a> { +pub struct GetFollowers<'a> { #[serde(borrow)] pub actor: jacquard_common::types::ident::AtIdentifier<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -15,6 +17,16 @@ pub struct GetFollowersParams<'a> { pub limit: std::option::Option, } +impl Default for GetFollowers<'_> { + fn default() -> Self { + Self { + actor: Default::default(), + cursor: Default::default(), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -26,4 +38,12 @@ pub struct GetFollowersOutput<'a> { pub followers: Vec>, #[serde(borrow)] pub subject: crate::app_bsky::actor::ProfileView<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetFollowers<'_> { + const NSID: &'static str = "app.bsky.graph.getFollowers"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetFollowersOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_follows.rs b/crates/jacquard-api/src/app_bsky/graph/get_follows.rs index 7827a4a..c4b6cf7 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_follows.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_follows.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.getFollows +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetFollowsParams<'a> { +pub struct GetFollows<'a> { #[serde(borrow)] pub actor: jacquard_common::types::ident::AtIdentifier<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -15,6 +17,16 @@ pub struct GetFollowsParams<'a> { pub limit: std::option::Option, } +impl Default for GetFollows<'_> { + fn default() -> Self { + Self { + actor: Default::default(), + cursor: Default::default(), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -26,4 +38,12 @@ pub struct GetFollowsOutput<'a> { pub follows: Vec>, #[serde(borrow)] pub subject: crate::app_bsky::actor::ProfileView<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetFollows<'_> { + const NSID: &'static str = "app.bsky.graph.getFollows"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetFollowsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_known_followers.rs b/crates/jacquard-api/src/app_bsky/graph/get_known_followers.rs index 160c479..08a096f 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_known_followers.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_known_followers.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.getKnownFollowers +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetKnownFollowersParams<'a> { +pub struct GetKnownFollowers<'a> { #[serde(borrow)] pub actor: jacquard_common::types::ident::AtIdentifier<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -15,6 +17,16 @@ pub struct GetKnownFollowersParams<'a> { pub limit: std::option::Option, } +impl Default for GetKnownFollowers<'_> { + fn default() -> Self { + Self { + actor: Default::default(), + cursor: Default::default(), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -26,4 +38,12 @@ pub struct GetKnownFollowersOutput<'a> { pub followers: Vec>, #[serde(borrow)] pub subject: crate::app_bsky::actor::ProfileView<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetKnownFollowers<'_> { + const NSID: &'static str = "app.bsky.graph.getKnownFollowers"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetKnownFollowersOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_list.rs b/crates/jacquard-api/src/app_bsky/graph/get_list.rs index 617faf7..9a83125 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_list.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_list.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.getList +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetListParams<'a> { +pub struct GetList<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -15,6 +17,16 @@ pub struct GetListParams<'a> { pub list: jacquard_common::types::string::AtUri<'a>, } +impl Default for GetList<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(50i64), + list: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -26,4 +38,12 @@ pub struct GetListOutput<'a> { pub items: Vec>, #[serde(borrow)] pub list: crate::app_bsky::graph::ListView<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetList<'_> { + const NSID: &'static str = "app.bsky.graph.getList"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetListOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_list_blocks.rs b/crates/jacquard-api/src/app_bsky/graph/get_list_blocks.rs index ea7de93..1ac333f 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_list_blocks.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_list_blocks.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.getListBlocks +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetListBlocksParams<'a> { +pub struct GetListBlocks<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -13,6 +15,15 @@ pub struct GetListBlocksParams<'a> { pub limit: std::option::Option, } +impl Default for GetListBlocks<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -22,4 +33,12 @@ pub struct GetListBlocksOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub lists: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetListBlocks<'_> { + const NSID: &'static str = "app.bsky.graph.getListBlocks"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetListBlocksOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_list_mutes.rs b/crates/jacquard-api/src/app_bsky/graph/get_list_mutes.rs index ddee64b..f0afc81 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_list_mutes.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_list_mutes.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.getListMutes +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetListMutesParams<'a> { +pub struct GetListMutes<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -13,6 +15,15 @@ pub struct GetListMutesParams<'a> { pub limit: std::option::Option, } +impl Default for GetListMutes<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -22,4 +33,12 @@ pub struct GetListMutesOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub lists: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetListMutes<'_> { + const NSID: &'static str = "app.bsky.graph.getListMutes"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetListMutesOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_lists.rs b/crates/jacquard-api/src/app_bsky/graph/get_lists.rs index 0cb1d18..74dc27c 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_lists.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_lists.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.getLists +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetListsParams<'a> { +pub struct GetLists<'a> { #[serde(borrow)] pub actor: jacquard_common::types::ident::AtIdentifier<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -18,6 +20,17 @@ pub struct GetListsParams<'a> { pub purposes: std::option::Option>>, } +impl Default for GetLists<'_> { + fn default() -> Self { + Self { + actor: Default::default(), + cursor: Default::default(), + limit: Some(50i64), + purposes: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -27,4 +40,12 @@ pub struct GetListsOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub lists: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetLists<'_> { + const NSID: &'static str = "app.bsky.graph.getLists"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetListsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_lists_with_membership.rs b/crates/jacquard-api/src/app_bsky/graph/get_lists_with_membership.rs index 33aa819..521e3db 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_lists_with_membership.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_lists_with_membership.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.getListsWithMembership +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -15,9 +17,9 @@ pub struct ListWithMembership<'a> { pub list_item: std::option::Option>, } -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetListsWithMembershipParams<'a> { +pub struct GetListsWithMembership<'a> { #[serde(borrow)] pub actor: jacquard_common::types::ident::AtIdentifier<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -30,6 +32,17 @@ pub struct GetListsWithMembershipParams<'a> { pub purposes: std::option::Option>>, } +impl Default for GetListsWithMembership<'_> { + fn default() -> Self { + Self { + actor: Default::default(), + cursor: Default::default(), + limit: Some(50i64), + purposes: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -39,4 +52,12 @@ pub struct GetListsWithMembershipOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub lists_with_membership: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetListsWithMembership<'_> { + const NSID: &'static str = "app.bsky.graph.getListsWithMembership"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetListsWithMembershipOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_mutes.rs b/crates/jacquard-api/src/app_bsky/graph/get_mutes.rs index 9abf75f..1ef4506 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_mutes.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_mutes.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.getMutes +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetMutesParams<'a> { +pub struct GetMutes<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -13,6 +15,15 @@ pub struct GetMutesParams<'a> { pub limit: std::option::Option, } +impl Default for GetMutes<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -22,4 +33,12 @@ pub struct GetMutesOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub mutes: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetMutes<'_> { + const NSID: &'static str = "app.bsky.graph.getMutes"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetMutesOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_relationships.rs b/crates/jacquard-api/src/app_bsky/graph/get_relationships.rs index d68925a..8cbe53e 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_relationships.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_relationships.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.getRelationships +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetRelationshipsParams<'a> { +pub struct GetRelationships<'a> { #[serde(borrow)] pub actor: jacquard_common::types::ident::AtIdentifier<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -58,4 +60,12 @@ impl std::fmt::Display for GetRelationshipsError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetRelationships<'_> { + const NSID: &'static str = "app.bsky.graph.getRelationships"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetRelationshipsOutput<'de>; + type Err<'de> = GetRelationshipsError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_starter_pack.rs b/crates/jacquard-api/src/app_bsky/graph/get_starter_pack.rs index d58c518..7a393a9 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_starter_pack.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_starter_pack.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.getStarterPack +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetStarterPackParams<'a> { +pub struct GetStarterPack<'a> { #[serde(borrow)] pub starter_pack: jacquard_common::types::string::AtUri<'a>, } @@ -16,4 +18,12 @@ pub struct GetStarterPackParams<'a> { pub struct GetStarterPackOutput<'a> { #[serde(borrow)] pub starter_pack: crate::app_bsky::graph::StarterPackView<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetStarterPack<'_> { + const NSID: &'static str = "app.bsky.graph.getStarterPack"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetStarterPackOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_starter_packs.rs b/crates/jacquard-api/src/app_bsky/graph/get_starter_packs.rs index de1e503..a1ec166 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_starter_packs.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_starter_packs.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.getStarterPacks +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetStarterPacksParams<'a> { +pub struct GetStarterPacks<'a> { #[serde(borrow)] pub uris: Vec>, } @@ -16,4 +18,12 @@ pub struct GetStarterPacksParams<'a> { pub struct GetStarterPacksOutput<'a> { #[serde(borrow)] pub starter_packs: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetStarterPacks<'_> { + const NSID: &'static str = "app.bsky.graph.getStarterPacks"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetStarterPacksOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_starter_packs_with_membership.rs b/crates/jacquard-api/src/app_bsky/graph/get_starter_packs_with_membership.rs index 2137546..30d8bfc 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_starter_packs_with_membership.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_starter_packs_with_membership.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.getStarterPacksWithMembership +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetStarterPacksWithMembershipParams<'a> { +pub struct GetStarterPacksWithMembership<'a> { #[serde(borrow)] pub actor: jacquard_common::types::ident::AtIdentifier<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -15,6 +17,16 @@ pub struct GetStarterPacksWithMembershipParams<'a> { pub limit: std::option::Option, } +impl Default for GetStarterPacksWithMembership<'_> { + fn default() -> Self { + Self { + actor: Default::default(), + cursor: Default::default(), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -26,6 +38,14 @@ pub struct GetStarterPacksWithMembershipOutput<'a> { pub starter_packs_with_membership: Vec>, } +impl jacquard_common::types::xrpc::XrpcRequest for GetStarterPacksWithMembership<'_> { + const NSID: &'static str = "app.bsky.graph.getStarterPacksWithMembership"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetStarterPacksWithMembershipOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} + ///A starter pack and an optional list item indicating membership of a target user to that starter pack. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/crates/jacquard-api/src/app_bsky/graph/get_suggested_follows_by_actor.rs b/crates/jacquard-api/src/app_bsky/graph/get_suggested_follows_by_actor.rs index 219955c..08a4132 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_suggested_follows_by_actor.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_suggested_follows_by_actor.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.getSuggestedFollowsByActor +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetSuggestedFollowsByActorParams<'a> { +pub struct GetSuggestedFollowsByActor<'a> { #[serde(borrow)] pub actor: jacquard_common::types::ident::AtIdentifier<'a>, } @@ -22,4 +24,12 @@ pub struct GetSuggestedFollowsByActorOutput<'a> { pub rec_id: std::option::Option, #[serde(borrow)] pub suggestions: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetSuggestedFollowsByActor<'_> { + const NSID: &'static str = "app.bsky.graph.getSuggestedFollowsByActor"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetSuggestedFollowsByActorOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/list.rs b/crates/jacquard-api/src/app_bsky/graph/list.rs index 1c71ac0..b0efb24 100644 --- a/crates/jacquard-api/src/app_bsky/graph/list.rs +++ b/crates/jacquard-api/src/app_bsky/graph/list.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.list +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -38,4 +40,8 @@ pub struct List<'a> { pub enum ListRecordLabels<'a> { #[serde(rename = "com.atproto.label.defs#selfLabels")] DefsSelfLabels(Box>), +} + +impl jacquard_common::types::collection::Collection for List<'_> { + const NSID: &'static str = "app.bsky.graph.list"; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/listblock.rs b/crates/jacquard-api/src/app_bsky/graph/listblock.rs index e459642..dbce0bf 100644 --- a/crates/jacquard-api/src/app_bsky/graph/listblock.rs +++ b/crates/jacquard-api/src/app_bsky/graph/listblock.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.listblock +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -12,4 +14,8 @@ pub struct Listblock<'a> { ///Reference (AT-URI) to the mod list record. #[serde(borrow)] pub subject: jacquard_common::types::string::AtUri<'a>, +} + +impl jacquard_common::types::collection::Collection for Listblock<'_> { + const NSID: &'static str = "app.bsky.graph.listblock"; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/listitem.rs b/crates/jacquard-api/src/app_bsky/graph/listitem.rs index 44b2c25..83dd5de 100644 --- a/crates/jacquard-api/src/app_bsky/graph/listitem.rs +++ b/crates/jacquard-api/src/app_bsky/graph/listitem.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.listitem +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -15,4 +17,8 @@ pub struct Listitem<'a> { ///The account which is included on the list. #[serde(borrow)] pub subject: jacquard_common::types::string::Did<'a>, +} + +impl jacquard_common::types::collection::Collection for Listitem<'_> { + const NSID: &'static str = "app.bsky.graph.listitem"; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/mute_actor.rs b/crates/jacquard-api/src/app_bsky/graph/mute_actor.rs index f211c1a..f2cd259 100644 --- a/crates/jacquard-api/src/app_bsky/graph/mute_actor.rs +++ b/crates/jacquard-api/src/app_bsky/graph/mute_actor.rs @@ -1,12 +1,24 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.muteActor +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct MuteActorInput<'a> { +pub struct MuteActor<'a> { #[serde(borrow)] pub actor: jacquard_common::types::ident::AtIdentifier<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for MuteActor<'_> { + const NSID: &'static str = "app.bsky.graph.muteActor"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/mute_actor_list.rs b/crates/jacquard-api/src/app_bsky/graph/mute_actor_list.rs index f149e2b..633b2de 100644 --- a/crates/jacquard-api/src/app_bsky/graph/mute_actor_list.rs +++ b/crates/jacquard-api/src/app_bsky/graph/mute_actor_list.rs @@ -1,12 +1,24 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.muteActorList +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct MuteActorListInput<'a> { +pub struct MuteActorList<'a> { #[serde(borrow)] pub list: jacquard_common::types::string::AtUri<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for MuteActorList<'_> { + const NSID: &'static str = "app.bsky.graph.muteActorList"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/mute_thread.rs b/crates/jacquard-api/src/app_bsky/graph/mute_thread.rs index e6a1cfe..8e3c6d6 100644 --- a/crates/jacquard-api/src/app_bsky/graph/mute_thread.rs +++ b/crates/jacquard-api/src/app_bsky/graph/mute_thread.rs @@ -1,12 +1,24 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.muteThread +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct MuteThreadInput<'a> { +pub struct MuteThread<'a> { #[serde(borrow)] pub root: jacquard_common::types::string::AtUri<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for MuteThread<'_> { + const NSID: &'static str = "app.bsky.graph.muteThread"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/search_starter_packs.rs b/crates/jacquard-api/src/app_bsky/graph/search_starter_packs.rs index cc93ead..5ff7d2d 100644 --- a/crates/jacquard-api/src/app_bsky/graph/search_starter_packs.rs +++ b/crates/jacquard-api/src/app_bsky/graph/search_starter_packs.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.searchStarterPacks +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct SearchStarterPacksParams<'a> { +pub struct SearchStarterPacks<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -15,6 +17,16 @@ pub struct SearchStarterPacksParams<'a> { pub q: jacquard_common::CowStr<'a>, } +impl Default for SearchStarterPacks<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(25i64), + q: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -24,4 +36,12 @@ pub struct SearchStarterPacksOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub starter_packs: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for SearchStarterPacks<'_> { + const NSID: &'static str = "app.bsky.graph.searchStarterPacks"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = SearchStarterPacksOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/starterpack.rs b/crates/jacquard-api/src/app_bsky/graph/starterpack.rs index 5eafaef..971dc04 100644 --- a/crates/jacquard-api/src/app_bsky/graph/starterpack.rs +++ b/crates/jacquard-api/src/app_bsky/graph/starterpack.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.starterpack +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -36,4 +38,8 @@ pub struct Starterpack<'a> { ///Display name for starter pack; can not be empty. #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, +} + +impl jacquard_common::types::collection::Collection for Starterpack<'_> { + const NSID: &'static str = "app.bsky.graph.starterpack"; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/unmute_actor.rs b/crates/jacquard-api/src/app_bsky/graph/unmute_actor.rs index 221c1ad..2ebae4d 100644 --- a/crates/jacquard-api/src/app_bsky/graph/unmute_actor.rs +++ b/crates/jacquard-api/src/app_bsky/graph/unmute_actor.rs @@ -1,12 +1,24 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.unmuteActor +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UnmuteActorInput<'a> { +pub struct UnmuteActor<'a> { #[serde(borrow)] pub actor: jacquard_common::types::ident::AtIdentifier<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for UnmuteActor<'_> { + const NSID: &'static str = "app.bsky.graph.unmuteActor"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/unmute_actor_list.rs b/crates/jacquard-api/src/app_bsky/graph/unmute_actor_list.rs index fa5ed17..5152172 100644 --- a/crates/jacquard-api/src/app_bsky/graph/unmute_actor_list.rs +++ b/crates/jacquard-api/src/app_bsky/graph/unmute_actor_list.rs @@ -1,12 +1,24 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.unmuteActorList +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UnmuteActorListInput<'a> { +pub struct UnmuteActorList<'a> { #[serde(borrow)] pub list: jacquard_common::types::string::AtUri<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for UnmuteActorList<'_> { + const NSID: &'static str = "app.bsky.graph.unmuteActorList"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/unmute_thread.rs b/crates/jacquard-api/src/app_bsky/graph/unmute_thread.rs index a33f0ac..3b8fdf1 100644 --- a/crates/jacquard-api/src/app_bsky/graph/unmute_thread.rs +++ b/crates/jacquard-api/src/app_bsky/graph/unmute_thread.rs @@ -1,12 +1,24 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.unmuteThread +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UnmuteThreadInput<'a> { +pub struct UnmuteThread<'a> { #[serde(borrow)] pub root: jacquard_common::types::string::AtUri<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for UnmuteThread<'_> { + const NSID: &'static str = "app.bsky.graph.unmuteThread"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/verification.rs b/crates/jacquard-api/src/app_bsky/graph/verification.rs index ba599e4..0c92545 100644 --- a/crates/jacquard-api/src/app_bsky/graph/verification.rs +++ b/crates/jacquard-api/src/app_bsky/graph/verification.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.graph.verification +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -19,4 +21,8 @@ pub struct Verification<'a> { ///DID of the subject the verification applies to. #[serde(borrow)] pub subject: jacquard_common::types::string::Did<'a>, +} + +impl jacquard_common::types::collection::Collection for Verification<'_> { + const NSID: &'static str = "app.bsky.graph.verification"; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/labeler.rs b/crates/jacquard-api/src/app_bsky/labeler.rs index a36fcef..6432a8d 100644 --- a/crates/jacquard-api/src/app_bsky/labeler.rs +++ b/crates/jacquard-api/src/app_bsky/labeler.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.labeler.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/app_bsky/labeler/get_services.rs b/crates/jacquard-api/src/app_bsky/labeler/get_services.rs index c1018f6..d98dc9b 100644 --- a/crates/jacquard-api/src/app_bsky/labeler/get_services.rs +++ b/crates/jacquard-api/src/app_bsky/labeler/get_services.rs @@ -1,21 +1,40 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.labeler.getServices +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetServicesParams<'a> { +pub struct GetServices<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub detailed: std::option::Option, #[serde(borrow)] pub dids: Vec>, } +impl Default for GetServices<'_> { + fn default() -> Self { + Self { + detailed: Some(false), + dids: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetServicesOutput<'a> { #[serde(borrow)] pub views: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetServices<'_> { + const NSID: &'static str = "app.bsky.labeler.getServices"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetServicesOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/labeler/service.rs b/crates/jacquard-api/src/app_bsky/labeler/service.rs index b0dfa44..c322c67 100644 --- a/crates/jacquard-api/src/app_bsky/labeler/service.rs +++ b/crates/jacquard-api/src/app_bsky/labeler/service.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.labeler.service +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -41,4 +43,8 @@ pub struct Service<'a> { pub enum ServiceRecordLabels<'a> { #[serde(rename = "com.atproto.label.defs#selfLabels")] DefsSelfLabels(Box>), +} + +impl jacquard_common::types::collection::Collection for Service<'_> { + const NSID: &'static str = "app.bsky.labeler.service"; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/notification.rs b/crates/jacquard-api/src/app_bsky/notification.rs index a7443e3..7dd29b1 100644 --- a/crates/jacquard-api/src/app_bsky/notification.rs +++ b/crates/jacquard-api/src/app_bsky/notification.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.notification.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/app_bsky/notification/declaration.rs b/crates/jacquard-api/src/app_bsky/notification/declaration.rs index 5d85c9d..d8f86b4 100644 --- a/crates/jacquard-api/src/app_bsky/notification/declaration.rs +++ b/crates/jacquard-api/src/app_bsky/notification/declaration.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.notification.declaration +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -11,4 +13,8 @@ pub struct Declaration<'a> { ///A declaration of the user's preference for allowing activity subscriptions from other users. Absence of a record implies 'followers'. #[serde(borrow)] pub allow_subscriptions: jacquard_common::CowStr<'a>, +} + +impl jacquard_common::types::collection::Collection for Declaration<'_> { + const NSID: &'static str = "app.bsky.notification.declaration"; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/notification/get_preferences.rs b/crates/jacquard-api/src/app_bsky/notification/get_preferences.rs index 4a434ab..5a4a5f7 100644 --- a/crates/jacquard-api/src/app_bsky/notification/get_preferences.rs +++ b/crates/jacquard-api/src/app_bsky/notification/get_preferences.rs @@ -1,15 +1,25 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.notification.getPreferences +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetPreferencesParams {} +pub struct GetPreferences {} #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetPreferencesOutput<'a> { #[serde(borrow)] pub preferences: crate::app_bsky::notification::Preferences<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetPreferences { + const NSID: &'static str = "app.bsky.notification.getPreferences"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetPreferencesOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/notification/get_unread_count.rs b/crates/jacquard-api/src/app_bsky/notification/get_unread_count.rs index f4ee64a..bc6c111 100644 --- a/crates/jacquard-api/src/app_bsky/notification/get_unread_count.rs +++ b/crates/jacquard-api/src/app_bsky/notification/get_unread_count.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.notification.getUnreadCount +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetUnreadCountParams { +pub struct GetUnreadCount { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub priority: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -17,4 +19,12 @@ pub struct GetUnreadCountParams { #[serde(rename_all = "camelCase")] pub struct GetUnreadCountOutput<'a> { pub count: i64, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetUnreadCount { + const NSID: &'static str = "app.bsky.notification.getUnreadCount"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetUnreadCountOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/notification/list_activity_subscriptions.rs b/crates/jacquard-api/src/app_bsky/notification/list_activity_subscriptions.rs index 589c81a..b677a13 100644 --- a/crates/jacquard-api/src/app_bsky/notification/list_activity_subscriptions.rs +++ b/crates/jacquard-api/src/app_bsky/notification/list_activity_subscriptions.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.notification.listActivitySubscriptions +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct ListActivitySubscriptionsParams<'a> { +pub struct ListActivitySubscriptions<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -13,6 +15,15 @@ pub struct ListActivitySubscriptionsParams<'a> { pub limit: std::option::Option, } +impl Default for ListActivitySubscriptions<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -22,4 +33,12 @@ pub struct ListActivitySubscriptionsOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub subscriptions: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for ListActivitySubscriptions<'_> { + const NSID: &'static str = "app.bsky.notification.listActivitySubscriptions"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = ListActivitySubscriptionsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/notification/list_notifications.rs b/crates/jacquard-api/src/app_bsky/notification/list_notifications.rs index 7c0a10d..119a516 100644 --- a/crates/jacquard-api/src/app_bsky/notification/list_notifications.rs +++ b/crates/jacquard-api/src/app_bsky/notification/list_notifications.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.notification.listNotifications +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct ListNotificationsParams<'a> { +pub struct ListNotifications<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -20,6 +22,18 @@ pub struct ListNotificationsParams<'a> { pub seen_at: std::option::Option, } +impl Default for ListNotifications<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(50i64), + priority: Default::default(), + reasons: Default::default(), + seen_at: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -35,6 +49,14 @@ pub struct ListNotificationsOutput<'a> { pub seen_at: std::option::Option, } +impl jacquard_common::types::xrpc::XrpcRequest for ListNotifications<'_> { + const NSID: &'static str = "app.bsky.notification.listNotifications"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = ListNotificationsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] diff --git a/crates/jacquard-api/src/app_bsky/notification/put_activity_subscription.rs b/crates/jacquard-api/src/app_bsky/notification/put_activity_subscription.rs index 38ca150..e71ca58 100644 --- a/crates/jacquard-api/src/app_bsky/notification/put_activity_subscription.rs +++ b/crates/jacquard-api/src/app_bsky/notification/put_activity_subscription.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.notification.putActivitySubscription +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct PutActivitySubscriptionInput<'a> { +pub struct PutActivitySubscription<'a> { #[serde(borrow)] pub activity_subscription: crate::app_bsky::notification::ActivitySubscription<'a>, #[serde(borrow)] @@ -24,4 +26,14 @@ pub struct PutActivitySubscriptionOutput<'a> { >, #[serde(borrow)] pub subject: jacquard_common::types::string::Did<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for PutActivitySubscription<'_> { + const NSID: &'static str = "app.bsky.notification.putActivitySubscription"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = PutActivitySubscriptionOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/notification/put_preferences.rs b/crates/jacquard-api/src/app_bsky/notification/put_preferences.rs index 58b83a2..f090a47 100644 --- a/crates/jacquard-api/src/app_bsky/notification/put_preferences.rs +++ b/crates/jacquard-api/src/app_bsky/notification/put_preferences.rs @@ -1,11 +1,23 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.notification.putPreferences +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct PutPreferencesInput<'a> { +pub struct PutPreferences<'a> { pub priority: bool, +} + +impl jacquard_common::types::xrpc::XrpcRequest for PutPreferences<'_> { + const NSID: &'static str = "app.bsky.notification.putPreferences"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/notification/put_preferences_v2.rs b/crates/jacquard-api/src/app_bsky/notification/put_preferences_v2.rs index ae91485..2ee23d2 100644 --- a/crates/jacquard-api/src/app_bsky/notification/put_preferences_v2.rs +++ b/crates/jacquard-api/src/app_bsky/notification/put_preferences_v2.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.notification.putPreferencesV2 +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct PutPreferencesV2Input<'a> { +pub struct PutPreferencesV2<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub chat: std::option::Option>, @@ -74,4 +76,14 @@ pub struct PutPreferencesV2Input<'a> { pub struct PutPreferencesV2Output<'a> { #[serde(borrow)] pub preferences: crate::app_bsky::notification::Preferences<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for PutPreferencesV2<'_> { + const NSID: &'static str = "app.bsky.notification.putPreferencesV2"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = PutPreferencesV2Output<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/notification/register_push.rs b/crates/jacquard-api/src/app_bsky/notification/register_push.rs index 8a2642f..109475c 100644 --- a/crates/jacquard-api/src/app_bsky/notification/register_push.rs +++ b/crates/jacquard-api/src/app_bsky/notification/register_push.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.notification.registerPush +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct RegisterPushInput<'a> { +pub struct RegisterPush<'a> { ///Set to true when the actor is age restricted #[serde(skip_serializing_if = "std::option::Option::is_none")] pub age_restricted: std::option::Option, @@ -18,4 +20,14 @@ pub struct RegisterPushInput<'a> { pub service_did: jacquard_common::types::string::Did<'a>, #[serde(borrow)] pub token: jacquard_common::CowStr<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for RegisterPush<'_> { + const NSID: &'static str = "app.bsky.notification.registerPush"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/notification/unregister_push.rs b/crates/jacquard-api/src/app_bsky/notification/unregister_push.rs index 7a8d084..10a9187 100644 --- a/crates/jacquard-api/src/app_bsky/notification/unregister_push.rs +++ b/crates/jacquard-api/src/app_bsky/notification/unregister_push.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.notification.unregisterPush +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UnregisterPushInput<'a> { +pub struct UnregisterPush<'a> { #[serde(borrow)] pub app_id: jacquard_common::CowStr<'a>, #[serde(borrow)] @@ -15,4 +17,14 @@ pub struct UnregisterPushInput<'a> { pub service_did: jacquard_common::types::string::Did<'a>, #[serde(borrow)] pub token: jacquard_common::CowStr<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for UnregisterPush<'_> { + const NSID: &'static str = "app.bsky.notification.unregisterPush"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/notification/update_seen.rs b/crates/jacquard-api/src/app_bsky/notification/update_seen.rs index b7fd3f5..74b9363 100644 --- a/crates/jacquard-api/src/app_bsky/notification/update_seen.rs +++ b/crates/jacquard-api/src/app_bsky/notification/update_seen.rs @@ -1,11 +1,23 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.notification.updateSeen +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UpdateSeenInput<'a> { +pub struct UpdateSeen<'a> { pub seen_at: jacquard_common::types::string::Datetime, +} + +impl jacquard_common::types::xrpc::XrpcRequest for UpdateSeen<'_> { + const NSID: &'static str = "app.bsky.notification.updateSeen"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/richtext/facet.rs b/crates/jacquard-api/src/app_bsky/richtext/facet.rs index 77de7bf..57be475 100644 --- a/crates/jacquard-api/src/app_bsky/richtext/facet.rs +++ b/crates/jacquard-api/src/app_bsky/richtext/facet.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.richtext.facet +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/app_bsky/unspecced.rs b/crates/jacquard-api/src/app_bsky/unspecced.rs index 6973c79..6848c71 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_age_assurance_state.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_age_assurance_state.rs index c91d88a..8413af7 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_age_assurance_state.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_age_assurance_state.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.getAgeAssuranceState +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -10,4 +12,15 @@ pub struct GetAgeAssuranceStateOutput<'a> { #[serde(flatten)] #[serde(borrow)] pub value: crate::app_bsky::unspecced::AgeAssuranceState<'a>, +} + +/// XRPC request marker type +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] +pub struct GetAgeAssuranceState; +impl jacquard_common::types::xrpc::XrpcRequest for GetAgeAssuranceState { + const NSID: &'static str = "app.bsky.unspecced.getAgeAssuranceState"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetAgeAssuranceStateOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_config.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_config.rs index 671ce94..e9ec82f 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_config.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_config.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.getConfig +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -22,4 +24,15 @@ pub struct GetConfigOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub live_now: std::option::Option>>, +} + +/// XRPC request marker type +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] +pub struct GetConfig; +impl jacquard_common::types::xrpc::XrpcRequest for GetConfig { + const NSID: &'static str = "app.bsky.unspecced.getConfig"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetConfigOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_onboarding_suggested_starter_packs.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_onboarding_suggested_starter_packs.rs index acd3c75..97eeb43 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_onboarding_suggested_starter_packs.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_onboarding_suggested_starter_packs.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.getOnboardingSuggestedStarterPacks +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetOnboardingSuggestedStarterPacksParams { +pub struct GetOnboardingSuggestedStarterPacks { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } @@ -16,4 +18,12 @@ pub struct GetOnboardingSuggestedStarterPacksParams { pub struct GetOnboardingSuggestedStarterPacksOutput<'a> { #[serde(borrow)] pub starter_packs: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetOnboardingSuggestedStarterPacks { + const NSID: &'static str = "app.bsky.unspecced.getOnboardingSuggestedStarterPacks"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetOnboardingSuggestedStarterPacksOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_onboarding_suggested_starter_packs_skeleton.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_onboarding_suggested_starter_packs_skeleton.rs index fba78d3..8e90439 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_onboarding_suggested_starter_packs_skeleton.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_onboarding_suggested_starter_packs_skeleton.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetOnboardingSuggestedStarterPacksSkeletonParams<'a> { +pub struct GetOnboardingSuggestedStarterPacksSkeleton<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -13,10 +15,28 @@ pub struct GetOnboardingSuggestedStarterPacksSkeletonParams<'a> { pub viewer: std::option::Option>, } +impl Default for GetOnboardingSuggestedStarterPacksSkeleton<'_> { + fn default() -> Self { + Self { + limit: Some(10i64), + viewer: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetOnboardingSuggestedStarterPacksSkeletonOutput<'a> { #[serde(borrow)] pub starter_packs: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest +for GetOnboardingSuggestedStarterPacksSkeleton<'_> { + const NSID: &'static str = "app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetOnboardingSuggestedStarterPacksSkeletonOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_popular_feed_generators.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_popular_feed_generators.rs index 6f56348..8a5794f 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_popular_feed_generators.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_popular_feed_generators.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.getPopularFeedGenerators +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetPopularFeedGeneratorsParams<'a> { +pub struct GetPopularFeedGenerators<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -16,6 +18,16 @@ pub struct GetPopularFeedGeneratorsParams<'a> { pub query: std::option::Option>, } +impl Default for GetPopularFeedGenerators<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(50i64), + query: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -25,4 +37,12 @@ pub struct GetPopularFeedGeneratorsOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub feeds: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetPopularFeedGenerators<'_> { + const NSID: &'static str = "app.bsky.unspecced.getPopularFeedGenerators"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetPopularFeedGeneratorsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs index 16ad656..1cc5f0c 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs @@ -1,17 +1,28 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.getPostThreadOtherV2 +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetPostThreadOtherV2Params<'a> { +pub struct GetPostThreadOtherV2<'a> { #[serde(borrow)] pub anchor: jacquard_common::types::string::AtUri<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub prioritize_followed_users: std::option::Option, } +impl Default for GetPostThreadOtherV2<'_> { + fn default() -> Self { + Self { + anchor: Default::default(), + prioritize_followed_users: Some(false), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -21,6 +32,14 @@ pub struct GetPostThreadOtherV2Output<'a> { pub thread: Vec>, } +impl jacquard_common::types::xrpc::XrpcRequest for GetPostThreadOtherV2<'_> { + const NSID: &'static str = "app.bsky.unspecced.getPostThreadOtherV2"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetPostThreadOtherV2Output<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_v2.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_v2.rs index b1c73e9..78ea05e 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_v2.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_v2.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.getPostThreadV2 +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetPostThreadV2Params<'a> { +pub struct GetPostThreadV2<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub above: std::option::Option, #[serde(borrow)] @@ -21,6 +23,19 @@ pub struct GetPostThreadV2Params<'a> { pub sort: std::option::Option>, } +impl Default for GetPostThreadV2<'_> { + fn default() -> Self { + Self { + above: Some(true), + anchor: Default::default(), + below: Some(6i64), + branching_factor: Some(10i64), + prioritize_followed_users: Some(false), + sort: Some(jacquard_common::CowStr::from("oldest")), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -35,6 +50,14 @@ pub struct GetPostThreadV2Output<'a> { pub threadgate: std::option::Option>, } +impl jacquard_common::types::xrpc::XrpcRequest for GetPostThreadV2<'_> { + const NSID: &'static str = "app.bsky.unspecced.getPostThreadV2"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetPostThreadV2Output<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_feeds.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_feeds.rs index 1c78ff6..c578172 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_feeds.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_feeds.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.getSuggestedFeeds +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetSuggestedFeedsParams { +pub struct GetSuggestedFeeds { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } @@ -16,4 +18,12 @@ pub struct GetSuggestedFeedsParams { pub struct GetSuggestedFeedsOutput<'a> { #[serde(borrow)] pub feeds: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetSuggestedFeeds { + const NSID: &'static str = "app.bsky.unspecced.getSuggestedFeeds"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetSuggestedFeedsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_feeds_skeleton.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_feeds_skeleton.rs index b69731e..bdec73a 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_feeds_skeleton.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_feeds_skeleton.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.getSuggestedFeedsSkeleton +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetSuggestedFeedsSkeletonParams<'a> { +pub struct GetSuggestedFeedsSkeleton<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -13,10 +15,27 @@ pub struct GetSuggestedFeedsSkeletonParams<'a> { pub viewer: std::option::Option>, } +impl Default for GetSuggestedFeedsSkeleton<'_> { + fn default() -> Self { + Self { + limit: Some(10i64), + viewer: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSuggestedFeedsSkeletonOutput<'a> { #[serde(borrow)] pub feeds: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetSuggestedFeedsSkeleton<'_> { + const NSID: &'static str = "app.bsky.unspecced.getSuggestedFeedsSkeleton"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetSuggestedFeedsSkeletonOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_starter_packs.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_starter_packs.rs index 19f0153..1311b51 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_starter_packs.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_starter_packs.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.getSuggestedStarterPacks +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetSuggestedStarterPacksParams { +pub struct GetSuggestedStarterPacks { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } @@ -16,4 +18,12 @@ pub struct GetSuggestedStarterPacksParams { pub struct GetSuggestedStarterPacksOutput<'a> { #[serde(borrow)] pub starter_packs: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetSuggestedStarterPacks { + const NSID: &'static str = "app.bsky.unspecced.getSuggestedStarterPacks"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetSuggestedStarterPacksOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_starter_packs_skeleton.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_starter_packs_skeleton.rs index e8cae3d..e3432da 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_starter_packs_skeleton.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_starter_packs_skeleton.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.getSuggestedStarterPacksSkeleton +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetSuggestedStarterPacksSkeletonParams<'a> { +pub struct GetSuggestedStarterPacksSkeleton<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -13,10 +15,27 @@ pub struct GetSuggestedStarterPacksSkeletonParams<'a> { pub viewer: std::option::Option>, } +impl Default for GetSuggestedStarterPacksSkeleton<'_> { + fn default() -> Self { + Self { + limit: Some(10i64), + viewer: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSuggestedStarterPacksSkeletonOutput<'a> { #[serde(borrow)] pub starter_packs: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetSuggestedStarterPacksSkeleton<'_> { + const NSID: &'static str = "app.bsky.unspecced.getSuggestedStarterPacksSkeleton"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetSuggestedStarterPacksSkeletonOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_users.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_users.rs index 0750aef..1379cb1 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_users.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_users.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.getSuggestedUsers +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetSuggestedUsersParams<'a> { +pub struct GetSuggestedUsers<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub category: std::option::Option>, @@ -13,10 +15,27 @@ pub struct GetSuggestedUsersParams<'a> { pub limit: std::option::Option, } +impl Default for GetSuggestedUsers<'_> { + fn default() -> Self { + Self { + category: Default::default(), + limit: Some(25i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSuggestedUsersOutput<'a> { #[serde(borrow)] pub actors: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetSuggestedUsers<'_> { + const NSID: &'static str = "app.bsky.unspecced.getSuggestedUsers"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetSuggestedUsersOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_users_skeleton.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_users_skeleton.rs index d25223f..9a8eb07 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_users_skeleton.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_users_skeleton.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.getSuggestedUsersSkeleton +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetSuggestedUsersSkeletonParams<'a> { +pub struct GetSuggestedUsersSkeleton<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub category: std::option::Option>, @@ -16,10 +18,28 @@ pub struct GetSuggestedUsersSkeletonParams<'a> { pub viewer: std::option::Option>, } +impl Default for GetSuggestedUsersSkeleton<'_> { + fn default() -> Self { + Self { + category: Default::default(), + limit: Some(25i64), + viewer: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSuggestedUsersSkeletonOutput<'a> { #[serde(borrow)] pub dids: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetSuggestedUsersSkeleton<'_> { + const NSID: &'static str = "app.bsky.unspecced.getSuggestedUsersSkeleton"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetSuggestedUsersSkeletonOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_suggestions_skeleton.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_suggestions_skeleton.rs index dbfa87c..f44ccb2 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_suggestions_skeleton.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_suggestions_skeleton.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.getSuggestionsSkeleton +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetSuggestionsSkeletonParams<'a> { +pub struct GetSuggestionsSkeleton<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -19,6 +21,17 @@ pub struct GetSuggestionsSkeletonParams<'a> { pub viewer: std::option::Option>, } +impl Default for GetSuggestionsSkeleton<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(50i64), + relative_to_did: Default::default(), + viewer: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -35,4 +48,12 @@ pub struct GetSuggestionsSkeletonOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub relative_to_did: std::option::Option>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetSuggestionsSkeleton<'_> { + const NSID: &'static str = "app.bsky.unspecced.getSuggestionsSkeleton"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetSuggestionsSkeletonOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_tagged_suggestions.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_tagged_suggestions.rs index cb7656a..f5da533 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_tagged_suggestions.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_tagged_suggestions.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.getTaggedSuggestions +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetTaggedSuggestionsParams {} +pub struct GetTaggedSuggestions {} #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -14,6 +16,14 @@ pub struct GetTaggedSuggestionsOutput<'a> { pub suggestions: Vec>, } +impl jacquard_common::types::xrpc::XrpcRequest for GetTaggedSuggestions { + const NSID: &'static str = "app.bsky.unspecced.getTaggedSuggestions"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetTaggedSuggestionsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_trending_topics.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_trending_topics.rs index eb145dc..843b638 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_trending_topics.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_trending_topics.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.getTrendingTopics +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetTrendingTopicsParams<'a> { +pub struct GetTrendingTopics<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -13,6 +15,15 @@ pub struct GetTrendingTopicsParams<'a> { pub viewer: std::option::Option>, } +impl Default for GetTrendingTopics<'_> { + fn default() -> Self { + Self { + limit: Some(10i64), + viewer: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -21,4 +32,12 @@ pub struct GetTrendingTopicsOutput<'a> { pub suggested: Vec>, #[serde(borrow)] pub topics: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetTrendingTopics<'_> { + const NSID: &'static str = "app.bsky.unspecced.getTrendingTopics"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetTrendingTopicsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_trends.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_trends.rs index f21cade..f3ddbed 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_trends.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_trends.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.getTrends +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetTrendsParams { +pub struct GetTrends { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } @@ -16,4 +18,12 @@ pub struct GetTrendsParams { pub struct GetTrendsOutput<'a> { #[serde(borrow)] pub trends: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetTrends { + const NSID: &'static str = "app.bsky.unspecced.getTrends"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetTrendsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_trends_skeleton.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_trends_skeleton.rs index f724ce4..6ab5271 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_trends_skeleton.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_trends_skeleton.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.getTrendsSkeleton +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetTrendsSkeletonParams<'a> { +pub struct GetTrendsSkeleton<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -13,10 +15,27 @@ pub struct GetTrendsSkeletonParams<'a> { pub viewer: std::option::Option>, } +impl Default for GetTrendsSkeleton<'_> { + fn default() -> Self { + Self { + limit: Some(10i64), + viewer: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetTrendsSkeletonOutput<'a> { #[serde(borrow)] pub trends: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetTrendsSkeleton<'_> { + const NSID: &'static str = "app.bsky.unspecced.getTrendsSkeleton"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetTrendsSkeletonOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/init_age_assurance.rs b/crates/jacquard-api/src/app_bsky/unspecced/init_age_assurance.rs index 1b655c0..b2dd02d 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/init_age_assurance.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/init_age_assurance.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.initAgeAssurance +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct InitAgeAssuranceInput<'a> { +pub struct InitAgeAssurance<'a> { ///An ISO 3166-1 alpha-2 code of the user's location. #[serde(borrow)] pub country_code: jacquard_common::CowStr<'a>, @@ -76,4 +78,14 @@ impl std::fmt::Display for InitAgeAssuranceError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for InitAgeAssurance<'_> { + const NSID: &'static str = "app.bsky.unspecced.initAgeAssurance"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = InitAgeAssuranceOutput<'de>; + type Err<'de> = InitAgeAssuranceError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/search_actors_skeleton.rs b/crates/jacquard-api/src/app_bsky/unspecced/search_actors_skeleton.rs index f456f4c..0273107 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/search_actors_skeleton.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/search_actors_skeleton.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.searchActorsSkeleton +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct SearchActorsSkeletonParams<'a> { +pub struct SearchActorsSkeleton<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -20,6 +22,18 @@ pub struct SearchActorsSkeletonParams<'a> { pub viewer: std::option::Option>, } +impl Default for SearchActorsSkeleton<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(25i64), + q: Default::default(), + typeahead: Default::default(), + viewer: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -65,4 +79,12 @@ impl std::fmt::Display for SearchActorsSkeletonError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for SearchActorsSkeleton<'_> { + const NSID: &'static str = "app.bsky.unspecced.searchActorsSkeleton"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = SearchActorsSkeletonOutput<'de>; + type Err<'de> = SearchActorsSkeletonError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/search_posts_skeleton.rs b/crates/jacquard-api/src/app_bsky/unspecced/search_posts_skeleton.rs index 0dd4e1b..763f874 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/search_posts_skeleton.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/search_posts_skeleton.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.searchPostsSkeleton +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct SearchPostsSkeletonParams<'a> { +pub struct SearchPostsSkeleton<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub author: std::option::Option>, @@ -44,6 +46,26 @@ pub struct SearchPostsSkeletonParams<'a> { pub viewer: std::option::Option>, } +impl Default for SearchPostsSkeleton<'_> { + fn default() -> Self { + Self { + author: Default::default(), + cursor: Default::default(), + domain: Default::default(), + lang: Default::default(), + limit: Some(25i64), + mentions: Default::default(), + q: Default::default(), + since: Default::default(), + sort: Some(jacquard_common::CowStr::from("latest")), + tag: Default::default(), + until: Default::default(), + url: Default::default(), + viewer: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -89,4 +111,12 @@ impl std::fmt::Display for SearchPostsSkeletonError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for SearchPostsSkeleton<'_> { + const NSID: &'static str = "app.bsky.unspecced.searchPostsSkeleton"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = SearchPostsSkeletonOutput<'de>; + type Err<'de> = SearchPostsSkeletonError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/search_starter_packs_skeleton.rs b/crates/jacquard-api/src/app_bsky/unspecced/search_starter_packs_skeleton.rs index be847d2..f1cde22 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/search_starter_packs_skeleton.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/search_starter_packs_skeleton.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.unspecced.searchStarterPacksSkeleton +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct SearchStarterPacksSkeletonParams<'a> { +pub struct SearchStarterPacksSkeleton<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -18,6 +20,17 @@ pub struct SearchStarterPacksSkeletonParams<'a> { pub viewer: std::option::Option>, } +impl Default for SearchStarterPacksSkeleton<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(25i64), + q: Default::default(), + viewer: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -63,4 +76,12 @@ impl std::fmt::Display for SearchStarterPacksSkeletonError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for SearchStarterPacksSkeleton<'_> { + const NSID: &'static str = "app.bsky.unspecced.searchStarterPacksSkeleton"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = SearchStarterPacksSkeletonOutput<'de>; + type Err<'de> = SearchStarterPacksSkeletonError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/video.rs b/crates/jacquard-api/src/app_bsky/video.rs index cbb5ee6..4d9f51d 100644 --- a/crates/jacquard-api/src/app_bsky/video.rs +++ b/crates/jacquard-api/src/app_bsky/video.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.video.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/app_bsky/video/get_job_status.rs b/crates/jacquard-api/src/app_bsky/video/get_job_status.rs index e5e5098..f54f465 100644 --- a/crates/jacquard-api/src/app_bsky/video/get_job_status.rs +++ b/crates/jacquard-api/src/app_bsky/video/get_job_status.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.video.getJobStatus +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetJobStatusParams<'a> { +pub struct GetJobStatus<'a> { #[serde(borrow)] pub job_id: jacquard_common::CowStr<'a>, } @@ -16,4 +18,12 @@ pub struct GetJobStatusParams<'a> { pub struct GetJobStatusOutput<'a> { #[serde(borrow)] pub job_status: crate::app_bsky::video::JobStatus<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetJobStatus<'_> { + const NSID: &'static str = "app.bsky.video.getJobStatus"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetJobStatusOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/video/get_upload_limits.rs b/crates/jacquard-api/src/app_bsky/video/get_upload_limits.rs index 6b6196b..0ee022d 100644 --- a/crates/jacquard-api/src/app_bsky/video/get_upload_limits.rs +++ b/crates/jacquard-api/src/app_bsky/video/get_upload_limits.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.video.getUploadLimits +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -18,4 +20,15 @@ pub struct GetUploadLimitsOutput<'a> { pub remaining_daily_bytes: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub remaining_daily_videos: std::option::Option, +} + +/// XRPC request marker type +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] +pub struct GetUploadLimits; +impl jacquard_common::types::xrpc::XrpcRequest for GetUploadLimits { + const NSID: &'static str = "app.bsky.video.getUploadLimits"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetUploadLimitsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/video/upload_video.rs b/crates/jacquard-api/src/app_bsky/video/upload_video.rs index 54542e6..9c0ad28 100644 --- a/crates/jacquard-api/src/app_bsky/video/upload_video.rs +++ b/crates/jacquard-api/src/app_bsky/video/upload_video.rs @@ -1,16 +1,28 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: app.bsky.video.uploadVideo +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UploadVideoInput<'a> {} +pub struct UploadVideo<'a> {} #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct UploadVideoOutput<'a> { #[serde(borrow)] pub job_status: crate::app_bsky::video::JobStatus<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for UploadVideo<'_> { + const NSID: &'static str = "app.bsky.video.uploadVideo"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "video/mp4", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = UploadVideoOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/actor.rs b/crates/jacquard-api/src/chat_bsky/actor.rs index 791d664..590499d 100644 --- a/crates/jacquard-api/src/chat_bsky/actor.rs +++ b/crates/jacquard-api/src/chat_bsky/actor.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.actor.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/chat_bsky/actor/declaration.rs b/crates/jacquard-api/src/chat_bsky/actor/declaration.rs index 6bafe9d..b64ed1e 100644 --- a/crates/jacquard-api/src/chat_bsky/actor/declaration.rs +++ b/crates/jacquard-api/src/chat_bsky/actor/declaration.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.actor.declaration +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -10,4 +12,8 @@ pub struct Declaration<'a> { #[serde(borrow)] pub allow_incoming: jacquard_common::CowStr<'a>, +} + +impl jacquard_common::types::collection::Collection for Declaration<'_> { + const NSID: &'static str = "chat.bsky.actor.declaration"; } \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/actor/delete_account.rs b/crates/jacquard-api/src/chat_bsky/actor/delete_account.rs index 9281167..177dd52 100644 --- a/crates/jacquard-api/src/chat_bsky/actor/delete_account.rs +++ b/crates/jacquard-api/src/chat_bsky/actor/delete_account.rs @@ -1,9 +1,23 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.actor.deleteAccount +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct DeleteAccountOutput<'a> {} \ No newline at end of file +pub struct DeleteAccountOutput<'a> {} +/// XRPC request marker type +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] +pub struct DeleteAccount; +impl jacquard_common::types::xrpc::XrpcRequest for DeleteAccount { + const NSID: &'static str = "chat.bsky.actor.deleteAccount"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = DeleteAccountOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/actor/export_account_data.rs b/crates/jacquard-api/src/chat_bsky/actor/export_account_data.rs index 684bc81..1a48059 100644 --- a/crates/jacquard-api/src/chat_bsky/actor/export_account_data.rs +++ b/crates/jacquard-api/src/chat_bsky/actor/export_account_data.rs @@ -1,9 +1,21 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.actor.exportAccountData +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct ExportAccountDataOutput<'a> {} \ No newline at end of file +pub struct ExportAccountDataOutput<'a> {} +/// XRPC request marker type +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] +pub struct ExportAccountData; +impl jacquard_common::types::xrpc::XrpcRequest for ExportAccountData { + const NSID: &'static str = "chat.bsky.actor.exportAccountData"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/jsonl"; + type Output<'de> = ExportAccountDataOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo.rs b/crates/jacquard-api/src/chat_bsky/convo.rs index 9d247b6..9e85b57 100644 --- a/crates/jacquard-api/src/chat_bsky/convo.rs +++ b/crates/jacquard-api/src/chat_bsky/convo.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.convo.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/chat_bsky/convo/accept_convo.rs b/crates/jacquard-api/src/chat_bsky/convo/accept_convo.rs index aec1e18..8f83aa0 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/accept_convo.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/accept_convo.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.convo.acceptConvo +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct AcceptConvoInput<'a> { +pub struct AcceptConvo<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, } @@ -19,4 +21,14 @@ pub struct AcceptConvoOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub rev: std::option::Option>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for AcceptConvo<'_> { + const NSID: &'static str = "chat.bsky.convo.acceptConvo"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = AcceptConvoOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/add_reaction.rs b/crates/jacquard-api/src/chat_bsky/convo/add_reaction.rs index 4224533..6d8d35d 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/add_reaction.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/add_reaction.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.convo.addReaction +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct AddReactionInput<'a> { +pub struct AddReaction<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, #[serde(borrow)] @@ -75,4 +77,14 @@ impl std::fmt::Display for AddReactionError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for AddReaction<'_> { + const NSID: &'static str = "chat.bsky.convo.addReaction"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = AddReactionOutput<'de>; + type Err<'de> = AddReactionError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/delete_message_for_self.rs b/crates/jacquard-api/src/chat_bsky/convo/delete_message_for_self.rs index 25ddc5b..b137e6b 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/delete_message_for_self.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/delete_message_for_self.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.convo.deleteMessageForSelf +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct DeleteMessageForSelfInput<'a> { +pub struct DeleteMessageForSelf<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, #[serde(borrow)] @@ -20,4 +22,14 @@ pub struct DeleteMessageForSelfOutput<'a> { #[serde(flatten)] #[serde(borrow)] pub value: crate::chat_bsky::convo::DeletedMessageView<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for DeleteMessageForSelf<'_> { + const NSID: &'static str = "chat.bsky.convo.deleteMessageForSelf"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = DeleteMessageForSelfOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/get_convo.rs b/crates/jacquard-api/src/chat_bsky/convo/get_convo.rs index 2ecbdbe..c5e9b7d 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/get_convo.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/get_convo.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.convo.getConvo +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetConvoParams<'a> { +pub struct GetConvo<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, } @@ -16,4 +18,12 @@ pub struct GetConvoParams<'a> { pub struct GetConvoOutput<'a> { #[serde(borrow)] pub convo: crate::chat_bsky::convo::ConvoView<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetConvo<'_> { + const NSID: &'static str = "chat.bsky.convo.getConvo"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetConvoOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/get_convo_availability.rs b/crates/jacquard-api/src/chat_bsky/convo/get_convo_availability.rs index b865ede..11d9f0c 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/get_convo_availability.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/get_convo_availability.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.convo.getConvoAvailability +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetConvoAvailabilityParams<'a> { +pub struct GetConvoAvailability<'a> { #[serde(borrow)] pub members: Vec>, } @@ -18,4 +20,12 @@ pub struct GetConvoAvailabilityOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub convo: std::option::Option>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetConvoAvailability<'_> { + const NSID: &'static str = "chat.bsky.convo.getConvoAvailability"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetConvoAvailabilityOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/get_convo_for_members.rs b/crates/jacquard-api/src/chat_bsky/convo/get_convo_for_members.rs index 942ecc1..f6d3066 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/get_convo_for_members.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/get_convo_for_members.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.convo.getConvoForMembers +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetConvoForMembersParams<'a> { +pub struct GetConvoForMembers<'a> { #[serde(borrow)] pub members: Vec>, } @@ -16,4 +18,12 @@ pub struct GetConvoForMembersParams<'a> { pub struct GetConvoForMembersOutput<'a> { #[serde(borrow)] pub convo: crate::chat_bsky::convo::ConvoView<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetConvoForMembers<'_> { + const NSID: &'static str = "chat.bsky.convo.getConvoForMembers"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetConvoForMembersOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/get_log.rs b/crates/jacquard-api/src/chat_bsky/convo/get_log.rs index e0061c0..b166428 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/get_log.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/get_log.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.convo.getLog +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetLogParams<'a> { +pub struct GetLog<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -20,4 +22,12 @@ pub struct GetLogOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub logs: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetLog<'_> { + const NSID: &'static str = "chat.bsky.convo.getLog"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetLogOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/get_messages.rs b/crates/jacquard-api/src/chat_bsky/convo/get_messages.rs index 2e61aba..43615af 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/get_messages.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/get_messages.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.convo.getMessages +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetMessagesParams<'a> { +pub struct GetMessages<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -15,6 +17,16 @@ pub struct GetMessagesParams<'a> { pub limit: std::option::Option, } +impl Default for GetMessages<'_> { + fn default() -> Self { + Self { + convo_id: Default::default(), + cursor: Default::default(), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -24,4 +36,12 @@ pub struct GetMessagesOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub messages: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetMessages<'_> { + const NSID: &'static str = "chat.bsky.convo.getMessages"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetMessagesOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/leave_convo.rs b/crates/jacquard-api/src/chat_bsky/convo/leave_convo.rs index 9466cee..1f750d7 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/leave_convo.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/leave_convo.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.convo.leaveConvo +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct LeaveConvoInput<'a> { +pub struct LeaveConvo<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, } @@ -19,4 +21,14 @@ pub struct LeaveConvoOutput<'a> { pub convo_id: jacquard_common::CowStr<'a>, #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for LeaveConvo<'_> { + const NSID: &'static str = "chat.bsky.convo.leaveConvo"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = LeaveConvoOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/list_convos.rs b/crates/jacquard-api/src/chat_bsky/convo/list_convos.rs index fcba2ee..f31385f 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/list_convos.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/list_convos.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.convo.listConvos +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct ListConvosParams<'a> { +pub struct ListConvos<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -19,6 +21,17 @@ pub struct ListConvosParams<'a> { pub status: std::option::Option>, } +impl Default for ListConvos<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(50i64), + read_state: Default::default(), + status: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -28,4 +41,12 @@ pub struct ListConvosOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for ListConvos<'_> { + const NSID: &'static str = "chat.bsky.convo.listConvos"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = ListConvosOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/mute_convo.rs b/crates/jacquard-api/src/chat_bsky/convo/mute_convo.rs index 5f5a17d..26d387f 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/mute_convo.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/mute_convo.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.convo.muteConvo +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct MuteConvoInput<'a> { +pub struct MuteConvo<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, } @@ -17,4 +19,14 @@ pub struct MuteConvoInput<'a> { pub struct MuteConvoOutput<'a> { #[serde(borrow)] pub convo: crate::chat_bsky::convo::ConvoView<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for MuteConvo<'_> { + const NSID: &'static str = "chat.bsky.convo.muteConvo"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = MuteConvoOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/remove_reaction.rs b/crates/jacquard-api/src/chat_bsky/convo/remove_reaction.rs index 7675c9d..6ceb29c 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/remove_reaction.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/remove_reaction.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.convo.removeReaction +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct RemoveReactionInput<'a> { +pub struct RemoveReaction<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, #[serde(borrow)] @@ -65,4 +67,14 @@ impl std::fmt::Display for RemoveReactionError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for RemoveReaction<'_> { + const NSID: &'static str = "chat.bsky.convo.removeReaction"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = RemoveReactionOutput<'de>; + type Err<'de> = RemoveReactionError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/send_message.rs b/crates/jacquard-api/src/chat_bsky/convo/send_message.rs index 8963cc0..c13596e 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/send_message.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/send_message.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.convo.sendMessage +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct SendMessageInput<'a> { +pub struct SendMessage<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, #[serde(borrow)] @@ -20,4 +22,14 @@ pub struct SendMessageOutput<'a> { #[serde(flatten)] #[serde(borrow)] pub value: crate::chat_bsky::convo::MessageView<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for SendMessage<'_> { + const NSID: &'static str = "chat.bsky.convo.sendMessage"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = SendMessageOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/send_message_batch.rs b/crates/jacquard-api/src/chat_bsky/convo/send_message_batch.rs index ffdf8e5..d2c7e66 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/send_message_batch.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/send_message_batch.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.convo.sendMessageBatch +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -16,7 +18,7 @@ pub struct BatchItem<'a> { #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct SendMessageBatchInput<'a> { +pub struct SendMessageBatch<'a> { #[serde(borrow)] pub items: Vec>, } @@ -27,4 +29,14 @@ pub struct SendMessageBatchInput<'a> { pub struct SendMessageBatchOutput<'a> { #[serde(borrow)] pub items: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for SendMessageBatch<'_> { + const NSID: &'static str = "chat.bsky.convo.sendMessageBatch"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = SendMessageBatchOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/unmute_convo.rs b/crates/jacquard-api/src/chat_bsky/convo/unmute_convo.rs index 4d35e9a..ed8187f 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/unmute_convo.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/unmute_convo.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.convo.unmuteConvo +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UnmuteConvoInput<'a> { +pub struct UnmuteConvo<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, } @@ -17,4 +19,14 @@ pub struct UnmuteConvoInput<'a> { pub struct UnmuteConvoOutput<'a> { #[serde(borrow)] pub convo: crate::chat_bsky::convo::ConvoView<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for UnmuteConvo<'_> { + const NSID: &'static str = "chat.bsky.convo.unmuteConvo"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = UnmuteConvoOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/update_all_read.rs b/crates/jacquard-api/src/chat_bsky/convo/update_all_read.rs index 6816b2b..5074bf4 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/update_all_read.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/update_all_read.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.convo.updateAllRead +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UpdateAllReadInput<'a> { +pub struct UpdateAllRead<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub status: std::option::Option>, @@ -18,4 +20,14 @@ pub struct UpdateAllReadInput<'a> { pub struct UpdateAllReadOutput<'a> { ///The count of updated convos. pub updated_count: i64, +} + +impl jacquard_common::types::xrpc::XrpcRequest for UpdateAllRead<'_> { + const NSID: &'static str = "chat.bsky.convo.updateAllRead"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = UpdateAllReadOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/update_read.rs b/crates/jacquard-api/src/chat_bsky/convo/update_read.rs index d5f12b5..ae68255 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/update_read.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/update_read.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.convo.updateRead +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UpdateReadInput<'a> { +pub struct UpdateRead<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -20,4 +22,14 @@ pub struct UpdateReadInput<'a> { pub struct UpdateReadOutput<'a> { #[serde(borrow)] pub convo: crate::chat_bsky::convo::ConvoView<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for UpdateRead<'_> { + const NSID: &'static str = "chat.bsky.convo.updateRead"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = UpdateReadOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/moderation/get_actor_metadata.rs b/crates/jacquard-api/src/chat_bsky/moderation/get_actor_metadata.rs index 1378285..114c7a8 100644 --- a/crates/jacquard-api/src/chat_bsky/moderation/get_actor_metadata.rs +++ b/crates/jacquard-api/src/chat_bsky/moderation/get_actor_metadata.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.moderation.getActorMetadata +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetActorMetadataParams<'a> { +pub struct GetActorMetadata<'a> { #[serde(borrow)] pub actor: jacquard_common::types::string::Did<'a>, } @@ -22,6 +24,14 @@ pub struct GetActorMetadataOutput<'a> { pub month: jacquard_common::types::value::Data<'a>, } +impl jacquard_common::types::xrpc::XrpcRequest for GetActorMetadata<'_> { + const NSID: &'static str = "chat.bsky.moderation.getActorMetadata"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetActorMetadataOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] diff --git a/crates/jacquard-api/src/chat_bsky/moderation/get_message_context.rs b/crates/jacquard-api/src/chat_bsky/moderation/get_message_context.rs index 52b9eda..4a54af8 100644 --- a/crates/jacquard-api/src/chat_bsky/moderation/get_message_context.rs +++ b/crates/jacquard-api/src/chat_bsky/moderation/get_message_context.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.moderation.getMessageContext +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetMessageContextParams<'a> { +pub struct GetMessageContext<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub after: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -17,10 +19,29 @@ pub struct GetMessageContextParams<'a> { pub message_id: jacquard_common::CowStr<'a>, } +impl Default for GetMessageContext<'_> { + fn default() -> Self { + Self { + after: Some(5i64), + before: Some(5i64), + convo_id: Default::default(), + message_id: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetMessageContextOutput<'a> { #[serde(borrow)] pub messages: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetMessageContext<'_> { + const NSID: &'static str = "chat.bsky.moderation.getMessageContext"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetMessageContextOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/moderation/update_actor_access.rs b/crates/jacquard-api/src/chat_bsky/moderation/update_actor_access.rs index 9337b19..f3b1c5e 100644 --- a/crates/jacquard-api/src/chat_bsky/moderation/update_actor_access.rs +++ b/crates/jacquard-api/src/chat_bsky/moderation/update_actor_access.rs @@ -1,16 +1,28 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: chat.bsky.moderation.updateActorAccess +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UpdateActorAccessInput<'a> { +pub struct UpdateActorAccess<'a> { #[serde(borrow)] pub actor: jacquard_common::types::string::Did<'a>, pub allow_access: bool, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub r#ref: std::option::Option>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for UpdateActorAccess<'_> { + const NSID: &'static str = "chat.bsky.moderation.updateActorAccess"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin.rs b/crates/jacquard-api/src/com_atproto/admin.rs index c9fe0a3..c7f188f 100644 --- a/crates/jacquard-api/src/com_atproto/admin.rs +++ b/crates/jacquard-api/src/com_atproto/admin.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.admin.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/com_atproto/admin/delete_account.rs b/crates/jacquard-api/src/com_atproto/admin/delete_account.rs index e8374a5..ca0edef 100644 --- a/crates/jacquard-api/src/com_atproto/admin/delete_account.rs +++ b/crates/jacquard-api/src/com_atproto/admin/delete_account.rs @@ -1,12 +1,24 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.admin.deleteAccount +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct DeleteAccountInput<'a> { +pub struct DeleteAccount<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for DeleteAccount<'_> { + const NSID: &'static str = "com.atproto.admin.deleteAccount"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/disable_account_invites.rs b/crates/jacquard-api/src/com_atproto/admin/disable_account_invites.rs index 74a1bfc..f028f8b 100644 --- a/crates/jacquard-api/src/com_atproto/admin/disable_account_invites.rs +++ b/crates/jacquard-api/src/com_atproto/admin/disable_account_invites.rs @@ -1,16 +1,28 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.admin.disableAccountInvites +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct DisableAccountInvitesInput<'a> { +pub struct DisableAccountInvites<'a> { #[serde(borrow)] pub account: jacquard_common::types::string::Did<'a>, ///Optional reason for disabled invites. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub note: std::option::Option>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for DisableAccountInvites<'_> { + const NSID: &'static str = "com.atproto.admin.disableAccountInvites"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/disable_invite_codes.rs b/crates/jacquard-api/src/com_atproto/admin/disable_invite_codes.rs index 3f33aab..044aa42 100644 --- a/crates/jacquard-api/src/com_atproto/admin/disable_invite_codes.rs +++ b/crates/jacquard-api/src/com_atproto/admin/disable_invite_codes.rs @@ -1,16 +1,28 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.admin.disableInviteCodes +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct DisableInviteCodesInput<'a> { +pub struct DisableInviteCodes<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub accounts: std::option::Option>>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub codes: std::option::Option>>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for DisableInviteCodes<'_> { + const NSID: &'static str = "com.atproto.admin.disableInviteCodes"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/enable_account_invites.rs b/crates/jacquard-api/src/com_atproto/admin/enable_account_invites.rs index 8036c14..6146399 100644 --- a/crates/jacquard-api/src/com_atproto/admin/enable_account_invites.rs +++ b/crates/jacquard-api/src/com_atproto/admin/enable_account_invites.rs @@ -1,16 +1,28 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.admin.enableAccountInvites +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct EnableAccountInvitesInput<'a> { +pub struct EnableAccountInvites<'a> { #[serde(borrow)] pub account: jacquard_common::types::string::Did<'a>, ///Optional reason for enabled invites. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub note: std::option::Option>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for EnableAccountInvites<'_> { + const NSID: &'static str = "com.atproto.admin.enableAccountInvites"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/get_account_info.rs b/crates/jacquard-api/src/com_atproto/admin/get_account_info.rs index 905ae17..1069146 100644 --- a/crates/jacquard-api/src/com_atproto/admin/get_account_info.rs +++ b/crates/jacquard-api/src/com_atproto/admin/get_account_info.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.admin.getAccountInfo +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetAccountInfoParams<'a> { +pub struct GetAccountInfo<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } @@ -17,4 +19,12 @@ pub struct GetAccountInfoOutput<'a> { #[serde(flatten)] #[serde(borrow)] pub value: crate::com_atproto::admin::AccountView<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetAccountInfo<'_> { + const NSID: &'static str = "com.atproto.admin.getAccountInfo"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetAccountInfoOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/get_account_infos.rs b/crates/jacquard-api/src/com_atproto/admin/get_account_infos.rs index 44f8250..49390dc 100644 --- a/crates/jacquard-api/src/com_atproto/admin/get_account_infos.rs +++ b/crates/jacquard-api/src/com_atproto/admin/get_account_infos.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.admin.getAccountInfos +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetAccountInfosParams<'a> { +pub struct GetAccountInfos<'a> { #[serde(borrow)] pub dids: Vec>, } @@ -16,4 +18,12 @@ pub struct GetAccountInfosParams<'a> { pub struct GetAccountInfosOutput<'a> { #[serde(borrow)] pub infos: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetAccountInfos<'_> { + const NSID: &'static str = "com.atproto.admin.getAccountInfos"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetAccountInfosOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/get_invite_codes.rs b/crates/jacquard-api/src/com_atproto/admin/get_invite_codes.rs index 7938edc..a85cb05 100644 --- a/crates/jacquard-api/src/com_atproto/admin/get_invite_codes.rs +++ b/crates/jacquard-api/src/com_atproto/admin/get_invite_codes.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.admin.getInviteCodes +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetInviteCodesParams<'a> { +pub struct GetInviteCodes<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -16,6 +18,16 @@ pub struct GetInviteCodesParams<'a> { pub sort: std::option::Option>, } +impl Default for GetInviteCodes<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(100i64), + sort: Some(jacquard_common::CowStr::from("recent")), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -25,4 +37,12 @@ pub struct GetInviteCodesOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetInviteCodes<'_> { + const NSID: &'static str = "com.atproto.admin.getInviteCodes"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetInviteCodesOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/get_subject_status.rs b/crates/jacquard-api/src/com_atproto/admin/get_subject_status.rs index 881fb35..3119860 100644 --- a/crates/jacquard-api/src/com_atproto/admin/get_subject_status.rs +++ b/crates/jacquard-api/src/com_atproto/admin/get_subject_status.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.admin.getSubjectStatus +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetSubjectStatusParams<'a> { +pub struct GetSubjectStatus<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub blob: std::option::Option>, @@ -42,4 +44,12 @@ pub enum GetSubjectStatusOutputRecordSubject<'a> { StrongRef(Box>), #[serde(rename = "com.atproto.admin.defs#repoBlobRef")] DefsRepoBlobRef(Box>), +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetSubjectStatus<'_> { + const NSID: &'static str = "com.atproto.admin.getSubjectStatus"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetSubjectStatusOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/search_accounts.rs b/crates/jacquard-api/src/com_atproto/admin/search_accounts.rs index 5f32559..c365abd 100644 --- a/crates/jacquard-api/src/com_atproto/admin/search_accounts.rs +++ b/crates/jacquard-api/src/com_atproto/admin/search_accounts.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.admin.searchAccounts +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct SearchAccountsParams<'a> { +pub struct SearchAccounts<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -16,6 +18,16 @@ pub struct SearchAccountsParams<'a> { pub limit: std::option::Option, } +impl Default for SearchAccounts<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + email: Default::default(), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -25,4 +37,12 @@ pub struct SearchAccountsOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for SearchAccounts<'_> { + const NSID: &'static str = "com.atproto.admin.searchAccounts"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = SearchAccountsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/send_email.rs b/crates/jacquard-api/src/com_atproto/admin/send_email.rs index e981c86..c745a87 100644 --- a/crates/jacquard-api/src/com_atproto/admin/send_email.rs +++ b/crates/jacquard-api/src/com_atproto/admin/send_email.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.admin.sendEmail +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct SendEmailInput<'a> { +pub struct SendEmail<'a> { ///Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] @@ -27,4 +29,14 @@ pub struct SendEmailInput<'a> { #[serde(rename_all = "camelCase")] pub struct SendEmailOutput<'a> { pub sent: bool, +} + +impl jacquard_common::types::xrpc::XrpcRequest for SendEmail<'_> { + const NSID: &'static str = "com.atproto.admin.sendEmail"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = SendEmailOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/update_account_email.rs b/crates/jacquard-api/src/com_atproto/admin/update_account_email.rs index 5fd01ee..ba1bd97 100644 --- a/crates/jacquard-api/src/com_atproto/admin/update_account_email.rs +++ b/crates/jacquard-api/src/com_atproto/admin/update_account_email.rs @@ -1,15 +1,27 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.admin.updateAccountEmail +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UpdateAccountEmailInput<'a> { +pub struct UpdateAccountEmail<'a> { ///The handle or DID of the repo. #[serde(borrow)] pub account: jacquard_common::types::ident::AtIdentifier<'a>, #[serde(borrow)] pub email: jacquard_common::CowStr<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for UpdateAccountEmail<'_> { + const NSID: &'static str = "com.atproto.admin.updateAccountEmail"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/update_account_handle.rs b/crates/jacquard-api/src/com_atproto/admin/update_account_handle.rs index 8068f6e..666e2fd 100644 --- a/crates/jacquard-api/src/com_atproto/admin/update_account_handle.rs +++ b/crates/jacquard-api/src/com_atproto/admin/update_account_handle.rs @@ -1,14 +1,26 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.admin.updateAccountHandle +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UpdateAccountHandleInput<'a> { +pub struct UpdateAccountHandle<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for UpdateAccountHandle<'_> { + const NSID: &'static str = "com.atproto.admin.updateAccountHandle"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/update_account_password.rs b/crates/jacquard-api/src/com_atproto/admin/update_account_password.rs index 2aa05d0..d888070 100644 --- a/crates/jacquard-api/src/com_atproto/admin/update_account_password.rs +++ b/crates/jacquard-api/src/com_atproto/admin/update_account_password.rs @@ -1,14 +1,26 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.admin.updateAccountPassword +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UpdateAccountPasswordInput<'a> { +pub struct UpdateAccountPassword<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, #[serde(borrow)] pub password: jacquard_common::CowStr<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for UpdateAccountPassword<'_> { + const NSID: &'static str = "com.atproto.admin.updateAccountPassword"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/update_account_signing_key.rs b/crates/jacquard-api/src/com_atproto/admin/update_account_signing_key.rs index b17d5a6..d257a8d 100644 --- a/crates/jacquard-api/src/com_atproto/admin/update_account_signing_key.rs +++ b/crates/jacquard-api/src/com_atproto/admin/update_account_signing_key.rs @@ -1,15 +1,27 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.admin.updateAccountSigningKey +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UpdateAccountSigningKeyInput<'a> { +pub struct UpdateAccountSigningKey<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, ///Did-key formatted public key #[serde(borrow)] pub signing_key: jacquard_common::types::string::Did<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for UpdateAccountSigningKey<'_> { + const NSID: &'static str = "com.atproto.admin.updateAccountSigningKey"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/update_subject_status.rs b/crates/jacquard-api/src/com_atproto/admin/update_subject_status.rs index 9a74e4c..1caec0c 100644 --- a/crates/jacquard-api/src/com_atproto/admin/update_subject_status.rs +++ b/crates/jacquard-api/src/com_atproto/admin/update_subject_status.rs @@ -1,17 +1,19 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.admin.updateSubjectStatus +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UpdateSubjectStatusInput<'a> { +pub struct UpdateSubjectStatus<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub deactivated: std::option::Option>, #[serde(borrow)] - pub subject: UpdateSubjectStatusInputRecordSubject<'a>, + pub subject: UpdateSubjectStatusRecordSubject<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub takedown: std::option::Option>, @@ -21,7 +23,7 @@ pub struct UpdateSubjectStatusInput<'a> { #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] #[serde(bound(deserialize = "'de: 'a"))] -pub enum UpdateSubjectStatusInputRecordSubject<'a> { +pub enum UpdateSubjectStatusRecordSubject<'a> { #[serde(rename = "com.atproto.admin.defs#repoRef")] DefsRepoRef(Box>), #[serde(rename = "com.atproto.repo.strongRef")] @@ -52,4 +54,14 @@ pub enum UpdateSubjectStatusOutputRecordSubject<'a> { StrongRef(Box>), #[serde(rename = "com.atproto.admin.defs#repoBlobRef")] DefsRepoBlobRef(Box>), +} + +impl jacquard_common::types::xrpc::XrpcRequest for UpdateSubjectStatus<'_> { + const NSID: &'static str = "com.atproto.admin.updateSubjectStatus"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = UpdateSubjectStatusOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/identity.rs b/crates/jacquard-api/src/com_atproto/identity.rs index f7f73ad..b95867b 100644 --- a/crates/jacquard-api/src/com_atproto/identity.rs +++ b/crates/jacquard-api/src/com_atproto/identity.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.identity.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/com_atproto/identity/get_recommended_did_credentials.rs b/crates/jacquard-api/src/com_atproto/identity/get_recommended_did_credentials.rs index 5f23a52..6a8a24c 100644 --- a/crates/jacquard-api/src/com_atproto/identity/get_recommended_did_credentials.rs +++ b/crates/jacquard-api/src/com_atproto/identity/get_recommended_did_credentials.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.identity.getRecommendedDidCredentials +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -22,4 +24,15 @@ pub struct GetRecommendedDidCredentialsOutput<'a> { pub verification_methods: std::option::Option< jacquard_common::types::value::Data<'a>, >, +} + +/// XRPC request marker type +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] +pub struct GetRecommendedDidCredentials; +impl jacquard_common::types::xrpc::XrpcRequest for GetRecommendedDidCredentials { + const NSID: &'static str = "com.atproto.identity.getRecommendedDidCredentials"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetRecommendedDidCredentialsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/identity/refresh_identity.rs b/crates/jacquard-api/src/com_atproto/identity/refresh_identity.rs index a0ab91b..f8e9a71 100644 --- a/crates/jacquard-api/src/com_atproto/identity/refresh_identity.rs +++ b/crates/jacquard-api/src/com_atproto/identity/refresh_identity.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.identity.refreshIdentity +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct RefreshIdentityInput<'a> { +pub struct RefreshIdentity<'a> { #[serde(borrow)] pub identifier: jacquard_common::types::ident::AtIdentifier<'a>, } @@ -72,4 +74,14 @@ impl std::fmt::Display for RefreshIdentityError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for RefreshIdentity<'_> { + const NSID: &'static str = "com.atproto.identity.refreshIdentity"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = RefreshIdentityOutput<'de>; + type Err<'de> = RefreshIdentityError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/identity/request_plc_operation_signature.rs b/crates/jacquard-api/src/com_atproto/identity/request_plc_operation_signature.rs index 3ba330e..1a8a5db 100644 --- a/crates/jacquard-api/src/com_atproto/identity/request_plc_operation_signature.rs +++ b/crates/jacquard-api/src/com_atproto/identity/request_plc_operation_signature.rs @@ -1,5 +1,19 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.identity.requestPlcOperationSignature +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. +/// XRPC request marker type +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] +pub struct RequestPlcOperationSignature; +impl jacquard_common::types::xrpc::XrpcRequest for RequestPlcOperationSignature { + const NSID: &'static str = "com.atproto.identity.requestPlcOperationSignature"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/identity/resolve_did.rs b/crates/jacquard-api/src/com_atproto/identity/resolve_did.rs index ae61a19..997a7ca 100644 --- a/crates/jacquard-api/src/com_atproto/identity/resolve_did.rs +++ b/crates/jacquard-api/src/com_atproto/identity/resolve_did.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.identity.resolveDid +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct ResolveDidParams<'a> { +pub struct ResolveDid<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } @@ -61,4 +63,12 @@ impl std::fmt::Display for ResolveDidError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for ResolveDid<'_> { + const NSID: &'static str = "com.atproto.identity.resolveDid"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = ResolveDidOutput<'de>; + type Err<'de> = ResolveDidError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/identity/resolve_handle.rs b/crates/jacquard-api/src/com_atproto/identity/resolve_handle.rs index f02a4ac..363c594 100644 --- a/crates/jacquard-api/src/com_atproto/identity/resolve_handle.rs +++ b/crates/jacquard-api/src/com_atproto/identity/resolve_handle.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.identity.resolveHandle +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct ResolveHandleParams<'a> { +pub struct ResolveHandle<'a> { #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, } @@ -50,4 +52,12 @@ impl std::fmt::Display for ResolveHandleError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for ResolveHandle<'_> { + const NSID: &'static str = "com.atproto.identity.resolveHandle"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = ResolveHandleOutput<'de>; + type Err<'de> = ResolveHandleError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/identity/resolve_identity.rs b/crates/jacquard-api/src/com_atproto/identity/resolve_identity.rs index c3d3c55..6f342f1 100644 --- a/crates/jacquard-api/src/com_atproto/identity/resolve_identity.rs +++ b/crates/jacquard-api/src/com_atproto/identity/resolve_identity.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.identity.resolveIdentity +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct ResolveIdentityParams<'a> { +pub struct ResolveIdentity<'a> { #[serde(borrow)] pub identifier: jacquard_common::types::ident::AtIdentifier<'a>, } @@ -71,4 +73,12 @@ impl std::fmt::Display for ResolveIdentityError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for ResolveIdentity<'_> { + const NSID: &'static str = "com.atproto.identity.resolveIdentity"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = ResolveIdentityOutput<'de>; + type Err<'de> = ResolveIdentityError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/identity/sign_plc_operation.rs b/crates/jacquard-api/src/com_atproto/identity/sign_plc_operation.rs index 807cdc7..4463eda 100644 --- a/crates/jacquard-api/src/com_atproto/identity/sign_plc_operation.rs +++ b/crates/jacquard-api/src/com_atproto/identity/sign_plc_operation.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.identity.signPlcOperation +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct SignPlcOperationInput<'a> { +pub struct SignPlcOperation<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub also_known_as: std::option::Option>>, @@ -34,4 +36,14 @@ pub struct SignPlcOperationOutput<'a> { ///A signed DID PLC operation. #[serde(borrow)] pub operation: jacquard_common::types::value::Data<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for SignPlcOperation<'_> { + const NSID: &'static str = "com.atproto.identity.signPlcOperation"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = SignPlcOperationOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/identity/submit_plc_operation.rs b/crates/jacquard-api/src/com_atproto/identity/submit_plc_operation.rs index 4f863b8..4ae0299 100644 --- a/crates/jacquard-api/src/com_atproto/identity/submit_plc_operation.rs +++ b/crates/jacquard-api/src/com_atproto/identity/submit_plc_operation.rs @@ -1,12 +1,24 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.identity.submitPlcOperation +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct SubmitPlcOperationInput<'a> { +pub struct SubmitPlcOperation<'a> { #[serde(borrow)] pub operation: jacquard_common::types::value::Data<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for SubmitPlcOperation<'_> { + const NSID: &'static str = "com.atproto.identity.submitPlcOperation"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/identity/update_handle.rs b/crates/jacquard-api/src/com_atproto/identity/update_handle.rs index fdef9a3..f24d0f8 100644 --- a/crates/jacquard-api/src/com_atproto/identity/update_handle.rs +++ b/crates/jacquard-api/src/com_atproto/identity/update_handle.rs @@ -1,13 +1,25 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.identity.updateHandle +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UpdateHandleInput<'a> { +pub struct UpdateHandle<'a> { ///The new handle. #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for UpdateHandle<'_> { + const NSID: &'static str = "com.atproto.identity.updateHandle"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/label.rs b/crates/jacquard-api/src/com_atproto/label.rs index e2bbd67..4a5def9 100644 --- a/crates/jacquard-api/src/com_atproto/label.rs +++ b/crates/jacquard-api/src/com_atproto/label.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.label.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/com_atproto/label/query_labels.rs b/crates/jacquard-api/src/com_atproto/label/query_labels.rs index 29e68c4..18fdedc 100644 --- a/crates/jacquard-api/src/com_atproto/label/query_labels.rs +++ b/crates/jacquard-api/src/com_atproto/label/query_labels.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.label.queryLabels +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct QueryLabelsParams<'a> { +pub struct QueryLabels<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -18,6 +20,17 @@ pub struct QueryLabelsParams<'a> { pub uri_patterns: Vec>, } +impl Default for QueryLabels<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(50i64), + sources: Default::default(), + uri_patterns: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -27,4 +40,12 @@ pub struct QueryLabelsOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub labels: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for QueryLabels<'_> { + const NSID: &'static str = "com.atproto.label.queryLabels"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = QueryLabelsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/label/subscribe_labels.rs b/crates/jacquard-api/src/com_atproto/label/subscribe_labels.rs index 9dfd274..4073377 100644 --- a/crates/jacquard-api/src/com_atproto/label/subscribe_labels.rs +++ b/crates/jacquard-api/src/com_atproto/label/subscribe_labels.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.label.subscribeLabels +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -25,7 +27,7 @@ pub struct Labels<'a> { #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct SubscribeLabelsParams { +pub struct SubscribeLabels { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub cursor: std::option::Option, } diff --git a/crates/jacquard-api/src/com_atproto/lexicon/schema.rs b/crates/jacquard-api/src/com_atproto/lexicon/schema.rs index 39b6adc..d819b81 100644 --- a/crates/jacquard-api/src/com_atproto/lexicon/schema.rs +++ b/crates/jacquard-api/src/com_atproto/lexicon/schema.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.lexicon.schema +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -10,4 +12,8 @@ pub struct Schema<'a> { ///Indicates the 'version' of the Lexicon language. Must be '1' for the current atproto/Lexicon schema system. pub lexicon: i64, +} + +impl jacquard_common::types::collection::Collection for Schema<'_> { + const NSID: &'static str = "com.atproto.lexicon.schema"; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/moderation.rs b/crates/jacquard-api/src/com_atproto/moderation.rs index 861e113..ca388bb 100644 --- a/crates/jacquard-api/src/com_atproto/moderation.rs +++ b/crates/jacquard-api/src/com_atproto/moderation.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.moderation.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/com_atproto/moderation/create_report.rs b/crates/jacquard-api/src/com_atproto/moderation/create_report.rs index 808d351..c7aeb81 100644 --- a/crates/jacquard-api/src/com_atproto/moderation/create_report.rs +++ b/crates/jacquard-api/src/com_atproto/moderation/create_report.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.moderation.createReport +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct CreateReportInput<'a> { +pub struct CreateReport<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub mod_tool: std::option::Option>, @@ -18,14 +20,14 @@ pub struct CreateReportInput<'a> { #[serde(borrow)] pub reason_type: crate::com_atproto::moderation::ReasonType<'a>, #[serde(borrow)] - pub subject: CreateReportInputRecordSubject<'a>, + pub subject: CreateReportRecordSubject<'a>, } #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] #[serde(bound(deserialize = "'de: 'a"))] -pub enum CreateReportInputRecordSubject<'a> { +pub enum CreateReportRecordSubject<'a> { #[serde(rename = "com.atproto.admin.defs#repoRef")] DefsRepoRef(Box>), #[serde(rename = "com.atproto.repo.strongRef")] @@ -60,6 +62,16 @@ pub enum CreateReportOutputRecordSubject<'a> { StrongRef(Box>), } +impl jacquard_common::types::xrpc::XrpcRequest for CreateReport<'_> { + const NSID: &'static str = "com.atproto.moderation.createReport"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = CreateReportOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} + ///Moderation tool information for tracing the source of the action #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/crates/jacquard-api/src/com_atproto/repo.rs b/crates/jacquard-api/src/com_atproto/repo.rs index ee5abe5..f59bde4 100644 --- a/crates/jacquard-api/src/com_atproto/repo.rs +++ b/crates/jacquard-api/src/com_atproto/repo.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.repo.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/com_atproto/repo/apply_writes.rs b/crates/jacquard-api/src/com_atproto/repo/apply_writes.rs index 1840328..19b43b3 100644 --- a/crates/jacquard-api/src/com_atproto/repo/apply_writes.rs +++ b/crates/jacquard-api/src/com_atproto/repo/apply_writes.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.repo.applyWrites +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -55,7 +57,7 @@ pub struct DeleteResult<'a> {} #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct ApplyWritesInput<'a> { +pub struct ApplyWrites<'a> { ///The handle or DID of the repo (aka, current account). #[serde(borrow)] pub repo: jacquard_common::types::ident::AtIdentifier<'a>, @@ -116,6 +118,16 @@ impl std::fmt::Display for ApplyWritesError<'_> { } } +impl jacquard_common::types::xrpc::XrpcRequest for ApplyWrites<'_> { + const NSID: &'static str = "com.atproto.repo.applyWrites"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = ApplyWritesOutput<'de>; + type Err<'de> = ApplyWritesError<'de>; +} + ///Operation which updates an existing record. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/crates/jacquard-api/src/com_atproto/repo/create_record.rs b/crates/jacquard-api/src/com_atproto/repo/create_record.rs index c86ba52..4639b7e 100644 --- a/crates/jacquard-api/src/com_atproto/repo/create_record.rs +++ b/crates/jacquard-api/src/com_atproto/repo/create_record.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.repo.createRecord +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct CreateRecordInput<'a> { +pub struct CreateRecord<'a> { ///The NSID of the record collection. #[serde(borrow)] pub collection: jacquard_common::types::string::Nsid<'a>, @@ -81,4 +83,14 @@ impl std::fmt::Display for CreateRecordError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for CreateRecord<'_> { + const NSID: &'static str = "com.atproto.repo.createRecord"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = CreateRecordOutput<'de>; + type Err<'de> = CreateRecordError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/repo/delete_record.rs b/crates/jacquard-api/src/com_atproto/repo/delete_record.rs index a65e009..1172c82 100644 --- a/crates/jacquard-api/src/com_atproto/repo/delete_record.rs +++ b/crates/jacquard-api/src/com_atproto/repo/delete_record.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.repo.deleteRecord +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct DeleteRecordInput<'a> { +pub struct DeleteRecord<'a> { ///The NSID of the record collection. #[serde(borrow)] pub collection: jacquard_common::types::string::Nsid<'a>, @@ -68,4 +70,14 @@ impl std::fmt::Display for DeleteRecordError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for DeleteRecord<'_> { + const NSID: &'static str = "com.atproto.repo.deleteRecord"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = DeleteRecordOutput<'de>; + type Err<'de> = DeleteRecordError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/repo/describe_repo.rs b/crates/jacquard-api/src/com_atproto/repo/describe_repo.rs index 06171c7..de851f9 100644 --- a/crates/jacquard-api/src/com_atproto/repo/describe_repo.rs +++ b/crates/jacquard-api/src/com_atproto/repo/describe_repo.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.repo.describeRepo +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct DescribeRepoParams<'a> { +pub struct DescribeRepo<'a> { #[serde(borrow)] pub repo: jacquard_common::types::ident::AtIdentifier<'a>, } @@ -26,4 +28,12 @@ pub struct DescribeRepoOutput<'a> { pub handle: jacquard_common::types::string::Handle<'a>, ///Indicates if handle is currently valid (resolves bi-directionally) pub handle_is_correct: bool, +} + +impl jacquard_common::types::xrpc::XrpcRequest for DescribeRepo<'_> { + const NSID: &'static str = "com.atproto.repo.describeRepo"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = DescribeRepoOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/repo/get_record.rs b/crates/jacquard-api/src/com_atproto/repo/get_record.rs index ae738f8..da0dfa5 100644 --- a/crates/jacquard-api/src/com_atproto/repo/get_record.rs +++ b/crates/jacquard-api/src/com_atproto/repo/get_record.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.repo.getRecord +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetRecordParams<'a> { +pub struct GetRecord<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cid: std::option::Option>, @@ -63,4 +65,12 @@ impl std::fmt::Display for GetRecordError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetRecord<'_> { + const NSID: &'static str = "com.atproto.repo.getRecord"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetRecordOutput<'de>; + type Err<'de> = GetRecordError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/repo/import_repo.rs b/crates/jacquard-api/src/com_atproto/repo/import_repo.rs index 030128e..7258b3e 100644 --- a/crates/jacquard-api/src/com_atproto/repo/import_repo.rs +++ b/crates/jacquard-api/src/com_atproto/repo/import_repo.rs @@ -1,9 +1,20 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.repo.importRepo +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct ImportRepoInput<'a> {} \ No newline at end of file +pub struct ImportRepo<'a> {} +impl jacquard_common::types::xrpc::XrpcRequest for ImportRepo<'_> { + const NSID: &'static str = "com.atproto.repo.importRepo"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/vnd.ipld.car", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/repo/list_missing_blobs.rs b/crates/jacquard-api/src/com_atproto/repo/list_missing_blobs.rs index a8c2079..a8b4622 100644 --- a/crates/jacquard-api/src/com_atproto/repo/list_missing_blobs.rs +++ b/crates/jacquard-api/src/com_atproto/repo/list_missing_blobs.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.repo.listMissingBlobs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct ListMissingBlobsParams<'a> { +pub struct ListMissingBlobs<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -13,6 +15,15 @@ pub struct ListMissingBlobsParams<'a> { pub limit: std::option::Option, } +impl Default for ListMissingBlobs<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(500i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -24,6 +35,14 @@ pub struct ListMissingBlobsOutput<'a> { pub cursor: std::option::Option>, } +impl jacquard_common::types::xrpc::XrpcRequest for ListMissingBlobs<'_> { + const NSID: &'static str = "com.atproto.repo.listMissingBlobs"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = ListMissingBlobsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] diff --git a/crates/jacquard-api/src/com_atproto/repo/list_records.rs b/crates/jacquard-api/src/com_atproto/repo/list_records.rs index 878513f..ff16668 100644 --- a/crates/jacquard-api/src/com_atproto/repo/list_records.rs +++ b/crates/jacquard-api/src/com_atproto/repo/list_records.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.repo.listRecords +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct ListRecordsParams<'a> { +pub struct ListRecords<'a> { #[serde(borrow)] pub collection: jacquard_common::types::string::Nsid<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -19,6 +21,18 @@ pub struct ListRecordsParams<'a> { pub reverse: std::option::Option, } +impl Default for ListRecords<'_> { + fn default() -> Self { + Self { + collection: Default::default(), + cursor: Default::default(), + limit: Some(50i64), + repo: Default::default(), + reverse: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -30,6 +44,14 @@ pub struct ListRecordsOutput<'a> { pub records: Vec>, } +impl jacquard_common::types::xrpc::XrpcRequest for ListRecords<'_> { + const NSID: &'static str = "com.atproto.repo.listRecords"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = ListRecordsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] diff --git a/crates/jacquard-api/src/com_atproto/repo/put_record.rs b/crates/jacquard-api/src/com_atproto/repo/put_record.rs index f4c2b5e..d9d372b 100644 --- a/crates/jacquard-api/src/com_atproto/repo/put_record.rs +++ b/crates/jacquard-api/src/com_atproto/repo/put_record.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.repo.putRecord +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct PutRecordInput<'a> { +pub struct PutRecord<'a> { ///The NSID of the record collection. #[serde(borrow)] pub collection: jacquard_common::types::string::Nsid<'a>, @@ -81,4 +83,14 @@ impl std::fmt::Display for PutRecordError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for PutRecord<'_> { + const NSID: &'static str = "com.atproto.repo.putRecord"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = PutRecordOutput<'de>; + type Err<'de> = PutRecordError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/repo/strong_ref.rs b/crates/jacquard-api/src/com_atproto/repo/strong_ref.rs index 8ff9db0..b4f9090 100644 --- a/crates/jacquard-api/src/com_atproto/repo/strong_ref.rs +++ b/crates/jacquard-api/src/com_atproto/repo/strong_ref.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.repo.strongRef +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/com_atproto/repo/upload_blob.rs b/crates/jacquard-api/src/com_atproto/repo/upload_blob.rs index 7e12c8f..7f3e010 100644 --- a/crates/jacquard-api/src/com_atproto/repo/upload_blob.rs +++ b/crates/jacquard-api/src/com_atproto/repo/upload_blob.rs @@ -1,16 +1,28 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.repo.uploadBlob +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UploadBlobInput<'a> {} +pub struct UploadBlob<'a> {} #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct UploadBlobOutput<'a> { #[serde(borrow)] pub blob: jacquard_common::types::blob::Blob<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for UploadBlob<'_> { + const NSID: &'static str = "com.atproto.repo.uploadBlob"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "*/*", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = UploadBlobOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server.rs b/crates/jacquard-api/src/com_atproto/server.rs index bf3a655..418501d 100644 --- a/crates/jacquard-api/src/com_atproto/server.rs +++ b/crates/jacquard-api/src/com_atproto/server.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/com_atproto/server/activate_account.rs b/crates/jacquard-api/src/com_atproto/server/activate_account.rs index 3ba330e..0dbe4df 100644 --- a/crates/jacquard-api/src/com_atproto/server/activate_account.rs +++ b/crates/jacquard-api/src/com_atproto/server/activate_account.rs @@ -1,5 +1,19 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.activateAccount +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. +/// XRPC request marker type +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] +pub struct ActivateAccount; +impl jacquard_common::types::xrpc::XrpcRequest for ActivateAccount { + const NSID: &'static str = "com.atproto.server.activateAccount"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/check_account_status.rs b/crates/jacquard-api/src/com_atproto/server/check_account_status.rs index bcb757d..7e2c56f 100644 --- a/crates/jacquard-api/src/com_atproto/server/check_account_status.rs +++ b/crates/jacquard-api/src/com_atproto/server/check_account_status.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.checkAccountStatus +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -18,4 +20,15 @@ pub struct CheckAccountStatusOutput<'a> { #[serde(borrow)] pub repo_rev: jacquard_common::CowStr<'a>, pub valid_did: bool, +} + +/// XRPC request marker type +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] +pub struct CheckAccountStatus; +impl jacquard_common::types::xrpc::XrpcRequest for CheckAccountStatus { + const NSID: &'static str = "com.atproto.server.checkAccountStatus"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = CheckAccountStatusOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/confirm_email.rs b/crates/jacquard-api/src/com_atproto/server/confirm_email.rs index f2c1399..9eb88c9 100644 --- a/crates/jacquard-api/src/com_atproto/server/confirm_email.rs +++ b/crates/jacquard-api/src/com_atproto/server/confirm_email.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.confirmEmail +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct ConfirmEmailInput<'a> { +pub struct ConfirmEmail<'a> { #[serde(borrow)] pub email: jacquard_common::CowStr<'a>, #[serde(borrow)] @@ -71,4 +73,14 @@ impl std::fmt::Display for ConfirmEmailError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for ConfirmEmail<'_> { + const NSID: &'static str = "com.atproto.server.confirmEmail"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = ConfirmEmailError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/create_account.rs b/crates/jacquard-api/src/com_atproto/server/create_account.rs index f6fcfb0..878332c 100644 --- a/crates/jacquard-api/src/com_atproto/server/create_account.rs +++ b/crates/jacquard-api/src/com_atproto/server/create_account.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.createAccount +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct CreateAccountInput<'a> { +pub struct CreateAccount<'a> { ///Pre-existing atproto DID, being imported to a new account. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] @@ -144,4 +146,14 @@ impl std::fmt::Display for CreateAccountError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for CreateAccount<'_> { + const NSID: &'static str = "com.atproto.server.createAccount"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = CreateAccountOutput<'de>; + type Err<'de> = CreateAccountError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/create_app_password.rs b/crates/jacquard-api/src/com_atproto/server/create_app_password.rs index b2d7ab3..be6cf80 100644 --- a/crates/jacquard-api/src/com_atproto/server/create_app_password.rs +++ b/crates/jacquard-api/src/com_atproto/server/create_app_password.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.createAppPassword +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -19,7 +21,7 @@ pub struct AppPassword<'a> { #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct CreateAppPasswordInput<'a> { +pub struct CreateAppPassword<'a> { ///A short name for the App Password, to help distinguish them. #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, @@ -68,4 +70,14 @@ impl std::fmt::Display for CreateAppPasswordError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for CreateAppPassword<'_> { + const NSID: &'static str = "com.atproto.server.createAppPassword"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = CreateAppPasswordOutput<'de>; + type Err<'de> = CreateAppPasswordError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/create_invite_code.rs b/crates/jacquard-api/src/com_atproto/server/create_invite_code.rs index 798f3b4..dab1cf8 100644 --- a/crates/jacquard-api/src/com_atproto/server/create_invite_code.rs +++ b/crates/jacquard-api/src/com_atproto/server/create_invite_code.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.createInviteCode +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct CreateInviteCodeInput<'a> { +pub struct CreateInviteCode<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub for_account: std::option::Option>, @@ -19,4 +21,14 @@ pub struct CreateInviteCodeInput<'a> { pub struct CreateInviteCodeOutput<'a> { #[serde(borrow)] pub code: jacquard_common::CowStr<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for CreateInviteCode<'_> { + const NSID: &'static str = "com.atproto.server.createInviteCode"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = CreateInviteCodeOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/create_invite_codes.rs b/crates/jacquard-api/src/com_atproto/server/create_invite_codes.rs index 46ad84b..c547fb3 100644 --- a/crates/jacquard-api/src/com_atproto/server/create_invite_codes.rs +++ b/crates/jacquard-api/src/com_atproto/server/create_invite_codes.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.createInviteCodes +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -16,7 +18,7 @@ pub struct AccountCodes<'a> { #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct CreateInviteCodesInput<'a> { +pub struct CreateInviteCodes<'a> { pub code_count: i64, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] @@ -30,4 +32,14 @@ pub struct CreateInviteCodesInput<'a> { pub struct CreateInviteCodesOutput<'a> { #[serde(borrow)] pub codes: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for CreateInviteCodes<'_> { + const NSID: &'static str = "com.atproto.server.createInviteCodes"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = CreateInviteCodesOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/create_session.rs b/crates/jacquard-api/src/com_atproto/server/create_session.rs index 4465c5e..2efd23b 100644 --- a/crates/jacquard-api/src/com_atproto/server/create_session.rs +++ b/crates/jacquard-api/src/com_atproto/server/create_session.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.createSession +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct CreateSessionInput<'a> { +pub struct CreateSession<'a> { ///When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned #[serde(skip_serializing_if = "std::option::Option::is_none")] pub allow_takendown: std::option::Option, @@ -90,4 +92,14 @@ impl std::fmt::Display for CreateSessionError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for CreateSession<'_> { + const NSID: &'static str = "com.atproto.server.createSession"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = CreateSessionOutput<'de>; + type Err<'de> = CreateSessionError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/deactivate_account.rs b/crates/jacquard-api/src/com_atproto/server/deactivate_account.rs index 67bda22..297f078 100644 --- a/crates/jacquard-api/src/com_atproto/server/deactivate_account.rs +++ b/crates/jacquard-api/src/com_atproto/server/deactivate_account.rs @@ -1,13 +1,25 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.deactivateAccount +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct DeactivateAccountInput<'a> { +pub struct DeactivateAccount<'a> { ///A recommendation to server as to how long they should hold onto the deactivated account before deleting. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub delete_after: std::option::Option, +} + +impl jacquard_common::types::xrpc::XrpcRequest for DeactivateAccount<'_> { + const NSID: &'static str = "com.atproto.server.deactivateAccount"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/delete_account.rs b/crates/jacquard-api/src/com_atproto/server/delete_account.rs index fd79f18..d930664 100644 --- a/crates/jacquard-api/src/com_atproto/server/delete_account.rs +++ b/crates/jacquard-api/src/com_atproto/server/delete_account.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.deleteAccount +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct DeleteAccountInput<'a> { +pub struct DeleteAccount<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, #[serde(borrow)] @@ -55,4 +57,14 @@ impl std::fmt::Display for DeleteAccountError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for DeleteAccount<'_> { + const NSID: &'static str = "com.atproto.server.deleteAccount"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = DeleteAccountError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/delete_session.rs b/crates/jacquard-api/src/com_atproto/server/delete_session.rs index 3ba330e..4293148 100644 --- a/crates/jacquard-api/src/com_atproto/server/delete_session.rs +++ b/crates/jacquard-api/src/com_atproto/server/delete_session.rs @@ -1,5 +1,19 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.deleteSession +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. +/// XRPC request marker type +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] +pub struct DeleteSession; +impl jacquard_common::types::xrpc::XrpcRequest for DeleteSession { + const NSID: &'static str = "com.atproto.server.deleteSession"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/describe_server.rs b/crates/jacquard-api/src/com_atproto/server/describe_server.rs index 5da6b96..cc893c0 100644 --- a/crates/jacquard-api/src/com_atproto/server/describe_server.rs +++ b/crates/jacquard-api/src/com_atproto/server/describe_server.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.describeServer +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -47,4 +49,15 @@ pub struct DescribeServerOutput<'a> { ///If true, a phone verification token must be supplied to create an account on this instance. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub phone_verification_required: std::option::Option, +} + +/// XRPC request marker type +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] +pub struct DescribeServer; +impl jacquard_common::types::xrpc::XrpcRequest for DescribeServer { + const NSID: &'static str = "com.atproto.server.describeServer"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = DescribeServerOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/get_account_invite_codes.rs b/crates/jacquard-api/src/com_atproto/server/get_account_invite_codes.rs index 593245c..7e25d32 100644 --- a/crates/jacquard-api/src/com_atproto/server/get_account_invite_codes.rs +++ b/crates/jacquard-api/src/com_atproto/server/get_account_invite_codes.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.getAccountInviteCodes +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetAccountInviteCodesParams { +pub struct GetAccountInviteCodes { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub create_available: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -51,4 +53,12 @@ impl std::fmt::Display for GetAccountInviteCodesError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetAccountInviteCodes { + const NSID: &'static str = "com.atproto.server.getAccountInviteCodes"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetAccountInviteCodesOutput<'de>; + type Err<'de> = GetAccountInviteCodesError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/get_service_auth.rs b/crates/jacquard-api/src/com_atproto/server/get_service_auth.rs index b3fe329..7a0d411 100644 --- a/crates/jacquard-api/src/com_atproto/server/get_service_auth.rs +++ b/crates/jacquard-api/src/com_atproto/server/get_service_auth.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.getServiceAuth +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetServiceAuthParams<'a> { +pub struct GetServiceAuth<'a> { #[serde(borrow)] pub aud: jacquard_common::types::string::Did<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -55,4 +57,12 @@ impl std::fmt::Display for GetServiceAuthError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetServiceAuth<'_> { + const NSID: &'static str = "com.atproto.server.getServiceAuth"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetServiceAuthOutput<'de>; + type Err<'de> = GetServiceAuthError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/get_session.rs b/crates/jacquard-api/src/com_atproto/server/get_session.rs index 1252297..588800c 100644 --- a/crates/jacquard-api/src/com_atproto/server/get_session.rs +++ b/crates/jacquard-api/src/com_atproto/server/get_session.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.getSession +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -27,4 +29,15 @@ pub struct GetSessionOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub status: std::option::Option>, +} + +/// XRPC request marker type +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] +pub struct GetSession; +impl jacquard_common::types::xrpc::XrpcRequest for GetSession { + const NSID: &'static str = "com.atproto.server.getSession"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetSessionOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/list_app_passwords.rs b/crates/jacquard-api/src/com_atproto/server/list_app_passwords.rs index 7be297f..bbc3eaf 100644 --- a/crates/jacquard-api/src/com_atproto/server/list_app_passwords.rs +++ b/crates/jacquard-api/src/com_atproto/server/list_app_passwords.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.listAppPasswords +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -53,4 +55,15 @@ impl std::fmt::Display for ListAppPasswordsError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +/// XRPC request marker type +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] +pub struct ListAppPasswords; +impl jacquard_common::types::xrpc::XrpcRequest for ListAppPasswords { + const NSID: &'static str = "com.atproto.server.listAppPasswords"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = ListAppPasswordsOutput<'de>; + type Err<'de> = ListAppPasswordsError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/refresh_session.rs b/crates/jacquard-api/src/com_atproto/server/refresh_session.rs index 7a38b37..97d5e65 100644 --- a/crates/jacquard-api/src/com_atproto/server/refresh_session.rs +++ b/crates/jacquard-api/src/com_atproto/server/refresh_session.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.refreshSession +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -57,4 +59,17 @@ impl std::fmt::Display for RefreshSessionError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +/// XRPC request marker type +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] +pub struct RefreshSession; +impl jacquard_common::types::xrpc::XrpcRequest for RefreshSession { + const NSID: &'static str = "com.atproto.server.refreshSession"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = RefreshSessionOutput<'de>; + type Err<'de> = RefreshSessionError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/request_account_delete.rs b/crates/jacquard-api/src/com_atproto/server/request_account_delete.rs index 3ba330e..e79aeeb 100644 --- a/crates/jacquard-api/src/com_atproto/server/request_account_delete.rs +++ b/crates/jacquard-api/src/com_atproto/server/request_account_delete.rs @@ -1,5 +1,19 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.requestAccountDelete +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. +/// XRPC request marker type +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] +pub struct RequestAccountDelete; +impl jacquard_common::types::xrpc::XrpcRequest for RequestAccountDelete { + const NSID: &'static str = "com.atproto.server.requestAccountDelete"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/request_email_confirmation.rs b/crates/jacquard-api/src/com_atproto/server/request_email_confirmation.rs index 3ba330e..c5fb0f6 100644 --- a/crates/jacquard-api/src/com_atproto/server/request_email_confirmation.rs +++ b/crates/jacquard-api/src/com_atproto/server/request_email_confirmation.rs @@ -1,5 +1,19 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.requestEmailConfirmation +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. +/// XRPC request marker type +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] +pub struct RequestEmailConfirmation; +impl jacquard_common::types::xrpc::XrpcRequest for RequestEmailConfirmation { + const NSID: &'static str = "com.atproto.server.requestEmailConfirmation"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/request_email_update.rs b/crates/jacquard-api/src/com_atproto/server/request_email_update.rs index 95d6c5c..a7bc81a 100644 --- a/crates/jacquard-api/src/com_atproto/server/request_email_update.rs +++ b/crates/jacquard-api/src/com_atproto/server/request_email_update.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.requestEmailUpdate +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -8,4 +10,17 @@ #[serde(rename_all = "camelCase")] pub struct RequestEmailUpdateOutput<'a> { pub token_required: bool, +} + +/// XRPC request marker type +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] +pub struct RequestEmailUpdate; +impl jacquard_common::types::xrpc::XrpcRequest for RequestEmailUpdate { + const NSID: &'static str = "com.atproto.server.requestEmailUpdate"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = RequestEmailUpdateOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/request_password_reset.rs b/crates/jacquard-api/src/com_atproto/server/request_password_reset.rs index a0888f6..b3c3544 100644 --- a/crates/jacquard-api/src/com_atproto/server/request_password_reset.rs +++ b/crates/jacquard-api/src/com_atproto/server/request_password_reset.rs @@ -1,12 +1,24 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.requestPasswordReset +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct RequestPasswordResetInput<'a> { +pub struct RequestPasswordReset<'a> { #[serde(borrow)] pub email: jacquard_common::CowStr<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for RequestPasswordReset<'_> { + const NSID: &'static str = "com.atproto.server.requestPasswordReset"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/reserve_signing_key.rs b/crates/jacquard-api/src/com_atproto/server/reserve_signing_key.rs index 62e007a..04ae39f 100644 --- a/crates/jacquard-api/src/com_atproto/server/reserve_signing_key.rs +++ b/crates/jacquard-api/src/com_atproto/server/reserve_signing_key.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.reserveSigningKey +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct ReserveSigningKeyInput<'a> { +pub struct ReserveSigningKey<'a> { ///The DID to reserve a key for. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] @@ -20,4 +22,14 @@ pub struct ReserveSigningKeyOutput<'a> { ///The public key for the reserved signing key, in did:key serialization. #[serde(borrow)] pub signing_key: jacquard_common::CowStr<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for ReserveSigningKey<'_> { + const NSID: &'static str = "com.atproto.server.reserveSigningKey"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = ReserveSigningKeyOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/reset_password.rs b/crates/jacquard-api/src/com_atproto/server/reset_password.rs index e26e269..0a02e36 100644 --- a/crates/jacquard-api/src/com_atproto/server/reset_password.rs +++ b/crates/jacquard-api/src/com_atproto/server/reset_password.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.resetPassword +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct ResetPasswordInput<'a> { +pub struct ResetPassword<'a> { #[serde(borrow)] pub password: jacquard_common::CowStr<'a>, #[serde(borrow)] @@ -53,4 +55,14 @@ impl std::fmt::Display for ResetPasswordError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for ResetPassword<'_> { + const NSID: &'static str = "com.atproto.server.resetPassword"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = ResetPasswordError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/revoke_app_password.rs b/crates/jacquard-api/src/com_atproto/server/revoke_app_password.rs index f101936..6b43938 100644 --- a/crates/jacquard-api/src/com_atproto/server/revoke_app_password.rs +++ b/crates/jacquard-api/src/com_atproto/server/revoke_app_password.rs @@ -1,12 +1,24 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.revokeAppPassword +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct RevokeAppPasswordInput<'a> { +pub struct RevokeAppPassword<'a> { #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for RevokeAppPassword<'_> { + const NSID: &'static str = "com.atproto.server.revokeAppPassword"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/update_email.rs b/crates/jacquard-api/src/com_atproto/server/update_email.rs index 565efd1..a3f4f5e 100644 --- a/crates/jacquard-api/src/com_atproto/server/update_email.rs +++ b/crates/jacquard-api/src/com_atproto/server/update_email.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.server.updateEmail +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UpdateEmailInput<'a> { +pub struct UpdateEmail<'a> { #[serde(borrow)] pub email: jacquard_common::CowStr<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -66,4 +68,14 @@ impl std::fmt::Display for UpdateEmailError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for UpdateEmail<'_> { + const NSID: &'static str = "com.atproto.server.updateEmail"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = UpdateEmailError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync.rs b/crates/jacquard-api/src/com_atproto/sync.rs index ac637c3..2623650 100644 --- a/crates/jacquard-api/src/com_atproto/sync.rs +++ b/crates/jacquard-api/src/com_atproto/sync.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.sync.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/com_atproto/sync/get_blob.rs b/crates/jacquard-api/src/com_atproto/sync/get_blob.rs index c36ccc0..fce0a53 100644 --- a/crates/jacquard-api/src/com_atproto/sync/get_blob.rs +++ b/crates/jacquard-api/src/com_atproto/sync/get_blob.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.sync.getBlob +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetBlobParams<'a> { +pub struct GetBlob<'a> { #[serde(borrow)] pub cid: jacquard_common::types::string::Cid<'a>, #[serde(borrow)] @@ -83,4 +85,12 @@ impl std::fmt::Display for GetBlobError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetBlob<'_> { + const NSID: &'static str = "com.atproto.sync.getBlob"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "*/*"; + type Output<'de> = GetBlobOutput<'de>; + type Err<'de> = GetBlobError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/get_blocks.rs b/crates/jacquard-api/src/com_atproto/sync/get_blocks.rs index 4f108cc..0ea69c4 100644 --- a/crates/jacquard-api/src/com_atproto/sync/get_blocks.rs +++ b/crates/jacquard-api/src/com_atproto/sync/get_blocks.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.sync.getBlocks +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetBlocksParams<'a> { +pub struct GetBlocks<'a> { #[serde(borrow)] pub cids: Vec>, #[serde(borrow)] @@ -83,4 +85,12 @@ impl std::fmt::Display for GetBlocksError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetBlocks<'_> { + const NSID: &'static str = "com.atproto.sync.getBlocks"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/vnd.ipld.car"; + type Output<'de> = GetBlocksOutput<'de>; + type Err<'de> = GetBlocksError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/get_checkout.rs b/crates/jacquard-api/src/com_atproto/sync/get_checkout.rs index 5e8db7f..db0e739 100644 --- a/crates/jacquard-api/src/com_atproto/sync/get_checkout.rs +++ b/crates/jacquard-api/src/com_atproto/sync/get_checkout.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.sync.getCheckout +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetCheckoutParams<'a> { +pub struct GetCheckout<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } @@ -13,4 +15,11 @@ pub struct GetCheckoutParams<'a> { #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetCheckoutOutput<'a> {} \ No newline at end of file +pub struct GetCheckoutOutput<'a> {} +impl jacquard_common::types::xrpc::XrpcRequest for GetCheckout<'_> { + const NSID: &'static str = "com.atproto.sync.getCheckout"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/vnd.ipld.car"; + type Output<'de> = GetCheckoutOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/get_head.rs b/crates/jacquard-api/src/com_atproto/sync/get_head.rs index b04ab38..b1a0270 100644 --- a/crates/jacquard-api/src/com_atproto/sync/get_head.rs +++ b/crates/jacquard-api/src/com_atproto/sync/get_head.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.sync.getHead +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetHeadParams<'a> { +pub struct GetHead<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } @@ -49,4 +51,12 @@ impl std::fmt::Display for GetHeadError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetHead<'_> { + const NSID: &'static str = "com.atproto.sync.getHead"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetHeadOutput<'de>; + type Err<'de> = GetHeadError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/get_host_status.rs b/crates/jacquard-api/src/com_atproto/sync/get_host_status.rs index b324d1f..06c83d6 100644 --- a/crates/jacquard-api/src/com_atproto/sync/get_host_status.rs +++ b/crates/jacquard-api/src/com_atproto/sync/get_host_status.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.sync.getHostStatus +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetHostStatusParams<'a> { +pub struct GetHostStatus<'a> { #[serde(borrow)] pub hostname: jacquard_common::CowStr<'a>, } @@ -58,4 +60,12 @@ impl std::fmt::Display for GetHostStatusError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetHostStatus<'_> { + const NSID: &'static str = "com.atproto.sync.getHostStatus"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetHostStatusOutput<'de>; + type Err<'de> = GetHostStatusError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/get_latest_commit.rs b/crates/jacquard-api/src/com_atproto/sync/get_latest_commit.rs index 1ffc6f6..a9719a6 100644 --- a/crates/jacquard-api/src/com_atproto/sync/get_latest_commit.rs +++ b/crates/jacquard-api/src/com_atproto/sync/get_latest_commit.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.sync.getLatestCommit +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetLatestCommitParams<'a> { +pub struct GetLatestCommit<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } @@ -77,4 +79,12 @@ impl std::fmt::Display for GetLatestCommitError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetLatestCommit<'_> { + const NSID: &'static str = "com.atproto.sync.getLatestCommit"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetLatestCommitOutput<'de>; + type Err<'de> = GetLatestCommitError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/get_record.rs b/crates/jacquard-api/src/com_atproto/sync/get_record.rs index 8a4f5d8..b56d1c1 100644 --- a/crates/jacquard-api/src/com_atproto/sync/get_record.rs +++ b/crates/jacquard-api/src/com_atproto/sync/get_record.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.sync.getRecord +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetRecordParams<'a> { +pub struct GetRecord<'a> { #[serde(borrow)] pub collection: jacquard_common::types::string::Nsid<'a>, #[serde(borrow)] @@ -87,4 +89,12 @@ impl std::fmt::Display for GetRecordError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetRecord<'_> { + const NSID: &'static str = "com.atproto.sync.getRecord"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/vnd.ipld.car"; + type Output<'de> = GetRecordOutput<'de>; + type Err<'de> = GetRecordError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/get_repo.rs b/crates/jacquard-api/src/com_atproto/sync/get_repo.rs index c237e55..a74fe23 100644 --- a/crates/jacquard-api/src/com_atproto/sync/get_repo.rs +++ b/crates/jacquard-api/src/com_atproto/sync/get_repo.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.sync.getRepo +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetRepoParams<'a> { +pub struct GetRepo<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -74,4 +76,12 @@ impl std::fmt::Display for GetRepoError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetRepo<'_> { + const NSID: &'static str = "com.atproto.sync.getRepo"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/vnd.ipld.car"; + type Output<'de> = GetRepoOutput<'de>; + type Err<'de> = GetRepoError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/get_repo_status.rs b/crates/jacquard-api/src/com_atproto/sync/get_repo_status.rs index fbad5f0..9a3bbb0 100644 --- a/crates/jacquard-api/src/com_atproto/sync/get_repo_status.rs +++ b/crates/jacquard-api/src/com_atproto/sync/get_repo_status.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.sync.getRepoStatus +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetRepoStatusParams<'a> { +pub struct GetRepoStatus<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } @@ -57,4 +59,12 @@ impl std::fmt::Display for GetRepoStatusError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetRepoStatus<'_> { + const NSID: &'static str = "com.atproto.sync.getRepoStatus"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetRepoStatusOutput<'de>; + type Err<'de> = GetRepoStatusError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/list_blobs.rs b/crates/jacquard-api/src/com_atproto/sync/list_blobs.rs index 7bea7ff..74178c9 100644 --- a/crates/jacquard-api/src/com_atproto/sync/list_blobs.rs +++ b/crates/jacquard-api/src/com_atproto/sync/list_blobs.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.sync.listBlobs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct ListBlobsParams<'a> { +pub struct ListBlobs<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -17,6 +19,17 @@ pub struct ListBlobsParams<'a> { pub since: std::option::Option, } +impl Default for ListBlobs<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + did: Default::default(), + limit: Some(500i64), + since: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -86,4 +99,12 @@ impl std::fmt::Display for ListBlobsError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for ListBlobs<'_> { + const NSID: &'static str = "com.atproto.sync.listBlobs"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = ListBlobsOutput<'de>; + type Err<'de> = ListBlobsError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/list_hosts.rs b/crates/jacquard-api/src/com_atproto/sync/list_hosts.rs index 106f348..57cd985 100644 --- a/crates/jacquard-api/src/com_atproto/sync/list_hosts.rs +++ b/crates/jacquard-api/src/com_atproto/sync/list_hosts.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.sync.listHosts +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -20,9 +22,9 @@ pub struct Host<'a> { pub status: std::option::Option>, } -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct ListHostsParams<'a> { +pub struct ListHosts<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -30,6 +32,15 @@ pub struct ListHostsParams<'a> { pub limit: std::option::Option, } +impl Default for ListHosts<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(200i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -40,4 +51,12 @@ pub struct ListHostsOutput<'a> { ///Sort order is not formally specified. Recommended order is by time host was first seen by the server, with oldest first. #[serde(borrow)] pub hosts: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for ListHosts<'_> { + const NSID: &'static str = "com.atproto.sync.listHosts"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = ListHostsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/list_repos.rs b/crates/jacquard-api/src/com_atproto/sync/list_repos.rs index c1fe03a..0c745c7 100644 --- a/crates/jacquard-api/src/com_atproto/sync/list_repos.rs +++ b/crates/jacquard-api/src/com_atproto/sync/list_repos.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.sync.listRepos +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct ListReposParams<'a> { +pub struct ListRepos<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -13,6 +15,15 @@ pub struct ListReposParams<'a> { pub limit: std::option::Option, } +impl Default for ListRepos<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(500i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -24,6 +35,14 @@ pub struct ListReposOutput<'a> { pub repos: Vec>, } +impl jacquard_common::types::xrpc::XrpcRequest for ListRepos<'_> { + const NSID: &'static str = "com.atproto.sync.listRepos"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = ListReposOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] diff --git a/crates/jacquard-api/src/com_atproto/sync/list_repos_by_collection.rs b/crates/jacquard-api/src/com_atproto/sync/list_repos_by_collection.rs index 4580bf3..2dc2fe7 100644 --- a/crates/jacquard-api/src/com_atproto/sync/list_repos_by_collection.rs +++ b/crates/jacquard-api/src/com_atproto/sync/list_repos_by_collection.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.sync.listReposByCollection +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct ListReposByCollectionParams<'a> { +pub struct ListReposByCollection<'a> { #[serde(borrow)] pub collection: jacquard_common::types::string::Nsid<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -15,6 +17,16 @@ pub struct ListReposByCollectionParams<'a> { pub limit: std::option::Option, } +impl Default for ListReposByCollection<'_> { + fn default() -> Self { + Self { + collection: Default::default(), + cursor: Default::default(), + limit: Some(500i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -26,6 +38,14 @@ pub struct ListReposByCollectionOutput<'a> { pub repos: Vec>, } +impl jacquard_common::types::xrpc::XrpcRequest for ListReposByCollection<'_> { + const NSID: &'static str = "com.atproto.sync.listReposByCollection"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = ListReposByCollectionOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] diff --git a/crates/jacquard-api/src/com_atproto/sync/notify_of_update.rs b/crates/jacquard-api/src/com_atproto/sync/notify_of_update.rs index 4fe7994..e54293f 100644 --- a/crates/jacquard-api/src/com_atproto/sync/notify_of_update.rs +++ b/crates/jacquard-api/src/com_atproto/sync/notify_of_update.rs @@ -1,13 +1,25 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.sync.notifyOfUpdate +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct NotifyOfUpdateInput<'a> { +pub struct NotifyOfUpdate<'a> { ///Hostname of the current service (usually a PDS) that is notifying of update. #[serde(borrow)] pub hostname: jacquard_common::CowStr<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for NotifyOfUpdate<'_> { + const NSID: &'static str = "com.atproto.sync.notifyOfUpdate"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/request_crawl.rs b/crates/jacquard-api/src/com_atproto/sync/request_crawl.rs index 9ec506f..44d20ef 100644 --- a/crates/jacquard-api/src/com_atproto/sync/request_crawl.rs +++ b/crates/jacquard-api/src/com_atproto/sync/request_crawl.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.sync.requestCrawl +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct RequestCrawlInput<'a> { +pub struct RequestCrawl<'a> { ///Hostname of the current service (eg, PDS) that is requesting to be crawled. #[serde(borrow)] pub hostname: jacquard_common::CowStr<'a>, @@ -43,4 +45,14 @@ impl std::fmt::Display for RequestCrawlError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for RequestCrawl<'_> { + const NSID: &'static str = "com.atproto.sync.requestCrawl"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = RequestCrawlError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/subscribe_repos.rs b/crates/jacquard-api/src/com_atproto/sync/subscribe_repos.rs index a9a5d5d..6f0729b 100644 --- a/crates/jacquard-api/src/com_atproto/sync/subscribe_repos.rs +++ b/crates/jacquard-api/src/com_atproto/sync/subscribe_repos.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.sync.subscribeRepos +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -83,7 +85,7 @@ pub struct Info<'a> { #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct SubscribeReposParams { +pub struct SubscribeRepos { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub cursor: std::option::Option, } diff --git a/crates/jacquard-api/src/com_atproto/temp/add_reserved_handle.rs b/crates/jacquard-api/src/com_atproto/temp/add_reserved_handle.rs index 3661905..05a9f24 100644 --- a/crates/jacquard-api/src/com_atproto/temp/add_reserved_handle.rs +++ b/crates/jacquard-api/src/com_atproto/temp/add_reserved_handle.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.temp.addReservedHandle +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct AddReservedHandleInput<'a> { +pub struct AddReservedHandle<'a> { #[serde(borrow)] pub handle: jacquard_common::CowStr<'a>, } @@ -14,4 +16,13 @@ pub struct AddReservedHandleInput<'a> { #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct AddReservedHandleOutput<'a> {} \ No newline at end of file +pub struct AddReservedHandleOutput<'a> {} +impl jacquard_common::types::xrpc::XrpcRequest for AddReservedHandle<'_> { + const NSID: &'static str = "com.atproto.temp.addReservedHandle"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = AddReservedHandleOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/temp/check_handle_availability.rs b/crates/jacquard-api/src/com_atproto/temp/check_handle_availability.rs index 82f0a94..5f962df 100644 --- a/crates/jacquard-api/src/com_atproto/temp/check_handle_availability.rs +++ b/crates/jacquard-api/src/com_atproto/temp/check_handle_availability.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.temp.checkHandleAvailability +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct CheckHandleAvailabilityParams<'a> { +pub struct CheckHandleAvailability<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub birth_date: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -65,6 +67,14 @@ impl std::fmt::Display for CheckHandleAvailabilityError<'_> { } } +impl jacquard_common::types::xrpc::XrpcRequest for CheckHandleAvailability<'_> { + const NSID: &'static str = "com.atproto.temp.checkHandleAvailability"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = CheckHandleAvailabilityOutput<'de>; + type Err<'de> = CheckHandleAvailabilityError<'de>; +} + ///Indicates the provided handle is available. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/crates/jacquard-api/src/com_atproto/temp/check_signup_queue.rs b/crates/jacquard-api/src/com_atproto/temp/check_signup_queue.rs index f6b83ba..8efe56a 100644 --- a/crates/jacquard-api/src/com_atproto/temp/check_signup_queue.rs +++ b/crates/jacquard-api/src/com_atproto/temp/check_signup_queue.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.temp.checkSignupQueue +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -12,4 +14,15 @@ pub struct CheckSignupQueueOutput<'a> { pub estimated_time_ms: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub place_in_queue: std::option::Option, +} + +/// XRPC request marker type +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] +pub struct CheckSignupQueue; +impl jacquard_common::types::xrpc::XrpcRequest for CheckSignupQueue { + const NSID: &'static str = "com.atproto.temp.checkSignupQueue"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = CheckSignupQueueOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/temp/dereference_scope.rs b/crates/jacquard-api/src/com_atproto/temp/dereference_scope.rs index a68ea0b..78e3015 100644 --- a/crates/jacquard-api/src/com_atproto/temp/dereference_scope.rs +++ b/crates/jacquard-api/src/com_atproto/temp/dereference_scope.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.temp.dereferenceScope +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct DereferenceScopeParams<'a> { +pub struct DereferenceScope<'a> { #[serde(borrow)] pub scope: jacquard_common::CowStr<'a>, } @@ -51,4 +53,12 @@ impl std::fmt::Display for DereferenceScopeError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for DereferenceScope<'_> { + const NSID: &'static str = "com.atproto.temp.dereferenceScope"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = DereferenceScopeOutput<'de>; + type Err<'de> = DereferenceScopeError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/temp/fetch_labels.rs b/crates/jacquard-api/src/com_atproto/temp/fetch_labels.rs index 41153c0..2e85b39 100644 --- a/crates/jacquard-api/src/com_atproto/temp/fetch_labels.rs +++ b/crates/jacquard-api/src/com_atproto/temp/fetch_labels.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.temp.fetchLabels +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct FetchLabelsParams { +pub struct FetchLabels { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -18,4 +20,12 @@ pub struct FetchLabelsParams { pub struct FetchLabelsOutput<'a> { #[serde(borrow)] pub labels: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for FetchLabels { + const NSID: &'static str = "com.atproto.temp.fetchLabels"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = FetchLabelsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/temp/request_phone_verification.rs b/crates/jacquard-api/src/com_atproto/temp/request_phone_verification.rs index 4bd2cd3..4c93226 100644 --- a/crates/jacquard-api/src/com_atproto/temp/request_phone_verification.rs +++ b/crates/jacquard-api/src/com_atproto/temp/request_phone_verification.rs @@ -1,12 +1,24 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.temp.requestPhoneVerification +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct RequestPhoneVerificationInput<'a> { +pub struct RequestPhoneVerification<'a> { #[serde(borrow)] pub phone_number: jacquard_common::CowStr<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for RequestPhoneVerification<'_> { + const NSID: &'static str = "com.atproto.temp.requestPhoneVerification"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/temp/revoke_account_credentials.rs b/crates/jacquard-api/src/com_atproto/temp/revoke_account_credentials.rs index 53f3007..0e1df50 100644 --- a/crates/jacquard-api/src/com_atproto/temp/revoke_account_credentials.rs +++ b/crates/jacquard-api/src/com_atproto/temp/revoke_account_credentials.rs @@ -1,12 +1,24 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: com.atproto.temp.revokeAccountCredentials +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct RevokeAccountCredentialsInput<'a> { +pub struct RevokeAccountCredentials<'a> { #[serde(borrow)] pub account: jacquard_common::types::ident::AtIdentifier<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for RevokeAccountCredentials<'_> { + const NSID: &'static str = "com.atproto.temp.revokeAccountCredentials"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/communication.rs b/crates/jacquard-api/src/tools_ozone/communication.rs index fbeeb98..5848e99 100644 --- a/crates/jacquard-api/src/tools_ozone/communication.rs +++ b/crates/jacquard-api/src/tools_ozone/communication.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.communication.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/tools_ozone/communication/create_template.rs b/crates/jacquard-api/src/tools_ozone/communication/create_template.rs index 72c16b5..d7ad649 100644 --- a/crates/jacquard-api/src/tools_ozone/communication/create_template.rs +++ b/crates/jacquard-api/src/tools_ozone/communication/create_template.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.communication.createTemplate +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct CreateTemplateInput<'a> { +pub struct CreateTemplate<'a> { ///Content of the template, markdown supported, can contain variable placeholders. #[serde(borrow)] pub content_markdown: jacquard_common::CowStr<'a>, @@ -65,4 +67,14 @@ impl std::fmt::Display for CreateTemplateError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for CreateTemplate<'_> { + const NSID: &'static str = "tools.ozone.communication.createTemplate"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = CreateTemplateOutput<'de>; + type Err<'de> = CreateTemplateError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/communication/delete_template.rs b/crates/jacquard-api/src/tools_ozone/communication/delete_template.rs index 83f292e..f2e1a03 100644 --- a/crates/jacquard-api/src/tools_ozone/communication/delete_template.rs +++ b/crates/jacquard-api/src/tools_ozone/communication/delete_template.rs @@ -1,12 +1,24 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.communication.deleteTemplate +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct DeleteTemplateInput<'a> { +pub struct DeleteTemplate<'a> { #[serde(borrow)] pub id: jacquard_common::CowStr<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for DeleteTemplate<'_> { + const NSID: &'static str = "tools.ozone.communication.deleteTemplate"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/communication/list_templates.rs b/crates/jacquard-api/src/tools_ozone/communication/list_templates.rs index 21ac299..e6a1c0d 100644 --- a/crates/jacquard-api/src/tools_ozone/communication/list_templates.rs +++ b/crates/jacquard-api/src/tools_ozone/communication/list_templates.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.communication.listTemplates +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -11,4 +13,15 @@ pub struct ListTemplatesOutput<'a> { pub communication_templates: Vec< crate::tools_ozone::communication::TemplateView<'a>, >, +} + +/// XRPC request marker type +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] +pub struct ListTemplates; +impl jacquard_common::types::xrpc::XrpcRequest for ListTemplates { + const NSID: &'static str = "tools.ozone.communication.listTemplates"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = ListTemplatesOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/communication/update_template.rs b/crates/jacquard-api/src/tools_ozone/communication/update_template.rs index f120c83..0df97eb 100644 --- a/crates/jacquard-api/src/tools_ozone/communication/update_template.rs +++ b/crates/jacquard-api/src/tools_ozone/communication/update_template.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.communication.updateTemplate +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UpdateTemplateInput<'a> { +pub struct UpdateTemplate<'a> { ///Content of the template, markdown supported, can contain variable placeholders. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] @@ -73,4 +75,14 @@ impl std::fmt::Display for UpdateTemplateError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for UpdateTemplate<'_> { + const NSID: &'static str = "tools.ozone.communication.updateTemplate"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = UpdateTemplateOutput<'de>; + type Err<'de> = UpdateTemplateError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/hosting/get_account_history.rs b/crates/jacquard-api/src/tools_ozone/hosting/get_account_history.rs index 1c30b35..6157661 100644 --- a/crates/jacquard-api/src/tools_ozone/hosting/get_account_history.rs +++ b/crates/jacquard-api/src/tools_ozone/hosting/get_account_history.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.hosting.getAccountHistory +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -55,9 +57,9 @@ pub struct HandleUpdated<'a> { pub handle: jacquard_common::types::string::Handle<'a>, } -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetAccountHistoryParams<'a> { +pub struct GetAccountHistory<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -70,6 +72,17 @@ pub struct GetAccountHistoryParams<'a> { pub limit: std::option::Option, } +impl Default for GetAccountHistory<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + did: Default::default(), + events: Default::default(), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -81,6 +94,14 @@ pub struct GetAccountHistoryOutput<'a> { pub events: Vec>, } +impl jacquard_common::types::xrpc::XrpcRequest for GetAccountHistory<'_> { + const NSID: &'static str = "tools.ozone.hosting.getAccountHistory"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetAccountHistoryOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] diff --git a/crates/jacquard-api/src/tools_ozone/moderation.rs b/crates/jacquard-api/src/tools_ozone/moderation.rs index dba6795..245b3ef 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.moderation.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/tools_ozone/moderation/emit_event.rs b/crates/jacquard-api/src/tools_ozone/moderation/emit_event.rs index 3cbf621..1c97833 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/emit_event.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/emit_event.rs @@ -1,16 +1,18 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.moderation.emitEvent +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct EmitEventInput<'a> { +pub struct EmitEvent<'a> { #[serde(borrow)] pub created_by: jacquard_common::types::string::Did<'a>, #[serde(borrow)] - pub event: EmitEventInputRecordEvent<'a>, + pub event: EmitEventRecordEvent<'a>, ///An optional external ID for the event, used to deduplicate events from external systems. Fails when an event of same type with the same external ID exists for the same subject. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] @@ -19,7 +21,7 @@ pub struct EmitEventInput<'a> { #[serde(borrow)] pub mod_tool: std::option::Option>, #[serde(borrow)] - pub subject: EmitEventInputRecordSubject<'a>, + pub subject: EmitEventRecordSubject<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub subject_blob_cids: std::option::Option< @@ -31,7 +33,7 @@ pub struct EmitEventInput<'a> { #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] #[serde(bound(deserialize = "'de: 'a"))] -pub enum EmitEventInputRecordEvent<'a> { +pub enum EmitEventRecordEvent<'a> { #[serde(rename = "tools.ozone.moderation.defs#modEventTakedown")] DefsModEventTakedown(Box>), #[serde(rename = "tools.ozone.moderation.defs#modEventAcknowledge")] @@ -98,7 +100,7 @@ pub enum EmitEventInputRecordEvent<'a> { #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] #[serde(bound(deserialize = "'de: 'a"))] -pub enum EmitEventInputRecordSubject<'a> { +pub enum EmitEventRecordSubject<'a> { #[serde(rename = "com.atproto.admin.defs#repoRef")] DefsRepoRef(Box>), #[serde(rename = "com.atproto.repo.strongRef")] @@ -155,4 +157,14 @@ impl std::fmt::Display for EmitEventError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for EmitEvent<'_> { + const NSID: &'static str = "tools.ozone.moderation.emitEvent"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = EmitEventOutput<'de>; + type Err<'de> = EmitEventError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation/get_account_timeline.rs b/crates/jacquard-api/src/tools_ozone/moderation/get_account_timeline.rs index 7c7539d..8a91910 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/get_account_timeline.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/get_account_timeline.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.moderation.getAccountTimeline +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetAccountTimelineParams<'a> { +pub struct GetAccountTimeline<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } @@ -51,6 +53,14 @@ impl std::fmt::Display for GetAccountTimelineError<'_> { } } +impl jacquard_common::types::xrpc::XrpcRequest for GetAccountTimeline<'_> { + const NSID: &'static str = "tools.ozone.moderation.getAccountTimeline"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetAccountTimelineOutput<'de>; + type Err<'de> = GetAccountTimelineError<'de>; +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] diff --git a/crates/jacquard-api/src/tools_ozone/moderation/get_event.rs b/crates/jacquard-api/src/tools_ozone/moderation/get_event.rs index b980244..7a2a14f 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/get_event.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/get_event.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.moderation.getEvent +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetEventParams { +pub struct GetEvent { pub id: i64, } @@ -16,4 +18,12 @@ pub struct GetEventOutput<'a> { #[serde(flatten)] #[serde(borrow)] pub value: crate::tools_ozone::moderation::ModEventViewDetail<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetEvent { + const NSID: &'static str = "tools.ozone.moderation.getEvent"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetEventOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation/get_record.rs b/crates/jacquard-api/src/tools_ozone/moderation/get_record.rs index 83b960d..e619adc 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/get_record.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/get_record.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.moderation.getRecord +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetRecordParams<'a> { +pub struct GetRecord<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cid: std::option::Option>, @@ -53,4 +55,12 @@ impl std::fmt::Display for GetRecordError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetRecord<'_> { + const NSID: &'static str = "tools.ozone.moderation.getRecord"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetRecordOutput<'de>; + type Err<'de> = GetRecordError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation/get_records.rs b/crates/jacquard-api/src/tools_ozone/moderation/get_records.rs index d7e3568..6cd5d97 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/get_records.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/get_records.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.moderation.getRecords +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetRecordsParams<'a> { +pub struct GetRecords<'a> { #[serde(borrow)] pub uris: Vec>, } @@ -16,4 +18,12 @@ pub struct GetRecordsParams<'a> { pub struct GetRecordsOutput<'a> { #[serde(borrow)] pub records: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetRecords<'_> { + const NSID: &'static str = "tools.ozone.moderation.getRecords"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetRecordsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation/get_repo.rs b/crates/jacquard-api/src/tools_ozone/moderation/get_repo.rs index 0cb6706..06f5c46 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/get_repo.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/get_repo.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.moderation.getRepo +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetRepoParams<'a> { +pub struct GetRepo<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } @@ -50,4 +52,12 @@ impl std::fmt::Display for GetRepoError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetRepo<'_> { + const NSID: &'static str = "tools.ozone.moderation.getRepo"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetRepoOutput<'de>; + type Err<'de> = GetRepoError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation/get_reporter_stats.rs b/crates/jacquard-api/src/tools_ozone/moderation/get_reporter_stats.rs index 7d3703d..3d93d30 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/get_reporter_stats.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/get_reporter_stats.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.moderation.getReporterStats +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetReporterStatsParams<'a> { +pub struct GetReporterStats<'a> { #[serde(borrow)] pub dids: Vec>, } @@ -16,4 +18,12 @@ pub struct GetReporterStatsParams<'a> { pub struct GetReporterStatsOutput<'a> { #[serde(borrow)] pub stats: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetReporterStats<'_> { + const NSID: &'static str = "tools.ozone.moderation.getReporterStats"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetReporterStatsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation/get_repos.rs b/crates/jacquard-api/src/tools_ozone/moderation/get_repos.rs index ea1cc37..0dfe224 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/get_repos.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/get_repos.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.moderation.getRepos +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetReposParams<'a> { +pub struct GetRepos<'a> { #[serde(borrow)] pub dids: Vec>, } @@ -16,4 +18,12 @@ pub struct GetReposParams<'a> { pub struct GetReposOutput<'a> { #[serde(borrow)] pub repos: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetRepos<'_> { + const NSID: &'static str = "tools.ozone.moderation.getRepos"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetReposOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation/get_subjects.rs b/crates/jacquard-api/src/tools_ozone/moderation/get_subjects.rs index b7f13a9..d40833a 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/get_subjects.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/get_subjects.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.moderation.getSubjects +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetSubjectsParams<'a> { +pub struct GetSubjects<'a> { #[serde(borrow)] pub subjects: Vec>, } @@ -16,4 +18,12 @@ pub struct GetSubjectsParams<'a> { pub struct GetSubjectsOutput<'a> { #[serde(borrow)] pub subjects: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetSubjects<'_> { + const NSID: &'static str = "tools.ozone.moderation.getSubjects"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetSubjectsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation/query_events.rs b/crates/jacquard-api/src/tools_ozone/moderation/query_events.rs index b1d1ec4..66cfba0 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/query_events.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/query_events.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.moderation.queryEvents +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct QueryEventsParams<'a> { +pub struct QueryEvents<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub added_labels: std::option::Option>>, @@ -69,6 +71,35 @@ pub struct QueryEventsParams<'a> { pub types: std::option::Option>>, } +impl Default for QueryEvents<'_> { + fn default() -> Self { + Self { + added_labels: Default::default(), + added_tags: Default::default(), + age_assurance_state: Default::default(), + batch_id: Default::default(), + collections: Default::default(), + comment: Default::default(), + created_after: Default::default(), + created_before: Default::default(), + created_by: Default::default(), + cursor: Default::default(), + has_comment: Default::default(), + include_all_user_records: Some(false), + limit: Some(50i64), + mod_tool: Default::default(), + policies: Default::default(), + removed_labels: Default::default(), + removed_tags: Default::default(), + report_types: Default::default(), + sort_direction: Some(jacquard_common::CowStr::from("desc")), + subject: Default::default(), + subject_type: Default::default(), + types: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -78,4 +109,12 @@ pub struct QueryEventsOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub events: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for QueryEvents<'_> { + const NSID: &'static str = "tools.ozone.moderation.queryEvents"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = QueryEventsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation/query_statuses.rs b/crates/jacquard-api/src/tools_ozone/moderation/query_statuses.rs index 7f6d230..a686233 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/query_statuses.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/query_statuses.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.moderation.queryStatuses +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct QueryStatusesParams<'a> { +pub struct QueryStatuses<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub age_assurance_state: std::option::Option>, @@ -103,6 +105,48 @@ pub struct QueryStatusesParams<'a> { pub takendown: std::option::Option, } +impl Default for QueryStatuses<'_> { + fn default() -> Self { + Self { + age_assurance_state: Default::default(), + appealed: Default::default(), + collections: Default::default(), + comment: Default::default(), + cursor: Default::default(), + exclude_tags: Default::default(), + hosting_deleted_after: Default::default(), + hosting_deleted_before: Default::default(), + hosting_statuses: Default::default(), + hosting_updated_after: Default::default(), + hosting_updated_before: Default::default(), + ignore_subjects: Default::default(), + include_all_user_records: Default::default(), + include_muted: Default::default(), + last_reviewed_by: Default::default(), + limit: Some(50i64), + min_account_suspend_count: Default::default(), + min_priority_score: Default::default(), + min_reported_records_count: Default::default(), + min_takendown_records_count: Default::default(), + only_muted: Default::default(), + queue_count: Default::default(), + queue_index: Default::default(), + queue_seed: Default::default(), + reported_after: Default::default(), + reported_before: Default::default(), + review_state: Default::default(), + reviewed_after: Default::default(), + reviewed_before: Default::default(), + sort_direction: Some(jacquard_common::CowStr::from("desc")), + sort_field: Some(jacquard_common::CowStr::from("lastReportedAt")), + subject: Default::default(), + subject_type: Default::default(), + tags: Default::default(), + takendown: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -112,4 +156,12 @@ pub struct QueryStatusesOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub subject_statuses: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for QueryStatuses<'_> { + const NSID: &'static str = "tools.ozone.moderation.queryStatuses"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = QueryStatusesOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation/search_repos.rs b/crates/jacquard-api/src/tools_ozone/moderation/search_repos.rs index 45e248d..93fbb51 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/search_repos.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/search_repos.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.moderation.searchRepos +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct SearchReposParams<'a> { +pub struct SearchRepos<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -19,6 +21,17 @@ pub struct SearchReposParams<'a> { pub term: std::option::Option>, } +impl Default for SearchRepos<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(50i64), + q: Default::default(), + term: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -28,4 +41,12 @@ pub struct SearchReposOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub repos: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for SearchRepos<'_> { + const NSID: &'static str = "tools.ozone.moderation.searchRepos"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = SearchReposOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/report.rs b/crates/jacquard-api/src/tools_ozone/report.rs index 0180f4b..dca49d6 100644 --- a/crates/jacquard-api/src/tools_ozone/report.rs +++ b/crates/jacquard-api/src/tools_ozone/report.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.report.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/tools_ozone/safelink.rs b/crates/jacquard-api/src/tools_ozone/safelink.rs index 5df7204..a7648f7 100644 --- a/crates/jacquard-api/src/tools_ozone/safelink.rs +++ b/crates/jacquard-api/src/tools_ozone/safelink.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.safelink.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/tools_ozone/safelink/add_rule.rs b/crates/jacquard-api/src/tools_ozone/safelink/add_rule.rs index 1bff0bc..838959c 100644 --- a/crates/jacquard-api/src/tools_ozone/safelink/add_rule.rs +++ b/crates/jacquard-api/src/tools_ozone/safelink/add_rule.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.safelink.addRule +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct AddRuleInput<'a> { +pub struct AddRule<'a> { #[serde(borrow)] pub action: crate::tools_ozone::safelink::ActionType<'a>, ///Optional comment about the decision @@ -77,4 +79,14 @@ impl std::fmt::Display for AddRuleError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for AddRule<'_> { + const NSID: &'static str = "tools.ozone.safelink.addRule"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = AddRuleOutput<'de>; + type Err<'de> = AddRuleError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/safelink/query_events.rs b/crates/jacquard-api/src/tools_ozone/safelink/query_events.rs index 35aff0f..3c64d8f 100644 --- a/crates/jacquard-api/src/tools_ozone/safelink/query_events.rs +++ b/crates/jacquard-api/src/tools_ozone/safelink/query_events.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.safelink.queryEvents +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct QueryEventsInput<'a> { +pub struct QueryEvents<'a> { ///Cursor for pagination #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] @@ -38,4 +40,14 @@ pub struct QueryEventsOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub events: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for QueryEvents<'_> { + const NSID: &'static str = "tools.ozone.safelink.queryEvents"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = QueryEventsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/safelink/query_rules.rs b/crates/jacquard-api/src/tools_ozone/safelink/query_rules.rs index edc77fa..1ba59a7 100644 --- a/crates/jacquard-api/src/tools_ozone/safelink/query_rules.rs +++ b/crates/jacquard-api/src/tools_ozone/safelink/query_rules.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.safelink.queryRules +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct QueryRulesInput<'a> { +pub struct QueryRules<'a> { ///Filter by action types #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] @@ -50,4 +52,14 @@ pub struct QueryRulesOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub rules: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for QueryRules<'_> { + const NSID: &'static str = "tools.ozone.safelink.queryRules"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = QueryRulesOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/safelink/remove_rule.rs b/crates/jacquard-api/src/tools_ozone/safelink/remove_rule.rs index 42ecedd..3660d3f 100644 --- a/crates/jacquard-api/src/tools_ozone/safelink/remove_rule.rs +++ b/crates/jacquard-api/src/tools_ozone/safelink/remove_rule.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.safelink.removeRule +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct RemoveRuleInput<'a> { +pub struct RemoveRule<'a> { ///Optional comment about why the rule is being removed #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] @@ -63,4 +65,14 @@ impl std::fmt::Display for RemoveRuleError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for RemoveRule<'_> { + const NSID: &'static str = "tools.ozone.safelink.removeRule"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = RemoveRuleOutput<'de>; + type Err<'de> = RemoveRuleError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/safelink/update_rule.rs b/crates/jacquard-api/src/tools_ozone/safelink/update_rule.rs index 989c756..7d04ef8 100644 --- a/crates/jacquard-api/src/tools_ozone/safelink/update_rule.rs +++ b/crates/jacquard-api/src/tools_ozone/safelink/update_rule.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.safelink.updateRule +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UpdateRuleInput<'a> { +pub struct UpdateRule<'a> { #[serde(borrow)] pub action: crate::tools_ozone::safelink::ActionType<'a>, ///Optional comment about the update @@ -67,4 +69,14 @@ impl std::fmt::Display for UpdateRuleError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for UpdateRule<'_> { + const NSID: &'static str = "tools.ozone.safelink.updateRule"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = UpdateRuleOutput<'de>; + type Err<'de> = UpdateRuleError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/server/get_config.rs b/crates/jacquard-api/src/tools_ozone/server/get_config.rs index d086f4d..9281314 100644 --- a/crates/jacquard-api/src/tools_ozone/server/get_config.rs +++ b/crates/jacquard-api/src/tools_ozone/server/get_config.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.server.getConfig +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -28,6 +30,17 @@ pub struct GetConfigOutput<'a> { pub viewer: std::option::Option>, } +/// XRPC request marker type +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] +pub struct GetConfig; +impl jacquard_common::types::xrpc::XrpcRequest for GetConfig { + const NSID: &'static str = "tools.ozone.server.getConfig"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetConfigOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] diff --git a/crates/jacquard-api/src/tools_ozone/set.rs b/crates/jacquard-api/src/tools_ozone/set.rs index 08d83dc..7d2ef37 100644 --- a/crates/jacquard-api/src/tools_ozone/set.rs +++ b/crates/jacquard-api/src/tools_ozone/set.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.set.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/tools_ozone/set/add_values.rs b/crates/jacquard-api/src/tools_ozone/set/add_values.rs index 7250bcd..55673e0 100644 --- a/crates/jacquard-api/src/tools_ozone/set/add_values.rs +++ b/crates/jacquard-api/src/tools_ozone/set/add_values.rs @@ -1,16 +1,28 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.set.addValues +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct AddValuesInput<'a> { +pub struct AddValues<'a> { ///Name of the set to add values to #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, ///Array of string values to add to the set #[serde(borrow)] pub values: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for AddValues<'_> { + const NSID: &'static str = "tools.ozone.set.addValues"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/set/delete_set.rs b/crates/jacquard-api/src/tools_ozone/set/delete_set.rs index 1851cfe..fbc3713 100644 --- a/crates/jacquard-api/src/tools_ozone/set/delete_set.rs +++ b/crates/jacquard-api/src/tools_ozone/set/delete_set.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.set.deleteSet +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct DeleteSetInput<'a> { +pub struct DeleteSet<'a> { ///Name of the set to delete #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, @@ -48,4 +50,14 @@ impl std::fmt::Display for DeleteSetError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for DeleteSet<'_> { + const NSID: &'static str = "tools.ozone.set.deleteSet"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = DeleteSetOutput<'de>; + type Err<'de> = DeleteSetError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/set/delete_values.rs b/crates/jacquard-api/src/tools_ozone/set/delete_values.rs index 3a3eb4e..9183ee7 100644 --- a/crates/jacquard-api/src/tools_ozone/set/delete_values.rs +++ b/crates/jacquard-api/src/tools_ozone/set/delete_values.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.set.deleteValues +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct DeleteValuesInput<'a> { +pub struct DeleteValues<'a> { ///Name of the set to delete values from #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, @@ -47,4 +49,14 @@ impl std::fmt::Display for DeleteValuesError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for DeleteValues<'_> { + const NSID: &'static str = "tools.ozone.set.deleteValues"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = DeleteValuesError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/set/get_values.rs b/crates/jacquard-api/src/tools_ozone/set/get_values.rs index 28cc7b9..6c0fc23 100644 --- a/crates/jacquard-api/src/tools_ozone/set/get_values.rs +++ b/crates/jacquard-api/src/tools_ozone/set/get_values.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.set.getValues +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct GetValuesParams<'a> { +pub struct GetValues<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -15,6 +17,16 @@ pub struct GetValuesParams<'a> { pub name: jacquard_common::CowStr<'a>, } +impl Default for GetValues<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(100i64), + name: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -60,4 +72,12 @@ impl std::fmt::Display for GetValuesError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for GetValues<'_> { + const NSID: &'static str = "tools.ozone.set.getValues"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GetValuesOutput<'de>; + type Err<'de> = GetValuesError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/set/query_sets.rs b/crates/jacquard-api/src/tools_ozone/set/query_sets.rs index ed59b17..beedb27 100644 --- a/crates/jacquard-api/src/tools_ozone/set/query_sets.rs +++ b/crates/jacquard-api/src/tools_ozone/set/query_sets.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.set.querySets +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct QuerySetsParams<'a> { +pub struct QuerySets<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -22,6 +24,18 @@ pub struct QuerySetsParams<'a> { pub sort_direction: std::option::Option>, } +impl Default for QuerySets<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(50i64), + name_prefix: Default::default(), + sort_by: Some(jacquard_common::CowStr::from("name")), + sort_direction: Some(jacquard_common::CowStr::from("asc")), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -31,4 +45,12 @@ pub struct QuerySetsOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub sets: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for QuerySets<'_> { + const NSID: &'static str = "tools.ozone.set.querySets"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = QuerySetsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/set/upsert_set.rs b/crates/jacquard-api/src/tools_ozone/set/upsert_set.rs index 758bcb3..b1d6f16 100644 --- a/crates/jacquard-api/src/tools_ozone/set/upsert_set.rs +++ b/crates/jacquard-api/src/tools_ozone/set/upsert_set.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.set.upsertSet +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UpsertSetInput<'a> { +pub struct UpsertSet<'a> { #[serde(flatten)] #[serde(borrow)] pub value: crate::tools_ozone::set::Set<'a>, @@ -19,4 +21,14 @@ pub struct UpsertSetOutput<'a> { #[serde(flatten)] #[serde(borrow)] pub value: crate::tools_ozone::set::SetView<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for UpsertSet<'_> { + const NSID: &'static str = "tools.ozone.set.upsertSet"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = UpsertSetOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/setting.rs b/crates/jacquard-api/src/tools_ozone/setting.rs index d6875ef..44c4b59 100644 --- a/crates/jacquard-api/src/tools_ozone/setting.rs +++ b/crates/jacquard-api/src/tools_ozone/setting.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.setting.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/tools_ozone/setting/list_options.rs b/crates/jacquard-api/src/tools_ozone/setting/list_options.rs index a3426b2..e41aa17 100644 --- a/crates/jacquard-api/src/tools_ozone/setting/list_options.rs +++ b/crates/jacquard-api/src/tools_ozone/setting/list_options.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.setting.listOptions +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct ListOptionsParams<'a> { +pub struct ListOptions<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -22,6 +24,18 @@ pub struct ListOptionsParams<'a> { pub scope: std::option::Option>, } +impl Default for ListOptions<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + keys: Default::default(), + limit: Some(50i64), + prefix: Default::default(), + scope: Some(jacquard_common::CowStr::from("instance")), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -31,4 +45,12 @@ pub struct ListOptionsOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub options: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for ListOptions<'_> { + const NSID: &'static str = "tools.ozone.setting.listOptions"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = ListOptionsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/setting/remove_options.rs b/crates/jacquard-api/src/tools_ozone/setting/remove_options.rs index f05e9bc..fd135bb 100644 --- a/crates/jacquard-api/src/tools_ozone/setting/remove_options.rs +++ b/crates/jacquard-api/src/tools_ozone/setting/remove_options.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.setting.removeOptions +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct RemoveOptionsInput<'a> { +pub struct RemoveOptions<'a> { #[serde(borrow)] pub keys: Vec>, #[serde(borrow)] @@ -16,4 +18,13 @@ pub struct RemoveOptionsInput<'a> { #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct RemoveOptionsOutput<'a> {} \ No newline at end of file +pub struct RemoveOptionsOutput<'a> {} +impl jacquard_common::types::xrpc::XrpcRequest for RemoveOptions<'_> { + const NSID: &'static str = "tools.ozone.setting.removeOptions"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = RemoveOptionsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/setting/upsert_option.rs b/crates/jacquard-api/src/tools_ozone/setting/upsert_option.rs index 64d1b45..4184c7d 100644 --- a/crates/jacquard-api/src/tools_ozone/setting/upsert_option.rs +++ b/crates/jacquard-api/src/tools_ozone/setting/upsert_option.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.setting.upsertOption +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UpsertOptionInput<'a> { +pub struct UpsertOption<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub description: std::option::Option>, @@ -27,4 +29,14 @@ pub struct UpsertOptionInput<'a> { pub struct UpsertOptionOutput<'a> { #[serde(borrow)] pub option: crate::tools_ozone::setting::Option<'a>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for UpsertOption<'_> { + const NSID: &'static str = "tools.ozone.setting.upsertOption"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = UpsertOptionOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/signature.rs b/crates/jacquard-api/src/tools_ozone/signature.rs index 261ca3b..9a089a2 100644 --- a/crates/jacquard-api/src/tools_ozone/signature.rs +++ b/crates/jacquard-api/src/tools_ozone/signature.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.signature.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/tools_ozone/signature/find_correlation.rs b/crates/jacquard-api/src/tools_ozone/signature/find_correlation.rs index 890c25d..1ed8b97 100644 --- a/crates/jacquard-api/src/tools_ozone/signature/find_correlation.rs +++ b/crates/jacquard-api/src/tools_ozone/signature/find_correlation.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.signature.findCorrelation +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct FindCorrelationParams<'a> { +pub struct FindCorrelation<'a> { #[serde(borrow)] pub dids: Vec>, } @@ -16,4 +18,12 @@ pub struct FindCorrelationParams<'a> { pub struct FindCorrelationOutput<'a> { #[serde(borrow)] pub details: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for FindCorrelation<'_> { + const NSID: &'static str = "tools.ozone.signature.findCorrelation"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = FindCorrelationOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/signature/find_related_accounts.rs b/crates/jacquard-api/src/tools_ozone/signature/find_related_accounts.rs index 660a50b..1c7f521 100644 --- a/crates/jacquard-api/src/tools_ozone/signature/find_related_accounts.rs +++ b/crates/jacquard-api/src/tools_ozone/signature/find_related_accounts.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.signature.findRelatedAccounts +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct FindRelatedAccountsParams<'a> { +pub struct FindRelatedAccounts<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -15,6 +17,16 @@ pub struct FindRelatedAccountsParams<'a> { pub limit: std::option::Option, } +impl Default for FindRelatedAccounts<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + did: Default::default(), + limit: Some(50i64), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -26,6 +38,14 @@ pub struct FindRelatedAccountsOutput<'a> { pub cursor: std::option::Option>, } +impl jacquard_common::types::xrpc::XrpcRequest for FindRelatedAccounts<'_> { + const NSID: &'static str = "tools.ozone.signature.findRelatedAccounts"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = FindRelatedAccountsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] diff --git a/crates/jacquard-api/src/tools_ozone/signature/search_accounts.rs b/crates/jacquard-api/src/tools_ozone/signature/search_accounts.rs index 9138b15..553a43a 100644 --- a/crates/jacquard-api/src/tools_ozone/signature/search_accounts.rs +++ b/crates/jacquard-api/src/tools_ozone/signature/search_accounts.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.signature.searchAccounts +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct SearchAccountsParams<'a> { +pub struct SearchAccounts<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -15,6 +17,16 @@ pub struct SearchAccountsParams<'a> { pub values: Vec>, } +impl Default for SearchAccounts<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + limit: Some(50i64), + values: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -24,4 +36,12 @@ pub struct SearchAccountsOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for SearchAccounts<'_> { + const NSID: &'static str = "tools.ozone.signature.searchAccounts"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = SearchAccountsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/team.rs b/crates/jacquard-api/src/tools_ozone/team.rs index 34ce87f..5f53ee0 100644 --- a/crates/jacquard-api/src/tools_ozone/team.rs +++ b/crates/jacquard-api/src/tools_ozone/team.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.team.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/tools_ozone/team/add_member.rs b/crates/jacquard-api/src/tools_ozone/team/add_member.rs index 59bba8b..ea8ef44 100644 --- a/crates/jacquard-api/src/tools_ozone/team/add_member.rs +++ b/crates/jacquard-api/src/tools_ozone/team/add_member.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.team.addMember +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct AddMemberInput<'a> { +pub struct AddMember<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, #[serde(borrow)] @@ -54,4 +56,14 @@ impl std::fmt::Display for AddMemberError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for AddMember<'_> { + const NSID: &'static str = "tools.ozone.team.addMember"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = AddMemberOutput<'de>; + type Err<'de> = AddMemberError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/team/delete_member.rs b/crates/jacquard-api/src/tools_ozone/team/delete_member.rs index 585d3eb..d686e9c 100644 --- a/crates/jacquard-api/src/tools_ozone/team/delete_member.rs +++ b/crates/jacquard-api/src/tools_ozone/team/delete_member.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.team.deleteMember +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct DeleteMemberInput<'a> { +pub struct DeleteMember<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } @@ -53,4 +55,14 @@ impl std::fmt::Display for DeleteMemberError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for DeleteMember<'_> { + const NSID: &'static str = "tools.ozone.team.deleteMember"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = DeleteMemberError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/team/list_members.rs b/crates/jacquard-api/src/tools_ozone/team/list_members.rs index 21155eb..ee58e85 100644 --- a/crates/jacquard-api/src/tools_ozone/team/list_members.rs +++ b/crates/jacquard-api/src/tools_ozone/team/list_members.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.team.listMembers +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct ListMembersParams<'a> { +pub struct ListMembers<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, @@ -21,6 +23,18 @@ pub struct ListMembersParams<'a> { pub roles: std::option::Option>>, } +impl Default for ListMembers<'_> { + fn default() -> Self { + Self { + cursor: Default::default(), + disabled: Default::default(), + limit: Some(50i64), + q: Default::default(), + roles: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -30,4 +44,12 @@ pub struct ListMembersOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub members: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for ListMembers<'_> { + const NSID: &'static str = "tools.ozone.team.listMembers"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = ListMembersOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/team/update_member.rs b/crates/jacquard-api/src/tools_ozone/team/update_member.rs index 1a829b6..039967b 100644 --- a/crates/jacquard-api/src/tools_ozone/team/update_member.rs +++ b/crates/jacquard-api/src/tools_ozone/team/update_member.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.team.updateMember +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct UpdateMemberInput<'a> { +pub struct UpdateMember<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -57,4 +59,14 @@ impl std::fmt::Display for UpdateMemberError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } +} + +impl jacquard_common::types::xrpc::XrpcRequest for UpdateMember<'_> { + const NSID: &'static str = "tools.ozone.team.updateMember"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = UpdateMemberOutput<'de>; + type Err<'de> = UpdateMemberError<'de>; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/verification.rs b/crates/jacquard-api/src/tools_ozone/verification.rs index 1bfaee4..e7e4a59 100644 --- a/crates/jacquard-api/src/tools_ozone/verification.rs +++ b/crates/jacquard-api/src/tools_ozone/verification.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.verification.defs +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. diff --git a/crates/jacquard-api/src/tools_ozone/verification/grant_verifications.rs b/crates/jacquard-api/src/tools_ozone/verification/grant_verifications.rs index 4be7b0b..72e4c4e 100644 --- a/crates/jacquard-api/src/tools_ozone/verification/grant_verifications.rs +++ b/crates/jacquard-api/src/tools_ozone/verification/grant_verifications.rs @@ -1,5 +1,7 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.verification.grantVerifications +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. @@ -19,7 +21,7 @@ pub struct GrantError<'a> { #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GrantVerificationsInput<'a> { +pub struct GrantVerifications<'a> { ///Array of verification requests to process #[serde(borrow)] pub verifications: Vec>, @@ -35,6 +37,16 @@ pub struct GrantVerificationsOutput<'a> { pub verifications: Vec>, } +impl jacquard_common::types::xrpc::XrpcRequest for GrantVerifications<'_> { + const NSID: &'static str = "tools.ozone.verification.grantVerifications"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = GrantVerificationsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] diff --git a/crates/jacquard-api/src/tools_ozone/verification/list_verifications.rs b/crates/jacquard-api/src/tools_ozone/verification/list_verifications.rs index 6ff44ce..029cd9a 100644 --- a/crates/jacquard-api/src/tools_ozone/verification/list_verifications.rs +++ b/crates/jacquard-api/src/tools_ozone/verification/list_verifications.rs @@ -1,11 +1,13 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.verification.listVerifications +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] -pub struct ListVerificationsParams<'a> { +pub struct ListVerifications<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub created_after: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -28,6 +30,21 @@ pub struct ListVerificationsParams<'a> { pub subjects: std::option::Option>>, } +impl Default for ListVerifications<'_> { + fn default() -> Self { + Self { + created_after: Default::default(), + created_before: Default::default(), + cursor: Default::default(), + is_revoked: Default::default(), + issuers: Default::default(), + limit: Some(50i64), + sort_direction: Some(jacquard_common::CowStr::from("desc")), + subjects: Default::default(), + } + } +} + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -37,4 +54,12 @@ pub struct ListVerificationsOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub verifications: Vec>, +} + +impl jacquard_common::types::xrpc::XrpcRequest for ListVerifications<'_> { + const NSID: &'static str = "tools.ozone.verification.listVerifications"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query; + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = ListVerificationsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; } \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/verification/revoke_verifications.rs b/crates/jacquard-api/src/tools_ozone/verification/revoke_verifications.rs index f85431c..d84a525 100644 --- a/crates/jacquard-api/src/tools_ozone/verification/revoke_verifications.rs +++ b/crates/jacquard-api/src/tools_ozone/verification/revoke_verifications.rs @@ -1,12 +1,14 @@ // @generated by jacquard-lexicon. DO NOT EDIT. // +// Lexicon: tools.ozone.verification.revokeVerifications +// // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct RevokeVerificationsInput<'a> { +pub struct RevokeVerifications<'a> { ///Reason for revoking the verification. This is optional and can be omitted if not needed. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] @@ -28,6 +30,16 @@ pub struct RevokeVerificationsOutput<'a> { pub revoked_verifications: Vec>, } +impl jacquard_common::types::xrpc::XrpcRequest for RevokeVerifications<'_> { + const NSID: &'static str = "tools.ozone.verification.revokeVerifications"; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( + "application/json", + ); + const OUTPUT_ENCODING: &'static str = "application/json"; + type Output<'de> = RevokeVerificationsOutput<'de>; + type Err<'de> = jacquard_common::types::xrpc::GenericError; +} + ///Error object for failed revocations #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/crates/jacquard-common/src/types/collection.rs b/crates/jacquard-common/src/types/collection.rs index a0fdfad..f710dc8 100644 --- a/crates/jacquard-common/src/types/collection.rs +++ b/crates/jacquard-common/src/types/collection.rs @@ -1,6 +1,6 @@ use core::fmt; -use serde::{Serialize, de}; +use serde::Serialize; use crate::types::{ aturi::UriPath, @@ -11,13 +11,12 @@ use crate::types::{ /// Trait for a collection of records that can be stored in a repository. /// /// The records all have the same Lexicon schema. -pub trait Collection: fmt::Debug { +/// +/// Implemented on the record type itself. +pub trait Collection: fmt::Debug + Serialize { /// The NSID for the Lexicon that defines the schema of records in this collection. const NSID: &'static str; - /// This collection's record type. - type Record: fmt::Debug + de::DeserializeOwned + Serialize; - /// Returns the [`Nsid`] for the Lexicon that defines the schema of records in this /// collection. /// diff --git a/crates/jacquard-common/src/types/xrpc.rs b/crates/jacquard-common/src/types/xrpc.rs index 8930c28..d7ce5bf 100644 --- a/crates/jacquard-common/src/types/xrpc.rs +++ b/crates/jacquard-common/src/types/xrpc.rs @@ -1,5 +1,8 @@ use serde::{Deserialize, Serialize}; use std::error::Error; +use std::fmt::{self, Debug}; + +use crate::types::value::Data; /// XRPC method type #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] @@ -7,15 +10,22 @@ pub enum XrpcMethod { /// Query (HTTP GET) Query, /// Procedure (HTTP POST) - Procedure, + Procedure(&'static str), } impl XrpcMethod { /// Get the HTTP method string - pub fn as_str(&self) -> &'static str { + pub const fn as_str(&self) -> &'static str { match self { Self::Query => "GET", - Self::Procedure => "POST", + Self::Procedure(_) => "POST", + } + } + + pub const fn body_encoding(&self) -> Option<&'static str> { + match self { + Self::Query => None, + Self::Procedure(enc) => Some(enc), } } } @@ -23,27 +33,34 @@ impl XrpcMethod { /// Trait for XRPC request types (queries and procedures) /// /// This trait provides metadata about XRPC endpoints including the NSID, -/// HTTP method, encoding types, and associated parameter/output types. -pub trait XrpcRequest { +/// HTTP method, encoding types, and associated output types. +/// +/// The trait is implemented on the request parameters/input type itself. +pub trait XrpcRequest: Serialize { /// The NSID for this XRPC method const NSID: &'static str; /// XRPC method (query/GET or procedure/POST) const METHOD: XrpcMethod; - /// Input encoding (MIME type, e.g., "application/json") - /// None for queries (no body) - const INPUT_ENCODING: Option<&'static str>; - /// Output encoding (MIME type) const OUTPUT_ENCODING: &'static str; - /// Request parameters type (query params for queries, body for procedures) - type Params: Serialize; - /// Response output type - type Output: for<'de> Deserialize<'de>; + type Output<'de>: Deserialize<'de>; /// Error type for this request - type Err: Error; + type Err<'de>: Error; +} + +/// Error type for XRPC endpoints that don't define any errors +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct GenericError(Data<'static>); + +impl fmt::Display for GenericError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + self.0.fmt(f) + } } + +impl Error for GenericError {} diff --git a/crates/jacquard-derive/Cargo.toml b/crates/jacquard-derive/Cargo.toml index c8dcbf0..dffc72e 100644 --- a/crates/jacquard-derive/Cargo.toml +++ b/crates/jacquard-derive/Cargo.toml @@ -17,8 +17,6 @@ proc-macro = true [dependencies] heck = "0.5.0" itertools = "0.14.0" -jacquard-common = { version = "0.1.0", path = "../jacquard-common" } -jacquard-lexicon = { version = "0.1.0", path = "../jacquard-lexicon" } prettyplease = "0.2.37" proc-macro2 = "1.0.101" quote = "1.0.41" @@ -27,3 +25,7 @@ serde_json = "1.0.145" serde_repr = "0.1.20" serde_with = "3.14.1" syn = "2.0.106" + + +[dev-dependencies] +jacquard-common = { version = "0.1.0", path = "../jacquard-common" } diff --git a/crates/jacquard-derive/src/lib.rs b/crates/jacquard-derive/src/lib.rs index 2a82ab0..c972608 100644 --- a/crates/jacquard-derive/src/lib.rs +++ b/crates/jacquard-derive/src/lib.rs @@ -57,7 +57,7 @@ pub fn lexicon(_attr: TokenStream, item: TokenStream) -> TokenStream { #[serde(default)] pub extra_data: std::option::Option<::std::collections::BTreeMap< ::jacquard_common::smol_str::SmolStr, - ::jacquard_common::types::value::Data<#lifetime> + ::jacquard_common::types::value::Data<'static> >> } }; diff --git a/crates/jacquard-lexicon/src/bin/codegen.rs b/crates/jacquard-lexicon/src/bin/codegen.rs index 3d598af..729912c 100644 --- a/crates/jacquard-lexicon/src/bin/codegen.rs +++ b/crates/jacquard-lexicon/src/bin/codegen.rs @@ -25,10 +25,7 @@ fn main() -> miette::Result<()> { println!("Loading lexicons from {:?}...", args.input); let corpus = LexiconCorpus::load_from_dir(&args.input)?; - println!( - "Loaded {} lexicon documents", - corpus.iter().count() - ); + println!("Loaded {} lexicon documents", corpus.iter().count()); println!("Generating code..."); let codegen = CodeGenerator::new(&corpus, args.root_module); diff --git a/crates/jacquard-lexicon/src/codegen.rs b/crates/jacquard-lexicon/src/codegen.rs index 41f9924..68df8bf 100644 --- a/crates/jacquard-lexicon/src/codegen.rs +++ b/crates/jacquard-lexicon/src/codegen.rs @@ -181,9 +181,17 @@ impl<'c> CodeGenerator<'c> { } } + // Generate Collection trait impl + let collection_impl = quote! { + impl jacquard_common::types::collection::Collection for #ident<'_> { + const NSID: &'static str = #nsid; + } + }; + Ok(quote! { #struct_def #(#unions)* + #collection_impl }) } } @@ -599,6 +607,15 @@ impl<'c> CodeGenerator<'c> { let type_base = self.def_to_type_name(nsid, def_name); let mut output = Vec::new(); + let params_has_lifetime = query.parameters.as_ref() + .map(|p| match p { + crate::lexicon::LexXrpcQueryParameter::Params(params) => self.params_need_lifetime(params), + }) + .unwrap_or(false); + let has_params = query.parameters.is_some(); + let has_output = query.output.is_some(); + let has_errors = query.errors.is_some(); + if let Some(params) = &query.parameters { let params_struct = self.generate_params_struct(&type_base, params)?; output.push(params_struct); @@ -614,6 +631,22 @@ impl<'c> CodeGenerator<'c> { output.push(error_enum); } + // Generate XrpcRequest impl + let output_encoding = query.output.as_ref() + .map(|o| o.encoding.as_ref()) + .unwrap_or("application/json"); + let xrpc_impl = self.generate_xrpc_request_impl( + nsid, + &type_base, + quote! { jacquard_common::types::xrpc::XrpcMethod::Query }, + output_encoding, + has_params, + params_has_lifetime, + has_output, + has_errors, + )?; + output.push(xrpc_impl); + Ok(quote! { #(#output)* }) @@ -629,6 +662,12 @@ impl<'c> CodeGenerator<'c> { let type_base = self.def_to_type_name(nsid, def_name); let mut output = Vec::new(); + // Input bodies always have lifetimes (they get #[lexicon] attribute) + let params_has_lifetime = proc.input.is_some(); + let has_input = proc.input.is_some(); + let has_output = proc.output.is_some(); + let has_errors = proc.errors.is_some(); + if let Some(params) = &proc.parameters { let params_struct = self.generate_params_struct_proc(&type_base, params)?; output.push(params_struct); @@ -649,6 +688,25 @@ impl<'c> CodeGenerator<'c> { output.push(error_enum); } + // Generate XrpcRequest impl + let input_encoding = proc.input.as_ref() + .map(|i| i.encoding.as_ref()) + .unwrap_or("application/json"); + let output_encoding = proc.output.as_ref() + .map(|o| o.encoding.as_ref()) + .unwrap_or("application/json"); + let xrpc_impl = self.generate_xrpc_request_impl( + nsid, + &type_base, + quote! { jacquard_common::types::xrpc::XrpcMethod::Procedure(#input_encoding) }, + output_encoding, + has_input, + params_has_lifetime, + has_output, + has_errors, + )?; + output.push(xrpc_impl); + Ok(quote! { #(#output)* }) @@ -1090,7 +1148,7 @@ impl<'c> CodeGenerator<'c> { } } - /// Generate params struct from XRPC procedure parameters + /// Generate params struct from XRPC procedure parameters (query string params) fn generate_params_struct_proc( &self, type_base: &str, @@ -1098,7 +1156,12 @@ impl<'c> CodeGenerator<'c> { ) -> Result { use crate::lexicon::LexXrpcProcedureParameter; match params { - LexXrpcProcedureParameter::Params(p) => self.generate_params_struct_inner(type_base, p), + // For procedures, query string params still get "Params" suffix since the main struct is the input + LexXrpcProcedureParameter::Params(p) => { + let struct_name = format!("{}Params", type_base); + let ident = syn::Ident::new(&struct_name, proc_macro2::Span::call_site()); + self.generate_params_struct_inner_with_name(&ident, p) + } } } @@ -1108,36 +1171,86 @@ impl<'c> CodeGenerator<'c> { type_base: &str, p: &crate::lexicon::LexXrpcParameters<'static>, ) -> Result { - let struct_name = format!("{}Params", type_base); - let ident = syn::Ident::new(&struct_name, proc_macro2::Span::call_site()); + let ident = syn::Ident::new(type_base, proc_macro2::Span::call_site()); + self.generate_params_struct_inner_with_name(&ident, p) + } + + /// Generate params struct with custom name + fn generate_params_struct_inner_with_name( + &self, + ident: &syn::Ident, + p: &crate::lexicon::LexXrpcParameters<'static>, + ) -> Result { let required = p.required.as_ref().map(|r| r.as_slice()).unwrap_or(&[]); let mut fields = Vec::new(); + let mut default_fields = Vec::new(); for (field_name, field_type) in &p.properties { let is_required = required.contains(field_name); let field_tokens = self.generate_param_field("", field_name, field_type, is_required)?; fields.push(field_tokens); + + // Track field defaults + let field_ident = make_ident(&field_name.to_snake_case()); + let default_value = self.get_param_default_value(field_type, is_required); + default_fields.push((field_ident, default_value)); } let doc = self.generate_doc_comment(p.description.as_ref()); - let needs_lifetime = self.params_need_lifetime(p); + // Check if we should generate Default impl + let has_any_defaults = default_fields.iter().any(|(_, default)| default.is_some()); + + let derives = if has_any_defaults { + quote! { #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default)] } + } else { + quote! { #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] } + }; + + let default_impl = if has_any_defaults { + let field_inits: Vec<_> = default_fields.iter().map(|(field_ident, default_value)| { + if let Some(value) = default_value { + quote! { #field_ident: #value } + } else { + quote! { #field_ident: Default::default() } + } + }).collect(); + + if needs_lifetime { + quote! { + impl Default for #ident<'_> { + fn default() -> Self { + Self { + #(#field_inits,)* + } + } + } + } + } else { + quote! {} // Default derive handles this + } + } else { + quote! {} + }; + if needs_lifetime { Ok(quote! { #doc - #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] + #derives #[serde(rename_all = "camelCase")] pub struct #ident<'a> { #(#fields)* } + + #default_impl }) } else { Ok(quote! { #doc - #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] + #derives #[serde(rename_all = "camelCase")] pub struct #ident { #(#fields)* @@ -1146,17 +1259,42 @@ impl<'c> CodeGenerator<'c> { } } + /// Get default value for a param field + fn get_param_default_value( + &self, + field_type: &crate::lexicon::LexXrpcParametersProperty<'static>, + is_required: bool, + ) -> Option { + use crate::lexicon::LexXrpcParametersProperty; + + let default_opt = match field_type { + LexXrpcParametersProperty::Boolean(b) => b.default.map(|v| quote! { #v }), + LexXrpcParametersProperty::Integer(i) => i.default.map(|v| quote! { #v }), + LexXrpcParametersProperty::String(s) => s.default.as_ref().map(|v| { + let s = v.as_ref(); + quote! { jacquard_common::CowStr::from(#s) } + }), + LexXrpcParametersProperty::Unknown(_) | LexXrpcParametersProperty::Array(_) => None, + }; + + if is_required { + default_opt + } else { + // Optional fields: wrap in Some() if there's a default, otherwise None + default_opt.map(|v| quote! { Some(#v) }) + } + } + /// Generate input struct from XRPC body fn generate_input_struct( &self, type_base: &str, body: &LexXrpcBody<'static>, ) -> Result { - let struct_name = format!("{}Input", type_base); - let ident = syn::Ident::new(&struct_name, proc_macro2::Span::call_site()); + let ident = syn::Ident::new(type_base, proc_macro2::Span::call_site()); let fields = if let Some(schema) = &body.schema { - self.generate_body_fields("", &struct_name, schema)? + self.generate_body_fields("", type_base, schema)? } else { quote! {} }; @@ -1181,7 +1319,7 @@ impl<'c> CodeGenerator<'c> { for (field_name, field_type) in &obj.properties { if let LexObjectProperty::Union(union) = field_type { let union_name = - format!("{}Record{}", struct_name, field_name.to_pascal_case()); + format!("{}Record{}", type_base, field_name.to_pascal_case()); let refs: Vec<_> = union.refs.iter().cloned().collect(); let union_def = self.generate_union(&union_name, &refs, None, union.closed)?; unions.push(union_def); @@ -1581,6 +1719,72 @@ impl<'c> CodeGenerator<'c> { }) } + /// Generate XrpcRequest trait impl for a query or procedure + fn generate_xrpc_request_impl( + &self, + nsid: &str, + type_base: &str, + method: TokenStream, + output_encoding: &str, + has_params: bool, + params_has_lifetime: bool, + has_output: bool, + has_errors: bool, + ) -> Result { + let output_type = if has_output { + let output_ident = syn::Ident::new(&format!("{}Output", type_base), proc_macro2::Span::call_site()); + quote! { #output_ident<'de> } + } else { + quote! { () } + }; + + let error_type = if has_errors { + let error_ident = syn::Ident::new(&format!("{}Error", type_base), proc_macro2::Span::call_site()); + quote! { #error_ident<'de> } + } else { + quote! { jacquard_common::types::xrpc::GenericError } + }; + + if has_params { + // Implement on the params/input struct itself + let request_ident = syn::Ident::new(type_base, proc_macro2::Span::call_site()); + let impl_target = if params_has_lifetime { + quote! { #request_ident<'_> } + } else { + quote! { #request_ident } + }; + + Ok(quote! { + impl jacquard_common::types::xrpc::XrpcRequest for #impl_target { + const NSID: &'static str = #nsid; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = #method; + const OUTPUT_ENCODING: &'static str = #output_encoding; + + type Output<'de> = #output_type; + type Err<'de> = #error_type; + } + }) + } else { + // No params - generate a marker struct + let request_ident = syn::Ident::new(type_base, proc_macro2::Span::call_site()); + + Ok(quote! { + /// XRPC request marker type + #[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] + pub struct #request_ident; + + impl jacquard_common::types::xrpc::XrpcRequest for #request_ident { + const NSID: &'static str = #nsid; + const METHOD: jacquard_common::types::xrpc::XrpcMethod = #method; + const OUTPUT_ENCODING: &'static str = #output_encoding; + + type Output<'de> = #output_type; + type Err<'de> = #error_type; + } + }) + } + } + /// Generate a union enum pub fn generate_union( &self, diff --git a/crates/jacquard/Cargo.toml b/crates/jacquard/Cargo.toml index 34ba518..bab6edb 100644 --- a/crates/jacquard/Cargo.toml +++ b/crates/jacquard/Cargo.toml @@ -10,4 +10,6 @@ edition.workspace = true [dependencies] clap = { workspace = true } +jacquard-api = { version = "0.1.0", path = "../jacquard-api" } jacquard-common = { path = "../jacquard-common" } +reqwest = { version = "0.12.23", default-features = false, features = ["charset", "http2", "json", "system-proxy", "gzip", "rustls-tls"] } diff --git a/crates/jacquard/src/main.rs b/crates/jacquard/src/main.rs index be12177..dbfd332 100644 --- a/crates/jacquard/src/main.rs +++ b/crates/jacquard/src/main.rs @@ -1,4 +1,5 @@ use clap::Parser; +use jacquard_api::com_atproto::repo::create_record::*; #[derive(Parser, Debug)] #[command(author = "Orual", version, about)] @@ -14,12 +15,5 @@ struct Args { } fn main() { - let args = Args::parse(); - if args.verbose { - println!("DEBUG {args:?}"); - } - println!( - "Hello {} (from jacquard)!", - args.name.unwrap_or("world".to_string()) - ); + let client = reqwest::Client::new(); } diff --git a/flake.lock b/flake.lock index ef9f2e5..95548c3 100644 --- a/flake.lock +++ b/flake.lock @@ -1,27 +1,12 @@ { "nodes": { - "cargo-doc-live": { - "locked": { - "lastModified": 1724704668, - "narHash": "sha256-kJFYXlWUodg5WhJ0NuvrP0mCvOT/2AOIo8oGeYLXocs=", - "owner": "srid", - "repo": "cargo-doc-live", - "rev": "b09d5d258d2498829e03014931fc19aed499b86f", - "type": "github" - }, - "original": { - "owner": "srid", - "repo": "cargo-doc-live", - "type": "github" - } - }, "crane": { "locked": { - "lastModified": 1757183466, - "narHash": "sha256-kTdCCMuRE+/HNHES5JYsbRHmgtr+l9mOtf5dpcMppVc=", + "lastModified": 1758758545, + "narHash": "sha256-NU5WaEdfwF6i8faJ2Yh+jcK9vVFrofLcwlD/mP65JrI=", "owner": "ipetkov", "repo": "crane", - "rev": "d599ae4847e7f87603e7082d73ca673aa93c916d", + "rev": "95d528a5f54eaba0d12102249ce42f4d01f4e364", "type": "github" }, "original": { @@ -37,11 +22,11 @@ ] }, "locked": { - "lastModified": 1756770412, - "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", + "lastModified": 1759362264, + "narHash": "sha256-wfG0S7pltlYyZTM+qqlhJ7GMw2fTF4mLKCIVhLii/4M=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "4524271976b625a4a605beefd893f270620fd751", + "rev": "758cf7296bee11f1706a574c77d072b8a7baa881", "type": "github" }, "original": { @@ -68,11 +53,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1758763312, - "narHash": "sha256-puBMviZhYlqOdUUgEmMVJpXqC/ToEqSvkyZ30qQ09xM=", + "lastModified": 1759417375, + "narHash": "sha256-O7eHcgkQXJNygY6AypkF9tFhsoDQjpNEojw3eFs73Ow=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e57b3b16ad8758fd681511a078f35c416a8cc939", + "rev": "dc704e6102e76aad573f63b74c742cd96f8f1e6c", "type": "github" }, "original": { @@ -82,28 +67,11 @@ "type": "github" } }, - "process-compose-flake": { - "locked": { - "lastModified": 1758658658, - "narHash": "sha256-y5GSCqlGe/uZzlocCPZcjc7Gj+mTq7m0P6xPGx88+No=", - "owner": "Platonic-Systems", - "repo": "process-compose-flake", - "rev": "e968a94633788f5d9595d727f41c2baf0714be7b", - "type": "github" - }, - "original": { - "owner": "Platonic-Systems", - "repo": "process-compose-flake", - "type": "github" - } - }, "root": { "inputs": { - "cargo-doc-live": "cargo-doc-live", "flake-parts": "flake-parts", "git-hooks": "git-hooks", "nixpkgs": "nixpkgs", - "process-compose-flake": "process-compose-flake", "rust-flake": "rust-flake", "systems": "systems" } @@ -117,11 +85,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1757862855, - "narHash": "sha256-XPqlAQkx8rvG89nw+SbU6TiGVYPWdYIklPljdAyjp7w=", + "lastModified": 1759028837, + "narHash": "sha256-kUVZJqzYpQ5+OauDv/e2vMDognmhPWeqCI3uIbhi1OA=", "owner": "juspay", "repo": "rust-flake", - "rev": "fa28d6e30b5d13014f24354dc49e717733fbb995", + "rev": "79e7c8ef50cf83fe60d5d4f673351c14778048fa", "type": "github" }, "original": { @@ -138,11 +106,11 @@ ] }, "locked": { - "lastModified": 1757730403, - "narHash": "sha256-Jxl4OZRVsXs8JxEHUVQn3oPu6zcqFyGGKaFrlNgbzp0=", + "lastModified": 1758940228, + "narHash": "sha256-sTS04L9LKqzP1oiVXYDwcMzfFSF0DnSJQFzZBpEgLFE=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "3232f7f8bd07849fc6f4ae77fe695e0abb2eba2c", + "rev": "5bfedf3fbbf5caf8e39f7fcd62238f54d82aa1e2", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 0d690df..e49657b 100644 --- a/flake.nix +++ b/flake.nix @@ -6,21 +6,21 @@ systems.url = "github:nix-systems/default"; rust-flake.url = "github:juspay/rust-flake"; rust-flake.inputs.nixpkgs.follows = "nixpkgs"; - process-compose-flake.url = "github:Platonic-Systems/process-compose-flake"; - cargo-doc-live.url = "github:srid/cargo-doc-live"; + #process-compose-flake.url = "github:Platonic-Systems/process-compose-flake"; + #cargo-doc-live.url = "github:srid/cargo-doc-live"; git-hooks.url = "github:cachix/git-hooks.nix"; git-hooks.flake = false; }; outputs = inputs: - inputs.flake-parts.lib.mkFlake { inherit inputs; } { + inputs.flake-parts.lib.mkFlake {inherit inputs;} { systems = import inputs.systems; # See ./nix/modules/*.nix for the modules that are imported here. imports = with builtins; map - (fn: ./nix/modules/${fn}) - (attrNames (readDir ./nix/modules)); + (fn: ./nix/modules/${fn}) + (attrNames (readDir ./nix/modules)); }; } diff --git a/nix/modules/devshell.nix b/nix/modules/devshell.nix index 2516a7b..eb7d069 100644 --- a/nix/modules/devshell.nix +++ b/nix/modules/devshell.nix @@ -1,23 +1,23 @@ -{ inputs, ... }: { - perSystem = - { config - , self' - , pkgs - , lib - , ... - }: { - devShells.default = pkgs.mkShell { - name = "jacquard-shell"; - inputsFrom = [ - self'.devShells.rust - config.pre-commit.devShell # See ./nix/modules/pre-commit.nix - ]; - packages = with pkgs; [ - just - nixd # Nix language server - bacon - rust-analyzer - ]; - }; +{inputs, ...}: { + perSystem = { + config, + self', + pkgs, + lib, + ... + }: { + devShells.default = pkgs.mkShell { + name = "jacquard-shell"; + inputsFrom = [ + self'.devShells.rust + config.pre-commit.devShell # See ./nix/modules/pre-commit.nix + ]; + packages = with pkgs; [ + just + nixd # Nix language server + bacon + rust-analyzer + ]; }; + }; } diff --git a/nix/modules/rust.nix b/nix/modules/rust.nix index 3a532e1..854357e 100644 --- a/nix/modules/rust.nix +++ b/nix/modules/rust.nix @@ -1,66 +1,98 @@ -{ inputs, ... }: { +{inputs, ...}: { imports = [ inputs.rust-flake.flakeModules.default inputs.rust-flake.flakeModules.nixpkgs # inputs.process-compose-flake.flakeModule # inputs.cargo-doc-live.flakeModule ]; - perSystem = - { config - , self' - , pkgs - , lib - , ... - }: - let - inherit (pkgs.stdenv) isDarwin; - inherit (pkgs.darwin) apple_sdk; + perSystem = { + config, + self', + pkgs, + lib, + ... + }: let + inherit (pkgs.stdenv) isDarwin; + inherit (pkgs.darwin) apple_sdk; - # Common configuration for all crates - globalCrateConfig = { - crane.clippy.enable = false; - }; + # Common configuration for all crates + globalCrateConfig = { + crane.clippy.enable = false; + }; - # Common build inputs for all crates - commonBuildInputs = lib.optionals isDarwin ( + # Common build inputs for all crates + commonBuildInputs = with pkgs; + [ + ] + ++ lib.optionals + isDarwin ( with apple_sdk.frameworks; [ IOKit Security SystemConfiguration ] ); - in - { - rust-project = { - # Source filtering to avoid unnecessary rebuilds - src = lib.cleanSourceWith { - src = inputs.self; - filter = config.rust-project.crane-lib.filterCargoSources; - }; - crates = { - "jacquard" = { - imports = [ globalCrateConfig ]; - autoWire = [ "crate" "clippy" ]; - path = ./../../crates/jacquard; - crane = { - args = { - buildInputs = commonBuildInputs; - }; + in { + rust-project = { + # Source filtering to avoid unnecessary rebuilds + src = lib.cleanSourceWith { + src = inputs.self; + filter = config.rust-project.crane-lib.filterCargoSources; + }; + crates = { + "jacquard" = { + imports = [globalCrateConfig]; + autoWire = ["crate" "clippy"]; + path = ./../../crates/jacquard; + crane = { + args = { + buildInputs = commonBuildInputs; }; }; + }; - "jacquard-common" = { - imports = [ globalCrateConfig ]; - autoWire = [ "crate" "clippy" ]; - path = ./../../crates/jacquard-common; - crane = { - args = { - buildInputs = commonBuildInputs; - }; + "jacquard-common" = { + imports = [globalCrateConfig]; + autoWire = ["crate" "clippy"]; + path = ./../../crates/jacquard-common; + crane = { + args = { + buildInputs = commonBuildInputs; + }; + }; + }; + "jacquard-derive" = { + imports = [globalCrateConfig]; + autoWire = ["crate" "clippy"]; + path = ./../../crates/jacquard-derive; + crane = { + args = { + buildInputs = commonBuildInputs; + }; + }; + }; + "jacquard-lexicon" = { + imports = [globalCrateConfig]; + autoWire = ["crate" "clippy"]; + path = ./../../crates/jacquard-lexicon; + crane = { + args = { + buildInputs = commonBuildInputs; + }; + }; + }; + "jacquard-api" = { + imports = [globalCrateConfig]; + autoWire = ["crate" "clippy"]; + path = ./../../crates/jacquard-api; + crane = { + args = { + buildInputs = commonBuildInputs; }; }; }; }; - packages.default = self'.packages.jacquard; }; + packages.default = self'.packages.jacquard; + }; } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 292fe49..08f05f9 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,3 @@ [toolchain] channel = "stable" +profile = "complete"