1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: app.rocksky.feed.search
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 Search<'a> {
21 #[serde(borrow)]
22 #[builder(into)]
23 pub query: jacquard_common::CowStr<'a>,
24}
25
26#[jacquard_derive::lexicon]
27#[derive(
28 serde::Serialize,
29 serde::Deserialize,
30 Debug,
31 Clone,
32 PartialEq,
33 Eq,
34 jacquard_derive::IntoStatic
35)]
36#[serde(rename_all = "camelCase")]
37pub struct SearchOutput<'a> {
38 #[serde(flatten)]
39 #[serde(borrow)]
40 pub value: crate::app_rocksky::feed::SearchResultsView<'a>,
41}
42
43///Response type for
44///app.rocksky.feed.search
45pub struct SearchResponse;
46impl jacquard_common::xrpc::XrpcResp for SearchResponse {
47 const NSID: &'static str = "app.rocksky.feed.search";
48 const ENCODING: &'static str = "application/json";
49 type Output<'de> = SearchOutput<'de>;
50 type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
51}
52
53impl<'a> jacquard_common::xrpc::XrpcRequest for Search<'a> {
54 const NSID: &'static str = "app.rocksky.feed.search";
55 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
56 type Response = SearchResponse;
57}
58
59///Endpoint type for
60///app.rocksky.feed.search
61pub struct SearchRequest;
62impl jacquard_common::xrpc::XrpcEndpoint for SearchRequest {
63 const PATH: &'static str = "/xrpc/app.rocksky.feed.search";
64 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
65 type Request<'de> = Search<'de>;
66 type Response = SearchResponse;
67}