1#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct WelcomeMessage {
5 #[prost(oneof = "welcome_message::Version", tags = "1, 2")]
6 pub version: ::core::option::Option<welcome_message::Version>,
7}
8pub mod welcome_message {
10 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
12 pub struct V1 {
13 #[prost(uint64, tag = "1")]
14 pub id: u64,
15 #[prost(uint64, tag = "2")]
16 pub created_ns: u64,
17 #[prost(bytes = "vec", tag = "3")]
18 pub installation_key: ::prost::alloc::vec::Vec<u8>,
19 #[prost(bytes = "vec", tag = "4")]
20 pub data: ::prost::alloc::vec::Vec<u8>,
21 #[prost(bytes = "vec", tag = "5")]
22 pub hpke_public_key: ::prost::alloc::vec::Vec<u8>,
23 #[prost(
24 enumeration = "super::super::super::message_contents::WelcomeWrapperAlgorithm",
25 tag = "6"
26 )]
27 pub wrapper_algorithm: i32,
28 #[prost(bytes = "vec", tag = "7")]
29 pub welcome_metadata: ::prost::alloc::vec::Vec<u8>,
30 }
31 impl ::prost::Name for V1 {
32 const NAME: &'static str = "V1";
33 const PACKAGE: &'static str = "xmtp.mls.api.v1";
34 fn full_name() -> ::prost::alloc::string::String {
35 "xmtp.mls.api.v1.WelcomeMessage.V1".into()
36 }
37 fn type_url() -> ::prost::alloc::string::String {
38 "/xmtp.mls.api.v1.WelcomeMessage.V1".into()
39 }
40 }
41 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
42 pub struct WelcomePointer {
43 #[prost(uint64, tag = "1")]
44 pub id: u64,
45 #[prost(uint64, tag = "2")]
46 pub created_ns: u64,
47 #[prost(bytes = "vec", tag = "3")]
49 pub installation_key: ::prost::alloc::vec::Vec<u8>,
50 #[prost(bytes = "vec", tag = "4")]
53 pub welcome_pointer: ::prost::alloc::vec::Vec<u8>,
54 #[prost(bytes = "vec", tag = "5")]
56 pub hpke_public_key: ::prost::alloc::vec::Vec<u8>,
57 #[prost(
59 enumeration = "super::super::super::message_contents::WelcomePointerWrapperAlgorithm",
60 tag = "6"
61 )]
62 pub wrapper_algorithm: i32,
63 }
64 impl ::prost::Name for WelcomePointer {
65 const NAME: &'static str = "WelcomePointer";
66 const PACKAGE: &'static str = "xmtp.mls.api.v1";
67 fn full_name() -> ::prost::alloc::string::String {
68 "xmtp.mls.api.v1.WelcomeMessage.WelcomePointer".into()
69 }
70 fn type_url() -> ::prost::alloc::string::String {
71 "/xmtp.mls.api.v1.WelcomeMessage.WelcomePointer".into()
72 }
73 }
74 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
75 pub enum Version {
76 #[prost(message, tag = "1")]
77 V1(V1),
78 #[prost(message, tag = "2")]
79 WelcomePointer(WelcomePointer),
80 }
81}
82impl ::prost::Name for WelcomeMessage {
83 const NAME: &'static str = "WelcomeMessage";
84 const PACKAGE: &'static str = "xmtp.mls.api.v1";
85 fn full_name() -> ::prost::alloc::string::String {
86 "xmtp.mls.api.v1.WelcomeMessage".into()
87 }
88 fn type_url() -> ::prost::alloc::string::String {
89 "/xmtp.mls.api.v1.WelcomeMessage".into()
90 }
91}
92#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
94pub struct WelcomeMessageInput {
95 #[prost(oneof = "welcome_message_input::Version", tags = "1, 2")]
96 pub version: ::core::option::Option<welcome_message_input::Version>,
97}
98pub mod welcome_message_input {
100 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
104 pub struct V1 {
105 #[prost(bytes = "vec", tag = "1")]
107 pub installation_key: ::prost::alloc::vec::Vec<u8>,
108 #[prost(bytes = "vec", tag = "2")]
110 pub data: ::prost::alloc::vec::Vec<u8>,
111 #[prost(bytes = "vec", tag = "3")]
113 pub hpke_public_key: ::prost::alloc::vec::Vec<u8>,
114 #[prost(
116 enumeration = "super::super::super::message_contents::WelcomeWrapperAlgorithm",
117 tag = "4"
118 )]
119 pub wrapper_algorithm: i32,
120 #[prost(bytes = "vec", tag = "7")]
122 pub welcome_metadata: ::prost::alloc::vec::Vec<u8>,
123 }
124 impl ::prost::Name for V1 {
125 const NAME: &'static str = "V1";
126 const PACKAGE: &'static str = "xmtp.mls.api.v1";
127 fn full_name() -> ::prost::alloc::string::String {
128 "xmtp.mls.api.v1.WelcomeMessageInput.V1".into()
129 }
130 fn type_url() -> ::prost::alloc::string::String {
131 "/xmtp.mls.api.v1.WelcomeMessageInput.V1".into()
132 }
133 }
134 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
137 pub struct WelcomePointer {
138 #[prost(bytes = "vec", tag = "1")]
140 pub installation_key: ::prost::alloc::vec::Vec<u8>,
141 #[prost(bytes = "vec", tag = "2")]
143 pub welcome_pointer: ::prost::alloc::vec::Vec<u8>,
144 #[prost(bytes = "vec", tag = "3")]
146 pub hpke_public_key: ::prost::alloc::vec::Vec<u8>,
147 #[prost(
149 enumeration = "super::super::super::message_contents::WelcomePointerWrapperAlgorithm",
150 tag = "4"
151 )]
152 pub wrapper_algorithm: i32,
153 }
154 impl ::prost::Name for WelcomePointer {
155 const NAME: &'static str = "WelcomePointer";
156 const PACKAGE: &'static str = "xmtp.mls.api.v1";
157 fn full_name() -> ::prost::alloc::string::String {
158 "xmtp.mls.api.v1.WelcomeMessageInput.WelcomePointer".into()
159 }
160 fn type_url() -> ::prost::alloc::string::String {
161 "/xmtp.mls.api.v1.WelcomeMessageInput.WelcomePointer".into()
162 }
163 }
164 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
165 pub enum Version {
166 #[prost(message, tag = "1")]
167 V1(V1),
168 #[prost(message, tag = "2")]
169 WelcomePointer(WelcomePointer),
170 }
171}
172impl ::prost::Name for WelcomeMessageInput {
173 const NAME: &'static str = "WelcomeMessageInput";
174 const PACKAGE: &'static str = "xmtp.mls.api.v1";
175 fn full_name() -> ::prost::alloc::string::String {
176 "xmtp.mls.api.v1.WelcomeMessageInput".into()
177 }
178 fn type_url() -> ::prost::alloc::string::String {
179 "/xmtp.mls.api.v1.WelcomeMessageInput".into()
180 }
181}
182#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
184pub struct WelcomeMetadata {
185 #[prost(uint64, tag = "1")]
186 pub message_cursor: u64,
187}
188impl ::prost::Name for WelcomeMetadata {
189 const NAME: &'static str = "WelcomeMetadata";
190 const PACKAGE: &'static str = "xmtp.mls.api.v1";
191 fn full_name() -> ::prost::alloc::string::String {
192 "xmtp.mls.api.v1.WelcomeMetadata".into()
193 }
194 fn type_url() -> ::prost::alloc::string::String {
195 "/xmtp.mls.api.v1.WelcomeMetadata".into()
196 }
197}
198#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
200pub struct GroupMessage {
201 #[prost(oneof = "group_message::Version", tags = "1")]
202 pub version: ::core::option::Option<group_message::Version>,
203}
204pub mod group_message {
206 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
208 pub struct V1 {
209 #[prost(uint64, tag = "1")]
210 pub id: u64,
211 #[prost(uint64, tag = "2")]
212 pub created_ns: u64,
213 #[prost(bytes = "vec", tag = "3")]
214 pub group_id: ::prost::alloc::vec::Vec<u8>,
215 #[prost(bytes = "vec", tag = "4")]
216 pub data: ::prost::alloc::vec::Vec<u8>,
217 #[prost(bytes = "vec", tag = "5")]
218 pub sender_hmac: ::prost::alloc::vec::Vec<u8>,
219 #[prost(bool, tag = "6")]
220 pub should_push: bool,
221 #[prost(bool, tag = "7")]
222 pub is_commit: bool,
223 }
224 impl ::prost::Name for V1 {
225 const NAME: &'static str = "V1";
226 const PACKAGE: &'static str = "xmtp.mls.api.v1";
227 fn full_name() -> ::prost::alloc::string::String {
228 "xmtp.mls.api.v1.GroupMessage.V1".into()
229 }
230 fn type_url() -> ::prost::alloc::string::String {
231 "/xmtp.mls.api.v1.GroupMessage.V1".into()
232 }
233 }
234 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
235 pub enum Version {
236 #[prost(message, tag = "1")]
237 V1(V1),
238 }
239}
240impl ::prost::Name for GroupMessage {
241 const NAME: &'static str = "GroupMessage";
242 const PACKAGE: &'static str = "xmtp.mls.api.v1";
243 fn full_name() -> ::prost::alloc::string::String {
244 "xmtp.mls.api.v1.GroupMessage".into()
245 }
246 fn type_url() -> ::prost::alloc::string::String {
247 "/xmtp.mls.api.v1.GroupMessage".into()
248 }
249}
250#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
252pub struct GroupMessageInput {
253 #[prost(oneof = "group_message_input::Version", tags = "1")]
254 pub version: ::core::option::Option<group_message_input::Version>,
255}
256pub mod group_message_input {
258 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
260 pub struct V1 {
261 #[prost(bytes = "vec", tag = "1")]
263 pub data: ::prost::alloc::vec::Vec<u8>,
264 #[prost(bytes = "vec", tag = "2")]
265 pub sender_hmac: ::prost::alloc::vec::Vec<u8>,
266 #[prost(bool, tag = "3")]
267 pub should_push: bool,
268 }
269 impl ::prost::Name for V1 {
270 const NAME: &'static str = "V1";
271 const PACKAGE: &'static str = "xmtp.mls.api.v1";
272 fn full_name() -> ::prost::alloc::string::String {
273 "xmtp.mls.api.v1.GroupMessageInput.V1".into()
274 }
275 fn type_url() -> ::prost::alloc::string::String {
276 "/xmtp.mls.api.v1.GroupMessageInput.V1".into()
277 }
278 }
279 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
280 pub enum Version {
281 #[prost(message, tag = "1")]
282 V1(V1),
283 }
284}
285impl ::prost::Name for GroupMessageInput {
286 const NAME: &'static str = "GroupMessageInput";
287 const PACKAGE: &'static str = "xmtp.mls.api.v1";
288 fn full_name() -> ::prost::alloc::string::String {
289 "xmtp.mls.api.v1.GroupMessageInput".into()
290 }
291 fn type_url() -> ::prost::alloc::string::String {
292 "/xmtp.mls.api.v1.GroupMessageInput".into()
293 }
294}
295#[derive(Clone, PartialEq, ::prost::Message)]
297pub struct SendGroupMessagesRequest {
298 #[prost(message, repeated, tag = "1")]
299 pub messages: ::prost::alloc::vec::Vec<GroupMessageInput>,
300}
301impl ::prost::Name for SendGroupMessagesRequest {
302 const NAME: &'static str = "SendGroupMessagesRequest";
303 const PACKAGE: &'static str = "xmtp.mls.api.v1";
304 fn full_name() -> ::prost::alloc::string::String {
305 "xmtp.mls.api.v1.SendGroupMessagesRequest".into()
306 }
307 fn type_url() -> ::prost::alloc::string::String {
308 "/xmtp.mls.api.v1.SendGroupMessagesRequest".into()
309 }
310}
311#[derive(Clone, PartialEq, ::prost::Message)]
313pub struct SendWelcomeMessagesRequest {
314 #[prost(message, repeated, tag = "1")]
315 pub messages: ::prost::alloc::vec::Vec<WelcomeMessageInput>,
316}
317impl ::prost::Name for SendWelcomeMessagesRequest {
318 const NAME: &'static str = "SendWelcomeMessagesRequest";
319 const PACKAGE: &'static str = "xmtp.mls.api.v1";
320 fn full_name() -> ::prost::alloc::string::String {
321 "xmtp.mls.api.v1.SendWelcomeMessagesRequest".into()
322 }
323 fn type_url() -> ::prost::alloc::string::String {
324 "/xmtp.mls.api.v1.SendWelcomeMessagesRequest".into()
325 }
326}
327#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
332pub struct KeyPackageUpload {
333 #[prost(bytes = "vec", tag = "1")]
336 pub key_package_tls_serialized: ::prost::alloc::vec::Vec<u8>,
337}
338impl ::prost::Name for KeyPackageUpload {
339 const NAME: &'static str = "KeyPackageUpload";
340 const PACKAGE: &'static str = "xmtp.mls.api.v1";
341 fn full_name() -> ::prost::alloc::string::String {
342 "xmtp.mls.api.v1.KeyPackageUpload".into()
343 }
344 fn type_url() -> ::prost::alloc::string::String {
345 "/xmtp.mls.api.v1.KeyPackageUpload".into()
346 }
347}
348#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
350pub struct RegisterInstallationRequest {
351 #[prost(message, optional, tag = "1")]
353 pub key_package: ::core::option::Option<KeyPackageUpload>,
354 #[prost(bool, tag = "2")]
355 pub is_inbox_id_credential: bool,
356}
357impl ::prost::Name for RegisterInstallationRequest {
358 const NAME: &'static str = "RegisterInstallationRequest";
359 const PACKAGE: &'static str = "xmtp.mls.api.v1";
360 fn full_name() -> ::prost::alloc::string::String {
361 "xmtp.mls.api.v1.RegisterInstallationRequest".into()
362 }
363 fn type_url() -> ::prost::alloc::string::String {
364 "/xmtp.mls.api.v1.RegisterInstallationRequest".into()
365 }
366}
367#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
369pub struct RegisterInstallationResponse {
370 #[prost(bytes = "vec", tag = "1")]
371 pub installation_key: ::prost::alloc::vec::Vec<u8>,
372}
373impl ::prost::Name for RegisterInstallationResponse {
374 const NAME: &'static str = "RegisterInstallationResponse";
375 const PACKAGE: &'static str = "xmtp.mls.api.v1";
376 fn full_name() -> ::prost::alloc::string::String {
377 "xmtp.mls.api.v1.RegisterInstallationResponse".into()
378 }
379 fn type_url() -> ::prost::alloc::string::String {
380 "/xmtp.mls.api.v1.RegisterInstallationResponse".into()
381 }
382}
383#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
385pub struct UploadKeyPackageRequest {
386 #[prost(message, optional, tag = "1")]
388 pub key_package: ::core::option::Option<KeyPackageUpload>,
389 #[prost(bool, tag = "2")]
390 pub is_inbox_id_credential: bool,
391}
392impl ::prost::Name for UploadKeyPackageRequest {
393 const NAME: &'static str = "UploadKeyPackageRequest";
394 const PACKAGE: &'static str = "xmtp.mls.api.v1";
395 fn full_name() -> ::prost::alloc::string::String {
396 "xmtp.mls.api.v1.UploadKeyPackageRequest".into()
397 }
398 fn type_url() -> ::prost::alloc::string::String {
399 "/xmtp.mls.api.v1.UploadKeyPackageRequest".into()
400 }
401}
402#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
404pub struct FetchKeyPackagesRequest {
405 #[prost(bytes = "vec", repeated, tag = "1")]
409 pub installation_keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
410}
411impl ::prost::Name for FetchKeyPackagesRequest {
412 const NAME: &'static str = "FetchKeyPackagesRequest";
413 const PACKAGE: &'static str = "xmtp.mls.api.v1";
414 fn full_name() -> ::prost::alloc::string::String {
415 "xmtp.mls.api.v1.FetchKeyPackagesRequest".into()
416 }
417 fn type_url() -> ::prost::alloc::string::String {
418 "/xmtp.mls.api.v1.FetchKeyPackagesRequest".into()
419 }
420}
421#[derive(Clone, PartialEq, ::prost::Message)]
423pub struct FetchKeyPackagesResponse {
424 #[prost(message, repeated, tag = "1")]
428 pub key_packages: ::prost::alloc::vec::Vec<fetch_key_packages_response::KeyPackage>,
429}
430pub mod fetch_key_packages_response {
432 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
434 pub struct KeyPackage {
435 #[prost(bytes = "vec", tag = "1")]
436 pub key_package_tls_serialized: ::prost::alloc::vec::Vec<u8>,
437 }
438 impl ::prost::Name for KeyPackage {
439 const NAME: &'static str = "KeyPackage";
440 const PACKAGE: &'static str = "xmtp.mls.api.v1";
441 fn full_name() -> ::prost::alloc::string::String {
442 "xmtp.mls.api.v1.FetchKeyPackagesResponse.KeyPackage".into()
443 }
444 fn type_url() -> ::prost::alloc::string::String {
445 "/xmtp.mls.api.v1.FetchKeyPackagesResponse.KeyPackage".into()
446 }
447 }
448}
449impl ::prost::Name for FetchKeyPackagesResponse {
450 const NAME: &'static str = "FetchKeyPackagesResponse";
451 const PACKAGE: &'static str = "xmtp.mls.api.v1";
452 fn full_name() -> ::prost::alloc::string::String {
453 "xmtp.mls.api.v1.FetchKeyPackagesResponse".into()
454 }
455 fn type_url() -> ::prost::alloc::string::String {
456 "/xmtp.mls.api.v1.FetchKeyPackagesResponse".into()
457 }
458}
459#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
461pub struct RevokeInstallationRequest {
462 #[prost(bytes = "vec", tag = "1")]
463 pub installation_key: ::prost::alloc::vec::Vec<u8>,
464 #[prost(message, optional, tag = "2")]
467 pub wallet_signature: ::core::option::Option<
468 super::super::super::message_contents::Signature,
469 >,
470}
471impl ::prost::Name for RevokeInstallationRequest {
472 const NAME: &'static str = "RevokeInstallationRequest";
473 const PACKAGE: &'static str = "xmtp.mls.api.v1";
474 fn full_name() -> ::prost::alloc::string::String {
475 "xmtp.mls.api.v1.RevokeInstallationRequest".into()
476 }
477 fn type_url() -> ::prost::alloc::string::String {
478 "/xmtp.mls.api.v1.RevokeInstallationRequest".into()
479 }
480}
481#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
483pub struct GetIdentityUpdatesRequest {
484 #[prost(string, repeated, tag = "1")]
485 pub account_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
486 #[prost(uint64, tag = "2")]
487 pub start_time_ns: u64,
488}
489impl ::prost::Name for GetIdentityUpdatesRequest {
490 const NAME: &'static str = "GetIdentityUpdatesRequest";
491 const PACKAGE: &'static str = "xmtp.mls.api.v1";
492 fn full_name() -> ::prost::alloc::string::String {
493 "xmtp.mls.api.v1.GetIdentityUpdatesRequest".into()
494 }
495 fn type_url() -> ::prost::alloc::string::String {
496 "/xmtp.mls.api.v1.GetIdentityUpdatesRequest".into()
497 }
498}
499#[derive(Clone, PartialEq, ::prost::Message)]
501pub struct GetIdentityUpdatesResponse {
502 #[prost(message, repeated, tag = "1")]
505 pub updates: ::prost::alloc::vec::Vec<get_identity_updates_response::WalletUpdates>,
506}
507pub mod get_identity_updates_response {
509 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
511 pub struct NewInstallationUpdate {
512 #[prost(bytes = "vec", tag = "1")]
513 pub installation_key: ::prost::alloc::vec::Vec<u8>,
514 #[prost(bytes = "vec", tag = "2")]
515 pub credential_identity: ::prost::alloc::vec::Vec<u8>,
516 }
517 impl ::prost::Name for NewInstallationUpdate {
518 const NAME: &'static str = "NewInstallationUpdate";
519 const PACKAGE: &'static str = "xmtp.mls.api.v1";
520 fn full_name() -> ::prost::alloc::string::String {
521 "xmtp.mls.api.v1.GetIdentityUpdatesResponse.NewInstallationUpdate".into()
522 }
523 fn type_url() -> ::prost::alloc::string::String {
524 "/xmtp.mls.api.v1.GetIdentityUpdatesResponse.NewInstallationUpdate".into()
525 }
526 }
527 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
529 pub struct RevokedInstallationUpdate {
530 #[prost(bytes = "vec", tag = "1")]
531 pub installation_key: ::prost::alloc::vec::Vec<u8>,
532 }
533 impl ::prost::Name for RevokedInstallationUpdate {
534 const NAME: &'static str = "RevokedInstallationUpdate";
535 const PACKAGE: &'static str = "xmtp.mls.api.v1";
536 fn full_name() -> ::prost::alloc::string::String {
537 "xmtp.mls.api.v1.GetIdentityUpdatesResponse.RevokedInstallationUpdate".into()
538 }
539 fn type_url() -> ::prost::alloc::string::String {
540 "/xmtp.mls.api.v1.GetIdentityUpdatesResponse.RevokedInstallationUpdate"
541 .into()
542 }
543 }
544 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
546 pub struct Update {
547 #[prost(uint64, tag = "1")]
548 pub timestamp_ns: u64,
549 #[prost(oneof = "update::Kind", tags = "2, 3")]
550 pub kind: ::core::option::Option<update::Kind>,
551 }
552 pub mod update {
554 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
555 pub enum Kind {
556 #[prost(message, tag = "2")]
557 NewInstallation(super::NewInstallationUpdate),
558 #[prost(message, tag = "3")]
559 RevokedInstallation(super::RevokedInstallationUpdate),
560 }
561 }
562 impl ::prost::Name for Update {
563 const NAME: &'static str = "Update";
564 const PACKAGE: &'static str = "xmtp.mls.api.v1";
565 fn full_name() -> ::prost::alloc::string::String {
566 "xmtp.mls.api.v1.GetIdentityUpdatesResponse.Update".into()
567 }
568 fn type_url() -> ::prost::alloc::string::String {
569 "/xmtp.mls.api.v1.GetIdentityUpdatesResponse.Update".into()
570 }
571 }
572 #[derive(Clone, PartialEq, ::prost::Message)]
574 pub struct WalletUpdates {
575 #[prost(message, repeated, tag = "1")]
576 pub updates: ::prost::alloc::vec::Vec<Update>,
577 }
578 impl ::prost::Name for WalletUpdates {
579 const NAME: &'static str = "WalletUpdates";
580 const PACKAGE: &'static str = "xmtp.mls.api.v1";
581 fn full_name() -> ::prost::alloc::string::String {
582 "xmtp.mls.api.v1.GetIdentityUpdatesResponse.WalletUpdates".into()
583 }
584 fn type_url() -> ::prost::alloc::string::String {
585 "/xmtp.mls.api.v1.GetIdentityUpdatesResponse.WalletUpdates".into()
586 }
587 }
588}
589impl ::prost::Name for GetIdentityUpdatesResponse {
590 const NAME: &'static str = "GetIdentityUpdatesResponse";
591 const PACKAGE: &'static str = "xmtp.mls.api.v1";
592 fn full_name() -> ::prost::alloc::string::String {
593 "xmtp.mls.api.v1.GetIdentityUpdatesResponse".into()
594 }
595 fn type_url() -> ::prost::alloc::string::String {
596 "/xmtp.mls.api.v1.GetIdentityUpdatesResponse".into()
597 }
598}
599#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
601pub struct PagingInfo {
602 #[prost(enumeration = "SortDirection", tag = "1")]
603 pub direction: i32,
604 #[prost(uint32, tag = "2")]
605 pub limit: u32,
606 #[prost(uint64, tag = "3")]
607 pub id_cursor: u64,
608}
609impl ::prost::Name for PagingInfo {
610 const NAME: &'static str = "PagingInfo";
611 const PACKAGE: &'static str = "xmtp.mls.api.v1";
612 fn full_name() -> ::prost::alloc::string::String {
613 "xmtp.mls.api.v1.PagingInfo".into()
614 }
615 fn type_url() -> ::prost::alloc::string::String {
616 "/xmtp.mls.api.v1.PagingInfo".into()
617 }
618}
619#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
621pub struct QueryGroupMessagesRequest {
622 #[prost(bytes = "vec", tag = "1")]
623 pub group_id: ::prost::alloc::vec::Vec<u8>,
624 #[prost(message, optional, tag = "2")]
625 pub paging_info: ::core::option::Option<PagingInfo>,
626}
627impl ::prost::Name for QueryGroupMessagesRequest {
628 const NAME: &'static str = "QueryGroupMessagesRequest";
629 const PACKAGE: &'static str = "xmtp.mls.api.v1";
630 fn full_name() -> ::prost::alloc::string::String {
631 "xmtp.mls.api.v1.QueryGroupMessagesRequest".into()
632 }
633 fn type_url() -> ::prost::alloc::string::String {
634 "/xmtp.mls.api.v1.QueryGroupMessagesRequest".into()
635 }
636}
637#[derive(Clone, PartialEq, ::prost::Message)]
639pub struct QueryGroupMessagesResponse {
640 #[prost(message, repeated, tag = "1")]
641 pub messages: ::prost::alloc::vec::Vec<GroupMessage>,
642 #[prost(message, optional, tag = "2")]
643 pub paging_info: ::core::option::Option<PagingInfo>,
644}
645impl ::prost::Name for QueryGroupMessagesResponse {
646 const NAME: &'static str = "QueryGroupMessagesResponse";
647 const PACKAGE: &'static str = "xmtp.mls.api.v1";
648 fn full_name() -> ::prost::alloc::string::String {
649 "xmtp.mls.api.v1.QueryGroupMessagesResponse".into()
650 }
651 fn type_url() -> ::prost::alloc::string::String {
652 "/xmtp.mls.api.v1.QueryGroupMessagesResponse".into()
653 }
654}
655#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
657pub struct QueryWelcomeMessagesRequest {
658 #[prost(bytes = "vec", tag = "1")]
659 pub installation_key: ::prost::alloc::vec::Vec<u8>,
660 #[prost(message, optional, tag = "2")]
661 pub paging_info: ::core::option::Option<PagingInfo>,
662}
663impl ::prost::Name for QueryWelcomeMessagesRequest {
664 const NAME: &'static str = "QueryWelcomeMessagesRequest";
665 const PACKAGE: &'static str = "xmtp.mls.api.v1";
666 fn full_name() -> ::prost::alloc::string::String {
667 "xmtp.mls.api.v1.QueryWelcomeMessagesRequest".into()
668 }
669 fn type_url() -> ::prost::alloc::string::String {
670 "/xmtp.mls.api.v1.QueryWelcomeMessagesRequest".into()
671 }
672}
673#[derive(Clone, PartialEq, ::prost::Message)]
675pub struct QueryWelcomeMessagesResponse {
676 #[prost(message, repeated, tag = "1")]
677 pub messages: ::prost::alloc::vec::Vec<WelcomeMessage>,
678 #[prost(message, optional, tag = "2")]
679 pub paging_info: ::core::option::Option<PagingInfo>,
680}
681impl ::prost::Name for QueryWelcomeMessagesResponse {
682 const NAME: &'static str = "QueryWelcomeMessagesResponse";
683 const PACKAGE: &'static str = "xmtp.mls.api.v1";
684 fn full_name() -> ::prost::alloc::string::String {
685 "xmtp.mls.api.v1.QueryWelcomeMessagesResponse".into()
686 }
687 fn type_url() -> ::prost::alloc::string::String {
688 "/xmtp.mls.api.v1.QueryWelcomeMessagesResponse".into()
689 }
690}
691#[derive(Clone, PartialEq, ::prost::Message)]
693pub struct SubscribeGroupMessagesRequest {
694 #[prost(message, repeated, tag = "1")]
695 pub filters: ::prost::alloc::vec::Vec<subscribe_group_messages_request::Filter>,
696}
697pub mod subscribe_group_messages_request {
699 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
701 pub struct Filter {
702 #[prost(bytes = "vec", tag = "1")]
703 pub group_id: ::prost::alloc::vec::Vec<u8>,
704 #[prost(uint64, tag = "2")]
705 pub id_cursor: u64,
706 }
707 impl ::prost::Name for Filter {
708 const NAME: &'static str = "Filter";
709 const PACKAGE: &'static str = "xmtp.mls.api.v1";
710 fn full_name() -> ::prost::alloc::string::String {
711 "xmtp.mls.api.v1.SubscribeGroupMessagesRequest.Filter".into()
712 }
713 fn type_url() -> ::prost::alloc::string::String {
714 "/xmtp.mls.api.v1.SubscribeGroupMessagesRequest.Filter".into()
715 }
716 }
717}
718impl ::prost::Name for SubscribeGroupMessagesRequest {
719 const NAME: &'static str = "SubscribeGroupMessagesRequest";
720 const PACKAGE: &'static str = "xmtp.mls.api.v1";
721 fn full_name() -> ::prost::alloc::string::String {
722 "xmtp.mls.api.v1.SubscribeGroupMessagesRequest".into()
723 }
724 fn type_url() -> ::prost::alloc::string::String {
725 "/xmtp.mls.api.v1.SubscribeGroupMessagesRequest".into()
726 }
727}
728#[derive(Clone, PartialEq, ::prost::Message)]
730pub struct SubscribeWelcomeMessagesRequest {
731 #[prost(message, repeated, tag = "1")]
732 pub filters: ::prost::alloc::vec::Vec<subscribe_welcome_messages_request::Filter>,
733}
734pub mod subscribe_welcome_messages_request {
736 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
738 pub struct Filter {
739 #[prost(bytes = "vec", tag = "1")]
740 pub installation_key: ::prost::alloc::vec::Vec<u8>,
741 #[prost(uint64, tag = "2")]
742 pub id_cursor: u64,
743 }
744 impl ::prost::Name for Filter {
745 const NAME: &'static str = "Filter";
746 const PACKAGE: &'static str = "xmtp.mls.api.v1";
747 fn full_name() -> ::prost::alloc::string::String {
748 "xmtp.mls.api.v1.SubscribeWelcomeMessagesRequest.Filter".into()
749 }
750 fn type_url() -> ::prost::alloc::string::String {
751 "/xmtp.mls.api.v1.SubscribeWelcomeMessagesRequest.Filter".into()
752 }
753 }
754}
755impl ::prost::Name for SubscribeWelcomeMessagesRequest {
756 const NAME: &'static str = "SubscribeWelcomeMessagesRequest";
757 const PACKAGE: &'static str = "xmtp.mls.api.v1";
758 fn full_name() -> ::prost::alloc::string::String {
759 "xmtp.mls.api.v1.SubscribeWelcomeMessagesRequest".into()
760 }
761 fn type_url() -> ::prost::alloc::string::String {
762 "/xmtp.mls.api.v1.SubscribeWelcomeMessagesRequest".into()
763 }
764}
765#[derive(Clone, PartialEq, ::prost::Message)]
767pub struct SubscribeRequest {
768 #[prost(oneof = "subscribe_request::Version", tags = "1")]
769 pub version: ::core::option::Option<subscribe_request::Version>,
770}
771pub mod subscribe_request {
773 #[derive(Clone, PartialEq, ::prost::Message)]
774 pub struct V1 {
775 #[prost(oneof = "v1::Request", tags = "1, 2, 3")]
777 pub request: ::core::option::Option<v1::Request>,
778 }
779 pub mod v1 {
781 #[derive(Clone, PartialEq, ::prost::Message)]
791 pub struct Mutate {
792 #[prost(message, repeated, tag = "1")]
794 pub adds: ::prost::alloc::vec::Vec<mutate::Subscription>,
795 #[prost(bytes = "vec", repeated, tag = "2")]
797 pub removes: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
798 #[prost(bool, tag = "3")]
805 pub history_only: bool,
806 #[prost(uint64, tag = "4")]
810 pub mutate_id: u64,
811 }
812 pub mod mutate {
814 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
816 pub struct Subscription {
817 #[prost(bytes = "vec", tag = "1")]
818 pub topic: ::prost::alloc::vec::Vec<u8>,
819 #[prost(uint64, tag = "2")]
825 pub id_cursor: u64,
826 }
827 impl ::prost::Name for Subscription {
828 const NAME: &'static str = "Subscription";
829 const PACKAGE: &'static str = "xmtp.mls.api.v1";
830 fn full_name() -> ::prost::alloc::string::String {
831 "xmtp.mls.api.v1.SubscribeRequest.V1.Mutate.Subscription".into()
832 }
833 fn type_url() -> ::prost::alloc::string::String {
834 "/xmtp.mls.api.v1.SubscribeRequest.V1.Mutate.Subscription".into()
835 }
836 }
837 }
838 impl ::prost::Name for Mutate {
839 const NAME: &'static str = "Mutate";
840 const PACKAGE: &'static str = "xmtp.mls.api.v1";
841 fn full_name() -> ::prost::alloc::string::String {
842 "xmtp.mls.api.v1.SubscribeRequest.V1.Mutate".into()
843 }
844 fn type_url() -> ::prost::alloc::string::String {
845 "/xmtp.mls.api.v1.SubscribeRequest.V1.Mutate".into()
846 }
847 }
848 #[derive(Clone, PartialEq, ::prost::Oneof)]
850 pub enum Request {
851 #[prost(message, tag = "1")]
852 Mutate(Mutate),
853 #[prost(message, tag = "2")]
855 Ping(super::super::Ping),
856 #[prost(message, tag = "3")]
858 Pong(super::super::Pong),
859 }
860 }
861 impl ::prost::Name for V1 {
862 const NAME: &'static str = "V1";
863 const PACKAGE: &'static str = "xmtp.mls.api.v1";
864 fn full_name() -> ::prost::alloc::string::String {
865 "xmtp.mls.api.v1.SubscribeRequest.V1".into()
866 }
867 fn type_url() -> ::prost::alloc::string::String {
868 "/xmtp.mls.api.v1.SubscribeRequest.V1".into()
869 }
870 }
871 #[derive(Clone, PartialEq, ::prost::Oneof)]
872 pub enum Version {
873 #[prost(message, tag = "1")]
874 V1(V1),
875 }
876}
877impl ::prost::Name for SubscribeRequest {
878 const NAME: &'static str = "SubscribeRequest";
879 const PACKAGE: &'static str = "xmtp.mls.api.v1";
880 fn full_name() -> ::prost::alloc::string::String {
881 "xmtp.mls.api.v1.SubscribeRequest".into()
882 }
883 fn type_url() -> ::prost::alloc::string::String {
884 "/xmtp.mls.api.v1.SubscribeRequest".into()
885 }
886}
887#[derive(Clone, PartialEq, ::prost::Message)]
889pub struct SubscribeResponse {
890 #[prost(oneof = "subscribe_response::Version", tags = "1")]
891 pub version: ::core::option::Option<subscribe_response::Version>,
892}
893pub mod subscribe_response {
895 #[derive(Clone, PartialEq, ::prost::Message)]
896 pub struct V1 {
897 #[prost(oneof = "v1::Response", tags = "1, 2, 3, 4, 5, 6")]
898 pub response: ::core::option::Option<v1::Response>,
899 }
900 pub mod v1 {
902 #[derive(Clone, PartialEq, ::prost::Message)]
905 pub struct Messages {
906 #[prost(message, repeated, tag = "1")]
907 pub group_messages: ::prost::alloc::vec::Vec<super::super::GroupMessage>,
908 #[prost(message, repeated, tag = "2")]
909 pub welcome_messages: ::prost::alloc::vec::Vec<super::super::WelcomeMessage>,
910 }
911 impl ::prost::Name for Messages {
912 const NAME: &'static str = "Messages";
913 const PACKAGE: &'static str = "xmtp.mls.api.v1";
914 fn full_name() -> ::prost::alloc::string::String {
915 "xmtp.mls.api.v1.SubscribeResponse.V1.Messages".into()
916 }
917 fn type_url() -> ::prost::alloc::string::String {
918 "/xmtp.mls.api.v1.SubscribeResponse.V1.Messages".into()
919 }
920 }
921 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
923 pub struct Started {
924 #[prost(uint32, tag = "1")]
927 pub keepalive_interval_ms: u32,
928 #[prost(enumeration = "Capability", repeated, tag = "2")]
933 pub capabilities: ::prost::alloc::vec::Vec<i32>,
934 }
935 impl ::prost::Name for Started {
936 const NAME: &'static str = "Started";
937 const PACKAGE: &'static str = "xmtp.mls.api.v1";
938 fn full_name() -> ::prost::alloc::string::String {
939 "xmtp.mls.api.v1.SubscribeResponse.V1.Started".into()
940 }
941 fn type_url() -> ::prost::alloc::string::String {
942 "/xmtp.mls.api.v1.SubscribeResponse.V1.Started".into()
943 }
944 }
945 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
948 pub struct CatchupComplete {
949 #[prost(uint64, tag = "1")]
951 pub mutate_id: u64,
952 }
953 impl ::prost::Name for CatchupComplete {
954 const NAME: &'static str = "CatchupComplete";
955 const PACKAGE: &'static str = "xmtp.mls.api.v1";
956 fn full_name() -> ::prost::alloc::string::String {
957 "xmtp.mls.api.v1.SubscribeResponse.V1.CatchupComplete".into()
958 }
959 fn type_url() -> ::prost::alloc::string::String {
960 "/xmtp.mls.api.v1.SubscribeResponse.V1.CatchupComplete".into()
961 }
962 }
963 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
970 pub struct TopicsLive {
971 #[prost(bytes = "vec", repeated, tag = "1")]
973 pub topics: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
974 }
975 impl ::prost::Name for TopicsLive {
976 const NAME: &'static str = "TopicsLive";
977 const PACKAGE: &'static str = "xmtp.mls.api.v1";
978 fn full_name() -> ::prost::alloc::string::String {
979 "xmtp.mls.api.v1.SubscribeResponse.V1.TopicsLive".into()
980 }
981 fn type_url() -> ::prost::alloc::string::String {
982 "/xmtp.mls.api.v1.SubscribeResponse.V1.TopicsLive".into()
983 }
984 }
985 #[derive(
989 Clone,
990 Copy,
991 Debug,
992 PartialEq,
993 Eq,
994 Hash,
995 PartialOrd,
996 Ord,
997 ::prost::Enumeration
998 )]
999 #[repr(i32)]
1000 pub enum Capability {
1001 Unspecified = 0,
1002 }
1003 impl Capability {
1004 pub fn as_str_name(&self) -> &'static str {
1009 match self {
1010 Self::Unspecified => "CAPABILITY_UNSPECIFIED",
1011 }
1012 }
1013 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1015 match value {
1016 "CAPABILITY_UNSPECIFIED" => Some(Self::Unspecified),
1017 _ => None,
1018 }
1019 }
1020 }
1021 #[derive(Clone, PartialEq, ::prost::Oneof)]
1022 pub enum Response {
1023 #[prost(message, tag = "1")]
1024 Messages(Messages),
1025 #[prost(message, tag = "2")]
1027 Started(Started),
1028 #[prost(message, tag = "3")]
1030 Ping(super::super::Ping),
1031 #[prost(message, tag = "4")]
1033 Pong(super::super::Pong),
1034 #[prost(message, tag = "5")]
1036 TopicsLive(TopicsLive),
1037 #[prost(message, tag = "6")]
1039 CatchupComplete(CatchupComplete),
1040 }
1041 }
1042 impl ::prost::Name for V1 {
1043 const NAME: &'static str = "V1";
1044 const PACKAGE: &'static str = "xmtp.mls.api.v1";
1045 fn full_name() -> ::prost::alloc::string::String {
1046 "xmtp.mls.api.v1.SubscribeResponse.V1".into()
1047 }
1048 fn type_url() -> ::prost::alloc::string::String {
1049 "/xmtp.mls.api.v1.SubscribeResponse.V1".into()
1050 }
1051 }
1052 #[derive(Clone, PartialEq, ::prost::Oneof)]
1053 pub enum Version {
1054 #[prost(message, tag = "1")]
1055 V1(V1),
1056 }
1057}
1058impl ::prost::Name for SubscribeResponse {
1059 const NAME: &'static str = "SubscribeResponse";
1060 const PACKAGE: &'static str = "xmtp.mls.api.v1";
1061 fn full_name() -> ::prost::alloc::string::String {
1062 "xmtp.mls.api.v1.SubscribeResponse".into()
1063 }
1064 fn type_url() -> ::prost::alloc::string::String {
1065 "/xmtp.mls.api.v1.SubscribeResponse".into()
1066 }
1067}
1068#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1074pub struct Ping {
1075 #[prost(uint64, tag = "1")]
1076 pub nonce: u64,
1077}
1078impl ::prost::Name for Ping {
1079 const NAME: &'static str = "Ping";
1080 const PACKAGE: &'static str = "xmtp.mls.api.v1";
1081 fn full_name() -> ::prost::alloc::string::String {
1082 "xmtp.mls.api.v1.Ping".into()
1083 }
1084 fn type_url() -> ::prost::alloc::string::String {
1085 "/xmtp.mls.api.v1.Ping".into()
1086 }
1087}
1088#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1089pub struct Pong {
1090 #[prost(uint64, tag = "1")]
1092 pub nonce: u64,
1093}
1094impl ::prost::Name for Pong {
1095 const NAME: &'static str = "Pong";
1096 const PACKAGE: &'static str = "xmtp.mls.api.v1";
1097 fn full_name() -> ::prost::alloc::string::String {
1098 "xmtp.mls.api.v1.Pong".into()
1099 }
1100 fn type_url() -> ::prost::alloc::string::String {
1101 "/xmtp.mls.api.v1.Pong".into()
1102 }
1103}
1104#[derive(Clone, PartialEq, ::prost::Message)]
1105pub struct BatchPublishCommitLogRequest {
1106 #[prost(message, repeated, tag = "1")]
1107 pub requests: ::prost::alloc::vec::Vec<PublishCommitLogRequest>,
1108}
1109impl ::prost::Name for BatchPublishCommitLogRequest {
1110 const NAME: &'static str = "BatchPublishCommitLogRequest";
1111 const PACKAGE: &'static str = "xmtp.mls.api.v1";
1112 fn full_name() -> ::prost::alloc::string::String {
1113 "xmtp.mls.api.v1.BatchPublishCommitLogRequest".into()
1114 }
1115 fn type_url() -> ::prost::alloc::string::String {
1116 "/xmtp.mls.api.v1.BatchPublishCommitLogRequest".into()
1117 }
1118}
1119#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1120pub struct PublishCommitLogRequest {
1121 #[prost(bytes = "vec", tag = "1")]
1122 pub group_id: ::prost::alloc::vec::Vec<u8>,
1123 #[prost(bytes = "vec", tag = "2")]
1124 pub serialized_commit_log_entry: ::prost::alloc::vec::Vec<u8>,
1125 #[prost(message, optional, tag = "3")]
1126 pub signature: ::core::option::Option<
1127 super::super::super::identity::associations::RecoverableEd25519Signature,
1128 >,
1129}
1130impl ::prost::Name for PublishCommitLogRequest {
1131 const NAME: &'static str = "PublishCommitLogRequest";
1132 const PACKAGE: &'static str = "xmtp.mls.api.v1";
1133 fn full_name() -> ::prost::alloc::string::String {
1134 "xmtp.mls.api.v1.PublishCommitLogRequest".into()
1135 }
1136 fn type_url() -> ::prost::alloc::string::String {
1137 "/xmtp.mls.api.v1.PublishCommitLogRequest".into()
1138 }
1139}
1140#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1141pub struct QueryCommitLogRequest {
1142 #[prost(bytes = "vec", tag = "1")]
1143 pub group_id: ::prost::alloc::vec::Vec<u8>,
1144 #[prost(message, optional, tag = "2")]
1145 pub paging_info: ::core::option::Option<PagingInfo>,
1146}
1147impl ::prost::Name for QueryCommitLogRequest {
1148 const NAME: &'static str = "QueryCommitLogRequest";
1149 const PACKAGE: &'static str = "xmtp.mls.api.v1";
1150 fn full_name() -> ::prost::alloc::string::String {
1151 "xmtp.mls.api.v1.QueryCommitLogRequest".into()
1152 }
1153 fn type_url() -> ::prost::alloc::string::String {
1154 "/xmtp.mls.api.v1.QueryCommitLogRequest".into()
1155 }
1156}
1157#[derive(Clone, PartialEq, ::prost::Message)]
1158pub struct QueryCommitLogResponse {
1159 #[prost(bytes = "vec", tag = "1")]
1160 pub group_id: ::prost::alloc::vec::Vec<u8>,
1161 #[prost(message, repeated, tag = "2")]
1162 pub commit_log_entries: ::prost::alloc::vec::Vec<
1163 super::super::message_contents::CommitLogEntry,
1164 >,
1165 #[prost(message, optional, tag = "3")]
1166 pub paging_info: ::core::option::Option<PagingInfo>,
1167}
1168impl ::prost::Name for QueryCommitLogResponse {
1169 const NAME: &'static str = "QueryCommitLogResponse";
1170 const PACKAGE: &'static str = "xmtp.mls.api.v1";
1171 fn full_name() -> ::prost::alloc::string::String {
1172 "xmtp.mls.api.v1.QueryCommitLogResponse".into()
1173 }
1174 fn type_url() -> ::prost::alloc::string::String {
1175 "/xmtp.mls.api.v1.QueryCommitLogResponse".into()
1176 }
1177}
1178#[derive(Clone, PartialEq, ::prost::Message)]
1179pub struct BatchQueryCommitLogRequest {
1180 #[prost(message, repeated, tag = "1")]
1181 pub requests: ::prost::alloc::vec::Vec<QueryCommitLogRequest>,
1182}
1183impl ::prost::Name for BatchQueryCommitLogRequest {
1184 const NAME: &'static str = "BatchQueryCommitLogRequest";
1185 const PACKAGE: &'static str = "xmtp.mls.api.v1";
1186 fn full_name() -> ::prost::alloc::string::String {
1187 "xmtp.mls.api.v1.BatchQueryCommitLogRequest".into()
1188 }
1189 fn type_url() -> ::prost::alloc::string::String {
1190 "/xmtp.mls.api.v1.BatchQueryCommitLogRequest".into()
1191 }
1192}
1193#[derive(Clone, PartialEq, ::prost::Message)]
1194pub struct BatchQueryCommitLogResponse {
1195 #[prost(message, repeated, tag = "1")]
1196 pub responses: ::prost::alloc::vec::Vec<QueryCommitLogResponse>,
1197}
1198impl ::prost::Name for BatchQueryCommitLogResponse {
1199 const NAME: &'static str = "BatchQueryCommitLogResponse";
1200 const PACKAGE: &'static str = "xmtp.mls.api.v1";
1201 fn full_name() -> ::prost::alloc::string::String {
1202 "xmtp.mls.api.v1.BatchQueryCommitLogResponse".into()
1203 }
1204 fn type_url() -> ::prost::alloc::string::String {
1205 "/xmtp.mls.api.v1.BatchQueryCommitLogResponse".into()
1206 }
1207}
1208#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1210pub struct GetNewestGroupMessageRequest {
1211 #[prost(bytes = "vec", repeated, tag = "1")]
1213 pub group_ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
1214 #[prost(bool, tag = "2")]
1215 pub include_content: bool,
1216}
1217impl ::prost::Name for GetNewestGroupMessageRequest {
1218 const NAME: &'static str = "GetNewestGroupMessageRequest";
1219 const PACKAGE: &'static str = "xmtp.mls.api.v1";
1220 fn full_name() -> ::prost::alloc::string::String {
1221 "xmtp.mls.api.v1.GetNewestGroupMessageRequest".into()
1222 }
1223 fn type_url() -> ::prost::alloc::string::String {
1224 "/xmtp.mls.api.v1.GetNewestGroupMessageRequest".into()
1225 }
1226}
1227#[derive(Clone, PartialEq, ::prost::Message)]
1230pub struct GetNewestGroupMessageResponse {
1231 #[prost(message, repeated, tag = "1")]
1232 pub responses: ::prost::alloc::vec::Vec<get_newest_group_message_response::Response>,
1233}
1234pub mod get_newest_group_message_response {
1236 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1237 pub struct Response {
1238 #[prost(message, optional, tag = "1")]
1240 pub group_message: ::core::option::Option<super::GroupMessage>,
1241 }
1242 impl ::prost::Name for Response {
1243 const NAME: &'static str = "Response";
1244 const PACKAGE: &'static str = "xmtp.mls.api.v1";
1245 fn full_name() -> ::prost::alloc::string::String {
1246 "xmtp.mls.api.v1.GetNewestGroupMessageResponse.Response".into()
1247 }
1248 fn type_url() -> ::prost::alloc::string::String {
1249 "/xmtp.mls.api.v1.GetNewestGroupMessageResponse.Response".into()
1250 }
1251 }
1252}
1253impl ::prost::Name for GetNewestGroupMessageResponse {
1254 const NAME: &'static str = "GetNewestGroupMessageResponse";
1255 const PACKAGE: &'static str = "xmtp.mls.api.v1";
1256 fn full_name() -> ::prost::alloc::string::String {
1257 "xmtp.mls.api.v1.GetNewestGroupMessageResponse".into()
1258 }
1259 fn type_url() -> ::prost::alloc::string::String {
1260 "/xmtp.mls.api.v1.GetNewestGroupMessageResponse".into()
1261 }
1262}
1263#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1265#[repr(i32)]
1266pub enum SortDirection {
1267 Unspecified = 0,
1268 Ascending = 1,
1269 Descending = 2,
1270}
1271impl SortDirection {
1272 pub fn as_str_name(&self) -> &'static str {
1277 match self {
1278 Self::Unspecified => "SORT_DIRECTION_UNSPECIFIED",
1279 Self::Ascending => "SORT_DIRECTION_ASCENDING",
1280 Self::Descending => "SORT_DIRECTION_DESCENDING",
1281 }
1282 }
1283 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1285 match value {
1286 "SORT_DIRECTION_UNSPECIFIED" => Some(Self::Unspecified),
1287 "SORT_DIRECTION_ASCENDING" => Some(Self::Ascending),
1288 "SORT_DIRECTION_DESCENDING" => Some(Self::Descending),
1289 _ => None,
1290 }
1291 }
1292}
1293#[cfg(any(not(target_arch = "wasm32"), feature = "grpc_server_impls"))]
1295pub mod mls_api_server {
1296 #![allow(
1297 unused_variables,
1298 dead_code,
1299 missing_docs,
1300 clippy::wildcard_imports,
1301 clippy::let_unit_value,
1302 )]
1303 use tonic::codegen::*;
1304 #[async_trait]
1306 pub trait MlsApi: std::marker::Send + std::marker::Sync + 'static {
1307 async fn send_group_messages(
1310 &self,
1311 request: tonic::Request<super::SendGroupMessagesRequest>,
1312 ) -> std::result::Result<tonic::Response<::pbjson_types::Empty>, tonic::Status>;
1313 async fn send_welcome_messages(
1315 &self,
1316 request: tonic::Request<super::SendWelcomeMessagesRequest>,
1317 ) -> std::result::Result<tonic::Response<::pbjson_types::Empty>, tonic::Status>;
1318 async fn register_installation(
1320 &self,
1321 request: tonic::Request<super::RegisterInstallationRequest>,
1322 ) -> std::result::Result<
1323 tonic::Response<super::RegisterInstallationResponse>,
1324 tonic::Status,
1325 >;
1326 async fn upload_key_package(
1328 &self,
1329 request: tonic::Request<super::UploadKeyPackageRequest>,
1330 ) -> std::result::Result<tonic::Response<::pbjson_types::Empty>, tonic::Status>;
1331 async fn fetch_key_packages(
1333 &self,
1334 request: tonic::Request<super::FetchKeyPackagesRequest>,
1335 ) -> std::result::Result<
1336 tonic::Response<super::FetchKeyPackagesResponse>,
1337 tonic::Status,
1338 >;
1339 async fn revoke_installation(
1342 &self,
1343 request: tonic::Request<super::RevokeInstallationRequest>,
1344 ) -> std::result::Result<tonic::Response<::pbjson_types::Empty>, tonic::Status>;
1345 async fn get_identity_updates(
1349 &self,
1350 request: tonic::Request<super::GetIdentityUpdatesRequest>,
1351 ) -> std::result::Result<
1352 tonic::Response<super::GetIdentityUpdatesResponse>,
1353 tonic::Status,
1354 >;
1355 async fn query_group_messages(
1357 &self,
1358 request: tonic::Request<super::QueryGroupMessagesRequest>,
1359 ) -> std::result::Result<
1360 tonic::Response<super::QueryGroupMessagesResponse>,
1361 tonic::Status,
1362 >;
1363 async fn query_welcome_messages(
1365 &self,
1366 request: tonic::Request<super::QueryWelcomeMessagesRequest>,
1367 ) -> std::result::Result<
1368 tonic::Response<super::QueryWelcomeMessagesResponse>,
1369 tonic::Status,
1370 >;
1371 type SubscribeGroupMessagesStream: tonic::codegen::tokio_stream::Stream<
1373 Item = std::result::Result<super::GroupMessage, tonic::Status>,
1374 >
1375 + std::marker::Send
1376 + 'static;
1377 async fn subscribe_group_messages(
1379 &self,
1380 request: tonic::Request<super::SubscribeGroupMessagesRequest>,
1381 ) -> std::result::Result<
1382 tonic::Response<Self::SubscribeGroupMessagesStream>,
1383 tonic::Status,
1384 >;
1385 type SubscribeWelcomeMessagesStream: tonic::codegen::tokio_stream::Stream<
1387 Item = std::result::Result<super::WelcomeMessage, tonic::Status>,
1388 >
1389 + std::marker::Send
1390 + 'static;
1391 async fn subscribe_welcome_messages(
1393 &self,
1394 request: tonic::Request<super::SubscribeWelcomeMessagesRequest>,
1395 ) -> std::result::Result<
1396 tonic::Response<Self::SubscribeWelcomeMessagesStream>,
1397 tonic::Status,
1398 >;
1399 type SubscribeStream: tonic::codegen::tokio_stream::Stream<
1401 Item = std::result::Result<super::SubscribeResponse, tonic::Status>,
1402 >
1403 + std::marker::Send
1404 + 'static;
1405 async fn subscribe(
1410 &self,
1411 request: tonic::Request<tonic::Streaming<super::SubscribeRequest>>,
1412 ) -> std::result::Result<tonic::Response<Self::SubscribeStream>, tonic::Status>;
1413 async fn batch_publish_commit_log(
1414 &self,
1415 request: tonic::Request<super::BatchPublishCommitLogRequest>,
1416 ) -> std::result::Result<tonic::Response<::pbjson_types::Empty>, tonic::Status>;
1417 async fn batch_query_commit_log(
1418 &self,
1419 request: tonic::Request<super::BatchQueryCommitLogRequest>,
1420 ) -> std::result::Result<
1421 tonic::Response<super::BatchQueryCommitLogResponse>,
1422 tonic::Status,
1423 >;
1424 async fn get_newest_group_message(
1425 &self,
1426 request: tonic::Request<super::GetNewestGroupMessageRequest>,
1427 ) -> std::result::Result<
1428 tonic::Response<super::GetNewestGroupMessageResponse>,
1429 tonic::Status,
1430 >;
1431 }
1432 #[derive(Debug)]
1434 pub struct MlsApiServer<T> {
1435 inner: Arc<T>,
1436 accept_compression_encodings: EnabledCompressionEncodings,
1437 send_compression_encodings: EnabledCompressionEncodings,
1438 max_decoding_message_size: Option<usize>,
1439 max_encoding_message_size: Option<usize>,
1440 }
1441 impl<T> MlsApiServer<T> {
1442 pub fn new(inner: T) -> Self {
1443 Self::from_arc(Arc::new(inner))
1444 }
1445 pub fn from_arc(inner: Arc<T>) -> Self {
1446 Self {
1447 inner,
1448 accept_compression_encodings: Default::default(),
1449 send_compression_encodings: Default::default(),
1450 max_decoding_message_size: None,
1451 max_encoding_message_size: None,
1452 }
1453 }
1454 pub fn with_interceptor<F>(
1455 inner: T,
1456 interceptor: F,
1457 ) -> InterceptedService<Self, F>
1458 where
1459 F: tonic::service::Interceptor,
1460 {
1461 InterceptedService::new(Self::new(inner), interceptor)
1462 }
1463 #[must_use]
1465 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1466 self.accept_compression_encodings.enable(encoding);
1467 self
1468 }
1469 #[must_use]
1471 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1472 self.send_compression_encodings.enable(encoding);
1473 self
1474 }
1475 #[must_use]
1479 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1480 self.max_decoding_message_size = Some(limit);
1481 self
1482 }
1483 #[must_use]
1487 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1488 self.max_encoding_message_size = Some(limit);
1489 self
1490 }
1491 }
1492 impl<T, B> tonic::codegen::Service<http::Request<B>> for MlsApiServer<T>
1493 where
1494 T: MlsApi,
1495 B: Body + std::marker::Send + 'static,
1496 B::Error: Into<StdError> + std::marker::Send + 'static,
1497 {
1498 type Response = http::Response<tonic::body::Body>;
1499 type Error = std::convert::Infallible;
1500 type Future = BoxFuture<Self::Response, Self::Error>;
1501 fn poll_ready(
1502 &mut self,
1503 _cx: &mut Context<'_>,
1504 ) -> Poll<std::result::Result<(), Self::Error>> {
1505 Poll::Ready(Ok(()))
1506 }
1507 fn call(&mut self, req: http::Request<B>) -> Self::Future {
1508 match req.uri().path() {
1509 "/xmtp.mls.api.v1.MlsApi/SendGroupMessages" => {
1510 #[allow(non_camel_case_types)]
1511 struct SendGroupMessagesSvc<T: MlsApi>(pub Arc<T>);
1512 impl<
1513 T: MlsApi,
1514 > tonic::server::UnaryService<super::SendGroupMessagesRequest>
1515 for SendGroupMessagesSvc<T> {
1516 type Response = ::pbjson_types::Empty;
1517 type Future = BoxFuture<
1518 tonic::Response<Self::Response>,
1519 tonic::Status,
1520 >;
1521 fn call(
1522 &mut self,
1523 request: tonic::Request<super::SendGroupMessagesRequest>,
1524 ) -> Self::Future {
1525 let inner = Arc::clone(&self.0);
1526 let fut = async move {
1527 <T as MlsApi>::send_group_messages(&inner, request).await
1528 };
1529 Box::pin(fut)
1530 }
1531 }
1532 let accept_compression_encodings = self.accept_compression_encodings;
1533 let send_compression_encodings = self.send_compression_encodings;
1534 let max_decoding_message_size = self.max_decoding_message_size;
1535 let max_encoding_message_size = self.max_encoding_message_size;
1536 let inner = self.inner.clone();
1537 let fut = async move {
1538 let method = SendGroupMessagesSvc(inner);
1539 let codec = tonic_prost::ProstCodec::default();
1540 let mut grpc = tonic::server::Grpc::new(codec)
1541 .apply_compression_config(
1542 accept_compression_encodings,
1543 send_compression_encodings,
1544 )
1545 .apply_max_message_size_config(
1546 max_decoding_message_size,
1547 max_encoding_message_size,
1548 );
1549 let res = grpc.unary(method, req).await;
1550 Ok(res)
1551 };
1552 Box::pin(fut)
1553 }
1554 "/xmtp.mls.api.v1.MlsApi/SendWelcomeMessages" => {
1555 #[allow(non_camel_case_types)]
1556 struct SendWelcomeMessagesSvc<T: MlsApi>(pub Arc<T>);
1557 impl<
1558 T: MlsApi,
1559 > tonic::server::UnaryService<super::SendWelcomeMessagesRequest>
1560 for SendWelcomeMessagesSvc<T> {
1561 type Response = ::pbjson_types::Empty;
1562 type Future = BoxFuture<
1563 tonic::Response<Self::Response>,
1564 tonic::Status,
1565 >;
1566 fn call(
1567 &mut self,
1568 request: tonic::Request<super::SendWelcomeMessagesRequest>,
1569 ) -> Self::Future {
1570 let inner = Arc::clone(&self.0);
1571 let fut = async move {
1572 <T as MlsApi>::send_welcome_messages(&inner, request).await
1573 };
1574 Box::pin(fut)
1575 }
1576 }
1577 let accept_compression_encodings = self.accept_compression_encodings;
1578 let send_compression_encodings = self.send_compression_encodings;
1579 let max_decoding_message_size = self.max_decoding_message_size;
1580 let max_encoding_message_size = self.max_encoding_message_size;
1581 let inner = self.inner.clone();
1582 let fut = async move {
1583 let method = SendWelcomeMessagesSvc(inner);
1584 let codec = tonic_prost::ProstCodec::default();
1585 let mut grpc = tonic::server::Grpc::new(codec)
1586 .apply_compression_config(
1587 accept_compression_encodings,
1588 send_compression_encodings,
1589 )
1590 .apply_max_message_size_config(
1591 max_decoding_message_size,
1592 max_encoding_message_size,
1593 );
1594 let res = grpc.unary(method, req).await;
1595 Ok(res)
1596 };
1597 Box::pin(fut)
1598 }
1599 "/xmtp.mls.api.v1.MlsApi/RegisterInstallation" => {
1600 #[allow(non_camel_case_types)]
1601 struct RegisterInstallationSvc<T: MlsApi>(pub Arc<T>);
1602 impl<
1603 T: MlsApi,
1604 > tonic::server::UnaryService<super::RegisterInstallationRequest>
1605 for RegisterInstallationSvc<T> {
1606 type Response = super::RegisterInstallationResponse;
1607 type Future = BoxFuture<
1608 tonic::Response<Self::Response>,
1609 tonic::Status,
1610 >;
1611 fn call(
1612 &mut self,
1613 request: tonic::Request<super::RegisterInstallationRequest>,
1614 ) -> Self::Future {
1615 let inner = Arc::clone(&self.0);
1616 let fut = async move {
1617 <T as MlsApi>::register_installation(&inner, request).await
1618 };
1619 Box::pin(fut)
1620 }
1621 }
1622 let accept_compression_encodings = self.accept_compression_encodings;
1623 let send_compression_encodings = self.send_compression_encodings;
1624 let max_decoding_message_size = self.max_decoding_message_size;
1625 let max_encoding_message_size = self.max_encoding_message_size;
1626 let inner = self.inner.clone();
1627 let fut = async move {
1628 let method = RegisterInstallationSvc(inner);
1629 let codec = tonic_prost::ProstCodec::default();
1630 let mut grpc = tonic::server::Grpc::new(codec)
1631 .apply_compression_config(
1632 accept_compression_encodings,
1633 send_compression_encodings,
1634 )
1635 .apply_max_message_size_config(
1636 max_decoding_message_size,
1637 max_encoding_message_size,
1638 );
1639 let res = grpc.unary(method, req).await;
1640 Ok(res)
1641 };
1642 Box::pin(fut)
1643 }
1644 "/xmtp.mls.api.v1.MlsApi/UploadKeyPackage" => {
1645 #[allow(non_camel_case_types)]
1646 struct UploadKeyPackageSvc<T: MlsApi>(pub Arc<T>);
1647 impl<
1648 T: MlsApi,
1649 > tonic::server::UnaryService<super::UploadKeyPackageRequest>
1650 for UploadKeyPackageSvc<T> {
1651 type Response = ::pbjson_types::Empty;
1652 type Future = BoxFuture<
1653 tonic::Response<Self::Response>,
1654 tonic::Status,
1655 >;
1656 fn call(
1657 &mut self,
1658 request: tonic::Request<super::UploadKeyPackageRequest>,
1659 ) -> Self::Future {
1660 let inner = Arc::clone(&self.0);
1661 let fut = async move {
1662 <T as MlsApi>::upload_key_package(&inner, request).await
1663 };
1664 Box::pin(fut)
1665 }
1666 }
1667 let accept_compression_encodings = self.accept_compression_encodings;
1668 let send_compression_encodings = self.send_compression_encodings;
1669 let max_decoding_message_size = self.max_decoding_message_size;
1670 let max_encoding_message_size = self.max_encoding_message_size;
1671 let inner = self.inner.clone();
1672 let fut = async move {
1673 let method = UploadKeyPackageSvc(inner);
1674 let codec = tonic_prost::ProstCodec::default();
1675 let mut grpc = tonic::server::Grpc::new(codec)
1676 .apply_compression_config(
1677 accept_compression_encodings,
1678 send_compression_encodings,
1679 )
1680 .apply_max_message_size_config(
1681 max_decoding_message_size,
1682 max_encoding_message_size,
1683 );
1684 let res = grpc.unary(method, req).await;
1685 Ok(res)
1686 };
1687 Box::pin(fut)
1688 }
1689 "/xmtp.mls.api.v1.MlsApi/FetchKeyPackages" => {
1690 #[allow(non_camel_case_types)]
1691 struct FetchKeyPackagesSvc<T: MlsApi>(pub Arc<T>);
1692 impl<
1693 T: MlsApi,
1694 > tonic::server::UnaryService<super::FetchKeyPackagesRequest>
1695 for FetchKeyPackagesSvc<T> {
1696 type Response = super::FetchKeyPackagesResponse;
1697 type Future = BoxFuture<
1698 tonic::Response<Self::Response>,
1699 tonic::Status,
1700 >;
1701 fn call(
1702 &mut self,
1703 request: tonic::Request<super::FetchKeyPackagesRequest>,
1704 ) -> Self::Future {
1705 let inner = Arc::clone(&self.0);
1706 let fut = async move {
1707 <T as MlsApi>::fetch_key_packages(&inner, request).await
1708 };
1709 Box::pin(fut)
1710 }
1711 }
1712 let accept_compression_encodings = self.accept_compression_encodings;
1713 let send_compression_encodings = self.send_compression_encodings;
1714 let max_decoding_message_size = self.max_decoding_message_size;
1715 let max_encoding_message_size = self.max_encoding_message_size;
1716 let inner = self.inner.clone();
1717 let fut = async move {
1718 let method = FetchKeyPackagesSvc(inner);
1719 let codec = tonic_prost::ProstCodec::default();
1720 let mut grpc = tonic::server::Grpc::new(codec)
1721 .apply_compression_config(
1722 accept_compression_encodings,
1723 send_compression_encodings,
1724 )
1725 .apply_max_message_size_config(
1726 max_decoding_message_size,
1727 max_encoding_message_size,
1728 );
1729 let res = grpc.unary(method, req).await;
1730 Ok(res)
1731 };
1732 Box::pin(fut)
1733 }
1734 "/xmtp.mls.api.v1.MlsApi/RevokeInstallation" => {
1735 #[allow(non_camel_case_types)]
1736 struct RevokeInstallationSvc<T: MlsApi>(pub Arc<T>);
1737 impl<
1738 T: MlsApi,
1739 > tonic::server::UnaryService<super::RevokeInstallationRequest>
1740 for RevokeInstallationSvc<T> {
1741 type Response = ::pbjson_types::Empty;
1742 type Future = BoxFuture<
1743 tonic::Response<Self::Response>,
1744 tonic::Status,
1745 >;
1746 fn call(
1747 &mut self,
1748 request: tonic::Request<super::RevokeInstallationRequest>,
1749 ) -> Self::Future {
1750 let inner = Arc::clone(&self.0);
1751 let fut = async move {
1752 <T as MlsApi>::revoke_installation(&inner, request).await
1753 };
1754 Box::pin(fut)
1755 }
1756 }
1757 let accept_compression_encodings = self.accept_compression_encodings;
1758 let send_compression_encodings = self.send_compression_encodings;
1759 let max_decoding_message_size = self.max_decoding_message_size;
1760 let max_encoding_message_size = self.max_encoding_message_size;
1761 let inner = self.inner.clone();
1762 let fut = async move {
1763 let method = RevokeInstallationSvc(inner);
1764 let codec = tonic_prost::ProstCodec::default();
1765 let mut grpc = tonic::server::Grpc::new(codec)
1766 .apply_compression_config(
1767 accept_compression_encodings,
1768 send_compression_encodings,
1769 )
1770 .apply_max_message_size_config(
1771 max_decoding_message_size,
1772 max_encoding_message_size,
1773 );
1774 let res = grpc.unary(method, req).await;
1775 Ok(res)
1776 };
1777 Box::pin(fut)
1778 }
1779 "/xmtp.mls.api.v1.MlsApi/GetIdentityUpdates" => {
1780 #[allow(non_camel_case_types)]
1781 struct GetIdentityUpdatesSvc<T: MlsApi>(pub Arc<T>);
1782 impl<
1783 T: MlsApi,
1784 > tonic::server::UnaryService<super::GetIdentityUpdatesRequest>
1785 for GetIdentityUpdatesSvc<T> {
1786 type Response = super::GetIdentityUpdatesResponse;
1787 type Future = BoxFuture<
1788 tonic::Response<Self::Response>,
1789 tonic::Status,
1790 >;
1791 fn call(
1792 &mut self,
1793 request: tonic::Request<super::GetIdentityUpdatesRequest>,
1794 ) -> Self::Future {
1795 let inner = Arc::clone(&self.0);
1796 let fut = async move {
1797 <T as MlsApi>::get_identity_updates(&inner, request).await
1798 };
1799 Box::pin(fut)
1800 }
1801 }
1802 let accept_compression_encodings = self.accept_compression_encodings;
1803 let send_compression_encodings = self.send_compression_encodings;
1804 let max_decoding_message_size = self.max_decoding_message_size;
1805 let max_encoding_message_size = self.max_encoding_message_size;
1806 let inner = self.inner.clone();
1807 let fut = async move {
1808 let method = GetIdentityUpdatesSvc(inner);
1809 let codec = tonic_prost::ProstCodec::default();
1810 let mut grpc = tonic::server::Grpc::new(codec)
1811 .apply_compression_config(
1812 accept_compression_encodings,
1813 send_compression_encodings,
1814 )
1815 .apply_max_message_size_config(
1816 max_decoding_message_size,
1817 max_encoding_message_size,
1818 );
1819 let res = grpc.unary(method, req).await;
1820 Ok(res)
1821 };
1822 Box::pin(fut)
1823 }
1824 "/xmtp.mls.api.v1.MlsApi/QueryGroupMessages" => {
1825 #[allow(non_camel_case_types)]
1826 struct QueryGroupMessagesSvc<T: MlsApi>(pub Arc<T>);
1827 impl<
1828 T: MlsApi,
1829 > tonic::server::UnaryService<super::QueryGroupMessagesRequest>
1830 for QueryGroupMessagesSvc<T> {
1831 type Response = super::QueryGroupMessagesResponse;
1832 type Future = BoxFuture<
1833 tonic::Response<Self::Response>,
1834 tonic::Status,
1835 >;
1836 fn call(
1837 &mut self,
1838 request: tonic::Request<super::QueryGroupMessagesRequest>,
1839 ) -> Self::Future {
1840 let inner = Arc::clone(&self.0);
1841 let fut = async move {
1842 <T as MlsApi>::query_group_messages(&inner, request).await
1843 };
1844 Box::pin(fut)
1845 }
1846 }
1847 let accept_compression_encodings = self.accept_compression_encodings;
1848 let send_compression_encodings = self.send_compression_encodings;
1849 let max_decoding_message_size = self.max_decoding_message_size;
1850 let max_encoding_message_size = self.max_encoding_message_size;
1851 let inner = self.inner.clone();
1852 let fut = async move {
1853 let method = QueryGroupMessagesSvc(inner);
1854 let codec = tonic_prost::ProstCodec::default();
1855 let mut grpc = tonic::server::Grpc::new(codec)
1856 .apply_compression_config(
1857 accept_compression_encodings,
1858 send_compression_encodings,
1859 )
1860 .apply_max_message_size_config(
1861 max_decoding_message_size,
1862 max_encoding_message_size,
1863 );
1864 let res = grpc.unary(method, req).await;
1865 Ok(res)
1866 };
1867 Box::pin(fut)
1868 }
1869 "/xmtp.mls.api.v1.MlsApi/QueryWelcomeMessages" => {
1870 #[allow(non_camel_case_types)]
1871 struct QueryWelcomeMessagesSvc<T: MlsApi>(pub Arc<T>);
1872 impl<
1873 T: MlsApi,
1874 > tonic::server::UnaryService<super::QueryWelcomeMessagesRequest>
1875 for QueryWelcomeMessagesSvc<T> {
1876 type Response = super::QueryWelcomeMessagesResponse;
1877 type Future = BoxFuture<
1878 tonic::Response<Self::Response>,
1879 tonic::Status,
1880 >;
1881 fn call(
1882 &mut self,
1883 request: tonic::Request<super::QueryWelcomeMessagesRequest>,
1884 ) -> Self::Future {
1885 let inner = Arc::clone(&self.0);
1886 let fut = async move {
1887 <T as MlsApi>::query_welcome_messages(&inner, request).await
1888 };
1889 Box::pin(fut)
1890 }
1891 }
1892 let accept_compression_encodings = self.accept_compression_encodings;
1893 let send_compression_encodings = self.send_compression_encodings;
1894 let max_decoding_message_size = self.max_decoding_message_size;
1895 let max_encoding_message_size = self.max_encoding_message_size;
1896 let inner = self.inner.clone();
1897 let fut = async move {
1898 let method = QueryWelcomeMessagesSvc(inner);
1899 let codec = tonic_prost::ProstCodec::default();
1900 let mut grpc = tonic::server::Grpc::new(codec)
1901 .apply_compression_config(
1902 accept_compression_encodings,
1903 send_compression_encodings,
1904 )
1905 .apply_max_message_size_config(
1906 max_decoding_message_size,
1907 max_encoding_message_size,
1908 );
1909 let res = grpc.unary(method, req).await;
1910 Ok(res)
1911 };
1912 Box::pin(fut)
1913 }
1914 "/xmtp.mls.api.v1.MlsApi/SubscribeGroupMessages" => {
1915 #[allow(non_camel_case_types)]
1916 struct SubscribeGroupMessagesSvc<T: MlsApi>(pub Arc<T>);
1917 impl<
1918 T: MlsApi,
1919 > tonic::server::ServerStreamingService<
1920 super::SubscribeGroupMessagesRequest,
1921 > for SubscribeGroupMessagesSvc<T> {
1922 type Response = super::GroupMessage;
1923 type ResponseStream = T::SubscribeGroupMessagesStream;
1924 type Future = BoxFuture<
1925 tonic::Response<Self::ResponseStream>,
1926 tonic::Status,
1927 >;
1928 fn call(
1929 &mut self,
1930 request: tonic::Request<super::SubscribeGroupMessagesRequest>,
1931 ) -> Self::Future {
1932 let inner = Arc::clone(&self.0);
1933 let fut = async move {
1934 <T as MlsApi>::subscribe_group_messages(&inner, request)
1935 .await
1936 };
1937 Box::pin(fut)
1938 }
1939 }
1940 let accept_compression_encodings = self.accept_compression_encodings;
1941 let send_compression_encodings = self.send_compression_encodings;
1942 let max_decoding_message_size = self.max_decoding_message_size;
1943 let max_encoding_message_size = self.max_encoding_message_size;
1944 let inner = self.inner.clone();
1945 let fut = async move {
1946 let method = SubscribeGroupMessagesSvc(inner);
1947 let codec = tonic_prost::ProstCodec::default();
1948 let mut grpc = tonic::server::Grpc::new(codec)
1949 .apply_compression_config(
1950 accept_compression_encodings,
1951 send_compression_encodings,
1952 )
1953 .apply_max_message_size_config(
1954 max_decoding_message_size,
1955 max_encoding_message_size,
1956 );
1957 let res = grpc.server_streaming(method, req).await;
1958 Ok(res)
1959 };
1960 Box::pin(fut)
1961 }
1962 "/xmtp.mls.api.v1.MlsApi/SubscribeWelcomeMessages" => {
1963 #[allow(non_camel_case_types)]
1964 struct SubscribeWelcomeMessagesSvc<T: MlsApi>(pub Arc<T>);
1965 impl<
1966 T: MlsApi,
1967 > tonic::server::ServerStreamingService<
1968 super::SubscribeWelcomeMessagesRequest,
1969 > for SubscribeWelcomeMessagesSvc<T> {
1970 type Response = super::WelcomeMessage;
1971 type ResponseStream = T::SubscribeWelcomeMessagesStream;
1972 type Future = BoxFuture<
1973 tonic::Response<Self::ResponseStream>,
1974 tonic::Status,
1975 >;
1976 fn call(
1977 &mut self,
1978 request: tonic::Request<
1979 super::SubscribeWelcomeMessagesRequest,
1980 >,
1981 ) -> Self::Future {
1982 let inner = Arc::clone(&self.0);
1983 let fut = async move {
1984 <T as MlsApi>::subscribe_welcome_messages(&inner, request)
1985 .await
1986 };
1987 Box::pin(fut)
1988 }
1989 }
1990 let accept_compression_encodings = self.accept_compression_encodings;
1991 let send_compression_encodings = self.send_compression_encodings;
1992 let max_decoding_message_size = self.max_decoding_message_size;
1993 let max_encoding_message_size = self.max_encoding_message_size;
1994 let inner = self.inner.clone();
1995 let fut = async move {
1996 let method = SubscribeWelcomeMessagesSvc(inner);
1997 let codec = tonic_prost::ProstCodec::default();
1998 let mut grpc = tonic::server::Grpc::new(codec)
1999 .apply_compression_config(
2000 accept_compression_encodings,
2001 send_compression_encodings,
2002 )
2003 .apply_max_message_size_config(
2004 max_decoding_message_size,
2005 max_encoding_message_size,
2006 );
2007 let res = grpc.server_streaming(method, req).await;
2008 Ok(res)
2009 };
2010 Box::pin(fut)
2011 }
2012 "/xmtp.mls.api.v1.MlsApi/Subscribe" => {
2013 #[allow(non_camel_case_types)]
2014 struct SubscribeSvc<T: MlsApi>(pub Arc<T>);
2015 impl<
2016 T: MlsApi,
2017 > tonic::server::StreamingService<super::SubscribeRequest>
2018 for SubscribeSvc<T> {
2019 type Response = super::SubscribeResponse;
2020 type ResponseStream = T::SubscribeStream;
2021 type Future = BoxFuture<
2022 tonic::Response<Self::ResponseStream>,
2023 tonic::Status,
2024 >;
2025 fn call(
2026 &mut self,
2027 request: tonic::Request<
2028 tonic::Streaming<super::SubscribeRequest>,
2029 >,
2030 ) -> Self::Future {
2031 let inner = Arc::clone(&self.0);
2032 let fut = async move {
2033 <T as MlsApi>::subscribe(&inner, request).await
2034 };
2035 Box::pin(fut)
2036 }
2037 }
2038 let accept_compression_encodings = self.accept_compression_encodings;
2039 let send_compression_encodings = self.send_compression_encodings;
2040 let max_decoding_message_size = self.max_decoding_message_size;
2041 let max_encoding_message_size = self.max_encoding_message_size;
2042 let inner = self.inner.clone();
2043 let fut = async move {
2044 let method = SubscribeSvc(inner);
2045 let codec = tonic_prost::ProstCodec::default();
2046 let mut grpc = tonic::server::Grpc::new(codec)
2047 .apply_compression_config(
2048 accept_compression_encodings,
2049 send_compression_encodings,
2050 )
2051 .apply_max_message_size_config(
2052 max_decoding_message_size,
2053 max_encoding_message_size,
2054 );
2055 let res = grpc.streaming(method, req).await;
2056 Ok(res)
2057 };
2058 Box::pin(fut)
2059 }
2060 "/xmtp.mls.api.v1.MlsApi/BatchPublishCommitLog" => {
2061 #[allow(non_camel_case_types)]
2062 struct BatchPublishCommitLogSvc<T: MlsApi>(pub Arc<T>);
2063 impl<
2064 T: MlsApi,
2065 > tonic::server::UnaryService<super::BatchPublishCommitLogRequest>
2066 for BatchPublishCommitLogSvc<T> {
2067 type Response = ::pbjson_types::Empty;
2068 type Future = BoxFuture<
2069 tonic::Response<Self::Response>,
2070 tonic::Status,
2071 >;
2072 fn call(
2073 &mut self,
2074 request: tonic::Request<super::BatchPublishCommitLogRequest>,
2075 ) -> Self::Future {
2076 let inner = Arc::clone(&self.0);
2077 let fut = async move {
2078 <T as MlsApi>::batch_publish_commit_log(&inner, request)
2079 .await
2080 };
2081 Box::pin(fut)
2082 }
2083 }
2084 let accept_compression_encodings = self.accept_compression_encodings;
2085 let send_compression_encodings = self.send_compression_encodings;
2086 let max_decoding_message_size = self.max_decoding_message_size;
2087 let max_encoding_message_size = self.max_encoding_message_size;
2088 let inner = self.inner.clone();
2089 let fut = async move {
2090 let method = BatchPublishCommitLogSvc(inner);
2091 let codec = tonic_prost::ProstCodec::default();
2092 let mut grpc = tonic::server::Grpc::new(codec)
2093 .apply_compression_config(
2094 accept_compression_encodings,
2095 send_compression_encodings,
2096 )
2097 .apply_max_message_size_config(
2098 max_decoding_message_size,
2099 max_encoding_message_size,
2100 );
2101 let res = grpc.unary(method, req).await;
2102 Ok(res)
2103 };
2104 Box::pin(fut)
2105 }
2106 "/xmtp.mls.api.v1.MlsApi/BatchQueryCommitLog" => {
2107 #[allow(non_camel_case_types)]
2108 struct BatchQueryCommitLogSvc<T: MlsApi>(pub Arc<T>);
2109 impl<
2110 T: MlsApi,
2111 > tonic::server::UnaryService<super::BatchQueryCommitLogRequest>
2112 for BatchQueryCommitLogSvc<T> {
2113 type Response = super::BatchQueryCommitLogResponse;
2114 type Future = BoxFuture<
2115 tonic::Response<Self::Response>,
2116 tonic::Status,
2117 >;
2118 fn call(
2119 &mut self,
2120 request: tonic::Request<super::BatchQueryCommitLogRequest>,
2121 ) -> Self::Future {
2122 let inner = Arc::clone(&self.0);
2123 let fut = async move {
2124 <T as MlsApi>::batch_query_commit_log(&inner, request).await
2125 };
2126 Box::pin(fut)
2127 }
2128 }
2129 let accept_compression_encodings = self.accept_compression_encodings;
2130 let send_compression_encodings = self.send_compression_encodings;
2131 let max_decoding_message_size = self.max_decoding_message_size;
2132 let max_encoding_message_size = self.max_encoding_message_size;
2133 let inner = self.inner.clone();
2134 let fut = async move {
2135 let method = BatchQueryCommitLogSvc(inner);
2136 let codec = tonic_prost::ProstCodec::default();
2137 let mut grpc = tonic::server::Grpc::new(codec)
2138 .apply_compression_config(
2139 accept_compression_encodings,
2140 send_compression_encodings,
2141 )
2142 .apply_max_message_size_config(
2143 max_decoding_message_size,
2144 max_encoding_message_size,
2145 );
2146 let res = grpc.unary(method, req).await;
2147 Ok(res)
2148 };
2149 Box::pin(fut)
2150 }
2151 "/xmtp.mls.api.v1.MlsApi/GetNewestGroupMessage" => {
2152 #[allow(non_camel_case_types)]
2153 struct GetNewestGroupMessageSvc<T: MlsApi>(pub Arc<T>);
2154 impl<
2155 T: MlsApi,
2156 > tonic::server::UnaryService<super::GetNewestGroupMessageRequest>
2157 for GetNewestGroupMessageSvc<T> {
2158 type Response = super::GetNewestGroupMessageResponse;
2159 type Future = BoxFuture<
2160 tonic::Response<Self::Response>,
2161 tonic::Status,
2162 >;
2163 fn call(
2164 &mut self,
2165 request: tonic::Request<super::GetNewestGroupMessageRequest>,
2166 ) -> Self::Future {
2167 let inner = Arc::clone(&self.0);
2168 let fut = async move {
2169 <T as MlsApi>::get_newest_group_message(&inner, request)
2170 .await
2171 };
2172 Box::pin(fut)
2173 }
2174 }
2175 let accept_compression_encodings = self.accept_compression_encodings;
2176 let send_compression_encodings = self.send_compression_encodings;
2177 let max_decoding_message_size = self.max_decoding_message_size;
2178 let max_encoding_message_size = self.max_encoding_message_size;
2179 let inner = self.inner.clone();
2180 let fut = async move {
2181 let method = GetNewestGroupMessageSvc(inner);
2182 let codec = tonic_prost::ProstCodec::default();
2183 let mut grpc = tonic::server::Grpc::new(codec)
2184 .apply_compression_config(
2185 accept_compression_encodings,
2186 send_compression_encodings,
2187 )
2188 .apply_max_message_size_config(
2189 max_decoding_message_size,
2190 max_encoding_message_size,
2191 );
2192 let res = grpc.unary(method, req).await;
2193 Ok(res)
2194 };
2195 Box::pin(fut)
2196 }
2197 _ => {
2198 Box::pin(async move {
2199 let mut response = http::Response::new(
2200 tonic::body::Body::default(),
2201 );
2202 let headers = response.headers_mut();
2203 headers
2204 .insert(
2205 tonic::Status::GRPC_STATUS,
2206 (tonic::Code::Unimplemented as i32).into(),
2207 );
2208 headers
2209 .insert(
2210 http::header::CONTENT_TYPE,
2211 tonic::metadata::GRPC_CONTENT_TYPE,
2212 );
2213 Ok(response)
2214 })
2215 }
2216 }
2217 }
2218 }
2219 impl<T> Clone for MlsApiServer<T> {
2220 fn clone(&self) -> Self {
2221 let inner = self.inner.clone();
2222 Self {
2223 inner,
2224 accept_compression_encodings: self.accept_compression_encodings,
2225 send_compression_encodings: self.send_compression_encodings,
2226 max_decoding_message_size: self.max_decoding_message_size,
2227 max_encoding_message_size: self.max_encoding_message_size,
2228 }
2229 }
2230 }
2231 pub const SERVICE_NAME: &str = "xmtp.mls.api.v1.MlsApi";
2233 impl<T> tonic::server::NamedService for MlsApiServer<T> {
2234 const NAME: &'static str = SERVICE_NAME;
2235 }
2236}