1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: app.bsky.graph.getBlocks
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8#[derive(
9 serde::Serialize,
10 serde::Deserialize,
11 Debug,
12 Clone,
13 PartialEq,
14 Eq,
15 bon::Builder,
16 jacquard_derive::IntoStatic
17)]
18#[builder(start_fn = new)]
19#[serde(rename_all = "camelCase")]
20pub struct GetBlocks<'a> {
21 #[serde(skip_serializing_if = "std::option::Option::is_none")]
22 #[serde(borrow)]
23 #[builder(into)]
24 pub cursor: std::option::Option<jacquard_common::CowStr<'a>>,
25 ///(default: 50, min: 1, max: 100)
26 #[serde(skip_serializing_if = "std::option::Option::is_none")]
27 pub limit: std::option::Option<i64>,
28}
29
30#[jacquard_derive::lexicon]
31#[derive(
32 serde::Serialize,
33 serde::Deserialize,
34 Debug,
35 Clone,
36 PartialEq,
37 Eq,
38 jacquard_derive::IntoStatic
39)]
40#[serde(rename_all = "camelCase")]
41pub struct GetBlocksOutput<'a> {
42 #[serde(borrow)]
43 pub blocks: Vec<crate::app_bsky::actor::ProfileView<'a>>,
44 #[serde(skip_serializing_if = "std::option::Option::is_none")]
45 #[serde(borrow)]
46 pub cursor: std::option::Option<jacquard_common::CowStr<'a>>,
47}
48
49///Response type for
50///app.bsky.graph.getBlocks
51pub struct GetBlocksResponse;
52impl jacquard_common::xrpc::XrpcResp for GetBlocksResponse {
53 const NSID: &'static str = "app.bsky.graph.getBlocks";
54 const ENCODING: &'static str = "application/json";
55 type Output<'de> = GetBlocksOutput<'de>;
56 type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
57}
58
59impl<'a> jacquard_common::xrpc::XrpcRequest for GetBlocks<'a> {
60 const NSID: &'static str = "app.bsky.graph.getBlocks";
61 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
62 type Response = GetBlocksResponse;
63}
64
65///Endpoint type for
66///app.bsky.graph.getBlocks
67pub struct GetBlocksRequest;
68impl jacquard_common::xrpc::XrpcEndpoint for GetBlocksRequest {
69 const PATH: &'static str = "/xrpc/app.bsky.graph.getBlocks";
70 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
71 type Request<'de> = GetBlocks<'de>;
72 type Response = GetBlocksResponse;
73}