···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// This file was automatically generated from Lexicon schemas.
44+// Any manual changes will be overwritten on the next regeneration.
55+66+pub mod facet;
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// Lexicon: com.5jiji.test.listVideos
44+//
55+// This file was automatically generated from Lexicon schemas.
66+// Any manual changes will be overwritten on the next regeneration.
77+88+#[derive(
99+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
1010+)]
1111+#[serde(rename_all = "camelCase")]
1212+pub struct ListVideos;
1313+/// The list of videos
1414+#[derive(
1515+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
1616+)]
1717+#[serde(rename_all = "camelCase")]
1818+pub struct ListVideosOutput {
1919+ pub body: bytes::Bytes,
2020+}
2121+2222+/// Response type for
2323+///com.5jiji.test.listVideos
2424+pub struct ListVideosResponse;
2525+impl jacquard_common::xrpc::XrpcResp for ListVideosResponse {
2626+ const NSID: &'static str = "com.5jiji.test.listVideos";
2727+ const ENCODING: &'static str = "application/json";
2828+ type Output<'de> = ListVideosOutput;
2929+ type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
3030+}
3131+3232+impl jacquard_common::xrpc::XrpcRequest for ListVideos {
3333+ const NSID: &'static str = "com.5jiji.test.listVideos";
3434+ const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
3535+ type Response = ListVideosResponse;
3636+}
3737+3838+/// Endpoint type for
3939+///com.5jiji.test.listVideos
4040+pub struct ListVideosRequest;
4141+impl jacquard_common::xrpc::XrpcEndpoint for ListVideosRequest {
4242+ const PATH: &'static str = "/xrpc/com.5jiji.test.listVideos";
4343+ const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
4444+ type Request<'de> = ListVideos;
4545+ type Response = ListVideosResponse;
4646+}
+6
crates/jacquard-api/src/com_yuna0x0.rs
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// This file was automatically generated from Lexicon schemas.
44+// Any manual changes will be overwritten on the next regeneration.
55+66+pub mod guestbook;
+6
crates/jacquard-api/src/com_yuna0x0/guestbook.rs
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// This file was automatically generated from Lexicon schemas.
44+// Any manual changes will be overwritten on the next regeneration.
55+66+pub mod sign;
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// Lexicon: com.yuna0x0.guestbook.sign
44+//
55+// This file was automatically generated from Lexicon schemas.
66+// Any manual changes will be overwritten on the next regeneration.
77+88+/// a sign in the guestbook
99+#[jacquard_derive::lexicon]
1010+#[derive(
1111+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
1212+)]
1313+#[serde(rename_all = "camelCase")]
1414+pub struct Sign<'a> {
1515+ pub created_at: jacquard_common::types::string::Datetime,
1616+ #[serde(borrow)]
1717+ pub message: jacquard_common::CowStr<'a>,
1818+ #[serde(borrow)]
1919+ pub subject: jacquard_common::types::ident::AtIdentifier<'a>,
2020+}
2121+2222+pub mod sign_state {
2323+2424+ pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
2525+ #[allow(unused)]
2626+ use ::core::marker::PhantomData;
2727+ mod sealed {
2828+ pub trait Sealed {}
2929+ }
3030+ /// State trait tracking which required fields have been set
3131+ pub trait State: sealed::Sealed {
3232+ type CreatedAt;
3333+ type Subject;
3434+ type Message;
3535+ }
3636+ /// Empty state - all required fields are unset
3737+ pub struct Empty(());
3838+ impl sealed::Sealed for Empty {}
3939+ impl State for Empty {
4040+ type CreatedAt = Unset;
4141+ type Subject = Unset;
4242+ type Message = Unset;
4343+ }
4444+ ///State transition - sets the `created_at` field to Set
4545+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
4646+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
4747+ impl<S: State> State for SetCreatedAt<S> {
4848+ type CreatedAt = Set<members::created_at>;
4949+ type Subject = S::Subject;
5050+ type Message = S::Message;
5151+ }
5252+ ///State transition - sets the `subject` field to Set
5353+ pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
5454+ impl<S: State> sealed::Sealed for SetSubject<S> {}
5555+ impl<S: State> State for SetSubject<S> {
5656+ type CreatedAt = S::CreatedAt;
5757+ type Subject = Set<members::subject>;
5858+ type Message = S::Message;
5959+ }
6060+ ///State transition - sets the `message` field to Set
6161+ pub struct SetMessage<S: State = Empty>(PhantomData<fn() -> S>);
6262+ impl<S: State> sealed::Sealed for SetMessage<S> {}
6363+ impl<S: State> State for SetMessage<S> {
6464+ type CreatedAt = S::CreatedAt;
6565+ type Subject = S::Subject;
6666+ type Message = Set<members::message>;
6767+ }
6868+ /// Marker types for field names
6969+ #[allow(non_camel_case_types)]
7070+ pub mod members {
7171+ ///Marker type for the `created_at` field
7272+ pub struct created_at(());
7373+ ///Marker type for the `subject` field
7474+ pub struct subject(());
7575+ ///Marker type for the `message` field
7676+ pub struct message(());
7777+ }
7878+}
7979+8080+/// Builder for constructing an instance of this type
8181+pub struct SignBuilder<'a, S: sign_state::State> {
8282+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
8383+ __unsafe_private_named: (
8484+ ::core::option::Option<jacquard_common::types::string::Datetime>,
8585+ ::core::option::Option<jacquard_common::CowStr<'a>>,
8686+ ::core::option::Option<jacquard_common::types::ident::AtIdentifier<'a>>,
8787+ ),
8888+ _phantom: ::core::marker::PhantomData<&'a ()>,
8989+}
9090+9191+impl<'a> Sign<'a> {
9292+ /// Create a new builder for this type
9393+ pub fn new() -> SignBuilder<'a, sign_state::Empty> {
9494+ SignBuilder::new()
9595+ }
9696+}
9797+9898+impl<'a> SignBuilder<'a, sign_state::Empty> {
9999+ /// Create a new builder with all fields unset
100100+ pub fn new() -> Self {
101101+ SignBuilder {
102102+ _phantom_state: ::core::marker::PhantomData,
103103+ __unsafe_private_named: (None, None, None),
104104+ _phantom: ::core::marker::PhantomData,
105105+ }
106106+ }
107107+}
108108+109109+impl<'a, S> SignBuilder<'a, S>
110110+where
111111+ S: sign_state::State,
112112+ S::CreatedAt: sign_state::IsUnset,
113113+{
114114+ /// Set the `createdAt` field (required)
115115+ pub fn created_at(
116116+ mut self,
117117+ value: impl Into<jacquard_common::types::string::Datetime>,
118118+ ) -> SignBuilder<'a, sign_state::SetCreatedAt<S>> {
119119+ self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
120120+ SignBuilder {
121121+ _phantom_state: ::core::marker::PhantomData,
122122+ __unsafe_private_named: self.__unsafe_private_named,
123123+ _phantom: ::core::marker::PhantomData,
124124+ }
125125+ }
126126+}
127127+128128+impl<'a, S> SignBuilder<'a, S>
129129+where
130130+ S: sign_state::State,
131131+ S::Message: sign_state::IsUnset,
132132+{
133133+ /// Set the `message` field (required)
134134+ pub fn message(
135135+ mut self,
136136+ value: impl Into<jacquard_common::CowStr<'a>>,
137137+ ) -> SignBuilder<'a, sign_state::SetMessage<S>> {
138138+ self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
139139+ SignBuilder {
140140+ _phantom_state: ::core::marker::PhantomData,
141141+ __unsafe_private_named: self.__unsafe_private_named,
142142+ _phantom: ::core::marker::PhantomData,
143143+ }
144144+ }
145145+}
146146+147147+impl<'a, S> SignBuilder<'a, S>
148148+where
149149+ S: sign_state::State,
150150+ S::Subject: sign_state::IsUnset,
151151+{
152152+ /// Set the `subject` field (required)
153153+ pub fn subject(
154154+ mut self,
155155+ value: impl Into<jacquard_common::types::ident::AtIdentifier<'a>>,
156156+ ) -> SignBuilder<'a, sign_state::SetSubject<S>> {
157157+ self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
158158+ SignBuilder {
159159+ _phantom_state: ::core::marker::PhantomData,
160160+ __unsafe_private_named: self.__unsafe_private_named,
161161+ _phantom: ::core::marker::PhantomData,
162162+ }
163163+ }
164164+}
165165+166166+impl<'a, S> SignBuilder<'a, S>
167167+where
168168+ S: sign_state::State,
169169+ S::CreatedAt: sign_state::IsSet,
170170+ S::Subject: sign_state::IsSet,
171171+ S::Message: sign_state::IsSet,
172172+{
173173+ /// Build the final struct
174174+ pub fn build(self) -> Sign<'a> {
175175+ Sign {
176176+ created_at: self.__unsafe_private_named.0.unwrap(),
177177+ message: self.__unsafe_private_named.1.unwrap(),
178178+ subject: self.__unsafe_private_named.2.unwrap(),
179179+ extra_data: Default::default(),
180180+ }
181181+ }
182182+ /// Build the final struct with custom extra_data
183183+ pub fn build_with_data(
184184+ self,
185185+ extra_data: std::collections::BTreeMap<
186186+ jacquard_common::smol_str::SmolStr,
187187+ jacquard_common::types::value::Data<'a>,
188188+ >,
189189+ ) -> Sign<'a> {
190190+ Sign {
191191+ created_at: self.__unsafe_private_named.0.unwrap(),
192192+ message: self.__unsafe_private_named.1.unwrap(),
193193+ subject: self.__unsafe_private_named.2.unwrap(),
194194+ extra_data: Some(extra_data),
195195+ }
196196+ }
197197+}
198198+199199+impl<'a> Sign<'a> {
200200+ pub fn uri(
201201+ uri: impl Into<jacquard_common::CowStr<'a>>,
202202+ ) -> Result<
203203+ jacquard_common::types::uri::RecordUri<'a, SignRecord>,
204204+ jacquard_common::types::uri::UriError,
205205+ > {
206206+ jacquard_common::types::uri::RecordUri::try_from_uri(
207207+ jacquard_common::types::string::AtUri::new_cow(uri.into())?,
208208+ )
209209+ }
210210+}
211211+212212+/// Typed wrapper for GetRecord response with this collection's record type.
213213+#[derive(
214214+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
215215+)]
216216+#[serde(rename_all = "camelCase")]
217217+pub struct SignGetRecordOutput<'a> {
218218+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
219219+ #[serde(borrow)]
220220+ pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
221221+ #[serde(borrow)]
222222+ pub uri: jacquard_common::types::string::AtUri<'a>,
223223+ #[serde(borrow)]
224224+ pub value: Sign<'a>,
225225+}
226226+227227+impl From<SignGetRecordOutput<'_>> for Sign<'_> {
228228+ fn from(output: SignGetRecordOutput<'_>) -> Self {
229229+ use jacquard_common::IntoStatic;
230230+ output.value.into_static()
231231+ }
232232+}
233233+234234+impl jacquard_common::types::collection::Collection for Sign<'_> {
235235+ const NSID: &'static str = "com.yuna0x0.guestbook.sign";
236236+ type Record = SignRecord;
237237+}
238238+239239+/// Marker type for deserializing records from this collection.
240240+#[derive(Debug, serde::Serialize, serde::Deserialize)]
241241+pub struct SignRecord;
242242+impl jacquard_common::xrpc::XrpcResp for SignRecord {
243243+ const NSID: &'static str = "com.yuna0x0.guestbook.sign";
244244+ const ENCODING: &'static str = "application/json";
245245+ type Output<'de> = SignGetRecordOutput<'de>;
246246+ type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
247247+}
248248+249249+impl jacquard_common::types::collection::Collection for SignRecord {
250250+ const NSID: &'static str = "com.yuna0x0.guestbook.sign";
251251+ type Record = SignRecord;
252252+}
253253+254254+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Sign<'a> {
255255+ fn nsid() -> &'static str {
256256+ "com.yuna0x0.guestbook.sign"
257257+ }
258258+ fn def_name() -> &'static str {
259259+ "main"
260260+ }
261261+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
262262+ lexicon_doc_com_yuna0x0_guestbook_sign()
263263+ }
264264+ fn validate(
265265+ &self,
266266+ ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
267267+ {
268268+ let value = &self.message;
269269+ #[allow(unused_comparisons)]
270270+ if <str>::len(value.as_ref()) > 100usize {
271271+ return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
272272+ path: ::jacquard_lexicon::validation::ValidationPath::from_field("message"),
273273+ max: 100usize,
274274+ actual: <str>::len(value.as_ref()),
275275+ });
276276+ }
277277+ }
278278+ Ok(())
279279+ }
280280+}
281281+282282+fn lexicon_doc_com_yuna0x0_guestbook_sign() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
283283+ ::jacquard_lexicon::lexicon::LexiconDoc {
284284+ lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
285285+ id: ::jacquard_common::CowStr::new_static("com.yuna0x0.guestbook.sign"),
286286+ revision: None,
287287+ description: None,
288288+ defs: {
289289+ let mut map = ::std::collections::BTreeMap::new();
290290+ map.insert(
291291+ ::jacquard_common::smol_str::SmolStr::new_static("main"),
292292+ ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord {
293293+ description: Some(
294294+ ::jacquard_common::CowStr::new_static("a sign in the guestbook"),
295295+ ),
296296+ key: Some(::jacquard_common::CowStr::new_static("tid")),
297297+ record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject {
298298+ description: None,
299299+ required: Some(
300300+ vec![
301301+ ::jacquard_common::smol_str::SmolStr::new_static("subject"),
302302+ ::jacquard_common::smol_str::SmolStr::new_static("createdAt"),
303303+ ::jacquard_common::smol_str::SmolStr::new_static("message")
304304+ ],
305305+ ),
306306+ nullable: None,
307307+ properties: {
308308+ #[allow(unused_mut)]
309309+ let mut map = ::std::collections::BTreeMap::new();
310310+ map.insert(
311311+ ::jacquard_common::smol_str::SmolStr::new_static(
312312+ "createdAt",
313313+ ),
314314+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
315315+ description: None,
316316+ format: Some(
317317+ ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
318318+ ),
319319+ default: None,
320320+ min_length: None,
321321+ max_length: None,
322322+ min_graphemes: None,
323323+ max_graphemes: None,
324324+ r#enum: None,
325325+ r#const: None,
326326+ known_values: None,
327327+ }),
328328+ );
329329+ map.insert(
330330+ ::jacquard_common::smol_str::SmolStr::new_static("message"),
331331+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
332332+ description: None,
333333+ format: None,
334334+ default: None,
335335+ min_length: None,
336336+ max_length: Some(100usize),
337337+ min_graphemes: None,
338338+ max_graphemes: None,
339339+ r#enum: None,
340340+ r#const: None,
341341+ known_values: None,
342342+ }),
343343+ );
344344+ map.insert(
345345+ ::jacquard_common::smol_str::SmolStr::new_static("subject"),
346346+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
347347+ description: None,
348348+ format: Some(
349349+ ::jacquard_lexicon::lexicon::LexStringFormat::AtIdentifier,
350350+ ),
351351+ default: None,
352352+ min_length: None,
353353+ max_length: None,
354354+ min_graphemes: None,
355355+ max_graphemes: None,
356356+ r#enum: None,
357357+ r#const: None,
358358+ known_values: None,
359359+ }),
360360+ );
361361+ map
362362+ },
363363+ }),
364364+ }),
365365+ );
366366+ map
367367+ },
368368+ }
369369+}
+6
crates/jacquard-api/src/fyi_questionable/actor.rs
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// This file was automatically generated from Lexicon schemas.
44+// Any manual changes will be overwritten on the next regeneration.
55+66+pub mod profile;
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// Lexicon: fyi.questionable.actor.profile
44+//
55+// This file was automatically generated from Lexicon schemas.
66+// Any manual changes will be overwritten on the next regeneration.
77+88+/// A declaration of a Questionable account profile.
99+#[jacquard_derive::lexicon]
1010+#[derive(
1111+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
1212+)]
1313+#[serde(rename_all = "camelCase")]
1414+pub struct Profile<'a> {
1515+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
1616+ pub created_at: std::option::Option<jacquard_common::types::string::Datetime>,
1717+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
1818+ #[serde(borrow)]
1919+ pub display_name: std::option::Option<jacquard_common::CowStr<'a>>,
2020+}
2121+2222+pub mod profile_state {
2323+2424+ pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
2525+ #[allow(unused)]
2626+ use ::core::marker::PhantomData;
2727+ mod sealed {
2828+ pub trait Sealed {}
2929+ }
3030+ /// State trait tracking which required fields have been set
3131+ pub trait State: sealed::Sealed {}
3232+ /// Empty state - all required fields are unset
3333+ pub struct Empty(());
3434+ impl sealed::Sealed for Empty {}
3535+ impl State for Empty {}
3636+ /// Marker types for field names
3737+ #[allow(non_camel_case_types)]
3838+ pub mod members {}
3939+}
4040+4141+/// Builder for constructing an instance of this type
4242+pub struct ProfileBuilder<'a, S: profile_state::State> {
4343+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
4444+ __unsafe_private_named: (
4545+ ::core::option::Option<jacquard_common::types::string::Datetime>,
4646+ ::core::option::Option<jacquard_common::CowStr<'a>>,
4747+ ),
4848+ _phantom: ::core::marker::PhantomData<&'a ()>,
4949+}
5050+5151+impl<'a> Profile<'a> {
5252+ /// Create a new builder for this type
5353+ pub fn new() -> ProfileBuilder<'a, profile_state::Empty> {
5454+ ProfileBuilder::new()
5555+ }
5656+}
5757+5858+impl<'a> ProfileBuilder<'a, profile_state::Empty> {
5959+ /// Create a new builder with all fields unset
6060+ pub fn new() -> Self {
6161+ ProfileBuilder {
6262+ _phantom_state: ::core::marker::PhantomData,
6363+ __unsafe_private_named: (None, None),
6464+ _phantom: ::core::marker::PhantomData,
6565+ }
6666+ }
6767+}
6868+6969+impl<'a, S: profile_state::State> ProfileBuilder<'a, S> {
7070+ /// Set the `createdAt` field (optional)
7171+ pub fn created_at(
7272+ mut self,
7373+ value: impl Into<Option<jacquard_common::types::string::Datetime>>,
7474+ ) -> Self {
7575+ self.__unsafe_private_named.0 = value.into();
7676+ self
7777+ }
7878+ /// Set the `createdAt` field to an Option value (optional)
7979+ pub fn maybe_created_at(
8080+ mut self,
8181+ value: Option<jacquard_common::types::string::Datetime>,
8282+ ) -> Self {
8383+ self.__unsafe_private_named.0 = value;
8484+ self
8585+ }
8686+}
8787+8888+impl<'a, S: profile_state::State> ProfileBuilder<'a, S> {
8989+ /// Set the `displayName` field (optional)
9090+ pub fn display_name(mut self, value: impl Into<Option<jacquard_common::CowStr<'a>>>) -> Self {
9191+ self.__unsafe_private_named.1 = value.into();
9292+ self
9393+ }
9494+ /// Set the `displayName` field to an Option value (optional)
9595+ pub fn maybe_display_name(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
9696+ self.__unsafe_private_named.1 = value;
9797+ self
9898+ }
9999+}
100100+101101+impl<'a, S> ProfileBuilder<'a, S>
102102+where
103103+ S: profile_state::State,
104104+{
105105+ /// Build the final struct
106106+ pub fn build(self) -> Profile<'a> {
107107+ Profile {
108108+ created_at: self.__unsafe_private_named.0,
109109+ display_name: self.__unsafe_private_named.1,
110110+ extra_data: Default::default(),
111111+ }
112112+ }
113113+ /// Build the final struct with custom extra_data
114114+ pub fn build_with_data(
115115+ self,
116116+ extra_data: std::collections::BTreeMap<
117117+ jacquard_common::smol_str::SmolStr,
118118+ jacquard_common::types::value::Data<'a>,
119119+ >,
120120+ ) -> Profile<'a> {
121121+ Profile {
122122+ created_at: self.__unsafe_private_named.0,
123123+ display_name: self.__unsafe_private_named.1,
124124+ extra_data: Some(extra_data),
125125+ }
126126+ }
127127+}
128128+129129+impl<'a> Profile<'a> {
130130+ pub fn uri(
131131+ uri: impl Into<jacquard_common::CowStr<'a>>,
132132+ ) -> Result<
133133+ jacquard_common::types::uri::RecordUri<'a, ProfileRecord>,
134134+ jacquard_common::types::uri::UriError,
135135+ > {
136136+ jacquard_common::types::uri::RecordUri::try_from_uri(
137137+ jacquard_common::types::string::AtUri::new_cow(uri.into())?,
138138+ )
139139+ }
140140+}
141141+142142+/// Typed wrapper for GetRecord response with this collection's record type.
143143+#[derive(
144144+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
145145+)]
146146+#[serde(rename_all = "camelCase")]
147147+pub struct ProfileGetRecordOutput<'a> {
148148+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
149149+ #[serde(borrow)]
150150+ pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
151151+ #[serde(borrow)]
152152+ pub uri: jacquard_common::types::string::AtUri<'a>,
153153+ #[serde(borrow)]
154154+ pub value: Profile<'a>,
155155+}
156156+157157+impl From<ProfileGetRecordOutput<'_>> for Profile<'_> {
158158+ fn from(output: ProfileGetRecordOutput<'_>) -> Self {
159159+ use jacquard_common::IntoStatic;
160160+ output.value.into_static()
161161+ }
162162+}
163163+164164+impl jacquard_common::types::collection::Collection for Profile<'_> {
165165+ const NSID: &'static str = "fyi.questionable.actor.profile";
166166+ type Record = ProfileRecord;
167167+}
168168+169169+/// Marker type for deserializing records from this collection.
170170+#[derive(Debug, serde::Serialize, serde::Deserialize)]
171171+pub struct ProfileRecord;
172172+impl jacquard_common::xrpc::XrpcResp for ProfileRecord {
173173+ const NSID: &'static str = "fyi.questionable.actor.profile";
174174+ const ENCODING: &'static str = "application/json";
175175+ type Output<'de> = ProfileGetRecordOutput<'de>;
176176+ type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
177177+}
178178+179179+impl jacquard_common::types::collection::Collection for ProfileRecord {
180180+ const NSID: &'static str = "fyi.questionable.actor.profile";
181181+ type Record = ProfileRecord;
182182+}
183183+184184+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Profile<'a> {
185185+ fn nsid() -> &'static str {
186186+ "fyi.questionable.actor.profile"
187187+ }
188188+ fn def_name() -> &'static str {
189189+ "main"
190190+ }
191191+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
192192+ lexicon_doc_fyi_questionable_actor_profile()
193193+ }
194194+ fn validate(
195195+ &self,
196196+ ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
197197+ if let Some(ref value) = self.display_name {
198198+ #[allow(unused_comparisons)]
199199+ if <str>::len(value.as_ref()) > 640usize {
200200+ return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
201201+ path: ::jacquard_lexicon::validation::ValidationPath::from_field(
202202+ "display_name",
203203+ ),
204204+ max: 640usize,
205205+ actual: <str>::len(value.as_ref()),
206206+ });
207207+ }
208208+ }
209209+ if let Some(ref value) = self.display_name {
210210+ {
211211+ let count =
212212+ ::unicode_segmentation::UnicodeSegmentation::graphemes(value.as_ref(), true)
213213+ .count();
214214+ if count > 64usize {
215215+ return Err(
216216+ ::jacquard_lexicon::validation::ConstraintError::MaxGraphemes {
217217+ path: ::jacquard_lexicon::validation::ValidationPath::from_field(
218218+ "display_name",
219219+ ),
220220+ max: 64usize,
221221+ actual: count,
222222+ },
223223+ );
224224+ }
225225+ }
226226+ }
227227+ Ok(())
228228+ }
229229+}
230230+231231+fn lexicon_doc_fyi_questionable_actor_profile() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static>
232232+{
233233+ ::jacquard_lexicon::lexicon::LexiconDoc {
234234+ lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
235235+ id: ::jacquard_common::CowStr::new_static("fyi.questionable.actor.profile"),
236236+ revision: None,
237237+ description: None,
238238+ defs: {
239239+ let mut map = ::std::collections::BTreeMap::new();
240240+ map.insert(
241241+ ::jacquard_common::smol_str::SmolStr::new_static("main"),
242242+ ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord {
243243+ description: Some(
244244+ ::jacquard_common::CowStr::new_static(
245245+ "A declaration of a Questionable account profile.",
246246+ ),
247247+ ),
248248+ key: Some(::jacquard_common::CowStr::new_static("literal:self")),
249249+ record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject {
250250+ description: None,
251251+ required: None,
252252+ nullable: None,
253253+ properties: {
254254+ #[allow(unused_mut)]
255255+ let mut map = ::std::collections::BTreeMap::new();
256256+ map.insert(
257257+ ::jacquard_common::smol_str::SmolStr::new_static(
258258+ "createdAt",
259259+ ),
260260+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
261261+ description: None,
262262+ format: Some(
263263+ ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
264264+ ),
265265+ default: None,
266266+ min_length: None,
267267+ max_length: None,
268268+ min_graphemes: None,
269269+ max_graphemes: None,
270270+ r#enum: None,
271271+ r#const: None,
272272+ known_values: None,
273273+ }),
274274+ );
275275+ map.insert(
276276+ ::jacquard_common::smol_str::SmolStr::new_static(
277277+ "displayName",
278278+ ),
279279+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
280280+ description: None,
281281+ format: None,
282282+ default: None,
283283+ min_length: None,
284284+ max_length: Some(640usize),
285285+ min_graphemes: None,
286286+ max_graphemes: Some(64usize),
287287+ r#enum: None,
288288+ r#const: None,
289289+ known_values: None,
290290+ }),
291291+ );
292292+ map
293293+ },
294294+ }),
295295+ }),
296296+ );
297297+ map
298298+ },
299299+ }
300300+}
+6
crates/jacquard-api/src/games_firehose.rs
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// This file was automatically generated from Lexicon schemas.
44+// Any manual changes will be overwritten on the next regeneration.
55+66+pub mod barklesheep;
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// This file was automatically generated from Lexicon schemas.
44+// Any manual changes will be overwritten on the next regeneration.
55+66+pub mod place_sheeps;
77+pub mod reaction;
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// Lexicon: games.firehose.barklesheep.reaction
44+//
55+// This file was automatically generated from Lexicon schemas.
66+// Any manual changes will be overwritten on the next regeneration.
77+88+/// A reaction in a Barklesheep game
99+#[jacquard_derive::lexicon]
1010+#[derive(
1111+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
1212+)]
1313+#[serde(rename_all = "camelCase")]
1414+pub struct Reaction<'a> {
1515+ pub created_at: jacquard_common::types::string::Datetime,
1616+ #[serde(borrow)]
1717+ pub emoji: jacquard_common::CowStr<'a>,
1818+ #[serde(borrow)]
1919+ pub game_id: jacquard_common::CowStr<'a>,
2020+}
2121+2222+pub mod reaction_state {
2323+2424+ pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
2525+ #[allow(unused)]
2626+ use ::core::marker::PhantomData;
2727+ mod sealed {
2828+ pub trait Sealed {}
2929+ }
3030+ /// State trait tracking which required fields have been set
3131+ pub trait State: sealed::Sealed {
3232+ type Emoji;
3333+ type GameId;
3434+ type CreatedAt;
3535+ }
3636+ /// Empty state - all required fields are unset
3737+ pub struct Empty(());
3838+ impl sealed::Sealed for Empty {}
3939+ impl State for Empty {
4040+ type Emoji = Unset;
4141+ type GameId = Unset;
4242+ type CreatedAt = Unset;
4343+ }
4444+ ///State transition - sets the `emoji` field to Set
4545+ pub struct SetEmoji<S: State = Empty>(PhantomData<fn() -> S>);
4646+ impl<S: State> sealed::Sealed for SetEmoji<S> {}
4747+ impl<S: State> State for SetEmoji<S> {
4848+ type Emoji = Set<members::emoji>;
4949+ type GameId = S::GameId;
5050+ type CreatedAt = S::CreatedAt;
5151+ }
5252+ ///State transition - sets the `game_id` field to Set
5353+ pub struct SetGameId<S: State = Empty>(PhantomData<fn() -> S>);
5454+ impl<S: State> sealed::Sealed for SetGameId<S> {}
5555+ impl<S: State> State for SetGameId<S> {
5656+ type Emoji = S::Emoji;
5757+ type GameId = Set<members::game_id>;
5858+ type CreatedAt = S::CreatedAt;
5959+ }
6060+ ///State transition - sets the `created_at` field to Set
6161+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
6262+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
6363+ impl<S: State> State for SetCreatedAt<S> {
6464+ type Emoji = S::Emoji;
6565+ type GameId = S::GameId;
6666+ type CreatedAt = Set<members::created_at>;
6767+ }
6868+ /// Marker types for field names
6969+ #[allow(non_camel_case_types)]
7070+ pub mod members {
7171+ ///Marker type for the `emoji` field
7272+ pub struct emoji(());
7373+ ///Marker type for the `game_id` field
7474+ pub struct game_id(());
7575+ ///Marker type for the `created_at` field
7676+ pub struct created_at(());
7777+ }
7878+}
7979+8080+/// Builder for constructing an instance of this type
8181+pub struct ReactionBuilder<'a, S: reaction_state::State> {
8282+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
8383+ __unsafe_private_named: (
8484+ ::core::option::Option<jacquard_common::types::string::Datetime>,
8585+ ::core::option::Option<jacquard_common::CowStr<'a>>,
8686+ ::core::option::Option<jacquard_common::CowStr<'a>>,
8787+ ),
8888+ _phantom: ::core::marker::PhantomData<&'a ()>,
8989+}
9090+9191+impl<'a> Reaction<'a> {
9292+ /// Create a new builder for this type
9393+ pub fn new() -> ReactionBuilder<'a, reaction_state::Empty> {
9494+ ReactionBuilder::new()
9595+ }
9696+}
9797+9898+impl<'a> ReactionBuilder<'a, reaction_state::Empty> {
9999+ /// Create a new builder with all fields unset
100100+ pub fn new() -> Self {
101101+ ReactionBuilder {
102102+ _phantom_state: ::core::marker::PhantomData,
103103+ __unsafe_private_named: (None, None, None),
104104+ _phantom: ::core::marker::PhantomData,
105105+ }
106106+ }
107107+}
108108+109109+impl<'a, S> ReactionBuilder<'a, S>
110110+where
111111+ S: reaction_state::State,
112112+ S::CreatedAt: reaction_state::IsUnset,
113113+{
114114+ /// Set the `createdAt` field (required)
115115+ pub fn created_at(
116116+ mut self,
117117+ value: impl Into<jacquard_common::types::string::Datetime>,
118118+ ) -> ReactionBuilder<'a, reaction_state::SetCreatedAt<S>> {
119119+ self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
120120+ ReactionBuilder {
121121+ _phantom_state: ::core::marker::PhantomData,
122122+ __unsafe_private_named: self.__unsafe_private_named,
123123+ _phantom: ::core::marker::PhantomData,
124124+ }
125125+ }
126126+}
127127+128128+impl<'a, S> ReactionBuilder<'a, S>
129129+where
130130+ S: reaction_state::State,
131131+ S::Emoji: reaction_state::IsUnset,
132132+{
133133+ /// Set the `emoji` field (required)
134134+ pub fn emoji(
135135+ mut self,
136136+ value: impl Into<jacquard_common::CowStr<'a>>,
137137+ ) -> ReactionBuilder<'a, reaction_state::SetEmoji<S>> {
138138+ self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
139139+ ReactionBuilder {
140140+ _phantom_state: ::core::marker::PhantomData,
141141+ __unsafe_private_named: self.__unsafe_private_named,
142142+ _phantom: ::core::marker::PhantomData,
143143+ }
144144+ }
145145+}
146146+147147+impl<'a, S> ReactionBuilder<'a, S>
148148+where
149149+ S: reaction_state::State,
150150+ S::GameId: reaction_state::IsUnset,
151151+{
152152+ /// Set the `gameId` field (required)
153153+ pub fn game_id(
154154+ mut self,
155155+ value: impl Into<jacquard_common::CowStr<'a>>,
156156+ ) -> ReactionBuilder<'a, reaction_state::SetGameId<S>> {
157157+ self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
158158+ ReactionBuilder {
159159+ _phantom_state: ::core::marker::PhantomData,
160160+ __unsafe_private_named: self.__unsafe_private_named,
161161+ _phantom: ::core::marker::PhantomData,
162162+ }
163163+ }
164164+}
165165+166166+impl<'a, S> ReactionBuilder<'a, S>
167167+where
168168+ S: reaction_state::State,
169169+ S::Emoji: reaction_state::IsSet,
170170+ S::GameId: reaction_state::IsSet,
171171+ S::CreatedAt: reaction_state::IsSet,
172172+{
173173+ /// Build the final struct
174174+ pub fn build(self) -> Reaction<'a> {
175175+ Reaction {
176176+ created_at: self.__unsafe_private_named.0.unwrap(),
177177+ emoji: self.__unsafe_private_named.1.unwrap(),
178178+ game_id: self.__unsafe_private_named.2.unwrap(),
179179+ extra_data: Default::default(),
180180+ }
181181+ }
182182+ /// Build the final struct with custom extra_data
183183+ pub fn build_with_data(
184184+ self,
185185+ extra_data: std::collections::BTreeMap<
186186+ jacquard_common::smol_str::SmolStr,
187187+ jacquard_common::types::value::Data<'a>,
188188+ >,
189189+ ) -> Reaction<'a> {
190190+ Reaction {
191191+ created_at: self.__unsafe_private_named.0.unwrap(),
192192+ emoji: self.__unsafe_private_named.1.unwrap(),
193193+ game_id: self.__unsafe_private_named.2.unwrap(),
194194+ extra_data: Some(extra_data),
195195+ }
196196+ }
197197+}
198198+199199+impl<'a> Reaction<'a> {
200200+ pub fn uri(
201201+ uri: impl Into<jacquard_common::CowStr<'a>>,
202202+ ) -> Result<
203203+ jacquard_common::types::uri::RecordUri<'a, ReactionRecord>,
204204+ jacquard_common::types::uri::UriError,
205205+ > {
206206+ jacquard_common::types::uri::RecordUri::try_from_uri(
207207+ jacquard_common::types::string::AtUri::new_cow(uri.into())?,
208208+ )
209209+ }
210210+}
211211+212212+/// Typed wrapper for GetRecord response with this collection's record type.
213213+#[derive(
214214+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
215215+)]
216216+#[serde(rename_all = "camelCase")]
217217+pub struct ReactionGetRecordOutput<'a> {
218218+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
219219+ #[serde(borrow)]
220220+ pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
221221+ #[serde(borrow)]
222222+ pub uri: jacquard_common::types::string::AtUri<'a>,
223223+ #[serde(borrow)]
224224+ pub value: Reaction<'a>,
225225+}
226226+227227+impl From<ReactionGetRecordOutput<'_>> for Reaction<'_> {
228228+ fn from(output: ReactionGetRecordOutput<'_>) -> Self {
229229+ use jacquard_common::IntoStatic;
230230+ output.value.into_static()
231231+ }
232232+}
233233+234234+impl jacquard_common::types::collection::Collection for Reaction<'_> {
235235+ const NSID: &'static str = "games.firehose.barklesheep.reaction";
236236+ type Record = ReactionRecord;
237237+}
238238+239239+/// Marker type for deserializing records from this collection.
240240+#[derive(Debug, serde::Serialize, serde::Deserialize)]
241241+pub struct ReactionRecord;
242242+impl jacquard_common::xrpc::XrpcResp for ReactionRecord {
243243+ const NSID: &'static str = "games.firehose.barklesheep.reaction";
244244+ const ENCODING: &'static str = "application/json";
245245+ type Output<'de> = ReactionGetRecordOutput<'de>;
246246+ type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
247247+}
248248+249249+impl jacquard_common::types::collection::Collection for ReactionRecord {
250250+ const NSID: &'static str = "games.firehose.barklesheep.reaction";
251251+ type Record = ReactionRecord;
252252+}
253253+254254+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Reaction<'a> {
255255+ fn nsid() -> &'static str {
256256+ "games.firehose.barklesheep.reaction"
257257+ }
258258+ fn def_name() -> &'static str {
259259+ "main"
260260+ }
261261+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
262262+ lexicon_doc_games_firehose_barklesheep_reaction()
263263+ }
264264+ fn validate(
265265+ &self,
266266+ ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
267267+ {
268268+ let value = &self.emoji;
269269+ #[allow(unused_comparisons)]
270270+ if <str>::len(value.as_ref()) > 4usize {
271271+ return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
272272+ path: ::jacquard_lexicon::validation::ValidationPath::from_field("emoji"),
273273+ max: 4usize,
274274+ actual: <str>::len(value.as_ref()),
275275+ });
276276+ }
277277+ }
278278+ Ok(())
279279+ }
280280+}
281281+282282+fn lexicon_doc_games_firehose_barklesheep_reaction()
283283+-> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
284284+ ::jacquard_lexicon::lexicon::LexiconDoc {
285285+ lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
286286+ id: ::jacquard_common::CowStr::new_static("games.firehose.barklesheep.reaction"),
287287+ revision: None,
288288+ description: None,
289289+ defs: {
290290+ let mut map = ::std::collections::BTreeMap::new();
291291+ map.insert(
292292+ ::jacquard_common::smol_str::SmolStr::new_static("main"),
293293+ ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord {
294294+ description: Some(
295295+ ::jacquard_common::CowStr::new_static(
296296+ "A reaction in a Barklesheep game",
297297+ ),
298298+ ),
299299+ key: Some(::jacquard_common::CowStr::new_static("tid")),
300300+ record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject {
301301+ description: None,
302302+ required: Some(
303303+ vec![
304304+ ::jacquard_common::smol_str::SmolStr::new_static("gameId"),
305305+ ::jacquard_common::smol_str::SmolStr::new_static("emoji"),
306306+ ::jacquard_common::smol_str::SmolStr::new_static("createdAt")
307307+ ],
308308+ ),
309309+ nullable: None,
310310+ properties: {
311311+ #[allow(unused_mut)]
312312+ let mut map = ::std::collections::BTreeMap::new();
313313+ map.insert(
314314+ ::jacquard_common::smol_str::SmolStr::new_static(
315315+ "createdAt",
316316+ ),
317317+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
318318+ description: None,
319319+ format: Some(
320320+ ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
321321+ ),
322322+ default: None,
323323+ min_length: None,
324324+ max_length: None,
325325+ min_graphemes: None,
326326+ max_graphemes: None,
327327+ r#enum: None,
328328+ r#const: None,
329329+ known_values: None,
330330+ }),
331331+ );
332332+ map.insert(
333333+ ::jacquard_common::smol_str::SmolStr::new_static("emoji"),
334334+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
335335+ description: None,
336336+ format: None,
337337+ default: None,
338338+ min_length: None,
339339+ max_length: Some(4usize),
340340+ min_graphemes: None,
341341+ max_graphemes: None,
342342+ r#enum: None,
343343+ r#const: None,
344344+ known_values: None,
345345+ }),
346346+ );
347347+ map.insert(
348348+ ::jacquard_common::smol_str::SmolStr::new_static("gameId"),
349349+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
350350+ description: None,
351351+ format: None,
352352+ default: None,
353353+ min_length: None,
354354+ max_length: None,
355355+ min_graphemes: None,
356356+ max_graphemes: None,
357357+ r#enum: None,
358358+ r#const: None,
359359+ known_values: None,
360360+ }),
361361+ );
362362+ map
363363+ },
364364+ }),
365365+ }),
366366+ );
367367+ map
368368+ },
369369+ }
370370+}
+9
crates/jacquard-api/src/io_atcr.rs
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// This file was automatically generated from Lexicon schemas.
44+// Any manual changes will be overwritten on the next regeneration.
55+66+pub mod hold;
77+pub mod manifest;
88+pub mod sailor;
99+pub mod tag;
+8
crates/jacquard-api/src/io_atcr/hold.rs
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// This file was automatically generated from Lexicon schemas.
44+// Any manual changes will be overwritten on the next regeneration.
55+66+pub mod captain;
77+pub mod crew;
88+pub mod layer;
+549
crates/jacquard-api/src/io_atcr/hold/captain.rs
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// Lexicon: io.atcr.hold.captain
44+//
55+// This file was automatically generated from Lexicon schemas.
66+// Any manual changes will be overwritten on the next regeneration.
77+88+/// Represents the hold's ownership and metadata. Stored as a singleton record at rkey 'self' in the hold's embedded PDS.
99+#[jacquard_derive::lexicon]
1010+#[derive(
1111+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
1212+)]
1313+#[serde(rename_all = "camelCase")]
1414+pub struct Captain<'a> {
1515+ /// Allow any authenticated user to register as crew
1616+ pub allow_all_crew: bool,
1717+ /// RFC3339 timestamp of when the hold was deployed
1818+ pub deployed_at: jacquard_common::types::string::Datetime,
1919+ /// Enable Bluesky posts when manifests are pushed
2020+ pub enable_bluesky_posts: bool,
2121+ /// DID of the hold owner
2222+ #[serde(borrow)]
2323+ pub owner: jacquard_common::types::string::Did<'a>,
2424+ /// Deployment provider (e.g., fly.io, aws, etc.)
2525+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
2626+ #[serde(borrow)]
2727+ pub provider: std::option::Option<jacquard_common::CowStr<'a>>,
2828+ /// Whether this hold allows public blob reads (pulls) without authentication
2929+ pub public: bool,
3030+ /// S3 region where blobs are stored
3131+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
3232+ #[serde(borrow)]
3333+ pub region: std::option::Option<jacquard_common::CowStr<'a>>,
3434+}
3535+3636+pub mod captain_state {
3737+3838+ pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
3939+ #[allow(unused)]
4040+ use ::core::marker::PhantomData;
4141+ mod sealed {
4242+ pub trait Sealed {}
4343+ }
4444+ /// State trait tracking which required fields have been set
4545+ pub trait State: sealed::Sealed {
4646+ type Public;
4747+ type Owner;
4848+ type EnableBlueskyPosts;
4949+ type DeployedAt;
5050+ type AllowAllCrew;
5151+ }
5252+ /// Empty state - all required fields are unset
5353+ pub struct Empty(());
5454+ impl sealed::Sealed for Empty {}
5555+ impl State for Empty {
5656+ type Public = Unset;
5757+ type Owner = Unset;
5858+ type EnableBlueskyPosts = Unset;
5959+ type DeployedAt = Unset;
6060+ type AllowAllCrew = Unset;
6161+ }
6262+ ///State transition - sets the `public` field to Set
6363+ pub struct SetPublic<S: State = Empty>(PhantomData<fn() -> S>);
6464+ impl<S: State> sealed::Sealed for SetPublic<S> {}
6565+ impl<S: State> State for SetPublic<S> {
6666+ type Public = Set<members::public>;
6767+ type Owner = S::Owner;
6868+ type EnableBlueskyPosts = S::EnableBlueskyPosts;
6969+ type DeployedAt = S::DeployedAt;
7070+ type AllowAllCrew = S::AllowAllCrew;
7171+ }
7272+ ///State transition - sets the `owner` field to Set
7373+ pub struct SetOwner<S: State = Empty>(PhantomData<fn() -> S>);
7474+ impl<S: State> sealed::Sealed for SetOwner<S> {}
7575+ impl<S: State> State for SetOwner<S> {
7676+ type Public = S::Public;
7777+ type Owner = Set<members::owner>;
7878+ type EnableBlueskyPosts = S::EnableBlueskyPosts;
7979+ type DeployedAt = S::DeployedAt;
8080+ type AllowAllCrew = S::AllowAllCrew;
8181+ }
8282+ ///State transition - sets the `enable_bluesky_posts` field to Set
8383+ pub struct SetEnableBlueskyPosts<S: State = Empty>(PhantomData<fn() -> S>);
8484+ impl<S: State> sealed::Sealed for SetEnableBlueskyPosts<S> {}
8585+ impl<S: State> State for SetEnableBlueskyPosts<S> {
8686+ type Public = S::Public;
8787+ type Owner = S::Owner;
8888+ type EnableBlueskyPosts = Set<members::enable_bluesky_posts>;
8989+ type DeployedAt = S::DeployedAt;
9090+ type AllowAllCrew = S::AllowAllCrew;
9191+ }
9292+ ///State transition - sets the `deployed_at` field to Set
9393+ pub struct SetDeployedAt<S: State = Empty>(PhantomData<fn() -> S>);
9494+ impl<S: State> sealed::Sealed for SetDeployedAt<S> {}
9595+ impl<S: State> State for SetDeployedAt<S> {
9696+ type Public = S::Public;
9797+ type Owner = S::Owner;
9898+ type EnableBlueskyPosts = S::EnableBlueskyPosts;
9999+ type DeployedAt = Set<members::deployed_at>;
100100+ type AllowAllCrew = S::AllowAllCrew;
101101+ }
102102+ ///State transition - sets the `allow_all_crew` field to Set
103103+ pub struct SetAllowAllCrew<S: State = Empty>(PhantomData<fn() -> S>);
104104+ impl<S: State> sealed::Sealed for SetAllowAllCrew<S> {}
105105+ impl<S: State> State for SetAllowAllCrew<S> {
106106+ type Public = S::Public;
107107+ type Owner = S::Owner;
108108+ type EnableBlueskyPosts = S::EnableBlueskyPosts;
109109+ type DeployedAt = S::DeployedAt;
110110+ type AllowAllCrew = Set<members::allow_all_crew>;
111111+ }
112112+ /// Marker types for field names
113113+ #[allow(non_camel_case_types)]
114114+ pub mod members {
115115+ ///Marker type for the `public` field
116116+ pub struct public(());
117117+ ///Marker type for the `owner` field
118118+ pub struct owner(());
119119+ ///Marker type for the `enable_bluesky_posts` field
120120+ pub struct enable_bluesky_posts(());
121121+ ///Marker type for the `deployed_at` field
122122+ pub struct deployed_at(());
123123+ ///Marker type for the `allow_all_crew` field
124124+ pub struct allow_all_crew(());
125125+ }
126126+}
127127+128128+/// Builder for constructing an instance of this type
129129+pub struct CaptainBuilder<'a, S: captain_state::State> {
130130+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
131131+ __unsafe_private_named: (
132132+ ::core::option::Option<bool>,
133133+ ::core::option::Option<jacquard_common::types::string::Datetime>,
134134+ ::core::option::Option<bool>,
135135+ ::core::option::Option<jacquard_common::types::string::Did<'a>>,
136136+ ::core::option::Option<jacquard_common::CowStr<'a>>,
137137+ ::core::option::Option<bool>,
138138+ ::core::option::Option<jacquard_common::CowStr<'a>>,
139139+ ),
140140+ _phantom: ::core::marker::PhantomData<&'a ()>,
141141+}
142142+143143+impl<'a> Captain<'a> {
144144+ /// Create a new builder for this type
145145+ pub fn new() -> CaptainBuilder<'a, captain_state::Empty> {
146146+ CaptainBuilder::new()
147147+ }
148148+}
149149+150150+impl<'a> CaptainBuilder<'a, captain_state::Empty> {
151151+ /// Create a new builder with all fields unset
152152+ pub fn new() -> Self {
153153+ CaptainBuilder {
154154+ _phantom_state: ::core::marker::PhantomData,
155155+ __unsafe_private_named: (None, None, None, None, None, None, None),
156156+ _phantom: ::core::marker::PhantomData,
157157+ }
158158+ }
159159+}
160160+161161+impl<'a, S> CaptainBuilder<'a, S>
162162+where
163163+ S: captain_state::State,
164164+ S::AllowAllCrew: captain_state::IsUnset,
165165+{
166166+ /// Set the `allowAllCrew` field (required)
167167+ pub fn allow_all_crew(
168168+ mut self,
169169+ value: impl Into<bool>,
170170+ ) -> CaptainBuilder<'a, captain_state::SetAllowAllCrew<S>> {
171171+ self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
172172+ CaptainBuilder {
173173+ _phantom_state: ::core::marker::PhantomData,
174174+ __unsafe_private_named: self.__unsafe_private_named,
175175+ _phantom: ::core::marker::PhantomData,
176176+ }
177177+ }
178178+}
179179+180180+impl<'a, S> CaptainBuilder<'a, S>
181181+where
182182+ S: captain_state::State,
183183+ S::DeployedAt: captain_state::IsUnset,
184184+{
185185+ /// Set the `deployedAt` field (required)
186186+ pub fn deployed_at(
187187+ mut self,
188188+ value: impl Into<jacquard_common::types::string::Datetime>,
189189+ ) -> CaptainBuilder<'a, captain_state::SetDeployedAt<S>> {
190190+ self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
191191+ CaptainBuilder {
192192+ _phantom_state: ::core::marker::PhantomData,
193193+ __unsafe_private_named: self.__unsafe_private_named,
194194+ _phantom: ::core::marker::PhantomData,
195195+ }
196196+ }
197197+}
198198+199199+impl<'a, S> CaptainBuilder<'a, S>
200200+where
201201+ S: captain_state::State,
202202+ S::EnableBlueskyPosts: captain_state::IsUnset,
203203+{
204204+ /// Set the `enableBlueskyPosts` field (required)
205205+ pub fn enable_bluesky_posts(
206206+ mut self,
207207+ value: impl Into<bool>,
208208+ ) -> CaptainBuilder<'a, captain_state::SetEnableBlueskyPosts<S>> {
209209+ self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
210210+ CaptainBuilder {
211211+ _phantom_state: ::core::marker::PhantomData,
212212+ __unsafe_private_named: self.__unsafe_private_named,
213213+ _phantom: ::core::marker::PhantomData,
214214+ }
215215+ }
216216+}
217217+218218+impl<'a, S> CaptainBuilder<'a, S>
219219+where
220220+ S: captain_state::State,
221221+ S::Owner: captain_state::IsUnset,
222222+{
223223+ /// Set the `owner` field (required)
224224+ pub fn owner(
225225+ mut self,
226226+ value: impl Into<jacquard_common::types::string::Did<'a>>,
227227+ ) -> CaptainBuilder<'a, captain_state::SetOwner<S>> {
228228+ self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into());
229229+ CaptainBuilder {
230230+ _phantom_state: ::core::marker::PhantomData,
231231+ __unsafe_private_named: self.__unsafe_private_named,
232232+ _phantom: ::core::marker::PhantomData,
233233+ }
234234+ }
235235+}
236236+237237+impl<'a, S: captain_state::State> CaptainBuilder<'a, S> {
238238+ /// Set the `provider` field (optional)
239239+ pub fn provider(mut self, value: impl Into<Option<jacquard_common::CowStr<'a>>>) -> Self {
240240+ self.__unsafe_private_named.4 = value.into();
241241+ self
242242+ }
243243+ /// Set the `provider` field to an Option value (optional)
244244+ pub fn maybe_provider(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
245245+ self.__unsafe_private_named.4 = value;
246246+ self
247247+ }
248248+}
249249+250250+impl<'a, S> CaptainBuilder<'a, S>
251251+where
252252+ S: captain_state::State,
253253+ S::Public: captain_state::IsUnset,
254254+{
255255+ /// Set the `public` field (required)
256256+ pub fn public(
257257+ mut self,
258258+ value: impl Into<bool>,
259259+ ) -> CaptainBuilder<'a, captain_state::SetPublic<S>> {
260260+ self.__unsafe_private_named.5 = ::core::option::Option::Some(value.into());
261261+ CaptainBuilder {
262262+ _phantom_state: ::core::marker::PhantomData,
263263+ __unsafe_private_named: self.__unsafe_private_named,
264264+ _phantom: ::core::marker::PhantomData,
265265+ }
266266+ }
267267+}
268268+269269+impl<'a, S: captain_state::State> CaptainBuilder<'a, S> {
270270+ /// Set the `region` field (optional)
271271+ pub fn region(mut self, value: impl Into<Option<jacquard_common::CowStr<'a>>>) -> Self {
272272+ self.__unsafe_private_named.6 = value.into();
273273+ self
274274+ }
275275+ /// Set the `region` field to an Option value (optional)
276276+ pub fn maybe_region(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
277277+ self.__unsafe_private_named.6 = value;
278278+ self
279279+ }
280280+}
281281+282282+impl<'a, S> CaptainBuilder<'a, S>
283283+where
284284+ S: captain_state::State,
285285+ S::Public: captain_state::IsSet,
286286+ S::Owner: captain_state::IsSet,
287287+ S::EnableBlueskyPosts: captain_state::IsSet,
288288+ S::DeployedAt: captain_state::IsSet,
289289+ S::AllowAllCrew: captain_state::IsSet,
290290+{
291291+ /// Build the final struct
292292+ pub fn build(self) -> Captain<'a> {
293293+ Captain {
294294+ allow_all_crew: self.__unsafe_private_named.0.unwrap(),
295295+ deployed_at: self.__unsafe_private_named.1.unwrap(),
296296+ enable_bluesky_posts: self.__unsafe_private_named.2.unwrap(),
297297+ owner: self.__unsafe_private_named.3.unwrap(),
298298+ provider: self.__unsafe_private_named.4,
299299+ public: self.__unsafe_private_named.5.unwrap(),
300300+ region: self.__unsafe_private_named.6,
301301+ extra_data: Default::default(),
302302+ }
303303+ }
304304+ /// Build the final struct with custom extra_data
305305+ pub fn build_with_data(
306306+ self,
307307+ extra_data: std::collections::BTreeMap<
308308+ jacquard_common::smol_str::SmolStr,
309309+ jacquard_common::types::value::Data<'a>,
310310+ >,
311311+ ) -> Captain<'a> {
312312+ Captain {
313313+ allow_all_crew: self.__unsafe_private_named.0.unwrap(),
314314+ deployed_at: self.__unsafe_private_named.1.unwrap(),
315315+ enable_bluesky_posts: self.__unsafe_private_named.2.unwrap(),
316316+ owner: self.__unsafe_private_named.3.unwrap(),
317317+ provider: self.__unsafe_private_named.4,
318318+ public: self.__unsafe_private_named.5.unwrap(),
319319+ region: self.__unsafe_private_named.6,
320320+ extra_data: Some(extra_data),
321321+ }
322322+ }
323323+}
324324+325325+impl<'a> Captain<'a> {
326326+ pub fn uri(
327327+ uri: impl Into<jacquard_common::CowStr<'a>>,
328328+ ) -> Result<
329329+ jacquard_common::types::uri::RecordUri<'a, CaptainRecord>,
330330+ jacquard_common::types::uri::UriError,
331331+ > {
332332+ jacquard_common::types::uri::RecordUri::try_from_uri(
333333+ jacquard_common::types::string::AtUri::new_cow(uri.into())?,
334334+ )
335335+ }
336336+}
337337+338338+/// Typed wrapper for GetRecord response with this collection's record type.
339339+#[derive(
340340+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
341341+)]
342342+#[serde(rename_all = "camelCase")]
343343+pub struct CaptainGetRecordOutput<'a> {
344344+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
345345+ #[serde(borrow)]
346346+ pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
347347+ #[serde(borrow)]
348348+ pub uri: jacquard_common::types::string::AtUri<'a>,
349349+ #[serde(borrow)]
350350+ pub value: Captain<'a>,
351351+}
352352+353353+impl From<CaptainGetRecordOutput<'_>> for Captain<'_> {
354354+ fn from(output: CaptainGetRecordOutput<'_>) -> Self {
355355+ use jacquard_common::IntoStatic;
356356+ output.value.into_static()
357357+ }
358358+}
359359+360360+impl jacquard_common::types::collection::Collection for Captain<'_> {
361361+ const NSID: &'static str = "io.atcr.hold.captain";
362362+ type Record = CaptainRecord;
363363+}
364364+365365+/// Marker type for deserializing records from this collection.
366366+#[derive(Debug, serde::Serialize, serde::Deserialize)]
367367+pub struct CaptainRecord;
368368+impl jacquard_common::xrpc::XrpcResp for CaptainRecord {
369369+ const NSID: &'static str = "io.atcr.hold.captain";
370370+ const ENCODING: &'static str = "application/json";
371371+ type Output<'de> = CaptainGetRecordOutput<'de>;
372372+ type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
373373+}
374374+375375+impl jacquard_common::types::collection::Collection for CaptainRecord {
376376+ const NSID: &'static str = "io.atcr.hold.captain";
377377+ type Record = CaptainRecord;
378378+}
379379+380380+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Captain<'a> {
381381+ fn nsid() -> &'static str {
382382+ "io.atcr.hold.captain"
383383+ }
384384+ fn def_name() -> &'static str {
385385+ "main"
386386+ }
387387+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
388388+ lexicon_doc_io_atcr_hold_captain()
389389+ }
390390+ fn validate(
391391+ &self,
392392+ ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
393393+ Ok(())
394394+ }
395395+}
396396+397397+fn lexicon_doc_io_atcr_hold_captain() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
398398+ ::jacquard_lexicon::lexicon::LexiconDoc {
399399+ lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
400400+ id: ::jacquard_common::CowStr::new_static("io.atcr.hold.captain"),
401401+ revision: None,
402402+ description: None,
403403+ defs: {
404404+ let mut map = ::std::collections::BTreeMap::new();
405405+ map.insert(
406406+ ::jacquard_common::smol_str::SmolStr::new_static("main"),
407407+ ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord {
408408+ description: Some(
409409+ ::jacquard_common::CowStr::new_static(
410410+ "Represents the hold's ownership and metadata. Stored as a singleton record at rkey 'self' in the hold's embedded PDS.",
411411+ ),
412412+ ),
413413+ key: Some(::jacquard_common::CowStr::new_static("literal:self")),
414414+ record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject {
415415+ description: None,
416416+ required: Some(
417417+ vec![
418418+ ::jacquard_common::smol_str::SmolStr::new_static("owner"),
419419+ ::jacquard_common::smol_str::SmolStr::new_static("public"),
420420+ ::jacquard_common::smol_str::SmolStr::new_static("allowAllCrew"),
421421+ ::jacquard_common::smol_str::SmolStr::new_static("enableBlueskyPosts"),
422422+ ::jacquard_common::smol_str::SmolStr::new_static("deployedAt")
423423+ ],
424424+ ),
425425+ nullable: None,
426426+ properties: {
427427+ #[allow(unused_mut)]
428428+ let mut map = ::std::collections::BTreeMap::new();
429429+ map.insert(
430430+ ::jacquard_common::smol_str::SmolStr::new_static(
431431+ "allowAllCrew",
432432+ ),
433433+ ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean {
434434+ description: None,
435435+ default: None,
436436+ r#const: None,
437437+ }),
438438+ );
439439+ map.insert(
440440+ ::jacquard_common::smol_str::SmolStr::new_static(
441441+ "deployedAt",
442442+ ),
443443+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
444444+ description: Some(
445445+ ::jacquard_common::CowStr::new_static(
446446+ "RFC3339 timestamp of when the hold was deployed",
447447+ ),
448448+ ),
449449+ format: Some(
450450+ ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
451451+ ),
452452+ default: None,
453453+ min_length: None,
454454+ max_length: None,
455455+ min_graphemes: None,
456456+ max_graphemes: None,
457457+ r#enum: None,
458458+ r#const: None,
459459+ known_values: None,
460460+ }),
461461+ );
462462+ map.insert(
463463+ ::jacquard_common::smol_str::SmolStr::new_static(
464464+ "enableBlueskyPosts",
465465+ ),
466466+ ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean {
467467+ description: None,
468468+ default: None,
469469+ r#const: None,
470470+ }),
471471+ );
472472+ map.insert(
473473+ ::jacquard_common::smol_str::SmolStr::new_static("owner"),
474474+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
475475+ description: Some(
476476+ ::jacquard_common::CowStr::new_static(
477477+ "DID of the hold owner",
478478+ ),
479479+ ),
480480+ format: Some(
481481+ ::jacquard_lexicon::lexicon::LexStringFormat::Did,
482482+ ),
483483+ default: None,
484484+ min_length: None,
485485+ max_length: None,
486486+ min_graphemes: None,
487487+ max_graphemes: None,
488488+ r#enum: None,
489489+ r#const: None,
490490+ known_values: None,
491491+ }),
492492+ );
493493+ map.insert(
494494+ ::jacquard_common::smol_str::SmolStr::new_static(
495495+ "provider",
496496+ ),
497497+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
498498+ description: Some(
499499+ ::jacquard_common::CowStr::new_static(
500500+ "Deployment provider (e.g., fly.io, aws, etc.)",
501501+ ),
502502+ ),
503503+ format: None,
504504+ default: None,
505505+ min_length: None,
506506+ max_length: None,
507507+ min_graphemes: None,
508508+ max_graphemes: None,
509509+ r#enum: None,
510510+ r#const: None,
511511+ known_values: None,
512512+ }),
513513+ );
514514+ map.insert(
515515+ ::jacquard_common::smol_str::SmolStr::new_static("public"),
516516+ ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean {
517517+ description: None,
518518+ default: None,
519519+ r#const: None,
520520+ }),
521521+ );
522522+ map.insert(
523523+ ::jacquard_common::smol_str::SmolStr::new_static("region"),
524524+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
525525+ description: Some(
526526+ ::jacquard_common::CowStr::new_static(
527527+ "S3 region where blobs are stored",
528528+ ),
529529+ ),
530530+ format: None,
531531+ default: None,
532532+ min_length: None,
533533+ max_length: None,
534534+ min_graphemes: None,
535535+ max_graphemes: None,
536536+ r#enum: None,
537537+ r#const: None,
538538+ known_values: None,
539539+ }),
540540+ );
541541+ map
542542+ },
543543+ }),
544544+ }),
545545+ );
546546+ map
547547+ },
548548+ }
549549+}
+442
crates/jacquard-api/src/io_atcr/hold/crew.rs
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// Lexicon: io.atcr.hold.crew
44+//
55+// This file was automatically generated from Lexicon schemas.
66+// Any manual changes will be overwritten on the next regeneration.
77+88+/// Crew member in a hold's embedded PDS. Grants access permissions to push blobs to the hold. Stored in the hold's embedded PDS (one record per member).
99+#[jacquard_derive::lexicon]
1010+#[derive(
1111+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
1212+)]
1313+#[serde(rename_all = "camelCase")]
1414+pub struct Crew<'a> {
1515+ /// RFC3339 timestamp of when the member was added
1616+ pub added_at: jacquard_common::types::string::Datetime,
1717+ /// DID of the crew member
1818+ #[serde(borrow)]
1919+ pub member: jacquard_common::types::string::Did<'a>,
2020+ /// Specific permissions granted to this member
2121+ #[serde(borrow)]
2222+ pub permissions: Vec<jacquard_common::CowStr<'a>>,
2323+ /// Member's role in the hold
2424+ #[serde(borrow)]
2525+ pub role: jacquard_common::CowStr<'a>,
2626+}
2727+2828+pub mod crew_state {
2929+3030+ pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
3131+ #[allow(unused)]
3232+ use ::core::marker::PhantomData;
3333+ mod sealed {
3434+ pub trait Sealed {}
3535+ }
3636+ /// State trait tracking which required fields have been set
3737+ pub trait State: sealed::Sealed {
3838+ type Member;
3939+ type Permissions;
4040+ type AddedAt;
4141+ type Role;
4242+ }
4343+ /// Empty state - all required fields are unset
4444+ pub struct Empty(());
4545+ impl sealed::Sealed for Empty {}
4646+ impl State for Empty {
4747+ type Member = Unset;
4848+ type Permissions = Unset;
4949+ type AddedAt = Unset;
5050+ type Role = Unset;
5151+ }
5252+ ///State transition - sets the `member` field to Set
5353+ pub struct SetMember<S: State = Empty>(PhantomData<fn() -> S>);
5454+ impl<S: State> sealed::Sealed for SetMember<S> {}
5555+ impl<S: State> State for SetMember<S> {
5656+ type Member = Set<members::member>;
5757+ type Permissions = S::Permissions;
5858+ type AddedAt = S::AddedAt;
5959+ type Role = S::Role;
6060+ }
6161+ ///State transition - sets the `permissions` field to Set
6262+ pub struct SetPermissions<S: State = Empty>(PhantomData<fn() -> S>);
6363+ impl<S: State> sealed::Sealed for SetPermissions<S> {}
6464+ impl<S: State> State for SetPermissions<S> {
6565+ type Member = S::Member;
6666+ type Permissions = Set<members::permissions>;
6767+ type AddedAt = S::AddedAt;
6868+ type Role = S::Role;
6969+ }
7070+ ///State transition - sets the `added_at` field to Set
7171+ pub struct SetAddedAt<S: State = Empty>(PhantomData<fn() -> S>);
7272+ impl<S: State> sealed::Sealed for SetAddedAt<S> {}
7373+ impl<S: State> State for SetAddedAt<S> {
7474+ type Member = S::Member;
7575+ type Permissions = S::Permissions;
7676+ type AddedAt = Set<members::added_at>;
7777+ type Role = S::Role;
7878+ }
7979+ ///State transition - sets the `role` field to Set
8080+ pub struct SetRole<S: State = Empty>(PhantomData<fn() -> S>);
8181+ impl<S: State> sealed::Sealed for SetRole<S> {}
8282+ impl<S: State> State for SetRole<S> {
8383+ type Member = S::Member;
8484+ type Permissions = S::Permissions;
8585+ type AddedAt = S::AddedAt;
8686+ type Role = Set<members::role>;
8787+ }
8888+ /// Marker types for field names
8989+ #[allow(non_camel_case_types)]
9090+ pub mod members {
9191+ ///Marker type for the `member` field
9292+ pub struct member(());
9393+ ///Marker type for the `permissions` field
9494+ pub struct permissions(());
9595+ ///Marker type for the `added_at` field
9696+ pub struct added_at(());
9797+ ///Marker type for the `role` field
9898+ pub struct role(());
9999+ }
100100+}
101101+102102+/// Builder for constructing an instance of this type
103103+pub struct CrewBuilder<'a, S: crew_state::State> {
104104+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
105105+ __unsafe_private_named: (
106106+ ::core::option::Option<jacquard_common::types::string::Datetime>,
107107+ ::core::option::Option<jacquard_common::types::string::Did<'a>>,
108108+ ::core::option::Option<Vec<jacquard_common::CowStr<'a>>>,
109109+ ::core::option::Option<jacquard_common::CowStr<'a>>,
110110+ ),
111111+ _phantom: ::core::marker::PhantomData<&'a ()>,
112112+}
113113+114114+impl<'a> Crew<'a> {
115115+ /// Create a new builder for this type
116116+ pub fn new() -> CrewBuilder<'a, crew_state::Empty> {
117117+ CrewBuilder::new()
118118+ }
119119+}
120120+121121+impl<'a> CrewBuilder<'a, crew_state::Empty> {
122122+ /// Create a new builder with all fields unset
123123+ pub fn new() -> Self {
124124+ CrewBuilder {
125125+ _phantom_state: ::core::marker::PhantomData,
126126+ __unsafe_private_named: (None, None, None, None),
127127+ _phantom: ::core::marker::PhantomData,
128128+ }
129129+ }
130130+}
131131+132132+impl<'a, S> CrewBuilder<'a, S>
133133+where
134134+ S: crew_state::State,
135135+ S::AddedAt: crew_state::IsUnset,
136136+{
137137+ /// Set the `addedAt` field (required)
138138+ pub fn added_at(
139139+ mut self,
140140+ value: impl Into<jacquard_common::types::string::Datetime>,
141141+ ) -> CrewBuilder<'a, crew_state::SetAddedAt<S>> {
142142+ self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
143143+ CrewBuilder {
144144+ _phantom_state: ::core::marker::PhantomData,
145145+ __unsafe_private_named: self.__unsafe_private_named,
146146+ _phantom: ::core::marker::PhantomData,
147147+ }
148148+ }
149149+}
150150+151151+impl<'a, S> CrewBuilder<'a, S>
152152+where
153153+ S: crew_state::State,
154154+ S::Member: crew_state::IsUnset,
155155+{
156156+ /// Set the `member` field (required)
157157+ pub fn member(
158158+ mut self,
159159+ value: impl Into<jacquard_common::types::string::Did<'a>>,
160160+ ) -> CrewBuilder<'a, crew_state::SetMember<S>> {
161161+ self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
162162+ CrewBuilder {
163163+ _phantom_state: ::core::marker::PhantomData,
164164+ __unsafe_private_named: self.__unsafe_private_named,
165165+ _phantom: ::core::marker::PhantomData,
166166+ }
167167+ }
168168+}
169169+170170+impl<'a, S> CrewBuilder<'a, S>
171171+where
172172+ S: crew_state::State,
173173+ S::Permissions: crew_state::IsUnset,
174174+{
175175+ /// Set the `permissions` field (required)
176176+ pub fn permissions(
177177+ mut self,
178178+ value: impl Into<Vec<jacquard_common::CowStr<'a>>>,
179179+ ) -> CrewBuilder<'a, crew_state::SetPermissions<S>> {
180180+ self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
181181+ CrewBuilder {
182182+ _phantom_state: ::core::marker::PhantomData,
183183+ __unsafe_private_named: self.__unsafe_private_named,
184184+ _phantom: ::core::marker::PhantomData,
185185+ }
186186+ }
187187+}
188188+189189+impl<'a, S> CrewBuilder<'a, S>
190190+where
191191+ S: crew_state::State,
192192+ S::Role: crew_state::IsUnset,
193193+{
194194+ /// Set the `role` field (required)
195195+ pub fn role(
196196+ mut self,
197197+ value: impl Into<jacquard_common::CowStr<'a>>,
198198+ ) -> CrewBuilder<'a, crew_state::SetRole<S>> {
199199+ self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into());
200200+ CrewBuilder {
201201+ _phantom_state: ::core::marker::PhantomData,
202202+ __unsafe_private_named: self.__unsafe_private_named,
203203+ _phantom: ::core::marker::PhantomData,
204204+ }
205205+ }
206206+}
207207+208208+impl<'a, S> CrewBuilder<'a, S>
209209+where
210210+ S: crew_state::State,
211211+ S::Member: crew_state::IsSet,
212212+ S::Permissions: crew_state::IsSet,
213213+ S::AddedAt: crew_state::IsSet,
214214+ S::Role: crew_state::IsSet,
215215+{
216216+ /// Build the final struct
217217+ pub fn build(self) -> Crew<'a> {
218218+ Crew {
219219+ added_at: self.__unsafe_private_named.0.unwrap(),
220220+ member: self.__unsafe_private_named.1.unwrap(),
221221+ permissions: self.__unsafe_private_named.2.unwrap(),
222222+ role: self.__unsafe_private_named.3.unwrap(),
223223+ extra_data: Default::default(),
224224+ }
225225+ }
226226+ /// Build the final struct with custom extra_data
227227+ pub fn build_with_data(
228228+ self,
229229+ extra_data: std::collections::BTreeMap<
230230+ jacquard_common::smol_str::SmolStr,
231231+ jacquard_common::types::value::Data<'a>,
232232+ >,
233233+ ) -> Crew<'a> {
234234+ Crew {
235235+ added_at: self.__unsafe_private_named.0.unwrap(),
236236+ member: self.__unsafe_private_named.1.unwrap(),
237237+ permissions: self.__unsafe_private_named.2.unwrap(),
238238+ role: self.__unsafe_private_named.3.unwrap(),
239239+ extra_data: Some(extra_data),
240240+ }
241241+ }
242242+}
243243+244244+impl<'a> Crew<'a> {
245245+ pub fn uri(
246246+ uri: impl Into<jacquard_common::CowStr<'a>>,
247247+ ) -> Result<
248248+ jacquard_common::types::uri::RecordUri<'a, CrewRecord>,
249249+ jacquard_common::types::uri::UriError,
250250+ > {
251251+ jacquard_common::types::uri::RecordUri::try_from_uri(
252252+ jacquard_common::types::string::AtUri::new_cow(uri.into())?,
253253+ )
254254+ }
255255+}
256256+257257+/// Typed wrapper for GetRecord response with this collection's record type.
258258+#[derive(
259259+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
260260+)]
261261+#[serde(rename_all = "camelCase")]
262262+pub struct CrewGetRecordOutput<'a> {
263263+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
264264+ #[serde(borrow)]
265265+ pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
266266+ #[serde(borrow)]
267267+ pub uri: jacquard_common::types::string::AtUri<'a>,
268268+ #[serde(borrow)]
269269+ pub value: Crew<'a>,
270270+}
271271+272272+impl From<CrewGetRecordOutput<'_>> for Crew<'_> {
273273+ fn from(output: CrewGetRecordOutput<'_>) -> Self {
274274+ use jacquard_common::IntoStatic;
275275+ output.value.into_static()
276276+ }
277277+}
278278+279279+impl jacquard_common::types::collection::Collection for Crew<'_> {
280280+ const NSID: &'static str = "io.atcr.hold.crew";
281281+ type Record = CrewRecord;
282282+}
283283+284284+/// Marker type for deserializing records from this collection.
285285+#[derive(Debug, serde::Serialize, serde::Deserialize)]
286286+pub struct CrewRecord;
287287+impl jacquard_common::xrpc::XrpcResp for CrewRecord {
288288+ const NSID: &'static str = "io.atcr.hold.crew";
289289+ const ENCODING: &'static str = "application/json";
290290+ type Output<'de> = CrewGetRecordOutput<'de>;
291291+ type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
292292+}
293293+294294+impl jacquard_common::types::collection::Collection for CrewRecord {
295295+ const NSID: &'static str = "io.atcr.hold.crew";
296296+ type Record = CrewRecord;
297297+}
298298+299299+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Crew<'a> {
300300+ fn nsid() -> &'static str {
301301+ "io.atcr.hold.crew"
302302+ }
303303+ fn def_name() -> &'static str {
304304+ "main"
305305+ }
306306+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
307307+ lexicon_doc_io_atcr_hold_crew()
308308+ }
309309+ fn validate(
310310+ &self,
311311+ ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
312312+ Ok(())
313313+ }
314314+}
315315+316316+fn lexicon_doc_io_atcr_hold_crew() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
317317+ ::jacquard_lexicon::lexicon::LexiconDoc {
318318+ lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
319319+ id: ::jacquard_common::CowStr::new_static("io.atcr.hold.crew"),
320320+ revision: None,
321321+ description: None,
322322+ defs: {
323323+ let mut map = ::std::collections::BTreeMap::new();
324324+ map.insert(
325325+ ::jacquard_common::smol_str::SmolStr::new_static("main"),
326326+ ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord {
327327+ description: Some(
328328+ ::jacquard_common::CowStr::new_static(
329329+ "Crew member in a hold's embedded PDS. Grants access permissions to push blobs to the hold. Stored in the hold's embedded PDS (one record per member).",
330330+ ),
331331+ ),
332332+ key: Some(::jacquard_common::CowStr::new_static("any")),
333333+ record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject {
334334+ description: None,
335335+ required: Some(
336336+ vec![
337337+ ::jacquard_common::smol_str::SmolStr::new_static("member"),
338338+ ::jacquard_common::smol_str::SmolStr::new_static("role"),
339339+ ::jacquard_common::smol_str::SmolStr::new_static("permissions"),
340340+ ::jacquard_common::smol_str::SmolStr::new_static("addedAt")
341341+ ],
342342+ ),
343343+ nullable: None,
344344+ properties: {
345345+ #[allow(unused_mut)]
346346+ let mut map = ::std::collections::BTreeMap::new();
347347+ map.insert(
348348+ ::jacquard_common::smol_str::SmolStr::new_static("addedAt"),
349349+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
350350+ description: Some(
351351+ ::jacquard_common::CowStr::new_static(
352352+ "RFC3339 timestamp of when the member was added",
353353+ ),
354354+ ),
355355+ format: Some(
356356+ ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
357357+ ),
358358+ default: None,
359359+ min_length: None,
360360+ max_length: None,
361361+ min_graphemes: None,
362362+ max_graphemes: None,
363363+ r#enum: None,
364364+ r#const: None,
365365+ known_values: None,
366366+ }),
367367+ );
368368+ map.insert(
369369+ ::jacquard_common::smol_str::SmolStr::new_static("member"),
370370+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
371371+ description: Some(
372372+ ::jacquard_common::CowStr::new_static(
373373+ "DID of the crew member",
374374+ ),
375375+ ),
376376+ format: Some(
377377+ ::jacquard_lexicon::lexicon::LexStringFormat::Did,
378378+ ),
379379+ default: None,
380380+ min_length: None,
381381+ max_length: None,
382382+ min_graphemes: None,
383383+ max_graphemes: None,
384384+ r#enum: None,
385385+ r#const: None,
386386+ known_values: None,
387387+ }),
388388+ );
389389+ map.insert(
390390+ ::jacquard_common::smol_str::SmolStr::new_static(
391391+ "permissions",
392392+ ),
393393+ ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
394394+ description: Some(
395395+ ::jacquard_common::CowStr::new_static(
396396+ "Specific permissions granted to this member",
397397+ ),
398398+ ),
399399+ items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString {
400400+ description: None,
401401+ format: None,
402402+ default: None,
403403+ min_length: None,
404404+ max_length: None,
405405+ min_graphemes: None,
406406+ max_graphemes: None,
407407+ r#enum: None,
408408+ r#const: None,
409409+ known_values: None,
410410+ }),
411411+ min_length: None,
412412+ max_length: None,
413413+ }),
414414+ );
415415+ map.insert(
416416+ ::jacquard_common::smol_str::SmolStr::new_static("role"),
417417+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
418418+ description: Some(
419419+ ::jacquard_common::CowStr::new_static(
420420+ "Member's role in the hold",
421421+ ),
422422+ ),
423423+ format: None,
424424+ default: None,
425425+ min_length: None,
426426+ max_length: None,
427427+ min_graphemes: None,
428428+ max_graphemes: None,
429429+ r#enum: None,
430430+ r#const: None,
431431+ known_values: None,
432432+ }),
433433+ );
434434+ map
435435+ },
436436+ }),
437437+ }),
438438+ );
439439+ map
440440+ },
441441+ }
442442+}
+631
crates/jacquard-api/src/io_atcr/hold/layer.rs
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// Lexicon: io.atcr.hold.layer
44+//
55+// This file was automatically generated from Lexicon schemas.
66+// Any manual changes will be overwritten on the next regeneration.
77+88+/// Represents metadata about a container layer stored in the hold. Stored in the hold's embedded PDS for tracking and analytics.
99+#[jacquard_derive::lexicon]
1010+#[derive(
1111+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
1212+)]
1313+#[serde(rename_all = "camelCase")]
1414+pub struct Layer<'a> {
1515+ /// RFC3339 timestamp of when the layer was uploaded
1616+ pub created_at: jacquard_common::types::string::Datetime,
1717+ /// Layer digest (e.g., sha256:abc123...)
1818+ #[serde(borrow)]
1919+ pub digest: jacquard_common::CowStr<'a>,
2020+ /// Media type (e.g., application/vnd.oci.image.layer.v1.tar+gzip)
2121+ #[serde(borrow)]
2222+ pub media_type: jacquard_common::CowStr<'a>,
2323+ /// Repository this layer belongs to
2424+ #[serde(borrow)]
2525+ pub repository: jacquard_common::CowStr<'a>,
2626+ /// Size in bytes
2727+ pub size: i64,
2828+ /// DID of user who uploaded this layer
2929+ #[serde(borrow)]
3030+ pub user_did: jacquard_common::types::string::Did<'a>,
3131+ /// Handle of user (for display purposes)
3232+ #[serde(borrow)]
3333+ pub user_handle: jacquard_common::types::string::Handle<'a>,
3434+}
3535+3636+pub mod layer_state {
3737+3838+ pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
3939+ #[allow(unused)]
4040+ use ::core::marker::PhantomData;
4141+ mod sealed {
4242+ pub trait Sealed {}
4343+ }
4444+ /// State trait tracking which required fields have been set
4545+ pub trait State: sealed::Sealed {
4646+ type CreatedAt;
4747+ type Digest;
4848+ type MediaType;
4949+ type Size;
5050+ type Repository;
5151+ type UserDid;
5252+ type UserHandle;
5353+ }
5454+ /// Empty state - all required fields are unset
5555+ pub struct Empty(());
5656+ impl sealed::Sealed for Empty {}
5757+ impl State for Empty {
5858+ type CreatedAt = Unset;
5959+ type Digest = Unset;
6060+ type MediaType = Unset;
6161+ type Size = Unset;
6262+ type Repository = Unset;
6363+ type UserDid = Unset;
6464+ type UserHandle = Unset;
6565+ }
6666+ ///State transition - sets the `created_at` field to Set
6767+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
6868+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
6969+ impl<S: State> State for SetCreatedAt<S> {
7070+ type CreatedAt = Set<members::created_at>;
7171+ type Digest = S::Digest;
7272+ type MediaType = S::MediaType;
7373+ type Size = S::Size;
7474+ type Repository = S::Repository;
7575+ type UserDid = S::UserDid;
7676+ type UserHandle = S::UserHandle;
7777+ }
7878+ ///State transition - sets the `digest` field to Set
7979+ pub struct SetDigest<S: State = Empty>(PhantomData<fn() -> S>);
8080+ impl<S: State> sealed::Sealed for SetDigest<S> {}
8181+ impl<S: State> State for SetDigest<S> {
8282+ type CreatedAt = S::CreatedAt;
8383+ type Digest = Set<members::digest>;
8484+ type MediaType = S::MediaType;
8585+ type Size = S::Size;
8686+ type Repository = S::Repository;
8787+ type UserDid = S::UserDid;
8888+ type UserHandle = S::UserHandle;
8989+ }
9090+ ///State transition - sets the `media_type` field to Set
9191+ pub struct SetMediaType<S: State = Empty>(PhantomData<fn() -> S>);
9292+ impl<S: State> sealed::Sealed for SetMediaType<S> {}
9393+ impl<S: State> State for SetMediaType<S> {
9494+ type CreatedAt = S::CreatedAt;
9595+ type Digest = S::Digest;
9696+ type MediaType = Set<members::media_type>;
9797+ type Size = S::Size;
9898+ type Repository = S::Repository;
9999+ type UserDid = S::UserDid;
100100+ type UserHandle = S::UserHandle;
101101+ }
102102+ ///State transition - sets the `size` field to Set
103103+ pub struct SetSize<S: State = Empty>(PhantomData<fn() -> S>);
104104+ impl<S: State> sealed::Sealed for SetSize<S> {}
105105+ impl<S: State> State for SetSize<S> {
106106+ type CreatedAt = S::CreatedAt;
107107+ type Digest = S::Digest;
108108+ type MediaType = S::MediaType;
109109+ type Size = Set<members::size>;
110110+ type Repository = S::Repository;
111111+ type UserDid = S::UserDid;
112112+ type UserHandle = S::UserHandle;
113113+ }
114114+ ///State transition - sets the `repository` field to Set
115115+ pub struct SetRepository<S: State = Empty>(PhantomData<fn() -> S>);
116116+ impl<S: State> sealed::Sealed for SetRepository<S> {}
117117+ impl<S: State> State for SetRepository<S> {
118118+ type CreatedAt = S::CreatedAt;
119119+ type Digest = S::Digest;
120120+ type MediaType = S::MediaType;
121121+ type Size = S::Size;
122122+ type Repository = Set<members::repository>;
123123+ type UserDid = S::UserDid;
124124+ type UserHandle = S::UserHandle;
125125+ }
126126+ ///State transition - sets the `user_did` field to Set
127127+ pub struct SetUserDid<S: State = Empty>(PhantomData<fn() -> S>);
128128+ impl<S: State> sealed::Sealed for SetUserDid<S> {}
129129+ impl<S: State> State for SetUserDid<S> {
130130+ type CreatedAt = S::CreatedAt;
131131+ type Digest = S::Digest;
132132+ type MediaType = S::MediaType;
133133+ type Size = S::Size;
134134+ type Repository = S::Repository;
135135+ type UserDid = Set<members::user_did>;
136136+ type UserHandle = S::UserHandle;
137137+ }
138138+ ///State transition - sets the `user_handle` field to Set
139139+ pub struct SetUserHandle<S: State = Empty>(PhantomData<fn() -> S>);
140140+ impl<S: State> sealed::Sealed for SetUserHandle<S> {}
141141+ impl<S: State> State for SetUserHandle<S> {
142142+ type CreatedAt = S::CreatedAt;
143143+ type Digest = S::Digest;
144144+ type MediaType = S::MediaType;
145145+ type Size = S::Size;
146146+ type Repository = S::Repository;
147147+ type UserDid = S::UserDid;
148148+ type UserHandle = Set<members::user_handle>;
149149+ }
150150+ /// Marker types for field names
151151+ #[allow(non_camel_case_types)]
152152+ pub mod members {
153153+ ///Marker type for the `created_at` field
154154+ pub struct created_at(());
155155+ ///Marker type for the `digest` field
156156+ pub struct digest(());
157157+ ///Marker type for the `media_type` field
158158+ pub struct media_type(());
159159+ ///Marker type for the `size` field
160160+ pub struct size(());
161161+ ///Marker type for the `repository` field
162162+ pub struct repository(());
163163+ ///Marker type for the `user_did` field
164164+ pub struct user_did(());
165165+ ///Marker type for the `user_handle` field
166166+ pub struct user_handle(());
167167+ }
168168+}
169169+170170+/// Builder for constructing an instance of this type
171171+pub struct LayerBuilder<'a, S: layer_state::State> {
172172+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
173173+ __unsafe_private_named: (
174174+ ::core::option::Option<jacquard_common::types::string::Datetime>,
175175+ ::core::option::Option<jacquard_common::CowStr<'a>>,
176176+ ::core::option::Option<jacquard_common::CowStr<'a>>,
177177+ ::core::option::Option<jacquard_common::CowStr<'a>>,
178178+ ::core::option::Option<i64>,
179179+ ::core::option::Option<jacquard_common::types::string::Did<'a>>,
180180+ ::core::option::Option<jacquard_common::types::string::Handle<'a>>,
181181+ ),
182182+ _phantom: ::core::marker::PhantomData<&'a ()>,
183183+}
184184+185185+impl<'a> Layer<'a> {
186186+ /// Create a new builder for this type
187187+ pub fn new() -> LayerBuilder<'a, layer_state::Empty> {
188188+ LayerBuilder::new()
189189+ }
190190+}
191191+192192+impl<'a> LayerBuilder<'a, layer_state::Empty> {
193193+ /// Create a new builder with all fields unset
194194+ pub fn new() -> Self {
195195+ LayerBuilder {
196196+ _phantom_state: ::core::marker::PhantomData,
197197+ __unsafe_private_named: (None, None, None, None, None, None, None),
198198+ _phantom: ::core::marker::PhantomData,
199199+ }
200200+ }
201201+}
202202+203203+impl<'a, S> LayerBuilder<'a, S>
204204+where
205205+ S: layer_state::State,
206206+ S::CreatedAt: layer_state::IsUnset,
207207+{
208208+ /// Set the `createdAt` field (required)
209209+ pub fn created_at(
210210+ mut self,
211211+ value: impl Into<jacquard_common::types::string::Datetime>,
212212+ ) -> LayerBuilder<'a, layer_state::SetCreatedAt<S>> {
213213+ self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
214214+ LayerBuilder {
215215+ _phantom_state: ::core::marker::PhantomData,
216216+ __unsafe_private_named: self.__unsafe_private_named,
217217+ _phantom: ::core::marker::PhantomData,
218218+ }
219219+ }
220220+}
221221+222222+impl<'a, S> LayerBuilder<'a, S>
223223+where
224224+ S: layer_state::State,
225225+ S::Digest: layer_state::IsUnset,
226226+{
227227+ /// Set the `digest` field (required)
228228+ pub fn digest(
229229+ mut self,
230230+ value: impl Into<jacquard_common::CowStr<'a>>,
231231+ ) -> LayerBuilder<'a, layer_state::SetDigest<S>> {
232232+ self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
233233+ LayerBuilder {
234234+ _phantom_state: ::core::marker::PhantomData,
235235+ __unsafe_private_named: self.__unsafe_private_named,
236236+ _phantom: ::core::marker::PhantomData,
237237+ }
238238+ }
239239+}
240240+241241+impl<'a, S> LayerBuilder<'a, S>
242242+where
243243+ S: layer_state::State,
244244+ S::MediaType: layer_state::IsUnset,
245245+{
246246+ /// Set the `mediaType` field (required)
247247+ pub fn media_type(
248248+ mut self,
249249+ value: impl Into<jacquard_common::CowStr<'a>>,
250250+ ) -> LayerBuilder<'a, layer_state::SetMediaType<S>> {
251251+ self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
252252+ LayerBuilder {
253253+ _phantom_state: ::core::marker::PhantomData,
254254+ __unsafe_private_named: self.__unsafe_private_named,
255255+ _phantom: ::core::marker::PhantomData,
256256+ }
257257+ }
258258+}
259259+260260+impl<'a, S> LayerBuilder<'a, S>
261261+where
262262+ S: layer_state::State,
263263+ S::Repository: layer_state::IsUnset,
264264+{
265265+ /// Set the `repository` field (required)
266266+ pub fn repository(
267267+ mut self,
268268+ value: impl Into<jacquard_common::CowStr<'a>>,
269269+ ) -> LayerBuilder<'a, layer_state::SetRepository<S>> {
270270+ self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into());
271271+ LayerBuilder {
272272+ _phantom_state: ::core::marker::PhantomData,
273273+ __unsafe_private_named: self.__unsafe_private_named,
274274+ _phantom: ::core::marker::PhantomData,
275275+ }
276276+ }
277277+}
278278+279279+impl<'a, S> LayerBuilder<'a, S>
280280+where
281281+ S: layer_state::State,
282282+ S::Size: layer_state::IsUnset,
283283+{
284284+ /// Set the `size` field (required)
285285+ pub fn size(mut self, value: impl Into<i64>) -> LayerBuilder<'a, layer_state::SetSize<S>> {
286286+ self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into());
287287+ LayerBuilder {
288288+ _phantom_state: ::core::marker::PhantomData,
289289+ __unsafe_private_named: self.__unsafe_private_named,
290290+ _phantom: ::core::marker::PhantomData,
291291+ }
292292+ }
293293+}
294294+295295+impl<'a, S> LayerBuilder<'a, S>
296296+where
297297+ S: layer_state::State,
298298+ S::UserDid: layer_state::IsUnset,
299299+{
300300+ /// Set the `userDid` field (required)
301301+ pub fn user_did(
302302+ mut self,
303303+ value: impl Into<jacquard_common::types::string::Did<'a>>,
304304+ ) -> LayerBuilder<'a, layer_state::SetUserDid<S>> {
305305+ self.__unsafe_private_named.5 = ::core::option::Option::Some(value.into());
306306+ LayerBuilder {
307307+ _phantom_state: ::core::marker::PhantomData,
308308+ __unsafe_private_named: self.__unsafe_private_named,
309309+ _phantom: ::core::marker::PhantomData,
310310+ }
311311+ }
312312+}
313313+314314+impl<'a, S> LayerBuilder<'a, S>
315315+where
316316+ S: layer_state::State,
317317+ S::UserHandle: layer_state::IsUnset,
318318+{
319319+ /// Set the `userHandle` field (required)
320320+ pub fn user_handle(
321321+ mut self,
322322+ value: impl Into<jacquard_common::types::string::Handle<'a>>,
323323+ ) -> LayerBuilder<'a, layer_state::SetUserHandle<S>> {
324324+ self.__unsafe_private_named.6 = ::core::option::Option::Some(value.into());
325325+ LayerBuilder {
326326+ _phantom_state: ::core::marker::PhantomData,
327327+ __unsafe_private_named: self.__unsafe_private_named,
328328+ _phantom: ::core::marker::PhantomData,
329329+ }
330330+ }
331331+}
332332+333333+impl<'a, S> LayerBuilder<'a, S>
334334+where
335335+ S: layer_state::State,
336336+ S::CreatedAt: layer_state::IsSet,
337337+ S::Digest: layer_state::IsSet,
338338+ S::MediaType: layer_state::IsSet,
339339+ S::Size: layer_state::IsSet,
340340+ S::Repository: layer_state::IsSet,
341341+ S::UserDid: layer_state::IsSet,
342342+ S::UserHandle: layer_state::IsSet,
343343+{
344344+ /// Build the final struct
345345+ pub fn build(self) -> Layer<'a> {
346346+ Layer {
347347+ created_at: self.__unsafe_private_named.0.unwrap(),
348348+ digest: self.__unsafe_private_named.1.unwrap(),
349349+ media_type: self.__unsafe_private_named.2.unwrap(),
350350+ repository: self.__unsafe_private_named.3.unwrap(),
351351+ size: self.__unsafe_private_named.4.unwrap(),
352352+ user_did: self.__unsafe_private_named.5.unwrap(),
353353+ user_handle: self.__unsafe_private_named.6.unwrap(),
354354+ extra_data: Default::default(),
355355+ }
356356+ }
357357+ /// Build the final struct with custom extra_data
358358+ pub fn build_with_data(
359359+ self,
360360+ extra_data: std::collections::BTreeMap<
361361+ jacquard_common::smol_str::SmolStr,
362362+ jacquard_common::types::value::Data<'a>,
363363+ >,
364364+ ) -> Layer<'a> {
365365+ Layer {
366366+ created_at: self.__unsafe_private_named.0.unwrap(),
367367+ digest: self.__unsafe_private_named.1.unwrap(),
368368+ media_type: self.__unsafe_private_named.2.unwrap(),
369369+ repository: self.__unsafe_private_named.3.unwrap(),
370370+ size: self.__unsafe_private_named.4.unwrap(),
371371+ user_did: self.__unsafe_private_named.5.unwrap(),
372372+ user_handle: self.__unsafe_private_named.6.unwrap(),
373373+ extra_data: Some(extra_data),
374374+ }
375375+ }
376376+}
377377+378378+impl<'a> Layer<'a> {
379379+ pub fn uri(
380380+ uri: impl Into<jacquard_common::CowStr<'a>>,
381381+ ) -> Result<
382382+ jacquard_common::types::uri::RecordUri<'a, LayerRecord>,
383383+ jacquard_common::types::uri::UriError,
384384+ > {
385385+ jacquard_common::types::uri::RecordUri::try_from_uri(
386386+ jacquard_common::types::string::AtUri::new_cow(uri.into())?,
387387+ )
388388+ }
389389+}
390390+391391+/// Typed wrapper for GetRecord response with this collection's record type.
392392+#[derive(
393393+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
394394+)]
395395+#[serde(rename_all = "camelCase")]
396396+pub struct LayerGetRecordOutput<'a> {
397397+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
398398+ #[serde(borrow)]
399399+ pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
400400+ #[serde(borrow)]
401401+ pub uri: jacquard_common::types::string::AtUri<'a>,
402402+ #[serde(borrow)]
403403+ pub value: Layer<'a>,
404404+}
405405+406406+impl From<LayerGetRecordOutput<'_>> for Layer<'_> {
407407+ fn from(output: LayerGetRecordOutput<'_>) -> Self {
408408+ use jacquard_common::IntoStatic;
409409+ output.value.into_static()
410410+ }
411411+}
412412+413413+impl jacquard_common::types::collection::Collection for Layer<'_> {
414414+ const NSID: &'static str = "io.atcr.hold.layer";
415415+ type Record = LayerRecord;
416416+}
417417+418418+/// Marker type for deserializing records from this collection.
419419+#[derive(Debug, serde::Serialize, serde::Deserialize)]
420420+pub struct LayerRecord;
421421+impl jacquard_common::xrpc::XrpcResp for LayerRecord {
422422+ const NSID: &'static str = "io.atcr.hold.layer";
423423+ const ENCODING: &'static str = "application/json";
424424+ type Output<'de> = LayerGetRecordOutput<'de>;
425425+ type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
426426+}
427427+428428+impl jacquard_common::types::collection::Collection for LayerRecord {
429429+ const NSID: &'static str = "io.atcr.hold.layer";
430430+ type Record = LayerRecord;
431431+}
432432+433433+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Layer<'a> {
434434+ fn nsid() -> &'static str {
435435+ "io.atcr.hold.layer"
436436+ }
437437+ fn def_name() -> &'static str {
438438+ "main"
439439+ }
440440+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
441441+ lexicon_doc_io_atcr_hold_layer()
442442+ }
443443+ fn validate(
444444+ &self,
445445+ ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
446446+ Ok(())
447447+ }
448448+}
449449+450450+fn lexicon_doc_io_atcr_hold_layer() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
451451+ ::jacquard_lexicon::lexicon::LexiconDoc {
452452+ lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
453453+ id: ::jacquard_common::CowStr::new_static("io.atcr.hold.layer"),
454454+ revision: None,
455455+ description: None,
456456+ defs: {
457457+ let mut map = ::std::collections::BTreeMap::new();
458458+ map.insert(
459459+ ::jacquard_common::smol_str::SmolStr::new_static("main"),
460460+ ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord {
461461+ description: Some(
462462+ ::jacquard_common::CowStr::new_static(
463463+ "Represents metadata about a container layer stored in the hold. Stored in the hold's embedded PDS for tracking and analytics.",
464464+ ),
465465+ ),
466466+ key: Some(::jacquard_common::CowStr::new_static("tid")),
467467+ record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject {
468468+ description: None,
469469+ required: Some(
470470+ vec![
471471+ ::jacquard_common::smol_str::SmolStr::new_static("digest"),
472472+ ::jacquard_common::smol_str::SmolStr::new_static("size"),
473473+ ::jacquard_common::smol_str::SmolStr::new_static("mediaType"),
474474+ ::jacquard_common::smol_str::SmolStr::new_static("repository"),
475475+ ::jacquard_common::smol_str::SmolStr::new_static("userDid"),
476476+ ::jacquard_common::smol_str::SmolStr::new_static("userHandle"),
477477+ ::jacquard_common::smol_str::SmolStr::new_static("createdAt")
478478+ ],
479479+ ),
480480+ nullable: None,
481481+ properties: {
482482+ #[allow(unused_mut)]
483483+ let mut map = ::std::collections::BTreeMap::new();
484484+ map.insert(
485485+ ::jacquard_common::smol_str::SmolStr::new_static(
486486+ "createdAt",
487487+ ),
488488+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
489489+ description: Some(
490490+ ::jacquard_common::CowStr::new_static(
491491+ "RFC3339 timestamp of when the layer was uploaded",
492492+ ),
493493+ ),
494494+ format: Some(
495495+ ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
496496+ ),
497497+ default: None,
498498+ min_length: None,
499499+ max_length: None,
500500+ min_graphemes: None,
501501+ max_graphemes: None,
502502+ r#enum: None,
503503+ r#const: None,
504504+ known_values: None,
505505+ }),
506506+ );
507507+ map.insert(
508508+ ::jacquard_common::smol_str::SmolStr::new_static("digest"),
509509+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
510510+ description: Some(
511511+ ::jacquard_common::CowStr::new_static(
512512+ "Layer digest (e.g., sha256:abc123...)",
513513+ ),
514514+ ),
515515+ format: None,
516516+ default: None,
517517+ min_length: None,
518518+ max_length: None,
519519+ min_graphemes: None,
520520+ max_graphemes: None,
521521+ r#enum: None,
522522+ r#const: None,
523523+ known_values: None,
524524+ }),
525525+ );
526526+ map.insert(
527527+ ::jacquard_common::smol_str::SmolStr::new_static(
528528+ "mediaType",
529529+ ),
530530+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
531531+ description: Some(
532532+ ::jacquard_common::CowStr::new_static(
533533+ "Media type (e.g., application/vnd.oci.image.layer.v1.tar+gzip)",
534534+ ),
535535+ ),
536536+ format: None,
537537+ default: None,
538538+ min_length: None,
539539+ max_length: None,
540540+ min_graphemes: None,
541541+ max_graphemes: None,
542542+ r#enum: None,
543543+ r#const: None,
544544+ known_values: None,
545545+ }),
546546+ );
547547+ map.insert(
548548+ ::jacquard_common::smol_str::SmolStr::new_static(
549549+ "repository",
550550+ ),
551551+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
552552+ description: Some(
553553+ ::jacquard_common::CowStr::new_static(
554554+ "Repository this layer belongs to",
555555+ ),
556556+ ),
557557+ format: None,
558558+ default: None,
559559+ min_length: None,
560560+ max_length: None,
561561+ min_graphemes: None,
562562+ max_graphemes: None,
563563+ r#enum: None,
564564+ r#const: None,
565565+ known_values: None,
566566+ }),
567567+ );
568568+ map.insert(
569569+ ::jacquard_common::smol_str::SmolStr::new_static("size"),
570570+ ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
571571+ description: None,
572572+ default: None,
573573+ minimum: None,
574574+ maximum: None,
575575+ r#enum: None,
576576+ r#const: None,
577577+ }),
578578+ );
579579+ map.insert(
580580+ ::jacquard_common::smol_str::SmolStr::new_static("userDid"),
581581+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
582582+ description: Some(
583583+ ::jacquard_common::CowStr::new_static(
584584+ "DID of user who uploaded this layer",
585585+ ),
586586+ ),
587587+ format: Some(
588588+ ::jacquard_lexicon::lexicon::LexStringFormat::Did,
589589+ ),
590590+ default: None,
591591+ min_length: None,
592592+ max_length: None,
593593+ min_graphemes: None,
594594+ max_graphemes: None,
595595+ r#enum: None,
596596+ r#const: None,
597597+ known_values: None,
598598+ }),
599599+ );
600600+ map.insert(
601601+ ::jacquard_common::smol_str::SmolStr::new_static(
602602+ "userHandle",
603603+ ),
604604+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
605605+ description: Some(
606606+ ::jacquard_common::CowStr::new_static(
607607+ "Handle of user (for display purposes)",
608608+ ),
609609+ ),
610610+ format: Some(
611611+ ::jacquard_lexicon::lexicon::LexStringFormat::Handle,
612612+ ),
613613+ default: None,
614614+ min_length: None,
615615+ max_length: None,
616616+ min_graphemes: None,
617617+ max_graphemes: None,
618618+ r#enum: None,
619619+ r#const: None,
620620+ known_values: None,
621621+ }),
622622+ );
623623+ map
624624+ },
625625+ }),
626626+ }),
627627+ );
628628+ map
629629+ },
630630+ }
631631+}
+1724
crates/jacquard-api/src/io_atcr/manifest.rs
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// Lexicon: io.atcr.manifest
44+//
55+// This file was automatically generated from Lexicon schemas.
66+// Any manual changes will be overwritten on the next regeneration.
77+88+/// Reference to a blob stored in S3 or external storage
99+#[jacquard_derive::lexicon]
1010+#[derive(
1111+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
1212+)]
1313+#[serde(rename_all = "camelCase")]
1414+pub struct BlobReference<'a> {
1515+ /// Optional OCI annotation metadata. Map of string keys to string values.
1616+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
1717+ #[serde(borrow)]
1818+ pub annotations: std::option::Option<jacquard_common::types::value::Data<'a>>,
1919+ /// Content digest (e.g., 'sha256:...')
2020+ #[serde(borrow)]
2121+ pub digest: jacquard_common::CowStr<'a>,
2222+ /// MIME type of the blob
2323+ #[serde(borrow)]
2424+ pub media_type: jacquard_common::CowStr<'a>,
2525+ /// Size in bytes
2626+ pub size: i64,
2727+ /// Optional direct URLs to blob (for BYOS)
2828+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
2929+ #[serde(borrow)]
3030+ pub urls: std::option::Option<Vec<jacquard_common::types::string::Uri<'a>>>,
3131+}
3232+3333+pub mod blob_reference_state {
3434+3535+ pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
3636+ #[allow(unused)]
3737+ use ::core::marker::PhantomData;
3838+ mod sealed {
3939+ pub trait Sealed {}
4040+ }
4141+ /// State trait tracking which required fields have been set
4242+ pub trait State: sealed::Sealed {
4343+ type MediaType;
4444+ type Size;
4545+ type Digest;
4646+ }
4747+ /// Empty state - all required fields are unset
4848+ pub struct Empty(());
4949+ impl sealed::Sealed for Empty {}
5050+ impl State for Empty {
5151+ type MediaType = Unset;
5252+ type Size = Unset;
5353+ type Digest = Unset;
5454+ }
5555+ ///State transition - sets the `media_type` field to Set
5656+ pub struct SetMediaType<S: State = Empty>(PhantomData<fn() -> S>);
5757+ impl<S: State> sealed::Sealed for SetMediaType<S> {}
5858+ impl<S: State> State for SetMediaType<S> {
5959+ type MediaType = Set<members::media_type>;
6060+ type Size = S::Size;
6161+ type Digest = S::Digest;
6262+ }
6363+ ///State transition - sets the `size` field to Set
6464+ pub struct SetSize<S: State = Empty>(PhantomData<fn() -> S>);
6565+ impl<S: State> sealed::Sealed for SetSize<S> {}
6666+ impl<S: State> State for SetSize<S> {
6767+ type MediaType = S::MediaType;
6868+ type Size = Set<members::size>;
6969+ type Digest = S::Digest;
7070+ }
7171+ ///State transition - sets the `digest` field to Set
7272+ pub struct SetDigest<S: State = Empty>(PhantomData<fn() -> S>);
7373+ impl<S: State> sealed::Sealed for SetDigest<S> {}
7474+ impl<S: State> State for SetDigest<S> {
7575+ type MediaType = S::MediaType;
7676+ type Size = S::Size;
7777+ type Digest = Set<members::digest>;
7878+ }
7979+ /// Marker types for field names
8080+ #[allow(non_camel_case_types)]
8181+ pub mod members {
8282+ ///Marker type for the `media_type` field
8383+ pub struct media_type(());
8484+ ///Marker type for the `size` field
8585+ pub struct size(());
8686+ ///Marker type for the `digest` field
8787+ pub struct digest(());
8888+ }
8989+}
9090+9191+/// Builder for constructing an instance of this type
9292+pub struct BlobReferenceBuilder<'a, S: blob_reference_state::State> {
9393+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
9494+ __unsafe_private_named: (
9595+ ::core::option::Option<jacquard_common::types::value::Data<'a>>,
9696+ ::core::option::Option<jacquard_common::CowStr<'a>>,
9797+ ::core::option::Option<jacquard_common::CowStr<'a>>,
9898+ ::core::option::Option<i64>,
9999+ ::core::option::Option<Vec<jacquard_common::types::string::Uri<'a>>>,
100100+ ),
101101+ _phantom: ::core::marker::PhantomData<&'a ()>,
102102+}
103103+104104+impl<'a> BlobReference<'a> {
105105+ /// Create a new builder for this type
106106+ pub fn new() -> BlobReferenceBuilder<'a, blob_reference_state::Empty> {
107107+ BlobReferenceBuilder::new()
108108+ }
109109+}
110110+111111+impl<'a> BlobReferenceBuilder<'a, blob_reference_state::Empty> {
112112+ /// Create a new builder with all fields unset
113113+ pub fn new() -> Self {
114114+ BlobReferenceBuilder {
115115+ _phantom_state: ::core::marker::PhantomData,
116116+ __unsafe_private_named: (None, None, None, None, None),
117117+ _phantom: ::core::marker::PhantomData,
118118+ }
119119+ }
120120+}
121121+122122+impl<'a, S: blob_reference_state::State> BlobReferenceBuilder<'a, S> {
123123+ /// Set the `annotations` field (optional)
124124+ pub fn annotations(
125125+ mut self,
126126+ value: impl Into<Option<jacquard_common::types::value::Data<'a>>>,
127127+ ) -> Self {
128128+ self.__unsafe_private_named.0 = value.into();
129129+ self
130130+ }
131131+ /// Set the `annotations` field to an Option value (optional)
132132+ pub fn maybe_annotations(
133133+ mut self,
134134+ value: Option<jacquard_common::types::value::Data<'a>>,
135135+ ) -> Self {
136136+ self.__unsafe_private_named.0 = value;
137137+ self
138138+ }
139139+}
140140+141141+impl<'a, S> BlobReferenceBuilder<'a, S>
142142+where
143143+ S: blob_reference_state::State,
144144+ S::Digest: blob_reference_state::IsUnset,
145145+{
146146+ /// Set the `digest` field (required)
147147+ pub fn digest(
148148+ mut self,
149149+ value: impl Into<jacquard_common::CowStr<'a>>,
150150+ ) -> BlobReferenceBuilder<'a, blob_reference_state::SetDigest<S>> {
151151+ self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
152152+ BlobReferenceBuilder {
153153+ _phantom_state: ::core::marker::PhantomData,
154154+ __unsafe_private_named: self.__unsafe_private_named,
155155+ _phantom: ::core::marker::PhantomData,
156156+ }
157157+ }
158158+}
159159+160160+impl<'a, S> BlobReferenceBuilder<'a, S>
161161+where
162162+ S: blob_reference_state::State,
163163+ S::MediaType: blob_reference_state::IsUnset,
164164+{
165165+ /// Set the `mediaType` field (required)
166166+ pub fn media_type(
167167+ mut self,
168168+ value: impl Into<jacquard_common::CowStr<'a>>,
169169+ ) -> BlobReferenceBuilder<'a, blob_reference_state::SetMediaType<S>> {
170170+ self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
171171+ BlobReferenceBuilder {
172172+ _phantom_state: ::core::marker::PhantomData,
173173+ __unsafe_private_named: self.__unsafe_private_named,
174174+ _phantom: ::core::marker::PhantomData,
175175+ }
176176+ }
177177+}
178178+179179+impl<'a, S> BlobReferenceBuilder<'a, S>
180180+where
181181+ S: blob_reference_state::State,
182182+ S::Size: blob_reference_state::IsUnset,
183183+{
184184+ /// Set the `size` field (required)
185185+ pub fn size(
186186+ mut self,
187187+ value: impl Into<i64>,
188188+ ) -> BlobReferenceBuilder<'a, blob_reference_state::SetSize<S>> {
189189+ self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into());
190190+ BlobReferenceBuilder {
191191+ _phantom_state: ::core::marker::PhantomData,
192192+ __unsafe_private_named: self.__unsafe_private_named,
193193+ _phantom: ::core::marker::PhantomData,
194194+ }
195195+ }
196196+}
197197+198198+impl<'a, S: blob_reference_state::State> BlobReferenceBuilder<'a, S> {
199199+ /// Set the `urls` field (optional)
200200+ pub fn urls(
201201+ mut self,
202202+ value: impl Into<Option<Vec<jacquard_common::types::string::Uri<'a>>>>,
203203+ ) -> Self {
204204+ self.__unsafe_private_named.4 = value.into();
205205+ self
206206+ }
207207+ /// Set the `urls` field to an Option value (optional)
208208+ pub fn maybe_urls(
209209+ mut self,
210210+ value: Option<Vec<jacquard_common::types::string::Uri<'a>>>,
211211+ ) -> Self {
212212+ self.__unsafe_private_named.4 = value;
213213+ self
214214+ }
215215+}
216216+217217+impl<'a, S> BlobReferenceBuilder<'a, S>
218218+where
219219+ S: blob_reference_state::State,
220220+ S::MediaType: blob_reference_state::IsSet,
221221+ S::Size: blob_reference_state::IsSet,
222222+ S::Digest: blob_reference_state::IsSet,
223223+{
224224+ /// Build the final struct
225225+ pub fn build(self) -> BlobReference<'a> {
226226+ BlobReference {
227227+ annotations: self.__unsafe_private_named.0,
228228+ digest: self.__unsafe_private_named.1.unwrap(),
229229+ media_type: self.__unsafe_private_named.2.unwrap(),
230230+ size: self.__unsafe_private_named.3.unwrap(),
231231+ urls: self.__unsafe_private_named.4,
232232+ extra_data: Default::default(),
233233+ }
234234+ }
235235+ /// Build the final struct with custom extra_data
236236+ pub fn build_with_data(
237237+ self,
238238+ extra_data: std::collections::BTreeMap<
239239+ jacquard_common::smol_str::SmolStr,
240240+ jacquard_common::types::value::Data<'a>,
241241+ >,
242242+ ) -> BlobReference<'a> {
243243+ BlobReference {
244244+ annotations: self.__unsafe_private_named.0,
245245+ digest: self.__unsafe_private_named.1.unwrap(),
246246+ media_type: self.__unsafe_private_named.2.unwrap(),
247247+ size: self.__unsafe_private_named.3.unwrap(),
248248+ urls: self.__unsafe_private_named.4,
249249+ extra_data: Some(extra_data),
250250+ }
251251+ }
252252+}
253253+254254+fn lexicon_doc_io_atcr_manifest() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
255255+ ::jacquard_lexicon::lexicon::LexiconDoc {
256256+ lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
257257+ id: ::jacquard_common::CowStr::new_static("io.atcr.manifest"),
258258+ revision: None,
259259+ description: None,
260260+ defs: {
261261+ let mut map = ::std::collections::BTreeMap::new();
262262+ map.insert(
263263+ ::jacquard_common::smol_str::SmolStr::new_static("blobReference"),
264264+ ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
265265+ description: Some(
266266+ ::jacquard_common::CowStr::new_static(
267267+ "Reference to a blob stored in S3 or external storage",
268268+ ),
269269+ ),
270270+ required: Some(
271271+ vec![
272272+ ::jacquard_common::smol_str::SmolStr::new_static("mediaType"),
273273+ ::jacquard_common::smol_str::SmolStr::new_static("size"),
274274+ ::jacquard_common::smol_str::SmolStr::new_static("digest")
275275+ ],
276276+ ),
277277+ nullable: None,
278278+ properties: {
279279+ #[allow(unused_mut)]
280280+ let mut map = ::std::collections::BTreeMap::new();
281281+ map.insert(
282282+ ::jacquard_common::smol_str::SmolStr::new_static(
283283+ "annotations",
284284+ ),
285285+ ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown {
286286+ description: None,
287287+ }),
288288+ );
289289+ map.insert(
290290+ ::jacquard_common::smol_str::SmolStr::new_static("digest"),
291291+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
292292+ description: Some(
293293+ ::jacquard_common::CowStr::new_static(
294294+ "Content digest (e.g., 'sha256:...')",
295295+ ),
296296+ ),
297297+ format: None,
298298+ default: None,
299299+ min_length: None,
300300+ max_length: None,
301301+ min_graphemes: None,
302302+ max_graphemes: None,
303303+ r#enum: None,
304304+ r#const: None,
305305+ known_values: None,
306306+ }),
307307+ );
308308+ map.insert(
309309+ ::jacquard_common::smol_str::SmolStr::new_static(
310310+ "mediaType",
311311+ ),
312312+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
313313+ description: Some(
314314+ ::jacquard_common::CowStr::new_static(
315315+ "MIME type of the blob",
316316+ ),
317317+ ),
318318+ format: None,
319319+ default: None,
320320+ min_length: None,
321321+ max_length: None,
322322+ min_graphemes: None,
323323+ max_graphemes: None,
324324+ r#enum: None,
325325+ r#const: None,
326326+ known_values: None,
327327+ }),
328328+ );
329329+ map.insert(
330330+ ::jacquard_common::smol_str::SmolStr::new_static("size"),
331331+ ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
332332+ description: None,
333333+ default: None,
334334+ minimum: None,
335335+ maximum: None,
336336+ r#enum: None,
337337+ r#const: None,
338338+ }),
339339+ );
340340+ map.insert(
341341+ ::jacquard_common::smol_str::SmolStr::new_static("urls"),
342342+ ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
343343+ description: Some(
344344+ ::jacquard_common::CowStr::new_static(
345345+ "Optional direct URLs to blob (for BYOS)",
346346+ ),
347347+ ),
348348+ items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString {
349349+ description: None,
350350+ format: Some(
351351+ ::jacquard_lexicon::lexicon::LexStringFormat::Uri,
352352+ ),
353353+ default: None,
354354+ min_length: None,
355355+ max_length: None,
356356+ min_graphemes: None,
357357+ max_graphemes: None,
358358+ r#enum: None,
359359+ r#const: None,
360360+ known_values: None,
361361+ }),
362362+ min_length: None,
363363+ max_length: None,
364364+ }),
365365+ );
366366+ map
367367+ },
368368+ }),
369369+ );
370370+ map.insert(
371371+ ::jacquard_common::smol_str::SmolStr::new_static("main"),
372372+ ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord {
373373+ description: Some(
374374+ ::jacquard_common::CowStr::new_static(
375375+ "A container image manifest following OCI specification, stored in ATProto",
376376+ ),
377377+ ),
378378+ key: Some(::jacquard_common::CowStr::new_static("tid")),
379379+ record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject {
380380+ description: None,
381381+ required: Some(
382382+ vec![
383383+ ::jacquard_common::smol_str::SmolStr::new_static("repository"),
384384+ ::jacquard_common::smol_str::SmolStr::new_static("digest"),
385385+ ::jacquard_common::smol_str::SmolStr::new_static("mediaType"),
386386+ ::jacquard_common::smol_str::SmolStr::new_static("schemaVersion"),
387387+ ::jacquard_common::smol_str::SmolStr::new_static("createdAt")
388388+ ],
389389+ ),
390390+ nullable: None,
391391+ properties: {
392392+ #[allow(unused_mut)]
393393+ let mut map = ::std::collections::BTreeMap::new();
394394+ map.insert(
395395+ ::jacquard_common::smol_str::SmolStr::new_static(
396396+ "annotations",
397397+ ),
398398+ ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown {
399399+ description: None,
400400+ }),
401401+ );
402402+ map.insert(
403403+ ::jacquard_common::smol_str::SmolStr::new_static("config"),
404404+ ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
405405+ description: None,
406406+ r#ref: ::jacquard_common::CowStr::new_static(
407407+ "#blobReference",
408408+ ),
409409+ }),
410410+ );
411411+ map.insert(
412412+ ::jacquard_common::smol_str::SmolStr::new_static(
413413+ "createdAt",
414414+ ),
415415+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
416416+ description: Some(
417417+ ::jacquard_common::CowStr::new_static(
418418+ "Record creation timestamp",
419419+ ),
420420+ ),
421421+ format: Some(
422422+ ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
423423+ ),
424424+ default: None,
425425+ min_length: None,
426426+ max_length: None,
427427+ min_graphemes: None,
428428+ max_graphemes: None,
429429+ r#enum: None,
430430+ r#const: None,
431431+ known_values: None,
432432+ }),
433433+ );
434434+ map.insert(
435435+ ::jacquard_common::smol_str::SmolStr::new_static("digest"),
436436+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
437437+ description: Some(
438438+ ::jacquard_common::CowStr::new_static(
439439+ "Content digest (e.g., 'sha256:abc123...')",
440440+ ),
441441+ ),
442442+ format: None,
443443+ default: None,
444444+ min_length: None,
445445+ max_length: None,
446446+ min_graphemes: None,
447447+ max_graphemes: None,
448448+ r#enum: None,
449449+ r#const: None,
450450+ known_values: None,
451451+ }),
452452+ );
453453+ map.insert(
454454+ ::jacquard_common::smol_str::SmolStr::new_static("holdDid"),
455455+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
456456+ description: Some(
457457+ ::jacquard_common::CowStr::new_static(
458458+ "DID of the hold service where blobs are stored (e.g., 'did:web:hold01.atcr.io'). Primary reference for hold resolution.",
459459+ ),
460460+ ),
461461+ format: Some(
462462+ ::jacquard_lexicon::lexicon::LexStringFormat::Did,
463463+ ),
464464+ default: None,
465465+ min_length: None,
466466+ max_length: None,
467467+ min_graphemes: None,
468468+ max_graphemes: None,
469469+ r#enum: None,
470470+ r#const: None,
471471+ known_values: None,
472472+ }),
473473+ );
474474+ map.insert(
475475+ ::jacquard_common::smol_str::SmolStr::new_static(
476476+ "holdEndpoint",
477477+ ),
478478+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
479479+ description: Some(
480480+ ::jacquard_common::CowStr::new_static(
481481+ "Hold service endpoint URL where blobs are stored. DEPRECATED: Use holdDid instead. Kept for backward compatibility.",
482482+ ),
483483+ ),
484484+ format: Some(
485485+ ::jacquard_lexicon::lexicon::LexStringFormat::Uri,
486486+ ),
487487+ default: None,
488488+ min_length: None,
489489+ max_length: None,
490490+ min_graphemes: None,
491491+ max_graphemes: None,
492492+ r#enum: None,
493493+ r#const: None,
494494+ known_values: None,
495495+ }),
496496+ );
497497+ map.insert(
498498+ ::jacquard_common::smol_str::SmolStr::new_static("layers"),
499499+ ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
500500+ description: Some(
501501+ ::jacquard_common::CowStr::new_static(
502502+ "Filesystem layers (for image manifests)",
503503+ ),
504504+ ),
505505+ items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
506506+ description: None,
507507+ r#ref: ::jacquard_common::CowStr::new_static(
508508+ "#blobReference",
509509+ ),
510510+ }),
511511+ min_length: None,
512512+ max_length: None,
513513+ }),
514514+ );
515515+ map.insert(
516516+ ::jacquard_common::smol_str::SmolStr::new_static(
517517+ "manifestBlob",
518518+ ),
519519+ ::jacquard_lexicon::lexicon::LexObjectProperty::Blob(::jacquard_lexicon::lexicon::LexBlob {
520520+ description: None,
521521+ accept: None,
522522+ max_size: None,
523523+ }),
524524+ );
525525+ map.insert(
526526+ ::jacquard_common::smol_str::SmolStr::new_static(
527527+ "manifests",
528528+ ),
529529+ ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
530530+ description: Some(
531531+ ::jacquard_common::CowStr::new_static(
532532+ "Referenced manifests (for manifest lists/indexes)",
533533+ ),
534534+ ),
535535+ items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
536536+ description: None,
537537+ r#ref: ::jacquard_common::CowStr::new_static(
538538+ "#manifestReference",
539539+ ),
540540+ }),
541541+ min_length: None,
542542+ max_length: None,
543543+ }),
544544+ );
545545+ map.insert(
546546+ ::jacquard_common::smol_str::SmolStr::new_static(
547547+ "mediaType",
548548+ ),
549549+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
550550+ description: Some(
551551+ ::jacquard_common::CowStr::new_static("OCI media type"),
552552+ ),
553553+ format: None,
554554+ default: None,
555555+ min_length: None,
556556+ max_length: None,
557557+ min_graphemes: None,
558558+ max_graphemes: None,
559559+ r#enum: None,
560560+ r#const: None,
561561+ known_values: None,
562562+ }),
563563+ );
564564+ map.insert(
565565+ ::jacquard_common::smol_str::SmolStr::new_static(
566566+ "repository",
567567+ ),
568568+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
569569+ description: Some(
570570+ ::jacquard_common::CowStr::new_static(
571571+ "Repository name (e.g., 'myapp'). Scoped to user's DID.",
572572+ ),
573573+ ),
574574+ format: None,
575575+ default: None,
576576+ min_length: None,
577577+ max_length: Some(255usize),
578578+ min_graphemes: None,
579579+ max_graphemes: None,
580580+ r#enum: None,
581581+ r#const: None,
582582+ known_values: None,
583583+ }),
584584+ );
585585+ map.insert(
586586+ ::jacquard_common::smol_str::SmolStr::new_static(
587587+ "schemaVersion",
588588+ ),
589589+ ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
590590+ description: None,
591591+ default: None,
592592+ minimum: None,
593593+ maximum: None,
594594+ r#enum: None,
595595+ r#const: None,
596596+ }),
597597+ );
598598+ map.insert(
599599+ ::jacquard_common::smol_str::SmolStr::new_static("subject"),
600600+ ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
601601+ description: None,
602602+ r#ref: ::jacquard_common::CowStr::new_static(
603603+ "#blobReference",
604604+ ),
605605+ }),
606606+ );
607607+ map
608608+ },
609609+ }),
610610+ }),
611611+ );
612612+ map.insert(
613613+ ::jacquard_common::smol_str::SmolStr::new_static("manifestReference"),
614614+ ::jacquard_lexicon::lexicon::LexUserType::Object(
615615+ ::jacquard_lexicon::lexicon::LexObject {
616616+ description: Some(::jacquard_common::CowStr::new_static(
617617+ "Reference to a manifest in a manifest list/index",
618618+ )),
619619+ required: Some(vec![
620620+ ::jacquard_common::smol_str::SmolStr::new_static("mediaType"),
621621+ ::jacquard_common::smol_str::SmolStr::new_static("size"),
622622+ ::jacquard_common::smol_str::SmolStr::new_static("digest"),
623623+ ]),
624624+ nullable: None,
625625+ properties: {
626626+ #[allow(unused_mut)]
627627+ let mut map = ::std::collections::BTreeMap::new();
628628+ map.insert(
629629+ ::jacquard_common::smol_str::SmolStr::new_static("annotations"),
630630+ ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(
631631+ ::jacquard_lexicon::lexicon::LexUnknown { description: None },
632632+ ),
633633+ );
634634+ map.insert(
635635+ ::jacquard_common::smol_str::SmolStr::new_static("digest"),
636636+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(
637637+ ::jacquard_lexicon::lexicon::LexString {
638638+ description: Some(::jacquard_common::CowStr::new_static(
639639+ "Content digest (e.g., 'sha256:...')",
640640+ )),
641641+ format: None,
642642+ default: None,
643643+ min_length: None,
644644+ max_length: None,
645645+ min_graphemes: None,
646646+ max_graphemes: None,
647647+ r#enum: None,
648648+ r#const: None,
649649+ known_values: None,
650650+ },
651651+ ),
652652+ );
653653+ map.insert(
654654+ ::jacquard_common::smol_str::SmolStr::new_static("mediaType"),
655655+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(
656656+ ::jacquard_lexicon::lexicon::LexString {
657657+ description: Some(::jacquard_common::CowStr::new_static(
658658+ "Media type of the referenced manifest",
659659+ )),
660660+ format: None,
661661+ default: None,
662662+ min_length: None,
663663+ max_length: None,
664664+ min_graphemes: None,
665665+ max_graphemes: None,
666666+ r#enum: None,
667667+ r#const: None,
668668+ known_values: None,
669669+ },
670670+ ),
671671+ );
672672+ map.insert(
673673+ ::jacquard_common::smol_str::SmolStr::new_static("platform"),
674674+ ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(
675675+ ::jacquard_lexicon::lexicon::LexRef {
676676+ description: None,
677677+ r#ref: ::jacquard_common::CowStr::new_static("#platform"),
678678+ },
679679+ ),
680680+ );
681681+ map.insert(
682682+ ::jacquard_common::smol_str::SmolStr::new_static("size"),
683683+ ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(
684684+ ::jacquard_lexicon::lexicon::LexInteger {
685685+ description: None,
686686+ default: None,
687687+ minimum: None,
688688+ maximum: None,
689689+ r#enum: None,
690690+ r#const: None,
691691+ },
692692+ ),
693693+ );
694694+ map
695695+ },
696696+ },
697697+ ),
698698+ );
699699+ map.insert(
700700+ ::jacquard_common::smol_str::SmolStr::new_static("platform"),
701701+ ::jacquard_lexicon::lexicon::LexUserType::Object(
702702+ ::jacquard_lexicon::lexicon::LexObject {
703703+ description: Some(::jacquard_common::CowStr::new_static(
704704+ "Platform information describing OS and architecture",
705705+ )),
706706+ required: Some(vec![
707707+ ::jacquard_common::smol_str::SmolStr::new_static("architecture"),
708708+ ::jacquard_common::smol_str::SmolStr::new_static("os"),
709709+ ]),
710710+ nullable: None,
711711+ properties: {
712712+ #[allow(unused_mut)]
713713+ let mut map = ::std::collections::BTreeMap::new();
714714+ map.insert(
715715+ ::jacquard_common::smol_str::SmolStr::new_static("architecture"),
716716+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(
717717+ ::jacquard_lexicon::lexicon::LexString {
718718+ description: Some(::jacquard_common::CowStr::new_static(
719719+ "CPU architecture (e.g., 'amd64', 'arm64', 'arm')",
720720+ )),
721721+ format: None,
722722+ default: None,
723723+ min_length: None,
724724+ max_length: None,
725725+ min_graphemes: None,
726726+ max_graphemes: None,
727727+ r#enum: None,
728728+ r#const: None,
729729+ known_values: None,
730730+ },
731731+ ),
732732+ );
733733+ map.insert(
734734+ ::jacquard_common::smol_str::SmolStr::new_static("os"),
735735+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(
736736+ ::jacquard_lexicon::lexicon::LexString {
737737+ description: Some(::jacquard_common::CowStr::new_static(
738738+ "Operating system (e.g., 'linux', 'windows', 'darwin')",
739739+ )),
740740+ format: None,
741741+ default: None,
742742+ min_length: None,
743743+ max_length: None,
744744+ min_graphemes: None,
745745+ max_graphemes: None,
746746+ r#enum: None,
747747+ r#const: None,
748748+ known_values: None,
749749+ },
750750+ ),
751751+ );
752752+ map.insert(
753753+ ::jacquard_common::smol_str::SmolStr::new_static("osFeatures"),
754754+ ::jacquard_lexicon::lexicon::LexObjectProperty::Array(
755755+ ::jacquard_lexicon::lexicon::LexArray {
756756+ description: Some(::jacquard_common::CowStr::new_static(
757757+ "Optional OS features",
758758+ )),
759759+ items: ::jacquard_lexicon::lexicon::LexArrayItem::String(
760760+ ::jacquard_lexicon::lexicon::LexString {
761761+ description: None,
762762+ format: None,
763763+ default: None,
764764+ min_length: None,
765765+ max_length: None,
766766+ min_graphemes: None,
767767+ max_graphemes: None,
768768+ r#enum: None,
769769+ r#const: None,
770770+ known_values: None,
771771+ },
772772+ ),
773773+ min_length: None,
774774+ max_length: None,
775775+ },
776776+ ),
777777+ );
778778+ map.insert(
779779+ ::jacquard_common::smol_str::SmolStr::new_static("osVersion"),
780780+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(
781781+ ::jacquard_lexicon::lexicon::LexString {
782782+ description: Some(::jacquard_common::CowStr::new_static(
783783+ "Optional OS version",
784784+ )),
785785+ format: None,
786786+ default: None,
787787+ min_length: None,
788788+ max_length: None,
789789+ min_graphemes: None,
790790+ max_graphemes: None,
791791+ r#enum: None,
792792+ r#const: None,
793793+ known_values: None,
794794+ },
795795+ ),
796796+ );
797797+ map.insert(
798798+ ::jacquard_common::smol_str::SmolStr::new_static("variant"),
799799+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(
800800+ ::jacquard_lexicon::lexicon::LexString {
801801+ description: Some(::jacquard_common::CowStr::new_static(
802802+ "Optional CPU variant (e.g., 'v7' for ARM)",
803803+ )),
804804+ format: None,
805805+ default: None,
806806+ min_length: None,
807807+ max_length: None,
808808+ min_graphemes: None,
809809+ max_graphemes: None,
810810+ r#enum: None,
811811+ r#const: None,
812812+ known_values: None,
813813+ },
814814+ ),
815815+ );
816816+ map
817817+ },
818818+ },
819819+ ),
820820+ );
821821+ map
822822+ },
823823+ }
824824+}
825825+826826+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for BlobReference<'a> {
827827+ fn nsid() -> &'static str {
828828+ "io.atcr.manifest"
829829+ }
830830+ fn def_name() -> &'static str {
831831+ "blobReference"
832832+ }
833833+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
834834+ lexicon_doc_io_atcr_manifest()
835835+ }
836836+ fn validate(
837837+ &self,
838838+ ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
839839+ Ok(())
840840+ }
841841+}
842842+843843+/// A container image manifest following OCI specification, stored in ATProto
844844+#[jacquard_derive::lexicon]
845845+#[derive(
846846+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
847847+)]
848848+#[serde(rename_all = "camelCase")]
849849+pub struct Manifest<'a> {
850850+ /// Optional OCI annotation metadata. Map of string keys to string values (e.g., org.opencontainers.image.title → 'My App').
851851+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
852852+ #[serde(borrow)]
853853+ pub annotations: std::option::Option<jacquard_common::types::value::Data<'a>>,
854854+ /// Reference to image configuration blob
855855+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
856856+ #[serde(borrow)]
857857+ pub config: std::option::Option<crate::io_atcr::manifest::BlobReference<'a>>,
858858+ /// Record creation timestamp
859859+ pub created_at: jacquard_common::types::string::Datetime,
860860+ /// Content digest (e.g., 'sha256:abc123...')
861861+ #[serde(borrow)]
862862+ pub digest: jacquard_common::CowStr<'a>,
863863+ /// DID of the hold service where blobs are stored (e.g., 'did:web:hold01.atcr.io'). Primary reference for hold resolution.
864864+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
865865+ #[serde(borrow)]
866866+ pub hold_did: std::option::Option<jacquard_common::types::string::Did<'a>>,
867867+ /// Hold service endpoint URL where blobs are stored. DEPRECATED: Use holdDid instead. Kept for backward compatibility.
868868+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
869869+ #[serde(borrow)]
870870+ pub hold_endpoint: std::option::Option<jacquard_common::types::string::Uri<'a>>,
871871+ /// Filesystem layers (for image manifests)
872872+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
873873+ #[serde(borrow)]
874874+ pub layers: std::option::Option<Vec<crate::io_atcr::manifest::BlobReference<'a>>>,
875875+ /// The full OCI manifest stored as a blob in ATProto.
876876+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
877877+ #[serde(borrow)]
878878+ pub manifest_blob: std::option::Option<jacquard_common::types::blob::BlobRef<'a>>,
879879+ /// Referenced manifests (for manifest lists/indexes)
880880+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
881881+ #[serde(borrow)]
882882+ pub manifests: std::option::Option<Vec<crate::io_atcr::manifest::ManifestReference<'a>>>,
883883+ /// OCI media type
884884+ #[serde(borrow)]
885885+ pub media_type: jacquard_common::CowStr<'a>,
886886+ /// Repository name (e.g., 'myapp'). Scoped to user's DID.
887887+ #[serde(borrow)]
888888+ pub repository: jacquard_common::CowStr<'a>,
889889+ /// OCI schema version (typically 2)
890890+ pub schema_version: i64,
891891+ /// Optional reference to another manifest (for attestations, signatures)
892892+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
893893+ #[serde(borrow)]
894894+ pub subject: std::option::Option<crate::io_atcr::manifest::BlobReference<'a>>,
895895+}
896896+897897+pub mod manifest_state {
898898+899899+ pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
900900+ #[allow(unused)]
901901+ use ::core::marker::PhantomData;
902902+ mod sealed {
903903+ pub trait Sealed {}
904904+ }
905905+ /// State trait tracking which required fields have been set
906906+ pub trait State: sealed::Sealed {
907907+ type CreatedAt;
908908+ type SchemaVersion;
909909+ type Repository;
910910+ type MediaType;
911911+ type Digest;
912912+ }
913913+ /// Empty state - all required fields are unset
914914+ pub struct Empty(());
915915+ impl sealed::Sealed for Empty {}
916916+ impl State for Empty {
917917+ type CreatedAt = Unset;
918918+ type SchemaVersion = Unset;
919919+ type Repository = Unset;
920920+ type MediaType = Unset;
921921+ type Digest = Unset;
922922+ }
923923+ ///State transition - sets the `created_at` field to Set
924924+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
925925+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
926926+ impl<S: State> State for SetCreatedAt<S> {
927927+ type CreatedAt = Set<members::created_at>;
928928+ type SchemaVersion = S::SchemaVersion;
929929+ type Repository = S::Repository;
930930+ type MediaType = S::MediaType;
931931+ type Digest = S::Digest;
932932+ }
933933+ ///State transition - sets the `schema_version` field to Set
934934+ pub struct SetSchemaVersion<S: State = Empty>(PhantomData<fn() -> S>);
935935+ impl<S: State> sealed::Sealed for SetSchemaVersion<S> {}
936936+ impl<S: State> State for SetSchemaVersion<S> {
937937+ type CreatedAt = S::CreatedAt;
938938+ type SchemaVersion = Set<members::schema_version>;
939939+ type Repository = S::Repository;
940940+ type MediaType = S::MediaType;
941941+ type Digest = S::Digest;
942942+ }
943943+ ///State transition - sets the `repository` field to Set
944944+ pub struct SetRepository<S: State = Empty>(PhantomData<fn() -> S>);
945945+ impl<S: State> sealed::Sealed for SetRepository<S> {}
946946+ impl<S: State> State for SetRepository<S> {
947947+ type CreatedAt = S::CreatedAt;
948948+ type SchemaVersion = S::SchemaVersion;
949949+ type Repository = Set<members::repository>;
950950+ type MediaType = S::MediaType;
951951+ type Digest = S::Digest;
952952+ }
953953+ ///State transition - sets the `media_type` field to Set
954954+ pub struct SetMediaType<S: State = Empty>(PhantomData<fn() -> S>);
955955+ impl<S: State> sealed::Sealed for SetMediaType<S> {}
956956+ impl<S: State> State for SetMediaType<S> {
957957+ type CreatedAt = S::CreatedAt;
958958+ type SchemaVersion = S::SchemaVersion;
959959+ type Repository = S::Repository;
960960+ type MediaType = Set<members::media_type>;
961961+ type Digest = S::Digest;
962962+ }
963963+ ///State transition - sets the `digest` field to Set
964964+ pub struct SetDigest<S: State = Empty>(PhantomData<fn() -> S>);
965965+ impl<S: State> sealed::Sealed for SetDigest<S> {}
966966+ impl<S: State> State for SetDigest<S> {
967967+ type CreatedAt = S::CreatedAt;
968968+ type SchemaVersion = S::SchemaVersion;
969969+ type Repository = S::Repository;
970970+ type MediaType = S::MediaType;
971971+ type Digest = Set<members::digest>;
972972+ }
973973+ /// Marker types for field names
974974+ #[allow(non_camel_case_types)]
975975+ pub mod members {
976976+ ///Marker type for the `created_at` field
977977+ pub struct created_at(());
978978+ ///Marker type for the `schema_version` field
979979+ pub struct schema_version(());
980980+ ///Marker type for the `repository` field
981981+ pub struct repository(());
982982+ ///Marker type for the `media_type` field
983983+ pub struct media_type(());
984984+ ///Marker type for the `digest` field
985985+ pub struct digest(());
986986+ }
987987+}
988988+989989+/// Builder for constructing an instance of this type
990990+pub struct ManifestBuilder<'a, S: manifest_state::State> {
991991+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
992992+ __unsafe_private_named: (
993993+ ::core::option::Option<jacquard_common::types::value::Data<'a>>,
994994+ ::core::option::Option<crate::io_atcr::manifest::BlobReference<'a>>,
995995+ ::core::option::Option<jacquard_common::types::string::Datetime>,
996996+ ::core::option::Option<jacquard_common::CowStr<'a>>,
997997+ ::core::option::Option<jacquard_common::types::string::Did<'a>>,
998998+ ::core::option::Option<jacquard_common::types::string::Uri<'a>>,
999999+ ::core::option::Option<Vec<crate::io_atcr::manifest::BlobReference<'a>>>,
10001000+ ::core::option::Option<jacquard_common::types::blob::BlobRef<'a>>,
10011001+ ::core::option::Option<Vec<crate::io_atcr::manifest::ManifestReference<'a>>>,
10021002+ ::core::option::Option<jacquard_common::CowStr<'a>>,
10031003+ ::core::option::Option<jacquard_common::CowStr<'a>>,
10041004+ ::core::option::Option<i64>,
10051005+ ::core::option::Option<crate::io_atcr::manifest::BlobReference<'a>>,
10061006+ ),
10071007+ _phantom: ::core::marker::PhantomData<&'a ()>,
10081008+}
10091009+10101010+impl<'a> Manifest<'a> {
10111011+ /// Create a new builder for this type
10121012+ pub fn new() -> ManifestBuilder<'a, manifest_state::Empty> {
10131013+ ManifestBuilder::new()
10141014+ }
10151015+}
10161016+10171017+impl<'a> ManifestBuilder<'a, manifest_state::Empty> {
10181018+ /// Create a new builder with all fields unset
10191019+ pub fn new() -> Self {
10201020+ ManifestBuilder {
10211021+ _phantom_state: ::core::marker::PhantomData,
10221022+ __unsafe_private_named: (
10231023+ None, None, None, None, None, None, None, None, None, None, None, None, None,
10241024+ ),
10251025+ _phantom: ::core::marker::PhantomData,
10261026+ }
10271027+ }
10281028+}
10291029+10301030+impl<'a, S: manifest_state::State> ManifestBuilder<'a, S> {
10311031+ /// Set the `annotations` field (optional)
10321032+ pub fn annotations(
10331033+ mut self,
10341034+ value: impl Into<Option<jacquard_common::types::value::Data<'a>>>,
10351035+ ) -> Self {
10361036+ self.__unsafe_private_named.0 = value.into();
10371037+ self
10381038+ }
10391039+ /// Set the `annotations` field to an Option value (optional)
10401040+ pub fn maybe_annotations(
10411041+ mut self,
10421042+ value: Option<jacquard_common::types::value::Data<'a>>,
10431043+ ) -> Self {
10441044+ self.__unsafe_private_named.0 = value;
10451045+ self
10461046+ }
10471047+}
10481048+10491049+impl<'a, S: manifest_state::State> ManifestBuilder<'a, S> {
10501050+ /// Set the `config` field (optional)
10511051+ pub fn config(
10521052+ mut self,
10531053+ value: impl Into<Option<crate::io_atcr::manifest::BlobReference<'a>>>,
10541054+ ) -> Self {
10551055+ self.__unsafe_private_named.1 = value.into();
10561056+ self
10571057+ }
10581058+ /// Set the `config` field to an Option value (optional)
10591059+ pub fn maybe_config(
10601060+ mut self,
10611061+ value: Option<crate::io_atcr::manifest::BlobReference<'a>>,
10621062+ ) -> Self {
10631063+ self.__unsafe_private_named.1 = value;
10641064+ self
10651065+ }
10661066+}
10671067+10681068+impl<'a, S> ManifestBuilder<'a, S>
10691069+where
10701070+ S: manifest_state::State,
10711071+ S::CreatedAt: manifest_state::IsUnset,
10721072+{
10731073+ /// Set the `createdAt` field (required)
10741074+ pub fn created_at(
10751075+ mut self,
10761076+ value: impl Into<jacquard_common::types::string::Datetime>,
10771077+ ) -> ManifestBuilder<'a, manifest_state::SetCreatedAt<S>> {
10781078+ self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
10791079+ ManifestBuilder {
10801080+ _phantom_state: ::core::marker::PhantomData,
10811081+ __unsafe_private_named: self.__unsafe_private_named,
10821082+ _phantom: ::core::marker::PhantomData,
10831083+ }
10841084+ }
10851085+}
10861086+10871087+impl<'a, S> ManifestBuilder<'a, S>
10881088+where
10891089+ S: manifest_state::State,
10901090+ S::Digest: manifest_state::IsUnset,
10911091+{
10921092+ /// Set the `digest` field (required)
10931093+ pub fn digest(
10941094+ mut self,
10951095+ value: impl Into<jacquard_common::CowStr<'a>>,
10961096+ ) -> ManifestBuilder<'a, manifest_state::SetDigest<S>> {
10971097+ self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into());
10981098+ ManifestBuilder {
10991099+ _phantom_state: ::core::marker::PhantomData,
11001100+ __unsafe_private_named: self.__unsafe_private_named,
11011101+ _phantom: ::core::marker::PhantomData,
11021102+ }
11031103+ }
11041104+}
11051105+11061106+impl<'a, S: manifest_state::State> ManifestBuilder<'a, S> {
11071107+ /// Set the `holdDid` field (optional)
11081108+ pub fn hold_did(
11091109+ mut self,
11101110+ value: impl Into<Option<jacquard_common::types::string::Did<'a>>>,
11111111+ ) -> Self {
11121112+ self.__unsafe_private_named.4 = value.into();
11131113+ self
11141114+ }
11151115+ /// Set the `holdDid` field to an Option value (optional)
11161116+ pub fn maybe_hold_did(
11171117+ mut self,
11181118+ value: Option<jacquard_common::types::string::Did<'a>>,
11191119+ ) -> Self {
11201120+ self.__unsafe_private_named.4 = value;
11211121+ self
11221122+ }
11231123+}
11241124+11251125+impl<'a, S: manifest_state::State> ManifestBuilder<'a, S> {
11261126+ /// Set the `holdEndpoint` field (optional)
11271127+ pub fn hold_endpoint(
11281128+ mut self,
11291129+ value: impl Into<Option<jacquard_common::types::string::Uri<'a>>>,
11301130+ ) -> Self {
11311131+ self.__unsafe_private_named.5 = value.into();
11321132+ self
11331133+ }
11341134+ /// Set the `holdEndpoint` field to an Option value (optional)
11351135+ pub fn maybe_hold_endpoint(
11361136+ mut self,
11371137+ value: Option<jacquard_common::types::string::Uri<'a>>,
11381138+ ) -> Self {
11391139+ self.__unsafe_private_named.5 = value;
11401140+ self
11411141+ }
11421142+}
11431143+11441144+impl<'a, S: manifest_state::State> ManifestBuilder<'a, S> {
11451145+ /// Set the `layers` field (optional)
11461146+ pub fn layers(
11471147+ mut self,
11481148+ value: impl Into<Option<Vec<crate::io_atcr::manifest::BlobReference<'a>>>>,
11491149+ ) -> Self {
11501150+ self.__unsafe_private_named.6 = value.into();
11511151+ self
11521152+ }
11531153+ /// Set the `layers` field to an Option value (optional)
11541154+ pub fn maybe_layers(
11551155+ mut self,
11561156+ value: Option<Vec<crate::io_atcr::manifest::BlobReference<'a>>>,
11571157+ ) -> Self {
11581158+ self.__unsafe_private_named.6 = value;
11591159+ self
11601160+ }
11611161+}
11621162+11631163+impl<'a, S: manifest_state::State> ManifestBuilder<'a, S> {
11641164+ /// Set the `manifestBlob` field (optional)
11651165+ pub fn manifest_blob(
11661166+ mut self,
11671167+ value: impl Into<Option<jacquard_common::types::blob::BlobRef<'a>>>,
11681168+ ) -> Self {
11691169+ self.__unsafe_private_named.7 = value.into();
11701170+ self
11711171+ }
11721172+ /// Set the `manifestBlob` field to an Option value (optional)
11731173+ pub fn maybe_manifest_blob(
11741174+ mut self,
11751175+ value: Option<jacquard_common::types::blob::BlobRef<'a>>,
11761176+ ) -> Self {
11771177+ self.__unsafe_private_named.7 = value;
11781178+ self
11791179+ }
11801180+}
11811181+11821182+impl<'a, S: manifest_state::State> ManifestBuilder<'a, S> {
11831183+ /// Set the `manifests` field (optional)
11841184+ pub fn manifests(
11851185+ mut self,
11861186+ value: impl Into<Option<Vec<crate::io_atcr::manifest::ManifestReference<'a>>>>,
11871187+ ) -> Self {
11881188+ self.__unsafe_private_named.8 = value.into();
11891189+ self
11901190+ }
11911191+ /// Set the `manifests` field to an Option value (optional)
11921192+ pub fn maybe_manifests(
11931193+ mut self,
11941194+ value: Option<Vec<crate::io_atcr::manifest::ManifestReference<'a>>>,
11951195+ ) -> Self {
11961196+ self.__unsafe_private_named.8 = value;
11971197+ self
11981198+ }
11991199+}
12001200+12011201+impl<'a, S> ManifestBuilder<'a, S>
12021202+where
12031203+ S: manifest_state::State,
12041204+ S::MediaType: manifest_state::IsUnset,
12051205+{
12061206+ /// Set the `mediaType` field (required)
12071207+ pub fn media_type(
12081208+ mut self,
12091209+ value: impl Into<jacquard_common::CowStr<'a>>,
12101210+ ) -> ManifestBuilder<'a, manifest_state::SetMediaType<S>> {
12111211+ self.__unsafe_private_named.9 = ::core::option::Option::Some(value.into());
12121212+ ManifestBuilder {
12131213+ _phantom_state: ::core::marker::PhantomData,
12141214+ __unsafe_private_named: self.__unsafe_private_named,
12151215+ _phantom: ::core::marker::PhantomData,
12161216+ }
12171217+ }
12181218+}
12191219+12201220+impl<'a, S> ManifestBuilder<'a, S>
12211221+where
12221222+ S: manifest_state::State,
12231223+ S::Repository: manifest_state::IsUnset,
12241224+{
12251225+ /// Set the `repository` field (required)
12261226+ pub fn repository(
12271227+ mut self,
12281228+ value: impl Into<jacquard_common::CowStr<'a>>,
12291229+ ) -> ManifestBuilder<'a, manifest_state::SetRepository<S>> {
12301230+ self.__unsafe_private_named.10 = ::core::option::Option::Some(value.into());
12311231+ ManifestBuilder {
12321232+ _phantom_state: ::core::marker::PhantomData,
12331233+ __unsafe_private_named: self.__unsafe_private_named,
12341234+ _phantom: ::core::marker::PhantomData,
12351235+ }
12361236+ }
12371237+}
12381238+12391239+impl<'a, S> ManifestBuilder<'a, S>
12401240+where
12411241+ S: manifest_state::State,
12421242+ S::SchemaVersion: manifest_state::IsUnset,
12431243+{
12441244+ /// Set the `schemaVersion` field (required)
12451245+ pub fn schema_version(
12461246+ mut self,
12471247+ value: impl Into<i64>,
12481248+ ) -> ManifestBuilder<'a, manifest_state::SetSchemaVersion<S>> {
12491249+ self.__unsafe_private_named.11 = ::core::option::Option::Some(value.into());
12501250+ ManifestBuilder {
12511251+ _phantom_state: ::core::marker::PhantomData,
12521252+ __unsafe_private_named: self.__unsafe_private_named,
12531253+ _phantom: ::core::marker::PhantomData,
12541254+ }
12551255+ }
12561256+}
12571257+12581258+impl<'a, S: manifest_state::State> ManifestBuilder<'a, S> {
12591259+ /// Set the `subject` field (optional)
12601260+ pub fn subject(
12611261+ mut self,
12621262+ value: impl Into<Option<crate::io_atcr::manifest::BlobReference<'a>>>,
12631263+ ) -> Self {
12641264+ self.__unsafe_private_named.12 = value.into();
12651265+ self
12661266+ }
12671267+ /// Set the `subject` field to an Option value (optional)
12681268+ pub fn maybe_subject(
12691269+ mut self,
12701270+ value: Option<crate::io_atcr::manifest::BlobReference<'a>>,
12711271+ ) -> Self {
12721272+ self.__unsafe_private_named.12 = value;
12731273+ self
12741274+ }
12751275+}
12761276+12771277+impl<'a, S> ManifestBuilder<'a, S>
12781278+where
12791279+ S: manifest_state::State,
12801280+ S::CreatedAt: manifest_state::IsSet,
12811281+ S::SchemaVersion: manifest_state::IsSet,
12821282+ S::Repository: manifest_state::IsSet,
12831283+ S::MediaType: manifest_state::IsSet,
12841284+ S::Digest: manifest_state::IsSet,
12851285+{
12861286+ /// Build the final struct
12871287+ pub fn build(self) -> Manifest<'a> {
12881288+ Manifest {
12891289+ annotations: self.__unsafe_private_named.0,
12901290+ config: self.__unsafe_private_named.1,
12911291+ created_at: self.__unsafe_private_named.2.unwrap(),
12921292+ digest: self.__unsafe_private_named.3.unwrap(),
12931293+ hold_did: self.__unsafe_private_named.4,
12941294+ hold_endpoint: self.__unsafe_private_named.5,
12951295+ layers: self.__unsafe_private_named.6,
12961296+ manifest_blob: self.__unsafe_private_named.7,
12971297+ manifests: self.__unsafe_private_named.8,
12981298+ media_type: self.__unsafe_private_named.9.unwrap(),
12991299+ repository: self.__unsafe_private_named.10.unwrap(),
13001300+ schema_version: self.__unsafe_private_named.11.unwrap(),
13011301+ subject: self.__unsafe_private_named.12,
13021302+ extra_data: Default::default(),
13031303+ }
13041304+ }
13051305+ /// Build the final struct with custom extra_data
13061306+ pub fn build_with_data(
13071307+ self,
13081308+ extra_data: std::collections::BTreeMap<
13091309+ jacquard_common::smol_str::SmolStr,
13101310+ jacquard_common::types::value::Data<'a>,
13111311+ >,
13121312+ ) -> Manifest<'a> {
13131313+ Manifest {
13141314+ annotations: self.__unsafe_private_named.0,
13151315+ config: self.__unsafe_private_named.1,
13161316+ created_at: self.__unsafe_private_named.2.unwrap(),
13171317+ digest: self.__unsafe_private_named.3.unwrap(),
13181318+ hold_did: self.__unsafe_private_named.4,
13191319+ hold_endpoint: self.__unsafe_private_named.5,
13201320+ layers: self.__unsafe_private_named.6,
13211321+ manifest_blob: self.__unsafe_private_named.7,
13221322+ manifests: self.__unsafe_private_named.8,
13231323+ media_type: self.__unsafe_private_named.9.unwrap(),
13241324+ repository: self.__unsafe_private_named.10.unwrap(),
13251325+ schema_version: self.__unsafe_private_named.11.unwrap(),
13261326+ subject: self.__unsafe_private_named.12,
13271327+ extra_data: Some(extra_data),
13281328+ }
13291329+ }
13301330+}
13311331+13321332+impl<'a> Manifest<'a> {
13331333+ pub fn uri(
13341334+ uri: impl Into<jacquard_common::CowStr<'a>>,
13351335+ ) -> Result<
13361336+ jacquard_common::types::uri::RecordUri<'a, ManifestRecord>,
13371337+ jacquard_common::types::uri::UriError,
13381338+ > {
13391339+ jacquard_common::types::uri::RecordUri::try_from_uri(
13401340+ jacquard_common::types::string::AtUri::new_cow(uri.into())?,
13411341+ )
13421342+ }
13431343+}
13441344+13451345+/// Typed wrapper for GetRecord response with this collection's record type.
13461346+#[derive(
13471347+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
13481348+)]
13491349+#[serde(rename_all = "camelCase")]
13501350+pub struct ManifestGetRecordOutput<'a> {
13511351+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
13521352+ #[serde(borrow)]
13531353+ pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
13541354+ #[serde(borrow)]
13551355+ pub uri: jacquard_common::types::string::AtUri<'a>,
13561356+ #[serde(borrow)]
13571357+ pub value: Manifest<'a>,
13581358+}
13591359+13601360+impl From<ManifestGetRecordOutput<'_>> for Manifest<'_> {
13611361+ fn from(output: ManifestGetRecordOutput<'_>) -> Self {
13621362+ use jacquard_common::IntoStatic;
13631363+ output.value.into_static()
13641364+ }
13651365+}
13661366+13671367+impl jacquard_common::types::collection::Collection for Manifest<'_> {
13681368+ const NSID: &'static str = "io.atcr.manifest";
13691369+ type Record = ManifestRecord;
13701370+}
13711371+13721372+/// Marker type for deserializing records from this collection.
13731373+#[derive(Debug, serde::Serialize, serde::Deserialize)]
13741374+pub struct ManifestRecord;
13751375+impl jacquard_common::xrpc::XrpcResp for ManifestRecord {
13761376+ const NSID: &'static str = "io.atcr.manifest";
13771377+ const ENCODING: &'static str = "application/json";
13781378+ type Output<'de> = ManifestGetRecordOutput<'de>;
13791379+ type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
13801380+}
13811381+13821382+impl jacquard_common::types::collection::Collection for ManifestRecord {
13831383+ const NSID: &'static str = "io.atcr.manifest";
13841384+ type Record = ManifestRecord;
13851385+}
13861386+13871387+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Manifest<'a> {
13881388+ fn nsid() -> &'static str {
13891389+ "io.atcr.manifest"
13901390+ }
13911391+ fn def_name() -> &'static str {
13921392+ "main"
13931393+ }
13941394+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
13951395+ lexicon_doc_io_atcr_manifest()
13961396+ }
13971397+ fn validate(
13981398+ &self,
13991399+ ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
14001400+ {
14011401+ let value = &self.repository;
14021402+ #[allow(unused_comparisons)]
14031403+ if <str>::len(value.as_ref()) > 255usize {
14041404+ return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
14051405+ path: ::jacquard_lexicon::validation::ValidationPath::from_field("repository"),
14061406+ max: 255usize,
14071407+ actual: <str>::len(value.as_ref()),
14081408+ });
14091409+ }
14101410+ }
14111411+ Ok(())
14121412+ }
14131413+}
14141414+14151415+/// Reference to a manifest in a manifest list/index
14161416+#[jacquard_derive::lexicon]
14171417+#[derive(
14181418+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
14191419+)]
14201420+#[serde(rename_all = "camelCase")]
14211421+pub struct ManifestReference<'a> {
14221422+ /// Optional OCI annotation metadata. Map of string keys to string values.
14231423+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
14241424+ #[serde(borrow)]
14251425+ pub annotations: std::option::Option<jacquard_common::types::value::Data<'a>>,
14261426+ /// Content digest (e.g., 'sha256:...')
14271427+ #[serde(borrow)]
14281428+ pub digest: jacquard_common::CowStr<'a>,
14291429+ /// Media type of the referenced manifest
14301430+ #[serde(borrow)]
14311431+ pub media_type: jacquard_common::CowStr<'a>,
14321432+ /// Platform information for this manifest
14331433+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
14341434+ #[serde(borrow)]
14351435+ pub platform: std::option::Option<crate::io_atcr::manifest::Platform<'a>>,
14361436+ /// Size in bytes
14371437+ pub size: i64,
14381438+}
14391439+14401440+pub mod manifest_reference_state {
14411441+14421442+ pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
14431443+ #[allow(unused)]
14441444+ use ::core::marker::PhantomData;
14451445+ mod sealed {
14461446+ pub trait Sealed {}
14471447+ }
14481448+ /// State trait tracking which required fields have been set
14491449+ pub trait State: sealed::Sealed {
14501450+ type Digest;
14511451+ type Size;
14521452+ type MediaType;
14531453+ }
14541454+ /// Empty state - all required fields are unset
14551455+ pub struct Empty(());
14561456+ impl sealed::Sealed for Empty {}
14571457+ impl State for Empty {
14581458+ type Digest = Unset;
14591459+ type Size = Unset;
14601460+ type MediaType = Unset;
14611461+ }
14621462+ ///State transition - sets the `digest` field to Set
14631463+ pub struct SetDigest<S: State = Empty>(PhantomData<fn() -> S>);
14641464+ impl<S: State> sealed::Sealed for SetDigest<S> {}
14651465+ impl<S: State> State for SetDigest<S> {
14661466+ type Digest = Set<members::digest>;
14671467+ type Size = S::Size;
14681468+ type MediaType = S::MediaType;
14691469+ }
14701470+ ///State transition - sets the `size` field to Set
14711471+ pub struct SetSize<S: State = Empty>(PhantomData<fn() -> S>);
14721472+ impl<S: State> sealed::Sealed for SetSize<S> {}
14731473+ impl<S: State> State for SetSize<S> {
14741474+ type Digest = S::Digest;
14751475+ type Size = Set<members::size>;
14761476+ type MediaType = S::MediaType;
14771477+ }
14781478+ ///State transition - sets the `media_type` field to Set
14791479+ pub struct SetMediaType<S: State = Empty>(PhantomData<fn() -> S>);
14801480+ impl<S: State> sealed::Sealed for SetMediaType<S> {}
14811481+ impl<S: State> State for SetMediaType<S> {
14821482+ type Digest = S::Digest;
14831483+ type Size = S::Size;
14841484+ type MediaType = Set<members::media_type>;
14851485+ }
14861486+ /// Marker types for field names
14871487+ #[allow(non_camel_case_types)]
14881488+ pub mod members {
14891489+ ///Marker type for the `digest` field
14901490+ pub struct digest(());
14911491+ ///Marker type for the `size` field
14921492+ pub struct size(());
14931493+ ///Marker type for the `media_type` field
14941494+ pub struct media_type(());
14951495+ }
14961496+}
14971497+14981498+/// Builder for constructing an instance of this type
14991499+pub struct ManifestReferenceBuilder<'a, S: manifest_reference_state::State> {
15001500+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
15011501+ __unsafe_private_named: (
15021502+ ::core::option::Option<jacquard_common::types::value::Data<'a>>,
15031503+ ::core::option::Option<jacquard_common::CowStr<'a>>,
15041504+ ::core::option::Option<jacquard_common::CowStr<'a>>,
15051505+ ::core::option::Option<crate::io_atcr::manifest::Platform<'a>>,
15061506+ ::core::option::Option<i64>,
15071507+ ),
15081508+ _phantom: ::core::marker::PhantomData<&'a ()>,
15091509+}
15101510+15111511+impl<'a> ManifestReference<'a> {
15121512+ /// Create a new builder for this type
15131513+ pub fn new() -> ManifestReferenceBuilder<'a, manifest_reference_state::Empty> {
15141514+ ManifestReferenceBuilder::new()
15151515+ }
15161516+}
15171517+15181518+impl<'a> ManifestReferenceBuilder<'a, manifest_reference_state::Empty> {
15191519+ /// Create a new builder with all fields unset
15201520+ pub fn new() -> Self {
15211521+ ManifestReferenceBuilder {
15221522+ _phantom_state: ::core::marker::PhantomData,
15231523+ __unsafe_private_named: (None, None, None, None, None),
15241524+ _phantom: ::core::marker::PhantomData,
15251525+ }
15261526+ }
15271527+}
15281528+15291529+impl<'a, S: manifest_reference_state::State> ManifestReferenceBuilder<'a, S> {
15301530+ /// Set the `annotations` field (optional)
15311531+ pub fn annotations(
15321532+ mut self,
15331533+ value: impl Into<Option<jacquard_common::types::value::Data<'a>>>,
15341534+ ) -> Self {
15351535+ self.__unsafe_private_named.0 = value.into();
15361536+ self
15371537+ }
15381538+ /// Set the `annotations` field to an Option value (optional)
15391539+ pub fn maybe_annotations(
15401540+ mut self,
15411541+ value: Option<jacquard_common::types::value::Data<'a>>,
15421542+ ) -> Self {
15431543+ self.__unsafe_private_named.0 = value;
15441544+ self
15451545+ }
15461546+}
15471547+15481548+impl<'a, S> ManifestReferenceBuilder<'a, S>
15491549+where
15501550+ S: manifest_reference_state::State,
15511551+ S::Digest: manifest_reference_state::IsUnset,
15521552+{
15531553+ /// Set the `digest` field (required)
15541554+ pub fn digest(
15551555+ mut self,
15561556+ value: impl Into<jacquard_common::CowStr<'a>>,
15571557+ ) -> ManifestReferenceBuilder<'a, manifest_reference_state::SetDigest<S>> {
15581558+ self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
15591559+ ManifestReferenceBuilder {
15601560+ _phantom_state: ::core::marker::PhantomData,
15611561+ __unsafe_private_named: self.__unsafe_private_named,
15621562+ _phantom: ::core::marker::PhantomData,
15631563+ }
15641564+ }
15651565+}
15661566+15671567+impl<'a, S> ManifestReferenceBuilder<'a, S>
15681568+where
15691569+ S: manifest_reference_state::State,
15701570+ S::MediaType: manifest_reference_state::IsUnset,
15711571+{
15721572+ /// Set the `mediaType` field (required)
15731573+ pub fn media_type(
15741574+ mut self,
15751575+ value: impl Into<jacquard_common::CowStr<'a>>,
15761576+ ) -> ManifestReferenceBuilder<'a, manifest_reference_state::SetMediaType<S>> {
15771577+ self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
15781578+ ManifestReferenceBuilder {
15791579+ _phantom_state: ::core::marker::PhantomData,
15801580+ __unsafe_private_named: self.__unsafe_private_named,
15811581+ _phantom: ::core::marker::PhantomData,
15821582+ }
15831583+ }
15841584+}
15851585+15861586+impl<'a, S: manifest_reference_state::State> ManifestReferenceBuilder<'a, S> {
15871587+ /// Set the `platform` field (optional)
15881588+ pub fn platform(
15891589+ mut self,
15901590+ value: impl Into<Option<crate::io_atcr::manifest::Platform<'a>>>,
15911591+ ) -> Self {
15921592+ self.__unsafe_private_named.3 = value.into();
15931593+ self
15941594+ }
15951595+ /// Set the `platform` field to an Option value (optional)
15961596+ pub fn maybe_platform(mut self, value: Option<crate::io_atcr::manifest::Platform<'a>>) -> Self {
15971597+ self.__unsafe_private_named.3 = value;
15981598+ self
15991599+ }
16001600+}
16011601+16021602+impl<'a, S> ManifestReferenceBuilder<'a, S>
16031603+where
16041604+ S: manifest_reference_state::State,
16051605+ S::Size: manifest_reference_state::IsUnset,
16061606+{
16071607+ /// Set the `size` field (required)
16081608+ pub fn size(
16091609+ mut self,
16101610+ value: impl Into<i64>,
16111611+ ) -> ManifestReferenceBuilder<'a, manifest_reference_state::SetSize<S>> {
16121612+ self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into());
16131613+ ManifestReferenceBuilder {
16141614+ _phantom_state: ::core::marker::PhantomData,
16151615+ __unsafe_private_named: self.__unsafe_private_named,
16161616+ _phantom: ::core::marker::PhantomData,
16171617+ }
16181618+ }
16191619+}
16201620+16211621+impl<'a, S> ManifestReferenceBuilder<'a, S>
16221622+where
16231623+ S: manifest_reference_state::State,
16241624+ S::Digest: manifest_reference_state::IsSet,
16251625+ S::Size: manifest_reference_state::IsSet,
16261626+ S::MediaType: manifest_reference_state::IsSet,
16271627+{
16281628+ /// Build the final struct
16291629+ pub fn build(self) -> ManifestReference<'a> {
16301630+ ManifestReference {
16311631+ annotations: self.__unsafe_private_named.0,
16321632+ digest: self.__unsafe_private_named.1.unwrap(),
16331633+ media_type: self.__unsafe_private_named.2.unwrap(),
16341634+ platform: self.__unsafe_private_named.3,
16351635+ size: self.__unsafe_private_named.4.unwrap(),
16361636+ extra_data: Default::default(),
16371637+ }
16381638+ }
16391639+ /// Build the final struct with custom extra_data
16401640+ pub fn build_with_data(
16411641+ self,
16421642+ extra_data: std::collections::BTreeMap<
16431643+ jacquard_common::smol_str::SmolStr,
16441644+ jacquard_common::types::value::Data<'a>,
16451645+ >,
16461646+ ) -> ManifestReference<'a> {
16471647+ ManifestReference {
16481648+ annotations: self.__unsafe_private_named.0,
16491649+ digest: self.__unsafe_private_named.1.unwrap(),
16501650+ media_type: self.__unsafe_private_named.2.unwrap(),
16511651+ platform: self.__unsafe_private_named.3,
16521652+ size: self.__unsafe_private_named.4.unwrap(),
16531653+ extra_data: Some(extra_data),
16541654+ }
16551655+ }
16561656+}
16571657+16581658+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ManifestReference<'a> {
16591659+ fn nsid() -> &'static str {
16601660+ "io.atcr.manifest"
16611661+ }
16621662+ fn def_name() -> &'static str {
16631663+ "manifestReference"
16641664+ }
16651665+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
16661666+ lexicon_doc_io_atcr_manifest()
16671667+ }
16681668+ fn validate(
16691669+ &self,
16701670+ ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
16711671+ Ok(())
16721672+ }
16731673+}
16741674+16751675+/// Platform information describing OS and architecture
16761676+#[jacquard_derive::lexicon]
16771677+#[derive(
16781678+ serde::Serialize,
16791679+ serde::Deserialize,
16801680+ Debug,
16811681+ Clone,
16821682+ PartialEq,
16831683+ Eq,
16841684+ jacquard_derive::IntoStatic,
16851685+ Default,
16861686+)]
16871687+#[serde(rename_all = "camelCase")]
16881688+pub struct Platform<'a> {
16891689+ /// CPU architecture (e.g., 'amd64', 'arm64', 'arm')
16901690+ #[serde(borrow)]
16911691+ pub architecture: jacquard_common::CowStr<'a>,
16921692+ /// Operating system (e.g., 'linux', 'windows', 'darwin')
16931693+ #[serde(borrow)]
16941694+ pub os: jacquard_common::CowStr<'a>,
16951695+ /// Optional OS features
16961696+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
16971697+ #[serde(borrow)]
16981698+ pub os_features: std::option::Option<Vec<jacquard_common::CowStr<'a>>>,
16991699+ /// Optional OS version
17001700+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
17011701+ #[serde(borrow)]
17021702+ pub os_version: std::option::Option<jacquard_common::CowStr<'a>>,
17031703+ /// Optional CPU variant (e.g., 'v7' for ARM)
17041704+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
17051705+ #[serde(borrow)]
17061706+ pub variant: std::option::Option<jacquard_common::CowStr<'a>>,
17071707+}
17081708+17091709+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Platform<'a> {
17101710+ fn nsid() -> &'static str {
17111711+ "io.atcr.manifest"
17121712+ }
17131713+ fn def_name() -> &'static str {
17141714+ "platform"
17151715+ }
17161716+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
17171717+ lexicon_doc_io_atcr_manifest()
17181718+ }
17191719+ fn validate(
17201720+ &self,
17211721+ ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
17221722+ Ok(())
17231723+ }
17241724+}
+7
crates/jacquard-api/src/io_atcr/sailor.rs
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// This file was automatically generated from Lexicon schemas.
44+// Any manual changes will be overwritten on the next regeneration.
55+66+pub mod profile;
77+pub mod star;
+352
crates/jacquard-api/src/io_atcr/sailor/profile.rs
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// Lexicon: io.atcr.sailor.profile
44+//
55+// This file was automatically generated from Lexicon schemas.
66+// Any manual changes will be overwritten on the next regeneration.
77+88+/// User profile for ATCR registry. Stores preferences like default hold for blob storage.
99+#[jacquard_derive::lexicon]
1010+#[derive(
1111+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
1212+)]
1313+#[serde(rename_all = "camelCase")]
1414+pub struct Profile<'a> {
1515+ /// Profile creation timestamp
1616+ pub created_at: jacquard_common::types::string::Datetime,
1717+ /// Default hold endpoint for blob storage. If null, user has opted out of defaults.
1818+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
1919+ #[serde(borrow)]
2020+ pub default_hold: std::option::Option<jacquard_common::types::string::Uri<'a>>,
2121+ /// Profile last updated timestamp
2222+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
2323+ pub updated_at: std::option::Option<jacquard_common::types::string::Datetime>,
2424+}
2525+2626+pub mod profile_state {
2727+2828+ pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
2929+ #[allow(unused)]
3030+ use ::core::marker::PhantomData;
3131+ mod sealed {
3232+ pub trait Sealed {}
3333+ }
3434+ /// State trait tracking which required fields have been set
3535+ pub trait State: sealed::Sealed {
3636+ type CreatedAt;
3737+ }
3838+ /// Empty state - all required fields are unset
3939+ pub struct Empty(());
4040+ impl sealed::Sealed for Empty {}
4141+ impl State for Empty {
4242+ type CreatedAt = Unset;
4343+ }
4444+ ///State transition - sets the `created_at` field to Set
4545+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
4646+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
4747+ impl<S: State> State for SetCreatedAt<S> {
4848+ type CreatedAt = Set<members::created_at>;
4949+ }
5050+ /// Marker types for field names
5151+ #[allow(non_camel_case_types)]
5252+ pub mod members {
5353+ ///Marker type for the `created_at` field
5454+ pub struct created_at(());
5555+ }
5656+}
5757+5858+/// Builder for constructing an instance of this type
5959+pub struct ProfileBuilder<'a, S: profile_state::State> {
6060+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
6161+ __unsafe_private_named: (
6262+ ::core::option::Option<jacquard_common::types::string::Datetime>,
6363+ ::core::option::Option<jacquard_common::types::string::Uri<'a>>,
6464+ ::core::option::Option<jacquard_common::types::string::Datetime>,
6565+ ),
6666+ _phantom: ::core::marker::PhantomData<&'a ()>,
6767+}
6868+6969+impl<'a> Profile<'a> {
7070+ /// Create a new builder for this type
7171+ pub fn new() -> ProfileBuilder<'a, profile_state::Empty> {
7272+ ProfileBuilder::new()
7373+ }
7474+}
7575+7676+impl<'a> ProfileBuilder<'a, profile_state::Empty> {
7777+ /// Create a new builder with all fields unset
7878+ pub fn new() -> Self {
7979+ ProfileBuilder {
8080+ _phantom_state: ::core::marker::PhantomData,
8181+ __unsafe_private_named: (None, None, None),
8282+ _phantom: ::core::marker::PhantomData,
8383+ }
8484+ }
8585+}
8686+8787+impl<'a, S> ProfileBuilder<'a, S>
8888+where
8989+ S: profile_state::State,
9090+ S::CreatedAt: profile_state::IsUnset,
9191+{
9292+ /// Set the `createdAt` field (required)
9393+ pub fn created_at(
9494+ mut self,
9595+ value: impl Into<jacquard_common::types::string::Datetime>,
9696+ ) -> ProfileBuilder<'a, profile_state::SetCreatedAt<S>> {
9797+ self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
9898+ ProfileBuilder {
9999+ _phantom_state: ::core::marker::PhantomData,
100100+ __unsafe_private_named: self.__unsafe_private_named,
101101+ _phantom: ::core::marker::PhantomData,
102102+ }
103103+ }
104104+}
105105+106106+impl<'a, S: profile_state::State> ProfileBuilder<'a, S> {
107107+ /// Set the `defaultHold` field (optional)
108108+ pub fn default_hold(
109109+ mut self,
110110+ value: impl Into<Option<jacquard_common::types::string::Uri<'a>>>,
111111+ ) -> Self {
112112+ self.__unsafe_private_named.1 = value.into();
113113+ self
114114+ }
115115+ /// Set the `defaultHold` field to an Option value (optional)
116116+ pub fn maybe_default_hold(
117117+ mut self,
118118+ value: Option<jacquard_common::types::string::Uri<'a>>,
119119+ ) -> Self {
120120+ self.__unsafe_private_named.1 = value;
121121+ self
122122+ }
123123+}
124124+125125+impl<'a, S: profile_state::State> ProfileBuilder<'a, S> {
126126+ /// Set the `updatedAt` field (optional)
127127+ pub fn updated_at(
128128+ mut self,
129129+ value: impl Into<Option<jacquard_common::types::string::Datetime>>,
130130+ ) -> Self {
131131+ self.__unsafe_private_named.2 = value.into();
132132+ self
133133+ }
134134+ /// Set the `updatedAt` field to an Option value (optional)
135135+ pub fn maybe_updated_at(
136136+ mut self,
137137+ value: Option<jacquard_common::types::string::Datetime>,
138138+ ) -> Self {
139139+ self.__unsafe_private_named.2 = value;
140140+ self
141141+ }
142142+}
143143+144144+impl<'a, S> ProfileBuilder<'a, S>
145145+where
146146+ S: profile_state::State,
147147+ S::CreatedAt: profile_state::IsSet,
148148+{
149149+ /// Build the final struct
150150+ pub fn build(self) -> Profile<'a> {
151151+ Profile {
152152+ created_at: self.__unsafe_private_named.0.unwrap(),
153153+ default_hold: self.__unsafe_private_named.1,
154154+ updated_at: self.__unsafe_private_named.2,
155155+ extra_data: Default::default(),
156156+ }
157157+ }
158158+ /// Build the final struct with custom extra_data
159159+ pub fn build_with_data(
160160+ self,
161161+ extra_data: std::collections::BTreeMap<
162162+ jacquard_common::smol_str::SmolStr,
163163+ jacquard_common::types::value::Data<'a>,
164164+ >,
165165+ ) -> Profile<'a> {
166166+ Profile {
167167+ created_at: self.__unsafe_private_named.0.unwrap(),
168168+ default_hold: self.__unsafe_private_named.1,
169169+ updated_at: self.__unsafe_private_named.2,
170170+ extra_data: Some(extra_data),
171171+ }
172172+ }
173173+}
174174+175175+impl<'a> Profile<'a> {
176176+ pub fn uri(
177177+ uri: impl Into<jacquard_common::CowStr<'a>>,
178178+ ) -> Result<
179179+ jacquard_common::types::uri::RecordUri<'a, ProfileRecord>,
180180+ jacquard_common::types::uri::UriError,
181181+ > {
182182+ jacquard_common::types::uri::RecordUri::try_from_uri(
183183+ jacquard_common::types::string::AtUri::new_cow(uri.into())?,
184184+ )
185185+ }
186186+}
187187+188188+/// Typed wrapper for GetRecord response with this collection's record type.
189189+#[derive(
190190+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
191191+)]
192192+#[serde(rename_all = "camelCase")]
193193+pub struct ProfileGetRecordOutput<'a> {
194194+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
195195+ #[serde(borrow)]
196196+ pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
197197+ #[serde(borrow)]
198198+ pub uri: jacquard_common::types::string::AtUri<'a>,
199199+ #[serde(borrow)]
200200+ pub value: Profile<'a>,
201201+}
202202+203203+impl From<ProfileGetRecordOutput<'_>> for Profile<'_> {
204204+ fn from(output: ProfileGetRecordOutput<'_>) -> Self {
205205+ use jacquard_common::IntoStatic;
206206+ output.value.into_static()
207207+ }
208208+}
209209+210210+impl jacquard_common::types::collection::Collection for Profile<'_> {
211211+ const NSID: &'static str = "io.atcr.sailor.profile";
212212+ type Record = ProfileRecord;
213213+}
214214+215215+/// Marker type for deserializing records from this collection.
216216+#[derive(Debug, serde::Serialize, serde::Deserialize)]
217217+pub struct ProfileRecord;
218218+impl jacquard_common::xrpc::XrpcResp for ProfileRecord {
219219+ const NSID: &'static str = "io.atcr.sailor.profile";
220220+ const ENCODING: &'static str = "application/json";
221221+ type Output<'de> = ProfileGetRecordOutput<'de>;
222222+ type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
223223+}
224224+225225+impl jacquard_common::types::collection::Collection for ProfileRecord {
226226+ const NSID: &'static str = "io.atcr.sailor.profile";
227227+ type Record = ProfileRecord;
228228+}
229229+230230+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Profile<'a> {
231231+ fn nsid() -> &'static str {
232232+ "io.atcr.sailor.profile"
233233+ }
234234+ fn def_name() -> &'static str {
235235+ "main"
236236+ }
237237+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
238238+ lexicon_doc_io_atcr_sailor_profile()
239239+ }
240240+ fn validate(
241241+ &self,
242242+ ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
243243+ Ok(())
244244+ }
245245+}
246246+247247+fn lexicon_doc_io_atcr_sailor_profile() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
248248+ ::jacquard_lexicon::lexicon::LexiconDoc {
249249+ lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
250250+ id: ::jacquard_common::CowStr::new_static("io.atcr.sailor.profile"),
251251+ revision: None,
252252+ description: None,
253253+ defs: {
254254+ let mut map = ::std::collections::BTreeMap::new();
255255+ map.insert(
256256+ ::jacquard_common::smol_str::SmolStr::new_static("main"),
257257+ ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord {
258258+ description: Some(
259259+ ::jacquard_common::CowStr::new_static(
260260+ "User profile for ATCR registry. Stores preferences like default hold for blob storage.",
261261+ ),
262262+ ),
263263+ key: Some(::jacquard_common::CowStr::new_static("literal:self")),
264264+ record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject {
265265+ description: None,
266266+ required: Some(
267267+ vec![
268268+ ::jacquard_common::smol_str::SmolStr::new_static("createdAt")
269269+ ],
270270+ ),
271271+ nullable: None,
272272+ properties: {
273273+ #[allow(unused_mut)]
274274+ let mut map = ::std::collections::BTreeMap::new();
275275+ map.insert(
276276+ ::jacquard_common::smol_str::SmolStr::new_static(
277277+ "createdAt",
278278+ ),
279279+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
280280+ description: Some(
281281+ ::jacquard_common::CowStr::new_static(
282282+ "Profile creation timestamp",
283283+ ),
284284+ ),
285285+ format: Some(
286286+ ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
287287+ ),
288288+ default: None,
289289+ min_length: None,
290290+ max_length: None,
291291+ min_graphemes: None,
292292+ max_graphemes: None,
293293+ r#enum: None,
294294+ r#const: None,
295295+ known_values: None,
296296+ }),
297297+ );
298298+ map.insert(
299299+ ::jacquard_common::smol_str::SmolStr::new_static(
300300+ "defaultHold",
301301+ ),
302302+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
303303+ description: Some(
304304+ ::jacquard_common::CowStr::new_static(
305305+ "Default hold endpoint for blob storage. If null, user has opted out of defaults.",
306306+ ),
307307+ ),
308308+ format: Some(
309309+ ::jacquard_lexicon::lexicon::LexStringFormat::Uri,
310310+ ),
311311+ default: None,
312312+ min_length: None,
313313+ max_length: None,
314314+ min_graphemes: None,
315315+ max_graphemes: None,
316316+ r#enum: None,
317317+ r#const: None,
318318+ known_values: None,
319319+ }),
320320+ );
321321+ map.insert(
322322+ ::jacquard_common::smol_str::SmolStr::new_static(
323323+ "updatedAt",
324324+ ),
325325+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
326326+ description: Some(
327327+ ::jacquard_common::CowStr::new_static(
328328+ "Profile last updated timestamp",
329329+ ),
330330+ ),
331331+ format: Some(
332332+ ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
333333+ ),
334334+ default: None,
335335+ min_length: None,
336336+ max_length: None,
337337+ min_graphemes: None,
338338+ max_graphemes: None,
339339+ r#enum: None,
340340+ r#const: None,
341341+ known_values: None,
342342+ }),
343343+ );
344344+ map
345345+ },
346346+ }),
347347+ }),
348348+ );
349349+ map
350350+ },
351351+ }
352352+}
+544
crates/jacquard-api/src/io_atcr/sailor/star.rs
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// Lexicon: io.atcr.sailor.star
44+//
55+// This file was automatically generated from Lexicon schemas.
66+// Any manual changes will be overwritten on the next regeneration.
77+88+/// A star (like) on a container image repository. Stored in the starrer's PDS, similar to Bluesky likes.
99+#[jacquard_derive::lexicon]
1010+#[derive(
1111+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
1212+)]
1313+#[serde(rename_all = "camelCase")]
1414+pub struct Star<'a> {
1515+ /// Star creation timestamp
1616+ pub created_at: jacquard_common::types::string::Datetime,
1717+ /// The repository being starred
1818+ #[serde(borrow)]
1919+ pub subject: crate::io_atcr::sailor::star::Subject<'a>,
2020+}
2121+2222+pub mod star_state {
2323+2424+ pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
2525+ #[allow(unused)]
2626+ use ::core::marker::PhantomData;
2727+ mod sealed {
2828+ pub trait Sealed {}
2929+ }
3030+ /// State trait tracking which required fields have been set
3131+ pub trait State: sealed::Sealed {
3232+ type Subject;
3333+ type CreatedAt;
3434+ }
3535+ /// Empty state - all required fields are unset
3636+ pub struct Empty(());
3737+ impl sealed::Sealed for Empty {}
3838+ impl State for Empty {
3939+ type Subject = Unset;
4040+ type CreatedAt = Unset;
4141+ }
4242+ ///State transition - sets the `subject` field to Set
4343+ pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
4444+ impl<S: State> sealed::Sealed for SetSubject<S> {}
4545+ impl<S: State> State for SetSubject<S> {
4646+ type Subject = Set<members::subject>;
4747+ type CreatedAt = S::CreatedAt;
4848+ }
4949+ ///State transition - sets the `created_at` field to Set
5050+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
5151+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
5252+ impl<S: State> State for SetCreatedAt<S> {
5353+ type Subject = S::Subject;
5454+ type CreatedAt = Set<members::created_at>;
5555+ }
5656+ /// Marker types for field names
5757+ #[allow(non_camel_case_types)]
5858+ pub mod members {
5959+ ///Marker type for the `subject` field
6060+ pub struct subject(());
6161+ ///Marker type for the `created_at` field
6262+ pub struct created_at(());
6363+ }
6464+}
6565+6666+/// Builder for constructing an instance of this type
6767+pub struct StarBuilder<'a, S: star_state::State> {
6868+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
6969+ __unsafe_private_named: (
7070+ ::core::option::Option<jacquard_common::types::string::Datetime>,
7171+ ::core::option::Option<crate::io_atcr::sailor::star::Subject<'a>>,
7272+ ),
7373+ _phantom: ::core::marker::PhantomData<&'a ()>,
7474+}
7575+7676+impl<'a> Star<'a> {
7777+ /// Create a new builder for this type
7878+ pub fn new() -> StarBuilder<'a, star_state::Empty> {
7979+ StarBuilder::new()
8080+ }
8181+}
8282+8383+impl<'a> StarBuilder<'a, star_state::Empty> {
8484+ /// Create a new builder with all fields unset
8585+ pub fn new() -> Self {
8686+ StarBuilder {
8787+ _phantom_state: ::core::marker::PhantomData,
8888+ __unsafe_private_named: (None, None),
8989+ _phantom: ::core::marker::PhantomData,
9090+ }
9191+ }
9292+}
9393+9494+impl<'a, S> StarBuilder<'a, S>
9595+where
9696+ S: star_state::State,
9797+ S::CreatedAt: star_state::IsUnset,
9898+{
9999+ /// Set the `createdAt` field (required)
100100+ pub fn created_at(
101101+ mut self,
102102+ value: impl Into<jacquard_common::types::string::Datetime>,
103103+ ) -> StarBuilder<'a, star_state::SetCreatedAt<S>> {
104104+ self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
105105+ StarBuilder {
106106+ _phantom_state: ::core::marker::PhantomData,
107107+ __unsafe_private_named: self.__unsafe_private_named,
108108+ _phantom: ::core::marker::PhantomData,
109109+ }
110110+ }
111111+}
112112+113113+impl<'a, S> StarBuilder<'a, S>
114114+where
115115+ S: star_state::State,
116116+ S::Subject: star_state::IsUnset,
117117+{
118118+ /// Set the `subject` field (required)
119119+ pub fn subject(
120120+ mut self,
121121+ value: impl Into<crate::io_atcr::sailor::star::Subject<'a>>,
122122+ ) -> StarBuilder<'a, star_state::SetSubject<S>> {
123123+ self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
124124+ StarBuilder {
125125+ _phantom_state: ::core::marker::PhantomData,
126126+ __unsafe_private_named: self.__unsafe_private_named,
127127+ _phantom: ::core::marker::PhantomData,
128128+ }
129129+ }
130130+}
131131+132132+impl<'a, S> StarBuilder<'a, S>
133133+where
134134+ S: star_state::State,
135135+ S::Subject: star_state::IsSet,
136136+ S::CreatedAt: star_state::IsSet,
137137+{
138138+ /// Build the final struct
139139+ pub fn build(self) -> Star<'a> {
140140+ Star {
141141+ created_at: self.__unsafe_private_named.0.unwrap(),
142142+ subject: self.__unsafe_private_named.1.unwrap(),
143143+ extra_data: Default::default(),
144144+ }
145145+ }
146146+ /// Build the final struct with custom extra_data
147147+ pub fn build_with_data(
148148+ self,
149149+ extra_data: std::collections::BTreeMap<
150150+ jacquard_common::smol_str::SmolStr,
151151+ jacquard_common::types::value::Data<'a>,
152152+ >,
153153+ ) -> Star<'a> {
154154+ Star {
155155+ created_at: self.__unsafe_private_named.0.unwrap(),
156156+ subject: self.__unsafe_private_named.1.unwrap(),
157157+ extra_data: Some(extra_data),
158158+ }
159159+ }
160160+}
161161+162162+impl<'a> Star<'a> {
163163+ pub fn uri(
164164+ uri: impl Into<jacquard_common::CowStr<'a>>,
165165+ ) -> Result<
166166+ jacquard_common::types::uri::RecordUri<'a, StarRecord>,
167167+ jacquard_common::types::uri::UriError,
168168+ > {
169169+ jacquard_common::types::uri::RecordUri::try_from_uri(
170170+ jacquard_common::types::string::AtUri::new_cow(uri.into())?,
171171+ )
172172+ }
173173+}
174174+175175+/// Typed wrapper for GetRecord response with this collection's record type.
176176+#[derive(
177177+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
178178+)]
179179+#[serde(rename_all = "camelCase")]
180180+pub struct StarGetRecordOutput<'a> {
181181+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
182182+ #[serde(borrow)]
183183+ pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
184184+ #[serde(borrow)]
185185+ pub uri: jacquard_common::types::string::AtUri<'a>,
186186+ #[serde(borrow)]
187187+ pub value: Star<'a>,
188188+}
189189+190190+impl From<StarGetRecordOutput<'_>> for Star<'_> {
191191+ fn from(output: StarGetRecordOutput<'_>) -> Self {
192192+ use jacquard_common::IntoStatic;
193193+ output.value.into_static()
194194+ }
195195+}
196196+197197+impl jacquard_common::types::collection::Collection for Star<'_> {
198198+ const NSID: &'static str = "io.atcr.sailor.star";
199199+ type Record = StarRecord;
200200+}
201201+202202+/// Marker type for deserializing records from this collection.
203203+#[derive(Debug, serde::Serialize, serde::Deserialize)]
204204+pub struct StarRecord;
205205+impl jacquard_common::xrpc::XrpcResp for StarRecord {
206206+ const NSID: &'static str = "io.atcr.sailor.star";
207207+ const ENCODING: &'static str = "application/json";
208208+ type Output<'de> = StarGetRecordOutput<'de>;
209209+ type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
210210+}
211211+212212+impl jacquard_common::types::collection::Collection for StarRecord {
213213+ const NSID: &'static str = "io.atcr.sailor.star";
214214+ type Record = StarRecord;
215215+}
216216+217217+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Star<'a> {
218218+ fn nsid() -> &'static str {
219219+ "io.atcr.sailor.star"
220220+ }
221221+ fn def_name() -> &'static str {
222222+ "main"
223223+ }
224224+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
225225+ lexicon_doc_io_atcr_sailor_star()
226226+ }
227227+ fn validate(
228228+ &self,
229229+ ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
230230+ Ok(())
231231+ }
232232+}
233233+234234+fn lexicon_doc_io_atcr_sailor_star() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
235235+ ::jacquard_lexicon::lexicon::LexiconDoc {
236236+ lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
237237+ id: ::jacquard_common::CowStr::new_static("io.atcr.sailor.star"),
238238+ revision: None,
239239+ description: None,
240240+ defs: {
241241+ let mut map = ::std::collections::BTreeMap::new();
242242+ map.insert(
243243+ ::jacquard_common::smol_str::SmolStr::new_static("main"),
244244+ ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord {
245245+ description: Some(
246246+ ::jacquard_common::CowStr::new_static(
247247+ "A star (like) on a container image repository. Stored in the starrer's PDS, similar to Bluesky likes.",
248248+ ),
249249+ ),
250250+ key: Some(::jacquard_common::CowStr::new_static("any")),
251251+ record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject {
252252+ description: None,
253253+ required: Some(
254254+ vec![
255255+ ::jacquard_common::smol_str::SmolStr::new_static("subject"),
256256+ ::jacquard_common::smol_str::SmolStr::new_static("createdAt")
257257+ ],
258258+ ),
259259+ nullable: None,
260260+ properties: {
261261+ #[allow(unused_mut)]
262262+ let mut map = ::std::collections::BTreeMap::new();
263263+ map.insert(
264264+ ::jacquard_common::smol_str::SmolStr::new_static(
265265+ "createdAt",
266266+ ),
267267+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
268268+ description: Some(
269269+ ::jacquard_common::CowStr::new_static(
270270+ "Star creation timestamp",
271271+ ),
272272+ ),
273273+ format: Some(
274274+ ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
275275+ ),
276276+ default: None,
277277+ min_length: None,
278278+ max_length: None,
279279+ min_graphemes: None,
280280+ max_graphemes: None,
281281+ r#enum: None,
282282+ r#const: None,
283283+ known_values: None,
284284+ }),
285285+ );
286286+ map.insert(
287287+ ::jacquard_common::smol_str::SmolStr::new_static("subject"),
288288+ ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
289289+ description: None,
290290+ r#ref: ::jacquard_common::CowStr::new_static("#subject"),
291291+ }),
292292+ );
293293+ map
294294+ },
295295+ }),
296296+ }),
297297+ );
298298+ map.insert(
299299+ ::jacquard_common::smol_str::SmolStr::new_static("subject"),
300300+ ::jacquard_lexicon::lexicon::LexUserType::Object(
301301+ ::jacquard_lexicon::lexicon::LexObject {
302302+ description: Some(::jacquard_common::CowStr::new_static(
303303+ "Reference to a repository owned by a user",
304304+ )),
305305+ required: Some(vec![
306306+ ::jacquard_common::smol_str::SmolStr::new_static("did"),
307307+ ::jacquard_common::smol_str::SmolStr::new_static("repository"),
308308+ ]),
309309+ nullable: None,
310310+ properties: {
311311+ #[allow(unused_mut)]
312312+ let mut map = ::std::collections::BTreeMap::new();
313313+ map.insert(
314314+ ::jacquard_common::smol_str::SmolStr::new_static("did"),
315315+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(
316316+ ::jacquard_lexicon::lexicon::LexString {
317317+ description: Some(::jacquard_common::CowStr::new_static(
318318+ "DID of the repository owner",
319319+ )),
320320+ format: Some(
321321+ ::jacquard_lexicon::lexicon::LexStringFormat::Did,
322322+ ),
323323+ default: None,
324324+ min_length: None,
325325+ max_length: None,
326326+ min_graphemes: None,
327327+ max_graphemes: None,
328328+ r#enum: None,
329329+ r#const: None,
330330+ known_values: None,
331331+ },
332332+ ),
333333+ );
334334+ map.insert(
335335+ ::jacquard_common::smol_str::SmolStr::new_static("repository"),
336336+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(
337337+ ::jacquard_lexicon::lexicon::LexString {
338338+ description: Some(::jacquard_common::CowStr::new_static(
339339+ "Repository name (e.g., 'myapp')",
340340+ )),
341341+ format: None,
342342+ default: None,
343343+ min_length: None,
344344+ max_length: Some(255usize),
345345+ min_graphemes: None,
346346+ max_graphemes: None,
347347+ r#enum: None,
348348+ r#const: None,
349349+ known_values: None,
350350+ },
351351+ ),
352352+ );
353353+ map
354354+ },
355355+ },
356356+ ),
357357+ );
358358+ map
359359+ },
360360+ }
361361+}
362362+363363+/// Reference to a repository owned by a user
364364+#[jacquard_derive::lexicon]
365365+#[derive(
366366+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
367367+)]
368368+#[serde(rename_all = "camelCase")]
369369+pub struct Subject<'a> {
370370+ /// DID of the repository owner
371371+ #[serde(borrow)]
372372+ pub did: jacquard_common::types::string::Did<'a>,
373373+ /// Repository name (e.g., 'myapp')
374374+ #[serde(borrow)]
375375+ pub repository: jacquard_common::CowStr<'a>,
376376+}
377377+378378+pub mod subject_state {
379379+380380+ pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
381381+ #[allow(unused)]
382382+ use ::core::marker::PhantomData;
383383+ mod sealed {
384384+ pub trait Sealed {}
385385+ }
386386+ /// State trait tracking which required fields have been set
387387+ pub trait State: sealed::Sealed {
388388+ type Repository;
389389+ type Did;
390390+ }
391391+ /// Empty state - all required fields are unset
392392+ pub struct Empty(());
393393+ impl sealed::Sealed for Empty {}
394394+ impl State for Empty {
395395+ type Repository = Unset;
396396+ type Did = Unset;
397397+ }
398398+ ///State transition - sets the `repository` field to Set
399399+ pub struct SetRepository<S: State = Empty>(PhantomData<fn() -> S>);
400400+ impl<S: State> sealed::Sealed for SetRepository<S> {}
401401+ impl<S: State> State for SetRepository<S> {
402402+ type Repository = Set<members::repository>;
403403+ type Did = S::Did;
404404+ }
405405+ ///State transition - sets the `did` field to Set
406406+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
407407+ impl<S: State> sealed::Sealed for SetDid<S> {}
408408+ impl<S: State> State for SetDid<S> {
409409+ type Repository = S::Repository;
410410+ type Did = Set<members::did>;
411411+ }
412412+ /// Marker types for field names
413413+ #[allow(non_camel_case_types)]
414414+ pub mod members {
415415+ ///Marker type for the `repository` field
416416+ pub struct repository(());
417417+ ///Marker type for the `did` field
418418+ pub struct did(());
419419+ }
420420+}
421421+422422+/// Builder for constructing an instance of this type
423423+pub struct SubjectBuilder<'a, S: subject_state::State> {
424424+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
425425+ __unsafe_private_named: (
426426+ ::core::option::Option<jacquard_common::types::string::Did<'a>>,
427427+ ::core::option::Option<jacquard_common::CowStr<'a>>,
428428+ ),
429429+ _phantom: ::core::marker::PhantomData<&'a ()>,
430430+}
431431+432432+impl<'a> Subject<'a> {
433433+ /// Create a new builder for this type
434434+ pub fn new() -> SubjectBuilder<'a, subject_state::Empty> {
435435+ SubjectBuilder::new()
436436+ }
437437+}
438438+439439+impl<'a> SubjectBuilder<'a, subject_state::Empty> {
440440+ /// Create a new builder with all fields unset
441441+ pub fn new() -> Self {
442442+ SubjectBuilder {
443443+ _phantom_state: ::core::marker::PhantomData,
444444+ __unsafe_private_named: (None, None),
445445+ _phantom: ::core::marker::PhantomData,
446446+ }
447447+ }
448448+}
449449+450450+impl<'a, S> SubjectBuilder<'a, S>
451451+where
452452+ S: subject_state::State,
453453+ S::Did: subject_state::IsUnset,
454454+{
455455+ /// Set the `did` field (required)
456456+ pub fn did(
457457+ mut self,
458458+ value: impl Into<jacquard_common::types::string::Did<'a>>,
459459+ ) -> SubjectBuilder<'a, subject_state::SetDid<S>> {
460460+ self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
461461+ SubjectBuilder {
462462+ _phantom_state: ::core::marker::PhantomData,
463463+ __unsafe_private_named: self.__unsafe_private_named,
464464+ _phantom: ::core::marker::PhantomData,
465465+ }
466466+ }
467467+}
468468+469469+impl<'a, S> SubjectBuilder<'a, S>
470470+where
471471+ S: subject_state::State,
472472+ S::Repository: subject_state::IsUnset,
473473+{
474474+ /// Set the `repository` field (required)
475475+ pub fn repository(
476476+ mut self,
477477+ value: impl Into<jacquard_common::CowStr<'a>>,
478478+ ) -> SubjectBuilder<'a, subject_state::SetRepository<S>> {
479479+ self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
480480+ SubjectBuilder {
481481+ _phantom_state: ::core::marker::PhantomData,
482482+ __unsafe_private_named: self.__unsafe_private_named,
483483+ _phantom: ::core::marker::PhantomData,
484484+ }
485485+ }
486486+}
487487+488488+impl<'a, S> SubjectBuilder<'a, S>
489489+where
490490+ S: subject_state::State,
491491+ S::Repository: subject_state::IsSet,
492492+ S::Did: subject_state::IsSet,
493493+{
494494+ /// Build the final struct
495495+ pub fn build(self) -> Subject<'a> {
496496+ Subject {
497497+ did: self.__unsafe_private_named.0.unwrap(),
498498+ repository: self.__unsafe_private_named.1.unwrap(),
499499+ extra_data: Default::default(),
500500+ }
501501+ }
502502+ /// Build the final struct with custom extra_data
503503+ pub fn build_with_data(
504504+ self,
505505+ extra_data: std::collections::BTreeMap<
506506+ jacquard_common::smol_str::SmolStr,
507507+ jacquard_common::types::value::Data<'a>,
508508+ >,
509509+ ) -> Subject<'a> {
510510+ Subject {
511511+ did: self.__unsafe_private_named.0.unwrap(),
512512+ repository: self.__unsafe_private_named.1.unwrap(),
513513+ extra_data: Some(extra_data),
514514+ }
515515+ }
516516+}
517517+518518+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Subject<'a> {
519519+ fn nsid() -> &'static str {
520520+ "io.atcr.sailor.star"
521521+ }
522522+ fn def_name() -> &'static str {
523523+ "subject"
524524+ }
525525+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
526526+ lexicon_doc_io_atcr_sailor_star()
527527+ }
528528+ fn validate(
529529+ &self,
530530+ ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
531531+ {
532532+ let value = &self.repository;
533533+ #[allow(unused_comparisons)]
534534+ if <str>::len(value.as_ref()) > 255usize {
535535+ return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
536536+ path: ::jacquard_lexicon::validation::ValidationPath::from_field("repository"),
537537+ max: 255usize,
538538+ actual: <str>::len(value.as_ref()),
539539+ });
540540+ }
541541+ }
542542+ Ok(())
543543+ }
544544+}
+490
crates/jacquard-api/src/io_atcr/tag.rs
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// Lexicon: io.atcr.tag
44+//
55+// This file was automatically generated from Lexicon schemas.
66+// Any manual changes will be overwritten on the next regeneration.
77+88+/// A named tag pointing to a specific manifest digest
99+#[jacquard_derive::lexicon]
1010+#[derive(
1111+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
1212+)]
1313+#[serde(rename_all = "camelCase")]
1414+pub struct Tag<'a> {
1515+ /// Tag creation timestamp
1616+ pub created_at: jacquard_common::types::string::Datetime,
1717+ /// 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.
1818+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
1919+ #[serde(borrow)]
2020+ pub manifest: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
2121+ /// DEPRECATED: Digest of the manifest (e.g., 'sha256:...'). Kept for backward compatibility with old records. New records should use 'manifest' field instead.
2222+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
2323+ #[serde(borrow)]
2424+ pub manifest_digest: std::option::Option<jacquard_common::CowStr<'a>>,
2525+ /// Repository name (e.g., 'myapp'). Scoped to user's DID.
2626+ #[serde(borrow)]
2727+ pub repository: jacquard_common::CowStr<'a>,
2828+ /// Tag name (e.g., 'latest', 'v1.0.0', '12-slim')
2929+ #[serde(borrow)]
3030+ pub tag: jacquard_common::CowStr<'a>,
3131+}
3232+3333+pub mod tag_state {
3434+3535+ pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
3636+ #[allow(unused)]
3737+ use ::core::marker::PhantomData;
3838+ mod sealed {
3939+ pub trait Sealed {}
4040+ }
4141+ /// State trait tracking which required fields have been set
4242+ pub trait State: sealed::Sealed {
4343+ type Repository;
4444+ type CreatedAt;
4545+ type Tag;
4646+ }
4747+ /// Empty state - all required fields are unset
4848+ pub struct Empty(());
4949+ impl sealed::Sealed for Empty {}
5050+ impl State for Empty {
5151+ type Repository = Unset;
5252+ type CreatedAt = Unset;
5353+ type Tag = Unset;
5454+ }
5555+ ///State transition - sets the `repository` field to Set
5656+ pub struct SetRepository<S: State = Empty>(PhantomData<fn() -> S>);
5757+ impl<S: State> sealed::Sealed for SetRepository<S> {}
5858+ impl<S: State> State for SetRepository<S> {
5959+ type Repository = Set<members::repository>;
6060+ type CreatedAt = S::CreatedAt;
6161+ type Tag = S::Tag;
6262+ }
6363+ ///State transition - sets the `created_at` field to Set
6464+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
6565+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
6666+ impl<S: State> State for SetCreatedAt<S> {
6767+ type Repository = S::Repository;
6868+ type CreatedAt = Set<members::created_at>;
6969+ type Tag = S::Tag;
7070+ }
7171+ ///State transition - sets the `tag` field to Set
7272+ pub struct SetTag<S: State = Empty>(PhantomData<fn() -> S>);
7373+ impl<S: State> sealed::Sealed for SetTag<S> {}
7474+ impl<S: State> State for SetTag<S> {
7575+ type Repository = S::Repository;
7676+ type CreatedAt = S::CreatedAt;
7777+ type Tag = Set<members::tag>;
7878+ }
7979+ /// Marker types for field names
8080+ #[allow(non_camel_case_types)]
8181+ pub mod members {
8282+ ///Marker type for the `repository` field
8383+ pub struct repository(());
8484+ ///Marker type for the `created_at` field
8585+ pub struct created_at(());
8686+ ///Marker type for the `tag` field
8787+ pub struct tag(());
8888+ }
8989+}
9090+9191+/// Builder for constructing an instance of this type
9292+pub struct TagBuilder<'a, S: tag_state::State> {
9393+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
9494+ __unsafe_private_named: (
9595+ ::core::option::Option<jacquard_common::types::string::Datetime>,
9696+ ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
9797+ ::core::option::Option<jacquard_common::CowStr<'a>>,
9898+ ::core::option::Option<jacquard_common::CowStr<'a>>,
9999+ ::core::option::Option<jacquard_common::CowStr<'a>>,
100100+ ),
101101+ _phantom: ::core::marker::PhantomData<&'a ()>,
102102+}
103103+104104+impl<'a> Tag<'a> {
105105+ /// Create a new builder for this type
106106+ pub fn new() -> TagBuilder<'a, tag_state::Empty> {
107107+ TagBuilder::new()
108108+ }
109109+}
110110+111111+impl<'a> TagBuilder<'a, tag_state::Empty> {
112112+ /// Create a new builder with all fields unset
113113+ pub fn new() -> Self {
114114+ TagBuilder {
115115+ _phantom_state: ::core::marker::PhantomData,
116116+ __unsafe_private_named: (None, None, None, None, None),
117117+ _phantom: ::core::marker::PhantomData,
118118+ }
119119+ }
120120+}
121121+122122+impl<'a, S> TagBuilder<'a, S>
123123+where
124124+ S: tag_state::State,
125125+ S::CreatedAt: tag_state::IsUnset,
126126+{
127127+ /// Set the `createdAt` field (required)
128128+ pub fn created_at(
129129+ mut self,
130130+ value: impl Into<jacquard_common::types::string::Datetime>,
131131+ ) -> TagBuilder<'a, tag_state::SetCreatedAt<S>> {
132132+ self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
133133+ TagBuilder {
134134+ _phantom_state: ::core::marker::PhantomData,
135135+ __unsafe_private_named: self.__unsafe_private_named,
136136+ _phantom: ::core::marker::PhantomData,
137137+ }
138138+ }
139139+}
140140+141141+impl<'a, S: tag_state::State> TagBuilder<'a, S> {
142142+ /// Set the `manifest` field (optional)
143143+ pub fn manifest(
144144+ mut self,
145145+ value: impl Into<Option<jacquard_common::types::string::AtUri<'a>>>,
146146+ ) -> Self {
147147+ self.__unsafe_private_named.1 = value.into();
148148+ self
149149+ }
150150+ /// Set the `manifest` field to an Option value (optional)
151151+ pub fn maybe_manifest(
152152+ mut self,
153153+ value: Option<jacquard_common::types::string::AtUri<'a>>,
154154+ ) -> Self {
155155+ self.__unsafe_private_named.1 = value;
156156+ self
157157+ }
158158+}
159159+160160+impl<'a, S: tag_state::State> TagBuilder<'a, S> {
161161+ /// Set the `manifestDigest` field (optional)
162162+ pub fn manifest_digest(
163163+ mut self,
164164+ value: impl Into<Option<jacquard_common::CowStr<'a>>>,
165165+ ) -> Self {
166166+ self.__unsafe_private_named.2 = value.into();
167167+ self
168168+ }
169169+ /// Set the `manifestDigest` field to an Option value (optional)
170170+ pub fn maybe_manifest_digest(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
171171+ self.__unsafe_private_named.2 = value;
172172+ self
173173+ }
174174+}
175175+176176+impl<'a, S> TagBuilder<'a, S>
177177+where
178178+ S: tag_state::State,
179179+ S::Repository: tag_state::IsUnset,
180180+{
181181+ /// Set the `repository` field (required)
182182+ pub fn repository(
183183+ mut self,
184184+ value: impl Into<jacquard_common::CowStr<'a>>,
185185+ ) -> TagBuilder<'a, tag_state::SetRepository<S>> {
186186+ self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into());
187187+ TagBuilder {
188188+ _phantom_state: ::core::marker::PhantomData,
189189+ __unsafe_private_named: self.__unsafe_private_named,
190190+ _phantom: ::core::marker::PhantomData,
191191+ }
192192+ }
193193+}
194194+195195+impl<'a, S> TagBuilder<'a, S>
196196+where
197197+ S: tag_state::State,
198198+ S::Tag: tag_state::IsUnset,
199199+{
200200+ /// Set the `tag` field (required)
201201+ pub fn tag(
202202+ mut self,
203203+ value: impl Into<jacquard_common::CowStr<'a>>,
204204+ ) -> TagBuilder<'a, tag_state::SetTag<S>> {
205205+ self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into());
206206+ TagBuilder {
207207+ _phantom_state: ::core::marker::PhantomData,
208208+ __unsafe_private_named: self.__unsafe_private_named,
209209+ _phantom: ::core::marker::PhantomData,
210210+ }
211211+ }
212212+}
213213+214214+impl<'a, S> TagBuilder<'a, S>
215215+where
216216+ S: tag_state::State,
217217+ S::Repository: tag_state::IsSet,
218218+ S::CreatedAt: tag_state::IsSet,
219219+ S::Tag: tag_state::IsSet,
220220+{
221221+ /// Build the final struct
222222+ pub fn build(self) -> Tag<'a> {
223223+ Tag {
224224+ created_at: self.__unsafe_private_named.0.unwrap(),
225225+ manifest: self.__unsafe_private_named.1,
226226+ manifest_digest: self.__unsafe_private_named.2,
227227+ repository: self.__unsafe_private_named.3.unwrap(),
228228+ tag: self.__unsafe_private_named.4.unwrap(),
229229+ extra_data: Default::default(),
230230+ }
231231+ }
232232+ /// Build the final struct with custom extra_data
233233+ pub fn build_with_data(
234234+ self,
235235+ extra_data: std::collections::BTreeMap<
236236+ jacquard_common::smol_str::SmolStr,
237237+ jacquard_common::types::value::Data<'a>,
238238+ >,
239239+ ) -> Tag<'a> {
240240+ Tag {
241241+ created_at: self.__unsafe_private_named.0.unwrap(),
242242+ manifest: self.__unsafe_private_named.1,
243243+ manifest_digest: self.__unsafe_private_named.2,
244244+ repository: self.__unsafe_private_named.3.unwrap(),
245245+ tag: self.__unsafe_private_named.4.unwrap(),
246246+ extra_data: Some(extra_data),
247247+ }
248248+ }
249249+}
250250+251251+impl<'a> Tag<'a> {
252252+ pub fn uri(
253253+ uri: impl Into<jacquard_common::CowStr<'a>>,
254254+ ) -> Result<
255255+ jacquard_common::types::uri::RecordUri<'a, TagRecord>,
256256+ jacquard_common::types::uri::UriError,
257257+ > {
258258+ jacquard_common::types::uri::RecordUri::try_from_uri(
259259+ jacquard_common::types::string::AtUri::new_cow(uri.into())?,
260260+ )
261261+ }
262262+}
263263+264264+/// Typed wrapper for GetRecord response with this collection's record type.
265265+#[derive(
266266+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
267267+)]
268268+#[serde(rename_all = "camelCase")]
269269+pub struct TagGetRecordOutput<'a> {
270270+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
271271+ #[serde(borrow)]
272272+ pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
273273+ #[serde(borrow)]
274274+ pub uri: jacquard_common::types::string::AtUri<'a>,
275275+ #[serde(borrow)]
276276+ pub value: Tag<'a>,
277277+}
278278+279279+impl From<TagGetRecordOutput<'_>> for Tag<'_> {
280280+ fn from(output: TagGetRecordOutput<'_>) -> Self {
281281+ use jacquard_common::IntoStatic;
282282+ output.value.into_static()
283283+ }
284284+}
285285+286286+impl jacquard_common::types::collection::Collection for Tag<'_> {
287287+ const NSID: &'static str = "io.atcr.tag";
288288+ type Record = TagRecord;
289289+}
290290+291291+/// Marker type for deserializing records from this collection.
292292+#[derive(Debug, serde::Serialize, serde::Deserialize)]
293293+pub struct TagRecord;
294294+impl jacquard_common::xrpc::XrpcResp for TagRecord {
295295+ const NSID: &'static str = "io.atcr.tag";
296296+ const ENCODING: &'static str = "application/json";
297297+ type Output<'de> = TagGetRecordOutput<'de>;
298298+ type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
299299+}
300300+301301+impl jacquard_common::types::collection::Collection for TagRecord {
302302+ const NSID: &'static str = "io.atcr.tag";
303303+ type Record = TagRecord;
304304+}
305305+306306+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Tag<'a> {
307307+ fn nsid() -> &'static str {
308308+ "io.atcr.tag"
309309+ }
310310+ fn def_name() -> &'static str {
311311+ "main"
312312+ }
313313+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
314314+ lexicon_doc_io_atcr_tag()
315315+ }
316316+ fn validate(
317317+ &self,
318318+ ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
319319+ {
320320+ let value = &self.repository;
321321+ #[allow(unused_comparisons)]
322322+ if <str>::len(value.as_ref()) > 255usize {
323323+ return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
324324+ path: ::jacquard_lexicon::validation::ValidationPath::from_field("repository"),
325325+ max: 255usize,
326326+ actual: <str>::len(value.as_ref()),
327327+ });
328328+ }
329329+ }
330330+ {
331331+ let value = &self.tag;
332332+ #[allow(unused_comparisons)]
333333+ if <str>::len(value.as_ref()) > 128usize {
334334+ return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
335335+ path: ::jacquard_lexicon::validation::ValidationPath::from_field("tag"),
336336+ max: 128usize,
337337+ actual: <str>::len(value.as_ref()),
338338+ });
339339+ }
340340+ }
341341+ Ok(())
342342+ }
343343+}
344344+345345+fn lexicon_doc_io_atcr_tag() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
346346+ ::jacquard_lexicon::lexicon::LexiconDoc {
347347+ lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
348348+ id: ::jacquard_common::CowStr::new_static("io.atcr.tag"),
349349+ revision: None,
350350+ description: None,
351351+ defs: {
352352+ let mut map = ::std::collections::BTreeMap::new();
353353+ map.insert(
354354+ ::jacquard_common::smol_str::SmolStr::new_static("main"),
355355+ ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord {
356356+ description: Some(
357357+ ::jacquard_common::CowStr::new_static(
358358+ "A named tag pointing to a specific manifest digest",
359359+ ),
360360+ ),
361361+ key: Some(::jacquard_common::CowStr::new_static("any")),
362362+ record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject {
363363+ description: None,
364364+ required: Some(
365365+ vec![
366366+ ::jacquard_common::smol_str::SmolStr::new_static("repository"),
367367+ ::jacquard_common::smol_str::SmolStr::new_static("tag"),
368368+ ::jacquard_common::smol_str::SmolStr::new_static("createdAt")
369369+ ],
370370+ ),
371371+ nullable: None,
372372+ properties: {
373373+ #[allow(unused_mut)]
374374+ let mut map = ::std::collections::BTreeMap::new();
375375+ map.insert(
376376+ ::jacquard_common::smol_str::SmolStr::new_static(
377377+ "createdAt",
378378+ ),
379379+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
380380+ description: Some(
381381+ ::jacquard_common::CowStr::new_static(
382382+ "Tag creation timestamp",
383383+ ),
384384+ ),
385385+ format: Some(
386386+ ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
387387+ ),
388388+ default: None,
389389+ min_length: None,
390390+ max_length: None,
391391+ min_graphemes: None,
392392+ max_graphemes: None,
393393+ r#enum: None,
394394+ r#const: None,
395395+ known_values: None,
396396+ }),
397397+ );
398398+ map.insert(
399399+ ::jacquard_common::smol_str::SmolStr::new_static(
400400+ "manifest",
401401+ ),
402402+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
403403+ description: Some(
404404+ ::jacquard_common::CowStr::new_static(
405405+ "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.",
406406+ ),
407407+ ),
408408+ format: Some(
409409+ ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
410410+ ),
411411+ default: None,
412412+ min_length: None,
413413+ max_length: None,
414414+ min_graphemes: None,
415415+ max_graphemes: None,
416416+ r#enum: None,
417417+ r#const: None,
418418+ known_values: None,
419419+ }),
420420+ );
421421+ map.insert(
422422+ ::jacquard_common::smol_str::SmolStr::new_static(
423423+ "manifestDigest",
424424+ ),
425425+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
426426+ description: Some(
427427+ ::jacquard_common::CowStr::new_static(
428428+ "DEPRECATED: Digest of the manifest (e.g., 'sha256:...'). Kept for backward compatibility with old records. New records should use 'manifest' field instead.",
429429+ ),
430430+ ),
431431+ format: None,
432432+ default: None,
433433+ min_length: None,
434434+ max_length: None,
435435+ min_graphemes: None,
436436+ max_graphemes: None,
437437+ r#enum: None,
438438+ r#const: None,
439439+ known_values: None,
440440+ }),
441441+ );
442442+ map.insert(
443443+ ::jacquard_common::smol_str::SmolStr::new_static(
444444+ "repository",
445445+ ),
446446+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
447447+ description: Some(
448448+ ::jacquard_common::CowStr::new_static(
449449+ "Repository name (e.g., 'myapp'). Scoped to user's DID.",
450450+ ),
451451+ ),
452452+ format: None,
453453+ default: None,
454454+ min_length: None,
455455+ max_length: Some(255usize),
456456+ min_graphemes: None,
457457+ max_graphemes: None,
458458+ r#enum: None,
459459+ r#const: None,
460460+ known_values: None,
461461+ }),
462462+ );
463463+ map.insert(
464464+ ::jacquard_common::smol_str::SmolStr::new_static("tag"),
465465+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
466466+ description: Some(
467467+ ::jacquard_common::CowStr::new_static(
468468+ "Tag name (e.g., 'latest', 'v1.0.0', '12-slim')",
469469+ ),
470470+ ),
471471+ format: None,
472472+ default: None,
473473+ min_length: None,
474474+ max_length: Some(128usize),
475475+ min_graphemes: None,
476476+ max_graphemes: None,
477477+ r#enum: None,
478478+ r#const: None,
479479+ known_values: None,
480480+ }),
481481+ );
482482+ map
483483+ },
484484+ }),
485485+ }),
486486+ );
487487+ map
488488+ },
489489+ }
490490+}
+7
crates/jacquard-api/src/io_whiteside.rs
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// This file was automatically generated from Lexicon schemas.
44+// Any manual changes will be overwritten on the next regeneration.
55+66+pub mod linked_account;
77+pub mod profile;