1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: sh.tangled.repo.forkStatus
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8#[jacquard_derive::lexicon]
9#[derive(
10 serde::Serialize,
11 serde::Deserialize,
12 Debug,
13 Clone,
14 PartialEq,
15 Eq,
16 bon::Builder,
17 jacquard_derive::IntoStatic
18)]
19#[serde(rename_all = "camelCase")]
20#[builder(start_fn = new)]
21pub struct ForkStatus<'a> {
22 ///Branch to check status for
23 #[serde(borrow)]
24 #[builder(into)]
25 pub branch: jacquard_common::CowStr<'a>,
26 ///DID of the fork owner
27 #[serde(borrow)]
28 pub did: jacquard_common::types::string::Did<'a>,
29 ///Hidden ref to use for comparison
30 #[serde(borrow)]
31 #[builder(into)]
32 pub hidden_ref: jacquard_common::CowStr<'a>,
33 ///Name of the forked repository
34 #[serde(borrow)]
35 #[builder(into)]
36 pub name: jacquard_common::CowStr<'a>,
37 ///Source repository URL
38 #[serde(borrow)]
39 #[builder(into)]
40 pub source: jacquard_common::CowStr<'a>,
41 #[serde(flatten)]
42 #[serde(borrow)]
43 #[builder(default)]
44 pub extra_data: ::std::collections::BTreeMap<
45 ::jacquard_common::smol_str::SmolStr,
46 ::jacquard_common::types::value::Data<'a>,
47 >,
48}
49
50#[jacquard_derive::lexicon]
51#[derive(
52 serde::Serialize,
53 serde::Deserialize,
54 Debug,
55 Clone,
56 PartialEq,
57 Eq,
58 jacquard_derive::IntoStatic
59)]
60#[serde(rename_all = "camelCase")]
61pub struct ForkStatusOutput<'a> {
62 ///Fork status: 0=UpToDate, 1=FastForwardable, 2=Conflict, 3=MissingBranch
63 pub status: i64,
64}
65
66///Response type for
67///sh.tangled.repo.forkStatus
68pub struct ForkStatusResponse;
69impl jacquard_common::xrpc::XrpcResp for ForkStatusResponse {
70 const NSID: &'static str = "sh.tangled.repo.forkStatus";
71 const ENCODING: &'static str = "application/json";
72 type Output<'de> = ForkStatusOutput<'de>;
73 type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
74}
75
76impl<'a> jacquard_common::xrpc::XrpcRequest for ForkStatus<'a> {
77 const NSID: &'static str = "sh.tangled.repo.forkStatus";
78 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
79 "application/json",
80 );
81 type Response = ForkStatusResponse;
82}
83
84///Endpoint type for
85///sh.tangled.repo.forkStatus
86pub struct ForkStatusRequest;
87impl jacquard_common::xrpc::XrpcEndpoint for ForkStatusRequest {
88 const PATH: &'static str = "/xrpc/sh.tangled.repo.forkStatus";
89 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
90 "application/json",
91 );
92 type Request<'de> = ForkStatus<'de>;
93 type Response = ForkStatusResponse;
94}