#[allow(unused_imports)]
use core::marker::PhantomData;
use jacquard_common::deps::bytes::Bytes;
use jacquard_derive::IntoStatic;
use serde::{Serialize, Deserialize};
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct ExportRepoOutput {
pub body: Bytes,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Copy)]
pub struct ExportRepo;
pub struct ExportRepoResponse;
impl jacquard_common::xrpc::XrpcResp for ExportRepoResponse {
const NSID: &'static str = "ooo.bsky.authfetch.exportRepo";
const ENCODING: &'static str = "application/vnd.ipld.car";
type Output<'de> = ExportRepoOutput;
type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
fn encode_output(
output: &Self::Output<'_>,
) -> Result<Vec<u8>, jacquard_common::xrpc::EncodeError> {
Ok(output.body.to_vec())
}
fn decode_output<'de>(
body: &'de [u8],
) -> Result<Self::Output<'de>, jacquard_common::error::DecodeError>
where
Self::Output<'de>: serde::Deserialize<'de>,
{
Ok(ExportRepoOutput {
body: jacquard_common::deps::bytes::Bytes::copy_from_slice(body),
})
}
}
impl jacquard_common::xrpc::XrpcRequest for ExportRepo {
const NSID: &'static str = "ooo.bsky.authfetch.exportRepo";
const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
type Response = ExportRepoResponse;
}
pub struct ExportRepoRequest;
impl jacquard_common::xrpc::XrpcEndpoint for ExportRepoRequest {
const PATH: &'static str = "/xrpc/ooo.bsky.authfetch.exportRepo";
const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
type Request<'de> = ExportRepo;
type Response = ExportRepoResponse;
}