atproto blogging
1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: site.standard.document
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8/// A document record representing a published article, blog post, or other content. Documents can belong to a publication or exist independently.
9#[jacquard_derive::lexicon]
10#[derive(
11 serde::Serialize,
12 serde::Deserialize,
13 Debug,
14 Clone,
15 PartialEq,
16 Eq,
17 jacquard_derive::IntoStatic
18)]
19#[serde(rename_all = "camelCase")]
20pub struct Document<'a> {
21 /// Strong reference to a Bluesky post. Useful to keep track of comments off-platform.
22 #[serde(skip_serializing_if = "std::option::Option::is_none")]
23 #[serde(borrow)]
24 pub bsky_post_ref: std::option::Option<
25 crate::com_atproto::repo::strong_ref::StrongRef<'a>,
26 >,
27 /// Open union used to define the record's content. Each entry must specify a $type and may be extended with other lexicons to support additional content formats.
28 #[serde(skip_serializing_if = "std::option::Option::is_none")]
29 #[serde(borrow)]
30 pub content: std::option::Option<jacquard_common::types::value::Data<'a>>,
31 /// Image to used for thumbnail or cover image. Less than 1MB is size.
32 #[serde(skip_serializing_if = "std::option::Option::is_none")]
33 #[serde(borrow)]
34 pub cover_image: std::option::Option<jacquard_common::types::blob::BlobRef<'a>>,
35 /// A brief description or excerpt from the document.
36 #[serde(skip_serializing_if = "std::option::Option::is_none")]
37 #[serde(borrow)]
38 pub description: std::option::Option<jacquard_common::CowStr<'a>>,
39 /// Combine with site or publication url to construct a canonical URL to the document. Prepend with a leading slash.
40 #[serde(skip_serializing_if = "std::option::Option::is_none")]
41 #[serde(borrow)]
42 pub path: std::option::Option<jacquard_common::CowStr<'a>>,
43 /// Timestamp of the documents publish time.
44 pub published_at: jacquard_common::types::string::Datetime,
45 /// Points to a publication record (at://) or a publication url (https://) for loose documents. Avoid trailing slashes.
46 #[serde(borrow)]
47 pub site: jacquard_common::types::string::Uri<'a>,
48 /// Array of strings used to tag or categorize the document. Avoid prepending tags with hashtags.
49 #[serde(skip_serializing_if = "std::option::Option::is_none")]
50 #[serde(borrow)]
51 pub tags: std::option::Option<Vec<jacquard_common::CowStr<'a>>>,
52 /// Plaintext representation of the documents contents. Should not contain markdown or other formatting.
53 #[serde(skip_serializing_if = "std::option::Option::is_none")]
54 #[serde(borrow)]
55 pub text_content: std::option::Option<jacquard_common::CowStr<'a>>,
56 /// Title of the document.
57 #[serde(borrow)]
58 pub title: jacquard_common::CowStr<'a>,
59 /// Timestamp of the documents last edit.
60 #[serde(skip_serializing_if = "std::option::Option::is_none")]
61 pub updated_at: std::option::Option<jacquard_common::types::string::Datetime>,
62}
63
64pub mod document_state {
65
66 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
67 #[allow(unused)]
68 use ::core::marker::PhantomData;
69 mod sealed {
70 pub trait Sealed {}
71 }
72 /// State trait tracking which required fields have been set
73 pub trait State: sealed::Sealed {
74 type Site;
75 type Title;
76 type PublishedAt;
77 }
78 /// Empty state - all required fields are unset
79 pub struct Empty(());
80 impl sealed::Sealed for Empty {}
81 impl State for Empty {
82 type Site = Unset;
83 type Title = Unset;
84 type PublishedAt = Unset;
85 }
86 ///State transition - sets the `site` field to Set
87 pub struct SetSite<S: State = Empty>(PhantomData<fn() -> S>);
88 impl<S: State> sealed::Sealed for SetSite<S> {}
89 impl<S: State> State for SetSite<S> {
90 type Site = Set<members::site>;
91 type Title = S::Title;
92 type PublishedAt = S::PublishedAt;
93 }
94 ///State transition - sets the `title` field to Set
95 pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>);
96 impl<S: State> sealed::Sealed for SetTitle<S> {}
97 impl<S: State> State for SetTitle<S> {
98 type Site = S::Site;
99 type Title = Set<members::title>;
100 type PublishedAt = S::PublishedAt;
101 }
102 ///State transition - sets the `published_at` field to Set
103 pub struct SetPublishedAt<S: State = Empty>(PhantomData<fn() -> S>);
104 impl<S: State> sealed::Sealed for SetPublishedAt<S> {}
105 impl<S: State> State for SetPublishedAt<S> {
106 type Site = S::Site;
107 type Title = S::Title;
108 type PublishedAt = Set<members::published_at>;
109 }
110 /// Marker types for field names
111 #[allow(non_camel_case_types)]
112 pub mod members {
113 ///Marker type for the `site` field
114 pub struct site(());
115 ///Marker type for the `title` field
116 pub struct title(());
117 ///Marker type for the `published_at` field
118 pub struct published_at(());
119 }
120}
121
122/// Builder for constructing an instance of this type
123pub struct DocumentBuilder<'a, S: document_state::State> {
124 _phantom_state: ::core::marker::PhantomData<fn() -> S>,
125 __unsafe_private_named: (
126 ::core::option::Option<crate::com_atproto::repo::strong_ref::StrongRef<'a>>,
127 ::core::option::Option<jacquard_common::types::value::Data<'a>>,
128 ::core::option::Option<jacquard_common::types::blob::BlobRef<'a>>,
129 ::core::option::Option<jacquard_common::CowStr<'a>>,
130 ::core::option::Option<jacquard_common::CowStr<'a>>,
131 ::core::option::Option<jacquard_common::types::string::Datetime>,
132 ::core::option::Option<jacquard_common::types::string::Uri<'a>>,
133 ::core::option::Option<Vec<jacquard_common::CowStr<'a>>>,
134 ::core::option::Option<jacquard_common::CowStr<'a>>,
135 ::core::option::Option<jacquard_common::CowStr<'a>>,
136 ::core::option::Option<jacquard_common::types::string::Datetime>,
137 ),
138 _phantom: ::core::marker::PhantomData<&'a ()>,
139}
140
141impl<'a> Document<'a> {
142 /// Create a new builder for this type
143 pub fn new() -> DocumentBuilder<'a, document_state::Empty> {
144 DocumentBuilder::new()
145 }
146}
147
148impl<'a> DocumentBuilder<'a, document_state::Empty> {
149 /// Create a new builder with all fields unset
150 pub fn new() -> Self {
151 DocumentBuilder {
152 _phantom_state: ::core::marker::PhantomData,
153 __unsafe_private_named: (
154 None,
155 None,
156 None,
157 None,
158 None,
159 None,
160 None,
161 None,
162 None,
163 None,
164 None,
165 ),
166 _phantom: ::core::marker::PhantomData,
167 }
168 }
169}
170
171impl<'a, S: document_state::State> DocumentBuilder<'a, S> {
172 /// Set the `bskyPostRef` field (optional)
173 pub fn bsky_post_ref(
174 mut self,
175 value: impl Into<Option<crate::com_atproto::repo::strong_ref::StrongRef<'a>>>,
176 ) -> Self {
177 self.__unsafe_private_named.0 = value.into();
178 self
179 }
180 /// Set the `bskyPostRef` field to an Option value (optional)
181 pub fn maybe_bsky_post_ref(
182 mut self,
183 value: Option<crate::com_atproto::repo::strong_ref::StrongRef<'a>>,
184 ) -> Self {
185 self.__unsafe_private_named.0 = value;
186 self
187 }
188}
189
190impl<'a, S: document_state::State> DocumentBuilder<'a, S> {
191 /// Set the `content` field (optional)
192 pub fn content(
193 mut self,
194 value: impl Into<Option<jacquard_common::types::value::Data<'a>>>,
195 ) -> Self {
196 self.__unsafe_private_named.1 = value.into();
197 self
198 }
199 /// Set the `content` field to an Option value (optional)
200 pub fn maybe_content(
201 mut self,
202 value: Option<jacquard_common::types::value::Data<'a>>,
203 ) -> Self {
204 self.__unsafe_private_named.1 = value;
205 self
206 }
207}
208
209impl<'a, S: document_state::State> DocumentBuilder<'a, S> {
210 /// Set the `coverImage` field (optional)
211 pub fn cover_image(
212 mut self,
213 value: impl Into<Option<jacquard_common::types::blob::BlobRef<'a>>>,
214 ) -> Self {
215 self.__unsafe_private_named.2 = value.into();
216 self
217 }
218 /// Set the `coverImage` field to an Option value (optional)
219 pub fn maybe_cover_image(
220 mut self,
221 value: Option<jacquard_common::types::blob::BlobRef<'a>>,
222 ) -> Self {
223 self.__unsafe_private_named.2 = value;
224 self
225 }
226}
227
228impl<'a, S: document_state::State> DocumentBuilder<'a, S> {
229 /// Set the `description` field (optional)
230 pub fn description(
231 mut self,
232 value: impl Into<Option<jacquard_common::CowStr<'a>>>,
233 ) -> Self {
234 self.__unsafe_private_named.3 = value.into();
235 self
236 }
237 /// Set the `description` field to an Option value (optional)
238 pub fn maybe_description(
239 mut self,
240 value: Option<jacquard_common::CowStr<'a>>,
241 ) -> Self {
242 self.__unsafe_private_named.3 = value;
243 self
244 }
245}
246
247impl<'a, S: document_state::State> DocumentBuilder<'a, S> {
248 /// Set the `path` field (optional)
249 pub fn path(
250 mut self,
251 value: impl Into<Option<jacquard_common::CowStr<'a>>>,
252 ) -> Self {
253 self.__unsafe_private_named.4 = value.into();
254 self
255 }
256 /// Set the `path` field to an Option value (optional)
257 pub fn maybe_path(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
258 self.__unsafe_private_named.4 = value;
259 self
260 }
261}
262
263impl<'a, S> DocumentBuilder<'a, S>
264where
265 S: document_state::State,
266 S::PublishedAt: document_state::IsUnset,
267{
268 /// Set the `publishedAt` field (required)
269 pub fn published_at(
270 mut self,
271 value: impl Into<jacquard_common::types::string::Datetime>,
272 ) -> DocumentBuilder<'a, document_state::SetPublishedAt<S>> {
273 self.__unsafe_private_named.5 = ::core::option::Option::Some(value.into());
274 DocumentBuilder {
275 _phantom_state: ::core::marker::PhantomData,
276 __unsafe_private_named: self.__unsafe_private_named,
277 _phantom: ::core::marker::PhantomData,
278 }
279 }
280}
281
282impl<'a, S> DocumentBuilder<'a, S>
283where
284 S: document_state::State,
285 S::Site: document_state::IsUnset,
286{
287 /// Set the `site` field (required)
288 pub fn site(
289 mut self,
290 value: impl Into<jacquard_common::types::string::Uri<'a>>,
291 ) -> DocumentBuilder<'a, document_state::SetSite<S>> {
292 self.__unsafe_private_named.6 = ::core::option::Option::Some(value.into());
293 DocumentBuilder {
294 _phantom_state: ::core::marker::PhantomData,
295 __unsafe_private_named: self.__unsafe_private_named,
296 _phantom: ::core::marker::PhantomData,
297 }
298 }
299}
300
301impl<'a, S: document_state::State> DocumentBuilder<'a, S> {
302 /// Set the `tags` field (optional)
303 pub fn tags(
304 mut self,
305 value: impl Into<Option<Vec<jacquard_common::CowStr<'a>>>>,
306 ) -> Self {
307 self.__unsafe_private_named.7 = value.into();
308 self
309 }
310 /// Set the `tags` field to an Option value (optional)
311 pub fn maybe_tags(
312 mut self,
313 value: Option<Vec<jacquard_common::CowStr<'a>>>,
314 ) -> Self {
315 self.__unsafe_private_named.7 = value;
316 self
317 }
318}
319
320impl<'a, S: document_state::State> DocumentBuilder<'a, S> {
321 /// Set the `textContent` field (optional)
322 pub fn text_content(
323 mut self,
324 value: impl Into<Option<jacquard_common::CowStr<'a>>>,
325 ) -> Self {
326 self.__unsafe_private_named.8 = value.into();
327 self
328 }
329 /// Set the `textContent` field to an Option value (optional)
330 pub fn maybe_text_content(
331 mut self,
332 value: Option<jacquard_common::CowStr<'a>>,
333 ) -> Self {
334 self.__unsafe_private_named.8 = value;
335 self
336 }
337}
338
339impl<'a, S> DocumentBuilder<'a, S>
340where
341 S: document_state::State,
342 S::Title: document_state::IsUnset,
343{
344 /// Set the `title` field (required)
345 pub fn title(
346 mut self,
347 value: impl Into<jacquard_common::CowStr<'a>>,
348 ) -> DocumentBuilder<'a, document_state::SetTitle<S>> {
349 self.__unsafe_private_named.9 = ::core::option::Option::Some(value.into());
350 DocumentBuilder {
351 _phantom_state: ::core::marker::PhantomData,
352 __unsafe_private_named: self.__unsafe_private_named,
353 _phantom: ::core::marker::PhantomData,
354 }
355 }
356}
357
358impl<'a, S: document_state::State> DocumentBuilder<'a, S> {
359 /// Set the `updatedAt` field (optional)
360 pub fn updated_at(
361 mut self,
362 value: impl Into<Option<jacquard_common::types::string::Datetime>>,
363 ) -> Self {
364 self.__unsafe_private_named.10 = value.into();
365 self
366 }
367 /// Set the `updatedAt` field to an Option value (optional)
368 pub fn maybe_updated_at(
369 mut self,
370 value: Option<jacquard_common::types::string::Datetime>,
371 ) -> Self {
372 self.__unsafe_private_named.10 = value;
373 self
374 }
375}
376
377impl<'a, S> DocumentBuilder<'a, S>
378where
379 S: document_state::State,
380 S::Site: document_state::IsSet,
381 S::Title: document_state::IsSet,
382 S::PublishedAt: document_state::IsSet,
383{
384 /// Build the final struct
385 pub fn build(self) -> Document<'a> {
386 Document {
387 bsky_post_ref: self.__unsafe_private_named.0,
388 content: self.__unsafe_private_named.1,
389 cover_image: self.__unsafe_private_named.2,
390 description: self.__unsafe_private_named.3,
391 path: self.__unsafe_private_named.4,
392 published_at: self.__unsafe_private_named.5.unwrap(),
393 site: self.__unsafe_private_named.6.unwrap(),
394 tags: self.__unsafe_private_named.7,
395 text_content: self.__unsafe_private_named.8,
396 title: self.__unsafe_private_named.9.unwrap(),
397 updated_at: self.__unsafe_private_named.10,
398 extra_data: Default::default(),
399 }
400 }
401 /// Build the final struct with custom extra_data
402 pub fn build_with_data(
403 self,
404 extra_data: std::collections::BTreeMap<
405 jacquard_common::smol_str::SmolStr,
406 jacquard_common::types::value::Data<'a>,
407 >,
408 ) -> Document<'a> {
409 Document {
410 bsky_post_ref: self.__unsafe_private_named.0,
411 content: self.__unsafe_private_named.1,
412 cover_image: self.__unsafe_private_named.2,
413 description: self.__unsafe_private_named.3,
414 path: self.__unsafe_private_named.4,
415 published_at: self.__unsafe_private_named.5.unwrap(),
416 site: self.__unsafe_private_named.6.unwrap(),
417 tags: self.__unsafe_private_named.7,
418 text_content: self.__unsafe_private_named.8,
419 title: self.__unsafe_private_named.9.unwrap(),
420 updated_at: self.__unsafe_private_named.10,
421 extra_data: Some(extra_data),
422 }
423 }
424}
425
426impl<'a> Document<'a> {
427 pub fn uri(
428 uri: impl Into<jacquard_common::CowStr<'a>>,
429 ) -> Result<
430 jacquard_common::types::uri::RecordUri<'a, DocumentRecord>,
431 jacquard_common::types::uri::UriError,
432 > {
433 jacquard_common::types::uri::RecordUri::try_from_uri(
434 jacquard_common::types::string::AtUri::new_cow(uri.into())?,
435 )
436 }
437}
438
439/// Typed wrapper for GetRecord response with this collection's record type.
440#[derive(
441 serde::Serialize,
442 serde::Deserialize,
443 Debug,
444 Clone,
445 PartialEq,
446 Eq,
447 jacquard_derive::IntoStatic
448)]
449#[serde(rename_all = "camelCase")]
450pub struct DocumentGetRecordOutput<'a> {
451 #[serde(skip_serializing_if = "std::option::Option::is_none")]
452 #[serde(borrow)]
453 pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
454 #[serde(borrow)]
455 pub uri: jacquard_common::types::string::AtUri<'a>,
456 #[serde(borrow)]
457 pub value: Document<'a>,
458}
459
460impl From<DocumentGetRecordOutput<'_>> for Document<'_> {
461 fn from(output: DocumentGetRecordOutput<'_>) -> Self {
462 use jacquard_common::IntoStatic;
463 output.value.into_static()
464 }
465}
466
467impl jacquard_common::types::collection::Collection for Document<'_> {
468 const NSID: &'static str = "site.standard.document";
469 type Record = DocumentRecord;
470}
471
472/// Marker type for deserializing records from this collection.
473#[derive(Debug, serde::Serialize, serde::Deserialize)]
474pub struct DocumentRecord;
475impl jacquard_common::xrpc::XrpcResp for DocumentRecord {
476 const NSID: &'static str = "site.standard.document";
477 const ENCODING: &'static str = "application/json";
478 type Output<'de> = DocumentGetRecordOutput<'de>;
479 type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
480}
481
482impl jacquard_common::types::collection::Collection for DocumentRecord {
483 const NSID: &'static str = "site.standard.document";
484 type Record = DocumentRecord;
485}
486
487impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Document<'a> {
488 fn nsid() -> &'static str {
489 "site.standard.document"
490 }
491 fn def_name() -> &'static str {
492 "main"
493 }
494 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
495 lexicon_doc_site_standard_document()
496 }
497 fn validate(
498 &self,
499 ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
500 if let Some(ref value) = self.description {
501 #[allow(unused_comparisons)]
502 if <str>::len(value.as_ref()) > 3000usize {
503 return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
504 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
505 "description",
506 ),
507 max: 3000usize,
508 actual: <str>::len(value.as_ref()),
509 });
510 }
511 }
512 if let Some(ref value) = self.description {
513 {
514 let count = ::unicode_segmentation::UnicodeSegmentation::graphemes(
515 value.as_ref(),
516 true,
517 )
518 .count();
519 if count > 300usize {
520 return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes {
521 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
522 "description",
523 ),
524 max: 300usize,
525 actual: count,
526 });
527 }
528 }
529 }
530 {
531 let value = &self.title;
532 #[allow(unused_comparisons)]
533 if <str>::len(value.as_ref()) > 1280usize {
534 return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
535 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
536 "title",
537 ),
538 max: 1280usize,
539 actual: <str>::len(value.as_ref()),
540 });
541 }
542 }
543 {
544 let value = &self.title;
545 {
546 let count = ::unicode_segmentation::UnicodeSegmentation::graphemes(
547 value.as_ref(),
548 true,
549 )
550 .count();
551 if count > 128usize {
552 return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes {
553 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
554 "title",
555 ),
556 max: 128usize,
557 actual: count,
558 });
559 }
560 }
561 }
562 Ok(())
563 }
564}
565
566fn lexicon_doc_site_standard_document() -> ::jacquard_lexicon::lexicon::LexiconDoc<
567 'static,
568> {
569 ::jacquard_lexicon::lexicon::LexiconDoc {
570 lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
571 id: ::jacquard_common::CowStr::new_static("site.standard.document"),
572 revision: None,
573 description: None,
574 defs: {
575 let mut map = ::alloc::collections::BTreeMap::new();
576 map.insert(
577 ::jacquard_common::smol_str::SmolStr::new_static("main"),
578 ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord {
579 description: Some(
580 ::jacquard_common::CowStr::new_static(
581 "A document record representing a published article, blog post, or other content. Documents can belong to a publication or exist independently.",
582 ),
583 ),
584 key: Some(::jacquard_common::CowStr::new_static("tid")),
585 record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject {
586 description: None,
587 required: Some(
588 vec![
589 ::jacquard_common::smol_str::SmolStr::new_static("site"),
590 ::jacquard_common::smol_str::SmolStr::new_static("title"),
591 ::jacquard_common::smol_str::SmolStr::new_static("publishedAt")
592 ],
593 ),
594 nullable: None,
595 properties: {
596 #[allow(unused_mut)]
597 let mut map = ::alloc::collections::BTreeMap::new();
598 map.insert(
599 ::jacquard_common::smol_str::SmolStr::new_static(
600 "bskyPostRef",
601 ),
602 ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
603 description: None,
604 r#ref: ::jacquard_common::CowStr::new_static(
605 "com.atproto.repo.strongRef",
606 ),
607 }),
608 );
609 map.insert(
610 ::jacquard_common::smol_str::SmolStr::new_static("content"),
611 ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion {
612 description: Some(
613 ::jacquard_common::CowStr::new_static(
614 "Open union used to define the record's content. Each entry must specify a $type and may be extended with other lexicons to support additional content formats.",
615 ),
616 ),
617 refs: vec![],
618 closed: Some(false),
619 }),
620 );
621 map.insert(
622 ::jacquard_common::smol_str::SmolStr::new_static(
623 "coverImage",
624 ),
625 ::jacquard_lexicon::lexicon::LexObjectProperty::Blob(::jacquard_lexicon::lexicon::LexBlob {
626 description: None,
627 accept: None,
628 max_size: None,
629 }),
630 );
631 map.insert(
632 ::jacquard_common::smol_str::SmolStr::new_static(
633 "description",
634 ),
635 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
636 description: Some(
637 ::jacquard_common::CowStr::new_static(
638 "A brief description or excerpt from the document.",
639 ),
640 ),
641 format: None,
642 default: None,
643 min_length: None,
644 max_length: Some(3000usize),
645 min_graphemes: None,
646 max_graphemes: Some(300usize),
647 r#enum: None,
648 r#const: None,
649 known_values: None,
650 }),
651 );
652 map.insert(
653 ::jacquard_common::smol_str::SmolStr::new_static("path"),
654 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
655 description: Some(
656 ::jacquard_common::CowStr::new_static(
657 "Combine with site or publication url to construct a canonical URL to the document. Prepend with a leading slash.",
658 ),
659 ),
660 format: None,
661 default: None,
662 min_length: None,
663 max_length: None,
664 min_graphemes: None,
665 max_graphemes: None,
666 r#enum: None,
667 r#const: None,
668 known_values: None,
669 }),
670 );
671 map.insert(
672 ::jacquard_common::smol_str::SmolStr::new_static(
673 "publishedAt",
674 ),
675 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
676 description: Some(
677 ::jacquard_common::CowStr::new_static(
678 "Timestamp of the documents publish time.",
679 ),
680 ),
681 format: Some(
682 ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
683 ),
684 default: None,
685 min_length: None,
686 max_length: None,
687 min_graphemes: None,
688 max_graphemes: None,
689 r#enum: None,
690 r#const: None,
691 known_values: None,
692 }),
693 );
694 map.insert(
695 ::jacquard_common::smol_str::SmolStr::new_static("site"),
696 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
697 description: Some(
698 ::jacquard_common::CowStr::new_static(
699 "Points to a publication record (at://) or a publication url (https://) for loose documents. Avoid trailing slashes.",
700 ),
701 ),
702 format: Some(
703 ::jacquard_lexicon::lexicon::LexStringFormat::Uri,
704 ),
705 default: None,
706 min_length: None,
707 max_length: None,
708 min_graphemes: None,
709 max_graphemes: None,
710 r#enum: None,
711 r#const: None,
712 known_values: None,
713 }),
714 );
715 map.insert(
716 ::jacquard_common::smol_str::SmolStr::new_static("tags"),
717 ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
718 description: Some(
719 ::jacquard_common::CowStr::new_static(
720 "Array of strings used to tag or categorize the document. Avoid prepending tags with hashtags.",
721 ),
722 ),
723 items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString {
724 description: None,
725 format: None,
726 default: None,
727 min_length: None,
728 max_length: Some(100usize),
729 min_graphemes: None,
730 max_graphemes: Some(50usize),
731 r#enum: None,
732 r#const: None,
733 known_values: None,
734 }),
735 min_length: None,
736 max_length: None,
737 }),
738 );
739 map.insert(
740 ::jacquard_common::smol_str::SmolStr::new_static(
741 "textContent",
742 ),
743 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
744 description: Some(
745 ::jacquard_common::CowStr::new_static(
746 "Plaintext representation of the documents contents. Should not contain markdown or other formatting.",
747 ),
748 ),
749 format: None,
750 default: None,
751 min_length: None,
752 max_length: None,
753 min_graphemes: None,
754 max_graphemes: None,
755 r#enum: None,
756 r#const: None,
757 known_values: None,
758 }),
759 );
760 map.insert(
761 ::jacquard_common::smol_str::SmolStr::new_static("title"),
762 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
763 description: Some(
764 ::jacquard_common::CowStr::new_static(
765 "Title of the document.",
766 ),
767 ),
768 format: None,
769 default: None,
770 min_length: None,
771 max_length: Some(1280usize),
772 min_graphemes: None,
773 max_graphemes: Some(128usize),
774 r#enum: None,
775 r#const: None,
776 known_values: None,
777 }),
778 );
779 map.insert(
780 ::jacquard_common::smol_str::SmolStr::new_static(
781 "updatedAt",
782 ),
783 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
784 description: Some(
785 ::jacquard_common::CowStr::new_static(
786 "Timestamp of the documents last edit.",
787 ),
788 ),
789 format: Some(
790 ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
791 ),
792 default: None,
793 min_length: None,
794 max_length: None,
795 min_graphemes: None,
796 max_graphemes: None,
797 r#enum: None,
798 r#const: None,
799 known_values: None,
800 }),
801 );
802 map
803 },
804 }),
805 }),
806 );
807 map
808 },
809 }
810}