···1+// @generated by jacquard-lexicon. DO NOT EDIT.
2+//
3+// This file was automatically generated from Lexicon schemas.
4+// Any manual changes will be overwritten on the next regeneration.
5+6+pub mod facet;
···1+// @generated by jacquard-lexicon. DO NOT EDIT.
2+//
3+// Lexicon: com.5jiji.test.listVideos
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, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
10+)]
11+#[serde(rename_all = "camelCase")]
12+pub struct ListVideos;
13+/// The list of videos
14+#[derive(
15+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
16+)]
17+#[serde(rename_all = "camelCase")]
18+pub struct ListVideosOutput {
19+ pub body: bytes::Bytes,
20+}
21+22+/// Response type for
23+///com.5jiji.test.listVideos
24+pub struct ListVideosResponse;
25+impl jacquard_common::xrpc::XrpcResp for ListVideosResponse {
26+ const NSID: &'static str = "com.5jiji.test.listVideos";
27+ const ENCODING: &'static str = "application/json";
28+ type Output<'de> = ListVideosOutput;
29+ type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
30+}
31+32+impl jacquard_common::xrpc::XrpcRequest for ListVideos {
33+ const NSID: &'static str = "com.5jiji.test.listVideos";
34+ const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
35+ type Response = ListVideosResponse;
36+}
37+38+/// Endpoint type for
39+///com.5jiji.test.listVideos
40+pub struct ListVideosRequest;
41+impl jacquard_common::xrpc::XrpcEndpoint for ListVideosRequest {
42+ const PATH: &'static str = "/xrpc/com.5jiji.test.listVideos";
43+ const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
44+ type Request<'de> = ListVideos;
45+ type Response = ListVideosResponse;
46+}
+6
crates/jacquard-api/src/com_yuna0x0.rs
···000000
···1+// @generated by jacquard-lexicon. DO NOT EDIT.
2+//
3+// This file was automatically generated from Lexicon schemas.
4+// Any manual changes will be overwritten on the next regeneration.
5+6+pub mod guestbook;
+6
crates/jacquard-api/src/com_yuna0x0/guestbook.rs
···000000
···1+// @generated by jacquard-lexicon. DO NOT EDIT.
2+//
3+// This file was automatically generated from Lexicon schemas.
4+// Any manual changes will be overwritten on the next regeneration.
5+6+pub mod sign;
···1+// @generated by jacquard-lexicon. DO NOT EDIT.
2+//
3+// Lexicon: com.yuna0x0.guestbook.sign
4+//
5+// This file was automatically generated from Lexicon schemas.
6+// Any manual changes will be overwritten on the next regeneration.
7+8+/// a sign in the guestbook
9+#[jacquard_derive::lexicon]
10+#[derive(
11+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
12+)]
13+#[serde(rename_all = "camelCase")]
14+pub struct Sign<'a> {
15+ pub created_at: jacquard_common::types::string::Datetime,
16+ #[serde(borrow)]
17+ pub message: jacquard_common::CowStr<'a>,
18+ #[serde(borrow)]
19+ pub subject: jacquard_common::types::ident::AtIdentifier<'a>,
20+}
21+22+pub mod sign_state {
23+24+ pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
25+ #[allow(unused)]
26+ use ::core::marker::PhantomData;
27+ mod sealed {
28+ pub trait Sealed {}
29+ }
30+ /// State trait tracking which required fields have been set
31+ pub trait State: sealed::Sealed {
32+ type CreatedAt;
33+ type Subject;
34+ type Message;
35+ }
36+ /// Empty state - all required fields are unset
37+ pub struct Empty(());
38+ impl sealed::Sealed for Empty {}
39+ impl State for Empty {
40+ type CreatedAt = Unset;
41+ type Subject = Unset;
42+ type Message = Unset;
43+ }
44+ ///State transition - sets the `created_at` field to Set
45+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
46+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
47+ impl<S: State> State for SetCreatedAt<S> {
48+ type CreatedAt = Set<members::created_at>;
49+ type Subject = S::Subject;
50+ type Message = S::Message;
51+ }
52+ ///State transition - sets the `subject` field to Set
53+ pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
54+ impl<S: State> sealed::Sealed for SetSubject<S> {}
55+ impl<S: State> State for SetSubject<S> {
56+ type CreatedAt = S::CreatedAt;
57+ type Subject = Set<members::subject>;
58+ type Message = S::Message;
59+ }
60+ ///State transition - sets the `message` field to Set
61+ pub struct SetMessage<S: State = Empty>(PhantomData<fn() -> S>);
62+ impl<S: State> sealed::Sealed for SetMessage<S> {}
63+ impl<S: State> State for SetMessage<S> {
64+ type CreatedAt = S::CreatedAt;
65+ type Subject = S::Subject;
66+ type Message = Set<members::message>;
67+ }
68+ /// Marker types for field names
69+ #[allow(non_camel_case_types)]
70+ pub mod members {
71+ ///Marker type for the `created_at` field
72+ pub struct created_at(());
73+ ///Marker type for the `subject` field
74+ pub struct subject(());
75+ ///Marker type for the `message` field
76+ pub struct message(());
77+ }
78+}
79+80+/// Builder for constructing an instance of this type
81+pub struct SignBuilder<'a, S: sign_state::State> {
82+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
83+ __unsafe_private_named: (
84+ ::core::option::Option<jacquard_common::types::string::Datetime>,
85+ ::core::option::Option<jacquard_common::CowStr<'a>>,
86+ ::core::option::Option<jacquard_common::types::ident::AtIdentifier<'a>>,
87+ ),
88+ _phantom: ::core::marker::PhantomData<&'a ()>,
89+}
90+91+impl<'a> Sign<'a> {
92+ /// Create a new builder for this type
93+ pub fn new() -> SignBuilder<'a, sign_state::Empty> {
94+ SignBuilder::new()
95+ }
96+}
97+98+impl<'a> SignBuilder<'a, sign_state::Empty> {
99+ /// Create a new builder with all fields unset
100+ pub fn new() -> Self {
101+ SignBuilder {
102+ _phantom_state: ::core::marker::PhantomData,
103+ __unsafe_private_named: (None, None, None),
104+ _phantom: ::core::marker::PhantomData,
105+ }
106+ }
107+}
108+109+impl<'a, S> SignBuilder<'a, S>
110+where
111+ S: sign_state::State,
112+ S::CreatedAt: sign_state::IsUnset,
113+{
114+ /// Set the `createdAt` field (required)
115+ pub fn created_at(
116+ mut self,
117+ value: impl Into<jacquard_common::types::string::Datetime>,
118+ ) -> SignBuilder<'a, sign_state::SetCreatedAt<S>> {
119+ self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
120+ SignBuilder {
121+ _phantom_state: ::core::marker::PhantomData,
122+ __unsafe_private_named: self.__unsafe_private_named,
123+ _phantom: ::core::marker::PhantomData,
124+ }
125+ }
126+}
127+128+impl<'a, S> SignBuilder<'a, S>
129+where
130+ S: sign_state::State,
131+ S::Message: sign_state::IsUnset,
132+{
133+ /// Set the `message` field (required)
134+ pub fn message(
135+ mut self,
136+ value: impl Into<jacquard_common::CowStr<'a>>,
137+ ) -> SignBuilder<'a, sign_state::SetMessage<S>> {
138+ self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
139+ SignBuilder {
140+ _phantom_state: ::core::marker::PhantomData,
141+ __unsafe_private_named: self.__unsafe_private_named,
142+ _phantom: ::core::marker::PhantomData,
143+ }
144+ }
145+}
146+147+impl<'a, S> SignBuilder<'a, S>
148+where
149+ S: sign_state::State,
150+ S::Subject: sign_state::IsUnset,
151+{
152+ /// Set the `subject` field (required)
153+ pub fn subject(
154+ mut self,
155+ value: impl Into<jacquard_common::types::ident::AtIdentifier<'a>>,
156+ ) -> SignBuilder<'a, sign_state::SetSubject<S>> {
157+ self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
158+ SignBuilder {
159+ _phantom_state: ::core::marker::PhantomData,
160+ __unsafe_private_named: self.__unsafe_private_named,
161+ _phantom: ::core::marker::PhantomData,
162+ }
163+ }
164+}
165+166+impl<'a, S> SignBuilder<'a, S>
167+where
168+ S: sign_state::State,
169+ S::CreatedAt: sign_state::IsSet,
170+ S::Subject: sign_state::IsSet,
171+ S::Message: sign_state::IsSet,
172+{
173+ /// Build the final struct
174+ pub fn build(self) -> Sign<'a> {
175+ Sign {
176+ created_at: self.__unsafe_private_named.0.unwrap(),
177+ message: self.__unsafe_private_named.1.unwrap(),
178+ subject: self.__unsafe_private_named.2.unwrap(),
179+ extra_data: Default::default(),
180+ }
181+ }
182+ /// Build the final struct with custom extra_data
183+ pub fn build_with_data(
184+ self,
185+ extra_data: std::collections::BTreeMap<
186+ jacquard_common::smol_str::SmolStr,
187+ jacquard_common::types::value::Data<'a>,
188+ >,
189+ ) -> Sign<'a> {
190+ Sign {
191+ created_at: self.__unsafe_private_named.0.unwrap(),
192+ message: self.__unsafe_private_named.1.unwrap(),
193+ subject: self.__unsafe_private_named.2.unwrap(),
194+ extra_data: Some(extra_data),
195+ }
196+ }
197+}
198+199+impl<'a> Sign<'a> {
200+ pub fn uri(
201+ uri: impl Into<jacquard_common::CowStr<'a>>,
202+ ) -> Result<
203+ jacquard_common::types::uri::RecordUri<'a, SignRecord>,
204+ jacquard_common::types::uri::UriError,
205+ > {
206+ jacquard_common::types::uri::RecordUri::try_from_uri(
207+ jacquard_common::types::string::AtUri::new_cow(uri.into())?,
208+ )
209+ }
210+}
211+212+/// Typed wrapper for GetRecord response with this collection's record type.
213+#[derive(
214+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
215+)]
216+#[serde(rename_all = "camelCase")]
217+pub struct SignGetRecordOutput<'a> {
218+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
219+ #[serde(borrow)]
220+ pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
221+ #[serde(borrow)]
222+ pub uri: jacquard_common::types::string::AtUri<'a>,
223+ #[serde(borrow)]
224+ pub value: Sign<'a>,
225+}
226+227+impl From<SignGetRecordOutput<'_>> for Sign<'_> {
228+ fn from(output: SignGetRecordOutput<'_>) -> Self {
229+ use jacquard_common::IntoStatic;
230+ output.value.into_static()
231+ }
232+}
233+234+impl jacquard_common::types::collection::Collection for Sign<'_> {
235+ const NSID: &'static str = "com.yuna0x0.guestbook.sign";
236+ type Record = SignRecord;
237+}
238+239+/// Marker type for deserializing records from this collection.
240+#[derive(Debug, serde::Serialize, serde::Deserialize)]
241+pub struct SignRecord;
242+impl jacquard_common::xrpc::XrpcResp for SignRecord {
243+ const NSID: &'static str = "com.yuna0x0.guestbook.sign";
244+ const ENCODING: &'static str = "application/json";
245+ type Output<'de> = SignGetRecordOutput<'de>;
246+ type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
247+}
248+249+impl jacquard_common::types::collection::Collection for SignRecord {
250+ const NSID: &'static str = "com.yuna0x0.guestbook.sign";
251+ type Record = SignRecord;
252+}
253+254+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Sign<'a> {
255+ fn nsid() -> &'static str {
256+ "com.yuna0x0.guestbook.sign"
257+ }
258+ fn def_name() -> &'static str {
259+ "main"
260+ }
261+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
262+ lexicon_doc_com_yuna0x0_guestbook_sign()
263+ }
264+ fn validate(
265+ &self,
266+ ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
267+ {
268+ let value = &self.message;
269+ #[allow(unused_comparisons)]
270+ if <str>::len(value.as_ref()) > 100usize {
271+ return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
272+ path: ::jacquard_lexicon::validation::ValidationPath::from_field("message"),
273+ max: 100usize,
274+ actual: <str>::len(value.as_ref()),
275+ });
276+ }
277+ }
278+ Ok(())
279+ }
280+}
281+282+fn lexicon_doc_com_yuna0x0_guestbook_sign() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
283+ ::jacquard_lexicon::lexicon::LexiconDoc {
284+ lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
285+ id: ::jacquard_common::CowStr::new_static("com.yuna0x0.guestbook.sign"),
286+ revision: None,
287+ description: None,
288+ defs: {
289+ let mut map = ::std::collections::BTreeMap::new();
290+ map.insert(
291+ ::jacquard_common::smol_str::SmolStr::new_static("main"),
292+ ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord {
293+ description: Some(
294+ ::jacquard_common::CowStr::new_static("a sign in the guestbook"),
295+ ),
296+ key: Some(::jacquard_common::CowStr::new_static("tid")),
297+ record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject {
298+ description: None,
299+ required: Some(
300+ vec![
301+ ::jacquard_common::smol_str::SmolStr::new_static("subject"),
302+ ::jacquard_common::smol_str::SmolStr::new_static("createdAt"),
303+ ::jacquard_common::smol_str::SmolStr::new_static("message")
304+ ],
305+ ),
306+ nullable: None,
307+ properties: {
308+ #[allow(unused_mut)]
309+ let mut map = ::std::collections::BTreeMap::new();
310+ map.insert(
311+ ::jacquard_common::smol_str::SmolStr::new_static(
312+ "createdAt",
313+ ),
314+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
315+ description: None,
316+ format: Some(
317+ ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
318+ ),
319+ default: None,
320+ min_length: None,
321+ max_length: None,
322+ min_graphemes: None,
323+ max_graphemes: None,
324+ r#enum: None,
325+ r#const: None,
326+ known_values: None,
327+ }),
328+ );
329+ map.insert(
330+ ::jacquard_common::smol_str::SmolStr::new_static("message"),
331+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
332+ description: None,
333+ format: None,
334+ default: None,
335+ min_length: None,
336+ max_length: Some(100usize),
337+ min_graphemes: None,
338+ max_graphemes: None,
339+ r#enum: None,
340+ r#const: None,
341+ known_values: None,
342+ }),
343+ );
344+ map.insert(
345+ ::jacquard_common::smol_str::SmolStr::new_static("subject"),
346+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
347+ description: None,
348+ format: Some(
349+ ::jacquard_lexicon::lexicon::LexStringFormat::AtIdentifier,
350+ ),
351+ default: None,
352+ min_length: None,
353+ max_length: None,
354+ min_graphemes: None,
355+ max_graphemes: None,
356+ r#enum: None,
357+ r#const: None,
358+ known_values: None,
359+ }),
360+ );
361+ map
362+ },
363+ }),
364+ }),
365+ );
366+ map
367+ },
368+ }
369+}
+6
crates/jacquard-api/src/fyi_questionable/actor.rs
···000000
···1+// @generated by jacquard-lexicon. DO NOT EDIT.
2+//
3+// This file was automatically generated from Lexicon schemas.
4+// Any manual changes will be overwritten on the next regeneration.
5+6+pub mod profile;
···1+// @generated by jacquard-lexicon. DO NOT EDIT.
2+//
3+// Lexicon: fyi.questionable.actor.profile
4+//
5+// This file was automatically generated from Lexicon schemas.
6+// Any manual changes will be overwritten on the next regeneration.
7+8+/// A declaration of a Questionable account profile.
9+#[jacquard_derive::lexicon]
10+#[derive(
11+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
12+)]
13+#[serde(rename_all = "camelCase")]
14+pub struct Profile<'a> {
15+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
16+ pub created_at: std::option::Option<jacquard_common::types::string::Datetime>,
17+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
18+ #[serde(borrow)]
19+ pub display_name: std::option::Option<jacquard_common::CowStr<'a>>,
20+}
21+22+pub mod profile_state {
23+24+ pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
25+ #[allow(unused)]
26+ use ::core::marker::PhantomData;
27+ mod sealed {
28+ pub trait Sealed {}
29+ }
30+ /// State trait tracking which required fields have been set
31+ pub trait State: sealed::Sealed {}
32+ /// Empty state - all required fields are unset
33+ pub struct Empty(());
34+ impl sealed::Sealed for Empty {}
35+ impl State for Empty {}
36+ /// Marker types for field names
37+ #[allow(non_camel_case_types)]
38+ pub mod members {}
39+}
40+41+/// Builder for constructing an instance of this type
42+pub struct ProfileBuilder<'a, S: profile_state::State> {
43+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
44+ __unsafe_private_named: (
45+ ::core::option::Option<jacquard_common::types::string::Datetime>,
46+ ::core::option::Option<jacquard_common::CowStr<'a>>,
47+ ),
48+ _phantom: ::core::marker::PhantomData<&'a ()>,
49+}
50+51+impl<'a> Profile<'a> {
52+ /// Create a new builder for this type
53+ pub fn new() -> ProfileBuilder<'a, profile_state::Empty> {
54+ ProfileBuilder::new()
55+ }
56+}
57+58+impl<'a> ProfileBuilder<'a, profile_state::Empty> {
59+ /// Create a new builder with all fields unset
60+ pub fn new() -> Self {
61+ ProfileBuilder {
62+ _phantom_state: ::core::marker::PhantomData,
63+ __unsafe_private_named: (None, None),
64+ _phantom: ::core::marker::PhantomData,
65+ }
66+ }
67+}
68+69+impl<'a, S: profile_state::State> ProfileBuilder<'a, S> {
70+ /// Set the `createdAt` field (optional)
71+ pub fn created_at(
72+ mut self,
73+ value: impl Into<Option<jacquard_common::types::string::Datetime>>,
74+ ) -> Self {
75+ self.__unsafe_private_named.0 = value.into();
76+ self
77+ }
78+ /// Set the `createdAt` field to an Option value (optional)
79+ pub fn maybe_created_at(
80+ mut self,
81+ value: Option<jacquard_common::types::string::Datetime>,
82+ ) -> Self {
83+ self.__unsafe_private_named.0 = value;
84+ self
85+ }
86+}
87+88+impl<'a, S: profile_state::State> ProfileBuilder<'a, S> {
89+ /// Set the `displayName` field (optional)
90+ pub fn display_name(mut self, value: impl Into<Option<jacquard_common::CowStr<'a>>>) -> Self {
91+ self.__unsafe_private_named.1 = value.into();
92+ self
93+ }
94+ /// Set the `displayName` field to an Option value (optional)
95+ pub fn maybe_display_name(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
96+ self.__unsafe_private_named.1 = value;
97+ self
98+ }
99+}
100+101+impl<'a, S> ProfileBuilder<'a, S>
102+where
103+ S: profile_state::State,
104+{
105+ /// Build the final struct
106+ pub fn build(self) -> Profile<'a> {
107+ Profile {
108+ created_at: self.__unsafe_private_named.0,
109+ display_name: self.__unsafe_private_named.1,
110+ extra_data: Default::default(),
111+ }
112+ }
113+ /// Build the final struct with custom extra_data
114+ pub fn build_with_data(
115+ self,
116+ extra_data: std::collections::BTreeMap<
117+ jacquard_common::smol_str::SmolStr,
118+ jacquard_common::types::value::Data<'a>,
119+ >,
120+ ) -> Profile<'a> {
121+ Profile {
122+ created_at: self.__unsafe_private_named.0,
123+ display_name: self.__unsafe_private_named.1,
124+ extra_data: Some(extra_data),
125+ }
126+ }
127+}
128+129+impl<'a> Profile<'a> {
130+ pub fn uri(
131+ uri: impl Into<jacquard_common::CowStr<'a>>,
132+ ) -> Result<
133+ jacquard_common::types::uri::RecordUri<'a, ProfileRecord>,
134+ jacquard_common::types::uri::UriError,
135+ > {
136+ jacquard_common::types::uri::RecordUri::try_from_uri(
137+ jacquard_common::types::string::AtUri::new_cow(uri.into())?,
138+ )
139+ }
140+}
141+142+/// Typed wrapper for GetRecord response with this collection's record type.
143+#[derive(
144+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
145+)]
146+#[serde(rename_all = "camelCase")]
147+pub struct ProfileGetRecordOutput<'a> {
148+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
149+ #[serde(borrow)]
150+ pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
151+ #[serde(borrow)]
152+ pub uri: jacquard_common::types::string::AtUri<'a>,
153+ #[serde(borrow)]
154+ pub value: Profile<'a>,
155+}
156+157+impl From<ProfileGetRecordOutput<'_>> for Profile<'_> {
158+ fn from(output: ProfileGetRecordOutput<'_>) -> Self {
159+ use jacquard_common::IntoStatic;
160+ output.value.into_static()
161+ }
162+}
163+164+impl jacquard_common::types::collection::Collection for Profile<'_> {
165+ const NSID: &'static str = "fyi.questionable.actor.profile";
166+ type Record = ProfileRecord;
167+}
168+169+/// Marker type for deserializing records from this collection.
170+#[derive(Debug, serde::Serialize, serde::Deserialize)]
171+pub struct ProfileRecord;
172+impl jacquard_common::xrpc::XrpcResp for ProfileRecord {
173+ const NSID: &'static str = "fyi.questionable.actor.profile";
174+ const ENCODING: &'static str = "application/json";
175+ type Output<'de> = ProfileGetRecordOutput<'de>;
176+ type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
177+}
178+179+impl jacquard_common::types::collection::Collection for ProfileRecord {
180+ const NSID: &'static str = "fyi.questionable.actor.profile";
181+ type Record = ProfileRecord;
182+}
183+184+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Profile<'a> {
185+ fn nsid() -> &'static str {
186+ "fyi.questionable.actor.profile"
187+ }
188+ fn def_name() -> &'static str {
189+ "main"
190+ }
191+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
192+ lexicon_doc_fyi_questionable_actor_profile()
193+ }
194+ fn validate(
195+ &self,
196+ ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
197+ if let Some(ref value) = self.display_name {
198+ #[allow(unused_comparisons)]
199+ if <str>::len(value.as_ref()) > 640usize {
200+ return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
201+ path: ::jacquard_lexicon::validation::ValidationPath::from_field(
202+ "display_name",
203+ ),
204+ max: 640usize,
205+ actual: <str>::len(value.as_ref()),
206+ });
207+ }
208+ }
209+ if let Some(ref value) = self.display_name {
210+ {
211+ let count =
212+ ::unicode_segmentation::UnicodeSegmentation::graphemes(value.as_ref(), true)
213+ .count();
214+ if count > 64usize {
215+ return Err(
216+ ::jacquard_lexicon::validation::ConstraintError::MaxGraphemes {
217+ path: ::jacquard_lexicon::validation::ValidationPath::from_field(
218+ "display_name",
219+ ),
220+ max: 64usize,
221+ actual: count,
222+ },
223+ );
224+ }
225+ }
226+ }
227+ Ok(())
228+ }
229+}
230+231+fn lexicon_doc_fyi_questionable_actor_profile() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static>
232+{
233+ ::jacquard_lexicon::lexicon::LexiconDoc {
234+ lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
235+ id: ::jacquard_common::CowStr::new_static("fyi.questionable.actor.profile"),
236+ revision: None,
237+ description: None,
238+ defs: {
239+ let mut map = ::std::collections::BTreeMap::new();
240+ map.insert(
241+ ::jacquard_common::smol_str::SmolStr::new_static("main"),
242+ ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord {
243+ description: Some(
244+ ::jacquard_common::CowStr::new_static(
245+ "A declaration of a Questionable account profile.",
246+ ),
247+ ),
248+ key: Some(::jacquard_common::CowStr::new_static("literal:self")),
249+ record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject {
250+ description: None,
251+ required: None,
252+ nullable: None,
253+ properties: {
254+ #[allow(unused_mut)]
255+ let mut map = ::std::collections::BTreeMap::new();
256+ map.insert(
257+ ::jacquard_common::smol_str::SmolStr::new_static(
258+ "createdAt",
259+ ),
260+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
261+ description: None,
262+ format: Some(
263+ ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
264+ ),
265+ default: None,
266+ min_length: None,
267+ max_length: None,
268+ min_graphemes: None,
269+ max_graphemes: None,
270+ r#enum: None,
271+ r#const: None,
272+ known_values: None,
273+ }),
274+ );
275+ map.insert(
276+ ::jacquard_common::smol_str::SmolStr::new_static(
277+ "displayName",
278+ ),
279+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
280+ description: None,
281+ format: None,
282+ default: None,
283+ min_length: None,
284+ max_length: Some(640usize),
285+ min_graphemes: None,
286+ max_graphemes: Some(64usize),
287+ r#enum: None,
288+ r#const: None,
289+ known_values: None,
290+ }),
291+ );
292+ map
293+ },
294+ }),
295+ }),
296+ );
297+ map
298+ },
299+ }
300+}
+6
crates/jacquard-api/src/games_firehose.rs
···000000
···1+// @generated by jacquard-lexicon. DO NOT EDIT.
2+//
3+// This file was automatically generated from Lexicon schemas.
4+// Any manual changes will be overwritten on the next regeneration.
5+6+pub mod barklesheep;
···1+// @generated by jacquard-lexicon. DO NOT EDIT.
2+//
3+// This file was automatically generated from Lexicon schemas.
4+// Any manual changes will be overwritten on the next regeneration.
5+6+pub mod place_sheeps;
7+pub mod reaction;
···1+// @generated by jacquard-lexicon. DO NOT EDIT.
2+//
3+// Lexicon: games.firehose.barklesheep.reaction
4+//
5+// This file was automatically generated from Lexicon schemas.
6+// Any manual changes will be overwritten on the next regeneration.
7+8+/// A reaction in a Barklesheep game
9+#[jacquard_derive::lexicon]
10+#[derive(
11+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
12+)]
13+#[serde(rename_all = "camelCase")]
14+pub struct Reaction<'a> {
15+ pub created_at: jacquard_common::types::string::Datetime,
16+ #[serde(borrow)]
17+ pub emoji: jacquard_common::CowStr<'a>,
18+ #[serde(borrow)]
19+ pub game_id: jacquard_common::CowStr<'a>,
20+}
21+22+pub mod reaction_state {
23+24+ pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
25+ #[allow(unused)]
26+ use ::core::marker::PhantomData;
27+ mod sealed {
28+ pub trait Sealed {}
29+ }
30+ /// State trait tracking which required fields have been set
31+ pub trait State: sealed::Sealed {
32+ type Emoji;
33+ type GameId;
34+ type CreatedAt;
35+ }
36+ /// Empty state - all required fields are unset
37+ pub struct Empty(());
38+ impl sealed::Sealed for Empty {}
39+ impl State for Empty {
40+ type Emoji = Unset;
41+ type GameId = Unset;
42+ type CreatedAt = Unset;
43+ }
44+ ///State transition - sets the `emoji` field to Set
45+ pub struct SetEmoji<S: State = Empty>(PhantomData<fn() -> S>);
46+ impl<S: State> sealed::Sealed for SetEmoji<S> {}
47+ impl<S: State> State for SetEmoji<S> {
48+ type Emoji = Set<members::emoji>;
49+ type GameId = S::GameId;
50+ type CreatedAt = S::CreatedAt;
51+ }
52+ ///State transition - sets the `game_id` field to Set
53+ pub struct SetGameId<S: State = Empty>(PhantomData<fn() -> S>);
54+ impl<S: State> sealed::Sealed for SetGameId<S> {}
55+ impl<S: State> State for SetGameId<S> {
56+ type Emoji = S::Emoji;
57+ type GameId = Set<members::game_id>;
58+ type CreatedAt = S::CreatedAt;
59+ }
60+ ///State transition - sets the `created_at` field to Set
61+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
62+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
63+ impl<S: State> State for SetCreatedAt<S> {
64+ type Emoji = S::Emoji;
65+ type GameId = S::GameId;
66+ type CreatedAt = Set<members::created_at>;
67+ }
68+ /// Marker types for field names
69+ #[allow(non_camel_case_types)]
70+ pub mod members {
71+ ///Marker type for the `emoji` field
72+ pub struct emoji(());
73+ ///Marker type for the `game_id` field
74+ pub struct game_id(());
75+ ///Marker type for the `created_at` field
76+ pub struct created_at(());
77+ }
78+}
79+80+/// Builder for constructing an instance of this type
81+pub struct ReactionBuilder<'a, S: reaction_state::State> {
82+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
83+ __unsafe_private_named: (
84+ ::core::option::Option<jacquard_common::types::string::Datetime>,
85+ ::core::option::Option<jacquard_common::CowStr<'a>>,
86+ ::core::option::Option<jacquard_common::CowStr<'a>>,
87+ ),
88+ _phantom: ::core::marker::PhantomData<&'a ()>,
89+}
90+91+impl<'a> Reaction<'a> {
92+ /// Create a new builder for this type
93+ pub fn new() -> ReactionBuilder<'a, reaction_state::Empty> {
94+ ReactionBuilder::new()
95+ }
96+}
97+98+impl<'a> ReactionBuilder<'a, reaction_state::Empty> {
99+ /// Create a new builder with all fields unset
100+ pub fn new() -> Self {
101+ ReactionBuilder {
102+ _phantom_state: ::core::marker::PhantomData,
103+ __unsafe_private_named: (None, None, None),
104+ _phantom: ::core::marker::PhantomData,
105+ }
106+ }
107+}
108+109+impl<'a, S> ReactionBuilder<'a, S>
110+where
111+ S: reaction_state::State,
112+ S::CreatedAt: reaction_state::IsUnset,
113+{
114+ /// Set the `createdAt` field (required)
115+ pub fn created_at(
116+ mut self,
117+ value: impl Into<jacquard_common::types::string::Datetime>,
118+ ) -> ReactionBuilder<'a, reaction_state::SetCreatedAt<S>> {
119+ self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
120+ ReactionBuilder {
121+ _phantom_state: ::core::marker::PhantomData,
122+ __unsafe_private_named: self.__unsafe_private_named,
123+ _phantom: ::core::marker::PhantomData,
124+ }
125+ }
126+}
127+128+impl<'a, S> ReactionBuilder<'a, S>
129+where
130+ S: reaction_state::State,
131+ S::Emoji: reaction_state::IsUnset,
132+{
133+ /// Set the `emoji` field (required)
134+ pub fn emoji(
135+ mut self,
136+ value: impl Into<jacquard_common::CowStr<'a>>,
137+ ) -> ReactionBuilder<'a, reaction_state::SetEmoji<S>> {
138+ self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
139+ ReactionBuilder {
140+ _phantom_state: ::core::marker::PhantomData,
141+ __unsafe_private_named: self.__unsafe_private_named,
142+ _phantom: ::core::marker::PhantomData,
143+ }
144+ }
145+}
146+147+impl<'a, S> ReactionBuilder<'a, S>
148+where
149+ S: reaction_state::State,
150+ S::GameId: reaction_state::IsUnset,
151+{
152+ /// Set the `gameId` field (required)
153+ pub fn game_id(
154+ mut self,
155+ value: impl Into<jacquard_common::CowStr<'a>>,
156+ ) -> ReactionBuilder<'a, reaction_state::SetGameId<S>> {
157+ self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
158+ ReactionBuilder {
159+ _phantom_state: ::core::marker::PhantomData,
160+ __unsafe_private_named: self.__unsafe_private_named,
161+ _phantom: ::core::marker::PhantomData,
162+ }
163+ }
164+}
165+166+impl<'a, S> ReactionBuilder<'a, S>
167+where
168+ S: reaction_state::State,
169+ S::Emoji: reaction_state::IsSet,
170+ S::GameId: reaction_state::IsSet,
171+ S::CreatedAt: reaction_state::IsSet,
172+{
173+ /// Build the final struct
174+ pub fn build(self) -> Reaction<'a> {
175+ Reaction {
176+ created_at: self.__unsafe_private_named.0.unwrap(),
177+ emoji: self.__unsafe_private_named.1.unwrap(),
178+ game_id: self.__unsafe_private_named.2.unwrap(),
179+ extra_data: Default::default(),
180+ }
181+ }
182+ /// Build the final struct with custom extra_data
183+ pub fn build_with_data(
184+ self,
185+ extra_data: std::collections::BTreeMap<
186+ jacquard_common::smol_str::SmolStr,
187+ jacquard_common::types::value::Data<'a>,
188+ >,
189+ ) -> Reaction<'a> {
190+ Reaction {
191+ created_at: self.__unsafe_private_named.0.unwrap(),
192+ emoji: self.__unsafe_private_named.1.unwrap(),
193+ game_id: self.__unsafe_private_named.2.unwrap(),
194+ extra_data: Some(extra_data),
195+ }
196+ }
197+}
198+199+impl<'a> Reaction<'a> {
200+ pub fn uri(
201+ uri: impl Into<jacquard_common::CowStr<'a>>,
202+ ) -> Result<
203+ jacquard_common::types::uri::RecordUri<'a, ReactionRecord>,
204+ jacquard_common::types::uri::UriError,
205+ > {
206+ jacquard_common::types::uri::RecordUri::try_from_uri(
207+ jacquard_common::types::string::AtUri::new_cow(uri.into())?,
208+ )
209+ }
210+}
211+212+/// Typed wrapper for GetRecord response with this collection's record type.
213+#[derive(
214+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
215+)]
216+#[serde(rename_all = "camelCase")]
217+pub struct ReactionGetRecordOutput<'a> {
218+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
219+ #[serde(borrow)]
220+ pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
221+ #[serde(borrow)]
222+ pub uri: jacquard_common::types::string::AtUri<'a>,
223+ #[serde(borrow)]
224+ pub value: Reaction<'a>,
225+}
226+227+impl From<ReactionGetRecordOutput<'_>> for Reaction<'_> {
228+ fn from(output: ReactionGetRecordOutput<'_>) -> Self {
229+ use jacquard_common::IntoStatic;
230+ output.value.into_static()
231+ }
232+}
233+234+impl jacquard_common::types::collection::Collection for Reaction<'_> {
235+ const NSID: &'static str = "games.firehose.barklesheep.reaction";
236+ type Record = ReactionRecord;
237+}
238+239+/// Marker type for deserializing records from this collection.
240+#[derive(Debug, serde::Serialize, serde::Deserialize)]
241+pub struct ReactionRecord;
242+impl jacquard_common::xrpc::XrpcResp for ReactionRecord {
243+ const NSID: &'static str = "games.firehose.barklesheep.reaction";
244+ const ENCODING: &'static str = "application/json";
245+ type Output<'de> = ReactionGetRecordOutput<'de>;
246+ type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
247+}
248+249+impl jacquard_common::types::collection::Collection for ReactionRecord {
250+ const NSID: &'static str = "games.firehose.barklesheep.reaction";
251+ type Record = ReactionRecord;
252+}
253+254+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Reaction<'a> {
255+ fn nsid() -> &'static str {
256+ "games.firehose.barklesheep.reaction"
257+ }
258+ fn def_name() -> &'static str {
259+ "main"
260+ }
261+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
262+ lexicon_doc_games_firehose_barklesheep_reaction()
263+ }
264+ fn validate(
265+ &self,
266+ ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
267+ {
268+ let value = &self.emoji;
269+ #[allow(unused_comparisons)]
270+ if <str>::len(value.as_ref()) > 4usize {
271+ return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
272+ path: ::jacquard_lexicon::validation::ValidationPath::from_field("emoji"),
273+ max: 4usize,
274+ actual: <str>::len(value.as_ref()),
275+ });
276+ }
277+ }
278+ Ok(())
279+ }
280+}
281+282+fn lexicon_doc_games_firehose_barklesheep_reaction()
283+-> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
284+ ::jacquard_lexicon::lexicon::LexiconDoc {
285+ lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
286+ id: ::jacquard_common::CowStr::new_static("games.firehose.barklesheep.reaction"),
287+ revision: None,
288+ description: None,
289+ defs: {
290+ let mut map = ::std::collections::BTreeMap::new();
291+ map.insert(
292+ ::jacquard_common::smol_str::SmolStr::new_static("main"),
293+ ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord {
294+ description: Some(
295+ ::jacquard_common::CowStr::new_static(
296+ "A reaction in a Barklesheep game",
297+ ),
298+ ),
299+ key: Some(::jacquard_common::CowStr::new_static("tid")),
300+ record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject {
301+ description: None,
302+ required: Some(
303+ vec![
304+ ::jacquard_common::smol_str::SmolStr::new_static("gameId"),
305+ ::jacquard_common::smol_str::SmolStr::new_static("emoji"),
306+ ::jacquard_common::smol_str::SmolStr::new_static("createdAt")
307+ ],
308+ ),
309+ nullable: None,
310+ properties: {
311+ #[allow(unused_mut)]
312+ let mut map = ::std::collections::BTreeMap::new();
313+ map.insert(
314+ ::jacquard_common::smol_str::SmolStr::new_static(
315+ "createdAt",
316+ ),
317+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
318+ description: None,
319+ format: Some(
320+ ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
321+ ),
322+ default: None,
323+ min_length: None,
324+ max_length: None,
325+ min_graphemes: None,
326+ max_graphemes: None,
327+ r#enum: None,
328+ r#const: None,
329+ known_values: None,
330+ }),
331+ );
332+ map.insert(
333+ ::jacquard_common::smol_str::SmolStr::new_static("emoji"),
334+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
335+ description: None,
336+ format: None,
337+ default: None,
338+ min_length: None,
339+ max_length: Some(4usize),
340+ min_graphemes: None,
341+ max_graphemes: None,
342+ r#enum: None,
343+ r#const: None,
344+ known_values: None,
345+ }),
346+ );
347+ map.insert(
348+ ::jacquard_common::smol_str::SmolStr::new_static("gameId"),
349+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
350+ description: None,
351+ format: None,
352+ default: None,
353+ min_length: None,
354+ max_length: None,
355+ min_graphemes: None,
356+ max_graphemes: None,
357+ r#enum: None,
358+ r#const: None,
359+ known_values: None,
360+ }),
361+ );
362+ map
363+ },
364+ }),
365+ }),
366+ );
367+ map
368+ },
369+ }
370+}
+9
crates/jacquard-api/src/io_atcr.rs
···000000000
···1+// @generated by jacquard-lexicon. DO NOT EDIT.
2+//
3+// This file was automatically generated from Lexicon schemas.
4+// Any manual changes will be overwritten on the next regeneration.
5+6+pub mod hold;
7+pub mod manifest;
8+pub mod sailor;
9+pub mod tag;
+8
crates/jacquard-api/src/io_atcr/hold.rs
···00000000
···1+// @generated by jacquard-lexicon. DO NOT EDIT.
2+//
3+// This file was automatically generated from Lexicon schemas.
4+// Any manual changes will be overwritten on the next regeneration.
5+6+pub mod captain;
7+pub mod crew;
8+pub mod layer;
···1+// @generated by jacquard-lexicon. DO NOT EDIT.
2+//
3+// Lexicon: io.atcr.manifest
4+//
5+// This file was automatically generated from Lexicon schemas.
6+// Any manual changes will be overwritten on the next regeneration.
7+8+/// Reference to a blob stored in S3 or external storage
9+#[jacquard_derive::lexicon]
10+#[derive(
11+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
12+)]
13+#[serde(rename_all = "camelCase")]
14+pub struct BlobReference<'a> {
15+ /// Optional OCI annotation metadata. Map of string keys to string values.
16+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
17+ #[serde(borrow)]
18+ pub annotations: std::option::Option<jacquard_common::types::value::Data<'a>>,
19+ /// Content digest (e.g., 'sha256:...')
20+ #[serde(borrow)]
21+ pub digest: jacquard_common::CowStr<'a>,
22+ /// MIME type of the blob
23+ #[serde(borrow)]
24+ pub media_type: jacquard_common::CowStr<'a>,
25+ /// Size in bytes
26+ pub size: i64,
27+ /// Optional direct URLs to blob (for BYOS)
28+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
29+ #[serde(borrow)]
30+ pub urls: std::option::Option<Vec<jacquard_common::types::string::Uri<'a>>>,
31+}
32+33+pub mod blob_reference_state {
34+35+ pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
36+ #[allow(unused)]
37+ use ::core::marker::PhantomData;
38+ mod sealed {
39+ pub trait Sealed {}
40+ }
41+ /// State trait tracking which required fields have been set
42+ pub trait State: sealed::Sealed {
43+ type MediaType;
44+ type Size;
45+ type Digest;
46+ }
47+ /// Empty state - all required fields are unset
48+ pub struct Empty(());
49+ impl sealed::Sealed for Empty {}
50+ impl State for Empty {
51+ type MediaType = Unset;
52+ type Size = Unset;
53+ type Digest = Unset;
54+ }
55+ ///State transition - sets the `media_type` field to Set
56+ pub struct SetMediaType<S: State = Empty>(PhantomData<fn() -> S>);
57+ impl<S: State> sealed::Sealed for SetMediaType<S> {}
58+ impl<S: State> State for SetMediaType<S> {
59+ type MediaType = Set<members::media_type>;
60+ type Size = S::Size;
61+ type Digest = S::Digest;
62+ }
63+ ///State transition - sets the `size` field to Set
64+ pub struct SetSize<S: State = Empty>(PhantomData<fn() -> S>);
65+ impl<S: State> sealed::Sealed for SetSize<S> {}
66+ impl<S: State> State for SetSize<S> {
67+ type MediaType = S::MediaType;
68+ type Size = Set<members::size>;
69+ type Digest = S::Digest;
70+ }
71+ ///State transition - sets the `digest` field to Set
72+ pub struct SetDigest<S: State = Empty>(PhantomData<fn() -> S>);
73+ impl<S: State> sealed::Sealed for SetDigest<S> {}
74+ impl<S: State> State for SetDigest<S> {
75+ type MediaType = S::MediaType;
76+ type Size = S::Size;
77+ type Digest = Set<members::digest>;
78+ }
79+ /// Marker types for field names
80+ #[allow(non_camel_case_types)]
81+ pub mod members {
82+ ///Marker type for the `media_type` field
83+ pub struct media_type(());
84+ ///Marker type for the `size` field
85+ pub struct size(());
86+ ///Marker type for the `digest` field
87+ pub struct digest(());
88+ }
89+}
90+91+/// Builder for constructing an instance of this type
92+pub struct BlobReferenceBuilder<'a, S: blob_reference_state::State> {
93+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
94+ __unsafe_private_named: (
95+ ::core::option::Option<jacquard_common::types::value::Data<'a>>,
96+ ::core::option::Option<jacquard_common::CowStr<'a>>,
97+ ::core::option::Option<jacquard_common::CowStr<'a>>,
98+ ::core::option::Option<i64>,
99+ ::core::option::Option<Vec<jacquard_common::types::string::Uri<'a>>>,
100+ ),
101+ _phantom: ::core::marker::PhantomData<&'a ()>,
102+}
103+104+impl<'a> BlobReference<'a> {
105+ /// Create a new builder for this type
106+ pub fn new() -> BlobReferenceBuilder<'a, blob_reference_state::Empty> {
107+ BlobReferenceBuilder::new()
108+ }
109+}
110+111+impl<'a> BlobReferenceBuilder<'a, blob_reference_state::Empty> {
112+ /// Create a new builder with all fields unset
113+ pub fn new() -> Self {
114+ BlobReferenceBuilder {
115+ _phantom_state: ::core::marker::PhantomData,
116+ __unsafe_private_named: (None, None, None, None, None),
117+ _phantom: ::core::marker::PhantomData,
118+ }
119+ }
120+}
121+122+impl<'a, S: blob_reference_state::State> BlobReferenceBuilder<'a, S> {
123+ /// Set the `annotations` field (optional)
124+ pub fn annotations(
125+ mut self,
126+ value: impl Into<Option<jacquard_common::types::value::Data<'a>>>,
127+ ) -> Self {
128+ self.__unsafe_private_named.0 = value.into();
129+ self
130+ }
131+ /// Set the `annotations` field to an Option value (optional)
132+ pub fn maybe_annotations(
133+ mut self,
134+ value: Option<jacquard_common::types::value::Data<'a>>,
135+ ) -> Self {
136+ self.__unsafe_private_named.0 = value;
137+ self
138+ }
139+}
140+141+impl<'a, S> BlobReferenceBuilder<'a, S>
142+where
143+ S: blob_reference_state::State,
144+ S::Digest: blob_reference_state::IsUnset,
145+{
146+ /// Set the `digest` field (required)
147+ pub fn digest(
148+ mut self,
149+ value: impl Into<jacquard_common::CowStr<'a>>,
150+ ) -> BlobReferenceBuilder<'a, blob_reference_state::SetDigest<S>> {
151+ self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
152+ BlobReferenceBuilder {
153+ _phantom_state: ::core::marker::PhantomData,
154+ __unsafe_private_named: self.__unsafe_private_named,
155+ _phantom: ::core::marker::PhantomData,
156+ }
157+ }
158+}
159+160+impl<'a, S> BlobReferenceBuilder<'a, S>
161+where
162+ S: blob_reference_state::State,
163+ S::MediaType: blob_reference_state::IsUnset,
164+{
165+ /// Set the `mediaType` field (required)
166+ pub fn media_type(
167+ mut self,
168+ value: impl Into<jacquard_common::CowStr<'a>>,
169+ ) -> BlobReferenceBuilder<'a, blob_reference_state::SetMediaType<S>> {
170+ self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
171+ BlobReferenceBuilder {
172+ _phantom_state: ::core::marker::PhantomData,
173+ __unsafe_private_named: self.__unsafe_private_named,
174+ _phantom: ::core::marker::PhantomData,
175+ }
176+ }
177+}
178+179+impl<'a, S> BlobReferenceBuilder<'a, S>
180+where
181+ S: blob_reference_state::State,
182+ S::Size: blob_reference_state::IsUnset,
183+{
184+ /// Set the `size` field (required)
185+ pub fn size(
186+ mut self,
187+ value: impl Into<i64>,
188+ ) -> BlobReferenceBuilder<'a, blob_reference_state::SetSize<S>> {
189+ self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into());
190+ BlobReferenceBuilder {
191+ _phantom_state: ::core::marker::PhantomData,
192+ __unsafe_private_named: self.__unsafe_private_named,
193+ _phantom: ::core::marker::PhantomData,
194+ }
195+ }
196+}
197+198+impl<'a, S: blob_reference_state::State> BlobReferenceBuilder<'a, S> {
199+ /// Set the `urls` field (optional)
200+ pub fn urls(
201+ mut self,
202+ value: impl Into<Option<Vec<jacquard_common::types::string::Uri<'a>>>>,
203+ ) -> Self {
204+ self.__unsafe_private_named.4 = value.into();
205+ self
206+ }
207+ /// Set the `urls` field to an Option value (optional)
208+ pub fn maybe_urls(
209+ mut self,
210+ value: Option<Vec<jacquard_common::types::string::Uri<'a>>>,
211+ ) -> Self {
212+ self.__unsafe_private_named.4 = value;
213+ self
214+ }
215+}
216+217+impl<'a, S> BlobReferenceBuilder<'a, S>
218+where
219+ S: blob_reference_state::State,
220+ S::MediaType: blob_reference_state::IsSet,
221+ S::Size: blob_reference_state::IsSet,
222+ S::Digest: blob_reference_state::IsSet,
223+{
224+ /// Build the final struct
225+ pub fn build(self) -> BlobReference<'a> {
226+ BlobReference {
227+ annotations: self.__unsafe_private_named.0,
228+ digest: self.__unsafe_private_named.1.unwrap(),
229+ media_type: self.__unsafe_private_named.2.unwrap(),
230+ size: self.__unsafe_private_named.3.unwrap(),
231+ urls: self.__unsafe_private_named.4,
232+ extra_data: Default::default(),
233+ }
234+ }
235+ /// Build the final struct with custom extra_data
236+ pub fn build_with_data(
237+ self,
238+ extra_data: std::collections::BTreeMap<
239+ jacquard_common::smol_str::SmolStr,
240+ jacquard_common::types::value::Data<'a>,
241+ >,
242+ ) -> BlobReference<'a> {
243+ BlobReference {
244+ annotations: self.__unsafe_private_named.0,
245+ digest: self.__unsafe_private_named.1.unwrap(),
246+ media_type: self.__unsafe_private_named.2.unwrap(),
247+ size: self.__unsafe_private_named.3.unwrap(),
248+ urls: self.__unsafe_private_named.4,
249+ extra_data: Some(extra_data),
250+ }
251+ }
252+}
253+254+fn lexicon_doc_io_atcr_manifest() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
255+ ::jacquard_lexicon::lexicon::LexiconDoc {
256+ lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
257+ id: ::jacquard_common::CowStr::new_static("io.atcr.manifest"),
258+ revision: None,
259+ description: None,
260+ defs: {
261+ let mut map = ::std::collections::BTreeMap::new();
262+ map.insert(
263+ ::jacquard_common::smol_str::SmolStr::new_static("blobReference"),
264+ ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
265+ description: Some(
266+ ::jacquard_common::CowStr::new_static(
267+ "Reference to a blob stored in S3 or external storage",
268+ ),
269+ ),
270+ required: Some(
271+ vec![
272+ ::jacquard_common::smol_str::SmolStr::new_static("mediaType"),
273+ ::jacquard_common::smol_str::SmolStr::new_static("size"),
274+ ::jacquard_common::smol_str::SmolStr::new_static("digest")
275+ ],
276+ ),
277+ nullable: None,
278+ properties: {
279+ #[allow(unused_mut)]
280+ let mut map = ::std::collections::BTreeMap::new();
281+ map.insert(
282+ ::jacquard_common::smol_str::SmolStr::new_static(
283+ "annotations",
284+ ),
285+ ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown {
286+ description: None,
287+ }),
288+ );
289+ map.insert(
290+ ::jacquard_common::smol_str::SmolStr::new_static("digest"),
291+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
292+ description: Some(
293+ ::jacquard_common::CowStr::new_static(
294+ "Content digest (e.g., 'sha256:...')",
295+ ),
296+ ),
297+ format: None,
298+ default: None,
299+ min_length: None,
300+ max_length: None,
301+ min_graphemes: None,
302+ max_graphemes: None,
303+ r#enum: None,
304+ r#const: None,
305+ known_values: None,
306+ }),
307+ );
308+ map.insert(
309+ ::jacquard_common::smol_str::SmolStr::new_static(
310+ "mediaType",
311+ ),
312+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
313+ description: Some(
314+ ::jacquard_common::CowStr::new_static(
315+ "MIME type of the blob",
316+ ),
317+ ),
318+ format: None,
319+ default: None,
320+ min_length: None,
321+ max_length: None,
322+ min_graphemes: None,
323+ max_graphemes: None,
324+ r#enum: None,
325+ r#const: None,
326+ known_values: None,
327+ }),
328+ );
329+ map.insert(
330+ ::jacquard_common::smol_str::SmolStr::new_static("size"),
331+ ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
332+ description: None,
333+ default: None,
334+ minimum: None,
335+ maximum: None,
336+ r#enum: None,
337+ r#const: None,
338+ }),
339+ );
340+ map.insert(
341+ ::jacquard_common::smol_str::SmolStr::new_static("urls"),
342+ ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
343+ description: Some(
344+ ::jacquard_common::CowStr::new_static(
345+ "Optional direct URLs to blob (for BYOS)",
346+ ),
347+ ),
348+ items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString {
349+ description: None,
350+ format: Some(
351+ ::jacquard_lexicon::lexicon::LexStringFormat::Uri,
352+ ),
353+ default: None,
354+ min_length: None,
355+ max_length: None,
356+ min_graphemes: None,
357+ max_graphemes: None,
358+ r#enum: None,
359+ r#const: None,
360+ known_values: None,
361+ }),
362+ min_length: None,
363+ max_length: None,
364+ }),
365+ );
366+ map
367+ },
368+ }),
369+ );
370+ map.insert(
371+ ::jacquard_common::smol_str::SmolStr::new_static("main"),
372+ ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord {
373+ description: Some(
374+ ::jacquard_common::CowStr::new_static(
375+ "A container image manifest following OCI specification, stored in ATProto",
376+ ),
377+ ),
378+ key: Some(::jacquard_common::CowStr::new_static("tid")),
379+ record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject {
380+ description: None,
381+ required: Some(
382+ vec![
383+ ::jacquard_common::smol_str::SmolStr::new_static("repository"),
384+ ::jacquard_common::smol_str::SmolStr::new_static("digest"),
385+ ::jacquard_common::smol_str::SmolStr::new_static("mediaType"),
386+ ::jacquard_common::smol_str::SmolStr::new_static("schemaVersion"),
387+ ::jacquard_common::smol_str::SmolStr::new_static("createdAt")
388+ ],
389+ ),
390+ nullable: None,
391+ properties: {
392+ #[allow(unused_mut)]
393+ let mut map = ::std::collections::BTreeMap::new();
394+ map.insert(
395+ ::jacquard_common::smol_str::SmolStr::new_static(
396+ "annotations",
397+ ),
398+ ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown {
399+ description: None,
400+ }),
401+ );
402+ map.insert(
403+ ::jacquard_common::smol_str::SmolStr::new_static("config"),
404+ ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
405+ description: None,
406+ r#ref: ::jacquard_common::CowStr::new_static(
407+ "#blobReference",
408+ ),
409+ }),
410+ );
411+ map.insert(
412+ ::jacquard_common::smol_str::SmolStr::new_static(
413+ "createdAt",
414+ ),
415+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
416+ description: Some(
417+ ::jacquard_common::CowStr::new_static(
418+ "Record creation timestamp",
419+ ),
420+ ),
421+ format: Some(
422+ ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
423+ ),
424+ default: None,
425+ min_length: None,
426+ max_length: None,
427+ min_graphemes: None,
428+ max_graphemes: None,
429+ r#enum: None,
430+ r#const: None,
431+ known_values: None,
432+ }),
433+ );
434+ map.insert(
435+ ::jacquard_common::smol_str::SmolStr::new_static("digest"),
436+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
437+ description: Some(
438+ ::jacquard_common::CowStr::new_static(
439+ "Content digest (e.g., 'sha256:abc123...')",
440+ ),
441+ ),
442+ format: None,
443+ default: None,
444+ min_length: None,
445+ max_length: None,
446+ min_graphemes: None,
447+ max_graphemes: None,
448+ r#enum: None,
449+ r#const: None,
450+ known_values: None,
451+ }),
452+ );
453+ map.insert(
454+ ::jacquard_common::smol_str::SmolStr::new_static("holdDid"),
455+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
456+ description: Some(
457+ ::jacquard_common::CowStr::new_static(
458+ "DID of the hold service where blobs are stored (e.g., 'did:web:hold01.atcr.io'). Primary reference for hold resolution.",
459+ ),
460+ ),
461+ format: Some(
462+ ::jacquard_lexicon::lexicon::LexStringFormat::Did,
463+ ),
464+ default: None,
465+ min_length: None,
466+ max_length: None,
467+ min_graphemes: None,
468+ max_graphemes: None,
469+ r#enum: None,
470+ r#const: None,
471+ known_values: None,
472+ }),
473+ );
474+ map.insert(
475+ ::jacquard_common::smol_str::SmolStr::new_static(
476+ "holdEndpoint",
477+ ),
478+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
479+ description: Some(
480+ ::jacquard_common::CowStr::new_static(
481+ "Hold service endpoint URL where blobs are stored. DEPRECATED: Use holdDid instead. Kept for backward compatibility.",
482+ ),
483+ ),
484+ format: Some(
485+ ::jacquard_lexicon::lexicon::LexStringFormat::Uri,
486+ ),
487+ default: None,
488+ min_length: None,
489+ max_length: None,
490+ min_graphemes: None,
491+ max_graphemes: None,
492+ r#enum: None,
493+ r#const: None,
494+ known_values: None,
495+ }),
496+ );
497+ map.insert(
498+ ::jacquard_common::smol_str::SmolStr::new_static("layers"),
499+ ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
500+ description: Some(
501+ ::jacquard_common::CowStr::new_static(
502+ "Filesystem layers (for image manifests)",
503+ ),
504+ ),
505+ items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
506+ description: None,
507+ r#ref: ::jacquard_common::CowStr::new_static(
508+ "#blobReference",
509+ ),
510+ }),
511+ min_length: None,
512+ max_length: None,
513+ }),
514+ );
515+ map.insert(
516+ ::jacquard_common::smol_str::SmolStr::new_static(
517+ "manifestBlob",
518+ ),
519+ ::jacquard_lexicon::lexicon::LexObjectProperty::Blob(::jacquard_lexicon::lexicon::LexBlob {
520+ description: None,
521+ accept: None,
522+ max_size: None,
523+ }),
524+ );
525+ map.insert(
526+ ::jacquard_common::smol_str::SmolStr::new_static(
527+ "manifests",
528+ ),
529+ ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
530+ description: Some(
531+ ::jacquard_common::CowStr::new_static(
532+ "Referenced manifests (for manifest lists/indexes)",
533+ ),
534+ ),
535+ items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
536+ description: None,
537+ r#ref: ::jacquard_common::CowStr::new_static(
538+ "#manifestReference",
539+ ),
540+ }),
541+ min_length: None,
542+ max_length: None,
543+ }),
544+ );
545+ map.insert(
546+ ::jacquard_common::smol_str::SmolStr::new_static(
547+ "mediaType",
548+ ),
549+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
550+ description: Some(
551+ ::jacquard_common::CowStr::new_static("OCI media type"),
552+ ),
553+ format: None,
554+ default: None,
555+ min_length: None,
556+ max_length: None,
557+ min_graphemes: None,
558+ max_graphemes: None,
559+ r#enum: None,
560+ r#const: None,
561+ known_values: None,
562+ }),
563+ );
564+ map.insert(
565+ ::jacquard_common::smol_str::SmolStr::new_static(
566+ "repository",
567+ ),
568+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
569+ description: Some(
570+ ::jacquard_common::CowStr::new_static(
571+ "Repository name (e.g., 'myapp'). Scoped to user's DID.",
572+ ),
573+ ),
574+ format: None,
575+ default: None,
576+ min_length: None,
577+ max_length: Some(255usize),
578+ min_graphemes: None,
579+ max_graphemes: None,
580+ r#enum: None,
581+ r#const: None,
582+ known_values: None,
583+ }),
584+ );
585+ map.insert(
586+ ::jacquard_common::smol_str::SmolStr::new_static(
587+ "schemaVersion",
588+ ),
589+ ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
590+ description: None,
591+ default: None,
592+ minimum: None,
593+ maximum: None,
594+ r#enum: None,
595+ r#const: None,
596+ }),
597+ );
598+ map.insert(
599+ ::jacquard_common::smol_str::SmolStr::new_static("subject"),
600+ ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
601+ description: None,
602+ r#ref: ::jacquard_common::CowStr::new_static(
603+ "#blobReference",
604+ ),
605+ }),
606+ );
607+ map
608+ },
609+ }),
610+ }),
611+ );
612+ map.insert(
613+ ::jacquard_common::smol_str::SmolStr::new_static("manifestReference"),
614+ ::jacquard_lexicon::lexicon::LexUserType::Object(
615+ ::jacquard_lexicon::lexicon::LexObject {
616+ description: Some(::jacquard_common::CowStr::new_static(
617+ "Reference to a manifest in a manifest list/index",
618+ )),
619+ required: Some(vec![
620+ ::jacquard_common::smol_str::SmolStr::new_static("mediaType"),
621+ ::jacquard_common::smol_str::SmolStr::new_static("size"),
622+ ::jacquard_common::smol_str::SmolStr::new_static("digest"),
623+ ]),
624+ nullable: None,
625+ properties: {
626+ #[allow(unused_mut)]
627+ let mut map = ::std::collections::BTreeMap::new();
628+ map.insert(
629+ ::jacquard_common::smol_str::SmolStr::new_static("annotations"),
630+ ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(
631+ ::jacquard_lexicon::lexicon::LexUnknown { description: None },
632+ ),
633+ );
634+ map.insert(
635+ ::jacquard_common::smol_str::SmolStr::new_static("digest"),
636+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(
637+ ::jacquard_lexicon::lexicon::LexString {
638+ description: Some(::jacquard_common::CowStr::new_static(
639+ "Content digest (e.g., 'sha256:...')",
640+ )),
641+ format: None,
642+ default: None,
643+ min_length: None,
644+ max_length: None,
645+ min_graphemes: None,
646+ max_graphemes: None,
647+ r#enum: None,
648+ r#const: None,
649+ known_values: None,
650+ },
651+ ),
652+ );
653+ map.insert(
654+ ::jacquard_common::smol_str::SmolStr::new_static("mediaType"),
655+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(
656+ ::jacquard_lexicon::lexicon::LexString {
657+ description: Some(::jacquard_common::CowStr::new_static(
658+ "Media type of the referenced manifest",
659+ )),
660+ format: None,
661+ default: None,
662+ min_length: None,
663+ max_length: None,
664+ min_graphemes: None,
665+ max_graphemes: None,
666+ r#enum: None,
667+ r#const: None,
668+ known_values: None,
669+ },
670+ ),
671+ );
672+ map.insert(
673+ ::jacquard_common::smol_str::SmolStr::new_static("platform"),
674+ ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(
675+ ::jacquard_lexicon::lexicon::LexRef {
676+ description: None,
677+ r#ref: ::jacquard_common::CowStr::new_static("#platform"),
678+ },
679+ ),
680+ );
681+ map.insert(
682+ ::jacquard_common::smol_str::SmolStr::new_static("size"),
683+ ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(
684+ ::jacquard_lexicon::lexicon::LexInteger {
685+ description: None,
686+ default: None,
687+ minimum: None,
688+ maximum: None,
689+ r#enum: None,
690+ r#const: None,
691+ },
692+ ),
693+ );
694+ map
695+ },
696+ },
697+ ),
698+ );
699+ map.insert(
700+ ::jacquard_common::smol_str::SmolStr::new_static("platform"),
701+ ::jacquard_lexicon::lexicon::LexUserType::Object(
702+ ::jacquard_lexicon::lexicon::LexObject {
703+ description: Some(::jacquard_common::CowStr::new_static(
704+ "Platform information describing OS and architecture",
705+ )),
706+ required: Some(vec![
707+ ::jacquard_common::smol_str::SmolStr::new_static("architecture"),
708+ ::jacquard_common::smol_str::SmolStr::new_static("os"),
709+ ]),
710+ nullable: None,
711+ properties: {
712+ #[allow(unused_mut)]
713+ let mut map = ::std::collections::BTreeMap::new();
714+ map.insert(
715+ ::jacquard_common::smol_str::SmolStr::new_static("architecture"),
716+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(
717+ ::jacquard_lexicon::lexicon::LexString {
718+ description: Some(::jacquard_common::CowStr::new_static(
719+ "CPU architecture (e.g., 'amd64', 'arm64', 'arm')",
720+ )),
721+ format: None,
722+ default: None,
723+ min_length: None,
724+ max_length: None,
725+ min_graphemes: None,
726+ max_graphemes: None,
727+ r#enum: None,
728+ r#const: None,
729+ known_values: None,
730+ },
731+ ),
732+ );
733+ map.insert(
734+ ::jacquard_common::smol_str::SmolStr::new_static("os"),
735+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(
736+ ::jacquard_lexicon::lexicon::LexString {
737+ description: Some(::jacquard_common::CowStr::new_static(
738+ "Operating system (e.g., 'linux', 'windows', 'darwin')",
739+ )),
740+ format: None,
741+ default: None,
742+ min_length: None,
743+ max_length: None,
744+ min_graphemes: None,
745+ max_graphemes: None,
746+ r#enum: None,
747+ r#const: None,
748+ known_values: None,
749+ },
750+ ),
751+ );
752+ map.insert(
753+ ::jacquard_common::smol_str::SmolStr::new_static("osFeatures"),
754+ ::jacquard_lexicon::lexicon::LexObjectProperty::Array(
755+ ::jacquard_lexicon::lexicon::LexArray {
756+ description: Some(::jacquard_common::CowStr::new_static(
757+ "Optional OS features",
758+ )),
759+ items: ::jacquard_lexicon::lexicon::LexArrayItem::String(
760+ ::jacquard_lexicon::lexicon::LexString {
761+ description: None,
762+ format: None,
763+ default: None,
764+ min_length: None,
765+ max_length: None,
766+ min_graphemes: None,
767+ max_graphemes: None,
768+ r#enum: None,
769+ r#const: None,
770+ known_values: None,
771+ },
772+ ),
773+ min_length: None,
774+ max_length: None,
775+ },
776+ ),
777+ );
778+ map.insert(
779+ ::jacquard_common::smol_str::SmolStr::new_static("osVersion"),
780+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(
781+ ::jacquard_lexicon::lexicon::LexString {
782+ description: Some(::jacquard_common::CowStr::new_static(
783+ "Optional OS version",
784+ )),
785+ format: None,
786+ default: None,
787+ min_length: None,
788+ max_length: None,
789+ min_graphemes: None,
790+ max_graphemes: None,
791+ r#enum: None,
792+ r#const: None,
793+ known_values: None,
794+ },
795+ ),
796+ );
797+ map.insert(
798+ ::jacquard_common::smol_str::SmolStr::new_static("variant"),
799+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(
800+ ::jacquard_lexicon::lexicon::LexString {
801+ description: Some(::jacquard_common::CowStr::new_static(
802+ "Optional CPU variant (e.g., 'v7' for ARM)",
803+ )),
804+ format: None,
805+ default: None,
806+ min_length: None,
807+ max_length: None,
808+ min_graphemes: None,
809+ max_graphemes: None,
810+ r#enum: None,
811+ r#const: None,
812+ known_values: None,
813+ },
814+ ),
815+ );
816+ map
817+ },
818+ },
819+ ),
820+ );
821+ map
822+ },
823+ }
824+}
825+826+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for BlobReference<'a> {
827+ fn nsid() -> &'static str {
828+ "io.atcr.manifest"
829+ }
830+ fn def_name() -> &'static str {
831+ "blobReference"
832+ }
833+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
834+ lexicon_doc_io_atcr_manifest()
835+ }
836+ fn validate(
837+ &self,
838+ ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
839+ Ok(())
840+ }
841+}
842+843+/// A container image manifest following OCI specification, stored in ATProto
844+#[jacquard_derive::lexicon]
845+#[derive(
846+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
847+)]
848+#[serde(rename_all = "camelCase")]
849+pub struct Manifest<'a> {
850+ /// Optional OCI annotation metadata. Map of string keys to string values (e.g., org.opencontainers.image.title → 'My App').
851+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
852+ #[serde(borrow)]
853+ pub annotations: std::option::Option<jacquard_common::types::value::Data<'a>>,
854+ /// Reference to image configuration blob
855+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
856+ #[serde(borrow)]
857+ pub config: std::option::Option<crate::io_atcr::manifest::BlobReference<'a>>,
858+ /// Record creation timestamp
859+ pub created_at: jacquard_common::types::string::Datetime,
860+ /// Content digest (e.g., 'sha256:abc123...')
861+ #[serde(borrow)]
862+ pub digest: jacquard_common::CowStr<'a>,
863+ /// DID of the hold service where blobs are stored (e.g., 'did:web:hold01.atcr.io'). Primary reference for hold resolution.
864+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
865+ #[serde(borrow)]
866+ pub hold_did: std::option::Option<jacquard_common::types::string::Did<'a>>,
867+ /// Hold service endpoint URL where blobs are stored. DEPRECATED: Use holdDid instead. Kept for backward compatibility.
868+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
869+ #[serde(borrow)]
870+ pub hold_endpoint: std::option::Option<jacquard_common::types::string::Uri<'a>>,
871+ /// Filesystem layers (for image manifests)
872+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
873+ #[serde(borrow)]
874+ pub layers: std::option::Option<Vec<crate::io_atcr::manifest::BlobReference<'a>>>,
875+ /// The full OCI manifest stored as a blob in ATProto.
876+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
877+ #[serde(borrow)]
878+ pub manifest_blob: std::option::Option<jacquard_common::types::blob::BlobRef<'a>>,
879+ /// Referenced manifests (for manifest lists/indexes)
880+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
881+ #[serde(borrow)]
882+ pub manifests: std::option::Option<Vec<crate::io_atcr::manifest::ManifestReference<'a>>>,
883+ /// OCI media type
884+ #[serde(borrow)]
885+ pub media_type: jacquard_common::CowStr<'a>,
886+ /// Repository name (e.g., 'myapp'). Scoped to user's DID.
887+ #[serde(borrow)]
888+ pub repository: jacquard_common::CowStr<'a>,
889+ /// OCI schema version (typically 2)
890+ pub schema_version: i64,
891+ /// Optional reference to another manifest (for attestations, signatures)
892+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
893+ #[serde(borrow)]
894+ pub subject: std::option::Option<crate::io_atcr::manifest::BlobReference<'a>>,
895+}
896+897+pub mod manifest_state {
898+899+ pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
900+ #[allow(unused)]
901+ use ::core::marker::PhantomData;
902+ mod sealed {
903+ pub trait Sealed {}
904+ }
905+ /// State trait tracking which required fields have been set
906+ pub trait State: sealed::Sealed {
907+ type CreatedAt;
908+ type SchemaVersion;
909+ type Repository;
910+ type MediaType;
911+ type Digest;
912+ }
913+ /// Empty state - all required fields are unset
914+ pub struct Empty(());
915+ impl sealed::Sealed for Empty {}
916+ impl State for Empty {
917+ type CreatedAt = Unset;
918+ type SchemaVersion = Unset;
919+ type Repository = Unset;
920+ type MediaType = Unset;
921+ type Digest = Unset;
922+ }
923+ ///State transition - sets the `created_at` field to Set
924+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
925+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
926+ impl<S: State> State for SetCreatedAt<S> {
927+ type CreatedAt = Set<members::created_at>;
928+ type SchemaVersion = S::SchemaVersion;
929+ type Repository = S::Repository;
930+ type MediaType = S::MediaType;
931+ type Digest = S::Digest;
932+ }
933+ ///State transition - sets the `schema_version` field to Set
934+ pub struct SetSchemaVersion<S: State = Empty>(PhantomData<fn() -> S>);
935+ impl<S: State> sealed::Sealed for SetSchemaVersion<S> {}
936+ impl<S: State> State for SetSchemaVersion<S> {
937+ type CreatedAt = S::CreatedAt;
938+ type SchemaVersion = Set<members::schema_version>;
939+ type Repository = S::Repository;
940+ type MediaType = S::MediaType;
941+ type Digest = S::Digest;
942+ }
943+ ///State transition - sets the `repository` field to Set
944+ pub struct SetRepository<S: State = Empty>(PhantomData<fn() -> S>);
945+ impl<S: State> sealed::Sealed for SetRepository<S> {}
946+ impl<S: State> State for SetRepository<S> {
947+ type CreatedAt = S::CreatedAt;
948+ type SchemaVersion = S::SchemaVersion;
949+ type Repository = Set<members::repository>;
950+ type MediaType = S::MediaType;
951+ type Digest = S::Digest;
952+ }
953+ ///State transition - sets the `media_type` field to Set
954+ pub struct SetMediaType<S: State = Empty>(PhantomData<fn() -> S>);
955+ impl<S: State> sealed::Sealed for SetMediaType<S> {}
956+ impl<S: State> State for SetMediaType<S> {
957+ type CreatedAt = S::CreatedAt;
958+ type SchemaVersion = S::SchemaVersion;
959+ type Repository = S::Repository;
960+ type MediaType = Set<members::media_type>;
961+ type Digest = S::Digest;
962+ }
963+ ///State transition - sets the `digest` field to Set
964+ pub struct SetDigest<S: State = Empty>(PhantomData<fn() -> S>);
965+ impl<S: State> sealed::Sealed for SetDigest<S> {}
966+ impl<S: State> State for SetDigest<S> {
967+ type CreatedAt = S::CreatedAt;
968+ type SchemaVersion = S::SchemaVersion;
969+ type Repository = S::Repository;
970+ type MediaType = S::MediaType;
971+ type Digest = Set<members::digest>;
972+ }
973+ /// Marker types for field names
974+ #[allow(non_camel_case_types)]
975+ pub mod members {
976+ ///Marker type for the `created_at` field
977+ pub struct created_at(());
978+ ///Marker type for the `schema_version` field
979+ pub struct schema_version(());
980+ ///Marker type for the `repository` field
981+ pub struct repository(());
982+ ///Marker type for the `media_type` field
983+ pub struct media_type(());
984+ ///Marker type for the `digest` field
985+ pub struct digest(());
986+ }
987+}
988+989+/// Builder for constructing an instance of this type
990+pub struct ManifestBuilder<'a, S: manifest_state::State> {
991+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
992+ __unsafe_private_named: (
993+ ::core::option::Option<jacquard_common::types::value::Data<'a>>,
994+ ::core::option::Option<crate::io_atcr::manifest::BlobReference<'a>>,
995+ ::core::option::Option<jacquard_common::types::string::Datetime>,
996+ ::core::option::Option<jacquard_common::CowStr<'a>>,
997+ ::core::option::Option<jacquard_common::types::string::Did<'a>>,
998+ ::core::option::Option<jacquard_common::types::string::Uri<'a>>,
999+ ::core::option::Option<Vec<crate::io_atcr::manifest::BlobReference<'a>>>,
1000+ ::core::option::Option<jacquard_common::types::blob::BlobRef<'a>>,
1001+ ::core::option::Option<Vec<crate::io_atcr::manifest::ManifestReference<'a>>>,
1002+ ::core::option::Option<jacquard_common::CowStr<'a>>,
1003+ ::core::option::Option<jacquard_common::CowStr<'a>>,
1004+ ::core::option::Option<i64>,
1005+ ::core::option::Option<crate::io_atcr::manifest::BlobReference<'a>>,
1006+ ),
1007+ _phantom: ::core::marker::PhantomData<&'a ()>,
1008+}
1009+1010+impl<'a> Manifest<'a> {
1011+ /// Create a new builder for this type
1012+ pub fn new() -> ManifestBuilder<'a, manifest_state::Empty> {
1013+ ManifestBuilder::new()
1014+ }
1015+}
1016+1017+impl<'a> ManifestBuilder<'a, manifest_state::Empty> {
1018+ /// Create a new builder with all fields unset
1019+ pub fn new() -> Self {
1020+ ManifestBuilder {
1021+ _phantom_state: ::core::marker::PhantomData,
1022+ __unsafe_private_named: (
1023+ None, None, None, None, None, None, None, None, None, None, None, None, None,
1024+ ),
1025+ _phantom: ::core::marker::PhantomData,
1026+ }
1027+ }
1028+}
1029+1030+impl<'a, S: manifest_state::State> ManifestBuilder<'a, S> {
1031+ /// Set the `annotations` field (optional)
1032+ pub fn annotations(
1033+ mut self,
1034+ value: impl Into<Option<jacquard_common::types::value::Data<'a>>>,
1035+ ) -> Self {
1036+ self.__unsafe_private_named.0 = value.into();
1037+ self
1038+ }
1039+ /// Set the `annotations` field to an Option value (optional)
1040+ pub fn maybe_annotations(
1041+ mut self,
1042+ value: Option<jacquard_common::types::value::Data<'a>>,
1043+ ) -> Self {
1044+ self.__unsafe_private_named.0 = value;
1045+ self
1046+ }
1047+}
1048+1049+impl<'a, S: manifest_state::State> ManifestBuilder<'a, S> {
1050+ /// Set the `config` field (optional)
1051+ pub fn config(
1052+ mut self,
1053+ value: impl Into<Option<crate::io_atcr::manifest::BlobReference<'a>>>,
1054+ ) -> Self {
1055+ self.__unsafe_private_named.1 = value.into();
1056+ self
1057+ }
1058+ /// Set the `config` field to an Option value (optional)
1059+ pub fn maybe_config(
1060+ mut self,
1061+ value: Option<crate::io_atcr::manifest::BlobReference<'a>>,
1062+ ) -> Self {
1063+ self.__unsafe_private_named.1 = value;
1064+ self
1065+ }
1066+}
1067+1068+impl<'a, S> ManifestBuilder<'a, S>
1069+where
1070+ S: manifest_state::State,
1071+ S::CreatedAt: manifest_state::IsUnset,
1072+{
1073+ /// Set the `createdAt` field (required)
1074+ pub fn created_at(
1075+ mut self,
1076+ value: impl Into<jacquard_common::types::string::Datetime>,
1077+ ) -> ManifestBuilder<'a, manifest_state::SetCreatedAt<S>> {
1078+ self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
1079+ ManifestBuilder {
1080+ _phantom_state: ::core::marker::PhantomData,
1081+ __unsafe_private_named: self.__unsafe_private_named,
1082+ _phantom: ::core::marker::PhantomData,
1083+ }
1084+ }
1085+}
1086+1087+impl<'a, S> ManifestBuilder<'a, S>
1088+where
1089+ S: manifest_state::State,
1090+ S::Digest: manifest_state::IsUnset,
1091+{
1092+ /// Set the `digest` field (required)
1093+ pub fn digest(
1094+ mut self,
1095+ value: impl Into<jacquard_common::CowStr<'a>>,
1096+ ) -> ManifestBuilder<'a, manifest_state::SetDigest<S>> {
1097+ self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into());
1098+ ManifestBuilder {
1099+ _phantom_state: ::core::marker::PhantomData,
1100+ __unsafe_private_named: self.__unsafe_private_named,
1101+ _phantom: ::core::marker::PhantomData,
1102+ }
1103+ }
1104+}
1105+1106+impl<'a, S: manifest_state::State> ManifestBuilder<'a, S> {
1107+ /// Set the `holdDid` field (optional)
1108+ pub fn hold_did(
1109+ mut self,
1110+ value: impl Into<Option<jacquard_common::types::string::Did<'a>>>,
1111+ ) -> Self {
1112+ self.__unsafe_private_named.4 = value.into();
1113+ self
1114+ }
1115+ /// Set the `holdDid` field to an Option value (optional)
1116+ pub fn maybe_hold_did(
1117+ mut self,
1118+ value: Option<jacquard_common::types::string::Did<'a>>,
1119+ ) -> Self {
1120+ self.__unsafe_private_named.4 = value;
1121+ self
1122+ }
1123+}
1124+1125+impl<'a, S: manifest_state::State> ManifestBuilder<'a, S> {
1126+ /// Set the `holdEndpoint` field (optional)
1127+ pub fn hold_endpoint(
1128+ mut self,
1129+ value: impl Into<Option<jacquard_common::types::string::Uri<'a>>>,
1130+ ) -> Self {
1131+ self.__unsafe_private_named.5 = value.into();
1132+ self
1133+ }
1134+ /// Set the `holdEndpoint` field to an Option value (optional)
1135+ pub fn maybe_hold_endpoint(
1136+ mut self,
1137+ value: Option<jacquard_common::types::string::Uri<'a>>,
1138+ ) -> Self {
1139+ self.__unsafe_private_named.5 = value;
1140+ self
1141+ }
1142+}
1143+1144+impl<'a, S: manifest_state::State> ManifestBuilder<'a, S> {
1145+ /// Set the `layers` field (optional)
1146+ pub fn layers(
1147+ mut self,
1148+ value: impl Into<Option<Vec<crate::io_atcr::manifest::BlobReference<'a>>>>,
1149+ ) -> Self {
1150+ self.__unsafe_private_named.6 = value.into();
1151+ self
1152+ }
1153+ /// Set the `layers` field to an Option value (optional)
1154+ pub fn maybe_layers(
1155+ mut self,
1156+ value: Option<Vec<crate::io_atcr::manifest::BlobReference<'a>>>,
1157+ ) -> Self {
1158+ self.__unsafe_private_named.6 = value;
1159+ self
1160+ }
1161+}
1162+1163+impl<'a, S: manifest_state::State> ManifestBuilder<'a, S> {
1164+ /// Set the `manifestBlob` field (optional)
1165+ pub fn manifest_blob(
1166+ mut self,
1167+ value: impl Into<Option<jacquard_common::types::blob::BlobRef<'a>>>,
1168+ ) -> Self {
1169+ self.__unsafe_private_named.7 = value.into();
1170+ self
1171+ }
1172+ /// Set the `manifestBlob` field to an Option value (optional)
1173+ pub fn maybe_manifest_blob(
1174+ mut self,
1175+ value: Option<jacquard_common::types::blob::BlobRef<'a>>,
1176+ ) -> Self {
1177+ self.__unsafe_private_named.7 = value;
1178+ self
1179+ }
1180+}
1181+1182+impl<'a, S: manifest_state::State> ManifestBuilder<'a, S> {
1183+ /// Set the `manifests` field (optional)
1184+ pub fn manifests(
1185+ mut self,
1186+ value: impl Into<Option<Vec<crate::io_atcr::manifest::ManifestReference<'a>>>>,
1187+ ) -> Self {
1188+ self.__unsafe_private_named.8 = value.into();
1189+ self
1190+ }
1191+ /// Set the `manifests` field to an Option value (optional)
1192+ pub fn maybe_manifests(
1193+ mut self,
1194+ value: Option<Vec<crate::io_atcr::manifest::ManifestReference<'a>>>,
1195+ ) -> Self {
1196+ self.__unsafe_private_named.8 = value;
1197+ self
1198+ }
1199+}
1200+1201+impl<'a, S> ManifestBuilder<'a, S>
1202+where
1203+ S: manifest_state::State,
1204+ S::MediaType: manifest_state::IsUnset,
1205+{
1206+ /// Set the `mediaType` field (required)
1207+ pub fn media_type(
1208+ mut self,
1209+ value: impl Into<jacquard_common::CowStr<'a>>,
1210+ ) -> ManifestBuilder<'a, manifest_state::SetMediaType<S>> {
1211+ self.__unsafe_private_named.9 = ::core::option::Option::Some(value.into());
1212+ ManifestBuilder {
1213+ _phantom_state: ::core::marker::PhantomData,
1214+ __unsafe_private_named: self.__unsafe_private_named,
1215+ _phantom: ::core::marker::PhantomData,
1216+ }
1217+ }
1218+}
1219+1220+impl<'a, S> ManifestBuilder<'a, S>
1221+where
1222+ S: manifest_state::State,
1223+ S::Repository: manifest_state::IsUnset,
1224+{
1225+ /// Set the `repository` field (required)
1226+ pub fn repository(
1227+ mut self,
1228+ value: impl Into<jacquard_common::CowStr<'a>>,
1229+ ) -> ManifestBuilder<'a, manifest_state::SetRepository<S>> {
1230+ self.__unsafe_private_named.10 = ::core::option::Option::Some(value.into());
1231+ ManifestBuilder {
1232+ _phantom_state: ::core::marker::PhantomData,
1233+ __unsafe_private_named: self.__unsafe_private_named,
1234+ _phantom: ::core::marker::PhantomData,
1235+ }
1236+ }
1237+}
1238+1239+impl<'a, S> ManifestBuilder<'a, S>
1240+where
1241+ S: manifest_state::State,
1242+ S::SchemaVersion: manifest_state::IsUnset,
1243+{
1244+ /// Set the `schemaVersion` field (required)
1245+ pub fn schema_version(
1246+ mut self,
1247+ value: impl Into<i64>,
1248+ ) -> ManifestBuilder<'a, manifest_state::SetSchemaVersion<S>> {
1249+ self.__unsafe_private_named.11 = ::core::option::Option::Some(value.into());
1250+ ManifestBuilder {
1251+ _phantom_state: ::core::marker::PhantomData,
1252+ __unsafe_private_named: self.__unsafe_private_named,
1253+ _phantom: ::core::marker::PhantomData,
1254+ }
1255+ }
1256+}
1257+1258+impl<'a, S: manifest_state::State> ManifestBuilder<'a, S> {
1259+ /// Set the `subject` field (optional)
1260+ pub fn subject(
1261+ mut self,
1262+ value: impl Into<Option<crate::io_atcr::manifest::BlobReference<'a>>>,
1263+ ) -> Self {
1264+ self.__unsafe_private_named.12 = value.into();
1265+ self
1266+ }
1267+ /// Set the `subject` field to an Option value (optional)
1268+ pub fn maybe_subject(
1269+ mut self,
1270+ value: Option<crate::io_atcr::manifest::BlobReference<'a>>,
1271+ ) -> Self {
1272+ self.__unsafe_private_named.12 = value;
1273+ self
1274+ }
1275+}
1276+1277+impl<'a, S> ManifestBuilder<'a, S>
1278+where
1279+ S: manifest_state::State,
1280+ S::CreatedAt: manifest_state::IsSet,
1281+ S::SchemaVersion: manifest_state::IsSet,
1282+ S::Repository: manifest_state::IsSet,
1283+ S::MediaType: manifest_state::IsSet,
1284+ S::Digest: manifest_state::IsSet,
1285+{
1286+ /// Build the final struct
1287+ pub fn build(self) -> Manifest<'a> {
1288+ Manifest {
1289+ annotations: self.__unsafe_private_named.0,
1290+ config: self.__unsafe_private_named.1,
1291+ created_at: self.__unsafe_private_named.2.unwrap(),
1292+ digest: self.__unsafe_private_named.3.unwrap(),
1293+ hold_did: self.__unsafe_private_named.4,
1294+ hold_endpoint: self.__unsafe_private_named.5,
1295+ layers: self.__unsafe_private_named.6,
1296+ manifest_blob: self.__unsafe_private_named.7,
1297+ manifests: self.__unsafe_private_named.8,
1298+ media_type: self.__unsafe_private_named.9.unwrap(),
1299+ repository: self.__unsafe_private_named.10.unwrap(),
1300+ schema_version: self.__unsafe_private_named.11.unwrap(),
1301+ subject: self.__unsafe_private_named.12,
1302+ extra_data: Default::default(),
1303+ }
1304+ }
1305+ /// Build the final struct with custom extra_data
1306+ pub fn build_with_data(
1307+ self,
1308+ extra_data: std::collections::BTreeMap<
1309+ jacquard_common::smol_str::SmolStr,
1310+ jacquard_common::types::value::Data<'a>,
1311+ >,
1312+ ) -> Manifest<'a> {
1313+ Manifest {
1314+ annotations: self.__unsafe_private_named.0,
1315+ config: self.__unsafe_private_named.1,
1316+ created_at: self.__unsafe_private_named.2.unwrap(),
1317+ digest: self.__unsafe_private_named.3.unwrap(),
1318+ hold_did: self.__unsafe_private_named.4,
1319+ hold_endpoint: self.__unsafe_private_named.5,
1320+ layers: self.__unsafe_private_named.6,
1321+ manifest_blob: self.__unsafe_private_named.7,
1322+ manifests: self.__unsafe_private_named.8,
1323+ media_type: self.__unsafe_private_named.9.unwrap(),
1324+ repository: self.__unsafe_private_named.10.unwrap(),
1325+ schema_version: self.__unsafe_private_named.11.unwrap(),
1326+ subject: self.__unsafe_private_named.12,
1327+ extra_data: Some(extra_data),
1328+ }
1329+ }
1330+}
1331+1332+impl<'a> Manifest<'a> {
1333+ pub fn uri(
1334+ uri: impl Into<jacquard_common::CowStr<'a>>,
1335+ ) -> Result<
1336+ jacquard_common::types::uri::RecordUri<'a, ManifestRecord>,
1337+ jacquard_common::types::uri::UriError,
1338+ > {
1339+ jacquard_common::types::uri::RecordUri::try_from_uri(
1340+ jacquard_common::types::string::AtUri::new_cow(uri.into())?,
1341+ )
1342+ }
1343+}
1344+1345+/// Typed wrapper for GetRecord response with this collection's record type.
1346+#[derive(
1347+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
1348+)]
1349+#[serde(rename_all = "camelCase")]
1350+pub struct ManifestGetRecordOutput<'a> {
1351+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
1352+ #[serde(borrow)]
1353+ pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
1354+ #[serde(borrow)]
1355+ pub uri: jacquard_common::types::string::AtUri<'a>,
1356+ #[serde(borrow)]
1357+ pub value: Manifest<'a>,
1358+}
1359+1360+impl From<ManifestGetRecordOutput<'_>> for Manifest<'_> {
1361+ fn from(output: ManifestGetRecordOutput<'_>) -> Self {
1362+ use jacquard_common::IntoStatic;
1363+ output.value.into_static()
1364+ }
1365+}
1366+1367+impl jacquard_common::types::collection::Collection for Manifest<'_> {
1368+ const NSID: &'static str = "io.atcr.manifest";
1369+ type Record = ManifestRecord;
1370+}
1371+1372+/// Marker type for deserializing records from this collection.
1373+#[derive(Debug, serde::Serialize, serde::Deserialize)]
1374+pub struct ManifestRecord;
1375+impl jacquard_common::xrpc::XrpcResp for ManifestRecord {
1376+ const NSID: &'static str = "io.atcr.manifest";
1377+ const ENCODING: &'static str = "application/json";
1378+ type Output<'de> = ManifestGetRecordOutput<'de>;
1379+ type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
1380+}
1381+1382+impl jacquard_common::types::collection::Collection for ManifestRecord {
1383+ const NSID: &'static str = "io.atcr.manifest";
1384+ type Record = ManifestRecord;
1385+}
1386+1387+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Manifest<'a> {
1388+ fn nsid() -> &'static str {
1389+ "io.atcr.manifest"
1390+ }
1391+ fn def_name() -> &'static str {
1392+ "main"
1393+ }
1394+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
1395+ lexicon_doc_io_atcr_manifest()
1396+ }
1397+ fn validate(
1398+ &self,
1399+ ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
1400+ {
1401+ let value = &self.repository;
1402+ #[allow(unused_comparisons)]
1403+ if <str>::len(value.as_ref()) > 255usize {
1404+ return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
1405+ path: ::jacquard_lexicon::validation::ValidationPath::from_field("repository"),
1406+ max: 255usize,
1407+ actual: <str>::len(value.as_ref()),
1408+ });
1409+ }
1410+ }
1411+ Ok(())
1412+ }
1413+}
1414+1415+/// Reference to a manifest in a manifest list/index
1416+#[jacquard_derive::lexicon]
1417+#[derive(
1418+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
1419+)]
1420+#[serde(rename_all = "camelCase")]
1421+pub struct ManifestReference<'a> {
1422+ /// Optional OCI annotation metadata. Map of string keys to string values.
1423+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
1424+ #[serde(borrow)]
1425+ pub annotations: std::option::Option<jacquard_common::types::value::Data<'a>>,
1426+ /// Content digest (e.g., 'sha256:...')
1427+ #[serde(borrow)]
1428+ pub digest: jacquard_common::CowStr<'a>,
1429+ /// Media type of the referenced manifest
1430+ #[serde(borrow)]
1431+ pub media_type: jacquard_common::CowStr<'a>,
1432+ /// Platform information for this manifest
1433+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
1434+ #[serde(borrow)]
1435+ pub platform: std::option::Option<crate::io_atcr::manifest::Platform<'a>>,
1436+ /// Size in bytes
1437+ pub size: i64,
1438+}
1439+1440+pub mod manifest_reference_state {
1441+1442+ pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
1443+ #[allow(unused)]
1444+ use ::core::marker::PhantomData;
1445+ mod sealed {
1446+ pub trait Sealed {}
1447+ }
1448+ /// State trait tracking which required fields have been set
1449+ pub trait State: sealed::Sealed {
1450+ type Digest;
1451+ type Size;
1452+ type MediaType;
1453+ }
1454+ /// Empty state - all required fields are unset
1455+ pub struct Empty(());
1456+ impl sealed::Sealed for Empty {}
1457+ impl State for Empty {
1458+ type Digest = Unset;
1459+ type Size = Unset;
1460+ type MediaType = Unset;
1461+ }
1462+ ///State transition - sets the `digest` field to Set
1463+ pub struct SetDigest<S: State = Empty>(PhantomData<fn() -> S>);
1464+ impl<S: State> sealed::Sealed for SetDigest<S> {}
1465+ impl<S: State> State for SetDigest<S> {
1466+ type Digest = Set<members::digest>;
1467+ type Size = S::Size;
1468+ type MediaType = S::MediaType;
1469+ }
1470+ ///State transition - sets the `size` field to Set
1471+ pub struct SetSize<S: State = Empty>(PhantomData<fn() -> S>);
1472+ impl<S: State> sealed::Sealed for SetSize<S> {}
1473+ impl<S: State> State for SetSize<S> {
1474+ type Digest = S::Digest;
1475+ type Size = Set<members::size>;
1476+ type MediaType = S::MediaType;
1477+ }
1478+ ///State transition - sets the `media_type` field to Set
1479+ pub struct SetMediaType<S: State = Empty>(PhantomData<fn() -> S>);
1480+ impl<S: State> sealed::Sealed for SetMediaType<S> {}
1481+ impl<S: State> State for SetMediaType<S> {
1482+ type Digest = S::Digest;
1483+ type Size = S::Size;
1484+ type MediaType = Set<members::media_type>;
1485+ }
1486+ /// Marker types for field names
1487+ #[allow(non_camel_case_types)]
1488+ pub mod members {
1489+ ///Marker type for the `digest` field
1490+ pub struct digest(());
1491+ ///Marker type for the `size` field
1492+ pub struct size(());
1493+ ///Marker type for the `media_type` field
1494+ pub struct media_type(());
1495+ }
1496+}
1497+1498+/// Builder for constructing an instance of this type
1499+pub struct ManifestReferenceBuilder<'a, S: manifest_reference_state::State> {
1500+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
1501+ __unsafe_private_named: (
1502+ ::core::option::Option<jacquard_common::types::value::Data<'a>>,
1503+ ::core::option::Option<jacquard_common::CowStr<'a>>,
1504+ ::core::option::Option<jacquard_common::CowStr<'a>>,
1505+ ::core::option::Option<crate::io_atcr::manifest::Platform<'a>>,
1506+ ::core::option::Option<i64>,
1507+ ),
1508+ _phantom: ::core::marker::PhantomData<&'a ()>,
1509+}
1510+1511+impl<'a> ManifestReference<'a> {
1512+ /// Create a new builder for this type
1513+ pub fn new() -> ManifestReferenceBuilder<'a, manifest_reference_state::Empty> {
1514+ ManifestReferenceBuilder::new()
1515+ }
1516+}
1517+1518+impl<'a> ManifestReferenceBuilder<'a, manifest_reference_state::Empty> {
1519+ /// Create a new builder with all fields unset
1520+ pub fn new() -> Self {
1521+ ManifestReferenceBuilder {
1522+ _phantom_state: ::core::marker::PhantomData,
1523+ __unsafe_private_named: (None, None, None, None, None),
1524+ _phantom: ::core::marker::PhantomData,
1525+ }
1526+ }
1527+}
1528+1529+impl<'a, S: manifest_reference_state::State> ManifestReferenceBuilder<'a, S> {
1530+ /// Set the `annotations` field (optional)
1531+ pub fn annotations(
1532+ mut self,
1533+ value: impl Into<Option<jacquard_common::types::value::Data<'a>>>,
1534+ ) -> Self {
1535+ self.__unsafe_private_named.0 = value.into();
1536+ self
1537+ }
1538+ /// Set the `annotations` field to an Option value (optional)
1539+ pub fn maybe_annotations(
1540+ mut self,
1541+ value: Option<jacquard_common::types::value::Data<'a>>,
1542+ ) -> Self {
1543+ self.__unsafe_private_named.0 = value;
1544+ self
1545+ }
1546+}
1547+1548+impl<'a, S> ManifestReferenceBuilder<'a, S>
1549+where
1550+ S: manifest_reference_state::State,
1551+ S::Digest: manifest_reference_state::IsUnset,
1552+{
1553+ /// Set the `digest` field (required)
1554+ pub fn digest(
1555+ mut self,
1556+ value: impl Into<jacquard_common::CowStr<'a>>,
1557+ ) -> ManifestReferenceBuilder<'a, manifest_reference_state::SetDigest<S>> {
1558+ self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
1559+ ManifestReferenceBuilder {
1560+ _phantom_state: ::core::marker::PhantomData,
1561+ __unsafe_private_named: self.__unsafe_private_named,
1562+ _phantom: ::core::marker::PhantomData,
1563+ }
1564+ }
1565+}
1566+1567+impl<'a, S> ManifestReferenceBuilder<'a, S>
1568+where
1569+ S: manifest_reference_state::State,
1570+ S::MediaType: manifest_reference_state::IsUnset,
1571+{
1572+ /// Set the `mediaType` field (required)
1573+ pub fn media_type(
1574+ mut self,
1575+ value: impl Into<jacquard_common::CowStr<'a>>,
1576+ ) -> ManifestReferenceBuilder<'a, manifest_reference_state::SetMediaType<S>> {
1577+ self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
1578+ ManifestReferenceBuilder {
1579+ _phantom_state: ::core::marker::PhantomData,
1580+ __unsafe_private_named: self.__unsafe_private_named,
1581+ _phantom: ::core::marker::PhantomData,
1582+ }
1583+ }
1584+}
1585+1586+impl<'a, S: manifest_reference_state::State> ManifestReferenceBuilder<'a, S> {
1587+ /// Set the `platform` field (optional)
1588+ pub fn platform(
1589+ mut self,
1590+ value: impl Into<Option<crate::io_atcr::manifest::Platform<'a>>>,
1591+ ) -> Self {
1592+ self.__unsafe_private_named.3 = value.into();
1593+ self
1594+ }
1595+ /// Set the `platform` field to an Option value (optional)
1596+ pub fn maybe_platform(mut self, value: Option<crate::io_atcr::manifest::Platform<'a>>) -> Self {
1597+ self.__unsafe_private_named.3 = value;
1598+ self
1599+ }
1600+}
1601+1602+impl<'a, S> ManifestReferenceBuilder<'a, S>
1603+where
1604+ S: manifest_reference_state::State,
1605+ S::Size: manifest_reference_state::IsUnset,
1606+{
1607+ /// Set the `size` field (required)
1608+ pub fn size(
1609+ mut self,
1610+ value: impl Into<i64>,
1611+ ) -> ManifestReferenceBuilder<'a, manifest_reference_state::SetSize<S>> {
1612+ self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into());
1613+ ManifestReferenceBuilder {
1614+ _phantom_state: ::core::marker::PhantomData,
1615+ __unsafe_private_named: self.__unsafe_private_named,
1616+ _phantom: ::core::marker::PhantomData,
1617+ }
1618+ }
1619+}
1620+1621+impl<'a, S> ManifestReferenceBuilder<'a, S>
1622+where
1623+ S: manifest_reference_state::State,
1624+ S::Digest: manifest_reference_state::IsSet,
1625+ S::Size: manifest_reference_state::IsSet,
1626+ S::MediaType: manifest_reference_state::IsSet,
1627+{
1628+ /// Build the final struct
1629+ pub fn build(self) -> ManifestReference<'a> {
1630+ ManifestReference {
1631+ annotations: self.__unsafe_private_named.0,
1632+ digest: self.__unsafe_private_named.1.unwrap(),
1633+ media_type: self.__unsafe_private_named.2.unwrap(),
1634+ platform: self.__unsafe_private_named.3,
1635+ size: self.__unsafe_private_named.4.unwrap(),
1636+ extra_data: Default::default(),
1637+ }
1638+ }
1639+ /// Build the final struct with custom extra_data
1640+ pub fn build_with_data(
1641+ self,
1642+ extra_data: std::collections::BTreeMap<
1643+ jacquard_common::smol_str::SmolStr,
1644+ jacquard_common::types::value::Data<'a>,
1645+ >,
1646+ ) -> ManifestReference<'a> {
1647+ ManifestReference {
1648+ annotations: self.__unsafe_private_named.0,
1649+ digest: self.__unsafe_private_named.1.unwrap(),
1650+ media_type: self.__unsafe_private_named.2.unwrap(),
1651+ platform: self.__unsafe_private_named.3,
1652+ size: self.__unsafe_private_named.4.unwrap(),
1653+ extra_data: Some(extra_data),
1654+ }
1655+ }
1656+}
1657+1658+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ManifestReference<'a> {
1659+ fn nsid() -> &'static str {
1660+ "io.atcr.manifest"
1661+ }
1662+ fn def_name() -> &'static str {
1663+ "manifestReference"
1664+ }
1665+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
1666+ lexicon_doc_io_atcr_manifest()
1667+ }
1668+ fn validate(
1669+ &self,
1670+ ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
1671+ Ok(())
1672+ }
1673+}
1674+1675+/// Platform information describing OS and architecture
1676+#[jacquard_derive::lexicon]
1677+#[derive(
1678+ serde::Serialize,
1679+ serde::Deserialize,
1680+ Debug,
1681+ Clone,
1682+ PartialEq,
1683+ Eq,
1684+ jacquard_derive::IntoStatic,
1685+ Default,
1686+)]
1687+#[serde(rename_all = "camelCase")]
1688+pub struct Platform<'a> {
1689+ /// CPU architecture (e.g., 'amd64', 'arm64', 'arm')
1690+ #[serde(borrow)]
1691+ pub architecture: jacquard_common::CowStr<'a>,
1692+ /// Operating system (e.g., 'linux', 'windows', 'darwin')
1693+ #[serde(borrow)]
1694+ pub os: jacquard_common::CowStr<'a>,
1695+ /// Optional OS features
1696+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
1697+ #[serde(borrow)]
1698+ pub os_features: std::option::Option<Vec<jacquard_common::CowStr<'a>>>,
1699+ /// Optional OS version
1700+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
1701+ #[serde(borrow)]
1702+ pub os_version: std::option::Option<jacquard_common::CowStr<'a>>,
1703+ /// Optional CPU variant (e.g., 'v7' for ARM)
1704+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
1705+ #[serde(borrow)]
1706+ pub variant: std::option::Option<jacquard_common::CowStr<'a>>,
1707+}
1708+1709+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Platform<'a> {
1710+ fn nsid() -> &'static str {
1711+ "io.atcr.manifest"
1712+ }
1713+ fn def_name() -> &'static str {
1714+ "platform"
1715+ }
1716+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
1717+ lexicon_doc_io_atcr_manifest()
1718+ }
1719+ fn validate(
1720+ &self,
1721+ ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
1722+ Ok(())
1723+ }
1724+}
+7
crates/jacquard-api/src/io_atcr/sailor.rs
···0000000
···1+// @generated by jacquard-lexicon. DO NOT EDIT.
2+//
3+// This file was automatically generated from Lexicon schemas.
4+// Any manual changes will be overwritten on the next regeneration.
5+6+pub mod profile;
7+pub mod star;
···1+// @generated by jacquard-lexicon. DO NOT EDIT.
2+//
3+// Lexicon: io.atcr.tag
4+//
5+// This file was automatically generated from Lexicon schemas.
6+// Any manual changes will be overwritten on the next regeneration.
7+8+/// A named tag pointing to a specific manifest digest
9+#[jacquard_derive::lexicon]
10+#[derive(
11+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
12+)]
13+#[serde(rename_all = "camelCase")]
14+pub struct Tag<'a> {
15+ /// Tag creation timestamp
16+ pub created_at: jacquard_common::types::string::Datetime,
17+ /// AT-URI of the manifest this tag points to (e.g., 'at://did:plc:xyz/io.atcr.manifest/abc123'). Preferred over manifestDigest for new records.
18+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
19+ #[serde(borrow)]
20+ pub manifest: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
21+ /// DEPRECATED: Digest of the manifest (e.g., 'sha256:...'). Kept for backward compatibility with old records. New records should use 'manifest' field instead.
22+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
23+ #[serde(borrow)]
24+ pub manifest_digest: std::option::Option<jacquard_common::CowStr<'a>>,
25+ /// Repository name (e.g., 'myapp'). Scoped to user's DID.
26+ #[serde(borrow)]
27+ pub repository: jacquard_common::CowStr<'a>,
28+ /// Tag name (e.g., 'latest', 'v1.0.0', '12-slim')
29+ #[serde(borrow)]
30+ pub tag: jacquard_common::CowStr<'a>,
31+}
32+33+pub mod tag_state {
34+35+ pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
36+ #[allow(unused)]
37+ use ::core::marker::PhantomData;
38+ mod sealed {
39+ pub trait Sealed {}
40+ }
41+ /// State trait tracking which required fields have been set
42+ pub trait State: sealed::Sealed {
43+ type Repository;
44+ type CreatedAt;
45+ type Tag;
46+ }
47+ /// Empty state - all required fields are unset
48+ pub struct Empty(());
49+ impl sealed::Sealed for Empty {}
50+ impl State for Empty {
51+ type Repository = Unset;
52+ type CreatedAt = Unset;
53+ type Tag = Unset;
54+ }
55+ ///State transition - sets the `repository` field to Set
56+ pub struct SetRepository<S: State = Empty>(PhantomData<fn() -> S>);
57+ impl<S: State> sealed::Sealed for SetRepository<S> {}
58+ impl<S: State> State for SetRepository<S> {
59+ type Repository = Set<members::repository>;
60+ type CreatedAt = S::CreatedAt;
61+ type Tag = S::Tag;
62+ }
63+ ///State transition - sets the `created_at` field to Set
64+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
65+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
66+ impl<S: State> State for SetCreatedAt<S> {
67+ type Repository = S::Repository;
68+ type CreatedAt = Set<members::created_at>;
69+ type Tag = S::Tag;
70+ }
71+ ///State transition - sets the `tag` field to Set
72+ pub struct SetTag<S: State = Empty>(PhantomData<fn() -> S>);
73+ impl<S: State> sealed::Sealed for SetTag<S> {}
74+ impl<S: State> State for SetTag<S> {
75+ type Repository = S::Repository;
76+ type CreatedAt = S::CreatedAt;
77+ type Tag = Set<members::tag>;
78+ }
79+ /// Marker types for field names
80+ #[allow(non_camel_case_types)]
81+ pub mod members {
82+ ///Marker type for the `repository` field
83+ pub struct repository(());
84+ ///Marker type for the `created_at` field
85+ pub struct created_at(());
86+ ///Marker type for the `tag` field
87+ pub struct tag(());
88+ }
89+}
90+91+/// Builder for constructing an instance of this type
92+pub struct TagBuilder<'a, S: tag_state::State> {
93+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
94+ __unsafe_private_named: (
95+ ::core::option::Option<jacquard_common::types::string::Datetime>,
96+ ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
97+ ::core::option::Option<jacquard_common::CowStr<'a>>,
98+ ::core::option::Option<jacquard_common::CowStr<'a>>,
99+ ::core::option::Option<jacquard_common::CowStr<'a>>,
100+ ),
101+ _phantom: ::core::marker::PhantomData<&'a ()>,
102+}
103+104+impl<'a> Tag<'a> {
105+ /// Create a new builder for this type
106+ pub fn new() -> TagBuilder<'a, tag_state::Empty> {
107+ TagBuilder::new()
108+ }
109+}
110+111+impl<'a> TagBuilder<'a, tag_state::Empty> {
112+ /// Create a new builder with all fields unset
113+ pub fn new() -> Self {
114+ TagBuilder {
115+ _phantom_state: ::core::marker::PhantomData,
116+ __unsafe_private_named: (None, None, None, None, None),
117+ _phantom: ::core::marker::PhantomData,
118+ }
119+ }
120+}
121+122+impl<'a, S> TagBuilder<'a, S>
123+where
124+ S: tag_state::State,
125+ S::CreatedAt: tag_state::IsUnset,
126+{
127+ /// Set the `createdAt` field (required)
128+ pub fn created_at(
129+ mut self,
130+ value: impl Into<jacquard_common::types::string::Datetime>,
131+ ) -> TagBuilder<'a, tag_state::SetCreatedAt<S>> {
132+ self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
133+ TagBuilder {
134+ _phantom_state: ::core::marker::PhantomData,
135+ __unsafe_private_named: self.__unsafe_private_named,
136+ _phantom: ::core::marker::PhantomData,
137+ }
138+ }
139+}
140+141+impl<'a, S: tag_state::State> TagBuilder<'a, S> {
142+ /// Set the `manifest` field (optional)
143+ pub fn manifest(
144+ mut self,
145+ value: impl Into<Option<jacquard_common::types::string::AtUri<'a>>>,
146+ ) -> Self {
147+ self.__unsafe_private_named.1 = value.into();
148+ self
149+ }
150+ /// Set the `manifest` field to an Option value (optional)
151+ pub fn maybe_manifest(
152+ mut self,
153+ value: Option<jacquard_common::types::string::AtUri<'a>>,
154+ ) -> Self {
155+ self.__unsafe_private_named.1 = value;
156+ self
157+ }
158+}
159+160+impl<'a, S: tag_state::State> TagBuilder<'a, S> {
161+ /// Set the `manifestDigest` field (optional)
162+ pub fn manifest_digest(
163+ mut self,
164+ value: impl Into<Option<jacquard_common::CowStr<'a>>>,
165+ ) -> Self {
166+ self.__unsafe_private_named.2 = value.into();
167+ self
168+ }
169+ /// Set the `manifestDigest` field to an Option value (optional)
170+ pub fn maybe_manifest_digest(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
171+ self.__unsafe_private_named.2 = value;
172+ self
173+ }
174+}
175+176+impl<'a, S> TagBuilder<'a, S>
177+where
178+ S: tag_state::State,
179+ S::Repository: tag_state::IsUnset,
180+{
181+ /// Set the `repository` field (required)
182+ pub fn repository(
183+ mut self,
184+ value: impl Into<jacquard_common::CowStr<'a>>,
185+ ) -> TagBuilder<'a, tag_state::SetRepository<S>> {
186+ self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into());
187+ TagBuilder {
188+ _phantom_state: ::core::marker::PhantomData,
189+ __unsafe_private_named: self.__unsafe_private_named,
190+ _phantom: ::core::marker::PhantomData,
191+ }
192+ }
193+}
194+195+impl<'a, S> TagBuilder<'a, S>
196+where
197+ S: tag_state::State,
198+ S::Tag: tag_state::IsUnset,
199+{
200+ /// Set the `tag` field (required)
201+ pub fn tag(
202+ mut self,
203+ value: impl Into<jacquard_common::CowStr<'a>>,
204+ ) -> TagBuilder<'a, tag_state::SetTag<S>> {
205+ self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into());
206+ TagBuilder {
207+ _phantom_state: ::core::marker::PhantomData,
208+ __unsafe_private_named: self.__unsafe_private_named,
209+ _phantom: ::core::marker::PhantomData,
210+ }
211+ }
212+}
213+214+impl<'a, S> TagBuilder<'a, S>
215+where
216+ S: tag_state::State,
217+ S::Repository: tag_state::IsSet,
218+ S::CreatedAt: tag_state::IsSet,
219+ S::Tag: tag_state::IsSet,
220+{
221+ /// Build the final struct
222+ pub fn build(self) -> Tag<'a> {
223+ Tag {
224+ created_at: self.__unsafe_private_named.0.unwrap(),
225+ manifest: self.__unsafe_private_named.1,
226+ manifest_digest: self.__unsafe_private_named.2,
227+ repository: self.__unsafe_private_named.3.unwrap(),
228+ tag: self.__unsafe_private_named.4.unwrap(),
229+ extra_data: Default::default(),
230+ }
231+ }
232+ /// Build the final struct with custom extra_data
233+ pub fn build_with_data(
234+ self,
235+ extra_data: std::collections::BTreeMap<
236+ jacquard_common::smol_str::SmolStr,
237+ jacquard_common::types::value::Data<'a>,
238+ >,
239+ ) -> Tag<'a> {
240+ Tag {
241+ created_at: self.__unsafe_private_named.0.unwrap(),
242+ manifest: self.__unsafe_private_named.1,
243+ manifest_digest: self.__unsafe_private_named.2,
244+ repository: self.__unsafe_private_named.3.unwrap(),
245+ tag: self.__unsafe_private_named.4.unwrap(),
246+ extra_data: Some(extra_data),
247+ }
248+ }
249+}
250+251+impl<'a> Tag<'a> {
252+ pub fn uri(
253+ uri: impl Into<jacquard_common::CowStr<'a>>,
254+ ) -> Result<
255+ jacquard_common::types::uri::RecordUri<'a, TagRecord>,
256+ jacquard_common::types::uri::UriError,
257+ > {
258+ jacquard_common::types::uri::RecordUri::try_from_uri(
259+ jacquard_common::types::string::AtUri::new_cow(uri.into())?,
260+ )
261+ }
262+}
263+264+/// Typed wrapper for GetRecord response with this collection's record type.
265+#[derive(
266+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
267+)]
268+#[serde(rename_all = "camelCase")]
269+pub struct TagGetRecordOutput<'a> {
270+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
271+ #[serde(borrow)]
272+ pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
273+ #[serde(borrow)]
274+ pub uri: jacquard_common::types::string::AtUri<'a>,
275+ #[serde(borrow)]
276+ pub value: Tag<'a>,
277+}
278+279+impl From<TagGetRecordOutput<'_>> for Tag<'_> {
280+ fn from(output: TagGetRecordOutput<'_>) -> Self {
281+ use jacquard_common::IntoStatic;
282+ output.value.into_static()
283+ }
284+}
285+286+impl jacquard_common::types::collection::Collection for Tag<'_> {
287+ const NSID: &'static str = "io.atcr.tag";
288+ type Record = TagRecord;
289+}
290+291+/// Marker type for deserializing records from this collection.
292+#[derive(Debug, serde::Serialize, serde::Deserialize)]
293+pub struct TagRecord;
294+impl jacquard_common::xrpc::XrpcResp for TagRecord {
295+ const NSID: &'static str = "io.atcr.tag";
296+ const ENCODING: &'static str = "application/json";
297+ type Output<'de> = TagGetRecordOutput<'de>;
298+ type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
299+}
300+301+impl jacquard_common::types::collection::Collection for TagRecord {
302+ const NSID: &'static str = "io.atcr.tag";
303+ type Record = TagRecord;
304+}
305+306+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Tag<'a> {
307+ fn nsid() -> &'static str {
308+ "io.atcr.tag"
309+ }
310+ fn def_name() -> &'static str {
311+ "main"
312+ }
313+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
314+ lexicon_doc_io_atcr_tag()
315+ }
316+ fn validate(
317+ &self,
318+ ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
319+ {
320+ let value = &self.repository;
321+ #[allow(unused_comparisons)]
322+ if <str>::len(value.as_ref()) > 255usize {
323+ return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
324+ path: ::jacquard_lexicon::validation::ValidationPath::from_field("repository"),
325+ max: 255usize,
326+ actual: <str>::len(value.as_ref()),
327+ });
328+ }
329+ }
330+ {
331+ let value = &self.tag;
332+ #[allow(unused_comparisons)]
333+ if <str>::len(value.as_ref()) > 128usize {
334+ return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
335+ path: ::jacquard_lexicon::validation::ValidationPath::from_field("tag"),
336+ max: 128usize,
337+ actual: <str>::len(value.as_ref()),
338+ });
339+ }
340+ }
341+ Ok(())
342+ }
343+}
344+345+fn lexicon_doc_io_atcr_tag() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
346+ ::jacquard_lexicon::lexicon::LexiconDoc {
347+ lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
348+ id: ::jacquard_common::CowStr::new_static("io.atcr.tag"),
349+ revision: None,
350+ description: None,
351+ defs: {
352+ let mut map = ::std::collections::BTreeMap::new();
353+ map.insert(
354+ ::jacquard_common::smol_str::SmolStr::new_static("main"),
355+ ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord {
356+ description: Some(
357+ ::jacquard_common::CowStr::new_static(
358+ "A named tag pointing to a specific manifest digest",
359+ ),
360+ ),
361+ key: Some(::jacquard_common::CowStr::new_static("any")),
362+ record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject {
363+ description: None,
364+ required: Some(
365+ vec![
366+ ::jacquard_common::smol_str::SmolStr::new_static("repository"),
367+ ::jacquard_common::smol_str::SmolStr::new_static("tag"),
368+ ::jacquard_common::smol_str::SmolStr::new_static("createdAt")
369+ ],
370+ ),
371+ nullable: None,
372+ properties: {
373+ #[allow(unused_mut)]
374+ let mut map = ::std::collections::BTreeMap::new();
375+ map.insert(
376+ ::jacquard_common::smol_str::SmolStr::new_static(
377+ "createdAt",
378+ ),
379+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
380+ description: Some(
381+ ::jacquard_common::CowStr::new_static(
382+ "Tag creation timestamp",
383+ ),
384+ ),
385+ format: Some(
386+ ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
387+ ),
388+ default: None,
389+ min_length: None,
390+ max_length: None,
391+ min_graphemes: None,
392+ max_graphemes: None,
393+ r#enum: None,
394+ r#const: None,
395+ known_values: None,
396+ }),
397+ );
398+ map.insert(
399+ ::jacquard_common::smol_str::SmolStr::new_static(
400+ "manifest",
401+ ),
402+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
403+ description: Some(
404+ ::jacquard_common::CowStr::new_static(
405+ "AT-URI of the manifest this tag points to (e.g., 'at://did:plc:xyz/io.atcr.manifest/abc123'). Preferred over manifestDigest for new records.",
406+ ),
407+ ),
408+ format: Some(
409+ ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
410+ ),
411+ default: None,
412+ min_length: None,
413+ max_length: None,
414+ min_graphemes: None,
415+ max_graphemes: None,
416+ r#enum: None,
417+ r#const: None,
418+ known_values: None,
419+ }),
420+ );
421+ map.insert(
422+ ::jacquard_common::smol_str::SmolStr::new_static(
423+ "manifestDigest",
424+ ),
425+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
426+ description: Some(
427+ ::jacquard_common::CowStr::new_static(
428+ "DEPRECATED: Digest of the manifest (e.g., 'sha256:...'). Kept for backward compatibility with old records. New records should use 'manifest' field instead.",
429+ ),
430+ ),
431+ format: None,
432+ default: None,
433+ min_length: None,
434+ max_length: None,
435+ min_graphemes: None,
436+ max_graphemes: None,
437+ r#enum: None,
438+ r#const: None,
439+ known_values: None,
440+ }),
441+ );
442+ map.insert(
443+ ::jacquard_common::smol_str::SmolStr::new_static(
444+ "repository",
445+ ),
446+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
447+ description: Some(
448+ ::jacquard_common::CowStr::new_static(
449+ "Repository name (e.g., 'myapp'). Scoped to user's DID.",
450+ ),
451+ ),
452+ format: None,
453+ default: None,
454+ min_length: None,
455+ max_length: Some(255usize),
456+ min_graphemes: None,
457+ max_graphemes: None,
458+ r#enum: None,
459+ r#const: None,
460+ known_values: None,
461+ }),
462+ );
463+ map.insert(
464+ ::jacquard_common::smol_str::SmolStr::new_static("tag"),
465+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
466+ description: Some(
467+ ::jacquard_common::CowStr::new_static(
468+ "Tag name (e.g., 'latest', 'v1.0.0', '12-slim')",
469+ ),
470+ ),
471+ format: None,
472+ default: None,
473+ min_length: None,
474+ max_length: Some(128usize),
475+ min_graphemes: None,
476+ max_graphemes: None,
477+ r#enum: None,
478+ r#const: None,
479+ known_values: None,
480+ }),
481+ );
482+ map
483+ },
484+ }),
485+ }),
486+ );
487+ map
488+ },
489+ }
490+}
+7
crates/jacquard-api/src/io_whiteside.rs
···0000000
···1+// @generated by jacquard-lexicon. DO NOT EDIT.
2+//
3+// This file was automatically generated from Lexicon schemas.
4+// Any manual changes will be overwritten on the next regeneration.
5+6+pub mod linked_account;
7+pub mod profile;