// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: ooo.bsky.authfetch.describeRepo
//
// This file was automatically generated from Lexicon schemas.
// Any manual changes will be overwritten on the next regeneration.

#[allow(unused_imports)]
use alloc::collections::BTreeMap;

#[allow(unused_imports)]
use core::marker::PhantomData;
use jacquard_common::types::string::{Did, Nsid};
use jacquard_derive::{IntoStatic, lexicon};
use serde::{Serialize, Deserialize};

#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct DescribeRepoOutput<'a> {
    ///The list of collection NSIDs in the hidden repository.
    #[serde(borrow)]
    pub collections: Vec<Nsid<'a>>,
    ///The DID of the repository owner.
    #[serde(borrow)]
    pub did: Did<'a>,
}

/// XRPC request marker type.

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Copy)]
pub struct DescribeRepo;
/// Response type for ooo.bsky.authfetch.describeRepo
pub struct DescribeRepoResponse;
impl jacquard_common::xrpc::XrpcResp for DescribeRepoResponse {
    const NSID: &'static str = "ooo.bsky.authfetch.describeRepo";
    const ENCODING: &'static str = "application/json";
    type Output<'de> = DescribeRepoOutput<'de>;
    type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
}

impl jacquard_common::xrpc::XrpcRequest for DescribeRepo {
    const NSID: &'static str = "ooo.bsky.authfetch.describeRepo";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
    type Response = DescribeRepoResponse;
}

/// Endpoint type for ooo.bsky.authfetch.describeRepo
pub struct DescribeRepoRequest;
impl jacquard_common::xrpc::XrpcEndpoint for DescribeRepoRequest {
    const PATH: &'static str = "/xrpc/ooo.bsky.authfetch.describeRepo";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
    type Request<'de> = DescribeRepo;
    type Response = DescribeRepoResponse;
}