-1
Cargo.lock
-1
Cargo.lock
+1
-1
README.md
+1
-1
README.md
···
94
94
- `jacquard-oauth`: atproto OAuth implementation [](https://crates.io/crates/jacquard-oauth) [](https://docs.rs/jacquard-oauth)
95
95
- `jacquard-identity`: Identity resolution [](https://crates.io/crates/jacquard-identity) [](https://docs.rs/jacquard-identity)
96
96
- `jacquard-lexicon`: Lexicon parsing and code generation [](https://crates.io/crates/jacquard-lexicon) [](https://docs.rs/jacquard-lexicon)
97
-
- `jacquard-derive`: Derive macros for lexicon types [](https://crates.io/crates/jacquard-derive) [](https://docs.rs/jacquard-derive)
97
+
- `jacquard-derive`: Macros for lexicon types [](https://crates.io/crates/jacquard-derive) [](https://docs.rs/jacquard-derive)
98
98
99
99
## Changelog
100
100
+38
crates/jacquard-api/src/app_blebbit/authr/folder/record.rs
+38
crates/jacquard-api/src/app_blebbit/authr/folder/record.rs
···
27
27
pub public: std::option::Option<bool>,
28
28
}
29
29
30
+
/// Typed wrapper for GetRecord response with this collection's record type.
31
+
#[derive(
32
+
serde::Serialize,
33
+
serde::Deserialize,
34
+
Debug,
35
+
Clone,
36
+
PartialEq,
37
+
Eq,
38
+
jacquard_derive::IntoStatic
39
+
)]
40
+
#[serde(rename_all = "camelCase")]
41
+
pub struct RecordGetRecordOutput<'a> {
42
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
43
+
#[serde(borrow)]
44
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
45
+
#[serde(borrow)]
46
+
pub uri: jacquard_common::types::string::AtUri<'a>,
47
+
#[serde(borrow)]
48
+
pub value: Record<'a>,
49
+
}
50
+
51
+
/// Marker type for deserializing records from this collection.
52
+
pub struct RecordRecord;
53
+
impl jacquard_common::xrpc::XrpcResp for RecordRecord {
54
+
const NSID: &'static str = "app.blebbit.authr.folder.record";
55
+
const ENCODING: &'static str = "application/json";
56
+
type Output<'de> = RecordGetRecordOutput<'de>;
57
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
58
+
}
59
+
30
60
impl jacquard_common::types::collection::Collection for Record<'_> {
31
61
const NSID: &'static str = "app.blebbit.authr.folder.record";
62
+
type Record = RecordRecord;
63
+
}
64
+
65
+
impl From<RecordGetRecordOutput<'_>> for Record<'static> {
66
+
fn from(output: RecordGetRecordOutput<'_>) -> Self {
67
+
use jacquard_common::IntoStatic;
68
+
output.value.into_static()
69
+
}
32
70
}
+38
crates/jacquard-api/src/app_blebbit/authr/group/record.rs
+38
crates/jacquard-api/src/app_blebbit/authr/group/record.rs
···
33
33
pub public: std::option::Option<bool>,
34
34
}
35
35
36
+
/// Typed wrapper for GetRecord response with this collection's record type.
37
+
#[derive(
38
+
serde::Serialize,
39
+
serde::Deserialize,
40
+
Debug,
41
+
Clone,
42
+
PartialEq,
43
+
Eq,
44
+
jacquard_derive::IntoStatic
45
+
)]
46
+
#[serde(rename_all = "camelCase")]
47
+
pub struct RecordGetRecordOutput<'a> {
48
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
49
+
#[serde(borrow)]
50
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
51
+
#[serde(borrow)]
52
+
pub uri: jacquard_common::types::string::AtUri<'a>,
53
+
#[serde(borrow)]
54
+
pub value: Record<'a>,
55
+
}
56
+
57
+
/// Marker type for deserializing records from this collection.
58
+
pub struct RecordRecord;
59
+
impl jacquard_common::xrpc::XrpcResp for RecordRecord {
60
+
const NSID: &'static str = "app.blebbit.authr.group.record";
61
+
const ENCODING: &'static str = "application/json";
62
+
type Output<'de> = RecordGetRecordOutput<'de>;
63
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
64
+
}
65
+
36
66
impl jacquard_common::types::collection::Collection for Record<'_> {
37
67
const NSID: &'static str = "app.blebbit.authr.group.record";
68
+
type Record = RecordRecord;
69
+
}
70
+
71
+
impl From<RecordGetRecordOutput<'_>> for Record<'static> {
72
+
fn from(output: RecordGetRecordOutput<'_>) -> Self {
73
+
use jacquard_common::IntoStatic;
74
+
output.value.into_static()
75
+
}
38
76
}
+38
crates/jacquard-api/src/app_blebbit/authr/page/record.rs
+38
crates/jacquard-api/src/app_blebbit/authr/page/record.rs
···
30
30
pub public: std::option::Option<bool>,
31
31
}
32
32
33
+
/// Typed wrapper for GetRecord response with this collection's record type.
34
+
#[derive(
35
+
serde::Serialize,
36
+
serde::Deserialize,
37
+
Debug,
38
+
Clone,
39
+
PartialEq,
40
+
Eq,
41
+
jacquard_derive::IntoStatic
42
+
)]
43
+
#[serde(rename_all = "camelCase")]
44
+
pub struct RecordGetRecordOutput<'a> {
45
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
46
+
#[serde(borrow)]
47
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
48
+
#[serde(borrow)]
49
+
pub uri: jacquard_common::types::string::AtUri<'a>,
50
+
#[serde(borrow)]
51
+
pub value: Record<'a>,
52
+
}
53
+
54
+
/// Marker type for deserializing records from this collection.
55
+
pub struct RecordRecord;
56
+
impl jacquard_common::xrpc::XrpcResp for RecordRecord {
57
+
const NSID: &'static str = "app.blebbit.authr.page.record";
58
+
const ENCODING: &'static str = "application/json";
59
+
type Output<'de> = RecordGetRecordOutput<'de>;
60
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
61
+
}
62
+
33
63
impl jacquard_common::types::collection::Collection for Record<'_> {
34
64
const NSID: &'static str = "app.blebbit.authr.page.record";
65
+
type Record = RecordRecord;
66
+
}
67
+
68
+
impl From<RecordGetRecordOutput<'_>> for Record<'static> {
69
+
fn from(output: RecordGetRecordOutput<'_>) -> Self {
70
+
use jacquard_common::IntoStatic;
71
+
output.value.into_static()
72
+
}
35
73
}
+38
crates/jacquard-api/src/app_bsky/actor/profile.rs
+38
crates/jacquard-api/src/app_bsky/actor/profile.rs
···
58
58
pub website: std::option::Option<jacquard_common::types::string::Uri<'a>>,
59
59
}
60
60
61
+
/// Typed wrapper for GetRecord response with this collection's record type.
62
+
#[derive(
63
+
serde::Serialize,
64
+
serde::Deserialize,
65
+
Debug,
66
+
Clone,
67
+
PartialEq,
68
+
Eq,
69
+
jacquard_derive::IntoStatic
70
+
)]
71
+
#[serde(rename_all = "camelCase")]
72
+
pub struct ProfileGetRecordOutput<'a> {
73
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
74
+
#[serde(borrow)]
75
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
76
+
#[serde(borrow)]
77
+
pub uri: jacquard_common::types::string::AtUri<'a>,
78
+
#[serde(borrow)]
79
+
pub value: Profile<'a>,
80
+
}
81
+
82
+
/// Marker type for deserializing records from this collection.
83
+
pub struct ProfileRecord;
84
+
impl jacquard_common::xrpc::XrpcResp for ProfileRecord {
85
+
const NSID: &'static str = "app.bsky.actor.profile";
86
+
const ENCODING: &'static str = "application/json";
87
+
type Output<'de> = ProfileGetRecordOutput<'de>;
88
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
89
+
}
90
+
61
91
impl jacquard_common::types::collection::Collection for Profile<'_> {
62
92
const NSID: &'static str = "app.bsky.actor.profile";
93
+
type Record = ProfileRecord;
94
+
}
95
+
96
+
impl From<ProfileGetRecordOutput<'_>> for Profile<'static> {
97
+
fn from(output: ProfileGetRecordOutput<'_>) -> Self {
98
+
use jacquard_common::IntoStatic;
99
+
output.value.into_static()
100
+
}
63
101
}
+38
crates/jacquard-api/src/app_bsky/actor/status.rs
+38
crates/jacquard-api/src/app_bsky/actor/status.rs
···
49
49
pub status: jacquard_common::CowStr<'a>,
50
50
}
51
51
52
+
/// Typed wrapper for GetRecord response with this collection's record type.
53
+
#[derive(
54
+
serde::Serialize,
55
+
serde::Deserialize,
56
+
Debug,
57
+
Clone,
58
+
PartialEq,
59
+
Eq,
60
+
jacquard_derive::IntoStatic
61
+
)]
62
+
#[serde(rename_all = "camelCase")]
63
+
pub struct StatusGetRecordOutput<'a> {
64
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
65
+
#[serde(borrow)]
66
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
67
+
#[serde(borrow)]
68
+
pub uri: jacquard_common::types::string::AtUri<'a>,
69
+
#[serde(borrow)]
70
+
pub value: Status<'a>,
71
+
}
72
+
73
+
/// Marker type for deserializing records from this collection.
74
+
pub struct StatusRecord;
75
+
impl jacquard_common::xrpc::XrpcResp for StatusRecord {
76
+
const NSID: &'static str = "app.bsky.actor.status";
77
+
const ENCODING: &'static str = "application/json";
78
+
type Output<'de> = StatusGetRecordOutput<'de>;
79
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
80
+
}
81
+
52
82
impl jacquard_common::types::collection::Collection for Status<'_> {
53
83
const NSID: &'static str = "app.bsky.actor.status";
84
+
type Record = StatusRecord;
85
+
}
86
+
87
+
impl From<StatusGetRecordOutput<'_>> for Status<'static> {
88
+
fn from(output: StatusGetRecordOutput<'_>) -> Self {
89
+
use jacquard_common::IntoStatic;
90
+
output.value.into_static()
91
+
}
54
92
}
+35
-11
crates/jacquard-api/src/app_bsky/feed/generator.rs
+35
-11
crates/jacquard-api/src/app_bsky/feed/generator.rs
···
8
8
///Record declaring of the existence of a feed generator, and containing metadata about it. The record can exist in any repository.
9
9
#[jacquard_derive::lexicon]
10
10
#[derive(
11
-
serde::Serialize,
12
-
serde::Deserialize,
13
-
Debug,
14
-
Clone,
15
-
PartialEq,
16
-
Eq,
17
-
jacquard_derive::IntoStatic
11
+
serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
18
12
)]
19
13
#[serde(rename_all = "camelCase")]
20
14
pub struct Generator<'a> {
···
33
27
pub description: std::option::Option<jacquard_common::CowStr<'a>>,
34
28
#[serde(skip_serializing_if = "std::option::Option::is_none")]
35
29
#[serde(borrow)]
36
-
pub description_facets: std::option::Option<
37
-
Vec<crate::app_bsky::richtext::facet::Facet<'a>>,
38
-
>,
30
+
pub description_facets: std::option::Option<Vec<crate::app_bsky::richtext::facet::Facet<'a>>>,
39
31
#[serde(borrow)]
40
32
pub did: jacquard_common::types::string::Did<'a>,
41
33
#[serde(borrow)]
···
46
38
pub labels: std::option::Option<crate::com_atproto::label::SelfLabels<'a>>,
47
39
}
48
40
41
+
/// Typed wrapper for GetRecord response with this collection's record type.
42
+
#[derive(
43
+
serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
44
+
)]
45
+
#[serde(rename_all = "camelCase")]
46
+
pub struct GeneratorGetRecordOutput<'a> {
47
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
48
+
#[serde(borrow)]
49
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
50
+
#[serde(borrow)]
51
+
pub uri: jacquard_common::types::string::AtUri<'a>,
52
+
#[serde(borrow)]
53
+
pub value: Generator<'a>,
54
+
}
55
+
56
+
/// Marker type for deserializing records from this collection.
57
+
pub struct GeneratorRecord;
58
+
impl jacquard_common::xrpc::XrpcResp for GeneratorRecord {
59
+
const NSID: &'static str = "app.bsky.feed.generator";
60
+
const ENCODING: &'static str = "application/json";
61
+
type Output<'de> = GeneratorGetRecordOutput<'de>;
62
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
63
+
}
64
+
49
65
impl jacquard_common::types::collection::Collection for Generator<'_> {
50
66
const NSID: &'static str = "app.bsky.feed.generator";
51
-
}
67
+
type Record = GeneratorRecord;
68
+
}
69
+
70
+
impl From<GeneratorGetRecordOutput<'_>> for Generator<'static> {
71
+
fn from(output: GeneratorGetRecordOutput<'_>) -> Self {
72
+
use jacquard_common::IntoStatic;
73
+
output.value.into_static()
74
+
}
75
+
}
+38
crates/jacquard-api/src/app_bsky/feed/like.rs
+38
crates/jacquard-api/src/app_bsky/feed/like.rs
···
26
26
pub via: std::option::Option<crate::com_atproto::repo::strong_ref::StrongRef<'a>>,
27
27
}
28
28
29
+
/// Typed wrapper for GetRecord response with this collection's record type.
30
+
#[derive(
31
+
serde::Serialize,
32
+
serde::Deserialize,
33
+
Debug,
34
+
Clone,
35
+
PartialEq,
36
+
Eq,
37
+
jacquard_derive::IntoStatic
38
+
)]
39
+
#[serde(rename_all = "camelCase")]
40
+
pub struct LikeGetRecordOutput<'a> {
41
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
42
+
#[serde(borrow)]
43
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
44
+
#[serde(borrow)]
45
+
pub uri: jacquard_common::types::string::AtUri<'a>,
46
+
#[serde(borrow)]
47
+
pub value: Like<'a>,
48
+
}
49
+
50
+
/// Marker type for deserializing records from this collection.
51
+
pub struct LikeRecord;
52
+
impl jacquard_common::xrpc::XrpcResp for LikeRecord {
53
+
const NSID: &'static str = "app.bsky.feed.like";
54
+
const ENCODING: &'static str = "application/json";
55
+
type Output<'de> = LikeGetRecordOutput<'de>;
56
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
57
+
}
58
+
29
59
impl jacquard_common::types::collection::Collection for Like<'_> {
30
60
const NSID: &'static str = "app.bsky.feed.like";
61
+
type Record = LikeRecord;
62
+
}
63
+
64
+
impl From<LikeGetRecordOutput<'_>> for Like<'static> {
65
+
fn from(output: LikeGetRecordOutput<'_>) -> Self {
66
+
use jacquard_common::IntoStatic;
67
+
output.value.into_static()
68
+
}
31
69
}
+38
crates/jacquard-api/src/app_bsky/feed/post.rs
+38
crates/jacquard-api/src/app_bsky/feed/post.rs
···
97
97
RecordWithMedia(Box<crate::app_bsky::embed::record_with_media::RecordWithMedia<'a>>),
98
98
}
99
99
100
+
/// Typed wrapper for GetRecord response with this collection's record type.
101
+
#[derive(
102
+
serde::Serialize,
103
+
serde::Deserialize,
104
+
Debug,
105
+
Clone,
106
+
PartialEq,
107
+
Eq,
108
+
jacquard_derive::IntoStatic
109
+
)]
110
+
#[serde(rename_all = "camelCase")]
111
+
pub struct PostGetRecordOutput<'a> {
112
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
113
+
#[serde(borrow)]
114
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
115
+
#[serde(borrow)]
116
+
pub uri: jacquard_common::types::string::AtUri<'a>,
117
+
#[serde(borrow)]
118
+
pub value: Post<'a>,
119
+
}
120
+
121
+
/// Marker type for deserializing records from this collection.
122
+
pub struct PostRecord;
123
+
impl jacquard_common::xrpc::XrpcResp for PostRecord {
124
+
const NSID: &'static str = "app.bsky.feed.post";
125
+
const ENCODING: &'static str = "application/json";
126
+
type Output<'de> = PostGetRecordOutput<'de>;
127
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
128
+
}
129
+
100
130
impl jacquard_common::types::collection::Collection for Post<'_> {
101
131
const NSID: &'static str = "app.bsky.feed.post";
132
+
type Record = PostRecord;
133
+
}
134
+
135
+
impl From<PostGetRecordOutput<'_>> for Post<'static> {
136
+
fn from(output: PostGetRecordOutput<'_>) -> Self {
137
+
use jacquard_common::IntoStatic;
138
+
output.value.into_static()
139
+
}
102
140
}
103
141
104
142
#[jacquard_derive::lexicon]
+38
crates/jacquard-api/src/app_bsky/feed/postgate.rs
+38
crates/jacquard-api/src/app_bsky/feed/postgate.rs
···
49
49
pub post: jacquard_common::types::string::AtUri<'a>,
50
50
}
51
51
52
+
/// Typed wrapper for GetRecord response with this collection's record type.
53
+
#[derive(
54
+
serde::Serialize,
55
+
serde::Deserialize,
56
+
Debug,
57
+
Clone,
58
+
PartialEq,
59
+
Eq,
60
+
jacquard_derive::IntoStatic
61
+
)]
62
+
#[serde(rename_all = "camelCase")]
63
+
pub struct PostgateGetRecordOutput<'a> {
64
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
65
+
#[serde(borrow)]
66
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
67
+
#[serde(borrow)]
68
+
pub uri: jacquard_common::types::string::AtUri<'a>,
69
+
#[serde(borrow)]
70
+
pub value: Postgate<'a>,
71
+
}
72
+
73
+
/// Marker type for deserializing records from this collection.
74
+
pub struct PostgateRecord;
75
+
impl jacquard_common::xrpc::XrpcResp for PostgateRecord {
76
+
const NSID: &'static str = "app.bsky.feed.postgate";
77
+
const ENCODING: &'static str = "application/json";
78
+
type Output<'de> = PostgateGetRecordOutput<'de>;
79
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
80
+
}
81
+
52
82
impl jacquard_common::types::collection::Collection for Postgate<'_> {
53
83
const NSID: &'static str = "app.bsky.feed.postgate";
84
+
type Record = PostgateRecord;
85
+
}
86
+
87
+
impl From<PostgateGetRecordOutput<'_>> for Postgate<'static> {
88
+
fn from(output: PostgateGetRecordOutput<'_>) -> Self {
89
+
use jacquard_common::IntoStatic;
90
+
output.value.into_static()
91
+
}
54
92
}
+38
crates/jacquard-api/src/app_bsky/feed/repost.rs
+38
crates/jacquard-api/src/app_bsky/feed/repost.rs
···
26
26
pub via: std::option::Option<crate::com_atproto::repo::strong_ref::StrongRef<'a>>,
27
27
}
28
28
29
+
/// Typed wrapper for GetRecord response with this collection's record type.
30
+
#[derive(
31
+
serde::Serialize,
32
+
serde::Deserialize,
33
+
Debug,
34
+
Clone,
35
+
PartialEq,
36
+
Eq,
37
+
jacquard_derive::IntoStatic
38
+
)]
39
+
#[serde(rename_all = "camelCase")]
40
+
pub struct RepostGetRecordOutput<'a> {
41
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
42
+
#[serde(borrow)]
43
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
44
+
#[serde(borrow)]
45
+
pub uri: jacquard_common::types::string::AtUri<'a>,
46
+
#[serde(borrow)]
47
+
pub value: Repost<'a>,
48
+
}
49
+
50
+
/// Marker type for deserializing records from this collection.
51
+
pub struct RepostRecord;
52
+
impl jacquard_common::xrpc::XrpcResp for RepostRecord {
53
+
const NSID: &'static str = "app.bsky.feed.repost";
54
+
const ENCODING: &'static str = "application/json";
55
+
type Output<'de> = RepostGetRecordOutput<'de>;
56
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
57
+
}
58
+
29
59
impl jacquard_common::types::collection::Collection for Repost<'_> {
30
60
const NSID: &'static str = "app.bsky.feed.repost";
61
+
type Record = RepostRecord;
62
+
}
63
+
64
+
impl From<RepostGetRecordOutput<'_>> for Repost<'static> {
65
+
fn from(output: RepostGetRecordOutput<'_>) -> Self {
66
+
use jacquard_common::IntoStatic;
67
+
output.value.into_static()
68
+
}
31
69
}
+38
crates/jacquard-api/src/app_bsky/feed/threadgate.rs
+38
crates/jacquard-api/src/app_bsky/feed/threadgate.rs
···
100
100
ListRule(Box<crate::app_bsky::feed::threadgate::ListRule<'a>>),
101
101
}
102
102
103
+
/// Typed wrapper for GetRecord response with this collection's record type.
104
+
#[derive(
105
+
serde::Serialize,
106
+
serde::Deserialize,
107
+
Debug,
108
+
Clone,
109
+
PartialEq,
110
+
Eq,
111
+
jacquard_derive::IntoStatic
112
+
)]
113
+
#[serde(rename_all = "camelCase")]
114
+
pub struct ThreadgateGetRecordOutput<'a> {
115
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
116
+
#[serde(borrow)]
117
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
118
+
#[serde(borrow)]
119
+
pub uri: jacquard_common::types::string::AtUri<'a>,
120
+
#[serde(borrow)]
121
+
pub value: Threadgate<'a>,
122
+
}
123
+
124
+
/// Marker type for deserializing records from this collection.
125
+
pub struct ThreadgateRecord;
126
+
impl jacquard_common::xrpc::XrpcResp for ThreadgateRecord {
127
+
const NSID: &'static str = "app.bsky.feed.threadgate";
128
+
const ENCODING: &'static str = "application/json";
129
+
type Output<'de> = ThreadgateGetRecordOutput<'de>;
130
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
131
+
}
132
+
103
133
impl jacquard_common::types::collection::Collection for Threadgate<'_> {
104
134
const NSID: &'static str = "app.bsky.feed.threadgate";
135
+
type Record = ThreadgateRecord;
136
+
}
137
+
138
+
impl From<ThreadgateGetRecordOutput<'_>> for Threadgate<'static> {
139
+
fn from(output: ThreadgateGetRecordOutput<'_>) -> Self {
140
+
use jacquard_common::IntoStatic;
141
+
output.value.into_static()
142
+
}
105
143
}
106
144
107
145
///Allow replies from actors mentioned in your post.
+38
crates/jacquard-api/src/app_bsky/graph/block.rs
+38
crates/jacquard-api/src/app_bsky/graph/block.rs
···
24
24
pub subject: jacquard_common::types::string::Did<'a>,
25
25
}
26
26
27
+
/// Typed wrapper for GetRecord response with this collection's record type.
28
+
#[derive(
29
+
serde::Serialize,
30
+
serde::Deserialize,
31
+
Debug,
32
+
Clone,
33
+
PartialEq,
34
+
Eq,
35
+
jacquard_derive::IntoStatic
36
+
)]
37
+
#[serde(rename_all = "camelCase")]
38
+
pub struct BlockGetRecordOutput<'a> {
39
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
40
+
#[serde(borrow)]
41
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
42
+
#[serde(borrow)]
43
+
pub uri: jacquard_common::types::string::AtUri<'a>,
44
+
#[serde(borrow)]
45
+
pub value: Block<'a>,
46
+
}
47
+
48
+
/// Marker type for deserializing records from this collection.
49
+
pub struct BlockRecord;
50
+
impl jacquard_common::xrpc::XrpcResp for BlockRecord {
51
+
const NSID: &'static str = "app.bsky.graph.block";
52
+
const ENCODING: &'static str = "application/json";
53
+
type Output<'de> = BlockGetRecordOutput<'de>;
54
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
55
+
}
56
+
27
57
impl jacquard_common::types::collection::Collection for Block<'_> {
28
58
const NSID: &'static str = "app.bsky.graph.block";
59
+
type Record = BlockRecord;
60
+
}
61
+
62
+
impl From<BlockGetRecordOutput<'_>> for Block<'static> {
63
+
fn from(output: BlockGetRecordOutput<'_>) -> Self {
64
+
use jacquard_common::IntoStatic;
65
+
output.value.into_static()
66
+
}
29
67
}
+38
crates/jacquard-api/src/app_bsky/graph/follow.rs
+38
crates/jacquard-api/src/app_bsky/graph/follow.rs
···
23
23
pub subject: jacquard_common::types::string::Did<'a>,
24
24
}
25
25
26
+
/// Typed wrapper for GetRecord response with this collection's record type.
27
+
#[derive(
28
+
serde::Serialize,
29
+
serde::Deserialize,
30
+
Debug,
31
+
Clone,
32
+
PartialEq,
33
+
Eq,
34
+
jacquard_derive::IntoStatic
35
+
)]
36
+
#[serde(rename_all = "camelCase")]
37
+
pub struct FollowGetRecordOutput<'a> {
38
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
39
+
#[serde(borrow)]
40
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
41
+
#[serde(borrow)]
42
+
pub uri: jacquard_common::types::string::AtUri<'a>,
43
+
#[serde(borrow)]
44
+
pub value: Follow<'a>,
45
+
}
46
+
47
+
/// Marker type for deserializing records from this collection.
48
+
pub struct FollowRecord;
49
+
impl jacquard_common::xrpc::XrpcResp for FollowRecord {
50
+
const NSID: &'static str = "app.bsky.graph.follow";
51
+
const ENCODING: &'static str = "application/json";
52
+
type Output<'de> = FollowGetRecordOutput<'de>;
53
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
54
+
}
55
+
26
56
impl jacquard_common::types::collection::Collection for Follow<'_> {
27
57
const NSID: &'static str = "app.bsky.graph.follow";
58
+
type Record = FollowRecord;
59
+
}
60
+
61
+
impl From<FollowGetRecordOutput<'_>> for Follow<'static> {
62
+
fn from(output: FollowGetRecordOutput<'_>) -> Self {
63
+
use jacquard_common::IntoStatic;
64
+
output.value.into_static()
65
+
}
28
66
}
+38
crates/jacquard-api/src/app_bsky/graph/list.rs
+38
crates/jacquard-api/src/app_bsky/graph/list.rs
···
41
41
pub purpose: crate::app_bsky::graph::ListPurpose<'a>,
42
42
}
43
43
44
+
/// Typed wrapper for GetRecord response with this collection's record type.
45
+
#[derive(
46
+
serde::Serialize,
47
+
serde::Deserialize,
48
+
Debug,
49
+
Clone,
50
+
PartialEq,
51
+
Eq,
52
+
jacquard_derive::IntoStatic
53
+
)]
54
+
#[serde(rename_all = "camelCase")]
55
+
pub struct ListGetRecordOutput<'a> {
56
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
57
+
#[serde(borrow)]
58
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
59
+
#[serde(borrow)]
60
+
pub uri: jacquard_common::types::string::AtUri<'a>,
61
+
#[serde(borrow)]
62
+
pub value: List<'a>,
63
+
}
64
+
65
+
/// Marker type for deserializing records from this collection.
66
+
pub struct ListRecord;
67
+
impl jacquard_common::xrpc::XrpcResp for ListRecord {
68
+
const NSID: &'static str = "app.bsky.graph.list";
69
+
const ENCODING: &'static str = "application/json";
70
+
type Output<'de> = ListGetRecordOutput<'de>;
71
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
72
+
}
73
+
44
74
impl jacquard_common::types::collection::Collection for List<'_> {
45
75
const NSID: &'static str = "app.bsky.graph.list";
76
+
type Record = ListRecord;
77
+
}
78
+
79
+
impl From<ListGetRecordOutput<'_>> for List<'static> {
80
+
fn from(output: ListGetRecordOutput<'_>) -> Self {
81
+
use jacquard_common::IntoStatic;
82
+
output.value.into_static()
83
+
}
46
84
}
+38
crates/jacquard-api/src/app_bsky/graph/listblock.rs
+38
crates/jacquard-api/src/app_bsky/graph/listblock.rs
···
24
24
pub subject: jacquard_common::types::string::AtUri<'a>,
25
25
}
26
26
27
+
/// Typed wrapper for GetRecord response with this collection's record type.
28
+
#[derive(
29
+
serde::Serialize,
30
+
serde::Deserialize,
31
+
Debug,
32
+
Clone,
33
+
PartialEq,
34
+
Eq,
35
+
jacquard_derive::IntoStatic
36
+
)]
37
+
#[serde(rename_all = "camelCase")]
38
+
pub struct ListblockGetRecordOutput<'a> {
39
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
40
+
#[serde(borrow)]
41
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
42
+
#[serde(borrow)]
43
+
pub uri: jacquard_common::types::string::AtUri<'a>,
44
+
#[serde(borrow)]
45
+
pub value: Listblock<'a>,
46
+
}
47
+
48
+
/// Marker type for deserializing records from this collection.
49
+
pub struct ListblockRecord;
50
+
impl jacquard_common::xrpc::XrpcResp for ListblockRecord {
51
+
const NSID: &'static str = "app.bsky.graph.listblock";
52
+
const ENCODING: &'static str = "application/json";
53
+
type Output<'de> = ListblockGetRecordOutput<'de>;
54
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
55
+
}
56
+
27
57
impl jacquard_common::types::collection::Collection for Listblock<'_> {
28
58
const NSID: &'static str = "app.bsky.graph.listblock";
59
+
type Record = ListblockRecord;
60
+
}
61
+
62
+
impl From<ListblockGetRecordOutput<'_>> for Listblock<'static> {
63
+
fn from(output: ListblockGetRecordOutput<'_>) -> Self {
64
+
use jacquard_common::IntoStatic;
65
+
output.value.into_static()
66
+
}
29
67
}
+38
crates/jacquard-api/src/app_bsky/graph/listitem.rs
+38
crates/jacquard-api/src/app_bsky/graph/listitem.rs
···
27
27
pub subject: jacquard_common::types::string::Did<'a>,
28
28
}
29
29
30
+
/// Typed wrapper for GetRecord response with this collection's record type.
31
+
#[derive(
32
+
serde::Serialize,
33
+
serde::Deserialize,
34
+
Debug,
35
+
Clone,
36
+
PartialEq,
37
+
Eq,
38
+
jacquard_derive::IntoStatic
39
+
)]
40
+
#[serde(rename_all = "camelCase")]
41
+
pub struct ListitemGetRecordOutput<'a> {
42
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
43
+
#[serde(borrow)]
44
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
45
+
#[serde(borrow)]
46
+
pub uri: jacquard_common::types::string::AtUri<'a>,
47
+
#[serde(borrow)]
48
+
pub value: Listitem<'a>,
49
+
}
50
+
51
+
/// Marker type for deserializing records from this collection.
52
+
pub struct ListitemRecord;
53
+
impl jacquard_common::xrpc::XrpcResp for ListitemRecord {
54
+
const NSID: &'static str = "app.bsky.graph.listitem";
55
+
const ENCODING: &'static str = "application/json";
56
+
type Output<'de> = ListitemGetRecordOutput<'de>;
57
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
58
+
}
59
+
30
60
impl jacquard_common::types::collection::Collection for Listitem<'_> {
31
61
const NSID: &'static str = "app.bsky.graph.listitem";
62
+
type Record = ListitemRecord;
63
+
}
64
+
65
+
impl From<ListitemGetRecordOutput<'_>> for Listitem<'static> {
66
+
fn from(output: ListitemGetRecordOutput<'_>) -> Self {
67
+
use jacquard_common::IntoStatic;
68
+
output.value.into_static()
69
+
}
32
70
}
+38
crates/jacquard-api/src/app_bsky/graph/starterpack.rs
+38
crates/jacquard-api/src/app_bsky/graph/starterpack.rs
···
56
56
pub name: jacquard_common::CowStr<'a>,
57
57
}
58
58
59
+
/// Typed wrapper for GetRecord response with this collection's record type.
60
+
#[derive(
61
+
serde::Serialize,
62
+
serde::Deserialize,
63
+
Debug,
64
+
Clone,
65
+
PartialEq,
66
+
Eq,
67
+
jacquard_derive::IntoStatic
68
+
)]
69
+
#[serde(rename_all = "camelCase")]
70
+
pub struct StarterpackGetRecordOutput<'a> {
71
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
72
+
#[serde(borrow)]
73
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
74
+
#[serde(borrow)]
75
+
pub uri: jacquard_common::types::string::AtUri<'a>,
76
+
#[serde(borrow)]
77
+
pub value: Starterpack<'a>,
78
+
}
79
+
80
+
/// Marker type for deserializing records from this collection.
81
+
pub struct StarterpackRecord;
82
+
impl jacquard_common::xrpc::XrpcResp for StarterpackRecord {
83
+
const NSID: &'static str = "app.bsky.graph.starterpack";
84
+
const ENCODING: &'static str = "application/json";
85
+
type Output<'de> = StarterpackGetRecordOutput<'de>;
86
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
87
+
}
88
+
59
89
impl jacquard_common::types::collection::Collection for Starterpack<'_> {
60
90
const NSID: &'static str = "app.bsky.graph.starterpack";
91
+
type Record = StarterpackRecord;
92
+
}
93
+
94
+
impl From<StarterpackGetRecordOutput<'_>> for Starterpack<'static> {
95
+
fn from(output: StarterpackGetRecordOutput<'_>) -> Self {
96
+
use jacquard_common::IntoStatic;
97
+
output.value.into_static()
98
+
}
61
99
}
+38
crates/jacquard-api/src/app_bsky/graph/verification.rs
+38
crates/jacquard-api/src/app_bsky/graph/verification.rs
···
31
31
pub subject: jacquard_common::types::string::Did<'a>,
32
32
}
33
33
34
+
/// Typed wrapper for GetRecord response with this collection's record type.
35
+
#[derive(
36
+
serde::Serialize,
37
+
serde::Deserialize,
38
+
Debug,
39
+
Clone,
40
+
PartialEq,
41
+
Eq,
42
+
jacquard_derive::IntoStatic
43
+
)]
44
+
#[serde(rename_all = "camelCase")]
45
+
pub struct VerificationGetRecordOutput<'a> {
46
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
47
+
#[serde(borrow)]
48
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
49
+
#[serde(borrow)]
50
+
pub uri: jacquard_common::types::string::AtUri<'a>,
51
+
#[serde(borrow)]
52
+
pub value: Verification<'a>,
53
+
}
54
+
55
+
/// Marker type for deserializing records from this collection.
56
+
pub struct VerificationRecord;
57
+
impl jacquard_common::xrpc::XrpcResp for VerificationRecord {
58
+
const NSID: &'static str = "app.bsky.graph.verification";
59
+
const ENCODING: &'static str = "application/json";
60
+
type Output<'de> = VerificationGetRecordOutput<'de>;
61
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
62
+
}
63
+
34
64
impl jacquard_common::types::collection::Collection for Verification<'_> {
35
65
const NSID: &'static str = "app.bsky.graph.verification";
66
+
type Record = VerificationRecord;
67
+
}
68
+
69
+
impl From<VerificationGetRecordOutput<'_>> for Verification<'static> {
70
+
fn from(output: VerificationGetRecordOutput<'_>) -> Self {
71
+
use jacquard_common::IntoStatic;
72
+
output.value.into_static()
73
+
}
36
74
}
+38
crates/jacquard-api/src/app_bsky/labeler/service.rs
+38
crates/jacquard-api/src/app_bsky/labeler/service.rs
···
44
44
>,
45
45
}
46
46
47
+
/// Typed wrapper for GetRecord response with this collection's record type.
48
+
#[derive(
49
+
serde::Serialize,
50
+
serde::Deserialize,
51
+
Debug,
52
+
Clone,
53
+
PartialEq,
54
+
Eq,
55
+
jacquard_derive::IntoStatic
56
+
)]
57
+
#[serde(rename_all = "camelCase")]
58
+
pub struct ServiceGetRecordOutput<'a> {
59
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
60
+
#[serde(borrow)]
61
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
62
+
#[serde(borrow)]
63
+
pub uri: jacquard_common::types::string::AtUri<'a>,
64
+
#[serde(borrow)]
65
+
pub value: Service<'a>,
66
+
}
67
+
68
+
/// Marker type for deserializing records from this collection.
69
+
pub struct ServiceRecord;
70
+
impl jacquard_common::xrpc::XrpcResp for ServiceRecord {
71
+
const NSID: &'static str = "app.bsky.labeler.service";
72
+
const ENCODING: &'static str = "application/json";
73
+
type Output<'de> = ServiceGetRecordOutput<'de>;
74
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
75
+
}
76
+
47
77
impl jacquard_common::types::collection::Collection for Service<'_> {
48
78
const NSID: &'static str = "app.bsky.labeler.service";
79
+
type Record = ServiceRecord;
80
+
}
81
+
82
+
impl From<ServiceGetRecordOutput<'_>> for Service<'static> {
83
+
fn from(output: ServiceGetRecordOutput<'_>) -> Self {
84
+
use jacquard_common::IntoStatic;
85
+
output.value.into_static()
86
+
}
49
87
}
+38
crates/jacquard-api/src/app_bsky/notification/declaration.rs
+38
crates/jacquard-api/src/app_bsky/notification/declaration.rs
···
23
23
pub allow_subscriptions: jacquard_common::CowStr<'a>,
24
24
}
25
25
26
+
/// Typed wrapper for GetRecord response with this collection's record type.
27
+
#[derive(
28
+
serde::Serialize,
29
+
serde::Deserialize,
30
+
Debug,
31
+
Clone,
32
+
PartialEq,
33
+
Eq,
34
+
jacquard_derive::IntoStatic
35
+
)]
36
+
#[serde(rename_all = "camelCase")]
37
+
pub struct DeclarationGetRecordOutput<'a> {
38
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
39
+
#[serde(borrow)]
40
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
41
+
#[serde(borrow)]
42
+
pub uri: jacquard_common::types::string::AtUri<'a>,
43
+
#[serde(borrow)]
44
+
pub value: Declaration<'a>,
45
+
}
46
+
47
+
/// Marker type for deserializing records from this collection.
48
+
pub struct DeclarationRecord;
49
+
impl jacquard_common::xrpc::XrpcResp for DeclarationRecord {
50
+
const NSID: &'static str = "app.bsky.notification.declaration";
51
+
const ENCODING: &'static str = "application/json";
52
+
type Output<'de> = DeclarationGetRecordOutput<'de>;
53
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
54
+
}
55
+
26
56
impl jacquard_common::types::collection::Collection for Declaration<'_> {
27
57
const NSID: &'static str = "app.bsky.notification.declaration";
58
+
type Record = DeclarationRecord;
59
+
}
60
+
61
+
impl From<DeclarationGetRecordOutput<'_>> for Declaration<'static> {
62
+
fn from(output: DeclarationGetRecordOutput<'_>) -> Self {
63
+
use jacquard_common::IntoStatic;
64
+
output.value.into_static()
65
+
}
28
66
}
+38
crates/jacquard-api/src/app_ocho/edu/verification.rs
+38
crates/jacquard-api/src/app_ocho/edu/verification.rs
···
28
28
pub subject: jacquard_common::types::string::Did<'a>,
29
29
}
30
30
31
+
/// Typed wrapper for GetRecord response with this collection's record type.
32
+
#[derive(
33
+
serde::Serialize,
34
+
serde::Deserialize,
35
+
Debug,
36
+
Clone,
37
+
PartialEq,
38
+
Eq,
39
+
jacquard_derive::IntoStatic
40
+
)]
41
+
#[serde(rename_all = "camelCase")]
42
+
pub struct VerificationGetRecordOutput<'a> {
43
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
44
+
#[serde(borrow)]
45
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
46
+
#[serde(borrow)]
47
+
pub uri: jacquard_common::types::string::AtUri<'a>,
48
+
#[serde(borrow)]
49
+
pub value: Verification<'a>,
50
+
}
51
+
52
+
/// Marker type for deserializing records from this collection.
53
+
pub struct VerificationRecord;
54
+
impl jacquard_common::xrpc::XrpcResp for VerificationRecord {
55
+
const NSID: &'static str = "app.ocho.edu.verification";
56
+
const ENCODING: &'static str = "application/json";
57
+
type Output<'de> = VerificationGetRecordOutput<'de>;
58
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
59
+
}
60
+
31
61
impl jacquard_common::types::collection::Collection for Verification<'_> {
32
62
const NSID: &'static str = "app.ocho.edu.verification";
63
+
type Record = VerificationRecord;
64
+
}
65
+
66
+
impl From<VerificationGetRecordOutput<'_>> for Verification<'static> {
67
+
fn from(output: VerificationGetRecordOutput<'_>) -> Self {
68
+
use jacquard_common::IntoStatic;
69
+
output.value.into_static()
70
+
}
33
71
}
+38
crates/jacquard-api/src/app_ocho/plugin/service.rs
+38
crates/jacquard-api/src/app_ocho/plugin/service.rs
···
26
26
pub permissions: Vec<jacquard_common::CowStr<'a>>,
27
27
}
28
28
29
+
/// Typed wrapper for GetRecord response with this collection's record type.
30
+
#[derive(
31
+
serde::Serialize,
32
+
serde::Deserialize,
33
+
Debug,
34
+
Clone,
35
+
PartialEq,
36
+
Eq,
37
+
jacquard_derive::IntoStatic
38
+
)]
39
+
#[serde(rename_all = "camelCase")]
40
+
pub struct ServiceGetRecordOutput<'a> {
41
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
42
+
#[serde(borrow)]
43
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
44
+
#[serde(borrow)]
45
+
pub uri: jacquard_common::types::string::AtUri<'a>,
46
+
#[serde(borrow)]
47
+
pub value: Service<'a>,
48
+
}
49
+
50
+
/// Marker type for deserializing records from this collection.
51
+
pub struct ServiceRecord;
52
+
impl jacquard_common::xrpc::XrpcResp for ServiceRecord {
53
+
const NSID: &'static str = "app.ocho.plugin.service";
54
+
const ENCODING: &'static str = "application/json";
55
+
type Output<'de> = ServiceGetRecordOutput<'de>;
56
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
57
+
}
58
+
29
59
impl jacquard_common::types::collection::Collection for Service<'_> {
30
60
const NSID: &'static str = "app.ocho.plugin.service";
61
+
type Record = ServiceRecord;
62
+
}
63
+
64
+
impl From<ServiceGetRecordOutput<'_>> for Service<'static> {
65
+
fn from(output: ServiceGetRecordOutput<'_>) -> Self {
66
+
use jacquard_common::IntoStatic;
67
+
output.value.into_static()
68
+
}
31
69
}
+38
crates/jacquard-api/src/beauty_cybernetic/trustcow/review.rs
+38
crates/jacquard-api/src/beauty_cybernetic/trustcow/review.rs
···
39
39
pub transaction: jacquard_common::CowStr<'a>,
40
40
}
41
41
42
+
/// Typed wrapper for GetRecord response with this collection's record type.
43
+
#[derive(
44
+
serde::Serialize,
45
+
serde::Deserialize,
46
+
Debug,
47
+
Clone,
48
+
PartialEq,
49
+
Eq,
50
+
jacquard_derive::IntoStatic
51
+
)]
52
+
#[serde(rename_all = "camelCase")]
53
+
pub struct ReviewGetRecordOutput<'a> {
54
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
55
+
#[serde(borrow)]
56
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
57
+
#[serde(borrow)]
58
+
pub uri: jacquard_common::types::string::AtUri<'a>,
59
+
#[serde(borrow)]
60
+
pub value: Review<'a>,
61
+
}
62
+
63
+
/// Marker type for deserializing records from this collection.
64
+
pub struct ReviewRecord;
65
+
impl jacquard_common::xrpc::XrpcResp for ReviewRecord {
66
+
const NSID: &'static str = "beauty.cybernetic.trustcow.review";
67
+
const ENCODING: &'static str = "application/json";
68
+
type Output<'de> = ReviewGetRecordOutput<'de>;
69
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
70
+
}
71
+
42
72
impl jacquard_common::types::collection::Collection for Review<'_> {
43
73
const NSID: &'static str = "beauty.cybernetic.trustcow.review";
74
+
type Record = ReviewRecord;
75
+
}
76
+
77
+
impl From<ReviewGetRecordOutput<'_>> for Review<'static> {
78
+
fn from(output: ReviewGetRecordOutput<'_>) -> Self {
79
+
use jacquard_common::IntoStatic;
80
+
output.value.into_static()
81
+
}
44
82
}
+38
crates/jacquard-api/src/beauty_cybernetic/trustcow/transaction.rs
+38
crates/jacquard-api/src/beauty_cybernetic/trustcow/transaction.rs
···
43
43
pub transaction_id: jacquard_common::CowStr<'a>,
44
44
}
45
45
46
+
/// Typed wrapper for GetRecord response with this collection's record type.
47
+
#[derive(
48
+
serde::Serialize,
49
+
serde::Deserialize,
50
+
Debug,
51
+
Clone,
52
+
PartialEq,
53
+
Eq,
54
+
jacquard_derive::IntoStatic
55
+
)]
56
+
#[serde(rename_all = "camelCase")]
57
+
pub struct TransactionGetRecordOutput<'a> {
58
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
59
+
#[serde(borrow)]
60
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
61
+
#[serde(borrow)]
62
+
pub uri: jacquard_common::types::string::AtUri<'a>,
63
+
#[serde(borrow)]
64
+
pub value: Transaction<'a>,
65
+
}
66
+
67
+
/// Marker type for deserializing records from this collection.
68
+
pub struct TransactionRecord;
69
+
impl jacquard_common::xrpc::XrpcResp for TransactionRecord {
70
+
const NSID: &'static str = "beauty.cybernetic.trustcow.transaction";
71
+
const ENCODING: &'static str = "application/json";
72
+
type Output<'de> = TransactionGetRecordOutput<'de>;
73
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
74
+
}
75
+
46
76
impl jacquard_common::types::collection::Collection for Transaction<'_> {
47
77
const NSID: &'static str = "beauty.cybernetic.trustcow.transaction";
78
+
type Record = TransactionRecord;
79
+
}
80
+
81
+
impl From<TransactionGetRecordOutput<'_>> for Transaction<'static> {
82
+
fn from(output: TransactionGetRecordOutput<'_>) -> Self {
83
+
use jacquard_common::IntoStatic;
84
+
output.value.into_static()
85
+
}
48
86
}
+38
crates/jacquard-api/src/beauty_cybernetic/trustcow/warrant.rs
+38
crates/jacquard-api/src/beauty_cybernetic/trustcow/warrant.rs
···
40
40
pub warrant_type: std::option::Option<jacquard_common::CowStr<'a>>,
41
41
}
42
42
43
+
/// Typed wrapper for GetRecord response with this collection's record type.
44
+
#[derive(
45
+
serde::Serialize,
46
+
serde::Deserialize,
47
+
Debug,
48
+
Clone,
49
+
PartialEq,
50
+
Eq,
51
+
jacquard_derive::IntoStatic
52
+
)]
53
+
#[serde(rename_all = "camelCase")]
54
+
pub struct WarrantGetRecordOutput<'a> {
55
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
56
+
#[serde(borrow)]
57
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
58
+
#[serde(borrow)]
59
+
pub uri: jacquard_common::types::string::AtUri<'a>,
60
+
#[serde(borrow)]
61
+
pub value: Warrant<'a>,
62
+
}
63
+
64
+
/// Marker type for deserializing records from this collection.
65
+
pub struct WarrantRecord;
66
+
impl jacquard_common::xrpc::XrpcResp for WarrantRecord {
67
+
const NSID: &'static str = "beauty.cybernetic.trustcow.warrant";
68
+
const ENCODING: &'static str = "application/json";
69
+
type Output<'de> = WarrantGetRecordOutput<'de>;
70
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
71
+
}
72
+
43
73
impl jacquard_common::types::collection::Collection for Warrant<'_> {
44
74
const NSID: &'static str = "beauty.cybernetic.trustcow.warrant";
75
+
type Record = WarrantRecord;
76
+
}
77
+
78
+
impl From<WarrantGetRecordOutput<'_>> for Warrant<'static> {
79
+
fn from(output: WarrantGetRecordOutput<'_>) -> Self {
80
+
use jacquard_common::IntoStatic;
81
+
output.value.into_static()
82
+
}
45
83
}
+38
crates/jacquard-api/src/blog_pckt/blog.rs
+38
crates/jacquard-api/src/blog_pckt/blog.rs
···
38
38
pub url: std::option::Option<jacquard_common::types::string::Uri<'a>>,
39
39
}
40
40
41
+
/// Typed wrapper for GetRecord response with this collection's record type.
42
+
#[derive(
43
+
serde::Serialize,
44
+
serde::Deserialize,
45
+
Debug,
46
+
Clone,
47
+
PartialEq,
48
+
Eq,
49
+
jacquard_derive::IntoStatic
50
+
)]
51
+
#[serde(rename_all = "camelCase")]
52
+
pub struct BlogGetRecordOutput<'a> {
53
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
54
+
#[serde(borrow)]
55
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
56
+
#[serde(borrow)]
57
+
pub uri: jacquard_common::types::string::AtUri<'a>,
58
+
#[serde(borrow)]
59
+
pub value: Blog<'a>,
60
+
}
61
+
62
+
/// Marker type for deserializing records from this collection.
63
+
pub struct BlogRecord;
64
+
impl jacquard_common::xrpc::XrpcResp for BlogRecord {
65
+
const NSID: &'static str = "blog.pckt.blog";
66
+
const ENCODING: &'static str = "application/json";
67
+
type Output<'de> = BlogGetRecordOutput<'de>;
68
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
69
+
}
70
+
41
71
impl jacquard_common::types::collection::Collection for Blog<'_> {
42
72
const NSID: &'static str = "blog.pckt.blog";
73
+
type Record = BlogRecord;
74
+
}
75
+
76
+
impl From<BlogGetRecordOutput<'_>> for Blog<'static> {
77
+
fn from(output: BlogGetRecordOutput<'_>) -> Self {
78
+
use jacquard_common::IntoStatic;
79
+
output.value.into_static()
80
+
}
43
81
}
44
82
45
83
#[jacquard_derive::lexicon]
+38
crates/jacquard-api/src/blog_pckt/post.rs
+38
crates/jacquard-api/src/blog_pckt/post.rs
···
43
43
pub url: jacquard_common::types::string::Uri<'a>,
44
44
}
45
45
46
+
/// Typed wrapper for GetRecord response with this collection's record type.
47
+
#[derive(
48
+
serde::Serialize,
49
+
serde::Deserialize,
50
+
Debug,
51
+
Clone,
52
+
PartialEq,
53
+
Eq,
54
+
jacquard_derive::IntoStatic
55
+
)]
56
+
#[serde(rename_all = "camelCase")]
57
+
pub struct PostGetRecordOutput<'a> {
58
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
59
+
#[serde(borrow)]
60
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
61
+
#[serde(borrow)]
62
+
pub uri: jacquard_common::types::string::AtUri<'a>,
63
+
#[serde(borrow)]
64
+
pub value: Post<'a>,
65
+
}
66
+
67
+
/// Marker type for deserializing records from this collection.
68
+
pub struct PostRecord;
69
+
impl jacquard_common::xrpc::XrpcResp for PostRecord {
70
+
const NSID: &'static str = "blog.pckt.post";
71
+
const ENCODING: &'static str = "application/json";
72
+
type Output<'de> = PostGetRecordOutput<'de>;
73
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
74
+
}
75
+
46
76
impl jacquard_common::types::collection::Collection for Post<'_> {
47
77
const NSID: &'static str = "blog.pckt.post";
78
+
type Record = PostRecord;
79
+
}
80
+
81
+
impl From<PostGetRecordOutput<'_>> for Post<'static> {
82
+
fn from(output: PostGetRecordOutput<'_>) -> Self {
83
+
use jacquard_common::IntoStatic;
84
+
output.value.into_static()
85
+
}
48
86
}
+38
crates/jacquard-api/src/blog_pckt/publication.rs
+38
crates/jacquard-api/src/blog_pckt/publication.rs
···
48
48
pub updated_at: std::option::Option<jacquard_common::types::string::Datetime>,
49
49
}
50
50
51
+
/// Typed wrapper for GetRecord response with this collection's record type.
52
+
#[derive(
53
+
serde::Serialize,
54
+
serde::Deserialize,
55
+
Debug,
56
+
Clone,
57
+
PartialEq,
58
+
Eq,
59
+
jacquard_derive::IntoStatic
60
+
)]
61
+
#[serde(rename_all = "camelCase")]
62
+
pub struct PublicationGetRecordOutput<'a> {
63
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
64
+
#[serde(borrow)]
65
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
66
+
#[serde(borrow)]
67
+
pub uri: jacquard_common::types::string::AtUri<'a>,
68
+
#[serde(borrow)]
69
+
pub value: Publication<'a>,
70
+
}
71
+
72
+
/// Marker type for deserializing records from this collection.
73
+
pub struct PublicationRecord;
74
+
impl jacquard_common::xrpc::XrpcResp for PublicationRecord {
75
+
const NSID: &'static str = "blog.pckt.publication";
76
+
const ENCODING: &'static str = "application/json";
77
+
type Output<'de> = PublicationGetRecordOutput<'de>;
78
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
79
+
}
80
+
51
81
impl jacquard_common::types::collection::Collection for Publication<'_> {
52
82
const NSID: &'static str = "blog.pckt.publication";
83
+
type Record = PublicationRecord;
84
+
}
85
+
86
+
impl From<PublicationGetRecordOutput<'_>> for Publication<'static> {
87
+
fn from(output: PublicationGetRecordOutput<'_>) -> Self {
88
+
use jacquard_common::IntoStatic;
89
+
output.value.into_static()
90
+
}
53
91
}
+38
crates/jacquard-api/src/blog_pckt/theme.rs
+38
crates/jacquard-api/src/blog_pckt/theme.rs
···
30
30
pub light: crate::blog_pckt::theme::Palette<'a>,
31
31
}
32
32
33
+
/// Typed wrapper for GetRecord response with this collection's record type.
34
+
#[derive(
35
+
serde::Serialize,
36
+
serde::Deserialize,
37
+
Debug,
38
+
Clone,
39
+
PartialEq,
40
+
Eq,
41
+
jacquard_derive::IntoStatic
42
+
)]
43
+
#[serde(rename_all = "camelCase")]
44
+
pub struct ThemeGetRecordOutput<'a> {
45
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
46
+
#[serde(borrow)]
47
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
48
+
#[serde(borrow)]
49
+
pub uri: jacquard_common::types::string::AtUri<'a>,
50
+
#[serde(borrow)]
51
+
pub value: Theme<'a>,
52
+
}
53
+
54
+
/// Marker type for deserializing records from this collection.
55
+
pub struct ThemeRecord;
56
+
impl jacquard_common::xrpc::XrpcResp for ThemeRecord {
57
+
const NSID: &'static str = "blog.pckt.theme";
58
+
const ENCODING: &'static str = "application/json";
59
+
type Output<'de> = ThemeGetRecordOutput<'de>;
60
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
61
+
}
62
+
33
63
impl jacquard_common::types::collection::Collection for Theme<'_> {
34
64
const NSID: &'static str = "blog.pckt.theme";
65
+
type Record = ThemeRecord;
66
+
}
67
+
68
+
impl From<ThemeGetRecordOutput<'_>> for Theme<'static> {
69
+
fn from(output: ThemeGetRecordOutput<'_>) -> Self {
70
+
use jacquard_common::IntoStatic;
71
+
output.value.into_static()
72
+
}
35
73
}
36
74
37
75
///Color palette with CSS hex values
+38
crates/jacquard-api/src/blue__2048/game.rs
+38
crates/jacquard-api/src/blue__2048/game.rs
···
33
33
pub won: bool,
34
34
}
35
35
36
+
/// Typed wrapper for GetRecord response with this collection's record type.
37
+
#[derive(
38
+
serde::Serialize,
39
+
serde::Deserialize,
40
+
Debug,
41
+
Clone,
42
+
PartialEq,
43
+
Eq,
44
+
jacquard_derive::IntoStatic
45
+
)]
46
+
#[serde(rename_all = "camelCase")]
47
+
pub struct GameGetRecordOutput<'a> {
48
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
49
+
#[serde(borrow)]
50
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
51
+
#[serde(borrow)]
52
+
pub uri: jacquard_common::types::string::AtUri<'a>,
53
+
#[serde(borrow)]
54
+
pub value: Game<'a>,
55
+
}
56
+
57
+
/// Marker type for deserializing records from this collection.
58
+
pub struct GameRecord;
59
+
impl jacquard_common::xrpc::XrpcResp for GameRecord {
60
+
const NSID: &'static str = "blue.2048.game";
61
+
const ENCODING: &'static str = "application/json";
62
+
type Output<'de> = GameGetRecordOutput<'de>;
63
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
64
+
}
65
+
36
66
impl jacquard_common::types::collection::Collection for Game<'_> {
37
67
const NSID: &'static str = "blue.2048.game";
68
+
type Record = GameRecord;
69
+
}
70
+
71
+
impl From<GameGetRecordOutput<'_>> for Game<'static> {
72
+
fn from(output: GameGetRecordOutput<'_>) -> Self {
73
+
use jacquard_common::IntoStatic;
74
+
output.value.into_static()
75
+
}
38
76
}
+38
crates/jacquard-api/src/blue__2048/key/game.rs
+38
crates/jacquard-api/src/blue__2048/key/game.rs
···
24
24
pub key: crate::blue__2048::key::Key<'a>,
25
25
}
26
26
27
+
/// Typed wrapper for GetRecord response with this collection's record type.
28
+
#[derive(
29
+
serde::Serialize,
30
+
serde::Deserialize,
31
+
Debug,
32
+
Clone,
33
+
PartialEq,
34
+
Eq,
35
+
jacquard_derive::IntoStatic
36
+
)]
37
+
#[serde(rename_all = "camelCase")]
38
+
pub struct GameGetRecordOutput<'a> {
39
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
40
+
#[serde(borrow)]
41
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
42
+
#[serde(borrow)]
43
+
pub uri: jacquard_common::types::string::AtUri<'a>,
44
+
#[serde(borrow)]
45
+
pub value: Game<'a>,
46
+
}
47
+
48
+
/// Marker type for deserializing records from this collection.
49
+
pub struct GameRecord;
50
+
impl jacquard_common::xrpc::XrpcResp for GameRecord {
51
+
const NSID: &'static str = "blue.2048.key.game";
52
+
const ENCODING: &'static str = "application/json";
53
+
type Output<'de> = GameGetRecordOutput<'de>;
54
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
55
+
}
56
+
27
57
impl jacquard_common::types::collection::Collection for Game<'_> {
28
58
const NSID: &'static str = "blue.2048.key.game";
59
+
type Record = GameRecord;
60
+
}
61
+
62
+
impl From<GameGetRecordOutput<'_>> for Game<'static> {
63
+
fn from(output: GameGetRecordOutput<'_>) -> Self {
64
+
use jacquard_common::IntoStatic;
65
+
output.value.into_static()
66
+
}
29
67
}
+38
crates/jacquard-api/src/blue__2048/key/player/stats.rs
+38
crates/jacquard-api/src/blue__2048/key/player/stats.rs
···
24
24
pub key: crate::blue__2048::key::Key<'a>,
25
25
}
26
26
27
+
/// Typed wrapper for GetRecord response with this collection's record type.
28
+
#[derive(
29
+
serde::Serialize,
30
+
serde::Deserialize,
31
+
Debug,
32
+
Clone,
33
+
PartialEq,
34
+
Eq,
35
+
jacquard_derive::IntoStatic
36
+
)]
37
+
#[serde(rename_all = "camelCase")]
38
+
pub struct StatsGetRecordOutput<'a> {
39
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
40
+
#[serde(borrow)]
41
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
42
+
#[serde(borrow)]
43
+
pub uri: jacquard_common::types::string::AtUri<'a>,
44
+
#[serde(borrow)]
45
+
pub value: Stats<'a>,
46
+
}
47
+
48
+
/// Marker type for deserializing records from this collection.
49
+
pub struct StatsRecord;
50
+
impl jacquard_common::xrpc::XrpcResp for StatsRecord {
51
+
const NSID: &'static str = "blue.2048.key.player.stats";
52
+
const ENCODING: &'static str = "application/json";
53
+
type Output<'de> = StatsGetRecordOutput<'de>;
54
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
55
+
}
56
+
27
57
impl jacquard_common::types::collection::Collection for Stats<'_> {
28
58
const NSID: &'static str = "blue.2048.key.player.stats";
59
+
type Record = StatsRecord;
60
+
}
61
+
62
+
impl From<StatsGetRecordOutput<'_>> for Stats<'static> {
63
+
fn from(output: StatsGetRecordOutput<'_>) -> Self {
64
+
use jacquard_common::IntoStatic;
65
+
output.value.into_static()
66
+
}
29
67
}
+38
crates/jacquard-api/src/blue__2048/player/profile.rs
+38
crates/jacquard-api/src/blue__2048/player/profile.rs
···
26
26
pub sync_status: crate::blue__2048::SyncStatus<'a>,
27
27
}
28
28
29
+
/// Typed wrapper for GetRecord response with this collection's record type.
30
+
#[derive(
31
+
serde::Serialize,
32
+
serde::Deserialize,
33
+
Debug,
34
+
Clone,
35
+
PartialEq,
36
+
Eq,
37
+
jacquard_derive::IntoStatic
38
+
)]
39
+
#[serde(rename_all = "camelCase")]
40
+
pub struct ProfileGetRecordOutput<'a> {
41
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
42
+
#[serde(borrow)]
43
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
44
+
#[serde(borrow)]
45
+
pub uri: jacquard_common::types::string::AtUri<'a>,
46
+
#[serde(borrow)]
47
+
pub value: Profile<'a>,
48
+
}
49
+
50
+
/// Marker type for deserializing records from this collection.
51
+
pub struct ProfileRecord;
52
+
impl jacquard_common::xrpc::XrpcResp for ProfileRecord {
53
+
const NSID: &'static str = "blue.2048.player.profile";
54
+
const ENCODING: &'static str = "application/json";
55
+
type Output<'de> = ProfileGetRecordOutput<'de>;
56
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
57
+
}
58
+
29
59
impl jacquard_common::types::collection::Collection for Profile<'_> {
30
60
const NSID: &'static str = "blue.2048.player.profile";
61
+
type Record = ProfileRecord;
62
+
}
63
+
64
+
impl From<ProfileGetRecordOutput<'_>> for Profile<'static> {
65
+
fn from(output: ProfileGetRecordOutput<'_>) -> Self {
66
+
use jacquard_common::IntoStatic;
67
+
output.value.into_static()
68
+
}
31
69
}
+38
crates/jacquard-api/src/blue__2048/player/stats.rs
+38
crates/jacquard-api/src/blue__2048/player/stats.rs
···
38
38
pub total_score: i64,
39
39
}
40
40
41
+
/// Typed wrapper for GetRecord response with this collection's record type.
42
+
#[derive(
43
+
serde::Serialize,
44
+
serde::Deserialize,
45
+
Debug,
46
+
Clone,
47
+
PartialEq,
48
+
Eq,
49
+
jacquard_derive::IntoStatic
50
+
)]
51
+
#[serde(rename_all = "camelCase")]
52
+
pub struct StatsGetRecordOutput<'a> {
53
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
54
+
#[serde(borrow)]
55
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
56
+
#[serde(borrow)]
57
+
pub uri: jacquard_common::types::string::AtUri<'a>,
58
+
#[serde(borrow)]
59
+
pub value: Stats<'a>,
60
+
}
61
+
62
+
/// Marker type for deserializing records from this collection.
63
+
pub struct StatsRecord;
64
+
impl jacquard_common::xrpc::XrpcResp for StatsRecord {
65
+
const NSID: &'static str = "blue.2048.player.stats";
66
+
const ENCODING: &'static str = "application/json";
67
+
type Output<'de> = StatsGetRecordOutput<'de>;
68
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
69
+
}
70
+
41
71
impl jacquard_common::types::collection::Collection for Stats<'_> {
42
72
const NSID: &'static str = "blue.2048.player.stats";
73
+
type Record = StatsRecord;
74
+
}
75
+
76
+
impl From<StatsGetRecordOutput<'_>> for Stats<'static> {
77
+
fn from(output: StatsGetRecordOutput<'_>) -> Self {
78
+
use jacquard_common::IntoStatic;
79
+
output.value.into_static()
80
+
}
43
81
}
+38
crates/jacquard-api/src/blue__2048/verification/game.rs
+38
crates/jacquard-api/src/blue__2048/verification/game.rs
···
28
28
>,
29
29
}
30
30
31
+
/// Typed wrapper for GetRecord response with this collection's record type.
32
+
#[derive(
33
+
serde::Serialize,
34
+
serde::Deserialize,
35
+
Debug,
36
+
Clone,
37
+
PartialEq,
38
+
Eq,
39
+
jacquard_derive::IntoStatic
40
+
)]
41
+
#[serde(rename_all = "camelCase")]
42
+
pub struct GameGetRecordOutput<'a> {
43
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
44
+
#[serde(borrow)]
45
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
46
+
#[serde(borrow)]
47
+
pub uri: jacquard_common::types::string::AtUri<'a>,
48
+
#[serde(borrow)]
49
+
pub value: Game<'a>,
50
+
}
51
+
52
+
/// Marker type for deserializing records from this collection.
53
+
pub struct GameRecord;
54
+
impl jacquard_common::xrpc::XrpcResp for GameRecord {
55
+
const NSID: &'static str = "blue.2048.verification.game";
56
+
const ENCODING: &'static str = "application/json";
57
+
type Output<'de> = GameGetRecordOutput<'de>;
58
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
59
+
}
60
+
31
61
impl jacquard_common::types::collection::Collection for Game<'_> {
32
62
const NSID: &'static str = "blue.2048.verification.game";
63
+
type Record = GameRecord;
64
+
}
65
+
66
+
impl From<GameGetRecordOutput<'_>> for Game<'static> {
67
+
fn from(output: GameGetRecordOutput<'_>) -> Self {
68
+
use jacquard_common::IntoStatic;
69
+
output.value.into_static()
70
+
}
33
71
}
+38
crates/jacquard-api/src/blue__2048/verification/stats.rs
+38
crates/jacquard-api/src/blue__2048/verification/stats.rs
···
28
28
>,
29
29
}
30
30
31
+
/// Typed wrapper for GetRecord response with this collection's record type.
32
+
#[derive(
33
+
serde::Serialize,
34
+
serde::Deserialize,
35
+
Debug,
36
+
Clone,
37
+
PartialEq,
38
+
Eq,
39
+
jacquard_derive::IntoStatic
40
+
)]
41
+
#[serde(rename_all = "camelCase")]
42
+
pub struct StatsGetRecordOutput<'a> {
43
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
44
+
#[serde(borrow)]
45
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
46
+
#[serde(borrow)]
47
+
pub uri: jacquard_common::types::string::AtUri<'a>,
48
+
#[serde(borrow)]
49
+
pub value: Stats<'a>,
50
+
}
51
+
52
+
/// Marker type for deserializing records from this collection.
53
+
pub struct StatsRecord;
54
+
impl jacquard_common::xrpc::XrpcResp for StatsRecord {
55
+
const NSID: &'static str = "blue.2048.verification.stats";
56
+
const ENCODING: &'static str = "application/json";
57
+
type Output<'de> = StatsGetRecordOutput<'de>;
58
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
59
+
}
60
+
31
61
impl jacquard_common::types::collection::Collection for Stats<'_> {
32
62
const NSID: &'static str = "blue.2048.verification.stats";
63
+
type Record = StatsRecord;
64
+
}
65
+
66
+
impl From<StatsGetRecordOutput<'_>> for Stats<'static> {
67
+
fn from(output: StatsGetRecordOutput<'_>) -> Self {
68
+
use jacquard_common::IntoStatic;
69
+
output.value.into_static()
70
+
}
33
71
}
+38
crates/jacquard-api/src/blue_atplane/fav_client.rs
+38
crates/jacquard-api/src/blue_atplane/fav_client.rs
···
23
23
pub fav_client: jacquard_common::CowStr<'a>,
24
24
}
25
25
26
+
/// Typed wrapper for GetRecord response with this collection's record type.
27
+
#[derive(
28
+
serde::Serialize,
29
+
serde::Deserialize,
30
+
Debug,
31
+
Clone,
32
+
PartialEq,
33
+
Eq,
34
+
jacquard_derive::IntoStatic
35
+
)]
36
+
#[serde(rename_all = "camelCase")]
37
+
pub struct FavClientGetRecordOutput<'a> {
38
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
39
+
#[serde(borrow)]
40
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
41
+
#[serde(borrow)]
42
+
pub uri: jacquard_common::types::string::AtUri<'a>,
43
+
#[serde(borrow)]
44
+
pub value: FavClient<'a>,
45
+
}
46
+
47
+
/// Marker type for deserializing records from this collection.
48
+
pub struct FavClientRecord;
49
+
impl jacquard_common::xrpc::XrpcResp for FavClientRecord {
50
+
const NSID: &'static str = "blue.atplane.favClient";
51
+
const ENCODING: &'static str = "application/json";
52
+
type Output<'de> = FavClientGetRecordOutput<'de>;
53
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
54
+
}
55
+
26
56
impl jacquard_common::types::collection::Collection for FavClient<'_> {
27
57
const NSID: &'static str = "blue.atplane.favClient";
58
+
type Record = FavClientRecord;
59
+
}
60
+
61
+
impl From<FavClientGetRecordOutput<'_>> for FavClient<'static> {
62
+
fn from(output: FavClientGetRecordOutput<'_>) -> Self {
63
+
use jacquard_common::IntoStatic;
64
+
output.value.into_static()
65
+
}
28
66
}
+38
crates/jacquard-api/src/blue_linkat/board.rs
+38
crates/jacquard-api/src/blue_linkat/board.rs
···
49
49
pub cards: Vec<crate::blue_linkat::board::Card<'a>>,
50
50
}
51
51
52
+
/// Typed wrapper for GetRecord response with this collection's record type.
53
+
#[derive(
54
+
serde::Serialize,
55
+
serde::Deserialize,
56
+
Debug,
57
+
Clone,
58
+
PartialEq,
59
+
Eq,
60
+
jacquard_derive::IntoStatic
61
+
)]
62
+
#[serde(rename_all = "camelCase")]
63
+
pub struct BoardGetRecordOutput<'a> {
64
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
65
+
#[serde(borrow)]
66
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
67
+
#[serde(borrow)]
68
+
pub uri: jacquard_common::types::string::AtUri<'a>,
69
+
#[serde(borrow)]
70
+
pub value: Board<'a>,
71
+
}
72
+
73
+
/// Marker type for deserializing records from this collection.
74
+
pub struct BoardRecord;
75
+
impl jacquard_common::xrpc::XrpcResp for BoardRecord {
76
+
const NSID: &'static str = "blue.linkat.board";
77
+
const ENCODING: &'static str = "application/json";
78
+
type Output<'de> = BoardGetRecordOutput<'de>;
79
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
80
+
}
81
+
52
82
impl jacquard_common::types::collection::Collection for Board<'_> {
53
83
const NSID: &'static str = "blue.linkat.board";
84
+
type Record = BoardRecord;
85
+
}
86
+
87
+
impl From<BoardGetRecordOutput<'_>> for Board<'static> {
88
+
fn from(output: BoardGetRecordOutput<'_>) -> Self {
89
+
use jacquard_common::IntoStatic;
90
+
output.value.into_static()
91
+
}
54
92
}
+38
crates/jacquard-api/src/blue_zio/atfile/lock.rs
+38
crates/jacquard-api/src/blue_zio/atfile/lock.rs
···
22
22
pub lock: std::option::Option<bool>,
23
23
}
24
24
25
+
/// Typed wrapper for GetRecord response with this collection's record type.
26
+
#[derive(
27
+
serde::Serialize,
28
+
serde::Deserialize,
29
+
Debug,
30
+
Clone,
31
+
PartialEq,
32
+
Eq,
33
+
jacquard_derive::IntoStatic
34
+
)]
35
+
#[serde(rename_all = "camelCase")]
36
+
pub struct LockGetRecordOutput<'a> {
37
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
38
+
#[serde(borrow)]
39
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
40
+
#[serde(borrow)]
41
+
pub uri: jacquard_common::types::string::AtUri<'a>,
42
+
#[serde(borrow)]
43
+
pub value: Lock<'a>,
44
+
}
45
+
46
+
/// Marker type for deserializing records from this collection.
47
+
pub struct LockRecord;
48
+
impl jacquard_common::xrpc::XrpcResp for LockRecord {
49
+
const NSID: &'static str = "blue.zio.atfile.lock";
50
+
const ENCODING: &'static str = "application/json";
51
+
type Output<'de> = LockGetRecordOutput<'de>;
52
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
53
+
}
54
+
25
55
impl jacquard_common::types::collection::Collection for Lock<'_> {
26
56
const NSID: &'static str = "blue.zio.atfile.lock";
57
+
type Record = LockRecord;
58
+
}
59
+
60
+
impl From<LockGetRecordOutput<'_>> for Lock<'static> {
61
+
fn from(output: LockGetRecordOutput<'_>) -> Self {
62
+
use jacquard_common::IntoStatic;
63
+
output.value.into_static()
64
+
}
27
65
}
+38
crates/jacquard-api/src/buzz_bookhive/book.rs
+38
crates/jacquard-api/src/buzz_bookhive/book.rs
···
50
50
pub title: jacquard_common::CowStr<'a>,
51
51
}
52
52
53
+
/// Typed wrapper for GetRecord response with this collection's record type.
54
+
#[derive(
55
+
serde::Serialize,
56
+
serde::Deserialize,
57
+
Debug,
58
+
Clone,
59
+
PartialEq,
60
+
Eq,
61
+
jacquard_derive::IntoStatic
62
+
)]
63
+
#[serde(rename_all = "camelCase")]
64
+
pub struct BookGetRecordOutput<'a> {
65
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
66
+
#[serde(borrow)]
67
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
68
+
#[serde(borrow)]
69
+
pub uri: jacquard_common::types::string::AtUri<'a>,
70
+
#[serde(borrow)]
71
+
pub value: Book<'a>,
72
+
}
73
+
74
+
/// Marker type for deserializing records from this collection.
75
+
pub struct BookRecord;
76
+
impl jacquard_common::xrpc::XrpcResp for BookRecord {
77
+
const NSID: &'static str = "buzz.bookhive.book";
78
+
const ENCODING: &'static str = "application/json";
79
+
type Output<'de> = BookGetRecordOutput<'de>;
80
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
81
+
}
82
+
53
83
impl jacquard_common::types::collection::Collection for Book<'_> {
54
84
const NSID: &'static str = "buzz.bookhive.book";
85
+
type Record = BookRecord;
86
+
}
87
+
88
+
impl From<BookGetRecordOutput<'_>> for Book<'static> {
89
+
fn from(output: BookGetRecordOutput<'_>) -> Self {
90
+
use jacquard_common::IntoStatic;
91
+
output.value.into_static()
92
+
}
55
93
}
+38
crates/jacquard-api/src/buzz_bookhive/buzz.rs
+38
crates/jacquard-api/src/buzz_bookhive/buzz.rs
···
29
29
pub parent: crate::com_atproto::repo::strong_ref::StrongRef<'a>,
30
30
}
31
31
32
+
/// Typed wrapper for GetRecord response with this collection's record type.
33
+
#[derive(
34
+
serde::Serialize,
35
+
serde::Deserialize,
36
+
Debug,
37
+
Clone,
38
+
PartialEq,
39
+
Eq,
40
+
jacquard_derive::IntoStatic
41
+
)]
42
+
#[serde(rename_all = "camelCase")]
43
+
pub struct BuzzGetRecordOutput<'a> {
44
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
45
+
#[serde(borrow)]
46
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
47
+
#[serde(borrow)]
48
+
pub uri: jacquard_common::types::string::AtUri<'a>,
49
+
#[serde(borrow)]
50
+
pub value: Buzz<'a>,
51
+
}
52
+
53
+
/// Marker type for deserializing records from this collection.
54
+
pub struct BuzzRecord;
55
+
impl jacquard_common::xrpc::XrpcResp for BuzzRecord {
56
+
const NSID: &'static str = "buzz.bookhive.buzz";
57
+
const ENCODING: &'static str = "application/json";
58
+
type Output<'de> = BuzzGetRecordOutput<'de>;
59
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
60
+
}
61
+
32
62
impl jacquard_common::types::collection::Collection for Buzz<'_> {
33
63
const NSID: &'static str = "buzz.bookhive.buzz";
64
+
type Record = BuzzRecord;
65
+
}
66
+
67
+
impl From<BuzzGetRecordOutput<'_>> for Buzz<'static> {
68
+
fn from(output: BuzzGetRecordOutput<'_>) -> Self {
69
+
use jacquard_common::IntoStatic;
70
+
output.value.into_static()
71
+
}
34
72
}
+38
crates/jacquard-api/src/buzz_bookhive/hive_book.rs
+38
crates/jacquard-api/src/buzz_bookhive/hive_book.rs
···
60
60
pub updated_at: jacquard_common::types::string::Datetime,
61
61
}
62
62
63
+
/// Typed wrapper for GetRecord response with this collection's record type.
64
+
#[derive(
65
+
serde::Serialize,
66
+
serde::Deserialize,
67
+
Debug,
68
+
Clone,
69
+
PartialEq,
70
+
Eq,
71
+
jacquard_derive::IntoStatic
72
+
)]
73
+
#[serde(rename_all = "camelCase")]
74
+
pub struct HiveBookGetRecordOutput<'a> {
75
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
76
+
#[serde(borrow)]
77
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
78
+
#[serde(borrow)]
79
+
pub uri: jacquard_common::types::string::AtUri<'a>,
80
+
#[serde(borrow)]
81
+
pub value: HiveBook<'a>,
82
+
}
83
+
84
+
/// Marker type for deserializing records from this collection.
85
+
pub struct HiveBookRecord;
86
+
impl jacquard_common::xrpc::XrpcResp for HiveBookRecord {
87
+
const NSID: &'static str = "buzz.bookhive.hiveBook";
88
+
const ENCODING: &'static str = "application/json";
89
+
type Output<'de> = HiveBookGetRecordOutput<'de>;
90
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
91
+
}
92
+
63
93
impl jacquard_common::types::collection::Collection for HiveBook<'_> {
64
94
const NSID: &'static str = "buzz.bookhive.hiveBook";
95
+
type Record = HiveBookRecord;
96
+
}
97
+
98
+
impl From<HiveBookGetRecordOutput<'_>> for HiveBook<'static> {
99
+
fn from(output: HiveBookGetRecordOutput<'_>) -> Self {
100
+
use jacquard_common::IntoStatic;
101
+
output.value.into_static()
102
+
}
65
103
}
+38
crates/jacquard-api/src/chat_bsky/actor/declaration.rs
+38
crates/jacquard-api/src/chat_bsky/actor/declaration.rs
···
22
22
pub allow_incoming: jacquard_common::CowStr<'a>,
23
23
}
24
24
25
+
/// Typed wrapper for GetRecord response with this collection's record type.
26
+
#[derive(
27
+
serde::Serialize,
28
+
serde::Deserialize,
29
+
Debug,
30
+
Clone,
31
+
PartialEq,
32
+
Eq,
33
+
jacquard_derive::IntoStatic
34
+
)]
35
+
#[serde(rename_all = "camelCase")]
36
+
pub struct DeclarationGetRecordOutput<'a> {
37
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
38
+
#[serde(borrow)]
39
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
40
+
#[serde(borrow)]
41
+
pub uri: jacquard_common::types::string::AtUri<'a>,
42
+
#[serde(borrow)]
43
+
pub value: Declaration<'a>,
44
+
}
45
+
46
+
/// Marker type for deserializing records from this collection.
47
+
pub struct DeclarationRecord;
48
+
impl jacquard_common::xrpc::XrpcResp for DeclarationRecord {
49
+
const NSID: &'static str = "chat.bsky.actor.declaration";
50
+
const ENCODING: &'static str = "application/json";
51
+
type Output<'de> = DeclarationGetRecordOutput<'de>;
52
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
53
+
}
54
+
25
55
impl jacquard_common::types::collection::Collection for Declaration<'_> {
26
56
const NSID: &'static str = "chat.bsky.actor.declaration";
57
+
type Record = DeclarationRecord;
58
+
}
59
+
60
+
impl From<DeclarationGetRecordOutput<'_>> for Declaration<'static> {
61
+
fn from(output: DeclarationGetRecordOutput<'_>) -> Self {
62
+
use jacquard_common::IntoStatic;
63
+
output.value.into_static()
64
+
}
27
65
}
+38
crates/jacquard-api/src/com_atproto/lexicon/schema.rs
+38
crates/jacquard-api/src/com_atproto/lexicon/schema.rs
···
22
22
pub lexicon: i64,
23
23
}
24
24
25
+
/// Typed wrapper for GetRecord response with this collection's record type.
26
+
#[derive(
27
+
serde::Serialize,
28
+
serde::Deserialize,
29
+
Debug,
30
+
Clone,
31
+
PartialEq,
32
+
Eq,
33
+
jacquard_derive::IntoStatic
34
+
)]
35
+
#[serde(rename_all = "camelCase")]
36
+
pub struct SchemaGetRecordOutput<'a> {
37
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
38
+
#[serde(borrow)]
39
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
40
+
#[serde(borrow)]
41
+
pub uri: jacquard_common::types::string::AtUri<'a>,
42
+
#[serde(borrow)]
43
+
pub value: Schema<'a>,
44
+
}
45
+
46
+
/// Marker type for deserializing records from this collection.
47
+
pub struct SchemaRecord;
48
+
impl jacquard_common::xrpc::XrpcResp for SchemaRecord {
49
+
const NSID: &'static str = "com.atproto.lexicon.schema";
50
+
const ENCODING: &'static str = "application/json";
51
+
type Output<'de> = SchemaGetRecordOutput<'de>;
52
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
53
+
}
54
+
25
55
impl jacquard_common::types::collection::Collection for Schema<'_> {
26
56
const NSID: &'static str = "com.atproto.lexicon.schema";
57
+
type Record = SchemaRecord;
58
+
}
59
+
60
+
impl From<SchemaGetRecordOutput<'_>> for Schema<'static> {
61
+
fn from(output: SchemaGetRecordOutput<'_>) -> Self {
62
+
use jacquard_common::IntoStatic;
63
+
output.value.into_static()
64
+
}
27
65
}
+38
crates/jacquard-api/src/com_crabdance/nandi/post.rs
+38
crates/jacquard-api/src/com_crabdance/nandi/post.rs
···
39
39
pub updated_at: std::option::Option<jacquard_common::types::string::Datetime>,
40
40
}
41
41
42
+
/// Typed wrapper for GetRecord response with this collection's record type.
43
+
#[derive(
44
+
serde::Serialize,
45
+
serde::Deserialize,
46
+
Debug,
47
+
Clone,
48
+
PartialEq,
49
+
Eq,
50
+
jacquard_derive::IntoStatic
51
+
)]
52
+
#[serde(rename_all = "camelCase")]
53
+
pub struct PostGetRecordOutput<'a> {
54
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
55
+
#[serde(borrow)]
56
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
57
+
#[serde(borrow)]
58
+
pub uri: jacquard_common::types::string::AtUri<'a>,
59
+
#[serde(borrow)]
60
+
pub value: Post<'a>,
61
+
}
62
+
63
+
/// Marker type for deserializing records from this collection.
64
+
pub struct PostRecord;
65
+
impl jacquard_common::xrpc::XrpcResp for PostRecord {
66
+
const NSID: &'static str = "com.crabdance.nandi.post";
67
+
const ENCODING: &'static str = "application/json";
68
+
type Output<'de> = PostGetRecordOutput<'de>;
69
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
70
+
}
71
+
42
72
impl jacquard_common::types::collection::Collection for Post<'_> {
43
73
const NSID: &'static str = "com.crabdance.nandi.post";
74
+
type Record = PostRecord;
75
+
}
76
+
77
+
impl From<PostGetRecordOutput<'_>> for Post<'static> {
78
+
fn from(output: PostGetRecordOutput<'_>) -> Self {
79
+
use jacquard_common::IntoStatic;
80
+
output.value.into_static()
81
+
}
44
82
}
+38
crates/jacquard-api/src/com_shinolabs/pinksea/oekaki.rs
+38
crates/jacquard-api/src/com_shinolabs/pinksea/oekaki.rs
···
75
75
pub tags: std::option::Option<Vec<jacquard_common::CowStr<'a>>>,
76
76
}
77
77
78
+
/// Typed wrapper for GetRecord response with this collection's record type.
79
+
#[derive(
80
+
serde::Serialize,
81
+
serde::Deserialize,
82
+
Debug,
83
+
Clone,
84
+
PartialEq,
85
+
Eq,
86
+
jacquard_derive::IntoStatic
87
+
)]
88
+
#[serde(rename_all = "camelCase")]
89
+
pub struct OekakiGetRecordOutput<'a> {
90
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
91
+
#[serde(borrow)]
92
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
93
+
#[serde(borrow)]
94
+
pub uri: jacquard_common::types::string::AtUri<'a>,
95
+
#[serde(borrow)]
96
+
pub value: Oekaki<'a>,
97
+
}
98
+
99
+
/// Marker type for deserializing records from this collection.
100
+
pub struct OekakiRecord;
101
+
impl jacquard_common::xrpc::XrpcResp for OekakiRecord {
102
+
const NSID: &'static str = "com.shinolabs.pinksea.oekaki";
103
+
const ENCODING: &'static str = "application/json";
104
+
type Output<'de> = OekakiGetRecordOutput<'de>;
105
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
106
+
}
107
+
78
108
impl jacquard_common::types::collection::Collection for Oekaki<'_> {
79
109
const NSID: &'static str = "com.shinolabs.pinksea.oekaki";
110
+
type Record = OekakiRecord;
111
+
}
112
+
113
+
impl From<OekakiGetRecordOutput<'_>> for Oekaki<'static> {
114
+
fn from(output: OekakiGetRecordOutput<'_>) -> Self {
115
+
use jacquard_common::IntoStatic;
116
+
output.value.into_static()
117
+
}
80
118
}
+38
crates/jacquard-api/src/com_shinolabs/pinksea/profile.rs
+38
crates/jacquard-api/src/com_shinolabs/pinksea/profile.rs
···
38
38
pub nickname: std::option::Option<jacquard_common::CowStr<'a>>,
39
39
}
40
40
41
+
/// Typed wrapper for GetRecord response with this collection's record type.
42
+
#[derive(
43
+
serde::Serialize,
44
+
serde::Deserialize,
45
+
Debug,
46
+
Clone,
47
+
PartialEq,
48
+
Eq,
49
+
jacquard_derive::IntoStatic
50
+
)]
51
+
#[serde(rename_all = "camelCase")]
52
+
pub struct ProfileGetRecordOutput<'a> {
53
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
54
+
#[serde(borrow)]
55
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
56
+
#[serde(borrow)]
57
+
pub uri: jacquard_common::types::string::AtUri<'a>,
58
+
#[serde(borrow)]
59
+
pub value: Profile<'a>,
60
+
}
61
+
62
+
/// Marker type for deserializing records from this collection.
63
+
pub struct ProfileRecord;
64
+
impl jacquard_common::xrpc::XrpcResp for ProfileRecord {
65
+
const NSID: &'static str = "com.shinolabs.pinksea.profile";
66
+
const ENCODING: &'static str = "application/json";
67
+
type Output<'de> = ProfileGetRecordOutput<'de>;
68
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
69
+
}
70
+
41
71
impl jacquard_common::types::collection::Collection for Profile<'_> {
42
72
const NSID: &'static str = "com.shinolabs.pinksea.profile";
73
+
type Record = ProfileRecord;
74
+
}
75
+
76
+
impl From<ProfileGetRecordOutput<'_>> for Profile<'static> {
77
+
fn from(output: ProfileGetRecordOutput<'_>) -> Self {
78
+
use jacquard_common::IntoStatic;
79
+
output.value.into_static()
80
+
}
43
81
}
44
82
45
83
#[jacquard_derive::lexicon]
+38
crates/jacquard-api/src/com_whtwnd/blog/entry.rs
+38
crates/jacquard-api/src/com_whtwnd/blog/entry.rs
···
46
46
pub visibility: std::option::Option<jacquard_common::CowStr<'a>>,
47
47
}
48
48
49
+
/// Typed wrapper for GetRecord response with this collection's record type.
50
+
#[derive(
51
+
serde::Serialize,
52
+
serde::Deserialize,
53
+
Debug,
54
+
Clone,
55
+
PartialEq,
56
+
Eq,
57
+
jacquard_derive::IntoStatic
58
+
)]
59
+
#[serde(rename_all = "camelCase")]
60
+
pub struct EntryGetRecordOutput<'a> {
61
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
62
+
#[serde(borrow)]
63
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
64
+
#[serde(borrow)]
65
+
pub uri: jacquard_common::types::string::AtUri<'a>,
66
+
#[serde(borrow)]
67
+
pub value: Entry<'a>,
68
+
}
69
+
70
+
/// Marker type for deserializing records from this collection.
71
+
pub struct EntryRecord;
72
+
impl jacquard_common::xrpc::XrpcResp for EntryRecord {
73
+
const NSID: &'static str = "com.whtwnd.blog.entry";
74
+
const ENCODING: &'static str = "application/json";
75
+
type Output<'de> = EntryGetRecordOutput<'de>;
76
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
77
+
}
78
+
49
79
impl jacquard_common::types::collection::Collection for Entry<'_> {
50
80
const NSID: &'static str = "com.whtwnd.blog.entry";
81
+
type Record = EntryRecord;
82
+
}
83
+
84
+
impl From<EntryGetRecordOutput<'_>> for Entry<'static> {
85
+
fn from(output: EntryGetRecordOutput<'_>) -> Self {
86
+
use jacquard_common::IntoStatic;
87
+
output.value.into_static()
88
+
}
51
89
}
+38
crates/jacquard-api/src/community_lexicon/bookmarks/bookmark.rs
+38
crates/jacquard-api/src/community_lexicon/bookmarks/bookmark.rs
···
27
27
pub tags: std::option::Option<Vec<jacquard_common::CowStr<'a>>>,
28
28
}
29
29
30
+
/// Typed wrapper for GetRecord response with this collection's record type.
31
+
#[derive(
32
+
serde::Serialize,
33
+
serde::Deserialize,
34
+
Debug,
35
+
Clone,
36
+
PartialEq,
37
+
Eq,
38
+
jacquard_derive::IntoStatic
39
+
)]
40
+
#[serde(rename_all = "camelCase")]
41
+
pub struct BookmarkGetRecordOutput<'a> {
42
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
43
+
#[serde(borrow)]
44
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
45
+
#[serde(borrow)]
46
+
pub uri: jacquard_common::types::string::AtUri<'a>,
47
+
#[serde(borrow)]
48
+
pub value: Bookmark<'a>,
49
+
}
50
+
51
+
/// Marker type for deserializing records from this collection.
52
+
pub struct BookmarkRecord;
53
+
impl jacquard_common::xrpc::XrpcResp for BookmarkRecord {
54
+
const NSID: &'static str = "community.lexicon.bookmarks.bookmark";
55
+
const ENCODING: &'static str = "application/json";
56
+
type Output<'de> = BookmarkGetRecordOutput<'de>;
57
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
58
+
}
59
+
30
60
impl jacquard_common::types::collection::Collection for Bookmark<'_> {
31
61
const NSID: &'static str = "community.lexicon.bookmarks.bookmark";
62
+
type Record = BookmarkRecord;
63
+
}
64
+
65
+
impl From<BookmarkGetRecordOutput<'_>> for Bookmark<'static> {
66
+
fn from(output: BookmarkGetRecordOutput<'_>) -> Self {
67
+
use jacquard_common::IntoStatic;
68
+
output.value.into_static()
69
+
}
32
70
}
+38
crates/jacquard-api/src/community_lexicon/calendar/event.rs
+38
crates/jacquard-api/src/community_lexicon/calendar/event.rs
···
134
134
Hthree(Box<crate::community_lexicon::location::hthree::Hthree<'a>>),
135
135
}
136
136
137
+
/// Typed wrapper for GetRecord response with this collection's record type.
138
+
#[derive(
139
+
serde::Serialize,
140
+
serde::Deserialize,
141
+
Debug,
142
+
Clone,
143
+
PartialEq,
144
+
Eq,
145
+
jacquard_derive::IntoStatic
146
+
)]
147
+
#[serde(rename_all = "camelCase")]
148
+
pub struct EventGetRecordOutput<'a> {
149
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
150
+
#[serde(borrow)]
151
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
152
+
#[serde(borrow)]
153
+
pub uri: jacquard_common::types::string::AtUri<'a>,
154
+
#[serde(borrow)]
155
+
pub value: Event<'a>,
156
+
}
157
+
158
+
/// Marker type for deserializing records from this collection.
159
+
pub struct EventRecord;
160
+
impl jacquard_common::xrpc::XrpcResp for EventRecord {
161
+
const NSID: &'static str = "community.lexicon.calendar.event";
162
+
const ENCODING: &'static str = "application/json";
163
+
type Output<'de> = EventGetRecordOutput<'de>;
164
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
165
+
}
166
+
137
167
impl jacquard_common::types::collection::Collection for Event<'_> {
138
168
const NSID: &'static str = "community.lexicon.calendar.event";
169
+
type Record = EventRecord;
170
+
}
171
+
172
+
impl From<EventGetRecordOutput<'_>> for Event<'static> {
173
+
fn from(output: EventGetRecordOutput<'_>) -> Self {
174
+
use jacquard_common::IntoStatic;
175
+
output.value.into_static()
176
+
}
139
177
}
140
178
141
179
///The mode of the event.
+38
crates/jacquard-api/src/community_lexicon/calendar/rsvp.rs
+38
crates/jacquard-api/src/community_lexicon/calendar/rsvp.rs
···
60
60
pub subject: crate::com_atproto::repo::strong_ref::StrongRef<'a>,
61
61
}
62
62
63
+
/// Typed wrapper for GetRecord response with this collection's record type.
64
+
#[derive(
65
+
serde::Serialize,
66
+
serde::Deserialize,
67
+
Debug,
68
+
Clone,
69
+
PartialEq,
70
+
Eq,
71
+
jacquard_derive::IntoStatic
72
+
)]
73
+
#[serde(rename_all = "camelCase")]
74
+
pub struct RsvpGetRecordOutput<'a> {
75
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
76
+
#[serde(borrow)]
77
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
78
+
#[serde(borrow)]
79
+
pub uri: jacquard_common::types::string::AtUri<'a>,
80
+
#[serde(borrow)]
81
+
pub value: Rsvp<'a>,
82
+
}
83
+
84
+
/// Marker type for deserializing records from this collection.
85
+
pub struct RsvpRecord;
86
+
impl jacquard_common::xrpc::XrpcResp for RsvpRecord {
87
+
const NSID: &'static str = "community.lexicon.calendar.rsvp";
88
+
const ENCODING: &'static str = "application/json";
89
+
type Output<'de> = RsvpGetRecordOutput<'de>;
90
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
91
+
}
92
+
63
93
impl jacquard_common::types::collection::Collection for Rsvp<'_> {
64
94
const NSID: &'static str = "community.lexicon.calendar.rsvp";
95
+
type Record = RsvpRecord;
96
+
}
97
+
98
+
impl From<RsvpGetRecordOutput<'_>> for Rsvp<'static> {
99
+
fn from(output: RsvpGetRecordOutput<'_>) -> Self {
100
+
use jacquard_common::IntoStatic;
101
+
output.value.into_static()
102
+
}
65
103
}
66
104
67
105
///Not going to the event
+38
crates/jacquard-api/src/community_lexicon/interaction/like.rs
+38
crates/jacquard-api/src/community_lexicon/interaction/like.rs
···
23
23
pub subject: crate::com_atproto::repo::strong_ref::StrongRef<'a>,
24
24
}
25
25
26
+
/// Typed wrapper for GetRecord response with this collection's record type.
27
+
#[derive(
28
+
serde::Serialize,
29
+
serde::Deserialize,
30
+
Debug,
31
+
Clone,
32
+
PartialEq,
33
+
Eq,
34
+
jacquard_derive::IntoStatic
35
+
)]
36
+
#[serde(rename_all = "camelCase")]
37
+
pub struct LikeGetRecordOutput<'a> {
38
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
39
+
#[serde(borrow)]
40
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
41
+
#[serde(borrow)]
42
+
pub uri: jacquard_common::types::string::AtUri<'a>,
43
+
#[serde(borrow)]
44
+
pub value: Like<'a>,
45
+
}
46
+
47
+
/// Marker type for deserializing records from this collection.
48
+
pub struct LikeRecord;
49
+
impl jacquard_common::xrpc::XrpcResp for LikeRecord {
50
+
const NSID: &'static str = "community.lexicon.interaction.like";
51
+
const ENCODING: &'static str = "application/json";
52
+
type Output<'de> = LikeGetRecordOutput<'de>;
53
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
54
+
}
55
+
26
56
impl jacquard_common::types::collection::Collection for Like<'_> {
27
57
const NSID: &'static str = "community.lexicon.interaction.like";
58
+
type Record = LikeRecord;
59
+
}
60
+
61
+
impl From<LikeGetRecordOutput<'_>> for Like<'static> {
62
+
fn from(output: LikeGetRecordOutput<'_>) -> Self {
63
+
use jacquard_common::IntoStatic;
64
+
output.value.into_static()
65
+
}
28
66
}
+38
crates/jacquard-api/src/community_lexicon/payments/web_monetization.rs
+38
crates/jacquard-api/src/community_lexicon/payments/web_monetization.rs
···
27
27
pub note: std::option::Option<jacquard_common::CowStr<'a>>,
28
28
}
29
29
30
+
/// Typed wrapper for GetRecord response with this collection's record type.
31
+
#[derive(
32
+
serde::Serialize,
33
+
serde::Deserialize,
34
+
Debug,
35
+
Clone,
36
+
PartialEq,
37
+
Eq,
38
+
jacquard_derive::IntoStatic
39
+
)]
40
+
#[serde(rename_all = "camelCase")]
41
+
pub struct WebMonetizationGetRecordOutput<'a> {
42
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
43
+
#[serde(borrow)]
44
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
45
+
#[serde(borrow)]
46
+
pub uri: jacquard_common::types::string::AtUri<'a>,
47
+
#[serde(borrow)]
48
+
pub value: WebMonetization<'a>,
49
+
}
50
+
51
+
/// Marker type for deserializing records from this collection.
52
+
pub struct WebMonetizationRecord;
53
+
impl jacquard_common::xrpc::XrpcResp for WebMonetizationRecord {
54
+
const NSID: &'static str = "community.lexicon.payments.webMonetization";
55
+
const ENCODING: &'static str = "application/json";
56
+
type Output<'de> = WebMonetizationGetRecordOutput<'de>;
57
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
58
+
}
59
+
30
60
impl jacquard_common::types::collection::Collection for WebMonetization<'_> {
31
61
const NSID: &'static str = "community.lexicon.payments.webMonetization";
62
+
type Record = WebMonetizationRecord;
63
+
}
64
+
65
+
impl From<WebMonetizationGetRecordOutput<'_>> for WebMonetization<'static> {
66
+
fn from(output: WebMonetizationGetRecordOutput<'_>) -> Self {
67
+
use jacquard_common::IntoStatic;
68
+
output.value.into_static()
69
+
}
32
70
}
+38
crates/jacquard-api/src/dev_baileytownsend/health/calories.rs
+38
crates/jacquard-api/src/dev_baileytownsend/health/calories.rs
···
23
23
pub intake: i64,
24
24
}
25
25
26
+
/// Typed wrapper for GetRecord response with this collection's record type.
27
+
#[derive(
28
+
serde::Serialize,
29
+
serde::Deserialize,
30
+
Debug,
31
+
Clone,
32
+
PartialEq,
33
+
Eq,
34
+
jacquard_derive::IntoStatic
35
+
)]
36
+
#[serde(rename_all = "camelCase")]
37
+
pub struct CaloriesGetRecordOutput<'a> {
38
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
39
+
#[serde(borrow)]
40
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
41
+
#[serde(borrow)]
42
+
pub uri: jacquard_common::types::string::AtUri<'a>,
43
+
#[serde(borrow)]
44
+
pub value: Calories<'a>,
45
+
}
46
+
47
+
/// Marker type for deserializing records from this collection.
48
+
pub struct CaloriesRecord;
49
+
impl jacquard_common::xrpc::XrpcResp for CaloriesRecord {
50
+
const NSID: &'static str = "dev.baileytownsend.health.calories";
51
+
const ENCODING: &'static str = "application/json";
52
+
type Output<'de> = CaloriesGetRecordOutput<'de>;
53
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
54
+
}
55
+
26
56
impl jacquard_common::types::collection::Collection for Calories<'_> {
27
57
const NSID: &'static str = "dev.baileytownsend.health.calories";
58
+
type Record = CaloriesRecord;
59
+
}
60
+
61
+
impl From<CaloriesGetRecordOutput<'_>> for Calories<'static> {
62
+
fn from(output: CaloriesGetRecordOutput<'_>) -> Self {
63
+
use jacquard_common::IntoStatic;
64
+
output.value.into_static()
65
+
}
28
66
}
+38
crates/jacquard-api/src/dev_baileytownsend/health/rings.rs
+38
crates/jacquard-api/src/dev_baileytownsend/health/rings.rs
···
33
33
pub stand_hours: i64,
34
34
}
35
35
36
+
/// Typed wrapper for GetRecord response with this collection's record type.
37
+
#[derive(
38
+
serde::Serialize,
39
+
serde::Deserialize,
40
+
Debug,
41
+
Clone,
42
+
PartialEq,
43
+
Eq,
44
+
jacquard_derive::IntoStatic
45
+
)]
46
+
#[serde(rename_all = "camelCase")]
47
+
pub struct RingsGetRecordOutput<'a> {
48
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
49
+
#[serde(borrow)]
50
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
51
+
#[serde(borrow)]
52
+
pub uri: jacquard_common::types::string::AtUri<'a>,
53
+
#[serde(borrow)]
54
+
pub value: Rings<'a>,
55
+
}
56
+
57
+
/// Marker type for deserializing records from this collection.
58
+
pub struct RingsRecord;
59
+
impl jacquard_common::xrpc::XrpcResp for RingsRecord {
60
+
const NSID: &'static str = "dev.baileytownsend.health.rings";
61
+
const ENCODING: &'static str = "application/json";
62
+
type Output<'de> = RingsGetRecordOutput<'de>;
63
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
64
+
}
65
+
36
66
impl jacquard_common::types::collection::Collection for Rings<'_> {
37
67
const NSID: &'static str = "dev.baileytownsend.health.rings";
68
+
type Record = RingsRecord;
69
+
}
70
+
71
+
impl From<RingsGetRecordOutput<'_>> for Rings<'static> {
72
+
fn from(output: RingsGetRecordOutput<'_>) -> Self {
73
+
use jacquard_common::IntoStatic;
74
+
output.value.into_static()
75
+
}
38
76
}
+38
crates/jacquard-api/src/dev_baileytownsend/health/steps.rs
+38
crates/jacquard-api/src/dev_baileytownsend/health/steps.rs
···
21
21
pub steps: i64,
22
22
}
23
23
24
+
/// Typed wrapper for GetRecord response with this collection's record type.
25
+
#[derive(
26
+
serde::Serialize,
27
+
serde::Deserialize,
28
+
Debug,
29
+
Clone,
30
+
PartialEq,
31
+
Eq,
32
+
jacquard_derive::IntoStatic
33
+
)]
34
+
#[serde(rename_all = "camelCase")]
35
+
pub struct StepsGetRecordOutput<'a> {
36
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
37
+
#[serde(borrow)]
38
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
39
+
#[serde(borrow)]
40
+
pub uri: jacquard_common::types::string::AtUri<'a>,
41
+
#[serde(borrow)]
42
+
pub value: Steps<'a>,
43
+
}
44
+
45
+
/// Marker type for deserializing records from this collection.
46
+
pub struct StepsRecord;
47
+
impl jacquard_common::xrpc::XrpcResp for StepsRecord {
48
+
const NSID: &'static str = "dev.baileytownsend.health.steps";
49
+
const ENCODING: &'static str = "application/json";
50
+
type Output<'de> = StepsGetRecordOutput<'de>;
51
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
52
+
}
53
+
24
54
impl jacquard_common::types::collection::Collection for Steps<'_> {
25
55
const NSID: &'static str = "dev.baileytownsend.health.steps";
56
+
type Record = StepsRecord;
57
+
}
58
+
59
+
impl From<StepsGetRecordOutput<'_>> for Steps<'static> {
60
+
fn from(output: StepsGetRecordOutput<'_>) -> Self {
61
+
use jacquard_common::IntoStatic;
62
+
output.value.into_static()
63
+
}
26
64
}
+38
crates/jacquard-api/src/dev_baileytownsend/health/workout.rs
+38
crates/jacquard-api/src/dev_baileytownsend/health/workout.rs
···
34
34
pub start_time: jacquard_common::types::string::Datetime,
35
35
}
36
36
37
+
/// Typed wrapper for GetRecord response with this collection's record type.
38
+
#[derive(
39
+
serde::Serialize,
40
+
serde::Deserialize,
41
+
Debug,
42
+
Clone,
43
+
PartialEq,
44
+
Eq,
45
+
jacquard_derive::IntoStatic
46
+
)]
47
+
#[serde(rename_all = "camelCase")]
48
+
pub struct WorkoutGetRecordOutput<'a> {
49
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
50
+
#[serde(borrow)]
51
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
52
+
#[serde(borrow)]
53
+
pub uri: jacquard_common::types::string::AtUri<'a>,
54
+
#[serde(borrow)]
55
+
pub value: Workout<'a>,
56
+
}
57
+
58
+
/// Marker type for deserializing records from this collection.
59
+
pub struct WorkoutRecord;
60
+
impl jacquard_common::xrpc::XrpcResp for WorkoutRecord {
61
+
const NSID: &'static str = "dev.baileytownsend.health.workout";
62
+
const ENCODING: &'static str = "application/json";
63
+
type Output<'de> = WorkoutGetRecordOutput<'de>;
64
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
65
+
}
66
+
37
67
impl jacquard_common::types::collection::Collection for Workout<'_> {
38
68
const NSID: &'static str = "dev.baileytownsend.health.workout";
69
+
type Record = WorkoutRecord;
70
+
}
71
+
72
+
impl From<WorkoutGetRecordOutput<'_>> for Workout<'static> {
73
+
fn from(output: WorkoutGetRecordOutput<'_>) -> Self {
74
+
use jacquard_common::IntoStatic;
75
+
output.value.into_static()
76
+
}
39
77
}
+38
crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/feed/post.rs
+38
crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/feed/post.rs
···
36
36
pub updated_at: std::option::Option<jacquard_common::types::string::Datetime>,
37
37
}
38
38
39
+
/// Typed wrapper for GetRecord response with this collection's record type.
40
+
#[derive(
41
+
serde::Serialize,
42
+
serde::Deserialize,
43
+
Debug,
44
+
Clone,
45
+
PartialEq,
46
+
Eq,
47
+
jacquard_derive::IntoStatic
48
+
)]
49
+
#[serde(rename_all = "camelCase")]
50
+
pub struct PostGetRecordOutput<'a> {
51
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
52
+
#[serde(borrow)]
53
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
54
+
#[serde(borrow)]
55
+
pub uri: jacquard_common::types::string::AtUri<'a>,
56
+
#[serde(borrow)]
57
+
pub value: Post<'a>,
58
+
}
59
+
60
+
/// Marker type for deserializing records from this collection.
61
+
pub struct PostRecord;
62
+
impl jacquard_common::xrpc::XrpcResp for PostRecord {
63
+
const NSID: &'static str = "dev.fudgeu.experimental.atforumv1.feed.post";
64
+
const ENCODING: &'static str = "application/json";
65
+
type Output<'de> = PostGetRecordOutput<'de>;
66
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
67
+
}
68
+
39
69
impl jacquard_common::types::collection::Collection for Post<'_> {
40
70
const NSID: &'static str = "dev.fudgeu.experimental.atforumv1.feed.post";
71
+
type Record = PostRecord;
72
+
}
73
+
74
+
impl From<PostGetRecordOutput<'_>> for Post<'static> {
75
+
fn from(output: PostGetRecordOutput<'_>) -> Self {
76
+
use jacquard_common::IntoStatic;
77
+
output.value.into_static()
78
+
}
41
79
}
+38
crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/feed/reply.rs
+38
crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/feed/reply.rs
···
27
27
pub updated_at: std::option::Option<jacquard_common::types::string::Datetime>,
28
28
}
29
29
30
+
/// Typed wrapper for GetRecord response with this collection's record type.
31
+
#[derive(
32
+
serde::Serialize,
33
+
serde::Deserialize,
34
+
Debug,
35
+
Clone,
36
+
PartialEq,
37
+
Eq,
38
+
jacquard_derive::IntoStatic
39
+
)]
40
+
#[serde(rename_all = "camelCase")]
41
+
pub struct ReplyGetRecordOutput<'a> {
42
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
43
+
#[serde(borrow)]
44
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
45
+
#[serde(borrow)]
46
+
pub uri: jacquard_common::types::string::AtUri<'a>,
47
+
#[serde(borrow)]
48
+
pub value: Reply<'a>,
49
+
}
50
+
51
+
/// Marker type for deserializing records from this collection.
52
+
pub struct ReplyRecord;
53
+
impl jacquard_common::xrpc::XrpcResp for ReplyRecord {
54
+
const NSID: &'static str = "dev.fudgeu.experimental.atforumv1.feed.reply";
55
+
const ENCODING: &'static str = "application/json";
56
+
type Output<'de> = ReplyGetRecordOutput<'de>;
57
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
58
+
}
59
+
30
60
impl jacquard_common::types::collection::Collection for Reply<'_> {
31
61
const NSID: &'static str = "dev.fudgeu.experimental.atforumv1.feed.reply";
62
+
type Record = ReplyRecord;
63
+
}
64
+
65
+
impl From<ReplyGetRecordOutput<'_>> for Reply<'static> {
66
+
fn from(output: ReplyGetRecordOutput<'_>) -> Self {
67
+
use jacquard_common::IntoStatic;
68
+
output.value.into_static()
69
+
}
32
70
}
+38
crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/forum/announcement.rs
+38
crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/forum/announcement.rs
···
26
26
pub title: jacquard_common::CowStr<'a>,
27
27
}
28
28
29
+
/// Typed wrapper for GetRecord response with this collection's record type.
30
+
#[derive(
31
+
serde::Serialize,
32
+
serde::Deserialize,
33
+
Debug,
34
+
Clone,
35
+
PartialEq,
36
+
Eq,
37
+
jacquard_derive::IntoStatic
38
+
)]
39
+
#[serde(rename_all = "camelCase")]
40
+
pub struct AnnouncementGetRecordOutput<'a> {
41
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
42
+
#[serde(borrow)]
43
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
44
+
#[serde(borrow)]
45
+
pub uri: jacquard_common::types::string::AtUri<'a>,
46
+
#[serde(borrow)]
47
+
pub value: Announcement<'a>,
48
+
}
49
+
50
+
/// Marker type for deserializing records from this collection.
51
+
pub struct AnnouncementRecord;
52
+
impl jacquard_common::xrpc::XrpcResp for AnnouncementRecord {
53
+
const NSID: &'static str = "dev.fudgeu.experimental.atforumv1.forum.announcement";
54
+
const ENCODING: &'static str = "application/json";
55
+
type Output<'de> = AnnouncementGetRecordOutput<'de>;
56
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
57
+
}
58
+
29
59
impl jacquard_common::types::collection::Collection for Announcement<'_> {
30
60
const NSID: &'static str = "dev.fudgeu.experimental.atforumv1.forum.announcement";
61
+
type Record = AnnouncementRecord;
62
+
}
63
+
64
+
impl From<AnnouncementGetRecordOutput<'_>> for Announcement<'static> {
65
+
fn from(output: AnnouncementGetRecordOutput<'_>) -> Self {
66
+
use jacquard_common::IntoStatic;
67
+
output.value.into_static()
68
+
}
31
69
}
+38
crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/forum/category.rs
+38
crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/forum/category.rs
···
29
29
pub name: jacquard_common::CowStr<'a>,
30
30
}
31
31
32
+
/// Typed wrapper for GetRecord response with this collection's record type.
33
+
#[derive(
34
+
serde::Serialize,
35
+
serde::Deserialize,
36
+
Debug,
37
+
Clone,
38
+
PartialEq,
39
+
Eq,
40
+
jacquard_derive::IntoStatic
41
+
)]
42
+
#[serde(rename_all = "camelCase")]
43
+
pub struct CategoryGetRecordOutput<'a> {
44
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
45
+
#[serde(borrow)]
46
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
47
+
#[serde(borrow)]
48
+
pub uri: jacquard_common::types::string::AtUri<'a>,
49
+
#[serde(borrow)]
50
+
pub value: Category<'a>,
51
+
}
52
+
53
+
/// Marker type for deserializing records from this collection.
54
+
pub struct CategoryRecord;
55
+
impl jacquard_common::xrpc::XrpcResp for CategoryRecord {
56
+
const NSID: &'static str = "dev.fudgeu.experimental.atforumv1.forum.category";
57
+
const ENCODING: &'static str = "application/json";
58
+
type Output<'de> = CategoryGetRecordOutput<'de>;
59
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
60
+
}
61
+
32
62
impl jacquard_common::types::collection::Collection for Category<'_> {
33
63
const NSID: &'static str = "dev.fudgeu.experimental.atforumv1.forum.category";
64
+
type Record = CategoryRecord;
65
+
}
66
+
67
+
impl From<CategoryGetRecordOutput<'_>> for Category<'static> {
68
+
fn from(output: CategoryGetRecordOutput<'_>) -> Self {
69
+
use jacquard_common::IntoStatic;
70
+
output.value.into_static()
71
+
}
34
72
}
+38
crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/forum/group.rs
+38
crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/forum/group.rs
···
25
25
pub name: jacquard_common::CowStr<'a>,
26
26
}
27
27
28
+
/// Typed wrapper for GetRecord response with this collection's record type.
29
+
#[derive(
30
+
serde::Serialize,
31
+
serde::Deserialize,
32
+
Debug,
33
+
Clone,
34
+
PartialEq,
35
+
Eq,
36
+
jacquard_derive::IntoStatic
37
+
)]
38
+
#[serde(rename_all = "camelCase")]
39
+
pub struct GroupGetRecordOutput<'a> {
40
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
41
+
#[serde(borrow)]
42
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
43
+
#[serde(borrow)]
44
+
pub uri: jacquard_common::types::string::AtUri<'a>,
45
+
#[serde(borrow)]
46
+
pub value: Group<'a>,
47
+
}
48
+
49
+
/// Marker type for deserializing records from this collection.
50
+
pub struct GroupRecord;
51
+
impl jacquard_common::xrpc::XrpcResp for GroupRecord {
52
+
const NSID: &'static str = "dev.fudgeu.experimental.atforumv1.forum.group";
53
+
const ENCODING: &'static str = "application/json";
54
+
type Output<'de> = GroupGetRecordOutput<'de>;
55
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
56
+
}
57
+
28
58
impl jacquard_common::types::collection::Collection for Group<'_> {
29
59
const NSID: &'static str = "dev.fudgeu.experimental.atforumv1.forum.group";
60
+
type Record = GroupRecord;
61
+
}
62
+
63
+
impl From<GroupGetRecordOutput<'_>> for Group<'static> {
64
+
fn from(output: GroupGetRecordOutput<'_>) -> Self {
65
+
use jacquard_common::IntoStatic;
66
+
output.value.into_static()
67
+
}
30
68
}
+38
crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/forum/identity.rs
+38
crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/forum/identity.rs
···
28
28
pub name: jacquard_common::CowStr<'a>,
29
29
}
30
30
31
+
/// Typed wrapper for GetRecord response with this collection's record type.
32
+
#[derive(
33
+
serde::Serialize,
34
+
serde::Deserialize,
35
+
Debug,
36
+
Clone,
37
+
PartialEq,
38
+
Eq,
39
+
jacquard_derive::IntoStatic
40
+
)]
41
+
#[serde(rename_all = "camelCase")]
42
+
pub struct IdentityGetRecordOutput<'a> {
43
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
44
+
#[serde(borrow)]
45
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
46
+
#[serde(borrow)]
47
+
pub uri: jacquard_common::types::string::AtUri<'a>,
48
+
#[serde(borrow)]
49
+
pub value: Identity<'a>,
50
+
}
51
+
52
+
/// Marker type for deserializing records from this collection.
53
+
pub struct IdentityRecord;
54
+
impl jacquard_common::xrpc::XrpcResp for IdentityRecord {
55
+
const NSID: &'static str = "dev.fudgeu.experimental.atforumv1.forum.identity";
56
+
const ENCODING: &'static str = "application/json";
57
+
type Output<'de> = IdentityGetRecordOutput<'de>;
58
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
59
+
}
60
+
31
61
impl jacquard_common::types::collection::Collection for Identity<'_> {
32
62
const NSID: &'static str = "dev.fudgeu.experimental.atforumv1.forum.identity";
63
+
type Record = IdentityRecord;
64
+
}
65
+
66
+
impl From<IdentityGetRecordOutput<'_>> for Identity<'static> {
67
+
fn from(output: IdentityGetRecordOutput<'_>) -> Self {
68
+
use jacquard_common::IntoStatic;
69
+
output.value.into_static()
70
+
}
33
71
}
+38
crates/jacquard-api/src/dev_ocbwoy3/blueboard/board.rs
+38
crates/jacquard-api/src/dev_ocbwoy3/blueboard/board.rs
···
29
29
pub title: jacquard_common::CowStr<'a>,
30
30
}
31
31
32
+
/// Typed wrapper for GetRecord response with this collection's record type.
33
+
#[derive(
34
+
serde::Serialize,
35
+
serde::Deserialize,
36
+
Debug,
37
+
Clone,
38
+
PartialEq,
39
+
Eq,
40
+
jacquard_derive::IntoStatic
41
+
)]
42
+
#[serde(rename_all = "camelCase")]
43
+
pub struct BoardGetRecordOutput<'a> {
44
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
45
+
#[serde(borrow)]
46
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
47
+
#[serde(borrow)]
48
+
pub uri: jacquard_common::types::string::AtUri<'a>,
49
+
#[serde(borrow)]
50
+
pub value: Board<'a>,
51
+
}
52
+
53
+
/// Marker type for deserializing records from this collection.
54
+
pub struct BoardRecord;
55
+
impl jacquard_common::xrpc::XrpcResp for BoardRecord {
56
+
const NSID: &'static str = "dev.ocbwoy3.blueboard.board";
57
+
const ENCODING: &'static str = "application/json";
58
+
type Output<'de> = BoardGetRecordOutput<'de>;
59
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
60
+
}
61
+
32
62
impl jacquard_common::types::collection::Collection for Board<'_> {
33
63
const NSID: &'static str = "dev.ocbwoy3.blueboard.board";
64
+
type Record = BoardRecord;
65
+
}
66
+
67
+
impl From<BoardGetRecordOutput<'_>> for Board<'static> {
68
+
fn from(output: BoardGetRecordOutput<'_>) -> Self {
69
+
use jacquard_common::IntoStatic;
70
+
output.value.into_static()
71
+
}
34
72
}
+38
crates/jacquard-api/src/dev_ocbwoy3/blueboard/post.rs
+38
crates/jacquard-api/src/dev_ocbwoy3/blueboard/post.rs
···
31
31
pub text: jacquard_common::CowStr<'a>,
32
32
}
33
33
34
+
/// Typed wrapper for GetRecord response with this collection's record type.
35
+
#[derive(
36
+
serde::Serialize,
37
+
serde::Deserialize,
38
+
Debug,
39
+
Clone,
40
+
PartialEq,
41
+
Eq,
42
+
jacquard_derive::IntoStatic
43
+
)]
44
+
#[serde(rename_all = "camelCase")]
45
+
pub struct PostGetRecordOutput<'a> {
46
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
47
+
#[serde(borrow)]
48
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
49
+
#[serde(borrow)]
50
+
pub uri: jacquard_common::types::string::AtUri<'a>,
51
+
#[serde(borrow)]
52
+
pub value: Post<'a>,
53
+
}
54
+
55
+
/// Marker type for deserializing records from this collection.
56
+
pub struct PostRecord;
57
+
impl jacquard_common::xrpc::XrpcResp for PostRecord {
58
+
const NSID: &'static str = "dev.ocbwoy3.blueboard.post";
59
+
const ENCODING: &'static str = "application/json";
60
+
type Output<'de> = PostGetRecordOutput<'de>;
61
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
62
+
}
63
+
34
64
impl jacquard_common::types::collection::Collection for Post<'_> {
35
65
const NSID: &'static str = "dev.ocbwoy3.blueboard.post";
66
+
type Record = PostRecord;
67
+
}
68
+
69
+
impl From<PostGetRecordOutput<'_>> for Post<'static> {
70
+
fn from(output: PostGetRecordOutput<'_>) -> Self {
71
+
use jacquard_common::IntoStatic;
72
+
output.value.into_static()
73
+
}
36
74
}
+38
crates/jacquard-api/src/dev_regnault/webfishing/savefile.rs
+38
crates/jacquard-api/src/dev_regnault/webfishing/savefile.rs
···
24
24
pub uri: jacquard_common::types::string::AtUri<'a>,
25
25
}
26
26
27
+
/// Typed wrapper for GetRecord response with this collection's record type.
28
+
#[derive(
29
+
serde::Serialize,
30
+
serde::Deserialize,
31
+
Debug,
32
+
Clone,
33
+
PartialEq,
34
+
Eq,
35
+
jacquard_derive::IntoStatic
36
+
)]
37
+
#[serde(rename_all = "camelCase")]
38
+
pub struct SavefileGetRecordOutput<'a> {
39
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
40
+
#[serde(borrow)]
41
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
42
+
#[serde(borrow)]
43
+
pub uri: jacquard_common::types::string::AtUri<'a>,
44
+
#[serde(borrow)]
45
+
pub value: Savefile<'a>,
46
+
}
47
+
48
+
/// Marker type for deserializing records from this collection.
49
+
pub struct SavefileRecord;
50
+
impl jacquard_common::xrpc::XrpcResp for SavefileRecord {
51
+
const NSID: &'static str = "dev.regnault.webfishing.savefile";
52
+
const ENCODING: &'static str = "application/json";
53
+
type Output<'de> = SavefileGetRecordOutput<'de>;
54
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
55
+
}
56
+
27
57
impl jacquard_common::types::collection::Collection for Savefile<'_> {
28
58
const NSID: &'static str = "dev.regnault.webfishing.savefile";
59
+
type Record = SavefileRecord;
60
+
}
61
+
62
+
impl From<SavefileGetRecordOutput<'_>> for Savefile<'static> {
63
+
fn from(output: SavefileGetRecordOutput<'_>) -> Self {
64
+
use jacquard_common::IntoStatic;
65
+
output.value.into_static()
66
+
}
29
67
}
+38
crates/jacquard-api/src/fyi_unravel/frontpage/comment.rs
+38
crates/jacquard-api/src/fyi_unravel/frontpage/comment.rs
···
30
30
pub post: crate::com_atproto::repo::strong_ref::StrongRef<'a>,
31
31
}
32
32
33
+
/// Typed wrapper for GetRecord response with this collection's record type.
34
+
#[derive(
35
+
serde::Serialize,
36
+
serde::Deserialize,
37
+
Debug,
38
+
Clone,
39
+
PartialEq,
40
+
Eq,
41
+
jacquard_derive::IntoStatic
42
+
)]
43
+
#[serde(rename_all = "camelCase")]
44
+
pub struct CommentGetRecordOutput<'a> {
45
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
46
+
#[serde(borrow)]
47
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
48
+
#[serde(borrow)]
49
+
pub uri: jacquard_common::types::string::AtUri<'a>,
50
+
#[serde(borrow)]
51
+
pub value: Comment<'a>,
52
+
}
53
+
54
+
/// Marker type for deserializing records from this collection.
55
+
pub struct CommentRecord;
56
+
impl jacquard_common::xrpc::XrpcResp for CommentRecord {
57
+
const NSID: &'static str = "fyi.unravel.frontpage.comment";
58
+
const ENCODING: &'static str = "application/json";
59
+
type Output<'de> = CommentGetRecordOutput<'de>;
60
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
61
+
}
62
+
33
63
impl jacquard_common::types::collection::Collection for Comment<'_> {
34
64
const NSID: &'static str = "fyi.unravel.frontpage.comment";
65
+
type Record = CommentRecord;
66
+
}
67
+
68
+
impl From<CommentGetRecordOutput<'_>> for Comment<'static> {
69
+
fn from(output: CommentGetRecordOutput<'_>) -> Self {
70
+
use jacquard_common::IntoStatic;
71
+
output.value.into_static()
72
+
}
35
73
}
+38
crates/jacquard-api/src/fyi_unravel/frontpage/post.rs
+38
crates/jacquard-api/src/fyi_unravel/frontpage/post.rs
···
28
28
pub url: jacquard_common::types::string::Uri<'a>,
29
29
}
30
30
31
+
/// Typed wrapper for GetRecord response with this collection's record type.
32
+
#[derive(
33
+
serde::Serialize,
34
+
serde::Deserialize,
35
+
Debug,
36
+
Clone,
37
+
PartialEq,
38
+
Eq,
39
+
jacquard_derive::IntoStatic
40
+
)]
41
+
#[serde(rename_all = "camelCase")]
42
+
pub struct PostGetRecordOutput<'a> {
43
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
44
+
#[serde(borrow)]
45
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
46
+
#[serde(borrow)]
47
+
pub uri: jacquard_common::types::string::AtUri<'a>,
48
+
#[serde(borrow)]
49
+
pub value: Post<'a>,
50
+
}
51
+
52
+
/// Marker type for deserializing records from this collection.
53
+
pub struct PostRecord;
54
+
impl jacquard_common::xrpc::XrpcResp for PostRecord {
55
+
const NSID: &'static str = "fyi.unravel.frontpage.post";
56
+
const ENCODING: &'static str = "application/json";
57
+
type Output<'de> = PostGetRecordOutput<'de>;
58
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
59
+
}
60
+
31
61
impl jacquard_common::types::collection::Collection for Post<'_> {
32
62
const NSID: &'static str = "fyi.unravel.frontpage.post";
63
+
type Record = PostRecord;
64
+
}
65
+
66
+
impl From<PostGetRecordOutput<'_>> for Post<'static> {
67
+
fn from(output: PostGetRecordOutput<'_>) -> Self {
68
+
use jacquard_common::IntoStatic;
69
+
output.value.into_static()
70
+
}
33
71
}
+38
crates/jacquard-api/src/fyi_unravel/frontpage/vote.rs
+38
crates/jacquard-api/src/fyi_unravel/frontpage/vote.rs
···
24
24
pub subject: crate::com_atproto::repo::strong_ref::StrongRef<'a>,
25
25
}
26
26
27
+
/// Typed wrapper for GetRecord response with this collection's record type.
28
+
#[derive(
29
+
serde::Serialize,
30
+
serde::Deserialize,
31
+
Debug,
32
+
Clone,
33
+
PartialEq,
34
+
Eq,
35
+
jacquard_derive::IntoStatic
36
+
)]
37
+
#[serde(rename_all = "camelCase")]
38
+
pub struct VoteGetRecordOutput<'a> {
39
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
40
+
#[serde(borrow)]
41
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
42
+
#[serde(borrow)]
43
+
pub uri: jacquard_common::types::string::AtUri<'a>,
44
+
#[serde(borrow)]
45
+
pub value: Vote<'a>,
46
+
}
47
+
48
+
/// Marker type for deserializing records from this collection.
49
+
pub struct VoteRecord;
50
+
impl jacquard_common::xrpc::XrpcResp for VoteRecord {
51
+
const NSID: &'static str = "fyi.unravel.frontpage.vote";
52
+
const ENCODING: &'static str = "application/json";
53
+
type Output<'de> = VoteGetRecordOutput<'de>;
54
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
55
+
}
56
+
27
57
impl jacquard_common::types::collection::Collection for Vote<'_> {
28
58
const NSID: &'static str = "fyi.unravel.frontpage.vote";
59
+
type Record = VoteRecord;
60
+
}
61
+
62
+
impl From<VoteGetRecordOutput<'_>> for Vote<'static> {
63
+
fn from(output: VoteGetRecordOutput<'_>) -> Self {
64
+
use jacquard_common::IntoStatic;
65
+
output.value.into_static()
66
+
}
29
67
}
+38
crates/jacquard-api/src/moe_karashiiro/kpaste/paste.rs
+38
crates/jacquard-api/src/moe_karashiiro/kpaste/paste.rs
···
35
35
pub updated_at: std::option::Option<jacquard_common::types::string::Datetime>,
36
36
}
37
37
38
+
/// Typed wrapper for GetRecord response with this collection's record type.
39
+
#[derive(
40
+
serde::Serialize,
41
+
serde::Deserialize,
42
+
Debug,
43
+
Clone,
44
+
PartialEq,
45
+
Eq,
46
+
jacquard_derive::IntoStatic
47
+
)]
48
+
#[serde(rename_all = "camelCase")]
49
+
pub struct PasteGetRecordOutput<'a> {
50
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
51
+
#[serde(borrow)]
52
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
53
+
#[serde(borrow)]
54
+
pub uri: jacquard_common::types::string::AtUri<'a>,
55
+
#[serde(borrow)]
56
+
pub value: Paste<'a>,
57
+
}
58
+
59
+
/// Marker type for deserializing records from this collection.
60
+
pub struct PasteRecord;
61
+
impl jacquard_common::xrpc::XrpcResp for PasteRecord {
62
+
const NSID: &'static str = "moe.karashiiro.kpaste.paste";
63
+
const ENCODING: &'static str = "application/json";
64
+
type Output<'de> = PasteGetRecordOutput<'de>;
65
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
66
+
}
67
+
38
68
impl jacquard_common::types::collection::Collection for Paste<'_> {
39
69
const NSID: &'static str = "moe.karashiiro.kpaste.paste";
70
+
type Record = PasteRecord;
71
+
}
72
+
73
+
impl From<PasteGetRecordOutput<'_>> for Paste<'static> {
74
+
fn from(output: PasteGetRecordOutput<'_>) -> Self {
75
+
use jacquard_common::IntoStatic;
76
+
output.value.into_static()
77
+
}
40
78
}
+38
crates/jacquard-api/src/my_skylights/rel.rs
+38
crates/jacquard-api/src/my_skylights/rel.rs
···
29
29
pub rating: std::option::Option<crate::my_skylights::rel::Rating<'a>>,
30
30
}
31
31
32
+
/// Typed wrapper for GetRecord response with this collection's record type.
33
+
#[derive(
34
+
serde::Serialize,
35
+
serde::Deserialize,
36
+
Debug,
37
+
Clone,
38
+
PartialEq,
39
+
Eq,
40
+
jacquard_derive::IntoStatic
41
+
)]
42
+
#[serde(rename_all = "camelCase")]
43
+
pub struct RelGetRecordOutput<'a> {
44
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
45
+
#[serde(borrow)]
46
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
47
+
#[serde(borrow)]
48
+
pub uri: jacquard_common::types::string::AtUri<'a>,
49
+
#[serde(borrow)]
50
+
pub value: Rel<'a>,
51
+
}
52
+
53
+
/// Marker type for deserializing records from this collection.
54
+
pub struct RelRecord;
55
+
impl jacquard_common::xrpc::XrpcResp for RelRecord {
56
+
const NSID: &'static str = "my.skylights.rel";
57
+
const ENCODING: &'static str = "application/json";
58
+
type Output<'de> = RelGetRecordOutput<'de>;
59
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
60
+
}
61
+
32
62
impl jacquard_common::types::collection::Collection for Rel<'_> {
33
63
const NSID: &'static str = "my.skylights.rel";
64
+
type Record = RelRecord;
65
+
}
66
+
67
+
impl From<RelGetRecordOutput<'_>> for Rel<'static> {
68
+
fn from(output: RelGetRecordOutput<'_>) -> Self {
69
+
use jacquard_common::IntoStatic;
70
+
output.value.into_static()
71
+
}
34
72
}
35
73
36
74
#[jacquard_derive::lexicon]
+38
crates/jacquard-api/src/net_aftertheinter/coolthingtwo.rs
+38
crates/jacquard-api/src/net_aftertheinter/coolthingtwo.rs
···
22
22
pub status: jacquard_common::CowStr<'a>,
23
23
}
24
24
25
+
/// Typed wrapper for GetRecord response with this collection's record type.
26
+
#[derive(
27
+
serde::Serialize,
28
+
serde::Deserialize,
29
+
Debug,
30
+
Clone,
31
+
PartialEq,
32
+
Eq,
33
+
jacquard_derive::IntoStatic
34
+
)]
35
+
#[serde(rename_all = "camelCase")]
36
+
pub struct CoolthingtwoGetRecordOutput<'a> {
37
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
38
+
#[serde(borrow)]
39
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
40
+
#[serde(borrow)]
41
+
pub uri: jacquard_common::types::string::AtUri<'a>,
42
+
#[serde(borrow)]
43
+
pub value: Coolthingtwo<'a>,
44
+
}
45
+
46
+
/// Marker type for deserializing records from this collection.
47
+
pub struct CoolthingtwoRecord;
48
+
impl jacquard_common::xrpc::XrpcResp for CoolthingtwoRecord {
49
+
const NSID: &'static str = "net.aftertheinter.coolthingtwo";
50
+
const ENCODING: &'static str = "application/json";
51
+
type Output<'de> = CoolthingtwoGetRecordOutput<'de>;
52
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
53
+
}
54
+
25
55
impl jacquard_common::types::collection::Collection for Coolthingtwo<'_> {
26
56
const NSID: &'static str = "net.aftertheinter.coolthingtwo";
57
+
type Record = CoolthingtwoRecord;
58
+
}
59
+
60
+
impl From<CoolthingtwoGetRecordOutput<'_>> for Coolthingtwo<'static> {
61
+
fn from(output: CoolthingtwoGetRecordOutput<'_>) -> Self {
62
+
use jacquard_common::IntoStatic;
63
+
output.value.into_static()
64
+
}
27
65
}
+38
crates/jacquard-api/src/net_anisota/beta/game/collection.rs
+38
crates/jacquard-api/src/net_anisota/beta/game/collection.rs
···
81
81
pub status: std::option::Option<jacquard_common::CowStr<'a>>,
82
82
}
83
83
84
+
/// Typed wrapper for GetRecord response with this collection's record type.
85
+
#[derive(
86
+
serde::Serialize,
87
+
serde::Deserialize,
88
+
Debug,
89
+
Clone,
90
+
PartialEq,
91
+
Eq,
92
+
jacquard_derive::IntoStatic
93
+
)]
94
+
#[serde(rename_all = "camelCase")]
95
+
pub struct CollectionGetRecordOutput<'a> {
96
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
97
+
#[serde(borrow)]
98
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
99
+
#[serde(borrow)]
100
+
pub uri: jacquard_common::types::string::AtUri<'a>,
101
+
#[serde(borrow)]
102
+
pub value: Collection<'a>,
103
+
}
104
+
105
+
/// Marker type for deserializing records from this collection.
106
+
pub struct CollectionRecord;
107
+
impl jacquard_common::xrpc::XrpcResp for CollectionRecord {
108
+
const NSID: &'static str = "net.anisota.beta.game.collection";
109
+
const ENCODING: &'static str = "application/json";
110
+
type Output<'de> = CollectionGetRecordOutput<'de>;
111
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
112
+
}
113
+
84
114
impl jacquard_common::types::collection::Collection for Collection<'_> {
85
115
const NSID: &'static str = "net.anisota.beta.game.collection";
116
+
type Record = CollectionRecord;
117
+
}
118
+
119
+
impl From<CollectionGetRecordOutput<'_>> for Collection<'static> {
120
+
fn from(output: CollectionGetRecordOutput<'_>) -> Self {
121
+
use jacquard_common::IntoStatic;
122
+
output.value.into_static()
123
+
}
86
124
}
87
125
88
126
///Additional details about how the specimen was acquired
+38
crates/jacquard-api/src/net_anisota/beta/game/inventory.rs
+38
crates/jacquard-api/src/net_anisota/beta/game/inventory.rs
···
70
70
pub stackable: std::option::Option<bool>,
71
71
}
72
72
73
+
/// Typed wrapper for GetRecord response with this collection's record type.
74
+
#[derive(
75
+
serde::Serialize,
76
+
serde::Deserialize,
77
+
Debug,
78
+
Clone,
79
+
PartialEq,
80
+
Eq,
81
+
jacquard_derive::IntoStatic
82
+
)]
83
+
#[serde(rename_all = "camelCase")]
84
+
pub struct InventoryGetRecordOutput<'a> {
85
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
86
+
#[serde(borrow)]
87
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
88
+
#[serde(borrow)]
89
+
pub uri: jacquard_common::types::string::AtUri<'a>,
90
+
#[serde(borrow)]
91
+
pub value: Inventory<'a>,
92
+
}
93
+
94
+
/// Marker type for deserializing records from this collection.
95
+
pub struct InventoryRecord;
96
+
impl jacquard_common::xrpc::XrpcResp for InventoryRecord {
97
+
const NSID: &'static str = "net.anisota.beta.game.inventory";
98
+
const ENCODING: &'static str = "application/json";
99
+
type Output<'de> = InventoryGetRecordOutput<'de>;
100
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
101
+
}
102
+
73
103
impl jacquard_common::types::collection::Collection for Inventory<'_> {
74
104
const NSID: &'static str = "net.anisota.beta.game.inventory";
105
+
type Record = InventoryRecord;
106
+
}
107
+
108
+
impl From<InventoryGetRecordOutput<'_>> for Inventory<'static> {
109
+
fn from(output: InventoryGetRecordOutput<'_>) -> Self {
110
+
use jacquard_common::IntoStatic;
111
+
output.value.into_static()
112
+
}
75
113
}
76
114
77
115
///Additional details about how the item was acquired
+38
crates/jacquard-api/src/net_anisota/beta/game/log.rs
+38
crates/jacquard-api/src/net_anisota/beta/game/log.rs
···
246
246
pub timestamp: jacquard_common::types::string::Datetime,
247
247
}
248
248
249
+
/// Typed wrapper for GetRecord response with this collection's record type.
250
+
#[derive(
251
+
serde::Serialize,
252
+
serde::Deserialize,
253
+
Debug,
254
+
Clone,
255
+
PartialEq,
256
+
Eq,
257
+
jacquard_derive::IntoStatic
258
+
)]
259
+
#[serde(rename_all = "camelCase")]
260
+
pub struct LogGetRecordOutput<'a> {
261
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
262
+
#[serde(borrow)]
263
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
264
+
#[serde(borrow)]
265
+
pub uri: jacquard_common::types::string::AtUri<'a>,
266
+
#[serde(borrow)]
267
+
pub value: Log<'a>,
268
+
}
269
+
270
+
/// Marker type for deserializing records from this collection.
271
+
pub struct LogRecord;
272
+
impl jacquard_common::xrpc::XrpcResp for LogRecord {
273
+
const NSID: &'static str = "net.anisota.beta.game.log";
274
+
const ENCODING: &'static str = "application/json";
275
+
type Output<'de> = LogGetRecordOutput<'de>;
276
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
277
+
}
278
+
249
279
impl jacquard_common::types::collection::Collection for Log<'_> {
250
280
const NSID: &'static str = "net.anisota.beta.game.log";
281
+
type Record = LogRecord;
282
+
}
283
+
284
+
impl From<LogGetRecordOutput<'_>> for Log<'static> {
285
+
fn from(output: LogGetRecordOutput<'_>) -> Self {
286
+
use jacquard_common::IntoStatic;
287
+
output.value.into_static()
288
+
}
251
289
}
252
290
253
291
///Additional event-specific metadata
+38
crates/jacquard-api/src/net_anisota/beta/game/pack.rs
+38
crates/jacquard-api/src/net_anisota/beta/game/pack.rs
···
40
40
pub total_opens: i64,
41
41
}
42
42
43
+
/// Typed wrapper for GetRecord response with this collection's record type.
44
+
#[derive(
45
+
serde::Serialize,
46
+
serde::Deserialize,
47
+
Debug,
48
+
Clone,
49
+
PartialEq,
50
+
Eq,
51
+
jacquard_derive::IntoStatic
52
+
)]
53
+
#[serde(rename_all = "camelCase")]
54
+
pub struct PackGetRecordOutput<'a> {
55
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
56
+
#[serde(borrow)]
57
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
58
+
#[serde(borrow)]
59
+
pub uri: jacquard_common::types::string::AtUri<'a>,
60
+
#[serde(borrow)]
61
+
pub value: Pack<'a>,
62
+
}
63
+
64
+
/// Marker type for deserializing records from this collection.
65
+
pub struct PackRecord;
66
+
impl jacquard_common::xrpc::XrpcResp for PackRecord {
67
+
const NSID: &'static str = "net.anisota.beta.game.pack";
68
+
const ENCODING: &'static str = "application/json";
69
+
type Output<'de> = PackGetRecordOutput<'de>;
70
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
71
+
}
72
+
43
73
impl jacquard_common::types::collection::Collection for Pack<'_> {
44
74
const NSID: &'static str = "net.anisota.beta.game.pack";
75
+
type Record = PackRecord;
76
+
}
77
+
78
+
impl From<PackGetRecordOutput<'_>> for Pack<'static> {
79
+
fn from(output: PackGetRecordOutput<'_>) -> Self {
80
+
use jacquard_common::IntoStatic;
81
+
output.value.into_static()
82
+
}
45
83
}
46
84
47
85
///A single pack opening entry in the history
+38
crates/jacquard-api/src/net_anisota/beta/game/progress.rs
+38
crates/jacquard-api/src/net_anisota/beta/game/progress.rs
···
69
69
pub xp_to_next_level: i64,
70
70
}
71
71
72
+
/// Typed wrapper for GetRecord response with this collection's record type.
73
+
#[derive(
74
+
serde::Serialize,
75
+
serde::Deserialize,
76
+
Debug,
77
+
Clone,
78
+
PartialEq,
79
+
Eq,
80
+
jacquard_derive::IntoStatic
81
+
)]
82
+
#[serde(rename_all = "camelCase")]
83
+
pub struct ProgressGetRecordOutput<'a> {
84
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
85
+
#[serde(borrow)]
86
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
87
+
#[serde(borrow)]
88
+
pub uri: jacquard_common::types::string::AtUri<'a>,
89
+
#[serde(borrow)]
90
+
pub value: Progress<'a>,
91
+
}
92
+
93
+
/// Marker type for deserializing records from this collection.
94
+
pub struct ProgressRecord;
95
+
impl jacquard_common::xrpc::XrpcResp for ProgressRecord {
96
+
const NSID: &'static str = "net.anisota.beta.game.progress";
97
+
const ENCODING: &'static str = "application/json";
98
+
type Output<'de> = ProgressGetRecordOutput<'de>;
99
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
100
+
}
101
+
72
102
impl jacquard_common::types::collection::Collection for Progress<'_> {
73
103
const NSID: &'static str = "net.anisota.beta.game.progress";
104
+
type Record = ProgressRecord;
105
+
}
106
+
107
+
impl From<ProgressGetRecordOutput<'_>> for Progress<'static> {
108
+
fn from(output: ProgressGetRecordOutput<'_>) -> Self {
109
+
use jacquard_common::IntoStatic;
110
+
output.value.into_static()
111
+
}
74
112
}
75
113
76
114
///Additional metadata about this progress update
+38
crates/jacquard-api/src/net_anisota/beta/game/session.rs
+38
crates/jacquard-api/src/net_anisota/beta/game/session.rs
···
144
144
pub updated_at: std::option::Option<jacquard_common::types::string::Datetime>,
145
145
}
146
146
147
+
/// Typed wrapper for GetRecord response with this collection's record type.
148
+
#[derive(
149
+
serde::Serialize,
150
+
serde::Deserialize,
151
+
Debug,
152
+
Clone,
153
+
PartialEq,
154
+
Eq,
155
+
jacquard_derive::IntoStatic
156
+
)]
157
+
#[serde(rename_all = "camelCase")]
158
+
pub struct SessionGetRecordOutput<'a> {
159
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
160
+
#[serde(borrow)]
161
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
162
+
#[serde(borrow)]
163
+
pub uri: jacquard_common::types::string::AtUri<'a>,
164
+
#[serde(borrow)]
165
+
pub value: Session<'a>,
166
+
}
167
+
168
+
/// Marker type for deserializing records from this collection.
169
+
pub struct SessionRecord;
170
+
impl jacquard_common::xrpc::XrpcResp for SessionRecord {
171
+
const NSID: &'static str = "net.anisota.beta.game.session";
172
+
const ENCODING: &'static str = "application/json";
173
+
type Output<'de> = SessionGetRecordOutput<'de>;
174
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
175
+
}
176
+
147
177
impl jacquard_common::types::collection::Collection for Session<'_> {
148
178
const NSID: &'static str = "net.anisota.beta.game.session";
179
+
type Record = SessionRecord;
180
+
}
181
+
182
+
impl From<SessionGetRecordOutput<'_>> for Session<'static> {
183
+
fn from(output: SessionGetRecordOutput<'_>) -> Self {
184
+
use jacquard_common::IntoStatic;
185
+
output.value.into_static()
186
+
}
149
187
}
150
188
151
189
///Additional session metadata
+38
crates/jacquard-api/src/net_anisota/feed/draft.rs
+38
crates/jacquard-api/src/net_anisota/feed/draft.rs
···
74
74
RecordWithMedia(Box<crate::app_bsky::embed::record_with_media::RecordWithMedia<'a>>),
75
75
}
76
76
77
+
/// Typed wrapper for GetRecord response with this collection's record type.
78
+
#[derive(
79
+
serde::Serialize,
80
+
serde::Deserialize,
81
+
Debug,
82
+
Clone,
83
+
PartialEq,
84
+
Eq,
85
+
jacquard_derive::IntoStatic
86
+
)]
87
+
#[serde(rename_all = "camelCase")]
88
+
pub struct DraftGetRecordOutput<'a> {
89
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
90
+
#[serde(borrow)]
91
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
92
+
#[serde(borrow)]
93
+
pub uri: jacquard_common::types::string::AtUri<'a>,
94
+
#[serde(borrow)]
95
+
pub value: Draft<'a>,
96
+
}
97
+
98
+
/// Marker type for deserializing records from this collection.
99
+
pub struct DraftRecord;
100
+
impl jacquard_common::xrpc::XrpcResp for DraftRecord {
101
+
const NSID: &'static str = "net.anisota.feed.draft";
102
+
const ENCODING: &'static str = "application/json";
103
+
type Output<'de> = DraftGetRecordOutput<'de>;
104
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
105
+
}
106
+
77
107
impl jacquard_common::types::collection::Collection for Draft<'_> {
78
108
const NSID: &'static str = "net.anisota.feed.draft";
109
+
type Record = DraftRecord;
110
+
}
111
+
112
+
impl From<DraftGetRecordOutput<'_>> for Draft<'static> {
113
+
fn from(output: DraftGetRecordOutput<'_>) -> Self {
114
+
use jacquard_common::IntoStatic;
115
+
output.value.into_static()
116
+
}
79
117
}
80
118
81
119
#[jacquard_derive::lexicon]
+38
crates/jacquard-api/src/net_anisota/feed/like.rs
+38
crates/jacquard-api/src/net_anisota/feed/like.rs
···
25
25
pub subject: crate::com_atproto::repo::strong_ref::StrongRef<'a>,
26
26
}
27
27
28
+
/// Typed wrapper for GetRecord response with this collection's record type.
29
+
#[derive(
30
+
serde::Serialize,
31
+
serde::Deserialize,
32
+
Debug,
33
+
Clone,
34
+
PartialEq,
35
+
Eq,
36
+
jacquard_derive::IntoStatic
37
+
)]
38
+
#[serde(rename_all = "camelCase")]
39
+
pub struct LikeGetRecordOutput<'a> {
40
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
41
+
#[serde(borrow)]
42
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
43
+
#[serde(borrow)]
44
+
pub uri: jacquard_common::types::string::AtUri<'a>,
45
+
#[serde(borrow)]
46
+
pub value: Like<'a>,
47
+
}
48
+
49
+
/// Marker type for deserializing records from this collection.
50
+
pub struct LikeRecord;
51
+
impl jacquard_common::xrpc::XrpcResp for LikeRecord {
52
+
const NSID: &'static str = "net.anisota.feed.like";
53
+
const ENCODING: &'static str = "application/json";
54
+
type Output<'de> = LikeGetRecordOutput<'de>;
55
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
56
+
}
57
+
28
58
impl jacquard_common::types::collection::Collection for Like<'_> {
29
59
const NSID: &'static str = "net.anisota.feed.like";
60
+
type Record = LikeRecord;
61
+
}
62
+
63
+
impl From<LikeGetRecordOutput<'_>> for Like<'static> {
64
+
fn from(output: LikeGetRecordOutput<'_>) -> Self {
65
+
use jacquard_common::IntoStatic;
66
+
output.value.into_static()
67
+
}
30
68
}
+38
crates/jacquard-api/src/net_anisota/feed/list.rs
+38
crates/jacquard-api/src/net_anisota/feed/list.rs
···
37
37
pub tags: std::option::Option<Vec<jacquard_common::CowStr<'a>>>,
38
38
}
39
39
40
+
/// Typed wrapper for GetRecord response with this collection's record type.
41
+
#[derive(
42
+
serde::Serialize,
43
+
serde::Deserialize,
44
+
Debug,
45
+
Clone,
46
+
PartialEq,
47
+
Eq,
48
+
jacquard_derive::IntoStatic
49
+
)]
50
+
#[serde(rename_all = "camelCase")]
51
+
pub struct ListGetRecordOutput<'a> {
52
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
53
+
#[serde(borrow)]
54
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
55
+
#[serde(borrow)]
56
+
pub uri: jacquard_common::types::string::AtUri<'a>,
57
+
#[serde(borrow)]
58
+
pub value: List<'a>,
59
+
}
60
+
61
+
/// Marker type for deserializing records from this collection.
62
+
pub struct ListRecord;
63
+
impl jacquard_common::xrpc::XrpcResp for ListRecord {
64
+
const NSID: &'static str = "net.anisota.feed.list";
65
+
const ENCODING: &'static str = "application/json";
66
+
type Output<'de> = ListGetRecordOutput<'de>;
67
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
68
+
}
69
+
40
70
impl jacquard_common::types::collection::Collection for List<'_> {
41
71
const NSID: &'static str = "net.anisota.feed.list";
72
+
type Record = ListRecord;
73
+
}
74
+
75
+
impl From<ListGetRecordOutput<'_>> for List<'static> {
76
+
fn from(output: ListGetRecordOutput<'_>) -> Self {
77
+
use jacquard_common::IntoStatic;
78
+
output.value.into_static()
79
+
}
42
80
}
+38
crates/jacquard-api/src/net_anisota/feed/list_item.rs
+38
crates/jacquard-api/src/net_anisota/feed/list_item.rs
···
28
28
pub subject: jacquard_common::types::string::AtUri<'a>,
29
29
}
30
30
31
+
/// Typed wrapper for GetRecord response with this collection's record type.
32
+
#[derive(
33
+
serde::Serialize,
34
+
serde::Deserialize,
35
+
Debug,
36
+
Clone,
37
+
PartialEq,
38
+
Eq,
39
+
jacquard_derive::IntoStatic
40
+
)]
41
+
#[serde(rename_all = "camelCase")]
42
+
pub struct ListItemGetRecordOutput<'a> {
43
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
44
+
#[serde(borrow)]
45
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
46
+
#[serde(borrow)]
47
+
pub uri: jacquard_common::types::string::AtUri<'a>,
48
+
#[serde(borrow)]
49
+
pub value: ListItem<'a>,
50
+
}
51
+
52
+
/// Marker type for deserializing records from this collection.
53
+
pub struct ListItemRecord;
54
+
impl jacquard_common::xrpc::XrpcResp for ListItemRecord {
55
+
const NSID: &'static str = "net.anisota.feed.listItem";
56
+
const ENCODING: &'static str = "application/json";
57
+
type Output<'de> = ListItemGetRecordOutput<'de>;
58
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
59
+
}
60
+
31
61
impl jacquard_common::types::collection::Collection for ListItem<'_> {
32
62
const NSID: &'static str = "net.anisota.feed.listItem";
63
+
type Record = ListItemRecord;
64
+
}
65
+
66
+
impl From<ListItemGetRecordOutput<'_>> for ListItem<'static> {
67
+
fn from(output: ListItemGetRecordOutput<'_>) -> Self {
68
+
use jacquard_common::IntoStatic;
69
+
output.value.into_static()
70
+
}
33
71
}
+38
crates/jacquard-api/src/net_anisota/feed/post.rs
+38
crates/jacquard-api/src/net_anisota/feed/post.rs
···
71
71
RecordWithMedia(Box<crate::app_bsky::embed::record_with_media::RecordWithMedia<'a>>),
72
72
}
73
73
74
+
/// Typed wrapper for GetRecord response with this collection's record type.
75
+
#[derive(
76
+
serde::Serialize,
77
+
serde::Deserialize,
78
+
Debug,
79
+
Clone,
80
+
PartialEq,
81
+
Eq,
82
+
jacquard_derive::IntoStatic
83
+
)]
84
+
#[serde(rename_all = "camelCase")]
85
+
pub struct PostGetRecordOutput<'a> {
86
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
87
+
#[serde(borrow)]
88
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
89
+
#[serde(borrow)]
90
+
pub uri: jacquard_common::types::string::AtUri<'a>,
91
+
#[serde(borrow)]
92
+
pub value: Post<'a>,
93
+
}
94
+
95
+
/// Marker type for deserializing records from this collection.
96
+
pub struct PostRecord;
97
+
impl jacquard_common::xrpc::XrpcResp for PostRecord {
98
+
const NSID: &'static str = "net.anisota.feed.post";
99
+
const ENCODING: &'static str = "application/json";
100
+
type Output<'de> = PostGetRecordOutput<'de>;
101
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
102
+
}
103
+
74
104
impl jacquard_common::types::collection::Collection for Post<'_> {
75
105
const NSID: &'static str = "net.anisota.feed.post";
106
+
type Record = PostRecord;
107
+
}
108
+
109
+
impl From<PostGetRecordOutput<'_>> for Post<'static> {
110
+
fn from(output: PostGetRecordOutput<'_>) -> Self {
111
+
use jacquard_common::IntoStatic;
112
+
output.value.into_static()
113
+
}
76
114
}
77
115
78
116
#[jacquard_derive::lexicon]
+38
crates/jacquard-api/src/net_anisota/feed/repost.rs
+38
crates/jacquard-api/src/net_anisota/feed/repost.rs
···
25
25
pub subject: crate::com_atproto::repo::strong_ref::StrongRef<'a>,
26
26
}
27
27
28
+
/// Typed wrapper for GetRecord response with this collection's record type.
29
+
#[derive(
30
+
serde::Serialize,
31
+
serde::Deserialize,
32
+
Debug,
33
+
Clone,
34
+
PartialEq,
35
+
Eq,
36
+
jacquard_derive::IntoStatic
37
+
)]
38
+
#[serde(rename_all = "camelCase")]
39
+
pub struct RepostGetRecordOutput<'a> {
40
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
41
+
#[serde(borrow)]
42
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
43
+
#[serde(borrow)]
44
+
pub uri: jacquard_common::types::string::AtUri<'a>,
45
+
#[serde(borrow)]
46
+
pub value: Repost<'a>,
47
+
}
48
+
49
+
/// Marker type for deserializing records from this collection.
50
+
pub struct RepostRecord;
51
+
impl jacquard_common::xrpc::XrpcResp for RepostRecord {
52
+
const NSID: &'static str = "net.anisota.feed.repost";
53
+
const ENCODING: &'static str = "application/json";
54
+
type Output<'de> = RepostGetRecordOutput<'de>;
55
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
56
+
}
57
+
28
58
impl jacquard_common::types::collection::Collection for Repost<'_> {
29
59
const NSID: &'static str = "net.anisota.feed.repost";
60
+
type Record = RepostRecord;
61
+
}
62
+
63
+
impl From<RepostGetRecordOutput<'_>> for Repost<'static> {
64
+
fn from(output: RepostGetRecordOutput<'_>) -> Self {
65
+
use jacquard_common::IntoStatic;
66
+
output.value.into_static()
67
+
}
30
68
}
+38
crates/jacquard-api/src/net_anisota/graph/list_mute.rs
+38
crates/jacquard-api/src/net_anisota/graph/list_mute.rs
···
71
71
>,
72
72
}
73
73
74
+
/// Typed wrapper for GetRecord response with this collection's record type.
75
+
#[derive(
76
+
serde::Serialize,
77
+
serde::Deserialize,
78
+
Debug,
79
+
Clone,
80
+
PartialEq,
81
+
Eq,
82
+
jacquard_derive::IntoStatic
83
+
)]
84
+
#[serde(rename_all = "camelCase")]
85
+
pub struct ListMuteGetRecordOutput<'a> {
86
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
87
+
#[serde(borrow)]
88
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
89
+
#[serde(borrow)]
90
+
pub uri: jacquard_common::types::string::AtUri<'a>,
91
+
#[serde(borrow)]
92
+
pub value: ListMute<'a>,
93
+
}
94
+
95
+
/// Marker type for deserializing records from this collection.
96
+
pub struct ListMuteRecord;
97
+
impl jacquard_common::xrpc::XrpcResp for ListMuteRecord {
98
+
const NSID: &'static str = "net.anisota.graph.listMute";
99
+
const ENCODING: &'static str = "application/json";
100
+
type Output<'de> = ListMuteGetRecordOutput<'de>;
101
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
102
+
}
103
+
74
104
impl jacquard_common::types::collection::Collection for ListMute<'_> {
75
105
const NSID: &'static str = "net.anisota.graph.listMute";
106
+
type Record = ListMuteRecord;
107
+
}
108
+
109
+
impl From<ListMuteGetRecordOutput<'_>> for ListMute<'static> {
110
+
fn from(output: ListMuteGetRecordOutput<'_>) -> Self {
111
+
use jacquard_common::IntoStatic;
112
+
output.value.into_static()
113
+
}
76
114
}
+38
crates/jacquard-api/src/net_anisota/graph/mute.rs
+38
crates/jacquard-api/src/net_anisota/graph/mute.rs
···
71
71
>,
72
72
}
73
73
74
+
/// Typed wrapper for GetRecord response with this collection's record type.
75
+
#[derive(
76
+
serde::Serialize,
77
+
serde::Deserialize,
78
+
Debug,
79
+
Clone,
80
+
PartialEq,
81
+
Eq,
82
+
jacquard_derive::IntoStatic
83
+
)]
84
+
#[serde(rename_all = "camelCase")]
85
+
pub struct MuteGetRecordOutput<'a> {
86
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
87
+
#[serde(borrow)]
88
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
89
+
#[serde(borrow)]
90
+
pub uri: jacquard_common::types::string::AtUri<'a>,
91
+
#[serde(borrow)]
92
+
pub value: Mute<'a>,
93
+
}
94
+
95
+
/// Marker type for deserializing records from this collection.
96
+
pub struct MuteRecord;
97
+
impl jacquard_common::xrpc::XrpcResp for MuteRecord {
98
+
const NSID: &'static str = "net.anisota.graph.mute";
99
+
const ENCODING: &'static str = "application/json";
100
+
type Output<'de> = MuteGetRecordOutput<'de>;
101
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
102
+
}
103
+
74
104
impl jacquard_common::types::collection::Collection for Mute<'_> {
75
105
const NSID: &'static str = "net.anisota.graph.mute";
106
+
type Record = MuteRecord;
107
+
}
108
+
109
+
impl From<MuteGetRecordOutput<'_>> for Mute<'static> {
110
+
fn from(output: MuteGetRecordOutput<'_>) -> Self {
111
+
use jacquard_common::IntoStatic;
112
+
output.value.into_static()
113
+
}
76
114
}
+38
crates/jacquard-api/src/net_bnewbold/demo/mushies.rs
+38
crates/jacquard-api/src/net_bnewbold/demo/mushies.rs
···
27
27
pub species: std::option::Option<jacquard_common::CowStr<'a>>,
28
28
}
29
29
30
+
/// Typed wrapper for GetRecord response with this collection's record type.
31
+
#[derive(
32
+
serde::Serialize,
33
+
serde::Deserialize,
34
+
Debug,
35
+
Clone,
36
+
PartialEq,
37
+
Eq,
38
+
jacquard_derive::IntoStatic
39
+
)]
40
+
#[serde(rename_all = "camelCase")]
41
+
pub struct MushiesGetRecordOutput<'a> {
42
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
43
+
#[serde(borrow)]
44
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
45
+
#[serde(borrow)]
46
+
pub uri: jacquard_common::types::string::AtUri<'a>,
47
+
#[serde(borrow)]
48
+
pub value: Mushies<'a>,
49
+
}
50
+
51
+
/// Marker type for deserializing records from this collection.
52
+
pub struct MushiesRecord;
53
+
impl jacquard_common::xrpc::XrpcResp for MushiesRecord {
54
+
const NSID: &'static str = "net.bnewbold.demo.mushies";
55
+
const ENCODING: &'static str = "application/json";
56
+
type Output<'de> = MushiesGetRecordOutput<'de>;
57
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
58
+
}
59
+
30
60
impl jacquard_common::types::collection::Collection for Mushies<'_> {
31
61
const NSID: &'static str = "net.bnewbold.demo.mushies";
62
+
type Record = MushiesRecord;
63
+
}
64
+
65
+
impl From<MushiesGetRecordOutput<'_>> for Mushies<'static> {
66
+
fn from(output: MushiesGetRecordOutput<'_>) -> Self {
67
+
use jacquard_common::IntoStatic;
68
+
output.value.into_static()
69
+
}
32
70
}
+38
crates/jacquard-api/src/net_bnewbold/demo/mushroom.rs
+38
crates/jacquard-api/src/net_bnewbold/demo/mushroom.rs
···
27
27
pub species: std::option::Option<jacquard_common::CowStr<'a>>,
28
28
}
29
29
30
+
/// Typed wrapper for GetRecord response with this collection's record type.
31
+
#[derive(
32
+
serde::Serialize,
33
+
serde::Deserialize,
34
+
Debug,
35
+
Clone,
36
+
PartialEq,
37
+
Eq,
38
+
jacquard_derive::IntoStatic
39
+
)]
40
+
#[serde(rename_all = "camelCase")]
41
+
pub struct MushroomGetRecordOutput<'a> {
42
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
43
+
#[serde(borrow)]
44
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
45
+
#[serde(borrow)]
46
+
pub uri: jacquard_common::types::string::AtUri<'a>,
47
+
#[serde(borrow)]
48
+
pub value: Mushroom<'a>,
49
+
}
50
+
51
+
/// Marker type for deserializing records from this collection.
52
+
pub struct MushroomRecord;
53
+
impl jacquard_common::xrpc::XrpcResp for MushroomRecord {
54
+
const NSID: &'static str = "net.bnewbold.demo.mushroom";
55
+
const ENCODING: &'static str = "application/json";
56
+
type Output<'de> = MushroomGetRecordOutput<'de>;
57
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
58
+
}
59
+
30
60
impl jacquard_common::types::collection::Collection for Mushroom<'_> {
31
61
const NSID: &'static str = "net.bnewbold.demo.mushroom";
62
+
type Record = MushroomRecord;
63
+
}
64
+
65
+
impl From<MushroomGetRecordOutput<'_>> for Mushroom<'static> {
66
+
fn from(output: MushroomGetRecordOutput<'_>) -> Self {
67
+
use jacquard_common::IntoStatic;
68
+
output.value.into_static()
69
+
}
32
70
}
+38
crates/jacquard-api/src/net_bnewbold/m.rs
+38
crates/jacquard-api/src/net_bnewbold/m.rs
···
27
27
pub species: std::option::Option<jacquard_common::CowStr<'a>>,
28
28
}
29
29
30
+
/// Typed wrapper for GetRecord response with this collection's record type.
31
+
#[derive(
32
+
serde::Serialize,
33
+
serde::Deserialize,
34
+
Debug,
35
+
Clone,
36
+
PartialEq,
37
+
Eq,
38
+
jacquard_derive::IntoStatic
39
+
)]
40
+
#[serde(rename_all = "camelCase")]
41
+
pub struct MGetRecordOutput<'a> {
42
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
43
+
#[serde(borrow)]
44
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
45
+
#[serde(borrow)]
46
+
pub uri: jacquard_common::types::string::AtUri<'a>,
47
+
#[serde(borrow)]
48
+
pub value: M<'a>,
49
+
}
50
+
51
+
/// Marker type for deserializing records from this collection.
52
+
pub struct MRecord;
53
+
impl jacquard_common::xrpc::XrpcResp for MRecord {
54
+
const NSID: &'static str = "net.bnewbold.m";
55
+
const ENCODING: &'static str = "application/json";
56
+
type Output<'de> = MGetRecordOutput<'de>;
57
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
58
+
}
59
+
30
60
impl jacquard_common::types::collection::Collection for M<'_> {
31
61
const NSID: &'static str = "net.bnewbold.m";
62
+
type Record = MRecord;
63
+
}
64
+
65
+
impl From<MGetRecordOutput<'_>> for M<'static> {
66
+
fn from(output: MGetRecordOutput<'_>) -> Self {
67
+
use jacquard_common::IntoStatic;
68
+
output.value.into_static()
69
+
}
32
70
}
+38
crates/jacquard-api/src/net_mmatt/right/now.rs
+38
crates/jacquard-api/src/net_mmatt/right/now.rs
···
29
29
pub text: jacquard_common::CowStr<'a>,
30
30
}
31
31
32
+
/// Typed wrapper for GetRecord response with this collection's record type.
33
+
#[derive(
34
+
serde::Serialize,
35
+
serde::Deserialize,
36
+
Debug,
37
+
Clone,
38
+
PartialEq,
39
+
Eq,
40
+
jacquard_derive::IntoStatic
41
+
)]
42
+
#[serde(rename_all = "camelCase")]
43
+
pub struct NowGetRecordOutput<'a> {
44
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
45
+
#[serde(borrow)]
46
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
47
+
#[serde(borrow)]
48
+
pub uri: jacquard_common::types::string::AtUri<'a>,
49
+
#[serde(borrow)]
50
+
pub value: Now<'a>,
51
+
}
52
+
53
+
/// Marker type for deserializing records from this collection.
54
+
pub struct NowRecord;
55
+
impl jacquard_common::xrpc::XrpcResp for NowRecord {
56
+
const NSID: &'static str = "net.mmatt.right.now";
57
+
const ENCODING: &'static str = "application/json";
58
+
type Output<'de> = NowGetRecordOutput<'de>;
59
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
60
+
}
61
+
32
62
impl jacquard_common::types::collection::Collection for Now<'_> {
33
63
const NSID: &'static str = "net.mmatt.right.now";
64
+
type Record = NowRecord;
65
+
}
66
+
67
+
impl From<NowGetRecordOutput<'_>> for Now<'static> {
68
+
fn from(output: NowGetRecordOutput<'_>) -> Self {
69
+
use jacquard_common::IntoStatic;
70
+
output.value.into_static()
71
+
}
34
72
}
+38
crates/jacquard-api/src/net_mmatt/vitals/car.rs
+38
crates/jacquard-api/src/net_mmatt/vitals/car.rs
···
42
42
pub created_at: jacquard_common::types::string::Datetime,
43
43
}
44
44
45
+
/// Typed wrapper for GetRecord response with this collection's record type.
46
+
#[derive(
47
+
serde::Serialize,
48
+
serde::Deserialize,
49
+
Debug,
50
+
Clone,
51
+
PartialEq,
52
+
Eq,
53
+
jacquard_derive::IntoStatic
54
+
)]
55
+
#[serde(rename_all = "camelCase")]
56
+
pub struct CarGetRecordOutput<'a> {
57
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
58
+
#[serde(borrow)]
59
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
60
+
#[serde(borrow)]
61
+
pub uri: jacquard_common::types::string::AtUri<'a>,
62
+
#[serde(borrow)]
63
+
pub value: Car<'a>,
64
+
}
65
+
66
+
/// Marker type for deserializing records from this collection.
67
+
pub struct CarRecord;
68
+
impl jacquard_common::xrpc::XrpcResp for CarRecord {
69
+
const NSID: &'static str = "net.mmatt.vitals.car";
70
+
const ENCODING: &'static str = "application/json";
71
+
type Output<'de> = CarGetRecordOutput<'de>;
72
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
73
+
}
74
+
45
75
impl jacquard_common::types::collection::Collection for Car<'_> {
46
76
const NSID: &'static str = "net.mmatt.vitals.car";
77
+
type Record = CarRecord;
78
+
}
79
+
80
+
impl From<CarGetRecordOutput<'_>> for Car<'static> {
81
+
fn from(output: CarGetRecordOutput<'_>) -> Self {
82
+
use jacquard_common::IntoStatic;
83
+
output.value.into_static()
84
+
}
47
85
}
+38
crates/jacquard-api/src/network_slices/actor/profile.rs
+38
crates/jacquard-api/src/network_slices/actor/profile.rs
···
33
33
pub display_name: std::option::Option<jacquard_common::CowStr<'a>>,
34
34
}
35
35
36
+
/// Typed wrapper for GetRecord response with this collection's record type.
37
+
#[derive(
38
+
serde::Serialize,
39
+
serde::Deserialize,
40
+
Debug,
41
+
Clone,
42
+
PartialEq,
43
+
Eq,
44
+
jacquard_derive::IntoStatic
45
+
)]
46
+
#[serde(rename_all = "camelCase")]
47
+
pub struct ProfileGetRecordOutput<'a> {
48
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
49
+
#[serde(borrow)]
50
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
51
+
#[serde(borrow)]
52
+
pub uri: jacquard_common::types::string::AtUri<'a>,
53
+
#[serde(borrow)]
54
+
pub value: Profile<'a>,
55
+
}
56
+
57
+
/// Marker type for deserializing records from this collection.
58
+
pub struct ProfileRecord;
59
+
impl jacquard_common::xrpc::XrpcResp for ProfileRecord {
60
+
const NSID: &'static str = "network.slices.actor.profile";
61
+
const ENCODING: &'static str = "application/json";
62
+
type Output<'de> = ProfileGetRecordOutput<'de>;
63
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
64
+
}
65
+
36
66
impl jacquard_common::types::collection::Collection for Profile<'_> {
37
67
const NSID: &'static str = "network.slices.actor.profile";
68
+
type Record = ProfileRecord;
69
+
}
70
+
71
+
impl From<ProfileGetRecordOutput<'_>> for Profile<'static> {
72
+
fn from(output: ProfileGetRecordOutput<'_>) -> Self {
73
+
use jacquard_common::IntoStatic;
74
+
output.value.into_static()
75
+
}
38
76
}
+38
crates/jacquard-api/src/network_slices/lexicon.rs
+38
crates/jacquard-api/src/network_slices/lexicon.rs
···
40
40
pub updated_at: std::option::Option<jacquard_common::types::string::Datetime>,
41
41
}
42
42
43
+
/// Typed wrapper for GetRecord response with this collection's record type.
44
+
#[derive(
45
+
serde::Serialize,
46
+
serde::Deserialize,
47
+
Debug,
48
+
Clone,
49
+
PartialEq,
50
+
Eq,
51
+
jacquard_derive::IntoStatic
52
+
)]
53
+
#[serde(rename_all = "camelCase")]
54
+
pub struct LexiconGetRecordOutput<'a> {
55
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
56
+
#[serde(borrow)]
57
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
58
+
#[serde(borrow)]
59
+
pub uri: jacquard_common::types::string::AtUri<'a>,
60
+
#[serde(borrow)]
61
+
pub value: Lexicon<'a>,
62
+
}
63
+
64
+
/// Marker type for deserializing records from this collection.
65
+
pub struct LexiconRecord;
66
+
impl jacquard_common::xrpc::XrpcResp for LexiconRecord {
67
+
const NSID: &'static str = "network.slices.lexicon";
68
+
const ENCODING: &'static str = "application/json";
69
+
type Output<'de> = LexiconGetRecordOutput<'de>;
70
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
71
+
}
72
+
43
73
impl jacquard_common::types::collection::Collection for Lexicon<'_> {
44
74
const NSID: &'static str = "network.slices.lexicon";
75
+
type Record = LexiconRecord;
76
+
}
77
+
78
+
impl From<LexiconGetRecordOutput<'_>> for Lexicon<'static> {
79
+
fn from(output: LexiconGetRecordOutput<'_>) -> Self {
80
+
use jacquard_common::IntoStatic;
81
+
output.value.into_static()
82
+
}
45
83
}
+38
crates/jacquard-api/src/network_slices/slice.rs
+38
crates/jacquard-api/src/network_slices/slice.rs
···
44
44
pub name: jacquard_common::CowStr<'a>,
45
45
}
46
46
47
+
/// Typed wrapper for GetRecord response with this collection's record type.
48
+
#[derive(
49
+
serde::Serialize,
50
+
serde::Deserialize,
51
+
Debug,
52
+
Clone,
53
+
PartialEq,
54
+
Eq,
55
+
jacquard_derive::IntoStatic
56
+
)]
57
+
#[serde(rename_all = "camelCase")]
58
+
pub struct SliceGetRecordOutput<'a> {
59
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
60
+
#[serde(borrow)]
61
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
62
+
#[serde(borrow)]
63
+
pub uri: jacquard_common::types::string::AtUri<'a>,
64
+
#[serde(borrow)]
65
+
pub value: Slice<'a>,
66
+
}
67
+
68
+
/// Marker type for deserializing records from this collection.
69
+
pub struct SliceRecord;
70
+
impl jacquard_common::xrpc::XrpcResp for SliceRecord {
71
+
const NSID: &'static str = "network.slices.slice";
72
+
const ENCODING: &'static str = "application/json";
73
+
type Output<'de> = SliceGetRecordOutput<'de>;
74
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
75
+
}
76
+
47
77
impl jacquard_common::types::collection::Collection for Slice<'_> {
48
78
const NSID: &'static str = "network.slices.slice";
79
+
type Record = SliceRecord;
80
+
}
81
+
82
+
impl From<SliceGetRecordOutput<'_>> for Slice<'static> {
83
+
fn from(output: SliceGetRecordOutput<'_>) -> Self {
84
+
use jacquard_common::IntoStatic;
85
+
output.value.into_static()
86
+
}
49
87
}
50
88
51
89
#[jacquard_derive::lexicon]
+38
crates/jacquard-api/src/network_slices/waitlist/invite.rs
+38
crates/jacquard-api/src/network_slices/waitlist/invite.rs
···
31
31
pub slice: jacquard_common::types::string::AtUri<'a>,
32
32
}
33
33
34
+
/// Typed wrapper for GetRecord response with this collection's record type.
35
+
#[derive(
36
+
serde::Serialize,
37
+
serde::Deserialize,
38
+
Debug,
39
+
Clone,
40
+
PartialEq,
41
+
Eq,
42
+
jacquard_derive::IntoStatic
43
+
)]
44
+
#[serde(rename_all = "camelCase")]
45
+
pub struct InviteGetRecordOutput<'a> {
46
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
47
+
#[serde(borrow)]
48
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
49
+
#[serde(borrow)]
50
+
pub uri: jacquard_common::types::string::AtUri<'a>,
51
+
#[serde(borrow)]
52
+
pub value: Invite<'a>,
53
+
}
54
+
55
+
/// Marker type for deserializing records from this collection.
56
+
pub struct InviteRecord;
57
+
impl jacquard_common::xrpc::XrpcResp for InviteRecord {
58
+
const NSID: &'static str = "network.slices.waitlist.invite";
59
+
const ENCODING: &'static str = "application/json";
60
+
type Output<'de> = InviteGetRecordOutput<'de>;
61
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
62
+
}
63
+
34
64
impl jacquard_common::types::collection::Collection for Invite<'_> {
35
65
const NSID: &'static str = "network.slices.waitlist.invite";
66
+
type Record = InviteRecord;
67
+
}
68
+
69
+
impl From<InviteGetRecordOutput<'_>> for Invite<'static> {
70
+
fn from(output: InviteGetRecordOutput<'_>) -> Self {
71
+
use jacquard_common::IntoStatic;
72
+
output.value.into_static()
73
+
}
36
74
}
+38
crates/jacquard-api/src/network_slices/waitlist/request.rs
+38
crates/jacquard-api/src/network_slices/waitlist/request.rs
···
25
25
pub slice: jacquard_common::types::string::AtUri<'a>,
26
26
}
27
27
28
+
/// Typed wrapper for GetRecord response with this collection's record type.
29
+
#[derive(
30
+
serde::Serialize,
31
+
serde::Deserialize,
32
+
Debug,
33
+
Clone,
34
+
PartialEq,
35
+
Eq,
36
+
jacquard_derive::IntoStatic
37
+
)]
38
+
#[serde(rename_all = "camelCase")]
39
+
pub struct RequestGetRecordOutput<'a> {
40
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
41
+
#[serde(borrow)]
42
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
43
+
#[serde(borrow)]
44
+
pub uri: jacquard_common::types::string::AtUri<'a>,
45
+
#[serde(borrow)]
46
+
pub value: Request<'a>,
47
+
}
48
+
49
+
/// Marker type for deserializing records from this collection.
50
+
pub struct RequestRecord;
51
+
impl jacquard_common::xrpc::XrpcResp for RequestRecord {
52
+
const NSID: &'static str = "network.slices.waitlist.request";
53
+
const ENCODING: &'static str = "application/json";
54
+
type Output<'de> = RequestGetRecordOutput<'de>;
55
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
56
+
}
57
+
28
58
impl jacquard_common::types::collection::Collection for Request<'_> {
29
59
const NSID: &'static str = "network.slices.waitlist.request";
60
+
type Record = RequestRecord;
61
+
}
62
+
63
+
impl From<RequestGetRecordOutput<'_>> for Request<'static> {
64
+
fn from(output: RequestGetRecordOutput<'_>) -> Self {
65
+
use jacquard_common::IntoStatic;
66
+
output.value.into_static()
67
+
}
30
68
}
+38
crates/jacquard-api/src/org_devcon/event/test.rs
+38
crates/jacquard-api/src/org_devcon/event/test.rs
···
40
40
pub url: std::option::Option<jacquard_common::CowStr<'a>>,
41
41
}
42
42
43
+
/// Typed wrapper for GetRecord response with this collection's record type.
44
+
#[derive(
45
+
serde::Serialize,
46
+
serde::Deserialize,
47
+
Debug,
48
+
Clone,
49
+
PartialEq,
50
+
Eq,
51
+
jacquard_derive::IntoStatic
52
+
)]
53
+
#[serde(rename_all = "camelCase")]
54
+
pub struct TestGetRecordOutput<'a> {
55
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
56
+
#[serde(borrow)]
57
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
58
+
#[serde(borrow)]
59
+
pub uri: jacquard_common::types::string::AtUri<'a>,
60
+
#[serde(borrow)]
61
+
pub value: Test<'a>,
62
+
}
63
+
64
+
/// Marker type for deserializing records from this collection.
65
+
pub struct TestRecord;
66
+
impl jacquard_common::xrpc::XrpcResp for TestRecord {
67
+
const NSID: &'static str = "org.devcon.event.test";
68
+
const ENCODING: &'static str = "application/json";
69
+
type Output<'de> = TestGetRecordOutput<'de>;
70
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
71
+
}
72
+
43
73
impl jacquard_common::types::collection::Collection for Test<'_> {
44
74
const NSID: &'static str = "org.devcon.event.test";
75
+
type Record = TestRecord;
76
+
}
77
+
78
+
impl From<TestGetRecordOutput<'_>> for Test<'static> {
79
+
fn from(output: TestGetRecordOutput<'_>) -> Self {
80
+
use jacquard_common::IntoStatic;
81
+
output.value.into_static()
82
+
}
45
83
}
+38
crates/jacquard-api/src/org_robocracy/demo/fungus.rs
+38
crates/jacquard-api/src/org_robocracy/demo/fungus.rs
···
27
27
pub species: std::option::Option<jacquard_common::CowStr<'a>>,
28
28
}
29
29
30
+
/// Typed wrapper for GetRecord response with this collection's record type.
31
+
#[derive(
32
+
serde::Serialize,
33
+
serde::Deserialize,
34
+
Debug,
35
+
Clone,
36
+
PartialEq,
37
+
Eq,
38
+
jacquard_derive::IntoStatic
39
+
)]
40
+
#[serde(rename_all = "camelCase")]
41
+
pub struct FungusGetRecordOutput<'a> {
42
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
43
+
#[serde(borrow)]
44
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
45
+
#[serde(borrow)]
46
+
pub uri: jacquard_common::types::string::AtUri<'a>,
47
+
#[serde(borrow)]
48
+
pub value: Fungus<'a>,
49
+
}
50
+
51
+
/// Marker type for deserializing records from this collection.
52
+
pub struct FungusRecord;
53
+
impl jacquard_common::xrpc::XrpcResp for FungusRecord {
54
+
const NSID: &'static str = "org.robocracy.demo.fungus";
55
+
const ENCODING: &'static str = "application/json";
56
+
type Output<'de> = FungusGetRecordOutput<'de>;
57
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
58
+
}
59
+
30
60
impl jacquard_common::types::collection::Collection for Fungus<'_> {
31
61
const NSID: &'static str = "org.robocracy.demo.fungus";
62
+
type Record = FungusRecord;
63
+
}
64
+
65
+
impl From<FungusGetRecordOutput<'_>> for Fungus<'static> {
66
+
fn from(output: FungusGetRecordOutput<'_>) -> Self {
67
+
use jacquard_common::IntoStatic;
68
+
output.value.into_static()
69
+
}
32
70
}
+38
crates/jacquard-api/src/org_robocracy/demo/mushies.rs
+38
crates/jacquard-api/src/org_robocracy/demo/mushies.rs
···
27
27
pub species: std::option::Option<jacquard_common::CowStr<'a>>,
28
28
}
29
29
30
+
/// Typed wrapper for GetRecord response with this collection's record type.
31
+
#[derive(
32
+
serde::Serialize,
33
+
serde::Deserialize,
34
+
Debug,
35
+
Clone,
36
+
PartialEq,
37
+
Eq,
38
+
jacquard_derive::IntoStatic
39
+
)]
40
+
#[serde(rename_all = "camelCase")]
41
+
pub struct MushiesGetRecordOutput<'a> {
42
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
43
+
#[serde(borrow)]
44
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
45
+
#[serde(borrow)]
46
+
pub uri: jacquard_common::types::string::AtUri<'a>,
47
+
#[serde(borrow)]
48
+
pub value: Mushies<'a>,
49
+
}
50
+
51
+
/// Marker type for deserializing records from this collection.
52
+
pub struct MushiesRecord;
53
+
impl jacquard_common::xrpc::XrpcResp for MushiesRecord {
54
+
const NSID: &'static str = "org.robocracy.demo.mushies";
55
+
const ENCODING: &'static str = "application/json";
56
+
type Output<'de> = MushiesGetRecordOutput<'de>;
57
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
58
+
}
59
+
30
60
impl jacquard_common::types::collection::Collection for Mushies<'_> {
31
61
const NSID: &'static str = "org.robocracy.demo.mushies";
62
+
type Record = MushiesRecord;
63
+
}
64
+
65
+
impl From<MushiesGetRecordOutput<'_>> for Mushies<'static> {
66
+
fn from(output: MushiesGetRecordOutput<'_>) -> Self {
67
+
use jacquard_common::IntoStatic;
68
+
output.value.into_static()
69
+
}
32
70
}
+38
crates/jacquard-api/src/place_atwork/endorsement.rs
+38
crates/jacquard-api/src/place_atwork/endorsement.rs
···
37
37
pub text: jacquard_common::CowStr<'a>,
38
38
}
39
39
40
+
/// Typed wrapper for GetRecord response with this collection's record type.
41
+
#[derive(
42
+
serde::Serialize,
43
+
serde::Deserialize,
44
+
Debug,
45
+
Clone,
46
+
PartialEq,
47
+
Eq,
48
+
jacquard_derive::IntoStatic
49
+
)]
50
+
#[serde(rename_all = "camelCase")]
51
+
pub struct EndorsementGetRecordOutput<'a> {
52
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
53
+
#[serde(borrow)]
54
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
55
+
#[serde(borrow)]
56
+
pub uri: jacquard_common::types::string::AtUri<'a>,
57
+
#[serde(borrow)]
58
+
pub value: Endorsement<'a>,
59
+
}
60
+
61
+
/// Marker type for deserializing records from this collection.
62
+
pub struct EndorsementRecord;
63
+
impl jacquard_common::xrpc::XrpcResp for EndorsementRecord {
64
+
const NSID: &'static str = "place.atwork.endorsement";
65
+
const ENCODING: &'static str = "application/json";
66
+
type Output<'de> = EndorsementGetRecordOutput<'de>;
67
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
68
+
}
69
+
40
70
impl jacquard_common::types::collection::Collection for Endorsement<'_> {
41
71
const NSID: &'static str = "place.atwork.endorsement";
72
+
type Record = EndorsementRecord;
73
+
}
74
+
75
+
impl From<EndorsementGetRecordOutput<'_>> for Endorsement<'static> {
76
+
fn from(output: EndorsementGetRecordOutput<'_>) -> Self {
77
+
use jacquard_common::IntoStatic;
78
+
output.value.into_static()
79
+
}
42
80
}
+38
crates/jacquard-api/src/place_atwork/endorsement_proof.rs
+38
crates/jacquard-api/src/place_atwork/endorsement_proof.rs
···
23
23
pub cid: jacquard_common::types::string::Cid<'a>,
24
24
}
25
25
26
+
/// Typed wrapper for GetRecord response with this collection's record type.
27
+
#[derive(
28
+
serde::Serialize,
29
+
serde::Deserialize,
30
+
Debug,
31
+
Clone,
32
+
PartialEq,
33
+
Eq,
34
+
jacquard_derive::IntoStatic
35
+
)]
36
+
#[serde(rename_all = "camelCase")]
37
+
pub struct EndorsementProofGetRecordOutput<'a> {
38
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
39
+
#[serde(borrow)]
40
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
41
+
#[serde(borrow)]
42
+
pub uri: jacquard_common::types::string::AtUri<'a>,
43
+
#[serde(borrow)]
44
+
pub value: EndorsementProof<'a>,
45
+
}
46
+
47
+
/// Marker type for deserializing records from this collection.
48
+
pub struct EndorsementProofRecord;
49
+
impl jacquard_common::xrpc::XrpcResp for EndorsementProofRecord {
50
+
const NSID: &'static str = "place.atwork.endorsementProof";
51
+
const ENCODING: &'static str = "application/json";
52
+
type Output<'de> = EndorsementProofGetRecordOutput<'de>;
53
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
54
+
}
55
+
26
56
impl jacquard_common::types::collection::Collection for EndorsementProof<'_> {
27
57
const NSID: &'static str = "place.atwork.endorsementProof";
58
+
type Record = EndorsementProofRecord;
59
+
}
60
+
61
+
impl From<EndorsementProofGetRecordOutput<'_>> for EndorsementProof<'static> {
62
+
fn from(output: EndorsementProofGetRecordOutput<'_>) -> Self {
63
+
use jacquard_common::IntoStatic;
64
+
output.value.into_static()
65
+
}
28
66
}
+38
crates/jacquard-api/src/place_atwork/listing.rs
+38
crates/jacquard-api/src/place_atwork/listing.rs
···
48
48
pub title: jacquard_common::CowStr<'a>,
49
49
}
50
50
51
+
/// Typed wrapper for GetRecord response with this collection's record type.
52
+
#[derive(
53
+
serde::Serialize,
54
+
serde::Deserialize,
55
+
Debug,
56
+
Clone,
57
+
PartialEq,
58
+
Eq,
59
+
jacquard_derive::IntoStatic
60
+
)]
61
+
#[serde(rename_all = "camelCase")]
62
+
pub struct ListingGetRecordOutput<'a> {
63
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
64
+
#[serde(borrow)]
65
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
66
+
#[serde(borrow)]
67
+
pub uri: jacquard_common::types::string::AtUri<'a>,
68
+
#[serde(borrow)]
69
+
pub value: Listing<'a>,
70
+
}
71
+
72
+
/// Marker type for deserializing records from this collection.
73
+
pub struct ListingRecord;
74
+
impl jacquard_common::xrpc::XrpcResp for ListingRecord {
75
+
const NSID: &'static str = "place.atwork.listing";
76
+
const ENCODING: &'static str = "application/json";
77
+
type Output<'de> = ListingGetRecordOutput<'de>;
78
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
79
+
}
80
+
51
81
impl jacquard_common::types::collection::Collection for Listing<'_> {
52
82
const NSID: &'static str = "place.atwork.listing";
83
+
type Record = ListingRecord;
84
+
}
85
+
86
+
impl From<ListingGetRecordOutput<'_>> for Listing<'static> {
87
+
fn from(output: ListingGetRecordOutput<'_>) -> Self {
88
+
use jacquard_common::IntoStatic;
89
+
output.value.into_static()
90
+
}
53
91
}
+38
crates/jacquard-api/src/place_atwork/profile.rs
+38
crates/jacquard-api/src/place_atwork/profile.rs
···
88
88
pub status: std::option::Option<jacquard_common::CowStr<'a>>,
89
89
}
90
90
91
+
/// Typed wrapper for GetRecord response with this collection's record type.
92
+
#[derive(
93
+
serde::Serialize,
94
+
serde::Deserialize,
95
+
Debug,
96
+
Clone,
97
+
PartialEq,
98
+
Eq,
99
+
jacquard_derive::IntoStatic
100
+
)]
101
+
#[serde(rename_all = "camelCase")]
102
+
pub struct ProfileGetRecordOutput<'a> {
103
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
104
+
#[serde(borrow)]
105
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
106
+
#[serde(borrow)]
107
+
pub uri: jacquard_common::types::string::AtUri<'a>,
108
+
#[serde(borrow)]
109
+
pub value: Profile<'a>,
110
+
}
111
+
112
+
/// Marker type for deserializing records from this collection.
113
+
pub struct ProfileRecord;
114
+
impl jacquard_common::xrpc::XrpcResp for ProfileRecord {
115
+
const NSID: &'static str = "place.atwork.profile";
116
+
const ENCODING: &'static str = "application/json";
117
+
type Output<'de> = ProfileGetRecordOutput<'de>;
118
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
119
+
}
120
+
91
121
impl jacquard_common::types::collection::Collection for Profile<'_> {
92
122
const NSID: &'static str = "place.atwork.profile";
123
+
type Record = ProfileRecord;
124
+
}
125
+
126
+
impl From<ProfileGetRecordOutput<'_>> for Profile<'static> {
127
+
fn from(output: ProfileGetRecordOutput<'_>) -> Self {
128
+
use jacquard_common::IntoStatic;
129
+
output.value.into_static()
130
+
}
93
131
}
+38
crates/jacquard-api/src/place_stream/chat/gate.rs
+38
crates/jacquard-api/src/place_stream/chat/gate.rs
···
23
23
pub hidden_message: jacquard_common::types::string::AtUri<'a>,
24
24
}
25
25
26
+
/// Typed wrapper for GetRecord response with this collection's record type.
27
+
#[derive(
28
+
serde::Serialize,
29
+
serde::Deserialize,
30
+
Debug,
31
+
Clone,
32
+
PartialEq,
33
+
Eq,
34
+
jacquard_derive::IntoStatic
35
+
)]
36
+
#[serde(rename_all = "camelCase")]
37
+
pub struct GateGetRecordOutput<'a> {
38
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
39
+
#[serde(borrow)]
40
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
41
+
#[serde(borrow)]
42
+
pub uri: jacquard_common::types::string::AtUri<'a>,
43
+
#[serde(borrow)]
44
+
pub value: Gate<'a>,
45
+
}
46
+
47
+
/// Marker type for deserializing records from this collection.
48
+
pub struct GateRecord;
49
+
impl jacquard_common::xrpc::XrpcResp for GateRecord {
50
+
const NSID: &'static str = "place.stream.chat.gate";
51
+
const ENCODING: &'static str = "application/json";
52
+
type Output<'de> = GateGetRecordOutput<'de>;
53
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
54
+
}
55
+
26
56
impl jacquard_common::types::collection::Collection for Gate<'_> {
27
57
const NSID: &'static str = "place.stream.chat.gate";
58
+
type Record = GateRecord;
59
+
}
60
+
61
+
impl From<GateGetRecordOutput<'_>> for Gate<'static> {
62
+
fn from(output: GateGetRecordOutput<'_>) -> Self {
63
+
use jacquard_common::IntoStatic;
64
+
output.value.into_static()
65
+
}
28
66
}
+38
crates/jacquard-api/src/place_stream/chat/message.rs
+38
crates/jacquard-api/src/place_stream/chat/message.rs
···
37
37
pub text: jacquard_common::CowStr<'a>,
38
38
}
39
39
40
+
/// Typed wrapper for GetRecord response with this collection's record type.
41
+
#[derive(
42
+
serde::Serialize,
43
+
serde::Deserialize,
44
+
Debug,
45
+
Clone,
46
+
PartialEq,
47
+
Eq,
48
+
jacquard_derive::IntoStatic
49
+
)]
50
+
#[serde(rename_all = "camelCase")]
51
+
pub struct MessageGetRecordOutput<'a> {
52
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
53
+
#[serde(borrow)]
54
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
55
+
#[serde(borrow)]
56
+
pub uri: jacquard_common::types::string::AtUri<'a>,
57
+
#[serde(borrow)]
58
+
pub value: Message<'a>,
59
+
}
60
+
61
+
/// Marker type for deserializing records from this collection.
62
+
pub struct MessageRecord;
63
+
impl jacquard_common::xrpc::XrpcResp for MessageRecord {
64
+
const NSID: &'static str = "place.stream.chat.message";
65
+
const ENCODING: &'static str = "application/json";
66
+
type Output<'de> = MessageGetRecordOutput<'de>;
67
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
68
+
}
69
+
40
70
impl jacquard_common::types::collection::Collection for Message<'_> {
41
71
const NSID: &'static str = "place.stream.chat.message";
72
+
type Record = MessageRecord;
73
+
}
74
+
75
+
impl From<MessageGetRecordOutput<'_>> for Message<'static> {
76
+
fn from(output: MessageGetRecordOutput<'_>) -> Self {
77
+
use jacquard_common::IntoStatic;
78
+
output.value.into_static()
79
+
}
42
80
}
43
81
44
82
#[jacquard_derive::lexicon]
+38
crates/jacquard-api/src/place_stream/chat/profile.rs
+38
crates/jacquard-api/src/place_stream/chat/profile.rs
···
41
41
pub color: std::option::Option<crate::place_stream::chat::profile::Color<'a>>,
42
42
}
43
43
44
+
/// Typed wrapper for GetRecord response with this collection's record type.
45
+
#[derive(
46
+
serde::Serialize,
47
+
serde::Deserialize,
48
+
Debug,
49
+
Clone,
50
+
PartialEq,
51
+
Eq,
52
+
jacquard_derive::IntoStatic
53
+
)]
54
+
#[serde(rename_all = "camelCase")]
55
+
pub struct ProfileGetRecordOutput<'a> {
56
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
57
+
#[serde(borrow)]
58
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
59
+
#[serde(borrow)]
60
+
pub uri: jacquard_common::types::string::AtUri<'a>,
61
+
#[serde(borrow)]
62
+
pub value: Profile<'a>,
63
+
}
64
+
65
+
/// Marker type for deserializing records from this collection.
66
+
pub struct ProfileRecord;
67
+
impl jacquard_common::xrpc::XrpcResp for ProfileRecord {
68
+
const NSID: &'static str = "place.stream.chat.profile";
69
+
const ENCODING: &'static str = "application/json";
70
+
type Output<'de> = ProfileGetRecordOutput<'de>;
71
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
72
+
}
73
+
44
74
impl jacquard_common::types::collection::Collection for Profile<'_> {
45
75
const NSID: &'static str = "place.stream.chat.profile";
76
+
type Record = ProfileRecord;
77
+
}
78
+
79
+
impl From<ProfileGetRecordOutput<'_>> for Profile<'static> {
80
+
fn from(output: ProfileGetRecordOutput<'_>) -> Self {
81
+
use jacquard_common::IntoStatic;
82
+
output.value.into_static()
83
+
}
46
84
}
+38
crates/jacquard-api/src/place_stream/key.rs
+38
crates/jacquard-api/src/place_stream/key.rs
···
29
29
pub signing_key: jacquard_common::CowStr<'a>,
30
30
}
31
31
32
+
/// Typed wrapper for GetRecord response with this collection's record type.
33
+
#[derive(
34
+
serde::Serialize,
35
+
serde::Deserialize,
36
+
Debug,
37
+
Clone,
38
+
PartialEq,
39
+
Eq,
40
+
jacquard_derive::IntoStatic
41
+
)]
42
+
#[serde(rename_all = "camelCase")]
43
+
pub struct KeyGetRecordOutput<'a> {
44
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
45
+
#[serde(borrow)]
46
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
47
+
#[serde(borrow)]
48
+
pub uri: jacquard_common::types::string::AtUri<'a>,
49
+
#[serde(borrow)]
50
+
pub value: Key<'a>,
51
+
}
52
+
53
+
/// Marker type for deserializing records from this collection.
54
+
pub struct KeyRecord;
55
+
impl jacquard_common::xrpc::XrpcResp for KeyRecord {
56
+
const NSID: &'static str = "place.stream.key";
57
+
const ENCODING: &'static str = "application/json";
58
+
type Output<'de> = KeyGetRecordOutput<'de>;
59
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
60
+
}
61
+
32
62
impl jacquard_common::types::collection::Collection for Key<'_> {
33
63
const NSID: &'static str = "place.stream.key";
64
+
type Record = KeyRecord;
65
+
}
66
+
67
+
impl From<KeyGetRecordOutput<'_>> for Key<'static> {
68
+
fn from(output: KeyGetRecordOutput<'_>) -> Self {
69
+
use jacquard_common::IntoStatic;
70
+
output.value.into_static()
71
+
}
34
72
}
+38
crates/jacquard-api/src/place_stream/livestream.rs
+38
crates/jacquard-api/src/place_stream/livestream.rs
···
73
73
pub url: std::option::Option<jacquard_common::types::string::Uri<'a>>,
74
74
}
75
75
76
+
/// Typed wrapper for GetRecord response with this collection's record type.
77
+
#[derive(
78
+
serde::Serialize,
79
+
serde::Deserialize,
80
+
Debug,
81
+
Clone,
82
+
PartialEq,
83
+
Eq,
84
+
jacquard_derive::IntoStatic
85
+
)]
86
+
#[serde(rename_all = "camelCase")]
87
+
pub struct LivestreamGetRecordOutput<'a> {
88
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
89
+
#[serde(borrow)]
90
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
91
+
#[serde(borrow)]
92
+
pub uri: jacquard_common::types::string::AtUri<'a>,
93
+
#[serde(borrow)]
94
+
pub value: Livestream<'a>,
95
+
}
96
+
97
+
/// Marker type for deserializing records from this collection.
98
+
pub struct LivestreamRecord;
99
+
impl jacquard_common::xrpc::XrpcResp for LivestreamRecord {
100
+
const NSID: &'static str = "place.stream.livestream";
101
+
const ENCODING: &'static str = "application/json";
102
+
type Output<'de> = LivestreamGetRecordOutput<'de>;
103
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
104
+
}
105
+
76
106
impl jacquard_common::types::collection::Collection for Livestream<'_> {
77
107
const NSID: &'static str = "place.stream.livestream";
108
+
type Record = LivestreamRecord;
109
+
}
110
+
111
+
impl From<LivestreamGetRecordOutput<'_>> for Livestream<'static> {
112
+
fn from(output: LivestreamGetRecordOutput<'_>) -> Self {
113
+
use jacquard_common::IntoStatic;
114
+
output.value.into_static()
115
+
}
78
116
}
79
117
80
118
#[jacquard_derive::lexicon]
+38
crates/jacquard-api/src/place_stream/segment.rs
+38
crates/jacquard-api/src/place_stream/segment.rs
···
76
76
pub video: std::option::Option<Vec<crate::place_stream::segment::Video<'a>>>,
77
77
}
78
78
79
+
/// Typed wrapper for GetRecord response with this collection's record type.
80
+
#[derive(
81
+
serde::Serialize,
82
+
serde::Deserialize,
83
+
Debug,
84
+
Clone,
85
+
PartialEq,
86
+
Eq,
87
+
jacquard_derive::IntoStatic
88
+
)]
89
+
#[serde(rename_all = "camelCase")]
90
+
pub struct SegmentGetRecordOutput<'a> {
91
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
92
+
#[serde(borrow)]
93
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
94
+
#[serde(borrow)]
95
+
pub uri: jacquard_common::types::string::AtUri<'a>,
96
+
#[serde(borrow)]
97
+
pub value: Segment<'a>,
98
+
}
99
+
100
+
/// Marker type for deserializing records from this collection.
101
+
pub struct SegmentRecord;
102
+
impl jacquard_common::xrpc::XrpcResp for SegmentRecord {
103
+
const NSID: &'static str = "place.stream.segment";
104
+
const ENCODING: &'static str = "application/json";
105
+
type Output<'de> = SegmentGetRecordOutput<'de>;
106
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
107
+
}
108
+
79
109
impl jacquard_common::types::collection::Collection for Segment<'_> {
80
110
const NSID: &'static str = "place.stream.segment";
111
+
type Record = SegmentRecord;
112
+
}
113
+
114
+
impl From<SegmentGetRecordOutput<'_>> for Segment<'static> {
115
+
fn from(output: SegmentGetRecordOutput<'_>) -> Self {
116
+
use jacquard_common::IntoStatic;
117
+
output.value.into_static()
118
+
}
81
119
}
82
120
83
121
#[jacquard_derive::lexicon]
+38
crates/jacquard-api/src/place_stream/server/settings.rs
+38
crates/jacquard-api/src/place_stream/server/settings.rs
···
23
23
pub debug_recording: std::option::Option<bool>,
24
24
}
25
25
26
+
/// Typed wrapper for GetRecord response with this collection's record type.
27
+
#[derive(
28
+
serde::Serialize,
29
+
serde::Deserialize,
30
+
Debug,
31
+
Clone,
32
+
PartialEq,
33
+
Eq,
34
+
jacquard_derive::IntoStatic
35
+
)]
36
+
#[serde(rename_all = "camelCase")]
37
+
pub struct SettingsGetRecordOutput<'a> {
38
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
39
+
#[serde(borrow)]
40
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
41
+
#[serde(borrow)]
42
+
pub uri: jacquard_common::types::string::AtUri<'a>,
43
+
#[serde(borrow)]
44
+
pub value: Settings<'a>,
45
+
}
46
+
47
+
/// Marker type for deserializing records from this collection.
48
+
pub struct SettingsRecord;
49
+
impl jacquard_common::xrpc::XrpcResp for SettingsRecord {
50
+
const NSID: &'static str = "place.stream.server.settings";
51
+
const ENCODING: &'static str = "application/json";
52
+
type Output<'de> = SettingsGetRecordOutput<'de>;
53
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
54
+
}
55
+
26
56
impl jacquard_common::types::collection::Collection for Settings<'_> {
27
57
const NSID: &'static str = "place.stream.server.settings";
58
+
type Record = SettingsRecord;
59
+
}
60
+
61
+
impl From<SettingsGetRecordOutput<'_>> for Settings<'static> {
62
+
fn from(output: SettingsGetRecordOutput<'_>) -> Self {
63
+
use jacquard_common::IntoStatic;
64
+
output.value.into_static()
65
+
}
28
66
}
+38
crates/jacquard-api/src/pub_leaflet/comment.rs
+38
crates/jacquard-api/src/pub_leaflet/comment.rs
···
54
54
pub subject: jacquard_common::types::string::AtUri<'a>,
55
55
}
56
56
57
+
/// Typed wrapper for GetRecord response with this collection's record type.
58
+
#[derive(
59
+
serde::Serialize,
60
+
serde::Deserialize,
61
+
Debug,
62
+
Clone,
63
+
PartialEq,
64
+
Eq,
65
+
jacquard_derive::IntoStatic
66
+
)]
67
+
#[serde(rename_all = "camelCase")]
68
+
pub struct CommentGetRecordOutput<'a> {
69
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
70
+
#[serde(borrow)]
71
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
72
+
#[serde(borrow)]
73
+
pub uri: jacquard_common::types::string::AtUri<'a>,
74
+
#[serde(borrow)]
75
+
pub value: Comment<'a>,
76
+
}
77
+
78
+
/// Marker type for deserializing records from this collection.
79
+
pub struct CommentRecord;
80
+
impl jacquard_common::xrpc::XrpcResp for CommentRecord {
81
+
const NSID: &'static str = "pub.leaflet.comment";
82
+
const ENCODING: &'static str = "application/json";
83
+
type Output<'de> = CommentGetRecordOutput<'de>;
84
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
85
+
}
86
+
57
87
impl jacquard_common::types::collection::Collection for Comment<'_> {
58
88
const NSID: &'static str = "pub.leaflet.comment";
89
+
type Record = CommentRecord;
90
+
}
91
+
92
+
impl From<CommentGetRecordOutput<'_>> for Comment<'static> {
93
+
fn from(output: CommentGetRecordOutput<'_>) -> Self {
94
+
use jacquard_common::IntoStatic;
95
+
output.value.into_static()
96
+
}
59
97
}
60
98
61
99
#[jacquard_derive::lexicon]
+38
crates/jacquard-api/src/pub_leaflet/document.rs
+38
crates/jacquard-api/src/pub_leaflet/document.rs
···
38
38
pub title: jacquard_common::CowStr<'a>,
39
39
}
40
40
41
+
/// Typed wrapper for GetRecord response with this collection's record type.
42
+
#[derive(
43
+
serde::Serialize,
44
+
serde::Deserialize,
45
+
Debug,
46
+
Clone,
47
+
PartialEq,
48
+
Eq,
49
+
jacquard_derive::IntoStatic
50
+
)]
51
+
#[serde(rename_all = "camelCase")]
52
+
pub struct DocumentGetRecordOutput<'a> {
53
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
54
+
#[serde(borrow)]
55
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
56
+
#[serde(borrow)]
57
+
pub uri: jacquard_common::types::string::AtUri<'a>,
58
+
#[serde(borrow)]
59
+
pub value: Document<'a>,
60
+
}
61
+
62
+
/// Marker type for deserializing records from this collection.
63
+
pub struct DocumentRecord;
64
+
impl jacquard_common::xrpc::XrpcResp for DocumentRecord {
65
+
const NSID: &'static str = "pub.leaflet.document";
66
+
const ENCODING: &'static str = "application/json";
67
+
type Output<'de> = DocumentGetRecordOutput<'de>;
68
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
69
+
}
70
+
41
71
impl jacquard_common::types::collection::Collection for Document<'_> {
42
72
const NSID: &'static str = "pub.leaflet.document";
73
+
type Record = DocumentRecord;
74
+
}
75
+
76
+
impl From<DocumentGetRecordOutput<'_>> for Document<'static> {
77
+
fn from(output: DocumentGetRecordOutput<'_>) -> Self {
78
+
use jacquard_common::IntoStatic;
79
+
output.value.into_static()
80
+
}
43
81
}
+38
crates/jacquard-api/src/pub_leaflet/graph/subscription.rs
+38
crates/jacquard-api/src/pub_leaflet/graph/subscription.rs
···
22
22
pub publication: jacquard_common::types::string::AtUri<'a>,
23
23
}
24
24
25
+
/// Typed wrapper for GetRecord response with this collection's record type.
26
+
#[derive(
27
+
serde::Serialize,
28
+
serde::Deserialize,
29
+
Debug,
30
+
Clone,
31
+
PartialEq,
32
+
Eq,
33
+
jacquard_derive::IntoStatic
34
+
)]
35
+
#[serde(rename_all = "camelCase")]
36
+
pub struct SubscriptionGetRecordOutput<'a> {
37
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
38
+
#[serde(borrow)]
39
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
40
+
#[serde(borrow)]
41
+
pub uri: jacquard_common::types::string::AtUri<'a>,
42
+
#[serde(borrow)]
43
+
pub value: Subscription<'a>,
44
+
}
45
+
46
+
/// Marker type for deserializing records from this collection.
47
+
pub struct SubscriptionRecord;
48
+
impl jacquard_common::xrpc::XrpcResp for SubscriptionRecord {
49
+
const NSID: &'static str = "pub.leaflet.graph.subscription";
50
+
const ENCODING: &'static str = "application/json";
51
+
type Output<'de> = SubscriptionGetRecordOutput<'de>;
52
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
53
+
}
54
+
25
55
impl jacquard_common::types::collection::Collection for Subscription<'_> {
26
56
const NSID: &'static str = "pub.leaflet.graph.subscription";
57
+
type Record = SubscriptionRecord;
58
+
}
59
+
60
+
impl From<SubscriptionGetRecordOutput<'_>> for Subscription<'static> {
61
+
fn from(output: SubscriptionGetRecordOutput<'_>) -> Self {
62
+
use jacquard_common::IntoStatic;
63
+
output.value.into_static()
64
+
}
27
65
}
+38
crates/jacquard-api/src/pub_leaflet/publication.rs
+38
crates/jacquard-api/src/pub_leaflet/publication.rs
···
39
39
pub theme: std::option::Option<crate::pub_leaflet::publication::Theme<'a>>,
40
40
}
41
41
42
+
/// Typed wrapper for GetRecord response with this collection's record type.
43
+
#[derive(
44
+
serde::Serialize,
45
+
serde::Deserialize,
46
+
Debug,
47
+
Clone,
48
+
PartialEq,
49
+
Eq,
50
+
jacquard_derive::IntoStatic
51
+
)]
52
+
#[serde(rename_all = "camelCase")]
53
+
pub struct PublicationGetRecordOutput<'a> {
54
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
55
+
#[serde(borrow)]
56
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
57
+
#[serde(borrow)]
58
+
pub uri: jacquard_common::types::string::AtUri<'a>,
59
+
#[serde(borrow)]
60
+
pub value: Publication<'a>,
61
+
}
62
+
63
+
/// Marker type for deserializing records from this collection.
64
+
pub struct PublicationRecord;
65
+
impl jacquard_common::xrpc::XrpcResp for PublicationRecord {
66
+
const NSID: &'static str = "pub.leaflet.publication";
67
+
const ENCODING: &'static str = "application/json";
68
+
type Output<'de> = PublicationGetRecordOutput<'de>;
69
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
70
+
}
71
+
42
72
impl jacquard_common::types::collection::Collection for Publication<'_> {
43
73
const NSID: &'static str = "pub.leaflet.publication";
74
+
type Record = PublicationRecord;
75
+
}
76
+
77
+
impl From<PublicationGetRecordOutput<'_>> for Publication<'static> {
78
+
fn from(output: PublicationGetRecordOutput<'_>) -> Self {
79
+
use jacquard_common::IntoStatic;
80
+
output.value.into_static()
81
+
}
44
82
}
45
83
46
84
#[jacquard_derive::lexicon]
+38
crates/jacquard-api/src/sh_tangled/actor/profile.rs
+38
crates/jacquard-api/src/sh_tangled/actor/profile.rs
···
42
42
pub stats: std::option::Option<Vec<jacquard_common::CowStr<'a>>>,
43
43
}
44
44
45
+
/// Typed wrapper for GetRecord response with this collection's record type.
46
+
#[derive(
47
+
serde::Serialize,
48
+
serde::Deserialize,
49
+
Debug,
50
+
Clone,
51
+
PartialEq,
52
+
Eq,
53
+
jacquard_derive::IntoStatic
54
+
)]
55
+
#[serde(rename_all = "camelCase")]
56
+
pub struct ProfileGetRecordOutput<'a> {
57
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
58
+
#[serde(borrow)]
59
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
60
+
#[serde(borrow)]
61
+
pub uri: jacquard_common::types::string::AtUri<'a>,
62
+
#[serde(borrow)]
63
+
pub value: Profile<'a>,
64
+
}
65
+
66
+
/// Marker type for deserializing records from this collection.
67
+
pub struct ProfileRecord;
68
+
impl jacquard_common::xrpc::XrpcResp for ProfileRecord {
69
+
const NSID: &'static str = "sh.tangled.actor.profile";
70
+
const ENCODING: &'static str = "application/json";
71
+
type Output<'de> = ProfileGetRecordOutput<'de>;
72
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
73
+
}
74
+
45
75
impl jacquard_common::types::collection::Collection for Profile<'_> {
46
76
const NSID: &'static str = "sh.tangled.actor.profile";
77
+
type Record = ProfileRecord;
78
+
}
79
+
80
+
impl From<ProfileGetRecordOutput<'_>> for Profile<'static> {
81
+
fn from(output: ProfileGetRecordOutput<'_>) -> Self {
82
+
use jacquard_common::IntoStatic;
83
+
output.value.into_static()
84
+
}
47
85
}
+38
crates/jacquard-api/src/sh_tangled/feed/reaction.rs
+38
crates/jacquard-api/src/sh_tangled/feed/reaction.rs
···
24
24
pub subject: jacquard_common::types::string::AtUri<'a>,
25
25
}
26
26
27
+
/// Typed wrapper for GetRecord response with this collection's record type.
28
+
#[derive(
29
+
serde::Serialize,
30
+
serde::Deserialize,
31
+
Debug,
32
+
Clone,
33
+
PartialEq,
34
+
Eq,
35
+
jacquard_derive::IntoStatic
36
+
)]
37
+
#[serde(rename_all = "camelCase")]
38
+
pub struct ReactionGetRecordOutput<'a> {
39
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
40
+
#[serde(borrow)]
41
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
42
+
#[serde(borrow)]
43
+
pub uri: jacquard_common::types::string::AtUri<'a>,
44
+
#[serde(borrow)]
45
+
pub value: Reaction<'a>,
46
+
}
47
+
48
+
/// Marker type for deserializing records from this collection.
49
+
pub struct ReactionRecord;
50
+
impl jacquard_common::xrpc::XrpcResp for ReactionRecord {
51
+
const NSID: &'static str = "sh.tangled.feed.reaction";
52
+
const ENCODING: &'static str = "application/json";
53
+
type Output<'de> = ReactionGetRecordOutput<'de>;
54
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
55
+
}
56
+
27
57
impl jacquard_common::types::collection::Collection for Reaction<'_> {
28
58
const NSID: &'static str = "sh.tangled.feed.reaction";
59
+
type Record = ReactionRecord;
60
+
}
61
+
62
+
impl From<ReactionGetRecordOutput<'_>> for Reaction<'static> {
63
+
fn from(output: ReactionGetRecordOutput<'_>) -> Self {
64
+
use jacquard_common::IntoStatic;
65
+
output.value.into_static()
66
+
}
29
67
}
+38
crates/jacquard-api/src/sh_tangled/feed/star.rs
+38
crates/jacquard-api/src/sh_tangled/feed/star.rs
···
22
22
pub subject: jacquard_common::types::string::AtUri<'a>,
23
23
}
24
24
25
+
/// Typed wrapper for GetRecord response with this collection's record type.
26
+
#[derive(
27
+
serde::Serialize,
28
+
serde::Deserialize,
29
+
Debug,
30
+
Clone,
31
+
PartialEq,
32
+
Eq,
33
+
jacquard_derive::IntoStatic
34
+
)]
35
+
#[serde(rename_all = "camelCase")]
36
+
pub struct StarGetRecordOutput<'a> {
37
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
38
+
#[serde(borrow)]
39
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
40
+
#[serde(borrow)]
41
+
pub uri: jacquard_common::types::string::AtUri<'a>,
42
+
#[serde(borrow)]
43
+
pub value: Star<'a>,
44
+
}
45
+
46
+
/// Marker type for deserializing records from this collection.
47
+
pub struct StarRecord;
48
+
impl jacquard_common::xrpc::XrpcResp for StarRecord {
49
+
const NSID: &'static str = "sh.tangled.feed.star";
50
+
const ENCODING: &'static str = "application/json";
51
+
type Output<'de> = StarGetRecordOutput<'de>;
52
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
53
+
}
54
+
25
55
impl jacquard_common::types::collection::Collection for Star<'_> {
26
56
const NSID: &'static str = "sh.tangled.feed.star";
57
+
type Record = StarRecord;
58
+
}
59
+
60
+
impl From<StarGetRecordOutput<'_>> for Star<'static> {
61
+
fn from(output: StarGetRecordOutput<'_>) -> Self {
62
+
use jacquard_common::IntoStatic;
63
+
output.value.into_static()
64
+
}
27
65
}
+38
crates/jacquard-api/src/sh_tangled/git/ref_update.rs
+38
crates/jacquard-api/src/sh_tangled/git/ref_update.rs
···
112
112
pub repo_name: jacquard_common::CowStr<'a>,
113
113
}
114
114
115
+
/// Typed wrapper for GetRecord response with this collection's record type.
116
+
#[derive(
117
+
serde::Serialize,
118
+
serde::Deserialize,
119
+
Debug,
120
+
Clone,
121
+
PartialEq,
122
+
Eq,
123
+
jacquard_derive::IntoStatic
124
+
)]
125
+
#[serde(rename_all = "camelCase")]
126
+
pub struct RefUpdateGetRecordOutput<'a> {
127
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
128
+
#[serde(borrow)]
129
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
130
+
#[serde(borrow)]
131
+
pub uri: jacquard_common::types::string::AtUri<'a>,
132
+
#[serde(borrow)]
133
+
pub value: RefUpdate<'a>,
134
+
}
135
+
136
+
/// Marker type for deserializing records from this collection.
137
+
pub struct RefUpdateRecord;
138
+
impl jacquard_common::xrpc::XrpcResp for RefUpdateRecord {
139
+
const NSID: &'static str = "sh.tangled.git.refUpdate";
140
+
const ENCODING: &'static str = "application/json";
141
+
type Output<'de> = RefUpdateGetRecordOutput<'de>;
142
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
143
+
}
144
+
115
145
impl jacquard_common::types::collection::Collection for RefUpdate<'_> {
116
146
const NSID: &'static str = "sh.tangled.git.refUpdate";
147
+
type Record = RefUpdateRecord;
148
+
}
149
+
150
+
impl From<RefUpdateGetRecordOutput<'_>> for RefUpdate<'static> {
151
+
fn from(output: RefUpdateGetRecordOutput<'_>) -> Self {
152
+
use jacquard_common::IntoStatic;
153
+
output.value.into_static()
154
+
}
117
155
}
118
156
119
157
#[jacquard_derive::lexicon]
+38
crates/jacquard-api/src/sh_tangled/graph/follow.rs
+38
crates/jacquard-api/src/sh_tangled/graph/follow.rs
···
22
22
pub subject: jacquard_common::types::string::Did<'a>,
23
23
}
24
24
25
+
/// Typed wrapper for GetRecord response with this collection's record type.
26
+
#[derive(
27
+
serde::Serialize,
28
+
serde::Deserialize,
29
+
Debug,
30
+
Clone,
31
+
PartialEq,
32
+
Eq,
33
+
jacquard_derive::IntoStatic
34
+
)]
35
+
#[serde(rename_all = "camelCase")]
36
+
pub struct FollowGetRecordOutput<'a> {
37
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
38
+
#[serde(borrow)]
39
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
40
+
#[serde(borrow)]
41
+
pub uri: jacquard_common::types::string::AtUri<'a>,
42
+
#[serde(borrow)]
43
+
pub value: Follow<'a>,
44
+
}
45
+
46
+
/// Marker type for deserializing records from this collection.
47
+
pub struct FollowRecord;
48
+
impl jacquard_common::xrpc::XrpcResp for FollowRecord {
49
+
const NSID: &'static str = "sh.tangled.graph.follow";
50
+
const ENCODING: &'static str = "application/json";
51
+
type Output<'de> = FollowGetRecordOutput<'de>;
52
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
53
+
}
54
+
25
55
impl jacquard_common::types::collection::Collection for Follow<'_> {
26
56
const NSID: &'static str = "sh.tangled.graph.follow";
57
+
type Record = FollowRecord;
58
+
}
59
+
60
+
impl From<FollowGetRecordOutput<'_>> for Follow<'static> {
61
+
fn from(output: FollowGetRecordOutput<'_>) -> Self {
62
+
use jacquard_common::IntoStatic;
63
+
output.value.into_static()
64
+
}
27
65
}
+38
crates/jacquard-api/src/sh_tangled/knot.rs
+38
crates/jacquard-api/src/sh_tangled/knot.rs
···
24
24
pub created_at: jacquard_common::types::string::Datetime,
25
25
}
26
26
27
+
/// Typed wrapper for GetRecord response with this collection's record type.
28
+
#[derive(
29
+
serde::Serialize,
30
+
serde::Deserialize,
31
+
Debug,
32
+
Clone,
33
+
PartialEq,
34
+
Eq,
35
+
jacquard_derive::IntoStatic
36
+
)]
37
+
#[serde(rename_all = "camelCase")]
38
+
pub struct KnotGetRecordOutput<'a> {
39
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
40
+
#[serde(borrow)]
41
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
42
+
#[serde(borrow)]
43
+
pub uri: jacquard_common::types::string::AtUri<'a>,
44
+
#[serde(borrow)]
45
+
pub value: Knot<'a>,
46
+
}
47
+
48
+
/// Marker type for deserializing records from this collection.
49
+
pub struct KnotRecord;
50
+
impl jacquard_common::xrpc::XrpcResp for KnotRecord {
51
+
const NSID: &'static str = "sh.tangled.knot";
52
+
const ENCODING: &'static str = "application/json";
53
+
type Output<'de> = KnotGetRecordOutput<'de>;
54
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
55
+
}
56
+
27
57
impl jacquard_common::types::collection::Collection for Knot<'_> {
28
58
const NSID: &'static str = "sh.tangled.knot";
59
+
type Record = KnotRecord;
60
+
}
61
+
62
+
impl From<KnotGetRecordOutput<'_>> for Knot<'static> {
63
+
fn from(output: KnotGetRecordOutput<'_>) -> Self {
64
+
use jacquard_common::IntoStatic;
65
+
output.value.into_static()
66
+
}
29
67
}
+38
crates/jacquard-api/src/sh_tangled/knot/member.rs
+38
crates/jacquard-api/src/sh_tangled/knot/member.rs
···
25
25
pub subject: jacquard_common::types::string::Did<'a>,
26
26
}
27
27
28
+
/// Typed wrapper for GetRecord response with this collection's record type.
29
+
#[derive(
30
+
serde::Serialize,
31
+
serde::Deserialize,
32
+
Debug,
33
+
Clone,
34
+
PartialEq,
35
+
Eq,
36
+
jacquard_derive::IntoStatic
37
+
)]
38
+
#[serde(rename_all = "camelCase")]
39
+
pub struct MemberGetRecordOutput<'a> {
40
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
41
+
#[serde(borrow)]
42
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
43
+
#[serde(borrow)]
44
+
pub uri: jacquard_common::types::string::AtUri<'a>,
45
+
#[serde(borrow)]
46
+
pub value: Member<'a>,
47
+
}
48
+
49
+
/// Marker type for deserializing records from this collection.
50
+
pub struct MemberRecord;
51
+
impl jacquard_common::xrpc::XrpcResp for MemberRecord {
52
+
const NSID: &'static str = "sh.tangled.knot.member";
53
+
const ENCODING: &'static str = "application/json";
54
+
type Output<'de> = MemberGetRecordOutput<'de>;
55
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
56
+
}
57
+
28
58
impl jacquard_common::types::collection::Collection for Member<'_> {
29
59
const NSID: &'static str = "sh.tangled.knot.member";
60
+
type Record = MemberRecord;
61
+
}
62
+
63
+
impl From<MemberGetRecordOutput<'_>> for Member<'static> {
64
+
fn from(output: MemberGetRecordOutput<'_>) -> Self {
65
+
use jacquard_common::IntoStatic;
66
+
output.value.into_static()
67
+
}
30
68
}
+38
crates/jacquard-api/src/sh_tangled/label/definition.rs
+38
crates/jacquard-api/src/sh_tangled/label/definition.rs
···
36
36
pub value_type: crate::sh_tangled::label::definition::ValueType<'a>,
37
37
}
38
38
39
+
/// Typed wrapper for GetRecord response with this collection's record type.
40
+
#[derive(
41
+
serde::Serialize,
42
+
serde::Deserialize,
43
+
Debug,
44
+
Clone,
45
+
PartialEq,
46
+
Eq,
47
+
jacquard_derive::IntoStatic
48
+
)]
49
+
#[serde(rename_all = "camelCase")]
50
+
pub struct DefinitionGetRecordOutput<'a> {
51
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
52
+
#[serde(borrow)]
53
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
54
+
#[serde(borrow)]
55
+
pub uri: jacquard_common::types::string::AtUri<'a>,
56
+
#[serde(borrow)]
57
+
pub value: Definition<'a>,
58
+
}
59
+
60
+
/// Marker type for deserializing records from this collection.
61
+
pub struct DefinitionRecord;
62
+
impl jacquard_common::xrpc::XrpcResp for DefinitionRecord {
63
+
const NSID: &'static str = "sh.tangled.label.definition";
64
+
const ENCODING: &'static str = "application/json";
65
+
type Output<'de> = DefinitionGetRecordOutput<'de>;
66
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
67
+
}
68
+
39
69
impl jacquard_common::types::collection::Collection for Definition<'_> {
40
70
const NSID: &'static str = "sh.tangled.label.definition";
71
+
type Record = DefinitionRecord;
72
+
}
73
+
74
+
impl From<DefinitionGetRecordOutput<'_>> for Definition<'static> {
75
+
fn from(output: DefinitionGetRecordOutput<'_>) -> Self {
76
+
use jacquard_common::IntoStatic;
77
+
output.value.into_static()
78
+
}
41
79
}
42
80
43
81
#[jacquard_derive::lexicon]
+38
crates/jacquard-api/src/sh_tangled/label/op.rs
+38
crates/jacquard-api/src/sh_tangled/label/op.rs
···
27
27
pub subject: jacquard_common::types::string::AtUri<'a>,
28
28
}
29
29
30
+
/// Typed wrapper for GetRecord response with this collection's record type.
31
+
#[derive(
32
+
serde::Serialize,
33
+
serde::Deserialize,
34
+
Debug,
35
+
Clone,
36
+
PartialEq,
37
+
Eq,
38
+
jacquard_derive::IntoStatic
39
+
)]
40
+
#[serde(rename_all = "camelCase")]
41
+
pub struct OpGetRecordOutput<'a> {
42
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
43
+
#[serde(borrow)]
44
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
45
+
#[serde(borrow)]
46
+
pub uri: jacquard_common::types::string::AtUri<'a>,
47
+
#[serde(borrow)]
48
+
pub value: Op<'a>,
49
+
}
50
+
51
+
/// Marker type for deserializing records from this collection.
52
+
pub struct OpRecord;
53
+
impl jacquard_common::xrpc::XrpcResp for OpRecord {
54
+
const NSID: &'static str = "sh.tangled.label.op";
55
+
const ENCODING: &'static str = "application/json";
56
+
type Output<'de> = OpGetRecordOutput<'de>;
57
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
58
+
}
59
+
30
60
impl jacquard_common::types::collection::Collection for Op<'_> {
31
61
const NSID: &'static str = "sh.tangled.label.op";
62
+
type Record = OpRecord;
63
+
}
64
+
65
+
impl From<OpGetRecordOutput<'_>> for Op<'static> {
66
+
fn from(output: OpGetRecordOutput<'_>) -> Self {
67
+
use jacquard_common::IntoStatic;
68
+
output.value.into_static()
69
+
}
32
70
}
33
71
34
72
#[jacquard_derive::lexicon]
+38
crates/jacquard-api/src/sh_tangled/pipeline.rs
+38
crates/jacquard-api/src/sh_tangled/pipeline.rs
···
42
42
pub workflows: Vec<crate::sh_tangled::pipeline::Workflow<'a>>,
43
43
}
44
44
45
+
/// Typed wrapper for GetRecord response with this collection's record type.
46
+
#[derive(
47
+
serde::Serialize,
48
+
serde::Deserialize,
49
+
Debug,
50
+
Clone,
51
+
PartialEq,
52
+
Eq,
53
+
jacquard_derive::IntoStatic
54
+
)]
55
+
#[serde(rename_all = "camelCase")]
56
+
pub struct PipelineGetRecordOutput<'a> {
57
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
58
+
#[serde(borrow)]
59
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
60
+
#[serde(borrow)]
61
+
pub uri: jacquard_common::types::string::AtUri<'a>,
62
+
#[serde(borrow)]
63
+
pub value: Pipeline<'a>,
64
+
}
65
+
66
+
/// Marker type for deserializing records from this collection.
67
+
pub struct PipelineRecord;
68
+
impl jacquard_common::xrpc::XrpcResp for PipelineRecord {
69
+
const NSID: &'static str = "sh.tangled.pipeline";
70
+
const ENCODING: &'static str = "application/json";
71
+
type Output<'de> = PipelineGetRecordOutput<'de>;
72
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
73
+
}
74
+
45
75
impl jacquard_common::types::collection::Collection for Pipeline<'_> {
46
76
const NSID: &'static str = "sh.tangled.pipeline";
77
+
type Record = PipelineRecord;
78
+
}
79
+
80
+
impl From<PipelineGetRecordOutput<'_>> for Pipeline<'static> {
81
+
fn from(output: PipelineGetRecordOutput<'_>) -> Self {
82
+
use jacquard_common::IntoStatic;
83
+
output.value.into_static()
84
+
}
47
85
}
48
86
49
87
#[jacquard_derive::lexicon]
+38
crates/jacquard-api/src/sh_tangled/pipeline/status.rs
+38
crates/jacquard-api/src/sh_tangled/pipeline/status.rs
···
37
37
pub workflow: jacquard_common::types::string::AtUri<'a>,
38
38
}
39
39
40
+
/// Typed wrapper for GetRecord response with this collection's record type.
41
+
#[derive(
42
+
serde::Serialize,
43
+
serde::Deserialize,
44
+
Debug,
45
+
Clone,
46
+
PartialEq,
47
+
Eq,
48
+
jacquard_derive::IntoStatic
49
+
)]
50
+
#[serde(rename_all = "camelCase")]
51
+
pub struct StatusGetRecordOutput<'a> {
52
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
53
+
#[serde(borrow)]
54
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
55
+
#[serde(borrow)]
56
+
pub uri: jacquard_common::types::string::AtUri<'a>,
57
+
#[serde(borrow)]
58
+
pub value: Status<'a>,
59
+
}
60
+
61
+
/// Marker type for deserializing records from this collection.
62
+
pub struct StatusRecord;
63
+
impl jacquard_common::xrpc::XrpcResp for StatusRecord {
64
+
const NSID: &'static str = "sh.tangled.pipeline.status";
65
+
const ENCODING: &'static str = "application/json";
66
+
type Output<'de> = StatusGetRecordOutput<'de>;
67
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
68
+
}
69
+
40
70
impl jacquard_common::types::collection::Collection for Status<'_> {
41
71
const NSID: &'static str = "sh.tangled.pipeline.status";
72
+
type Record = StatusRecord;
73
+
}
74
+
75
+
impl From<StatusGetRecordOutput<'_>> for Status<'static> {
76
+
fn from(output: StatusGetRecordOutput<'_>) -> Self {
77
+
use jacquard_common::IntoStatic;
78
+
output.value.into_static()
79
+
}
42
80
}
+38
crates/jacquard-api/src/sh_tangled/public_key.rs
+38
crates/jacquard-api/src/sh_tangled/public_key.rs
···
27
27
pub name: jacquard_common::CowStr<'a>,
28
28
}
29
29
30
+
/// Typed wrapper for GetRecord response with this collection's record type.
31
+
#[derive(
32
+
serde::Serialize,
33
+
serde::Deserialize,
34
+
Debug,
35
+
Clone,
36
+
PartialEq,
37
+
Eq,
38
+
jacquard_derive::IntoStatic
39
+
)]
40
+
#[serde(rename_all = "camelCase")]
41
+
pub struct PublicKeyGetRecordOutput<'a> {
42
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
43
+
#[serde(borrow)]
44
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
45
+
#[serde(borrow)]
46
+
pub uri: jacquard_common::types::string::AtUri<'a>,
47
+
#[serde(borrow)]
48
+
pub value: PublicKey<'a>,
49
+
}
50
+
51
+
/// Marker type for deserializing records from this collection.
52
+
pub struct PublicKeyRecord;
53
+
impl jacquard_common::xrpc::XrpcResp for PublicKeyRecord {
54
+
const NSID: &'static str = "sh.tangled.publicKey";
55
+
const ENCODING: &'static str = "application/json";
56
+
type Output<'de> = PublicKeyGetRecordOutput<'de>;
57
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
58
+
}
59
+
30
60
impl jacquard_common::types::collection::Collection for PublicKey<'_> {
31
61
const NSID: &'static str = "sh.tangled.publicKey";
62
+
type Record = PublicKeyRecord;
63
+
}
64
+
65
+
impl From<PublicKeyGetRecordOutput<'_>> for PublicKey<'static> {
66
+
fn from(output: PublicKeyGetRecordOutput<'_>) -> Self {
67
+
use jacquard_common::IntoStatic;
68
+
output.value.into_static()
69
+
}
32
70
}
+38
crates/jacquard-api/src/sh_tangled/repo.rs
+38
crates/jacquard-api/src/sh_tangled/repo.rs
···
69
69
pub spindle: std::option::Option<jacquard_common::CowStr<'a>>,
70
70
}
71
71
72
+
/// Typed wrapper for GetRecord response with this collection's record type.
73
+
#[derive(
74
+
serde::Serialize,
75
+
serde::Deserialize,
76
+
Debug,
77
+
Clone,
78
+
PartialEq,
79
+
Eq,
80
+
jacquard_derive::IntoStatic
81
+
)]
82
+
#[serde(rename_all = "camelCase")]
83
+
pub struct RepoGetRecordOutput<'a> {
84
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
85
+
#[serde(borrow)]
86
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
87
+
#[serde(borrow)]
88
+
pub uri: jacquard_common::types::string::AtUri<'a>,
89
+
#[serde(borrow)]
90
+
pub value: Repo<'a>,
91
+
}
92
+
93
+
/// Marker type for deserializing records from this collection.
94
+
pub struct RepoRecord;
95
+
impl jacquard_common::xrpc::XrpcResp for RepoRecord {
96
+
const NSID: &'static str = "sh.tangled.repo";
97
+
const ENCODING: &'static str = "application/json";
98
+
type Output<'de> = RepoGetRecordOutput<'de>;
99
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
100
+
}
101
+
72
102
impl jacquard_common::types::collection::Collection for Repo<'_> {
73
103
const NSID: &'static str = "sh.tangled.repo";
104
+
type Record = RepoRecord;
105
+
}
106
+
107
+
impl From<RepoGetRecordOutput<'_>> for Repo<'static> {
108
+
fn from(output: RepoGetRecordOutput<'_>) -> Self {
109
+
use jacquard_common::IntoStatic;
110
+
output.value.into_static()
111
+
}
74
112
}
+38
crates/jacquard-api/src/sh_tangled/repo/artifact.rs
+38
crates/jacquard-api/src/sh_tangled/repo/artifact.rs
···
32
32
pub tag: bytes::Bytes,
33
33
}
34
34
35
+
/// Typed wrapper for GetRecord response with this collection's record type.
36
+
#[derive(
37
+
serde::Serialize,
38
+
serde::Deserialize,
39
+
Debug,
40
+
Clone,
41
+
PartialEq,
42
+
Eq,
43
+
jacquard_derive::IntoStatic
44
+
)]
45
+
#[serde(rename_all = "camelCase")]
46
+
pub struct ArtifactGetRecordOutput<'a> {
47
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
48
+
#[serde(borrow)]
49
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
50
+
#[serde(borrow)]
51
+
pub uri: jacquard_common::types::string::AtUri<'a>,
52
+
#[serde(borrow)]
53
+
pub value: Artifact<'a>,
54
+
}
55
+
56
+
/// Marker type for deserializing records from this collection.
57
+
pub struct ArtifactRecord;
58
+
impl jacquard_common::xrpc::XrpcResp for ArtifactRecord {
59
+
const NSID: &'static str = "sh.tangled.repo.artifact";
60
+
const ENCODING: &'static str = "application/json";
61
+
type Output<'de> = ArtifactGetRecordOutput<'de>;
62
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
63
+
}
64
+
35
65
impl jacquard_common::types::collection::Collection for Artifact<'_> {
36
66
const NSID: &'static str = "sh.tangled.repo.artifact";
67
+
type Record = ArtifactRecord;
68
+
}
69
+
70
+
impl From<ArtifactGetRecordOutput<'_>> for Artifact<'static> {
71
+
fn from(output: ArtifactGetRecordOutput<'_>) -> Self {
72
+
use jacquard_common::IntoStatic;
73
+
output.value.into_static()
74
+
}
37
75
}
+38
crates/jacquard-api/src/sh_tangled/repo/collaborator.rs
+38
crates/jacquard-api/src/sh_tangled/repo/collaborator.rs
···
25
25
pub subject: jacquard_common::types::string::Did<'a>,
26
26
}
27
27
28
+
/// Typed wrapper for GetRecord response with this collection's record type.
29
+
#[derive(
30
+
serde::Serialize,
31
+
serde::Deserialize,
32
+
Debug,
33
+
Clone,
34
+
PartialEq,
35
+
Eq,
36
+
jacquard_derive::IntoStatic
37
+
)]
38
+
#[serde(rename_all = "camelCase")]
39
+
pub struct CollaboratorGetRecordOutput<'a> {
40
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
41
+
#[serde(borrow)]
42
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
43
+
#[serde(borrow)]
44
+
pub uri: jacquard_common::types::string::AtUri<'a>,
45
+
#[serde(borrow)]
46
+
pub value: Collaborator<'a>,
47
+
}
48
+
49
+
/// Marker type for deserializing records from this collection.
50
+
pub struct CollaboratorRecord;
51
+
impl jacquard_common::xrpc::XrpcResp for CollaboratorRecord {
52
+
const NSID: &'static str = "sh.tangled.repo.collaborator";
53
+
const ENCODING: &'static str = "application/json";
54
+
type Output<'de> = CollaboratorGetRecordOutput<'de>;
55
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
56
+
}
57
+
28
58
impl jacquard_common::types::collection::Collection for Collaborator<'_> {
29
59
const NSID: &'static str = "sh.tangled.repo.collaborator";
60
+
type Record = CollaboratorRecord;
61
+
}
62
+
63
+
impl From<CollaboratorGetRecordOutput<'_>> for Collaborator<'static> {
64
+
fn from(output: CollaboratorGetRecordOutput<'_>) -> Self {
65
+
use jacquard_common::IntoStatic;
66
+
output.value.into_static()
67
+
}
30
68
}
+38
crates/jacquard-api/src/sh_tangled/repo/issue.rs
+38
crates/jacquard-api/src/sh_tangled/repo/issue.rs
···
30
30
pub title: jacquard_common::CowStr<'a>,
31
31
}
32
32
33
+
/// Typed wrapper for GetRecord response with this collection's record type.
34
+
#[derive(
35
+
serde::Serialize,
36
+
serde::Deserialize,
37
+
Debug,
38
+
Clone,
39
+
PartialEq,
40
+
Eq,
41
+
jacquard_derive::IntoStatic
42
+
)]
43
+
#[serde(rename_all = "camelCase")]
44
+
pub struct IssueGetRecordOutput<'a> {
45
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
46
+
#[serde(borrow)]
47
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
48
+
#[serde(borrow)]
49
+
pub uri: jacquard_common::types::string::AtUri<'a>,
50
+
#[serde(borrow)]
51
+
pub value: Issue<'a>,
52
+
}
53
+
54
+
/// Marker type for deserializing records from this collection.
55
+
pub struct IssueRecord;
56
+
impl jacquard_common::xrpc::XrpcResp for IssueRecord {
57
+
const NSID: &'static str = "sh.tangled.repo.issue";
58
+
const ENCODING: &'static str = "application/json";
59
+
type Output<'de> = IssueGetRecordOutput<'de>;
60
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
61
+
}
62
+
33
63
impl jacquard_common::types::collection::Collection for Issue<'_> {
34
64
const NSID: &'static str = "sh.tangled.repo.issue";
65
+
type Record = IssueRecord;
66
+
}
67
+
68
+
impl From<IssueGetRecordOutput<'_>> for Issue<'static> {
69
+
fn from(output: IssueGetRecordOutput<'_>) -> Self {
70
+
use jacquard_common::IntoStatic;
71
+
output.value.into_static()
72
+
}
35
73
}
+38
crates/jacquard-api/src/sh_tangled/repo/issue/comment.rs
+38
crates/jacquard-api/src/sh_tangled/repo/issue/comment.rs
···
27
27
pub reply_to: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
28
28
}
29
29
30
+
/// Typed wrapper for GetRecord response with this collection's record type.
31
+
#[derive(
32
+
serde::Serialize,
33
+
serde::Deserialize,
34
+
Debug,
35
+
Clone,
36
+
PartialEq,
37
+
Eq,
38
+
jacquard_derive::IntoStatic
39
+
)]
40
+
#[serde(rename_all = "camelCase")]
41
+
pub struct CommentGetRecordOutput<'a> {
42
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
43
+
#[serde(borrow)]
44
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
45
+
#[serde(borrow)]
46
+
pub uri: jacquard_common::types::string::AtUri<'a>,
47
+
#[serde(borrow)]
48
+
pub value: Comment<'a>,
49
+
}
50
+
51
+
/// Marker type for deserializing records from this collection.
52
+
pub struct CommentRecord;
53
+
impl jacquard_common::xrpc::XrpcResp for CommentRecord {
54
+
const NSID: &'static str = "sh.tangled.repo.issue.comment";
55
+
const ENCODING: &'static str = "application/json";
56
+
type Output<'de> = CommentGetRecordOutput<'de>;
57
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
58
+
}
59
+
30
60
impl jacquard_common::types::collection::Collection for Comment<'_> {
31
61
const NSID: &'static str = "sh.tangled.repo.issue.comment";
62
+
type Record = CommentRecord;
63
+
}
64
+
65
+
impl From<CommentGetRecordOutput<'_>> for Comment<'static> {
66
+
fn from(output: CommentGetRecordOutput<'_>) -> Self {
67
+
use jacquard_common::IntoStatic;
68
+
output.value.into_static()
69
+
}
32
70
}
+38
crates/jacquard-api/src/sh_tangled/repo/issue/state.rs
+38
crates/jacquard-api/src/sh_tangled/repo/issue/state.rs
···
27
27
pub state: jacquard_common::CowStr<'a>,
28
28
}
29
29
30
+
/// Typed wrapper for GetRecord response with this collection's record type.
31
+
#[derive(
32
+
serde::Serialize,
33
+
serde::Deserialize,
34
+
Debug,
35
+
Clone,
36
+
PartialEq,
37
+
Eq,
38
+
jacquard_derive::IntoStatic
39
+
)]
40
+
#[serde(rename_all = "camelCase")]
41
+
pub struct StateGetRecordOutput<'a> {
42
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
43
+
#[serde(borrow)]
44
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
45
+
#[serde(borrow)]
46
+
pub uri: jacquard_common::types::string::AtUri<'a>,
47
+
#[serde(borrow)]
48
+
pub value: State<'a>,
49
+
}
50
+
51
+
/// Marker type for deserializing records from this collection.
52
+
pub struct StateRecord;
53
+
impl jacquard_common::xrpc::XrpcResp for StateRecord {
54
+
const NSID: &'static str = "sh.tangled.repo.issue.state";
55
+
const ENCODING: &'static str = "application/json";
56
+
type Output<'de> = StateGetRecordOutput<'de>;
57
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
58
+
}
59
+
30
60
impl jacquard_common::types::collection::Collection for State<'_> {
31
61
const NSID: &'static str = "sh.tangled.repo.issue.state";
62
+
type Record = StateRecord;
63
+
}
64
+
65
+
impl From<StateGetRecordOutput<'_>> for State<'static> {
66
+
fn from(output: StateGetRecordOutput<'_>) -> Self {
67
+
use jacquard_common::IntoStatic;
68
+
output.value.into_static()
69
+
}
32
70
}
+38
crates/jacquard-api/src/sh_tangled/repo/pull.rs
+38
crates/jacquard-api/src/sh_tangled/repo/pull.rs
···
35
35
pub title: jacquard_common::CowStr<'a>,
36
36
}
37
37
38
+
/// Typed wrapper for GetRecord response with this collection's record type.
39
+
#[derive(
40
+
serde::Serialize,
41
+
serde::Deserialize,
42
+
Debug,
43
+
Clone,
44
+
PartialEq,
45
+
Eq,
46
+
jacquard_derive::IntoStatic
47
+
)]
48
+
#[serde(rename_all = "camelCase")]
49
+
pub struct PullGetRecordOutput<'a> {
50
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
51
+
#[serde(borrow)]
52
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
53
+
#[serde(borrow)]
54
+
pub uri: jacquard_common::types::string::AtUri<'a>,
55
+
#[serde(borrow)]
56
+
pub value: Pull<'a>,
57
+
}
58
+
59
+
/// Marker type for deserializing records from this collection.
60
+
pub struct PullRecord;
61
+
impl jacquard_common::xrpc::XrpcResp for PullRecord {
62
+
const NSID: &'static str = "sh.tangled.repo.pull";
63
+
const ENCODING: &'static str = "application/json";
64
+
type Output<'de> = PullGetRecordOutput<'de>;
65
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
66
+
}
67
+
38
68
impl jacquard_common::types::collection::Collection for Pull<'_> {
39
69
const NSID: &'static str = "sh.tangled.repo.pull";
70
+
type Record = PullRecord;
71
+
}
72
+
73
+
impl From<PullGetRecordOutput<'_>> for Pull<'static> {
74
+
fn from(output: PullGetRecordOutput<'_>) -> Self {
75
+
use jacquard_common::IntoStatic;
76
+
output.value.into_static()
77
+
}
40
78
}
41
79
42
80
#[jacquard_derive::lexicon]
+38
crates/jacquard-api/src/sh_tangled/repo/pull/comment.rs
+38
crates/jacquard-api/src/sh_tangled/repo/pull/comment.rs
···
24
24
pub pull: jacquard_common::types::string::AtUri<'a>,
25
25
}
26
26
27
+
/// Typed wrapper for GetRecord response with this collection's record type.
28
+
#[derive(
29
+
serde::Serialize,
30
+
serde::Deserialize,
31
+
Debug,
32
+
Clone,
33
+
PartialEq,
34
+
Eq,
35
+
jacquard_derive::IntoStatic
36
+
)]
37
+
#[serde(rename_all = "camelCase")]
38
+
pub struct CommentGetRecordOutput<'a> {
39
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
40
+
#[serde(borrow)]
41
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
42
+
#[serde(borrow)]
43
+
pub uri: jacquard_common::types::string::AtUri<'a>,
44
+
#[serde(borrow)]
45
+
pub value: Comment<'a>,
46
+
}
47
+
48
+
/// Marker type for deserializing records from this collection.
49
+
pub struct CommentRecord;
50
+
impl jacquard_common::xrpc::XrpcResp for CommentRecord {
51
+
const NSID: &'static str = "sh.tangled.repo.pull.comment";
52
+
const ENCODING: &'static str = "application/json";
53
+
type Output<'de> = CommentGetRecordOutput<'de>;
54
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
55
+
}
56
+
27
57
impl jacquard_common::types::collection::Collection for Comment<'_> {
28
58
const NSID: &'static str = "sh.tangled.repo.pull.comment";
59
+
type Record = CommentRecord;
60
+
}
61
+
62
+
impl From<CommentGetRecordOutput<'_>> for Comment<'static> {
63
+
fn from(output: CommentGetRecordOutput<'_>) -> Self {
64
+
use jacquard_common::IntoStatic;
65
+
output.value.into_static()
66
+
}
29
67
}
+38
crates/jacquard-api/src/sh_tangled/repo/pull/status.rs
+38
crates/jacquard-api/src/sh_tangled/repo/pull/status.rs
···
28
28
pub status: jacquard_common::CowStr<'a>,
29
29
}
30
30
31
+
/// Typed wrapper for GetRecord response with this collection's record type.
32
+
#[derive(
33
+
serde::Serialize,
34
+
serde::Deserialize,
35
+
Debug,
36
+
Clone,
37
+
PartialEq,
38
+
Eq,
39
+
jacquard_derive::IntoStatic
40
+
)]
41
+
#[serde(rename_all = "camelCase")]
42
+
pub struct StatusGetRecordOutput<'a> {
43
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
44
+
#[serde(borrow)]
45
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
46
+
#[serde(borrow)]
47
+
pub uri: jacquard_common::types::string::AtUri<'a>,
48
+
#[serde(borrow)]
49
+
pub value: Status<'a>,
50
+
}
51
+
52
+
/// Marker type for deserializing records from this collection.
53
+
pub struct StatusRecord;
54
+
impl jacquard_common::xrpc::XrpcResp for StatusRecord {
55
+
const NSID: &'static str = "sh.tangled.repo.pull.status";
56
+
const ENCODING: &'static str = "application/json";
57
+
type Output<'de> = StatusGetRecordOutput<'de>;
58
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
59
+
}
60
+
31
61
impl jacquard_common::types::collection::Collection for Status<'_> {
32
62
const NSID: &'static str = "sh.tangled.repo.pull.status";
63
+
type Record = StatusRecord;
64
+
}
65
+
66
+
impl From<StatusGetRecordOutput<'_>> for Status<'static> {
67
+
fn from(output: StatusGetRecordOutput<'_>) -> Self {
68
+
use jacquard_common::IntoStatic;
69
+
output.value.into_static()
70
+
}
33
71
}
+38
crates/jacquard-api/src/sh_tangled/spindle.rs
+38
crates/jacquard-api/src/sh_tangled/spindle.rs
···
22
22
pub created_at: jacquard_common::types::string::Datetime,
23
23
}
24
24
25
+
/// Typed wrapper for GetRecord response with this collection's record type.
26
+
#[derive(
27
+
serde::Serialize,
28
+
serde::Deserialize,
29
+
Debug,
30
+
Clone,
31
+
PartialEq,
32
+
Eq,
33
+
jacquard_derive::IntoStatic
34
+
)]
35
+
#[serde(rename_all = "camelCase")]
36
+
pub struct SpindleGetRecordOutput<'a> {
37
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
38
+
#[serde(borrow)]
39
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
40
+
#[serde(borrow)]
41
+
pub uri: jacquard_common::types::string::AtUri<'a>,
42
+
#[serde(borrow)]
43
+
pub value: Spindle<'a>,
44
+
}
45
+
46
+
/// Marker type for deserializing records from this collection.
47
+
pub struct SpindleRecord;
48
+
impl jacquard_common::xrpc::XrpcResp for SpindleRecord {
49
+
const NSID: &'static str = "sh.tangled.spindle";
50
+
const ENCODING: &'static str = "application/json";
51
+
type Output<'de> = SpindleGetRecordOutput<'de>;
52
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
53
+
}
54
+
25
55
impl jacquard_common::types::collection::Collection for Spindle<'_> {
26
56
const NSID: &'static str = "sh.tangled.spindle";
57
+
type Record = SpindleRecord;
58
+
}
59
+
60
+
impl From<SpindleGetRecordOutput<'_>> for Spindle<'static> {
61
+
fn from(output: SpindleGetRecordOutput<'_>) -> Self {
62
+
use jacquard_common::IntoStatic;
63
+
output.value.into_static()
64
+
}
27
65
}
+38
crates/jacquard-api/src/sh_tangled/spindle/member.rs
+38
crates/jacquard-api/src/sh_tangled/spindle/member.rs
···
25
25
pub subject: jacquard_common::types::string::Did<'a>,
26
26
}
27
27
28
+
/// Typed wrapper for GetRecord response with this collection's record type.
29
+
#[derive(
30
+
serde::Serialize,
31
+
serde::Deserialize,
32
+
Debug,
33
+
Clone,
34
+
PartialEq,
35
+
Eq,
36
+
jacquard_derive::IntoStatic
37
+
)]
38
+
#[serde(rename_all = "camelCase")]
39
+
pub struct MemberGetRecordOutput<'a> {
40
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
41
+
#[serde(borrow)]
42
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
43
+
#[serde(borrow)]
44
+
pub uri: jacquard_common::types::string::AtUri<'a>,
45
+
#[serde(borrow)]
46
+
pub value: Member<'a>,
47
+
}
48
+
49
+
/// Marker type for deserializing records from this collection.
50
+
pub struct MemberRecord;
51
+
impl jacquard_common::xrpc::XrpcResp for MemberRecord {
52
+
const NSID: &'static str = "sh.tangled.spindle.member";
53
+
const ENCODING: &'static str = "application/json";
54
+
type Output<'de> = MemberGetRecordOutput<'de>;
55
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
56
+
}
57
+
28
58
impl jacquard_common::types::collection::Collection for Member<'_> {
29
59
const NSID: &'static str = "sh.tangled.spindle.member";
60
+
type Record = MemberRecord;
61
+
}
62
+
63
+
impl From<MemberGetRecordOutput<'_>> for Member<'static> {
64
+
fn from(output: MemberGetRecordOutput<'_>) -> Self {
65
+
use jacquard_common::IntoStatic;
66
+
output.value.into_static()
67
+
}
30
68
}
+38
crates/jacquard-api/src/sh_tangled/string.rs
+38
crates/jacquard-api/src/sh_tangled/string.rs
···
26
26
pub filename: jacquard_common::CowStr<'a>,
27
27
}
28
28
29
+
/// Typed wrapper for GetRecord response with this collection's record type.
30
+
#[derive(
31
+
serde::Serialize,
32
+
serde::Deserialize,
33
+
Debug,
34
+
Clone,
35
+
PartialEq,
36
+
Eq,
37
+
jacquard_derive::IntoStatic
38
+
)]
39
+
#[serde(rename_all = "camelCase")]
40
+
pub struct StringGetRecordOutput<'a> {
41
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
42
+
#[serde(borrow)]
43
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
44
+
#[serde(borrow)]
45
+
pub uri: jacquard_common::types::string::AtUri<'a>,
46
+
#[serde(borrow)]
47
+
pub value: String<'a>,
48
+
}
49
+
50
+
/// Marker type for deserializing records from this collection.
51
+
pub struct StringRecord;
52
+
impl jacquard_common::xrpc::XrpcResp for StringRecord {
53
+
const NSID: &'static str = "sh.tangled.string";
54
+
const ENCODING: &'static str = "application/json";
55
+
type Output<'de> = StringGetRecordOutput<'de>;
56
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
57
+
}
58
+
29
59
impl jacquard_common::types::collection::Collection for String<'_> {
30
60
const NSID: &'static str = "sh.tangled.string";
61
+
type Record = StringRecord;
62
+
}
63
+
64
+
impl From<StringGetRecordOutput<'_>> for String<'static> {
65
+
fn from(output: StringGetRecordOutput<'_>) -> Self {
66
+
use jacquard_common::IntoStatic;
67
+
output.value.into_static()
68
+
}
31
69
}
+38
crates/jacquard-api/src/sh_weaver/actor/profile.rs
+38
crates/jacquard-api/src/sh_weaver/actor/profile.rs
···
57
57
pub tangled: std::option::Option<bool>,
58
58
}
59
59
60
+
/// Typed wrapper for GetRecord response with this collection's record type.
61
+
#[derive(
62
+
serde::Serialize,
63
+
serde::Deserialize,
64
+
Debug,
65
+
Clone,
66
+
PartialEq,
67
+
Eq,
68
+
jacquard_derive::IntoStatic
69
+
)]
70
+
#[serde(rename_all = "camelCase")]
71
+
pub struct ProfileGetRecordOutput<'a> {
72
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
73
+
#[serde(borrow)]
74
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
75
+
#[serde(borrow)]
76
+
pub uri: jacquard_common::types::string::AtUri<'a>,
77
+
#[serde(borrow)]
78
+
pub value: Profile<'a>,
79
+
}
80
+
81
+
/// Marker type for deserializing records from this collection.
82
+
pub struct ProfileRecord;
83
+
impl jacquard_common::xrpc::XrpcResp for ProfileRecord {
84
+
const NSID: &'static str = "sh.weaver.actor.profile";
85
+
const ENCODING: &'static str = "application/json";
86
+
type Output<'de> = ProfileGetRecordOutput<'de>;
87
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
88
+
}
89
+
60
90
impl jacquard_common::types::collection::Collection for Profile<'_> {
61
91
const NSID: &'static str = "sh.weaver.actor.profile";
92
+
type Record = ProfileRecord;
93
+
}
94
+
95
+
impl From<ProfileGetRecordOutput<'_>> for Profile<'static> {
96
+
fn from(output: ProfileGetRecordOutput<'_>) -> Self {
97
+
use jacquard_common::IntoStatic;
98
+
output.value.into_static()
99
+
}
62
100
}
63
101
64
102
pub type PronounsList<'a> = Vec<jacquard_common::CowStr<'a>>;
+38
crates/jacquard-api/src/sh_weaver/edit/cursor.rs
+38
crates/jacquard-api/src/sh_weaver/edit/cursor.rs
···
95
95
pub side: std::option::Option<crate::sh_weaver::edit::cursor::CursorSide<'a>>,
96
96
}
97
97
98
+
/// Typed wrapper for GetRecord response with this collection's record type.
99
+
#[derive(
100
+
serde::Serialize,
101
+
serde::Deserialize,
102
+
Debug,
103
+
Clone,
104
+
PartialEq,
105
+
Eq,
106
+
jacquard_derive::IntoStatic
107
+
)]
108
+
#[serde(rename_all = "camelCase")]
109
+
pub struct CursorGetRecordOutput<'a> {
110
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
111
+
#[serde(borrow)]
112
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
113
+
#[serde(borrow)]
114
+
pub uri: jacquard_common::types::string::AtUri<'a>,
115
+
#[serde(borrow)]
116
+
pub value: Cursor<'a>,
117
+
}
118
+
119
+
/// Marker type for deserializing records from this collection.
120
+
pub struct CursorRecord;
121
+
impl jacquard_common::xrpc::XrpcResp for CursorRecord {
122
+
const NSID: &'static str = "sh.weaver.edit.cursor";
123
+
const ENCODING: &'static str = "application/json";
124
+
type Output<'de> = CursorGetRecordOutput<'de>;
125
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
126
+
}
127
+
98
128
impl jacquard_common::types::collection::Collection for Cursor<'_> {
99
129
const NSID: &'static str = "sh.weaver.edit.cursor";
130
+
type Record = CursorRecord;
131
+
}
132
+
133
+
impl From<CursorGetRecordOutput<'_>> for Cursor<'static> {
134
+
fn from(output: CursorGetRecordOutput<'_>) -> Self {
135
+
use jacquard_common::IntoStatic;
136
+
output.value.into_static()
137
+
}
100
138
}
101
139
102
140
#[jacquard_derive::lexicon]
+38
crates/jacquard-api/src/sh_weaver/edit/diff.rs
+38
crates/jacquard-api/src/sh_weaver/edit/diff.rs
···
26
26
pub snapshot: jacquard_common::types::blob::Blob<'a>,
27
27
}
28
28
29
+
/// Typed wrapper for GetRecord response with this collection's record type.
30
+
#[derive(
31
+
serde::Serialize,
32
+
serde::Deserialize,
33
+
Debug,
34
+
Clone,
35
+
PartialEq,
36
+
Eq,
37
+
jacquard_derive::IntoStatic
38
+
)]
39
+
#[serde(rename_all = "camelCase")]
40
+
pub struct DiffGetRecordOutput<'a> {
41
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
42
+
#[serde(borrow)]
43
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
44
+
#[serde(borrow)]
45
+
pub uri: jacquard_common::types::string::AtUri<'a>,
46
+
#[serde(borrow)]
47
+
pub value: Diff<'a>,
48
+
}
49
+
50
+
/// Marker type for deserializing records from this collection.
51
+
pub struct DiffRecord;
52
+
impl jacquard_common::xrpc::XrpcResp for DiffRecord {
53
+
const NSID: &'static str = "sh.weaver.edit.diff";
54
+
const ENCODING: &'static str = "application/json";
55
+
type Output<'de> = DiffGetRecordOutput<'de>;
56
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
57
+
}
58
+
29
59
impl jacquard_common::types::collection::Collection for Diff<'_> {
30
60
const NSID: &'static str = "sh.weaver.edit.diff";
61
+
type Record = DiffRecord;
62
+
}
63
+
64
+
impl From<DiffGetRecordOutput<'_>> for Diff<'static> {
65
+
fn from(output: DiffGetRecordOutput<'_>) -> Self {
66
+
use jacquard_common::IntoStatic;
67
+
output.value.into_static()
68
+
}
31
69
}
+38
crates/jacquard-api/src/sh_weaver/edit/root.rs
+38
crates/jacquard-api/src/sh_weaver/edit/root.rs
···
28
28
pub uri: jacquard_common::types::string::AtUri<'a>,
29
29
}
30
30
31
+
/// Typed wrapper for GetRecord response with this collection's record type.
32
+
#[derive(
33
+
serde::Serialize,
34
+
serde::Deserialize,
35
+
Debug,
36
+
Clone,
37
+
PartialEq,
38
+
Eq,
39
+
jacquard_derive::IntoStatic
40
+
)]
41
+
#[serde(rename_all = "camelCase")]
42
+
pub struct RootGetRecordOutput<'a> {
43
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
44
+
#[serde(borrow)]
45
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
46
+
#[serde(borrow)]
47
+
pub uri: jacquard_common::types::string::AtUri<'a>,
48
+
#[serde(borrow)]
49
+
pub value: Root<'a>,
50
+
}
51
+
52
+
/// Marker type for deserializing records from this collection.
53
+
pub struct RootRecord;
54
+
impl jacquard_common::xrpc::XrpcResp for RootRecord {
55
+
const NSID: &'static str = "sh.weaver.edit.root";
56
+
const ENCODING: &'static str = "application/json";
57
+
type Output<'de> = RootGetRecordOutput<'de>;
58
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
59
+
}
60
+
31
61
impl jacquard_common::types::collection::Collection for Root<'_> {
32
62
const NSID: &'static str = "sh.weaver.edit.root";
63
+
type Record = RootRecord;
64
+
}
65
+
66
+
impl From<RootGetRecordOutput<'_>> for Root<'static> {
67
+
fn from(output: RootGetRecordOutput<'_>) -> Self {
68
+
use jacquard_common::IntoStatic;
69
+
output.value.into_static()
70
+
}
33
71
}
+38
crates/jacquard-api/src/sh_weaver/notebook/book.rs
+38
crates/jacquard-api/src/sh_weaver/notebook/book.rs
···
33
33
pub title: std::option::Option<crate::sh_weaver::notebook::Title<'a>>,
34
34
}
35
35
36
+
/// Typed wrapper for GetRecord response with this collection's record type.
37
+
#[derive(
38
+
serde::Serialize,
39
+
serde::Deserialize,
40
+
Debug,
41
+
Clone,
42
+
PartialEq,
43
+
Eq,
44
+
jacquard_derive::IntoStatic
45
+
)]
46
+
#[serde(rename_all = "camelCase")]
47
+
pub struct BookGetRecordOutput<'a> {
48
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
49
+
#[serde(borrow)]
50
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
51
+
#[serde(borrow)]
52
+
pub uri: jacquard_common::types::string::AtUri<'a>,
53
+
#[serde(borrow)]
54
+
pub value: Book<'a>,
55
+
}
56
+
57
+
/// Marker type for deserializing records from this collection.
58
+
pub struct BookRecord;
59
+
impl jacquard_common::xrpc::XrpcResp for BookRecord {
60
+
const NSID: &'static str = "sh.weaver.notebook.book";
61
+
const ENCODING: &'static str = "application/json";
62
+
type Output<'de> = BookGetRecordOutput<'de>;
63
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
64
+
}
65
+
36
66
impl jacquard_common::types::collection::Collection for Book<'_> {
37
67
const NSID: &'static str = "sh.weaver.notebook.book";
68
+
type Record = BookRecord;
69
+
}
70
+
71
+
impl From<BookGetRecordOutput<'_>> for Book<'static> {
72
+
fn from(output: BookGetRecordOutput<'_>) -> Self {
73
+
use jacquard_common::IntoStatic;
74
+
output.value.into_static()
75
+
}
38
76
}
+38
crates/jacquard-api/src/sh_weaver/notebook/chapter.rs
+38
crates/jacquard-api/src/sh_weaver/notebook/chapter.rs
···
34
34
pub title: std::option::Option<crate::sh_weaver::notebook::Title<'a>>,
35
35
}
36
36
37
+
/// Typed wrapper for GetRecord response with this collection's record type.
38
+
#[derive(
39
+
serde::Serialize,
40
+
serde::Deserialize,
41
+
Debug,
42
+
Clone,
43
+
PartialEq,
44
+
Eq,
45
+
jacquard_derive::IntoStatic
46
+
)]
47
+
#[serde(rename_all = "camelCase")]
48
+
pub struct ChapterGetRecordOutput<'a> {
49
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
50
+
#[serde(borrow)]
51
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
52
+
#[serde(borrow)]
53
+
pub uri: jacquard_common::types::string::AtUri<'a>,
54
+
#[serde(borrow)]
55
+
pub value: Chapter<'a>,
56
+
}
57
+
58
+
/// Marker type for deserializing records from this collection.
59
+
pub struct ChapterRecord;
60
+
impl jacquard_common::xrpc::XrpcResp for ChapterRecord {
61
+
const NSID: &'static str = "sh.weaver.notebook.chapter";
62
+
const ENCODING: &'static str = "application/json";
63
+
type Output<'de> = ChapterGetRecordOutput<'de>;
64
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
65
+
}
66
+
37
67
impl jacquard_common::types::collection::Collection for Chapter<'_> {
38
68
const NSID: &'static str = "sh.weaver.notebook.chapter";
69
+
type Record = ChapterRecord;
70
+
}
71
+
72
+
impl From<ChapterGetRecordOutput<'_>> for Chapter<'static> {
73
+
fn from(output: ChapterGetRecordOutput<'_>) -> Self {
74
+
use jacquard_common::IntoStatic;
75
+
output.value.into_static()
76
+
}
39
77
}
+38
crates/jacquard-api/src/sh_weaver/notebook/entry.rs
+38
crates/jacquard-api/src/sh_weaver/notebook/entry.rs
···
34
34
pub title: crate::sh_weaver::notebook::Title<'a>,
35
35
}
36
36
37
+
/// Typed wrapper for GetRecord response with this collection's record type.
38
+
#[derive(
39
+
serde::Serialize,
40
+
serde::Deserialize,
41
+
Debug,
42
+
Clone,
43
+
PartialEq,
44
+
Eq,
45
+
jacquard_derive::IntoStatic
46
+
)]
47
+
#[serde(rename_all = "camelCase")]
48
+
pub struct EntryGetRecordOutput<'a> {
49
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
50
+
#[serde(borrow)]
51
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
52
+
#[serde(borrow)]
53
+
pub uri: jacquard_common::types::string::AtUri<'a>,
54
+
#[serde(borrow)]
55
+
pub value: Entry<'a>,
56
+
}
57
+
58
+
/// Marker type for deserializing records from this collection.
59
+
pub struct EntryRecord;
60
+
impl jacquard_common::xrpc::XrpcResp for EntryRecord {
61
+
const NSID: &'static str = "sh.weaver.notebook.entry";
62
+
const ENCODING: &'static str = "application/json";
63
+
type Output<'de> = EntryGetRecordOutput<'de>;
64
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
65
+
}
66
+
37
67
impl jacquard_common::types::collection::Collection for Entry<'_> {
38
68
const NSID: &'static str = "sh.weaver.notebook.entry";
69
+
type Record = EntryRecord;
70
+
}
71
+
72
+
impl From<EntryGetRecordOutput<'_>> for Entry<'static> {
73
+
fn from(output: EntryGetRecordOutput<'_>) -> Self {
74
+
use jacquard_common::IntoStatic;
75
+
output.value.into_static()
76
+
}
39
77
}
+38
crates/jacquard-api/src/sh_weaver/publish/blob.rs
+38
crates/jacquard-api/src/sh_weaver/publish/blob.rs
···
23
23
pub upload: jacquard_common::types::blob::Blob<'a>,
24
24
}
25
25
26
+
/// Typed wrapper for GetRecord response with this collection's record type.
27
+
#[derive(
28
+
serde::Serialize,
29
+
serde::Deserialize,
30
+
Debug,
31
+
Clone,
32
+
PartialEq,
33
+
Eq,
34
+
jacquard_derive::IntoStatic
35
+
)]
36
+
#[serde(rename_all = "camelCase")]
37
+
pub struct BlobGetRecordOutput<'a> {
38
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
39
+
#[serde(borrow)]
40
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
41
+
#[serde(borrow)]
42
+
pub uri: jacquard_common::types::string::AtUri<'a>,
43
+
#[serde(borrow)]
44
+
pub value: Blob<'a>,
45
+
}
46
+
47
+
/// Marker type for deserializing records from this collection.
48
+
pub struct BlobRecord;
49
+
impl jacquard_common::xrpc::XrpcResp for BlobRecord {
50
+
const NSID: &'static str = "sh.weaver.publish.blob";
51
+
const ENCODING: &'static str = "application/json";
52
+
type Output<'de> = BlobGetRecordOutput<'de>;
53
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
54
+
}
55
+
26
56
impl jacquard_common::types::collection::Collection for Blob<'_> {
27
57
const NSID: &'static str = "sh.weaver.publish.blob";
58
+
type Record = BlobRecord;
59
+
}
60
+
61
+
impl From<BlobGetRecordOutput<'_>> for Blob<'static> {
62
+
fn from(output: BlobGetRecordOutput<'_>) -> Self {
63
+
use jacquard_common::IntoStatic;
64
+
output.value.into_static()
65
+
}
28
66
}
+38
crates/jacquard-api/src/tools_smokesignal/blahg/content/post.rs
+38
crates/jacquard-api/src/tools_smokesignal/blahg/content/post.rs
···
57
57
pub title: std::option::Option<jacquard_common::CowStr<'a>>,
58
58
}
59
59
60
+
/// Typed wrapper for GetRecord response with this collection's record type.
61
+
#[derive(
62
+
serde::Serialize,
63
+
serde::Deserialize,
64
+
Debug,
65
+
Clone,
66
+
PartialEq,
67
+
Eq,
68
+
jacquard_derive::IntoStatic
69
+
)]
70
+
#[serde(rename_all = "camelCase")]
71
+
pub struct PostGetRecordOutput<'a> {
72
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
73
+
#[serde(borrow)]
74
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
75
+
#[serde(borrow)]
76
+
pub uri: jacquard_common::types::string::AtUri<'a>,
77
+
#[serde(borrow)]
78
+
pub value: Post<'a>,
79
+
}
80
+
81
+
/// Marker type for deserializing records from this collection.
82
+
pub struct PostRecord;
83
+
impl jacquard_common::xrpc::XrpcResp for PostRecord {
84
+
const NSID: &'static str = "tools.smokesignal.blahg.content.post";
85
+
const ENCODING: &'static str = "application/json";
86
+
type Output<'de> = PostGetRecordOutput<'de>;
87
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
88
+
}
89
+
60
90
impl jacquard_common::types::collection::Collection for Post<'_> {
61
91
const NSID: &'static str = "tools.smokesignal.blahg.content.post";
92
+
type Record = PostRecord;
93
+
}
94
+
95
+
impl From<PostGetRecordOutput<'_>> for Post<'static> {
96
+
fn from(output: PostGetRecordOutput<'_>) -> Self {
97
+
use jacquard_common::IntoStatic;
98
+
output.value.into_static()
99
+
}
62
100
}
+38
crates/jacquard-api/src/uk_ewancroft/now.rs
+38
crates/jacquard-api/src/uk_ewancroft/now.rs
···
24
24
pub text: jacquard_common::CowStr<'a>,
25
25
}
26
26
27
+
/// Typed wrapper for GetRecord response with this collection's record type.
28
+
#[derive(
29
+
serde::Serialize,
30
+
serde::Deserialize,
31
+
Debug,
32
+
Clone,
33
+
PartialEq,
34
+
Eq,
35
+
jacquard_derive::IntoStatic
36
+
)]
37
+
#[serde(rename_all = "camelCase")]
38
+
pub struct NowGetRecordOutput<'a> {
39
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
40
+
#[serde(borrow)]
41
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
42
+
#[serde(borrow)]
43
+
pub uri: jacquard_common::types::string::AtUri<'a>,
44
+
#[serde(borrow)]
45
+
pub value: Now<'a>,
46
+
}
47
+
48
+
/// Marker type for deserializing records from this collection.
49
+
pub struct NowRecord;
50
+
impl jacquard_common::xrpc::XrpcResp for NowRecord {
51
+
const NSID: &'static str = "uk.ewancroft.now";
52
+
const ENCODING: &'static str = "application/json";
53
+
type Output<'de> = NowGetRecordOutput<'de>;
54
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
55
+
}
56
+
27
57
impl jacquard_common::types::collection::Collection for Now<'_> {
28
58
const NSID: &'static str = "uk.ewancroft.now";
59
+
type Record = NowRecord;
60
+
}
61
+
62
+
impl From<NowGetRecordOutput<'_>> for Now<'static> {
63
+
fn from(output: NowGetRecordOutput<'_>) -> Self {
64
+
use jacquard_common::IntoStatic;
65
+
output.value.into_static()
66
+
}
29
67
}
+38
crates/jacquard-api/src/uk_skyblur/post.rs
+38
crates/jacquard-api/src/uk_skyblur/post.rs
···
42
42
pub visibility: jacquard_common::CowStr<'a>,
43
43
}
44
44
45
+
/// Typed wrapper for GetRecord response with this collection's record type.
46
+
#[derive(
47
+
serde::Serialize,
48
+
serde::Deserialize,
49
+
Debug,
50
+
Clone,
51
+
PartialEq,
52
+
Eq,
53
+
jacquard_derive::IntoStatic
54
+
)]
55
+
#[serde(rename_all = "camelCase")]
56
+
pub struct PostGetRecordOutput<'a> {
57
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
58
+
#[serde(borrow)]
59
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
60
+
#[serde(borrow)]
61
+
pub uri: jacquard_common::types::string::AtUri<'a>,
62
+
#[serde(borrow)]
63
+
pub value: Post<'a>,
64
+
}
65
+
66
+
/// Marker type for deserializing records from this collection.
67
+
pub struct PostRecord;
68
+
impl jacquard_common::xrpc::XrpcResp for PostRecord {
69
+
const NSID: &'static str = "uk.skyblur.post";
70
+
const ENCODING: &'static str = "application/json";
71
+
type Output<'de> = PostGetRecordOutput<'de>;
72
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
73
+
}
74
+
45
75
impl jacquard_common::types::collection::Collection for Post<'_> {
46
76
const NSID: &'static str = "uk.skyblur.post";
77
+
type Record = PostRecord;
78
+
}
79
+
80
+
impl From<PostGetRecordOutput<'_>> for Post<'static> {
81
+
fn from(output: PostGetRecordOutput<'_>) -> Self {
82
+
use jacquard_common::IntoStatic;
83
+
output.value.into_static()
84
+
}
47
85
}
+38
crates/jacquard-api/src/uk_skyblur/preference.rs
+38
crates/jacquard-api/src/uk_skyblur/preference.rs
···
22
22
pub my_page: crate::uk_skyblur::preference::MyPage<'a>,
23
23
}
24
24
25
+
/// Typed wrapper for GetRecord response with this collection's record type.
26
+
#[derive(
27
+
serde::Serialize,
28
+
serde::Deserialize,
29
+
Debug,
30
+
Clone,
31
+
PartialEq,
32
+
Eq,
33
+
jacquard_derive::IntoStatic
34
+
)]
35
+
#[serde(rename_all = "camelCase")]
36
+
pub struct PreferenceGetRecordOutput<'a> {
37
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
38
+
#[serde(borrow)]
39
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
40
+
#[serde(borrow)]
41
+
pub uri: jacquard_common::types::string::AtUri<'a>,
42
+
#[serde(borrow)]
43
+
pub value: Preference<'a>,
44
+
}
45
+
46
+
/// Marker type for deserializing records from this collection.
47
+
pub struct PreferenceRecord;
48
+
impl jacquard_common::xrpc::XrpcResp for PreferenceRecord {
49
+
const NSID: &'static str = "uk.skyblur.preference";
50
+
const ENCODING: &'static str = "application/json";
51
+
type Output<'de> = PreferenceGetRecordOutput<'de>;
52
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
53
+
}
54
+
25
55
impl jacquard_common::types::collection::Collection for Preference<'_> {
26
56
const NSID: &'static str = "uk.skyblur.preference";
57
+
type Record = PreferenceRecord;
58
+
}
59
+
60
+
impl From<PreferenceGetRecordOutput<'_>> for Preference<'static> {
61
+
fn from(output: PreferenceGetRecordOutput<'_>) -> Self {
62
+
use jacquard_common::IntoStatic;
63
+
output.value.into_static()
64
+
}
27
65
}
28
66
29
67
#[jacquard_derive::lexicon]
+38
crates/jacquard-api/src/us_polhem/blog/content.rs
+38
crates/jacquard-api/src/us_polhem/blog/content.rs
···
28
28
pub slug: jacquard_common::CowStr<'a>,
29
29
}
30
30
31
+
/// Typed wrapper for GetRecord response with this collection's record type.
32
+
#[derive(
33
+
serde::Serialize,
34
+
serde::Deserialize,
35
+
Debug,
36
+
Clone,
37
+
PartialEq,
38
+
Eq,
39
+
jacquard_derive::IntoStatic
40
+
)]
41
+
#[serde(rename_all = "camelCase")]
42
+
pub struct ContentGetRecordOutput<'a> {
43
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
44
+
#[serde(borrow)]
45
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
46
+
#[serde(borrow)]
47
+
pub uri: jacquard_common::types::string::AtUri<'a>,
48
+
#[serde(borrow)]
49
+
pub value: Content<'a>,
50
+
}
51
+
52
+
/// Marker type for deserializing records from this collection.
53
+
pub struct ContentRecord;
54
+
impl jacquard_common::xrpc::XrpcResp for ContentRecord {
55
+
const NSID: &'static str = "us.polhem.blog.content";
56
+
const ENCODING: &'static str = "application/json";
57
+
type Output<'de> = ContentGetRecordOutput<'de>;
58
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
59
+
}
60
+
31
61
impl jacquard_common::types::collection::Collection for Content<'_> {
32
62
const NSID: &'static str = "us.polhem.blog.content";
63
+
type Record = ContentRecord;
64
+
}
65
+
66
+
impl From<ContentGetRecordOutput<'_>> for Content<'static> {
67
+
fn from(output: ContentGetRecordOutput<'_>) -> Self {
68
+
use jacquard_common::IntoStatic;
69
+
output.value.into_static()
70
+
}
33
71
}
+38
crates/jacquard-api/src/us_polhem/blog/post.rs
+38
crates/jacquard-api/src/us_polhem/blog/post.rs
···
43
43
pub visibility: std::option::Option<jacquard_common::CowStr<'a>>,
44
44
}
45
45
46
+
/// Typed wrapper for GetRecord response with this collection's record type.
47
+
#[derive(
48
+
serde::Serialize,
49
+
serde::Deserialize,
50
+
Debug,
51
+
Clone,
52
+
PartialEq,
53
+
Eq,
54
+
jacquard_derive::IntoStatic
55
+
)]
56
+
#[serde(rename_all = "camelCase")]
57
+
pub struct PostGetRecordOutput<'a> {
58
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
59
+
#[serde(borrow)]
60
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
61
+
#[serde(borrow)]
62
+
pub uri: jacquard_common::types::string::AtUri<'a>,
63
+
#[serde(borrow)]
64
+
pub value: Post<'a>,
65
+
}
66
+
67
+
/// Marker type for deserializing records from this collection.
68
+
pub struct PostRecord;
69
+
impl jacquard_common::xrpc::XrpcResp for PostRecord {
70
+
const NSID: &'static str = "us.polhem.blog.post";
71
+
const ENCODING: &'static str = "application/json";
72
+
type Output<'de> = PostGetRecordOutput<'de>;
73
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
74
+
}
75
+
46
76
impl jacquard_common::types::collection::Collection for Post<'_> {
47
77
const NSID: &'static str = "us.polhem.blog.post";
78
+
type Record = PostRecord;
79
+
}
80
+
81
+
impl From<PostGetRecordOutput<'_>> for Post<'static> {
82
+
fn from(output: PostGetRecordOutput<'_>) -> Self {
83
+
use jacquard_common::IntoStatic;
84
+
output.value.into_static()
85
+
}
48
86
}
+38
crates/jacquard-api/src/us_polhem/blog/tag.rs
+38
crates/jacquard-api/src/us_polhem/blog/tag.rs
···
27
27
pub slug: jacquard_common::CowStr<'a>,
28
28
}
29
29
30
+
/// Typed wrapper for GetRecord response with this collection's record type.
31
+
#[derive(
32
+
serde::Serialize,
33
+
serde::Deserialize,
34
+
Debug,
35
+
Clone,
36
+
PartialEq,
37
+
Eq,
38
+
jacquard_derive::IntoStatic
39
+
)]
40
+
#[serde(rename_all = "camelCase")]
41
+
pub struct TagGetRecordOutput<'a> {
42
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
43
+
#[serde(borrow)]
44
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
45
+
#[serde(borrow)]
46
+
pub uri: jacquard_common::types::string::AtUri<'a>,
47
+
#[serde(borrow)]
48
+
pub value: Tag<'a>,
49
+
}
50
+
51
+
/// Marker type for deserializing records from this collection.
52
+
pub struct TagRecord;
53
+
impl jacquard_common::xrpc::XrpcResp for TagRecord {
54
+
const NSID: &'static str = "us.polhem.blog.tag";
55
+
const ENCODING: &'static str = "application/json";
56
+
type Output<'de> = TagGetRecordOutput<'de>;
57
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
58
+
}
59
+
30
60
impl jacquard_common::types::collection::Collection for Tag<'_> {
31
61
const NSID: &'static str = "us.polhem.blog.tag";
62
+
type Record = TagRecord;
63
+
}
64
+
65
+
impl From<TagGetRecordOutput<'_>> for Tag<'static> {
66
+
fn from(output: TagGetRecordOutput<'_>) -> Self {
67
+
use jacquard_common::IntoStatic;
68
+
output.value.into_static()
69
+
}
32
70
}
+38
crates/jacquard-api/src/win_tomo_x/pushat/allow.rs
+38
crates/jacquard-api/src/win_tomo_x/pushat/allow.rs
···
24
24
pub created_at: jacquard_common::types::string::Datetime,
25
25
}
26
26
27
+
/// Typed wrapper for GetRecord response with this collection's record type.
28
+
#[derive(
29
+
serde::Serialize,
30
+
serde::Deserialize,
31
+
Debug,
32
+
Clone,
33
+
PartialEq,
34
+
Eq,
35
+
jacquard_derive::IntoStatic
36
+
)]
37
+
#[serde(rename_all = "camelCase")]
38
+
pub struct AllowGetRecordOutput<'a> {
39
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
40
+
#[serde(borrow)]
41
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
42
+
#[serde(borrow)]
43
+
pub uri: jacquard_common::types::string::AtUri<'a>,
44
+
#[serde(borrow)]
45
+
pub value: Allow<'a>,
46
+
}
47
+
48
+
/// Marker type for deserializing records from this collection.
49
+
pub struct AllowRecord;
50
+
impl jacquard_common::xrpc::XrpcResp for AllowRecord {
51
+
const NSID: &'static str = "win.tomo-x.pushat.allow";
52
+
const ENCODING: &'static str = "application/json";
53
+
type Output<'de> = AllowGetRecordOutput<'de>;
54
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
55
+
}
56
+
27
57
impl jacquard_common::types::collection::Collection for Allow<'_> {
28
58
const NSID: &'static str = "win.tomo-x.pushat.allow";
59
+
type Record = AllowRecord;
60
+
}
61
+
62
+
impl From<AllowGetRecordOutput<'_>> for Allow<'static> {
63
+
fn from(output: AllowGetRecordOutput<'_>) -> Self {
64
+
use jacquard_common::IntoStatic;
65
+
output.value.into_static()
66
+
}
29
67
}
+4
-4
crates/jacquard-axum/Cargo.toml
+4
-4
crates/jacquard-axum/Cargo.toml
+84
crates/jacquard-axum/src/lib.rs
+84
crates/jacquard-axum/src/lib.rs
···
1
+
//! # Axum helpers for jacquard XRPC server implementations
2
+
//!
3
+
//! ## Usage
4
+
//!
5
+
//! ```no_run
6
+
//! use axum::{Router, routing::get, http::StatusCode, response::IntoResponse, Json};
7
+
//! use jacquard_axum::{ ExtractXrpc, IntoRouter };
8
+
//! use std::collections::BTreeMap;
9
+
//! use miette::{IntoDiagnostic, Result};
10
+
//! use jacquard::api::com_atproto::identity::resolve_handle::{ResolveHandle, ResolveHandleRequest, ResolveHandleOutput};
11
+
//! use jacquard_common::types::string::Did;
12
+
//!
13
+
//! async fn handle_resolve(
14
+
//! ExtractXrpc(req): ExtractXrpc<ResolveHandleRequest>
15
+
//! ) -> Result<Json<ResolveHandleOutput<'static>>, StatusCode> {
16
+
//! // req is ResolveHandle<'static>, ready to use
17
+
//! let handle = req.handle;
18
+
//! // ... resolve logic
19
+
//! # let output = ResolveHandleOutput { did: Did::new_static("did:plc:test").unwrap(), extra_data: BTreeMap::new() };
20
+
//! Ok(Json(output))
21
+
//! }
22
+
//!
23
+
//! #[tokio::main]
24
+
//! async fn main() -> Result<()> {
25
+
//! let app = Router::new()
26
+
//! .route("/", axum::routing::get(|| async { "hello world!" }))
27
+
//! .merge(ResolveHandleRequest::into_router(handle_resolve));
28
+
//!
29
+
//! let listener = tokio::net::TcpListener::bind("0.0.0.0:3000")
30
+
//! .await
31
+
//! .into_diagnostic()?;
32
+
//! axum::serve(listener, app).await.unwrap();
33
+
//! Ok(())
34
+
//! }
35
+
//! ```
36
+
//!
37
+
//!
38
+
//! The extractor uses the [`XrpcEndpoint`] trait to determine request type:
39
+
//! - **Query**: Deserializes from query string parameters
40
+
//! - **Procedure**: Deserializes from request body (supports custom encodings via `decode_body`)
41
+
//!
42
+
//! Deserialization errors return a 400 Bad Request with a JSON error body matching
43
+
//! the XRPC error format.
44
+
//!
45
+
//! The extractor deserializes to borrowed types first, then converts to `'static` via
46
+
//! [`IntoStatic`], avoiding the DeserializeOwned requirement of the Json axum extractor and similar.
47
+
1
48
use axum::{
49
+
Router,
2
50
body::Bytes,
3
51
extract::{FromRequest, Request},
4
52
http::StatusCode,
···
9
57
xrpc::{XrpcEndpoint, XrpcMethod, XrpcRequest},
10
58
};
11
59
use serde_json::json;
60
+
61
+
/// Axum extractor for XRPC requests
62
+
///
63
+
/// Deserializes incoming requests based on the endpoint's method type (Query or Procedure)
64
+
/// and returns the owned (`'static`) request type ready for handler logic.
12
65
13
66
pub struct ExtractXrpc<E: XrpcEndpoint>(pub E::Request<'static>);
14
67
···
86
139
#[error("UTF-8 decode error: {0}")]
87
140
Utf8DecodeError(std::string::FromUtf8Error),
88
141
}
142
+
143
+
/// Conversion trait to turn an XrpcEndpoint and a handler into an axum Router
144
+
pub trait IntoRouter {
145
+
fn into_router<T, S, U>(handler: U) -> Router<S>
146
+
where
147
+
T: 'static,
148
+
S: Clone + Send + Sync + 'static,
149
+
U: axum::handler::Handler<T, S>;
150
+
}
151
+
152
+
impl<X> IntoRouter for X
153
+
where
154
+
X: XrpcEndpoint,
155
+
{
156
+
/// Creates an axum router that will invoke `handler` in response to xrpc
157
+
/// request `X`.
158
+
fn into_router<T, S, U>(handler: U) -> Router<S>
159
+
where
160
+
T: 'static,
161
+
S: Clone + Send + Sync + 'static,
162
+
U: axum::handler::Handler<T, S>,
163
+
{
164
+
Router::new().route(
165
+
X::PATH,
166
+
(match X::METHOD {
167
+
XrpcMethod::Query => axum::routing::get,
168
+
XrpcMethod::Procedure(_) => axum::routing::post,
169
+
})(handler),
170
+
)
171
+
}
172
+
}
-73
crates/jacquard-axum/src/main.rs
-73
crates/jacquard-axum/src/main.rs
···
1
-
use axum::{Router, response::IntoResponse};
2
-
use jacquard::{
3
-
IntoStatic,
4
-
api::com_atproto::identity::resolve_did::{ResolveDid, ResolveDidOutput, ResolveDidRequest},
5
-
identity::resolver::IdentityResolver,
6
-
types::value::Data,
7
-
xrpc::XrpcEndpoint,
8
-
};
9
-
use jacquard_axum::ExtractXrpc;
10
-
use jacquard_common::xrpc::XrpcMethod;
11
-
use miette::{IntoDiagnostic, Result};
12
-
use tracing_subscriber::EnvFilter;
13
-
14
-
trait IntoRouter {
15
-
fn into_router<T, S, U>(handler: U) -> Router<S>
16
-
where
17
-
T: 'static,
18
-
S: Clone + Send + Sync + 'static,
19
-
U: axum::handler::Handler<T, S>;
20
-
}
21
-
22
-
impl<X> IntoRouter for X
23
-
where
24
-
X: XrpcEndpoint,
25
-
{
26
-
/// Creates an axum router that will invoke `handler` in response to xrpc
27
-
/// request `X`.
28
-
fn into_router<T, S, U>(handler: U) -> Router<S>
29
-
where
30
-
T: 'static,
31
-
S: Clone + Send + Sync + 'static,
32
-
U: axum::handler::Handler<T, S>,
33
-
{
34
-
Router::new().route(
35
-
X::PATH,
36
-
(match X::METHOD {
37
-
XrpcMethod::Query => axum::routing::get,
38
-
XrpcMethod::Procedure(_) => axum::routing::post,
39
-
})(handler),
40
-
)
41
-
}
42
-
}
43
-
44
-
#[axum_macros::debug_handler]
45
-
async fn handler(ExtractXrpc(args): ExtractXrpc<ResolveDidRequest>) -> &'static str {
46
-
"hello world!"
47
-
// let res = jacquard::identity::slingshot_resolver_default();
48
-
// let doc = res.resolve_did_doc(&args.did).await?;
49
-
// let valid_doc = doc.parse()?;
50
-
// let doc_value = serde_json::to_value(valid_doc).unwrap();
51
-
// Ok(ResolveDidOutput {
52
-
// did_doc: Data::from_json(&doc_value).unwrap().into_static(),
53
-
// extra_data: Default::default(),
54
-
// }
55
-
// .into())
56
-
}
57
-
58
-
#[tokio::main]
59
-
async fn main() -> Result<()> {
60
-
tracing_subscriber::fmt()
61
-
.with_timer(tracing_subscriber::fmt::time::UtcTime::rfc_3339())
62
-
.with_env_filter(EnvFilter::from_env("QDPDS_LOG"))
63
-
.init();
64
-
let app = Router::new()
65
-
.route("/", axum::routing::get(|| async { "hello world!" }))
66
-
.merge(ResolveDidRequest::into_router(handler))
67
-
.layer(tower_http::trace::TraceLayer::new_for_http());
68
-
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000")
69
-
.await
70
-
.into_diagnostic()?;
71
-
axum::serve(listener, app).await.unwrap();
72
-
Ok(())
73
-
}
-1
crates/jacquard-common/Cargo.toml
-1
crates/jacquard-common/Cargo.toml
+182
-2
crates/jacquard-common/src/lib.rs
+182
-2
crates/jacquard-common/src/lib.rs
···
1
-
//! Common types for the jacquard implementation of atproto
1
+
//! # Common types for the jacquard implementation of atproto
2
+
//!
3
+
//! ## Working with Lifetimes and Zero-Copy Deserialization
4
+
//!
5
+
//! Jacquard is designed around zero-copy deserialization: types like `Post<'de>` can borrow
6
+
//! strings and other data directly from the response buffer instead of allocating owned copies.
7
+
//! This is great for performance, but it creates some interesting challenges when combined with
8
+
//! async Rust and trait bounds.
9
+
//!
10
+
//! ### The Problem: Lifetimes + Async + Traits
11
+
//!
12
+
//! The naive approach would be to put a lifetime parameter on the trait itself:
13
+
//!
14
+
//! ```ignore
15
+
//! trait XrpcRequest<'de> {
16
+
//! type Output: Deserialize<'de>;
17
+
//! // ...
18
+
//! }
19
+
//! ```
20
+
//!
21
+
//! This looks reasonable until you try to use it in a generic context. If you have a function
22
+
//! that works with *any* lifetime, you need a Higher-Ranked Trait Bound (HRTB):
23
+
//!
24
+
//! ```ignore
25
+
//! fn foo<R>(response: &[u8])
26
+
//! where
27
+
//! R: for<'any> XrpcRequest<'any>
28
+
//! {
29
+
//! // deserialize from response...
30
+
//! }
31
+
//! ```
32
+
//!
33
+
//! The `for<'any>` bound says "this type must implement `XrpcRequest` for *every possible lifetime*",
34
+
//! which is effectively the same as requiring `DeserializeOwned`. You've just thrown away your
35
+
//! zero-copy optimization, and this also won't work on most of the types in jacquard. The vast
36
+
//! majority of them have either a custom Deserialize implementation which will borrow if it
37
+
//! can, a #[serde(borrow)] attribute on one or more fields, or an equivalent lifetime bound
38
+
//! attribute, associated with the Deserialize derive macro.
39
+
//!
40
+
//! It gets worse with async. If you want to return borrowed data from an async method, where does
41
+
//! the lifetime come from? The response buffer needs to outlive the borrow, but the buffer is
42
+
//! consumed by the HTTP call. You end up with "cannot infer appropriate lifetime" errors or even
43
+
//! more confusing errors because the compiler can't prove the buffer will stay alive. You *could*
44
+
//! do some lifetime laundering with `unsafe`, but you don't actually *need* to tell rustc to "trust
45
+
//! me, bro", you can, with some cleverness, explain this to the compiler in a way that it can
46
+
//! reason about perfectly well.
47
+
//!
48
+
//! ### Explaining where the buffer goes to `rustc`: GATs + Method-Level Lifetimes
49
+
//!
50
+
//! The fix is to use Generic Associated Types (GATs) on the trait's associated types, while keeping
51
+
//! the trait itself lifetime-free:
52
+
//!
53
+
//! ```ignore
54
+
//! trait XrpcResp {
55
+
//! const NSID: &'static str;
56
+
//!
57
+
//! // GATs: lifetime is on the associated type, not the trait
58
+
//! type Output<'de>: Deserialize<'de> + IntoStatic;
59
+
//! type Err<'de>: Deserialize<'de> + IntoStatic;
60
+
//! }
61
+
//! ```
62
+
//!
63
+
//! Now you can write trait bounds without HRTBs:
64
+
//!
65
+
//! ```ignore
66
+
//! fn foo<R: XrpcResp>(response: &[u8]) {
67
+
//! // Compiler can pick a concrete lifetime for R::Output<'_>
68
+
//! }
69
+
//! ```
70
+
//!
71
+
//! Methods that need lifetimes use method-level generic parameters:
72
+
//!
73
+
//! ```ignore
74
+
//! // This is part of a trait from jacquard itself, used to genericize updates to the Bluesky
75
+
//! // preferences union, so that if you implement a similar lexicon type in your AppView or App
76
+
//! // Server API, you don't have to special-case it.
77
+
//!
78
+
//! trait VecUpdate {
79
+
//! type GetRequest<'de>: XrpcRequest<'de>; // GAT
80
+
//! type PutRequest<'de>: XrpcRequest<'de>; // GAT
81
+
//!
82
+
//! // Method-level lifetime, not trait-level
83
+
//! fn extract_vec<'s>(
84
+
//! output: <Self::GetRequest<'s> as XrpcRequest<'s>>::Output<'s>
85
+
//! ) -> Vec<Self::Item>;
86
+
//! }
87
+
//! ```
88
+
//!
89
+
//! The compiler can monomorphize for concrete lifetimes instead of trying to prove bounds hold
90
+
//! for *all* lifetimes at once.
91
+
//!
92
+
//! ### Handling Async with `Response<R: XrpcResp>`
93
+
//!
94
+
//! For the async problem, we use a wrapper type that owns the response buffer:
95
+
//!
96
+
//! ```ignore
97
+
//! pub struct Response<R: XrpcResp> {
98
+
//! buffer: Bytes, // Refcounted, cheap to clone
99
+
//! status: StatusCode,
100
+
//! _marker: PhantomData<R>,
101
+
//! }
102
+
//! ```
103
+
//!
104
+
//! This lets async methods return a `Response` that owns its buffer, then the *caller* decides
105
+
//! the lifetime strategy:
106
+
//!
107
+
//! ```ignore
108
+
//! // Zero-copy: borrow from the owned buffer
109
+
//! let output: R::Output<'_> = response.parse()?;
110
+
//!
111
+
//! // Owned: convert to 'static via IntoStatic
112
+
//! let output: R::Output<'static> = response.into_output()?;
113
+
//! ```
114
+
//!
115
+
//! The async method doesn't need to know or care about lifetimes - it just returns the `Response`.
116
+
//! The caller gets full control over whether to use borrowed or owned data. It can even decide
117
+
//! after the fact that it doesn't want to parse out the API response type that it asked for. Instead
118
+
//! it can call `.parse_data()` or `.parse_raw()` on the response to get loosely typed, validated
119
+
//! data or minimally typed maximally accepting data values out.
120
+
//!
121
+
//! ### Example: XRPC Traits in Practice
122
+
//!
123
+
//! Here's how the pattern works with the XRPC layer:
124
+
//!
125
+
//! ```ignore
126
+
//! // XrpcResp uses GATs, not trait-level lifetime
127
+
//! trait XrpcResp {
128
+
//! const NSID: &'static str;
129
+
//! type Output<'de>: Deserialize<'de> + IntoStatic;
130
+
//! type Err<'de>: Deserialize<'de> + IntoStatic;
131
+
//! }
132
+
//!
133
+
//! // Response owns the buffer (Bytes is refcounted)
134
+
//! pub struct Response<R: XrpcResp> {
135
+
//! buffer: Bytes,
136
+
//! status: StatusCode,
137
+
//! _marker: PhantomData<R>,
138
+
//! }
139
+
//!
140
+
//! impl<R: XrpcResp> Response<R> {
141
+
//! // Borrow from owned buffer
142
+
//! pub fn parse(&self) -> XrpcResult<R::Output<'_>> {
143
+
//! serde_json::from_slice(&self.buffer)
144
+
//! }
145
+
//!
146
+
//! // Convert to fully owned
147
+
//! pub fn into_output(self) -> XrpcResult<R::Output<'static>> {
148
+
//! let borrowed = self.parse()?;
149
+
//! Ok(borrowed.into_static())
150
+
//! }
151
+
//! }
152
+
//!
153
+
//! // Async method returns Response, caller chooses strategy
154
+
//! async fn send_xrpc<Req>(&self, req: Req) -> Result<Response<Req::Response>>
155
+
//! where
156
+
//! Req: XrpcRequest<'_>
157
+
//! {
158
+
//! // Do HTTP call, get Bytes buffer
159
+
//! // Return Response wrapping that buffer
160
+
//! // No lifetime issues - Response owns the buffer
161
+
//! }
162
+
//!
163
+
//! // Usage:
164
+
//! let response = send_xrpc(request).await?;
165
+
//!
166
+
//! // Zero-copy: borrow from response buffer
167
+
//! let output = response.parse()?; // Output<'_> borrows from response
168
+
//!
169
+
//! // Or owned: convert to 'static
170
+
//! let output = response.into_output()?; // Output<'static> is fully owned
171
+
//! ```
172
+
//!
173
+
//! When you see types like `Response<R: XrpcResp>` or methods with lifetime parameters,
174
+
//! this is the pattern at work. It looks a bit funky, but it's solving a specific problem
175
+
//! in a way that doesn't require unsafe code or much actual work from you, if you're using it.
176
+
//! It's also not too bad to write, once you're aware of the pattern and why it works. If you run
177
+
//! into a lifetime/borrowing inference issue in jacquard, please contact the crate author. She'd
178
+
//! be happy to debug, and if it's using a method from one of the jacquard crates and seems like
179
+
//! it *should* just work, that is a bug in jacquard, and you should [file an issue](https://tangled.org/@nonbinary.computer/jacquard/).
2
180
3
181
#![warn(missing_docs)]
182
+
pub use bytes;
183
+
pub use chrono;
4
184
pub use cowstr::CowStr;
5
185
pub use into_static::IntoStatic;
6
186
pub use smol_str;
···
21
201
pub mod session;
22
202
/// Baseline fundamental AT Protocol data types.
23
203
pub mod types;
24
-
/// XRPC protocol types and traits
204
+
// XRPC protocol types and traits
25
205
pub mod xrpc;
26
206
27
207
/// Authorization token types for XRPC requests.
+38
-1
crates/jacquard-common/src/types/collection.rs
+38
-1
crates/jacquard-common/src/types/collection.rs
···
1
1
use core::fmt;
2
2
3
-
use serde::Serialize;
3
+
use serde::{Deserialize, Serialize};
4
4
5
+
use crate::IntoStatic;
6
+
use crate::types::value::Data;
5
7
use crate::types::{
6
8
aturi::RepoPath,
7
9
nsid::Nsid,
8
10
recordkey::{RecordKey, RecordKeyType, Rkey},
9
11
};
12
+
use crate::xrpc::XrpcResp;
10
13
11
14
/// Trait for a collection of records that can be stored in a repository.
12
15
///
···
16
19
pub trait Collection: fmt::Debug + Serialize {
17
20
/// The NSID for the Lexicon that defines the schema of records in this collection.
18
21
const NSID: &'static str;
22
+
23
+
/// A marker type implementing [`XrpcResp`] that allows typed deserialization of records
24
+
/// from this collection. Used by [`Agent::get_record`] to return properly typed responses.
25
+
type Record: XrpcResp;
19
26
20
27
/// Returns the [`Nsid`] for the Lexicon that defines the schema of records in this
21
28
/// collection.
···
49
56
}
50
57
}
51
58
}
59
+
60
+
/// Generic error type for record retrieval operations.
61
+
///
62
+
/// Used by generated collection marker types as their error type.
63
+
#[derive(
64
+
Debug, Clone, PartialEq, Eq, Serialize, Deserialize, thiserror::Error, miette::Diagnostic,
65
+
)]
66
+
#[serde(tag = "error", content = "message")]
67
+
pub enum RecordError<'a> {
68
+
/// The requested record was not found
69
+
#[error("RecordNotFound")]
70
+
#[serde(rename = "RecordNotFound")]
71
+
RecordNotFound(Option<String>),
72
+
/// An unknown error occurred
73
+
#[error("Unknown")]
74
+
#[serde(rename = "Unknown")]
75
+
#[serde(borrow)]
76
+
Unknown(Data<'a>),
77
+
}
78
+
79
+
impl IntoStatic for RecordError<'_> {
80
+
type Output = RecordError<'static>;
81
+
82
+
fn into_static(self) -> Self::Output {
83
+
match self {
84
+
RecordError::RecordNotFound(msg) => RecordError::RecordNotFound(msg),
85
+
RecordError::Unknown(data) => RecordError::Unknown(data.into_static()),
86
+
}
87
+
}
88
+
}
+18
-6
crates/jacquard-common/src/types/did_doc.rs
+18
-6
crates/jacquard-common/src/types/did_doc.rs
···
15
15
/// pattern as lexicon structs.
16
16
///
17
17
/// Example
18
-
/// ```ignore
18
+
/// ```
19
19
/// use jacquard_common::types::did_doc::DidDocument;
20
-
/// use serde_json::json;
21
-
/// let doc: DidDocument<'_> = serde_json::from_value(json!({
20
+
///
21
+
/// # fn example() -> Result<(), Box<dyn std::error::Error>> {
22
+
/// let json = r##"{
22
23
/// "id": "did:plc:alice",
23
24
/// "alsoKnownAs": ["at://alice.example"],
24
-
/// "service": [{"id":"#pds","type":"AtprotoPersonalDataServer","serviceEndpoint":"https://pds.example"}],
25
-
/// "verificationMethod":[{"id":"#k","type":"Multikey","publicKeyMultibase":"z6Mki..."}]
26
-
/// })).unwrap();
25
+
/// "service": [{
26
+
/// "id": "#pds",
27
+
/// "type": "AtprotoPersonalDataServer",
28
+
/// "serviceEndpoint": "https://pds.example"
29
+
/// }],
30
+
/// "verificationMethod": [{
31
+
/// "id": "#k",
32
+
/// "type": "Multikey",
33
+
/// "publicKeyMultibase": "z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK"
34
+
/// }]
35
+
/// }"##;
36
+
/// let doc: DidDocument<'_> = serde_json::from_str(json)?;
27
37
/// assert_eq!(doc.id.as_str(), "did:plc:alice");
28
38
/// assert!(doc.pds_endpoint().is_some());
39
+
/// # Ok(())
40
+
/// # }
29
41
/// ```
30
42
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Builder)]
31
43
#[builder(start_fn = new)]
+36
-24
crates/jacquard-common/src/types/value.rs
+36
-24
crates/jacquard-common/src/types/value.rs
···
358
358
/// similar to `serde_json::from_value()`.
359
359
///
360
360
/// # Example
361
-
/// ```ignore
362
-
/// use jacquard_common::types::value::{Data, from_data};
363
-
/// use serde::Deserialize;
364
-
///
361
+
/// ```
362
+
/// # use jacquard_common::types::value::{Data, from_data};
363
+
/// # use serde::Deserialize;
364
+
/// #
365
365
/// #[derive(Deserialize)]
366
366
/// struct Post<'a> {
367
367
/// #[serde(borrow)]
···
370
370
/// author: &'a str,
371
371
/// }
372
372
///
373
-
/// let data: Data = /* ... */;
373
+
/// # fn example() -> Result<(), Box<dyn std::error::Error>> {
374
+
/// # let json = serde_json::json!({"text": "hello", "author": "alice"});
375
+
/// # let data = Data::from_json(&json)?;
374
376
/// let post: Post = from_data(&data)?;
377
+
/// # Ok(())
378
+
/// # }
375
379
/// ```
376
380
pub fn from_data<'de, T>(data: &'de Data<'de>) -> Result<T, DataDeserializerError>
377
381
where
···
385
389
/// Allows extracting strongly-typed structures from untyped `RawData` values.
386
390
///
387
391
/// # Example
388
-
/// ```ignore
389
-
/// use jacquard_common::types::value::{RawData, from_raw_data};
390
-
/// use serde::Deserialize;
391
-
///
392
-
/// #[derive(Deserialize)]
393
-
/// struct Post<'a> {
394
-
/// #[serde(borrow)]
395
-
/// text: &'a str,
396
-
/// #[serde(borrow)]
397
-
/// author: &'a str,
392
+
/// ```
393
+
/// # use jacquard_common::types::value::{RawData, from_raw_data, to_raw_data};
394
+
/// # use serde::{Serialize, Deserialize};
395
+
/// #
396
+
/// #[derive(Serialize, Deserialize)]
397
+
/// struct Post {
398
+
/// text: String,
399
+
/// author: String,
398
400
/// }
399
401
///
400
-
/// let data: RawData = /* ... */;
402
+
/// # fn example() -> Result<(), Box<dyn std::error::Error>> {
403
+
/// # let orig = Post { text: "hello".to_string(), author: "alice".to_string() };
404
+
/// # let data = to_raw_data(&orig)?;
401
405
/// let post: Post = from_raw_data(&data)?;
406
+
/// # Ok(())
407
+
/// # }
402
408
/// ```
403
409
pub fn from_raw_data<'de, T>(data: &'de RawData<'de>) -> Result<T, DataDeserializerError>
404
410
where
···
412
418
/// Allows converting strongly-typed structures into untyped `RawData` values.
413
419
///
414
420
/// # Example
415
-
/// ```ignore
416
-
/// use jacquard_common::types::value::{RawData, to_raw_data};
417
-
/// use serde::Serialize;
418
-
///
421
+
/// ```
422
+
/// # use jacquard_common::types::value::{RawData, to_raw_data};
423
+
/// # use serde::Serialize;
424
+
/// #
419
425
/// #[derive(Serialize)]
420
426
/// struct Post {
421
427
/// text: String,
422
428
/// likes: i64,
423
429
/// }
424
430
///
431
+
/// # fn example() -> Result<(), Box<dyn std::error::Error>> {
425
432
/// let post = Post { text: "hello".to_string(), likes: 42 };
426
433
/// let data: RawData = to_raw_data(&post)?;
434
+
/// # Ok(())
435
+
/// # }
427
436
/// ```
428
437
pub fn to_raw_data<T>(value: &T) -> Result<RawData<'static>, serde_impl::RawDataSerializerError>
429
438
where
···
437
446
/// Combines `to_raw_data()` and validation/type inference in one step.
438
447
///
439
448
/// # Example
440
-
/// ```ignore
441
-
/// use jacquard_common::types::value::{Data, to_data};
442
-
/// use serde::Serialize;
443
-
///
449
+
/// ```
450
+
/// # use jacquard_common::types::value::{Data, to_data};
451
+
/// # use serde::Serialize;
452
+
/// #
444
453
/// #[derive(Serialize)]
445
454
/// struct Post {
446
455
/// text: String,
447
456
/// did: String, // Will be inferred as Did if valid
448
457
/// }
449
458
///
459
+
/// # fn example() -> Result<(), Box<dyn std::error::Error>> {
450
460
/// let post = Post {
451
461
/// text: "hello".to_string(),
452
462
/// did: "did:plc:abc123".to_string()
453
463
/// };
454
464
/// let data: Data = to_data(&post)?;
465
+
/// # Ok(())
466
+
/// # }
455
467
/// ```
456
468
pub fn to_data<T>(value: &T) -> Result<Data<'static>, convert::ConversionError>
457
469
where
+46
-51
crates/jacquard-common/src/xrpc.rs
+46
-51
crates/jacquard-common/src/xrpc.rs
···
1
-
//! Stateless XRPC utilities and request/response mapping
1
+
//! # Stateless XRPC utilities and request/response mapping
2
2
//!
3
3
//! Mapping overview:
4
4
//! - Success (2xx): parse body into the endpoint's typed output.
···
9
9
//! can inspect `error="invalid_token"` or `error="use_dpop_nonce"` and refresh/retry.
10
10
//! If the header is absent, parse the body and map auth errors to
11
11
//! `AuthError::TokenExpired`/`InvalidToken`.
12
-
//!
13
12
use bytes::Bytes;
14
13
use http::{
15
14
HeaderName, HeaderValue, Request, StatusCode,
···
135
134
///
136
135
/// It is implemented by the code generation on a marker struct, like the client-side [XrpcResp] trait.
137
136
pub trait XrpcEndpoint {
138
-
/// Fully-qualified path ('/xrpc/[nsid]') where this endpoint should live on the server
137
+
/// Fully-qualified path ('/xrpc/\[nsid\]') where this endpoint should live on the server
139
138
const PATH: &'static str;
140
139
/// XRPC method (query/GET or procedure/POST)
141
140
const METHOD: XrpcMethod;
···
195
194
/// Extension for stateless XRPC calls on any `HttpClient`.
196
195
///
197
196
/// Example
198
-
/// ```ignore
199
-
/// use jacquard::client::XrpcExt;
200
-
/// use jacquard::api::app_bsky::feed::get_author_feed::GetAuthorFeed;
201
-
/// use jacquard::types::ident::AtIdentifier;
202
-
/// use miette::IntoDiagnostic;
197
+
/// ```no_run
198
+
/// # #[tokio::main]
199
+
/// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
200
+
/// use jacquard_common::xrpc::XrpcExt;
201
+
/// use jacquard_common::http_client::HttpClient;
203
202
///
204
-
/// #[tokio::main]
205
-
/// async fn main() -> miette::Result<()> {
206
-
/// let http = reqwest::Client::new();
207
-
/// let base = url::Url::parse("https://public.api.bsky.app")?;
208
-
/// let resp = http
209
-
/// .xrpc(base)
210
-
/// .send(
211
-
/// GetAuthorFeed::new()
212
-
/// .actor(AtIdentifier::new_static("pattern.atproto.systems").unwrap())
213
-
/// .limit(5)
214
-
/// .build(),
215
-
/// )
216
-
/// .await?;
217
-
/// let out = resp.into_output()?;
218
-
/// println!("author feed:\n{}", serde_json::to_string_pretty(&out).into_diagnostic()?);
219
-
/// Ok(())
220
-
/// }
203
+
/// let http = reqwest::Client::new();
204
+
/// let base = url::Url::parse("https://public.api.bsky.app")?;
205
+
/// // let resp = http.xrpc(base).send(&request).await?;
206
+
/// # Ok(())
207
+
/// # }
221
208
/// ```
222
209
pub trait XrpcExt: HttpClient {
223
210
/// Start building an XRPC call for the given base URL.
···
256
243
/// Stateless XRPC call builder.
257
244
///
258
245
/// Example (per-request overrides)
259
-
/// ```ignore
260
-
/// use jacquard::client::{XrpcExt, AuthorizationToken};
261
-
/// use jacquard::api::app_bsky::feed::get_author_feed::GetAuthorFeed;
262
-
/// use jacquard::types::ident::AtIdentifier;
263
-
/// use jacquard::CowStr;
264
-
/// use miette::IntoDiagnostic;
246
+
/// ```no_run
247
+
/// # #[tokio::main]
248
+
/// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
249
+
/// use jacquard_common::xrpc::XrpcExt;
250
+
/// use jacquard_common::{AuthorizationToken, CowStr};
265
251
///
266
-
/// #[tokio::main]
267
-
/// async fn main() -> miette::Result<()> {
268
-
/// let http = reqwest::Client::new();
269
-
/// let base = url::Url::parse("https://public.api.bsky.app")?;
270
-
/// let resp = http
271
-
/// .xrpc(base)
272
-
/// .auth(AuthorizationToken::Bearer(CowStr::from("ACCESS_JWT")))
273
-
/// .accept_labelers(vec![CowStr::from("did:plc:labelerid")])
274
-
/// .header(http::header::USER_AGENT, http::HeaderValue::from_static("jacquard-example"))
275
-
/// .send(
276
-
/// GetAuthorFeed::new()
277
-
/// .actor(AtIdentifier::new_static("pattern.atproto.systems").unwrap())
278
-
/// .limit(5)
279
-
/// .build(),
280
-
/// )
281
-
/// .await?;
282
-
/// let out = resp.into_output()?;
283
-
/// println!("{}", serde_json::to_string_pretty(&out).into_diagnostic()?);
284
-
/// Ok(())
285
-
/// }
252
+
/// let http = reqwest::Client::new();
253
+
/// let base = url::Url::parse("https://public.api.bsky.app")?;
254
+
/// let call = http
255
+
/// .xrpc(base)
256
+
/// .auth(AuthorizationToken::Bearer(CowStr::from("ACCESS_JWT")))
257
+
/// .accept_labelers(vec![CowStr::from("did:plc:labelerid")])
258
+
/// .header(http::header::USER_AGENT, http::HeaderValue::from_static("jacquard-example"));
259
+
/// // let resp = call.send(&request).await?;
260
+
/// # Ok(())
261
+
/// # }
286
262
/// ```
287
263
pub struct XrpcCall<'a, C: HttpClient> {
288
264
pub(crate) client: &'a C,
···
684
660
}
685
661
Err(e) => Err(XrpcError::Decode(e)),
686
662
}
663
+
}
664
+
}
665
+
666
+
/// Reinterpret this response as a different response type.
667
+
///
668
+
/// This transmutes the response by keeping the same buffer and status code,
669
+
/// but changing the type-level marker. Useful for converting generic XRPC responses
670
+
/// into collection-specific typed responses.
671
+
///
672
+
/// # Safety
673
+
///
674
+
/// This is safe in the sense that no memory unsafety occurs, but logical correctness
675
+
/// depends on ensuring the buffer actually contains data that can deserialize to `NEW`.
676
+
/// Incorrect conversion will cause deserialization errors at runtime.
677
+
pub fn transmute<NEW: XrpcResp>(self) -> Response<NEW> {
678
+
Response {
679
+
buffer: self.buffer,
680
+
status: self.status,
681
+
_marker: PhantomData,
687
682
}
688
683
}
689
684
}
+77
-25
crates/jacquard-derive/src/lib.rs
+77
-25
crates/jacquard-derive/src/lib.rs
···
1
+
//! # Derive macros for jacquard lexicon types
2
+
//!
3
+
//! This crate provides attribute macros that the code generator uses to add lexicon-specific
4
+
//! behavior to generated types. You'll rarely need to use these directly unless you're writing
5
+
//! custom lexicon types by hand. However, deriving IntoStatic will likely be very useful.
6
+
//!
7
+
//! ## Macros
8
+
//!
9
+
//! ### `#[lexicon]`
10
+
//!
11
+
//! Adds an `extra_data` field to structs to capture unknown fields during deserialization.
12
+
//! This makes objects "open" - they'll accept and preserve fields not defined in the schema.
13
+
//!
14
+
//! ```ignore
15
+
//! #[lexicon]
16
+
//! struct Post<'s> {
17
+
//! text: &'s str,
18
+
//! }
19
+
//! // Expands to add:
20
+
//! // #[serde(flatten)]
21
+
//! // pub extra_data: BTreeMap<SmolStr, Data<'s>>
22
+
//! ```
23
+
//!
24
+
//! ### `#[open_union]`
25
+
//!
26
+
//! Adds an `Unknown(Data)` variant to enums to make them extensible unions. This lets
27
+
//! enums accept variants not defined in your code, storing them as loosely typed atproto `Data`.
28
+
//!
29
+
//! ```ignore
30
+
//! #[open_union]
31
+
//! enum RecordEmbed<'s> {
32
+
//! #[serde(rename = "app.bsky.embed.images")]
33
+
//! Images(Images),
34
+
//! }
35
+
//! // Expands to add:
36
+
//! // #[serde(untagged)]
37
+
//! // Unknown(Data<'s>)
38
+
//! ```
39
+
//!
40
+
//! ### `#[derive(IntoStatic)]`
41
+
//!
42
+
//! Derives conversion from borrowed (`'a`) to owned (`'static`) types by recursively calling
43
+
//! `.into_static()` on all fields. Works with structs and enums.
44
+
//!
45
+
//! ```ignore
46
+
//! #[derive(IntoStatic)]
47
+
//! struct Post<'a> {
48
+
//! text: CowStr<'a>,
49
+
//! }
50
+
//! // Generates:
51
+
//! // impl IntoStatic for Post<'_> {
52
+
//! // type Output = Post<'static>;
53
+
//! // fn into_static(self) -> Self::Output { ... }
54
+
//! // }
55
+
//! ```
56
+
1
57
use proc_macro::TokenStream;
2
58
use quote::quote;
3
59
use syn::{Data, DeriveInput, Fields, GenericParam, parse_macro_input};
···
160
216
let (impl_generics, ty_generics, where_clause) = generics.split_for_impl();
161
217
162
218
// Build the Output type with all lifetimes replaced by 'static
163
-
let output_generics = generics.params.iter().map(|param| {
164
-
match param {
165
-
GenericParam::Lifetime(_) => quote! { 'static },
166
-
GenericParam::Type(ty) => {
167
-
let ident = &ty.ident;
168
-
quote! { #ident }
169
-
}
170
-
GenericParam::Const(c) => {
171
-
let ident = &c.ident;
172
-
quote! { #ident }
173
-
}
219
+
let output_generics = generics.params.iter().map(|param| match param {
220
+
GenericParam::Lifetime(_) => quote! { 'static },
221
+
GenericParam::Type(ty) => {
222
+
let ident = &ty.ident;
223
+
quote! { #ident }
224
+
}
225
+
GenericParam::Const(c) => {
226
+
let ident = &c.ident;
227
+
quote! { #ident }
174
228
}
175
229
});
176
230
···
182
236
183
237
// Generate the conversion body based on struct/enum
184
238
let conversion = match &input.data {
185
-
Data::Struct(data_struct) => {
186
-
generate_struct_conversion(name, &data_struct.fields)
187
-
}
188
-
Data::Enum(data_enum) => {
189
-
generate_enum_conversion(name, data_enum)
190
-
}
239
+
Data::Struct(data_struct) => generate_struct_conversion(name, &data_struct.fields),
240
+
Data::Enum(data_enum) => generate_enum_conversion(name, data_enum),
191
241
Data::Union(_) => {
192
-
return syn::Error::new_spanned(
193
-
input,
194
-
"IntoStatic cannot be derived for unions"
195
-
)
196
-
.to_compile_error()
197
-
.into();
242
+
return syn::Error::new_spanned(input, "IntoStatic cannot be derived for unions")
243
+
.to_compile_error()
244
+
.into();
198
245
}
199
246
};
200
247
···
239
286
}
240
287
}
241
288
242
-
fn generate_enum_conversion(name: &syn::Ident, data_enum: &syn::DataEnum) -> proc_macro2::TokenStream {
289
+
fn generate_enum_conversion(
290
+
name: &syn::Ident,
291
+
data_enum: &syn::DataEnum,
292
+
) -> proc_macro2::TokenStream {
243
293
let variants = data_enum.variants.iter().map(|variant| {
244
294
let variant_name = &variant.ident;
245
295
match &variant.fields {
···
258
308
}
259
309
Fields::Unnamed(fields) => {
260
310
let field_bindings: Vec<_> = (0..fields.unnamed.len())
261
-
.map(|i| syn::Ident::new(&format!("field_{}", i), proc_macro2::Span::call_site()))
311
+
.map(|i| {
312
+
syn::Ident::new(&format!("field_{}", i), proc_macro2::Span::call_site())
313
+
})
262
314
.collect();
263
315
let field_conversions = field_bindings.iter().map(|binding| {
264
316
quote! { #binding.into_static() }
+64
-11
crates/jacquard-identity/src/lib.rs
+64
-11
crates/jacquard-identity/src/lib.rs
···
1
-
//! Identity resolution utilities: DID and handle resolution, DID document fetch,
2
-
//! and helpers for PDS endpoint discovery. See `identity::resolver` for details.
3
-
//! Identity resolution: handle → DID and DID → document, with smart fallbacks.
1
+
//! Identity resolution for the AT Protocol
2
+
//!
3
+
//! Jacquard's handle-to-DID and DID-to-document resolution with configurable
4
+
//! fallback chains.
5
+
//!
6
+
//! ## Quick start
7
+
//!
8
+
//! ```no_run
9
+
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
10
+
//! use jacquard_identity::{PublicResolver, resolver::IdentityResolver};
11
+
//! use jacquard_common::types::string::Handle;
12
+
//!
13
+
//! let resolver = PublicResolver::default();
14
+
//!
15
+
//! // Resolve handle to DID
16
+
//! let did = resolver.resolve_handle(&Handle::new("alice.bsky.social")?).await?;
17
+
//!
18
+
//! // Fetch DID document
19
+
//! let doc_response = resolver.resolve_did_doc(&did).await?;
20
+
//! let doc = doc_response.parse()?; // Borrow from response buffer
21
+
//! # Ok(())
22
+
//! # }
23
+
//! ```
4
24
//!
5
-
//! Fallback order (default):
6
-
//! - Handle → DID: DNS TXT (if `dns` feature) → HTTPS well-known → PDS XRPC
7
-
//! `resolveHandle` (when `pds_fallback` is configured) → public API fallback → Slingshot `resolveHandle` (if configured).
8
-
//! - DID → Doc: did:web well-known → PLC/Slingshot HTTP → PDS XRPC `resolveDid` (when configured),
9
-
//! then Slingshot mini‑doc (partial) if configured.
25
+
//! ## Resolution fallback order
10
26
//!
11
-
//! Parsing returns a `DidDocResponse` so callers can borrow from the response buffer
12
-
//! and optionally validate the document `id` against the requested DID.
27
+
//! **Handle → DID** (configurable via [`resolver::HandleStep`]):
28
+
//! 1. DNS TXT record at `_atproto.{handle}` (if `dns` feature enabled)
29
+
//! 2. HTTPS well-known at `https://{handle}/.well-known/atproto-did`
30
+
//! 3. PDS XRPC `com.atproto.identity.resolveHandle` (if PDS configured)
31
+
//! 4. Public API fallback (`https://public.api.bsky.app`)
32
+
//! 5. Slingshot `resolveHandle` (if configured)
33
+
//!
34
+
//! **DID → Document** (configurable via [`resolver::DidStep`]):
35
+
//! 1. `did:web` HTTPS well-known
36
+
//! 2. PLC directory HTTP (for `did:plc`)
37
+
//! 3. PDS XRPC `com.atproto.identity.resolveDid` (if PDS configured)
38
+
//! 4. Slingshot mini-doc (partial document)
39
+
//!
40
+
//! ## Customization
41
+
//!
42
+
//! ```
43
+
//! use jacquard_identity::JacquardResolver;
44
+
//! use jacquard_identity::resolver::{ResolverOptions, PlcSource};
45
+
//!
46
+
//! let opts = ResolverOptions {
47
+
//! plc_source: PlcSource::slingshot_default(),
48
+
//! public_fallback_for_handle: true,
49
+
//! validate_doc_id: true,
50
+
//! ..Default::default()
51
+
//! };
52
+
//!
53
+
//! let resolver = JacquardResolver::new(reqwest::Client::new(), opts);
54
+
//! #[cfg(feature = "dns")]
55
+
//! let resolver = resolver.with_system_dns(); // Enable DNS TXT resolution
56
+
//! ```
57
+
//!
58
+
//! ## Response types
59
+
//!
60
+
//! Resolution methods return wrapper types that own the response buffer, allowing
61
+
//! zero-copy parsing:
62
+
//!
63
+
//! - [`resolver::DidDocResponse`] - Full DID document response
64
+
//! - [`MiniDocResponse`] - Slingshot mini-doc response (partial)
65
+
//!
66
+
//! Both support `.parse()` for borrowing and validation.
13
67
14
68
// use crate::CowStr; // not currently needed directly here
15
69
pub mod resolver;
···
387
441
}
388
442
PlcSource::Slingshot { base } => base.join(did.as_str())?,
389
443
};
390
-
println!("Fetching DID document from {}", url);
391
444
if let Ok((buf, status)) = self.get_json_bytes(url).await {
392
445
return Ok(DidDocResponse {
393
446
buffer: buf,
+100
-19
crates/jacquard-lexicon/src/codegen/structs.rs
+100
-19
crates/jacquard-lexicon/src/codegen/structs.rs
···
6
6
use proc_macro2::TokenStream;
7
7
use quote::quote;
8
8
9
-
use super::utils::{make_ident, value_to_variant_name};
10
9
use super::CodeGenerator;
10
+
use super::utils::{make_ident, value_to_variant_name};
11
11
12
12
/// Enum variant kind for IntoStatic generation
13
13
#[derive(Debug, Clone)]
···
52
52
match field_type {
53
53
LexObjectProperty::Union(union) => {
54
54
// Skip empty, single-variant unions unless they're self-referential
55
-
if !union.refs.is_empty() && (union.refs.len() > 1 || self.is_self_referential_union(nsid, &type_name, union)) {
56
-
let union_name = self.generate_field_type_name(nsid, &type_name, field_name, "");
55
+
if !union.refs.is_empty()
56
+
&& (union.refs.len() > 1
57
+
|| self.is_self_referential_union(nsid, &type_name, union))
58
+
{
59
+
let union_name =
60
+
self.generate_field_type_name(nsid, &type_name, field_name, "");
57
61
let refs: Vec<_> = union.refs.iter().cloned().collect();
58
-
let union_def =
59
-
self.generate_union(nsid, &union_name, &refs, None, union.closed)?;
62
+
let union_def = self.generate_union(
63
+
nsid,
64
+
&union_name,
65
+
&refs,
66
+
None,
67
+
union.closed,
68
+
)?;
60
69
unions.push(union_def);
61
70
}
62
71
}
63
72
LexObjectProperty::Object(nested_obj) => {
64
-
let object_name = self.generate_field_type_name(nsid, &type_name, field_name, "");
73
+
let object_name =
74
+
self.generate_field_type_name(nsid, &type_name, field_name, "");
65
75
let obj_def = self.generate_object(nsid, &object_name, nested_obj)?;
66
76
unions.push(obj_def);
67
77
}
···
69
79
if let LexArrayItem::Union(union) = &array.items {
70
80
// Skip single-variant array unions
71
81
if union.refs.len() > 1 {
72
-
let union_name = self.generate_field_type_name(nsid, &type_name, field_name, "Item");
82
+
let union_name = self.generate_field_type_name(
83
+
nsid, &type_name, field_name, "Item",
84
+
);
73
85
let refs: Vec<_> = union.refs.iter().cloned().collect();
74
-
let union_def = self.generate_union(nsid, &union_name, &refs, None, union.closed)?;
86
+
let union_def = self.generate_union(
87
+
nsid,
88
+
&union_name,
89
+
&refs,
90
+
None,
91
+
union.closed,
92
+
)?;
75
93
unions.push(union_def);
76
94
}
77
95
}
···
80
98
}
81
99
}
82
100
101
+
// Generate typed GetRecordOutput wrapper
102
+
let output_type_name = format!("{}GetRecordOutput", type_name);
103
+
let output_type_ident =
104
+
syn::Ident::new(&output_type_name, proc_macro2::Span::call_site());
105
+
106
+
let output_wrapper = quote! {
107
+
/// Typed wrapper for GetRecord response with this collection's record type.
108
+
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic)]
109
+
#[serde(rename_all = "camelCase")]
110
+
pub struct #output_type_ident<'a> {
111
+
#[serde(skip_serializing_if = "std::option::Option::is_none")]
112
+
#[serde(borrow)]
113
+
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
114
+
#[serde(borrow)]
115
+
pub uri: jacquard_common::types::string::AtUri<'a>,
116
+
#[serde(borrow)]
117
+
pub value: #ident<'a>,
118
+
}
119
+
};
120
+
121
+
// Generate marker struct for XrpcResp
122
+
let record_marker_name = format!("{}Record", type_name);
123
+
let record_marker_ident =
124
+
syn::Ident::new(&record_marker_name, proc_macro2::Span::call_site());
125
+
126
+
let record_marker = quote! {
127
+
/// Marker type for deserializing records from this collection.
128
+
pub struct #record_marker_ident;
129
+
130
+
impl jacquard_common::xrpc::XrpcResp for #record_marker_ident {
131
+
const NSID: &'static str = #nsid;
132
+
const ENCODING: &'static str = "application/json";
133
+
type Output<'de> = #output_type_ident<'de>;
134
+
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
135
+
}
136
+
137
+
138
+
};
139
+
let from_impl = quote! {
140
+
impl From<#output_type_ident<'_>> for #ident<'static> {
141
+
fn from(output: #output_type_ident<'_>) -> Self {
142
+
use jacquard_common::IntoStatic;
143
+
output.value.into_static()
144
+
}
145
+
}
146
+
};
147
+
83
148
// Generate Collection trait impl
84
149
let collection_impl = quote! {
85
150
impl jacquard_common::types::collection::Collection for #ident<'_> {
86
151
const NSID: &'static str = #nsid;
152
+
type Record = #record_marker_ident;
87
153
}
88
154
};
89
155
90
156
Ok(quote! {
91
157
#struct_def
92
158
#(#unions)*
159
+
#output_wrapper
160
+
#record_marker
93
161
#collection_impl
162
+
#from_impl
94
163
})
95
164
}
96
165
}
···
127
196
match field_type {
128
197
LexObjectProperty::Union(union) => {
129
198
// Skip empty, single-variant unions unless they're self-referential
130
-
if !union.refs.is_empty() && (union.refs.len() > 1 || self.is_self_referential_union(nsid, &type_name, union)) {
131
-
let union_name = self.generate_field_type_name(nsid, &type_name, field_name, "");
199
+
if !union.refs.is_empty()
200
+
&& (union.refs.len() > 1
201
+
|| self.is_self_referential_union(nsid, &type_name, union))
202
+
{
203
+
let union_name =
204
+
self.generate_field_type_name(nsid, &type_name, field_name, "");
132
205
let refs: Vec<_> = union.refs.iter().cloned().collect();
133
206
let union_def =
134
207
self.generate_union(nsid, &union_name, &refs, None, union.closed)?;
···
136
209
}
137
210
}
138
211
LexObjectProperty::Object(nested_obj) => {
139
-
let object_name = self.generate_field_type_name(nsid, &type_name, field_name, "");
212
+
let object_name =
213
+
self.generate_field_type_name(nsid, &type_name, field_name, "");
140
214
let obj_def = self.generate_object(nsid, &object_name, nested_obj)?;
141
215
unions.push(obj_def);
142
216
}
···
144
218
if let LexArrayItem::Union(union) = &array.items {
145
219
// Skip single-variant array unions
146
220
if union.refs.len() > 1 {
147
-
let union_name = self.generate_field_type_name(nsid, &type_name, field_name, "Item");
221
+
let union_name =
222
+
self.generate_field_type_name(nsid, &type_name, field_name, "Item");
148
223
let refs: Vec<_> = union.refs.iter().cloned().collect();
149
-
let union_def = self.generate_union(nsid, &union_name, &refs, None, union.closed)?;
224
+
let union_def =
225
+
self.generate_union(nsid, &union_name, &refs, None, union.closed)?;
150
226
unions.push(union_def);
151
227
}
152
228
}
···
296
372
};
297
373
298
374
// Parse ref to get NSID and def name
299
-
let (ref_nsid_str, ref_def) = if let Some((nsid, fragment)) = normalized_ref.split_once('#') {
300
-
(nsid, fragment)
301
-
} else {
302
-
(normalized_ref.as_str(), "main")
303
-
};
375
+
let (ref_nsid_str, ref_def) =
376
+
if let Some((nsid, fragment)) = normalized_ref.split_once('#') {
377
+
(nsid, fragment)
378
+
} else {
379
+
(normalized_ref.as_str(), "main")
380
+
};
304
381
305
382
// Skip unknown refs - they'll be handled by Unknown variant
306
383
if !self.corpus.ref_exists(&normalized_ref) {
···
329
406
// For other fragments, include the last NSID segment to avoid collisions
330
407
// e.g. app.bsky.embed.images#view -> ImagesView
331
408
// app.bsky.embed.video#view -> VideoView
332
-
format!("{}{}", last_segment.to_pascal_case(), ref_def.to_pascal_case())
409
+
format!(
410
+
"{}{}",
411
+
last_segment.to_pascal_case(),
412
+
ref_def.to_pascal_case()
413
+
)
333
414
};
334
415
335
416
variant_infos.push(VariantInfo {
+38
crates/jacquard-lexicon/src/lib.rs
+38
crates/jacquard-lexicon/src/lib.rs
···
1
+
//! # Lexicon schema parsing and Rust code generation for the Jacquard atproto ecosystem
2
+
//!
3
+
//! This crate also provides lexicon fetching capabilitiees ofr
4
+
//!
5
+
//! ## Usage
6
+
//!
7
+
//! ### Fetch lexicons
8
+
//!
9
+
//! The `lex-fetch` binary downloads lexicons from configured sources and
10
+
//! runs the code generation pipeline on them:
11
+
//!
12
+
//! ```bash
13
+
//! cargo run -p jacquard-lexicon --bin lex-fetch
14
+
//! ```
15
+
//!
16
+
//! Configuration lives in `lexicons.kdl` at the workspace root.
17
+
//!
18
+
//! ### Generate Rust code
19
+
//!
20
+
//! The `jacquard-codegen` binary can be pointed at a local directory to
21
+
//! runs the code generation pipeline:
22
+
//!
23
+
//! ```bash
24
+
//! cargo run -p jacquard-lexicon --bin jacquard-codegen -- \
25
+
//! -i ./lexicons \
26
+
//! -o ./crates/jacquard-api/src
27
+
//! ```
28
+
//!
29
+
//!
30
+
//! ## Modules
31
+
//!
32
+
//! - [`codegen`] - Rust code generation from parsed schemas
33
+
//! - [`corpus`] - Lexicon corpus management and namespace organization
34
+
//! - [`lexicon`] - Schema parsing and validation
35
+
//! - [`union_registry`] - Tracks union types for collision detection
36
+
//! - [`fetch`] - Ingests lexicons from git, atproto, http fetch, and other sources
37
+
//! - [`fs`] - Filesystem utilities for lexicon storage
38
+
1
39
pub mod codegen;
2
40
pub mod corpus;
3
41
pub mod error;
+79
-2
crates/jacquard-oauth/src/client.rs
+79
-2
crates/jacquard-oauth/src/client.rs
···
13
13
AuthorizationToken, CowStr, IntoStatic,
14
14
error::{AuthError, ClientError, TransportError, XrpcResult},
15
15
http_client::HttpClient,
16
-
types::did::Did,
16
+
types::{did::Did, string::Handle},
17
17
xrpc::{
18
18
CallOptions, Response, XrpcClient, XrpcExt, XrpcRequest, XrpcResp, build_http_request,
19
19
process_response,
20
20
},
21
21
};
22
-
use jacquard_identity::JacquardResolver;
22
+
use jacquard_identity::{JacquardResolver, resolver::IdentityResolver};
23
23
use jose_jwk::JwkSet;
24
24
use std::sync::Arc;
25
25
use tokio::sync::RwLock;
···
38
38
pub fn new(store: S, client_data: ClientData<'static>) -> Self {
39
39
let client = JacquardResolver::default();
40
40
Self::new_from_resolver(store, client, client_data)
41
+
}
42
+
43
+
/// Create an OAuth client with the provided store and default localhost client metadata.
44
+
///
45
+
/// This is a convenience constructor for quickly setting up an OAuth client
46
+
/// with default localhost redirect URIs and "atproto transition:generic" scopes.
47
+
///
48
+
/// # Example
49
+
///
50
+
/// ```no_run
51
+
/// # use jacquard_oauth::client::OAuthClient;
52
+
/// # use jacquard_oauth::authstore::MemoryAuthStore;
53
+
/// # #[tokio::main]
54
+
/// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
55
+
/// let store = MemoryAuthStore::new();
56
+
/// let oauth = OAuthClient::with_default_config(store);
57
+
/// # Ok(())
58
+
/// # }
59
+
/// ```
60
+
pub fn with_default_config(store: S) -> Self {
61
+
let client_data = ClientData {
62
+
keyset: None,
63
+
config: crate::atproto::AtprotoClientMetadata::default_localhost(),
64
+
};
65
+
Self::new(store, client_data)
66
+
}
67
+
}
68
+
69
+
impl OAuthClient<JacquardResolver, crate::authstore::MemoryAuthStore> {
70
+
/// Create an OAuth client with an in-memory auth store and default localhost client metadata.
71
+
///
72
+
/// This is a convenience constructor for simple testing and development.
73
+
/// The session will not persist across restarts.
74
+
///
75
+
/// # Example
76
+
///
77
+
/// ```no_run
78
+
/// # use jacquard_oauth::client::OAuthClient;
79
+
/// # #[tokio::main]
80
+
/// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
81
+
/// let oauth = OAuthClient::with_memory_store();
82
+
/// # Ok(())
83
+
/// # }
84
+
/// ```
85
+
pub fn with_memory_store() -> Self {
86
+
Self::with_default_config(crate::authstore::MemoryAuthStore::new())
41
87
}
42
88
}
43
89
···
430
476
_ => false,
431
477
}
432
478
}
479
+
480
+
impl<T, S> IdentityResolver for OAuthSession<T, S>
481
+
where
482
+
S: ClientAuthStore + Send + Sync + 'static,
483
+
T: OAuthResolver + IdentityResolver + XrpcExt + Send + Sync + 'static,
484
+
{
485
+
fn options(&self) -> &jacquard_identity::resolver::ResolverOptions {
486
+
self.client.options()
487
+
}
488
+
489
+
fn resolve_handle(
490
+
&self,
491
+
handle: &Handle<'_>,
492
+
) -> impl Future<
493
+
Output = std::result::Result<Did<'static>, jacquard_identity::resolver::IdentityError>,
494
+
> {
495
+
async { self.client.resolve_handle(handle).await }
496
+
}
497
+
498
+
fn resolve_did_doc(
499
+
&self,
500
+
did: &Did<'_>,
501
+
) -> impl Future<
502
+
Output = std::result::Result<
503
+
jacquard_identity::resolver::DidDocResponse,
504
+
jacquard_identity::resolver::IdentityError,
505
+
>,
506
+
> {
507
+
async { self.client.resolve_did_doc(did).await }
508
+
}
509
+
}
+47
-2
crates/jacquard-oauth/src/lib.rs
+47
-2
crates/jacquard-oauth/src/lib.rs
···
1
-
//! Core OAuth 2.1 (AT Protocol profile) types and helpers for Jacquard.
2
-
//! Transport, discovery, and orchestration live in `jacquard`.
1
+
//! # Jacquard OAuth 2.1 implementation for the AT Protocol
2
+
//!
3
+
//! Implements the AT Protocol OAuth profile, including DPoP (Demonstrating
4
+
//! Proof-of-Possession), PKCE, PAR (Pushed Authorization Requests), and token management.
5
+
//!
6
+
//!
7
+
//! ## Authentication flow
8
+
//!
9
+
//! ```no_run
10
+
//! # #[cfg(feature = "loopback")]
11
+
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
12
+
//! use jacquard_oauth::client::OAuthClient;
13
+
//! use jacquard_oauth::session::ClientData;
14
+
//! use jacquard_oauth::atproto::AtprotoClientMetadata;
15
+
//! use jacquard_oauth::loopback::LoopbackConfig;
16
+
//! use jacquard_oauth::authstore::MemoryAuthStore;
17
+
//!
18
+
//! let store = MemoryAuthStore::new();
19
+
//!
20
+
//! // Create client with metadata
21
+
//! let client_data = ClientData {
22
+
//! keyset: None, // Will generate ES256 keypair if needed
23
+
//! config: AtprotoClientMetadata::default_localhost(),
24
+
//! };
25
+
//! let oauth = OAuthClient::new(store, client_data);
26
+
//!
27
+
//! // Start auth flow (with loopback feature)
28
+
//! let session = oauth.login_with_local_server(
29
+
//! "alice.bsky.social",
30
+
//! Default::default(),
31
+
//! LoopbackConfig::default(),
32
+
//! ).await?;
33
+
//!
34
+
//! // Session handles token refresh automatically
35
+
//! # Ok(())
36
+
//! # }
37
+
//! ```
38
+
//!
39
+
//! ## AT Protocol specifics
40
+
//!
41
+
//! The AT Protocol OAuth profile adds:
42
+
//! - Required DPoP for all token requests
43
+
//! - PAR (Pushed Authorization Requests) for better security
44
+
//! - Specific scope format (`atproto`, `transition:generic`, etc.)
45
+
//! - Server metadata discovery at `/.well-known/oauth-authorization-server`
46
+
//!
47
+
//! See [`atproto`] module for AT Protocol-specific metadata helpers.
3
48
4
49
pub mod atproto;
5
50
pub mod authstore;
+47
-4
crates/jacquard/Cargo.toml
+47
-4
crates/jacquard/Cargo.toml
···
12
12
license.workspace = true
13
13
14
14
[features]
15
-
default = ["api_full", "dns", "fancy", "loopback"]
15
+
default = ["api_full", "dns", "loopback"]
16
16
derive = ["dep:jacquard-derive"]
17
17
api = ["jacquard-api/com_atproto", "jacquard-api/com_bad_example" ]
18
18
api_bluesky = ["api", "jacquard-api/bluesky" ]
···
27
27
name = "jacquard"
28
28
path = "src/lib.rs"
29
29
30
-
[[bin]]
31
-
name = "jacquard"
32
-
path = "src/main.rs"
30
+
[[example]]
31
+
name = "oauth_timeline"
32
+
path = "../../examples/oauth_timeline.rs"
33
+
required-features = ["fancy", "loopback", "api_bluesky"]
34
+
35
+
[[example]]
36
+
name = "create_post"
37
+
path = "../../examples/create_post.rs"
38
+
required-features = ["fancy", "loopback", "api_bluesky"]
39
+
40
+
[[example]]
41
+
name = "post_with_image"
42
+
path = "../../examples/post_with_image.rs"
43
+
required-features = ["fancy", "loopback", "api_bluesky"]
44
+
45
+
[[example]]
46
+
name = "update_profile"
47
+
path = "../../examples/update_profile.rs"
48
+
required-features = ["fancy", "loopback", "api_bluesky"]
49
+
50
+
[[example]]
51
+
name = "public_atproto_feed"
52
+
path = "../../examples/public_atproto_feed.rs"
53
+
54
+
[[example]]
55
+
name = "create_whitewind_post"
56
+
path = "../../examples/create_whitewind_post.rs"
57
+
required-features = ["fancy", "loopback", "api_full"]
58
+
59
+
[[example]]
60
+
name = "read_whitewind_posts"
61
+
path = "../../examples/read_whitewind_posts.rs"
62
+
required-features = ["fancy", "api_full"]
63
+
64
+
[[example]]
65
+
name = "read_tangled_repo"
66
+
path = "../../examples/read_tangled_repo.rs"
67
+
required-features = ["api_full"]
33
68
69
+
[[example]]
70
+
name = "resolve_did"
71
+
path = "../../examples/resolve_did.rs"
72
+
73
+
[[example]]
74
+
name = "update_preferences"
75
+
path = "../../examples/update_preferences.rs"
76
+
required-features = ["fancy", "loopback", "api_full"]
34
77
35
78
[dependencies]
36
79
jacquard-api = { version = "0.4", path = "../jacquard-api" }
+610
-6
crates/jacquard/src/client.rs
+610
-6
crates/jacquard/src/client.rs
···
1
1
//! XRPC client implementation for AT Protocol
2
2
//!
3
-
//! This module provides HTTP and XRPC client traits along with an authenticated
4
-
//! client implementation that manages session tokens.
3
+
//! This module provides HTTP and XRPC client traits along with session management
4
+
//! for both app-password and OAuth authentication.
5
+
//!
6
+
//! ## Key types
7
+
//!
8
+
//! - [`Agent<A>`] - Unified session wrapper with convenience methods
9
+
//! - [`CredentialSession`] - App-password authentication with auto-refresh
10
+
//! - [`crate::oauth::client::OAuthSession`] - OAuth/DPoP authentication
11
+
//! - [`AgentSession`] - Common trait for both session types
12
+
//!
13
+
//! ## Modules
14
+
//!
15
+
//! - [`credential_session`] - App-password session implementation
16
+
//! - [`token`] - Token storage and persistence
17
+
//! - [`vec_update`] - Trait for fetch-modify-put patterns on array endpoints
5
18
6
-
/// Stateful session client for app‑password auth with auto‑refresh.
19
+
/// App-password session implementation with auto-refresh
7
20
pub mod credential_session;
8
-
/// Token storage and on‑disk formats shared across app‑password and OAuth.
21
+
/// Token storage and on-disk persistence formats
9
22
pub mod token;
23
+
/// Trait for fetch-modify-put patterns on array-based endpoints
24
+
pub mod vec_update;
10
25
11
26
use core::future::Future;
12
27
28
+
use jacquard_api::com_atproto::repo::create_record::CreateRecordOutput;
29
+
use jacquard_api::com_atproto::repo::delete_record::DeleteRecordOutput;
30
+
use jacquard_api::com_atproto::repo::put_record::PutRecordOutput;
13
31
use jacquard_api::com_atproto::server::create_session::CreateSessionOutput;
14
32
use jacquard_api::com_atproto::server::refresh_session::RefreshSessionOutput;
15
-
use jacquard_common::AuthorizationToken;
16
33
use jacquard_common::error::TransportError;
17
34
pub use jacquard_common::error::{ClientError, XrpcResult};
18
35
use jacquard_common::http_client::HttpClient;
19
36
pub use jacquard_common::session::{MemorySessionStore, SessionStore, SessionStoreError};
20
-
use jacquard_common::xrpc::{CallOptions, Response, XrpcClient, XrpcExt, XrpcRequest};
37
+
use jacquard_common::types::blob::{BlobRef, MimeType};
38
+
use jacquard_common::types::collection::Collection;
39
+
use jacquard_common::types::recordkey::{RecordKey, Rkey};
40
+
use jacquard_common::types::string::AtUri;
41
+
use jacquard_common::xrpc::{
42
+
CallOptions, Response, XrpcClient, XrpcError, XrpcExt, XrpcRequest, XrpcResp,
43
+
};
44
+
use jacquard_common::{AuthorizationToken, xrpc};
21
45
use jacquard_common::{
22
46
CowStr, IntoStatic,
23
47
types::string::{Did, Handle},
···
28
52
use jacquard_oauth::dpop::DpopExt;
29
53
use jacquard_oauth::resolver::OAuthResolver;
30
54
55
+
use serde::Serialize;
31
56
pub use token::FileAuthStore;
32
57
33
58
use crate::client::credential_session::{CredentialSession, SessionKey};
59
+
60
+
use jacquard_common::error::{AuthError, DecodeError};
61
+
use jacquard_common::types::nsid::Nsid;
62
+
use jacquard_common::xrpc::GenericXrpcError;
63
+
64
+
/// Error type for Agent convenience methods
65
+
#[derive(Debug, thiserror::Error, miette::Diagnostic)]
66
+
pub enum AgentError {
67
+
/// Transport/network layer failure
68
+
#[error(transparent)]
69
+
#[diagnostic(transparent)]
70
+
Client(#[from] ClientError),
71
+
72
+
/// No session available for operations requiring authentication
73
+
#[error("No session available - cannot determine repo")]
74
+
NoSession,
75
+
76
+
/// Authentication error from XRPC layer
77
+
#[error("Authentication error: {0}")]
78
+
#[diagnostic(transparent)]
79
+
Auth(
80
+
#[from]
81
+
#[diagnostic_source]
82
+
AuthError,
83
+
),
84
+
85
+
/// Generic XRPC error (InvalidRequest, etc.)
86
+
#[error("XRPC error: {0}")]
87
+
Generic(GenericXrpcError),
88
+
89
+
/// Response deserialization failed
90
+
#[error("Failed to decode response: {0}")]
91
+
#[diagnostic(transparent)]
92
+
Decode(
93
+
#[from]
94
+
#[diagnostic_source]
95
+
DecodeError,
96
+
),
97
+
98
+
/// Record operation failed with typed error from endpoint
99
+
/// Context: which repo/collection/rkey we were operating on
100
+
#[error("Record operation failed on {collection}/{rkey:?} in repo {repo}: {error}")]
101
+
RecordOperation {
102
+
/// The repository DID
103
+
repo: Did<'static>,
104
+
/// The collection NSID
105
+
collection: Nsid<'static>,
106
+
/// The record key
107
+
rkey: RecordKey<Rkey<'static>>,
108
+
/// The underlying error
109
+
error: Box<dyn std::error::Error + Send + Sync>,
110
+
},
111
+
112
+
/// Multi-step operation failed at sub-step (e.g., get failed in update_record)
113
+
#[error("Operation failed at step '{step}': {error}")]
114
+
SubOperation {
115
+
/// Description of which step failed
116
+
step: &'static str,
117
+
/// The underlying error
118
+
error: Box<dyn std::error::Error + Send + Sync>,
119
+
},
120
+
}
121
+
122
+
impl IntoStatic for AgentError {
123
+
type Output = AgentError;
124
+
125
+
fn into_static(self) -> Self::Output {
126
+
match self {
127
+
AgentError::RecordOperation {
128
+
repo,
129
+
collection,
130
+
rkey,
131
+
error,
132
+
} => AgentError::RecordOperation {
133
+
repo: repo.into_static(),
134
+
collection: collection.into_static(),
135
+
rkey: rkey.into_static(),
136
+
error,
137
+
},
138
+
AgentError::SubOperation { step, error } => AgentError::SubOperation { step, error },
139
+
// Error types are already 'static
140
+
AgentError::Client(e) => AgentError::Client(e),
141
+
AgentError::NoSession => AgentError::NoSession,
142
+
AgentError::Auth(e) => AgentError::Auth(e),
143
+
AgentError::Generic(e) => AgentError::Generic(e),
144
+
AgentError::Decode(e) => AgentError::Decode(e),
145
+
}
146
+
}
147
+
}
34
148
35
149
/// App password session information from `com.atproto.server.createSession`
36
150
///
···
204
318
pub async fn refresh(&self) -> Result<AuthorizationToken<'static>, ClientError> {
205
319
self.inner.refresh().await
206
320
}
321
+
322
+
// Convenience methods for repository operations
323
+
324
+
/// Create a new record in the repository.
325
+
///
326
+
/// The collection is inferred from the record type's `Collection::NSID`.
327
+
/// The repo is automatically filled from the session info.
328
+
///
329
+
/// # Example
330
+
///
331
+
/// ```no_run
332
+
/// # use jacquard::client::BasicClient;
333
+
/// # use jacquard_api::app_bsky::feed::post::Post;
334
+
/// # use jacquard_common::types::string::Datetime;
335
+
/// # use jacquard_common::CowStr;
336
+
/// # #[tokio::main]
337
+
/// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
338
+
/// # let agent: BasicClient = todo!();
339
+
/// let post = Post {
340
+
/// text: CowStr::from("Hello world!"),
341
+
/// created_at: Datetime::now(),
342
+
/// embed: None,
343
+
/// entities: None,
344
+
/// facets: None,
345
+
/// labels: None,
346
+
/// langs: None,
347
+
/// reply: None,
348
+
/// tags: None,
349
+
/// extra_data: Default::default(),
350
+
/// };
351
+
/// let output = agent.create_record(post, None).await?;
352
+
/// println!("Created record: {}", output.uri);
353
+
/// # Ok(())
354
+
/// # }
355
+
/// ```
356
+
pub async fn create_record<R>(
357
+
&self,
358
+
record: R,
359
+
rkey: Option<RecordKey<Rkey<'_>>>,
360
+
) -> Result<CreateRecordOutput<'static>, AgentError>
361
+
where
362
+
R: Collection + serde::Serialize,
363
+
{
364
+
use jacquard_api::com_atproto::repo::create_record::CreateRecord;
365
+
use jacquard_common::types::ident::AtIdentifier;
366
+
use jacquard_common::types::value::to_data;
367
+
368
+
let (did, _) = self.info().await.ok_or(AgentError::NoSession)?;
369
+
370
+
let data = to_data(&record).map_err(|e| AgentError::SubOperation {
371
+
step: "serialize record",
372
+
error: Box::new(e),
373
+
})?;
374
+
375
+
let request = CreateRecord::new()
376
+
.repo(AtIdentifier::Did(did))
377
+
.collection(R::nsid())
378
+
.record(data)
379
+
.maybe_rkey(rkey)
380
+
.build();
381
+
382
+
let response = self.send(request).await?;
383
+
response.into_output().map_err(|e| match e {
384
+
XrpcError::Auth(auth) => AgentError::Auth(auth),
385
+
XrpcError::Generic(g) => AgentError::Generic(g),
386
+
XrpcError::Decode(e) => AgentError::Decode(DecodeError::Json(e)),
387
+
XrpcError::Xrpc(typed) => AgentError::SubOperation {
388
+
step: "create record",
389
+
error: Box::new(typed),
390
+
},
391
+
})
392
+
}
393
+
394
+
/// Delete a record from the repository.
395
+
///
396
+
/// The collection is inferred from the type parameter.
397
+
/// The repo is automatically filled from the session info.
398
+
pub async fn delete_record<R, K>(
399
+
&self,
400
+
rkey: K,
401
+
) -> Result<DeleteRecordOutput<'static>, AgentError>
402
+
where
403
+
R: Collection,
404
+
K: Into<RecordKey<Rkey<'static>>>,
405
+
{
406
+
use jacquard_api::com_atproto::repo::delete_record::DeleteRecord;
407
+
use jacquard_common::types::ident::AtIdentifier;
408
+
409
+
let (did, _) = self.info().await.ok_or(AgentError::NoSession)?;
410
+
411
+
let request = DeleteRecord::new()
412
+
.repo(AtIdentifier::Did(did))
413
+
.collection(R::nsid())
414
+
.rkey(rkey.into())
415
+
.build();
416
+
417
+
let response = self.send(request).await?;
418
+
response.into_output().map_err(|e| match e {
419
+
XrpcError::Auth(auth) => AgentError::Auth(auth),
420
+
XrpcError::Generic(g) => AgentError::Generic(g),
421
+
XrpcError::Decode(e) => AgentError::Decode(DecodeError::Json(e)),
422
+
XrpcError::Xrpc(typed) => AgentError::SubOperation {
423
+
step: "delete record",
424
+
error: Box::new(typed),
425
+
},
426
+
})
427
+
}
428
+
429
+
/// Put (upsert) a record in the repository.
430
+
///
431
+
/// The collection is inferred from the record type's `Collection::NSID`.
432
+
/// The repo is automatically filled from the session info.
433
+
pub async fn put_record<R>(
434
+
&self,
435
+
rkey: RecordKey<Rkey<'static>>,
436
+
record: R,
437
+
) -> Result<PutRecordOutput<'static>, AgentError>
438
+
where
439
+
R: Collection + serde::Serialize,
440
+
{
441
+
use jacquard_api::com_atproto::repo::put_record::PutRecord;
442
+
use jacquard_common::types::ident::AtIdentifier;
443
+
use jacquard_common::types::value::to_data;
444
+
445
+
let (did, _) = self.info().await.ok_or(AgentError::NoSession)?;
446
+
447
+
let data = to_data(&record).map_err(|e| AgentError::SubOperation {
448
+
step: "serialize record",
449
+
error: Box::new(e),
450
+
})?;
451
+
452
+
let request = PutRecord::new()
453
+
.repo(AtIdentifier::Did(did))
454
+
.collection(R::nsid())
455
+
.rkey(rkey)
456
+
.record(data)
457
+
.build();
458
+
459
+
let response = self.send(request).await?;
460
+
response.into_output().map_err(|e| match e {
461
+
XrpcError::Auth(auth) => AgentError::Auth(auth),
462
+
XrpcError::Generic(g) => AgentError::Generic(g),
463
+
XrpcError::Decode(e) => AgentError::Decode(DecodeError::Json(e)),
464
+
XrpcError::Xrpc(typed) => AgentError::SubOperation {
465
+
step: "put record",
466
+
error: Box::new(typed),
467
+
},
468
+
})
469
+
}
470
+
471
+
/// Upload a blob to the repository.
472
+
///
473
+
/// The mime type is sent as a Content-Type header hint, though the server also performs
474
+
/// its own inference.
475
+
///
476
+
/// # Example
477
+
///
478
+
/// ```no_run
479
+
/// # use jacquard::client::BasicClient;
480
+
/// # use jacquard_common::types::blob::MimeType;
481
+
/// # #[tokio::main]
482
+
/// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
483
+
/// # let agent: BasicClient = todo!();
484
+
/// let data = std::fs::read("image.png")?;
485
+
/// let mime_type = MimeType::new_static("image/png");
486
+
/// let blob_ref = agent.upload_blob(data, mime_type).await?;
487
+
/// # Ok(())
488
+
/// # }
489
+
/// ```
490
+
pub async fn upload_blob(
491
+
&self,
492
+
data: impl Into<bytes::Bytes>,
493
+
mime_type: MimeType<'_>,
494
+
) -> Result<BlobRef<'static>, AgentError> {
495
+
use http::header::CONTENT_TYPE;
496
+
use jacquard_api::com_atproto::repo::upload_blob::UploadBlob;
497
+
498
+
let bytes = data.into();
499
+
let request = UploadBlob::new().body(bytes).build();
500
+
501
+
// Override Content-Type header with actual mime type instead of */*
502
+
let base = self.base_uri();
503
+
let mut opts = self.opts().await;
504
+
opts.extra_headers.push((
505
+
CONTENT_TYPE,
506
+
http::HeaderValue::from_str(mime_type.as_str()).map_err(|e| {
507
+
AgentError::SubOperation {
508
+
step: "set Content-Type header",
509
+
error: Box::new(e),
510
+
}
511
+
})?,
512
+
));
513
+
514
+
let response = self.xrpc(base).with_options(opts).send(&request).await?;
515
+
516
+
let output = response.into_output().map_err(|e| match e {
517
+
XrpcError::Auth(auth) => AgentError::Auth(auth),
518
+
XrpcError::Generic(g) => AgentError::Generic(g),
519
+
XrpcError::Decode(e) => AgentError::Decode(DecodeError::Json(e)),
520
+
XrpcError::Xrpc(typed) => AgentError::SubOperation {
521
+
step: "upload blob",
522
+
error: Box::new(typed),
523
+
},
524
+
})?;
525
+
Ok(BlobRef::Blob(output.blob.into_static()))
526
+
}
527
+
528
+
/// Update a vec-based data structure with a fetch-modify-put pattern.
529
+
///
530
+
/// This is useful for endpoints like preferences that return arrays requiring
531
+
/// fetch-modify-put operations.
532
+
///
533
+
/// # Example
534
+
///
535
+
/// ```ignore
536
+
/// agent.update_vec::<PreferencesUpdate>(|prefs| {
537
+
/// prefs.push(AdultContentPref::new().enabled(true).build().into());
538
+
/// prefs.retain(|p| !matches!(p, Preference::Hidden(_)));
539
+
/// }).await?;
540
+
/// ```
541
+
pub async fn update_vec<'s, U>(
542
+
&'s self,
543
+
modify: impl FnOnce(&mut Vec<<U as vec_update::VecUpdate>::Item>),
544
+
) -> Result<xrpc::Response<<U::PutRequest<'s> as XrpcRequest<'s>>::Response>, AgentError>
545
+
where
546
+
U: vec_update::VecUpdate + 's,
547
+
{
548
+
// Fetch current data
549
+
let get_request = U::build_get();
550
+
let response = self.send(get_request).await?;
551
+
let output = response.parse().map_err(|e| match e {
552
+
XrpcError::Auth(auth) => AgentError::Auth(auth),
553
+
XrpcError::Generic(g) => AgentError::Generic(g),
554
+
XrpcError::Decode(e) => AgentError::Decode(DecodeError::Json(e)),
555
+
XrpcError::Xrpc(_) => AgentError::SubOperation {
556
+
step: "get vec",
557
+
error: format!("{:?}", e).into(),
558
+
},
559
+
})?;
560
+
561
+
// Extract vec (converts to owned via IntoStatic)
562
+
let mut items = U::extract_vec(output);
563
+
564
+
// Apply modification
565
+
modify(&mut items);
566
+
567
+
// Build put request
568
+
let put_request = U::build_put(items);
569
+
570
+
// Send it
571
+
Ok(self.send(put_request).await?)
572
+
}
573
+
574
+
/// Update a single item in a vec-based data structure.
575
+
///
576
+
/// This is a convenience wrapper around `update_vec` that finds and replaces
577
+
/// a single matching item, or appends it if not found.
578
+
///
579
+
/// # Example
580
+
///
581
+
/// ```ignore
582
+
/// let pref = AdultContentPref::new().enabled(true).build();
583
+
/// agent.update_vec_item::<PreferencesUpdate>(pref.into()).await?;
584
+
/// ```
585
+
pub async fn update_vec_item<'s, U>(
586
+
&'s self,
587
+
item: <U as vec_update::VecUpdate>::Item,
588
+
) -> Result<xrpc::Response<<U::PutRequest<'s> as XrpcRequest<'s>>::Response>, AgentError>
589
+
where
590
+
U: vec_update::VecUpdate + 's,
591
+
{
592
+
self.update_vec::<U>(|vec| {
593
+
if let Some(pos) = vec.iter().position(|i| U::matches(i, &item)) {
594
+
vec[pos] = item;
595
+
} else {
596
+
vec.push(item);
597
+
}
598
+
})
599
+
.await
600
+
}
601
+
}
602
+
603
+
impl<A: AgentSession + IdentityResolver> Agent<A> {
604
+
/// Get a record from the repository using an at:// URI.
605
+
///
606
+
/// Returns a typed `Response` that deserializes directly to the record type.
607
+
/// Use `.parse()` to borrow from the response buffer, or `.into_output()` for owned data.
608
+
///
609
+
/// # Example
610
+
///
611
+
/// ```no_run
612
+
/// # use jacquard::client::BasicClient;
613
+
/// # use jacquard_api::app_bsky::feed::post::Post;
614
+
/// # use jacquard_common::types::string::AtUri;
615
+
/// # use jacquard_common::IntoStatic;
616
+
/// # #[tokio::main]
617
+
/// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
618
+
/// # let agent: BasicClient = todo!();
619
+
/// let uri = AtUri::new_static("at://did:plc:xyz/app.bsky.feed.post/3l5bqm7lepk2c").unwrap();
620
+
/// let response = agent.get_record::<Post>(uri).await?;
621
+
/// let output = response.parse()?; // PostGetRecordOutput<'_> borrowing from buffer
622
+
/// println!("Post text: {}", output.value.text);
623
+
///
624
+
/// // Or get owned data
625
+
/// let output_owned = response.into_output()?;
626
+
/// # Ok(())
627
+
/// # }
628
+
/// ```
629
+
pub async fn get_record<R>(&self, uri: AtUri<'_>) -> Result<Response<R::Record>, ClientError>
630
+
where
631
+
R: Collection,
632
+
{
633
+
// Validate that URI's collection matches the expected type
634
+
if let Some(uri_collection) = uri.collection() {
635
+
if uri_collection.as_str() != R::nsid().as_str() {
636
+
return Err(ClientError::Transport(TransportError::Other(
637
+
format!(
638
+
"Collection mismatch: URI contains '{}' but type parameter expects '{}'",
639
+
uri_collection,
640
+
R::nsid()
641
+
)
642
+
.into(),
643
+
)));
644
+
}
645
+
}
646
+
647
+
let rkey = uri.rkey().ok_or_else(|| {
648
+
ClientError::Transport(TransportError::Other("AtUri missing rkey".into()))
649
+
})?;
650
+
651
+
// Resolve authority (DID or handle) to get DID and PDS
652
+
use jacquard_common::types::ident::AtIdentifier;
653
+
let (repo_did, pds_url) = match uri.authority() {
654
+
AtIdentifier::Did(did) => {
655
+
let pds = self.pds_for_did(did).await.map_err(|e| {
656
+
ClientError::Transport(TransportError::Other(
657
+
format!("Failed to resolve PDS for {}: {}", did, e).into(),
658
+
))
659
+
})?;
660
+
(did.clone(), pds)
661
+
}
662
+
AtIdentifier::Handle(handle) => self.pds_for_handle(handle).await.map_err(|e| {
663
+
ClientError::Transport(TransportError::Other(
664
+
format!("Failed to resolve handle {}: {}", handle, e).into(),
665
+
))
666
+
})?,
667
+
};
668
+
669
+
// Make stateless XRPC call to that PDS (no auth required for public records)
670
+
use jacquard_api::com_atproto::repo::get_record::GetRecord;
671
+
let request = GetRecord::new()
672
+
.repo(AtIdentifier::Did(repo_did))
673
+
.collection(R::nsid())
674
+
.rkey(rkey.clone())
675
+
.build();
676
+
677
+
let response = self.xrpc(pds_url).send(&request).await?;
678
+
Ok(response.transmute())
679
+
}
680
+
681
+
/// Update a record in-place with a fetch-modify-put pattern.
682
+
///
683
+
/// This fetches the record using an at:// URI, converts it to owned data, applies
684
+
/// the modification function, and puts it back. The modification function receives
685
+
/// a mutable reference to the owned record.
686
+
///
687
+
/// # Example
688
+
///
689
+
/// ```no_run
690
+
/// # use jacquard::client::BasicClient;
691
+
/// # use jacquard_api::app_bsky::actor::profile::Profile;
692
+
/// # use jacquard_common::CowStr;
693
+
/// # use jacquard_common::types::string::AtUri;
694
+
/// # #[tokio::main]
695
+
/// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
696
+
/// # let agent: BasicClient = todo!();
697
+
/// let uri = AtUri::new_static("at://did:plc:xyz/app.bsky.actor.profile/self").unwrap();
698
+
/// // Update profile record in-place
699
+
/// agent.update_record::<Profile>(uri, |output| {
700
+
/// output.value.display_name = Some(CowStr::from("New Name"));
701
+
/// output.value.description = Some(CowStr::from("Updated bio"));
702
+
/// }).await?;
703
+
/// # Ok(())
704
+
/// # }
705
+
/// ```
706
+
pub async fn update_record<R>(
707
+
&self,
708
+
uri: AtUri<'_>,
709
+
f: impl FnOnce(&mut <<<R as Collection>::Record as XrpcResp>::Output<'_> as IntoStatic>::Output),
710
+
) -> Result<PutRecordOutput<'static>, AgentError>
711
+
where
712
+
R: Collection + Serialize,
713
+
R: From<<R as Collection>::Record>,
714
+
R: for<'a> From<
715
+
<<<R as Collection>::Record as XrpcResp>::Output<'a> as IntoStatic>::Output,
716
+
>,
717
+
{
718
+
// Fetch the record - Response<R::Record> where R::Record::Output<'de> = R<'de>
719
+
let response = self.get_record::<R>(uri.clone()).await?;
720
+
721
+
// Parse to get R<'_> borrowing from response buffer
722
+
let record = response.parse().map_err(|e| match e {
723
+
XrpcError::Auth(auth) => AgentError::Auth(auth),
724
+
XrpcError::Generic(g) => AgentError::Generic(g),
725
+
XrpcError::Decode(e) => AgentError::Decode(DecodeError::Json(e)),
726
+
XrpcError::Xrpc(typed) => AgentError::SubOperation {
727
+
step: "get record",
728
+
error: format!("{:?}", typed).into(),
729
+
},
730
+
})?;
731
+
732
+
// Convert to owned
733
+
let mut owned = record.into_static();
734
+
735
+
// Apply modification
736
+
f(&mut owned);
737
+
738
+
// Put it back
739
+
let rkey = uri
740
+
.rkey()
741
+
.ok_or(AgentError::SubOperation {
742
+
step: "extract rkey",
743
+
error: "AtUri missing rkey".into(),
744
+
})?
745
+
.clone()
746
+
.into_static();
747
+
self.put_record::<R>(rkey, R::from(owned)).await
748
+
}
207
749
}
208
750
209
751
impl<A: AgentSession> HttpClient for Agent<A> {
···
236
778
}
237
779
}
238
780
781
+
impl<A: AgentSession + IdentityResolver> IdentityResolver for Agent<A> {
782
+
fn options(&self) -> &jacquard_identity::resolver::ResolverOptions {
783
+
self.inner.options()
784
+
}
785
+
786
+
fn resolve_handle(
787
+
&self,
788
+
handle: &Handle<'_>,
789
+
) -> impl Future<Output = Result<Did<'static>, jacquard_identity::resolver::IdentityError>>
790
+
{
791
+
async { self.inner.resolve_handle(handle).await }
792
+
}
793
+
794
+
fn resolve_did_doc(
795
+
&self,
796
+
did: &Did<'_>,
797
+
) -> impl Future<
798
+
Output = Result<
799
+
jacquard_identity::resolver::DidDocResponse,
800
+
jacquard_identity::resolver::IdentityError,
801
+
>,
802
+
> {
803
+
async { self.inner.resolve_did_doc(did).await }
804
+
}
805
+
}
806
+
239
807
impl<A: AgentSession> From<A> for Agent<A> {
240
808
fn from(inner: A) -> Self {
241
809
Self::new(inner)
···
254
822
jacquard_identity::PublicResolver,
255
823
>,
256
824
>;
825
+
826
+
impl BasicClient {
827
+
/// Create an unauthenticated BasicClient for public API access.
828
+
///
829
+
/// Uses an in-memory session store and public resolver. Suitable for
830
+
/// read-only operations on public data without authentication.
831
+
///
832
+
/// # Example
833
+
///
834
+
/// ```no_run
835
+
/// # use jacquard::client::BasicClient;
836
+
/// # use jacquard::types::string::AtUri;
837
+
/// # use jacquard_api::app_bsky::feed::post::Post;
838
+
/// # #[tokio::main]
839
+
/// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
840
+
/// let client = BasicClient::unauthenticated();
841
+
/// let uri = AtUri::new_static("at://did:plc:xyz/app.bsky.feed.post/3l5abc").unwrap();
842
+
/// let response = client.get_record::<Post<'_>>(uri).await?;
843
+
/// # Ok(())
844
+
/// # }
845
+
/// ```
846
+
pub fn unauthenticated() -> Self {
847
+
use std::sync::Arc;
848
+
let http = reqwest::Client::new();
849
+
let resolver = jacquard_identity::PublicResolver::new(http, Default::default());
850
+
let store = MemorySessionStore::default();
851
+
let session = CredentialSession::new(Arc::new(store), Arc::new(resolver));
852
+
Agent::new(session)
853
+
}
854
+
}
855
+
856
+
impl Default for BasicClient {
857
+
fn default() -> Self {
858
+
Self::unauthenticated()
859
+
}
860
+
}
+31
-1
crates/jacquard/src/client/credential_session.rs
+31
-1
crates/jacquard/src/client/credential_session.rs
···
8
8
error::{AuthError, ClientError, TransportError, XrpcResult},
9
9
http_client::HttpClient,
10
10
session::SessionStore,
11
-
types::did::Did,
11
+
types::{did::Did, string::Handle},
12
12
xrpc::{CallOptions, Response, XrpcClient, XrpcError, XrpcExt, XrpcRequest, XrpcResp},
13
13
};
14
14
use tokio::sync::RwLock;
···
451
451
_ => false,
452
452
}
453
453
}
454
+
455
+
impl<S, T> IdentityResolver for CredentialSession<S, T>
456
+
where
457
+
S: SessionStore<SessionKey, AtpSession> + Send + Sync + 'static,
458
+
T: HttpClient + IdentityResolver + Send + Sync + 'static,
459
+
{
460
+
fn options(&self) -> &jacquard_identity::resolver::ResolverOptions {
461
+
self.client.options()
462
+
}
463
+
464
+
fn resolve_handle(
465
+
&self,
466
+
handle: &Handle<'_>,
467
+
) -> impl Future<Output = Result<Did<'static>, jacquard_identity::resolver::IdentityError>>
468
+
{
469
+
async { self.client.resolve_handle(handle).await }
470
+
}
471
+
472
+
fn resolve_did_doc(
473
+
&self,
474
+
did: &Did<'_>,
475
+
) -> impl Future<
476
+
Output = Result<
477
+
jacquard_identity::resolver::DidDocResponse,
478
+
jacquard_identity::resolver::IdentityError,
479
+
>,
480
+
> {
481
+
async { self.client.resolve_did_doc(did).await }
482
+
}
483
+
}
+3
-2
crates/jacquard/src/client/token.rs
+3
-2
crates/jacquard/src/client/token.rs
···
389
389
}
390
390
391
391
#[async_trait::async_trait]
392
-
impl jacquard_common::session::SessionStore<
392
+
impl
393
+
jacquard_common::session::SessionStore<
393
394
crate::client::credential_session::SessionKey,
394
395
crate::client::AtpSession,
395
396
> for FileAuthStore
···
452
453
#[cfg(test)]
453
454
mod tests {
454
455
use super::*;
455
-
use crate::client::credential_session::SessionKey;
456
456
use crate::client::AtpSession;
457
+
use crate::client::credential_session::SessionKey;
457
458
use jacquard_common::types::string::{Did, Handle};
458
459
use std::fs;
459
460
use std::path::PathBuf;
+67
crates/jacquard/src/client/vec_update.rs
+67
crates/jacquard/src/client/vec_update.rs
···
1
+
/// Bluesky actor preferences implementation
2
+
pub mod preferences;
3
+
4
+
pub use preferences::PreferencesUpdate;
5
+
6
+
use jacquard_common::IntoStatic;
7
+
use jacquard_common::xrpc::{XrpcRequest, XrpcResp};
8
+
9
+
/// Trait for get-modify-put patterns on vec-based data structures.
10
+
///
11
+
/// This trait enables convenient update operations for endpoints that return arrays
12
+
/// that need to be fetched, modified, and put back. Common use cases include
13
+
/// preferences, saved feeds, and similar collection-style data.
14
+
///
15
+
/// # Example
16
+
///
17
+
/// ```ignore
18
+
/// use jacquard::client::vec_update::VecUpdate;
19
+
///
20
+
/// struct PreferencesUpdate;
21
+
///
22
+
/// impl VecUpdate for PreferencesUpdate {
23
+
/// type GetRequest = GetPreferences;
24
+
/// type PutRequest = PutPreferences;
25
+
/// type Item = PreferencesItem<'static>;
26
+
///
27
+
/// fn extract_vec(output: GetPreferencesOutput<'_>) -> Vec<Self::Item> {
28
+
/// output.preferences.into_iter().map(|p| p.into_static()).collect()
29
+
/// }
30
+
///
31
+
/// fn build_put(items: Vec<Self::Item>) -> PutPreferences {
32
+
/// PutPreferences { preferences: items }
33
+
/// }
34
+
///
35
+
/// fn matches(a: &Self::Item, b: &Self::Item) -> bool {
36
+
/// // Match by enum variant discriminant
37
+
/// std::mem::discriminant(a) == std::mem::discriminant(b)
38
+
/// }
39
+
/// }
40
+
/// ```
41
+
pub trait VecUpdate {
42
+
/// The XRPC request type for fetching the data
43
+
type GetRequest<'de>: XrpcRequest<'de>;
44
+
45
+
/// The XRPC request type for putting the data back
46
+
type PutRequest<'de>: XrpcRequest<'de>;
47
+
48
+
/// The item type contained in the vec (must be owned/static)
49
+
type Item: IntoStatic;
50
+
51
+
/// Build the get request
52
+
fn build_get<'s>() -> Self::GetRequest<'s>;
53
+
54
+
/// Extract the vec from the get response output
55
+
fn extract_vec<'s>(
56
+
output: <<Self::GetRequest<'s> as XrpcRequest<'s>>::Response as XrpcResp>::Output<'s>,
57
+
) -> Vec<Self::Item>;
58
+
59
+
/// Build the put request from the modified vec
60
+
fn build_put<'s>(items: Vec<Self::Item>) -> Self::PutRequest<'s>;
61
+
62
+
/// Check if two items match (for single-item update operations)
63
+
///
64
+
/// This is used by `update_vec_item` to find and replace a single item in the vec.
65
+
/// For example, preferences might match by enum variant discriminant.
66
+
fn matches<'s>(a: &'s Self::Item, b: &'s Self::Item) -> bool;
67
+
}
+63
crates/jacquard/src/client/vec_update/preferences.rs
+63
crates/jacquard/src/client/vec_update/preferences.rs
···
1
+
use jacquard_api::app_bsky::actor::PreferencesItem;
2
+
use jacquard_api::app_bsky::actor::get_preferences::{GetPreferences, GetPreferencesOutput};
3
+
use jacquard_api::app_bsky::actor::put_preferences::PutPreferences;
4
+
use jacquard_common::IntoStatic;
5
+
6
+
/// VecUpdate implementation for Bluesky actor preferences.
7
+
///
8
+
/// Provides get-modify-put operations on user preferences, which are stored
9
+
/// as a vec of preference items (each identified by enum discriminant).
10
+
///
11
+
/// # Example
12
+
///
13
+
/// ```ignore
14
+
/// use jacquard::client::vec_update::PreferencesUpdate;
15
+
/// use jacquard_api::app_bsky::actor::PreferencesItem;
16
+
///
17
+
/// // Update all preferences
18
+
/// agent.update_vec::<PreferencesUpdate>(|prefs| {
19
+
/// // Add a new preference
20
+
/// prefs.push(PreferencesItem::AdultContentPref(
21
+
/// Box::new(AdultContentPref { enabled: true })
22
+
/// ));
23
+
///
24
+
/// // Remove by variant
25
+
/// prefs.retain(|p| !matches!(p, PreferencesItem::InterestsPref(_)));
26
+
/// }).await?;
27
+
///
28
+
/// // Update a single preference (replaces by discriminant)
29
+
/// let pref = PreferencesItem::AdultContentPref(
30
+
/// Box::new(AdultContentPref { enabled: false })
31
+
/// );
32
+
/// agent.update_vec_item::<PreferencesUpdate>(pref).await?;
33
+
/// ```
34
+
pub struct PreferencesUpdate;
35
+
36
+
impl super::VecUpdate for PreferencesUpdate {
37
+
type GetRequest<'de> = GetPreferences;
38
+
type PutRequest<'de> = PutPreferences<'de>;
39
+
type Item = PreferencesItem<'static>;
40
+
41
+
fn build_get<'s>() -> Self::GetRequest<'s> {
42
+
GetPreferences::new().build()
43
+
}
44
+
45
+
fn extract_vec<'s>(
46
+
output: GetPreferencesOutput<'s>,
47
+
) -> Vec<<Self::Item as IntoStatic>::Output> {
48
+
output
49
+
.preferences
50
+
.into_iter()
51
+
.map(|p| p.into_static())
52
+
.collect()
53
+
}
54
+
55
+
fn build_put<'s>(items: Vec<<Self::Item as IntoStatic>::Output>) -> Self::PutRequest<'s> {
56
+
PutPreferences::new().preferences(items).build()
57
+
}
58
+
59
+
fn matches<'s>(a: &'s Self::Item, b: &'s Self::Item) -> bool {
60
+
// Match preferences by enum variant discriminant
61
+
std::mem::discriminant(a) == std::mem::discriminant(b)
62
+
}
63
+
}
+17
-13
crates/jacquard/src/lib.rs
+17
-13
crates/jacquard/src/lib.rs
···
49
49
//! async fn main() -> miette::Result<()> {
50
50
//! let args = Args::parse();
51
51
//!
52
-
//! // File-backed auth store shared by OAuthClient and session registry
53
-
//! let store = FileAuthStore::new(&args.store);
54
-
//! let client_data = jacquard_oauth::session::ClientData {
55
-
//! keyset: None,
56
-
//! // Default sets normal localhost redirect URIs and "atproto transition:generic" scopes.
57
-
//! // The localhost helper will ensure you have at least "atproto" and will fix urls
58
-
//! config: AtprotoClientMetadata::default_localhost(),
59
-
//! };
60
-
//!
61
-
//! // Build an OAuth client (this is reusable, and can create multiple sessions)
62
-
//! let oauth = OAuthClient::new(store, client_data);
52
+
//! // Build an OAuth client with file-backed auth store and default localhost config
53
+
//! let oauth = OAuthClient::with_default_config(FileAuthStore::new(&args.store));
63
54
//! // Authenticate with a PDS, using a loopback server to handle the callback flow
64
55
//! # #[cfg(feature = "loopback")]
65
56
//! let session = oauth
···
155
146
//! Ok(())
156
147
//! }
157
148
//! ```
149
+
//!
150
+
//! ## Component Crates
151
+
//!
152
+
//! Jacquard is split into several crates for modularity. The main `jacquard` crate
153
+
//! re-exports most of the others, so you typically only need to depend on it directly.
154
+
//!
155
+
//! - [`jacquard-common`] - AT Protocol types (DIDs, handles, at-URIs, NSIDs, TIDs, CIDs, etc.)
156
+
//! - [`jacquard-api`] - Generated API bindings from 646+ lexicon schemas
157
+
//! - [`jacquard-axum`] - Server-side XRPC handler extractors for Axum framework (not re-exported, depends on jacquard)
158
+
//! - [`jacquard-oauth`] - OAuth/DPoP flow implementation with session management
159
+
//! - [`jacquard-identity`] - Identity resolution (handle→DID, DID→Doc, OAuth metadata)
160
+
//! - [`jacquard-lexicon`] - Lexicon resolution, fetching, parsing and Rust code generation from schemas
161
+
//! - [`jacquard-derive`] - Macros (`#[lexicon]`, `#[open_union]`, `#[derive(IntoStatic)]`)
158
162
159
163
#![warn(missing_docs)]
160
164
161
-
/// XRPC client traits and basic implementation
162
165
pub mod client;
163
166
167
+
pub use common::*;
164
168
#[cfg(feature = "api")]
165
169
/// If enabled, re-export the generated api crate
166
170
pub use jacquard_api as api;
167
-
pub use jacquard_common::*;
171
+
pub use jacquard_common as common;
168
172
169
173
#[cfg(feature = "derive")]
170
174
/// if enabled, reexport the attribute macros
+2
-4
crates/jacquard/src/main.rs
examples/oauth_timeline.rs
+2
-4
crates/jacquard/src/main.rs
examples/oauth_timeline.rs
···
26
26
async fn main() -> miette::Result<()> {
27
27
let args = Args::parse();
28
28
29
-
// File-backed auth store for testing
29
+
// File-backed auth store shared by OAuthClient and session registry
30
30
let store = FileAuthStore::new(&args.store);
31
-
32
-
// Minimal localhost client metadata (redirect_uris get set by loopback helper)
33
31
let client_data = jacquard_oauth::session::ClientData {
34
32
keyset: None,
35
33
// Default sets normal localhost redirect URIs and "atproto transition:generic" scopes.
···
37
35
config: AtprotoClientMetadata::default_localhost(),
38
36
};
39
37
40
-
// Build an OAuth client
38
+
// Build an OAuth client (this is reusable, and can create multiple sessions)
41
39
let oauth = OAuthClient::new(store, client_data);
42
40
43
41
#[cfg(feature = "loopback")]
+36
examples/axum_server.rs
+36
examples/axum_server.rs
···
1
+
use axum::Router;
2
+
use jacquard::api::com_atproto::identity::resolve_did::ResolveDidRequest;
3
+
use jacquard_axum::{ExtractXrpc, IntoRouter};
4
+
use miette::{IntoDiagnostic, Result};
5
+
use tracing_subscriber::EnvFilter;
6
+
7
+
#[axum_macros::debug_handler]
8
+
async fn handler(ExtractXrpc(_args): ExtractXrpc<ResolveDidRequest>) -> &'static str {
9
+
"hello world!"
10
+
// let res = jacquard::identity::slingshot_resolver_default();
11
+
// let doc = res.resolve_did_doc(&args.did).await?;
12
+
// let valid_doc = doc.parse()?;
13
+
// let doc_value = serde_json::to_value(valid_doc).unwrap();
14
+
// Ok(ResolveDidOutput {
15
+
// did_doc: Data::from_json(&doc_value).unwrap().into_static(),
16
+
// extra_data: Default::default(),
17
+
// }
18
+
// .into())
19
+
}
20
+
21
+
#[tokio::main]
22
+
async fn main() -> Result<()> {
23
+
tracing_subscriber::fmt()
24
+
.with_timer(tracing_subscriber::fmt::time::UtcTime::rfc_3339())
25
+
.with_env_filter(EnvFilter::from_env("QDPDS_LOG"))
26
+
.init();
27
+
let app = Router::new()
28
+
.route("/", axum::routing::get(|| async { "hello world!" }))
29
+
.merge(ResolveDidRequest::into_router(handler))
30
+
.layer(tower_http::trace::TraceLayer::new_for_http());
31
+
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000")
32
+
.await
33
+
.into_diagnostic()?;
34
+
axum::serve(listener, app).await.unwrap();
35
+
Ok(())
36
+
}
+56
examples/create_post.rs
+56
examples/create_post.rs
···
1
+
use clap::Parser;
2
+
use jacquard::api::app_bsky::feed::post::Post;
3
+
use jacquard::client::{Agent, FileAuthStore};
4
+
use jacquard::oauth::atproto::AtprotoClientMetadata;
5
+
use jacquard::oauth::client::OAuthClient;
6
+
use jacquard::oauth::loopback::LoopbackConfig;
7
+
use jacquard::types::string::Datetime;
8
+
use jacquard::xrpc::XrpcClient;
9
+
use jacquard::CowStr;
10
+
use miette::IntoDiagnostic;
11
+
12
+
#[derive(Parser, Debug)]
13
+
#[command(author, version, about = "Create a simple post")]
14
+
struct Args {
15
+
/// Handle (e.g., alice.bsky.social), DID, or PDS URL
16
+
input: CowStr<'static>,
17
+
18
+
/// Post text
19
+
#[arg(short, long)]
20
+
text: String,
21
+
22
+
/// Path to auth store file (will be created if missing)
23
+
#[arg(long, default_value = "/tmp/jacquard-oauth-session.json")]
24
+
store: String,
25
+
}
26
+
27
+
#[tokio::main]
28
+
async fn main() -> miette::Result<()> {
29
+
let args = Args::parse();
30
+
31
+
let oauth = OAuthClient::with_default_config(FileAuthStore::new(&args.store));
32
+
let session = oauth
33
+
.login_with_local_server(args.input, Default::default(), LoopbackConfig::default())
34
+
.await?;
35
+
36
+
let agent: Agent<_> = Agent::from(session);
37
+
38
+
// Create a simple text post using the Agent convenience method
39
+
let post = Post {
40
+
text: CowStr::from(args.text),
41
+
created_at: Datetime::now(),
42
+
embed: None,
43
+
entities: None,
44
+
facets: None,
45
+
labels: None,
46
+
langs: None,
47
+
reply: None,
48
+
tags: None,
49
+
extra_data: Default::default(),
50
+
};
51
+
52
+
let output = agent.create_record(post, None).await?;
53
+
println!("✓ Created post: {}", output.uri);
54
+
55
+
Ok(())
56
+
}
+66
examples/create_whitewind_post.rs
+66
examples/create_whitewind_post.rs
···
1
+
use clap::Parser;
2
+
use jacquard::api::com_whtwnd::blog::entry::Entry;
3
+
use jacquard::client::{Agent, FileAuthStore};
4
+
use jacquard::oauth::atproto::AtprotoClientMetadata;
5
+
use jacquard::oauth::client::OAuthClient;
6
+
use jacquard::oauth::loopback::LoopbackConfig;
7
+
use jacquard::types::string::Datetime;
8
+
use jacquard::xrpc::XrpcClient;
9
+
use jacquard::CowStr;
10
+
use miette::IntoDiagnostic;
11
+
12
+
#[derive(Parser, Debug)]
13
+
#[command(author, version, about = "Create a WhiteWind blog post")]
14
+
struct Args {
15
+
/// Handle (e.g., alice.bsky.social), DID, or PDS URL
16
+
input: CowStr<'static>,
17
+
18
+
/// Blog post title
19
+
#[arg(short, long)]
20
+
title: String,
21
+
22
+
/// Blog post content (markdown)
23
+
#[arg(short, long)]
24
+
content: String,
25
+
26
+
/// Optional subtitle
27
+
#[arg(short, long)]
28
+
subtitle: Option<String>,
29
+
30
+
/// Path to auth store file (will be created if missing)
31
+
#[arg(long, default_value = "/tmp/jacquard-oauth-session.json")]
32
+
store: String,
33
+
}
34
+
35
+
#[tokio::main]
36
+
async fn main() -> miette::Result<()> {
37
+
let args = Args::parse();
38
+
39
+
let oauth = OAuthClient::with_default_config(FileAuthStore::new(&args.store));
40
+
let session = oauth
41
+
.login_with_local_server(args.input, Default::default(), LoopbackConfig::default())
42
+
.await?;
43
+
44
+
let agent: Agent<_> = Agent::from(session);
45
+
46
+
// Create a WhiteWind blog entry
47
+
// The content field accepts markdown
48
+
let entry = Entry {
49
+
title: Some(CowStr::from(args.title)),
50
+
subtitle: args.subtitle.map(CowStr::from),
51
+
content: CowStr::from(args.content),
52
+
created_at: Some(Datetime::now()),
53
+
visibility: Some(CowStr::from("url")), // "url" = public with link, "author" = public on profile
54
+
theme: None,
55
+
ogp: None,
56
+
blobs: None,
57
+
is_draft: None,
58
+
extra_data: Default::default(),
59
+
};
60
+
61
+
let output = agent.create_record(entry, None).await?;
62
+
println!("✓ Created WhiteWind blog post: {}", output.uri);
63
+
println!(" View at: https://whtwnd.com/post/{}", output.uri);
64
+
65
+
Ok(())
66
+
}
+97
examples/post_with_image.rs
+97
examples/post_with_image.rs
···
1
+
use clap::Parser;
2
+
use jacquard::api::app_bsky::embed::images::{Image, Images};
3
+
use jacquard::api::app_bsky::feed::post::{Post, PostEmbed};
4
+
use jacquard::client::{Agent, FileAuthStore};
5
+
use jacquard::oauth::atproto::AtprotoClientMetadata;
6
+
use jacquard::oauth::client::OAuthClient;
7
+
use jacquard::oauth::loopback::LoopbackConfig;
8
+
use jacquard::types::blob::MimeType;
9
+
use jacquard::types::string::Datetime;
10
+
use jacquard::xrpc::XrpcClient;
11
+
use jacquard::CowStr;
12
+
use miette::IntoDiagnostic;
13
+
use std::path::PathBuf;
14
+
15
+
#[derive(Parser, Debug)]
16
+
#[command(author, version, about = "Create a post with an image")]
17
+
struct Args {
18
+
/// Handle (e.g., alice.bsky.social), DID, or PDS URL
19
+
input: CowStr<'static>,
20
+
21
+
/// Post text
22
+
#[arg(short, long)]
23
+
text: String,
24
+
25
+
/// Path to image file
26
+
#[arg(short, long)]
27
+
image: PathBuf,
28
+
29
+
/// Alt text for image
30
+
#[arg(long)]
31
+
alt: Option<String>,
32
+
33
+
/// Path to auth store file (will be created if missing)
34
+
#[arg(long, default_value = "/tmp/jacquard-oauth-session.json")]
35
+
store: String,
36
+
}
37
+
38
+
#[tokio::main]
39
+
async fn main() -> miette::Result<()> {
40
+
let args = Args::parse();
41
+
42
+
let oauth = OAuthClient::with_default_config(FileAuthStore::new(&args.store));
43
+
let session = oauth
44
+
.login_with_local_server(args.input, Default::default(), LoopbackConfig::default())
45
+
.await?;
46
+
47
+
let agent: Agent<_> = Agent::from(session);
48
+
49
+
// Read image file
50
+
let image_data = std::fs::read(&args.image).into_diagnostic()?;
51
+
52
+
// Infer mime type from extension
53
+
let mime_str = match args.image.extension().and_then(|s| s.to_str()) {
54
+
Some("jpg") | Some("jpeg") => "image/jpeg",
55
+
Some("png") => "image/png",
56
+
Some("gif") => "image/gif",
57
+
Some("webp") => "image/webp",
58
+
_ => "image/jpeg", // default
59
+
};
60
+
let mime_type = MimeType::new_static(mime_str);
61
+
62
+
println!("📤 Uploading image...");
63
+
let blob_ref = agent.upload_blob(image_data, mime_type).await?;
64
+
65
+
// Extract the Blob from the BlobRef
66
+
let blob = match blob_ref {
67
+
jacquard::types::blob::BlobRef::Blob(b) => b,
68
+
_ => miette::bail!("Expected Blob, got LegacyBlob"),
69
+
};
70
+
71
+
// Create post with image embed
72
+
let post = Post {
73
+
text: CowStr::from(args.text),
74
+
created_at: Datetime::now(),
75
+
embed: Some(PostEmbed::Images(Box::new(Images {
76
+
images: vec![Image {
77
+
alt: CowStr::from(args.alt.unwrap_or_default()),
78
+
image: blob,
79
+
aspect_ratio: None,
80
+
extra_data: Default::default(),
81
+
}],
82
+
extra_data: Default::default(),
83
+
}))),
84
+
entities: None,
85
+
facets: None,
86
+
labels: None,
87
+
langs: None,
88
+
reply: None,
89
+
tags: None,
90
+
extra_data: Default::default(),
91
+
};
92
+
93
+
let output = agent.create_record(post, None).await?;
94
+
println!("✓ Created post with image: {}", output.uri);
95
+
96
+
Ok(())
97
+
}
+32
examples/public_atproto_feed.rs
+32
examples/public_atproto_feed.rs
···
1
+
use jacquard::api::app_bsky::feed::get_feed::GetFeed;
2
+
use jacquard::api::app_bsky::feed::post::Post;
3
+
use jacquard::types::string::AtUri;
4
+
use jacquard::types::value::from_data;
5
+
use jacquard::xrpc::XrpcExt;
6
+
use miette::IntoDiagnostic;
7
+
8
+
#[tokio::main]
9
+
async fn main() -> miette::Result<()> {
10
+
// Stateless XRPC - no auth required for public feeds
11
+
let http = reqwest::Client::new();
12
+
let base = url::Url::parse("https://public.api.bsky.app").into_diagnostic()?;
13
+
14
+
// Feed of posts about the AT Protocol
15
+
let feed_uri =
16
+
AtUri::new_static("at://did:plc:oio4hkxaop4ao4wz2pp3f4cr/app.bsky.feed.generator/atproto")
17
+
.unwrap();
18
+
19
+
let request = GetFeed::new().feed(feed_uri).limit(10).build();
20
+
21
+
let response = http.xrpc(base).send(&request).await?;
22
+
let output = response.into_output()?;
23
+
24
+
println!("📰 Latest posts from the AT Protocol feed:\n");
25
+
for (i, item) in output.feed.iter().enumerate() {
26
+
// Deserialize the post record from the Data type
27
+
let post: Post = from_data(&item.post.record).into_diagnostic()?;
28
+
println!("{}.(@{})\n{} ", i + 1, item.post.author.handle, post.text);
29
+
}
30
+
31
+
Ok(())
32
+
}
+63
examples/read_tangled_repo.rs
+63
examples/read_tangled_repo.rs
···
1
+
use clap::Parser;
2
+
use jacquard::api::sh_tangled::repo::Repo;
3
+
use jacquard::client::BasicClient;
4
+
use jacquard::types::string::AtUri;
5
+
6
+
#[derive(Parser, Debug)]
7
+
#[command(author, version, about = "Read a Tangled git repository record")]
8
+
struct Args {
9
+
/// at:// URI of the repo record
10
+
/// Example: at://did:plc:xyz/sh.tangled.repo/3lzabc123
11
+
/// The default is the jacquard repository
12
+
#[arg(default_value = "at://did:plc:yfvwmnlztr4dwkb7hwz55r2g/sh.tangled.repo/3lzrya6fcwv22")]
13
+
uri: String,
14
+
}
15
+
16
+
#[tokio::main]
17
+
async fn main() -> miette::Result<()> {
18
+
let args = Args::parse();
19
+
20
+
// Parse the at:// URI
21
+
let uri = AtUri::new(&args.uri)?;
22
+
23
+
// Create an unauthenticated agent for public record access
24
+
let agent = BasicClient::unauthenticated();
25
+
26
+
// Use Agent's get_record helper with the at:// URI
27
+
let response = agent.get_record::<Repo>(uri).await?;
28
+
let output = response.into_output()?;
29
+
30
+
println!("Tangled Repository\n");
31
+
println!("URI: {}", output.uri);
32
+
println!("Name: {}", output.value.name);
33
+
34
+
if let Some(desc) = &output.value.description {
35
+
println!("Description: {}", desc);
36
+
}
37
+
38
+
println!("Knot: {}", output.value.knot);
39
+
println!("Created: {}", output.value.created_at);
40
+
41
+
if let Some(source) = &output.value.source {
42
+
println!("Source: {}", source.as_str());
43
+
}
44
+
45
+
if let Some(spindle) = &output.value.spindle {
46
+
println!("CI Spindle: {}", spindle);
47
+
}
48
+
49
+
if let Some(labels) = &output.value.labels {
50
+
if !labels.is_empty() {
51
+
println!(
52
+
"Labels available: {}",
53
+
labels
54
+
.iter()
55
+
.map(|l| l.to_string())
56
+
.collect::<Vec<_>>()
57
+
.join(", ")
58
+
);
59
+
}
60
+
}
61
+
62
+
Ok(())
63
+
}
+40
examples/read_whitewind_posts.rs
+40
examples/read_whitewind_posts.rs
···
1
+
use clap::Parser;
2
+
use jacquard::api::com_whtwnd::blog::entry::Entry;
3
+
use jacquard::client::BasicClient;
4
+
use jacquard::types::string::AtUri;
5
+
6
+
#[derive(Parser, Debug)]
7
+
#[command(author, version, about = "Read a WhiteWind blog post")]
8
+
struct Args {
9
+
/// at:// URI of the blog entry
10
+
/// Example: at://did:plc:xyz/com.whtwnd.blog.entry/3l5abc123
11
+
uri: String,
12
+
}
13
+
14
+
#[tokio::main]
15
+
async fn main() -> miette::Result<()> {
16
+
let args = Args::parse();
17
+
18
+
// Parse the at:// URI
19
+
let uri = AtUri::new(&args.uri)?;
20
+
21
+
// Create an unauthenticated agent for public record access
22
+
let agent = BasicClient::unauthenticated();
23
+
24
+
// Use Agent's get_record helper with the at:// URI
25
+
let response = agent.get_record::<Entry>(uri).await?;
26
+
let output = response.into_output()?;
27
+
28
+
println!("📚 WhiteWind Blog Entry\n");
29
+
println!("URI: {}", output.uri);
30
+
println!("Title: {}", output.value.title.as_deref().unwrap_or("[Untitled]"));
31
+
if let Some(subtitle) = &output.value.subtitle {
32
+
println!("Subtitle: {}", subtitle);
33
+
}
34
+
if let Some(created) = &output.value.created_at {
35
+
println!("Created: {}", created);
36
+
}
37
+
println!("\n{}", output.value.content);
38
+
39
+
Ok(())
40
+
}
+100
examples/resolve_did.rs
+100
examples/resolve_did.rs
···
1
+
use clap::Parser;
2
+
use jacquard::client::BasicClient;
3
+
use jacquard::types::string::Handle;
4
+
use jacquard_identity::resolver::IdentityResolver;
5
+
use miette::IntoDiagnostic;
6
+
7
+
#[derive(Parser, Debug)]
8
+
#[command(author, version, about = "Resolve a handle to its DID document")]
9
+
struct Args {
10
+
/// Handle to resolve (e.g., alice.bsky.social)
11
+
#[arg(default_value = "pfrazee.com")]
12
+
handle: String,
13
+
}
14
+
15
+
#[tokio::main]
16
+
async fn main() -> miette::Result<()> {
17
+
let args = Args::parse();
18
+
19
+
// Parse the handle
20
+
let handle = Handle::new(&args.handle)?;
21
+
22
+
// Create an unauthenticated client with identity resolver
23
+
let client = BasicClient::unauthenticated();
24
+
25
+
// Resolve handle to DID
26
+
println!("Resolving handle: {}", handle);
27
+
let did = client
28
+
.resolve_handle(&handle)
29
+
.await
30
+
.map_err(|e| miette::miette!("Failed to resolve handle: {}", e))?;
31
+
32
+
println!("DID: {}\n", did);
33
+
34
+
// Resolve DID document
35
+
let doc_response = client
36
+
.resolve_did_doc(&did)
37
+
.await
38
+
.map_err(|e| miette::miette!("Failed to resolve DID document: {}", e))?;
39
+
40
+
let doc = doc_response
41
+
.parse()
42
+
.map_err(|e| miette::miette!("Failed to parse DID document: {}", e))?;
43
+
44
+
println!("DID Document:");
45
+
println!("ID: {}", doc.id);
46
+
47
+
if let Some(aka) = &doc.also_known_as {
48
+
if !aka.is_empty() {
49
+
println!("\nAlso Known As:");
50
+
for handle in aka {
51
+
println!(" - {}", handle);
52
+
}
53
+
}
54
+
}
55
+
56
+
if let Some(verification_methods) = &doc.verification_method {
57
+
println!("\nVerification Methods:");
58
+
for method in verification_methods {
59
+
println!(" ID: {}", method.id);
60
+
println!(" Type: {}", method.r#type);
61
+
if let Some(controller) = &method.controller {
62
+
println!(" Controller: {}", controller);
63
+
}
64
+
if let Some(key) = &method.public_key_multibase {
65
+
println!(" Public Key (multibase): {}", key);
66
+
}
67
+
if !method.extra_data.is_empty() {
68
+
println!(" Extra fields: {:?}", method.extra_data);
69
+
}
70
+
println!();
71
+
}
72
+
}
73
+
74
+
if let Some(services) = &doc.service {
75
+
println!("Services:");
76
+
for service in services {
77
+
println!(" ID: {}", service.id);
78
+
println!(" Type: {}", service.r#type);
79
+
if let Some(endpoint) = &service.service_endpoint {
80
+
println!(" Endpoint: {:?}", endpoint);
81
+
}
82
+
if !service.extra_data.is_empty() {
83
+
println!(" Extra fields: {:?}", service.extra_data);
84
+
}
85
+
println!();
86
+
}
87
+
}
88
+
89
+
if !doc.extra_data.is_empty() {
90
+
for (key, value) in &doc.extra_data {
91
+
println!(
92
+
"{}: {}",
93
+
key,
94
+
serde_json::to_string_pretty(value).into_diagnostic()?
95
+
);
96
+
}
97
+
}
98
+
99
+
Ok(())
100
+
}
+95
examples/update_preferences.rs
+95
examples/update_preferences.rs
···
1
+
use clap::Parser;
2
+
use jacquard::api::app_bsky::actor::{AdultContentPref, PreferencesItem};
3
+
use jacquard::client::vec_update::VecUpdate;
4
+
use jacquard::client::{Agent, FileAuthStore};
5
+
use jacquard::oauth::atproto::AtprotoClientMetadata;
6
+
use jacquard::oauth::client::OAuthClient;
7
+
use jacquard::oauth::loopback::LoopbackConfig;
8
+
use jacquard::{CowStr, IntoStatic};
9
+
10
+
#[derive(Parser, Debug)]
11
+
#[command(author, version, about = "Update Bluesky preferences")]
12
+
struct Args {
13
+
/// Handle (e.g., alice.bsky.social), DID, or PDS URL
14
+
input: CowStr<'static>,
15
+
16
+
/// Enable adult content
17
+
#[arg(long)]
18
+
enable_adult_content: bool,
19
+
20
+
/// Path to auth store file (will be created if missing)
21
+
#[arg(long, default_value = "/tmp/jacquard-oauth-session.json")]
22
+
store: String,
23
+
}
24
+
25
+
/// Helper struct for the VecUpdate pattern on preferences
26
+
pub struct PreferencesUpdate;
27
+
28
+
impl VecUpdate for PreferencesUpdate {
29
+
type GetRequest<'de> = jacquard::api::app_bsky::actor::get_preferences::GetPreferences;
30
+
type PutRequest<'de> = jacquard::api::app_bsky::actor::put_preferences::PutPreferences<'de>;
31
+
type Item = PreferencesItem<'static>;
32
+
33
+
fn build_get<'s>() -> Self::GetRequest<'s> {
34
+
jacquard::api::app_bsky::actor::get_preferences::GetPreferences::new().build()
35
+
}
36
+
37
+
fn build_put<'s>(items: Vec<Self::Item>) -> Self::PutRequest<'s> {
38
+
jacquard::api::app_bsky::actor::put_preferences::PutPreferences {
39
+
preferences: items,
40
+
extra_data: Default::default(),
41
+
}
42
+
}
43
+
44
+
fn extract_vec(
45
+
output: jacquard::api::app_bsky::actor::get_preferences::GetPreferencesOutput<'_>,
46
+
) -> Vec<Self::Item> {
47
+
output
48
+
.preferences
49
+
.into_iter()
50
+
.map(|p| p.into_static())
51
+
.collect()
52
+
}
53
+
54
+
fn matches(a: &Self::Item, b: &Self::Item) -> bool {
55
+
// Match by enum variant discriminant
56
+
std::mem::discriminant(a) == std::mem::discriminant(b)
57
+
}
58
+
}
59
+
60
+
#[tokio::main]
61
+
async fn main() -> miette::Result<()> {
62
+
let args = Args::parse();
63
+
64
+
let oauth = OAuthClient::with_default_config(FileAuthStore::new(&args.store));
65
+
let session = oauth
66
+
.login_with_local_server(args.input, Default::default(), LoopbackConfig::default())
67
+
.await?;
68
+
69
+
let agent: Agent<_> = Agent::from(session);
70
+
71
+
// Create the adult content preference
72
+
let adult_pref = AdultContentPref {
73
+
enabled: args.enable_adult_content,
74
+
extra_data: Default::default(),
75
+
};
76
+
77
+
// Update preferences using update_vec_item
78
+
// This will replace existing AdultContentPref or add it if not present
79
+
agent
80
+
.update_vec_item::<PreferencesUpdate>(PreferencesItem::AdultContentPref(Box::new(
81
+
adult_pref,
82
+
)))
83
+
.await?;
84
+
85
+
println!(
86
+
"✓ Updated adult content preference: {}",
87
+
if args.enable_adult_content {
88
+
"enabled"
89
+
} else {
90
+
"disabled"
91
+
}
92
+
);
93
+
94
+
Ok(())
95
+
}
+67
examples/update_profile.rs
+67
examples/update_profile.rs
···
1
+
use clap::Parser;
2
+
use jacquard::CowStr;
3
+
use jacquard::api::app_bsky::actor::profile::Profile;
4
+
use jacquard::client::{Agent, FileAuthStore};
5
+
use jacquard::oauth::atproto::AtprotoClientMetadata;
6
+
use jacquard::oauth::client::OAuthClient;
7
+
use jacquard::oauth::loopback::LoopbackConfig;
8
+
use jacquard::types::string::AtUri;
9
+
use jacquard::xrpc::XrpcClient;
10
+
use miette::IntoDiagnostic;
11
+
12
+
#[derive(Parser, Debug)]
13
+
#[command(author, version, about = "Update profile display name and description")]
14
+
struct Args {
15
+
/// Handle (e.g., alice.bsky.social), DID, or PDS URL
16
+
input: CowStr<'static>,
17
+
18
+
/// New display name
19
+
#[arg(long)]
20
+
display_name: Option<String>,
21
+
22
+
/// New bio/description
23
+
#[arg(long)]
24
+
description: Option<String>,
25
+
26
+
/// Path to auth store file (will be created if missing)
27
+
#[arg(long, default_value = "/tmp/jacquard-oauth-session.json")]
28
+
store: String,
29
+
}
30
+
31
+
#[tokio::main]
32
+
async fn main() -> miette::Result<()> {
33
+
let args = Args::parse();
34
+
35
+
let oauth = OAuthClient::with_default_config(FileAuthStore::new(&args.store));
36
+
let session = oauth
37
+
.login_with_local_server(args.input, Default::default(), LoopbackConfig::default())
38
+
.await?;
39
+
40
+
let agent: Agent<_> = Agent::from(session);
41
+
42
+
// Get session info to build the at:// URI for the profile record
43
+
let (did, _) = agent
44
+
.info()
45
+
.await
46
+
.ok_or_else(|| miette::miette!("No session info available"))?;
47
+
48
+
// Profile records use "self" as the rkey
49
+
let uri_string = format!("at://{}/app.bsky.actor.profile/self", did);
50
+
let uri = AtUri::new(&uri_string)?;
51
+
52
+
// Update profile in-place using the fetch-modify-put pattern
53
+
agent
54
+
.update_record::<Profile>(uri, |profile| {
55
+
if let Some(name) = &args.display_name {
56
+
profile.display_name = Some(CowStr::from(name.clone()));
57
+
}
58
+
if let Some(desc) = &args.description {
59
+
profile.description = Some(CowStr::from(desc.clone()));
60
+
}
61
+
})
62
+
.await?;
63
+
64
+
println!("✓ Profile updated successfully");
65
+
66
+
Ok(())
67
+
}
+44
justfile
+44
justfile
···
12
12
# Run 'bacon' to run the project (auto-recompiles)
13
13
watch *ARGS:
14
14
bacon --job run -- -- {{ ARGS }}
15
+
16
+
# Run the OAuth timeline example
17
+
example-oauth *ARGS:
18
+
cargo run -p jacquard --example oauth_timeline --features fancy -- {{ARGS}}
19
+
20
+
# Create a simple post
21
+
example-create-post *ARGS:
22
+
cargo run -p jacquard --example create_post --features fancy -- {{ARGS}}
23
+
24
+
# Create a post with an image
25
+
example-post-image *ARGS:
26
+
cargo run -p jacquard --example post_with_image --features fancy -- {{ARGS}}
27
+
28
+
# Update profile display name and description
29
+
example-update-profile *ARGS:
30
+
cargo run -p jacquard --example update_profile --features fancy -- {{ARGS}}
31
+
32
+
# Fetch public AT Protocol feed (no auth)
33
+
example-public-feed:
34
+
cargo run -p jacquard --example public_atproto_feed
35
+
36
+
# Create a WhiteWind blog post
37
+
example-whitewind-create *ARGS:
38
+
cargo run -p jacquard --example create_whitewind_post --features fancy -- {{ARGS}}
39
+
40
+
# Read a WhiteWind blog post
41
+
example-whitewind-read *ARGS:
42
+
cargo run -p jacquard --example read_whitewind_posts --features fancy,api_full -- {{ARGS}}
43
+
44
+
# Read info about a Tangled git repository
45
+
example-tangled-repo *ARGS:
46
+
cargo run -p jacquard --example read_tangled_repo --features fancy,api_full -- {{ARGS}}
47
+
48
+
# Resolve a handle to its DID document
49
+
example-resolve-did *ARGS:
50
+
cargo run -p jacquard --example resolve_did -- {{ARGS}}
51
+
52
+
# Update Bluesky preferences
53
+
example-update-preferences *ARGS:
54
+
cargo run -p jacquard --example update_preferences --features fancy -- {{ARGS}}
55
+
56
+
# Run the Axum server example
57
+
example-axum:
58
+
cargo run -p jacquard-axum --example axum_server --features jacquard/fancy