1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: tools.ozone.verification.grantVerifications
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8///Error object for failed verifications.
9#[jacquard_derive::lexicon]
10#[derive(
11 serde::Serialize,
12 serde::Deserialize,
13 Debug,
14 Clone,
15 PartialEq,
16 Eq,
17 jacquard_derive::IntoStatic
18)]
19#[serde(rename_all = "camelCase")]
20pub struct GrantError<'a> {
21 ///Error message describing the reason for failure.
22 #[serde(borrow)]
23 pub error: jacquard_common::CowStr<'a>,
24 ///The did of the subject being verified
25 #[serde(borrow)]
26 pub subject: jacquard_common::types::string::Did<'a>,
27}
28
29#[jacquard_derive::lexicon]
30#[derive(
31 serde::Serialize,
32 serde::Deserialize,
33 Debug,
34 Clone,
35 PartialEq,
36 Eq,
37 bon::Builder,
38 jacquard_derive::IntoStatic
39)]
40#[serde(rename_all = "camelCase")]
41#[builder(start_fn = new)]
42pub struct GrantVerifications<'a> {
43 ///Array of verification requests to process
44 #[serde(borrow)]
45 pub verifications: Vec<jacquard_common::types::value::Data<'a>>,
46 #[serde(flatten)]
47 #[serde(borrow)]
48 #[builder(default)]
49 pub extra_data: ::std::collections::BTreeMap<
50 ::jacquard_common::smol_str::SmolStr,
51 ::jacquard_common::types::value::Data<'a>,
52 >,
53}
54
55#[jacquard_derive::lexicon]
56#[derive(
57 serde::Serialize,
58 serde::Deserialize,
59 Debug,
60 Clone,
61 PartialEq,
62 Eq,
63 jacquard_derive::IntoStatic
64)]
65#[serde(rename_all = "camelCase")]
66pub struct GrantVerificationsOutput<'a> {
67 #[serde(borrow)]
68 pub failed_verifications: Vec<jacquard_common::types::value::Data<'a>>,
69 #[serde(borrow)]
70 pub verifications: Vec<crate::tools_ozone::verification::VerificationView<'a>>,
71}
72
73///Response type for
74///tools.ozone.verification.grantVerifications
75pub struct GrantVerificationsResponse;
76impl jacquard_common::xrpc::XrpcResp for GrantVerificationsResponse {
77 const NSID: &'static str = "tools.ozone.verification.grantVerifications";
78 const ENCODING: &'static str = "application/json";
79 type Output<'de> = GrantVerificationsOutput<'de>;
80 type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
81}
82
83impl<'de> jacquard_common::xrpc::XrpcRequest<'de> for GrantVerifications<'de> {
84 const NSID: &'static str = "tools.ozone.verification.grantVerifications";
85 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
86 "application/json",
87 );
88 type Response = GrantVerificationsResponse;
89}
90
91///Endpoint type for
92///tools.ozone.verification.grantVerifications
93pub struct GrantVerificationsRequest;
94impl jacquard_common::xrpc::XrpcEndpoint for GrantVerificationsRequest {
95 const PATH: &'static str = "/xrpc/tools.ozone.verification.grantVerifications";
96 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
97 "application/json",
98 );
99 type Request<'de> = GrantVerifications<'de>;
100 type Response = GrantVerificationsResponse;
101}
102
103#[jacquard_derive::lexicon]
104#[derive(
105 serde::Serialize,
106 serde::Deserialize,
107 Debug,
108 Clone,
109 PartialEq,
110 Eq,
111 jacquard_derive::IntoStatic
112)]
113#[serde(rename_all = "camelCase")]
114pub struct VerificationInput<'a> {
115 ///Timestamp for verification record. Defaults to current time when not specified.
116 #[serde(skip_serializing_if = "std::option::Option::is_none")]
117 pub created_at: std::option::Option<jacquard_common::types::string::Datetime>,
118 ///Display name of the subject the verification applies to at the moment of verifying.
119 #[serde(borrow)]
120 pub display_name: jacquard_common::CowStr<'a>,
121 ///Handle of the subject the verification applies to at the moment of verifying.
122 #[serde(borrow)]
123 pub handle: jacquard_common::types::string::Handle<'a>,
124 ///The did of the subject being verified
125 #[serde(borrow)]
126 pub subject: jacquard_common::types::string::Did<'a>,
127}