Skip to content

Commit

Permalink
Generate latest protos, update affected types (#1009)
Browse files Browse the repository at this point in the history
* Generate latest protos

* Fixes for proto changes
  • Loading branch information
rygine authored Aug 29, 2024
1 parent 6acf381 commit ace8399
Show file tree
Hide file tree
Showing 14 changed files with 5,601 additions and 2,216 deletions.
1 change: 1 addition & 0 deletions xmtp_mls/src/groups/group_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ impl GroupMetadata {
conversation_type: conversation_type as i32,
creator_inbox_id: self.creator_inbox_id.clone(),
creator_account_address: "".to_string(), // TODO: remove from proto
dm_members: None,
})
}
}
Expand Down
5 changes: 0 additions & 5 deletions xmtp_mls/src/groups/message_history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -705,9 +705,6 @@ impl From<HistoryReply> for MessageHistoryReply {
request_id: reply.request_id,
url: reply.url,
encryption_key: Some(reply.encryption_key.into()),
// deprecated fields
bundle_hash: vec![],
signing_key: None,
}
}
}
Expand Down Expand Up @@ -1316,8 +1313,6 @@ mod tests {
request_id: request_id.clone(),
url: "http://foo/bar".to_string(),
encryption_key: None,
signing_key: None,
bundle_hash: vec![],
})
.await
.expect("send reply");
Expand Down
5 changes: 3 additions & 2 deletions xmtp_proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ grpc = ["tonic"]
# @@protoc_deletion_point(features)
# This section is automatically generated by protoc-gen-prost-crate.
# Changes in this area may be lost on regeneration.
proto_full = ["xmtp-identity","xmtp-identity-api-v1","xmtp-identity-associations","xmtp-keystore_api-v1","xmtp-message_api-v1","xmtp-message_contents","xmtp-mls-api-v1","xmtp-mls-database","xmtp-mls-message_contents","xmtp-mls_validation-v1"]
proto_full = ["xmtp-identity","xmtp-identity-api-v1","xmtp-identity-associations","xmtp-keystore_api-v1","xmtp-message_api-v1","xmtp-message_contents","xmtp-mls-api-v1","xmtp-mls-database","xmtp-mls-message_contents","xmtp-mls_validation-v1","xmtp-xmtpv4"]
"xmtp-identity" = []
"xmtp-identity-api-v1" = ["xmtp-identity","xmtp-identity-associations"]
"xmtp-identity-associations" = ["xmtp-identity","xmtp-message_contents"]
Expand All @@ -35,4 +35,5 @@ proto_full = ["xmtp-identity","xmtp-identity-api-v1","xmtp-identity-associations
"xmtp-mls-database" = []
"xmtp-mls-message_contents" = ["xmtp-message_contents"]
"xmtp-mls_validation-v1" = ["xmtp-identity-associations"]
## @@protoc_insertion_point(features)
"xmtp-xmtpv4" = ["xmtp-identity-associations","xmtp-mls-api-v1"]
## @@protoc_insertion_point(features)
6 changes: 6 additions & 0 deletions xmtp_proto/src/gen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,10 @@ pub mod xmtp {
// @@protoc_insertion_point(xmtp.mls_validation.v1)
}
}
#[cfg(feature = "xmtp-xmtpv4")]
// @@protoc_insertion_point(attribute:xmtp.xmtpv4)
pub mod xmtpv4 {
include!("xmtp.xmtpv4.rs");
// @@protoc_insertion_point(xmtp.xmtpv4)
}
}
314 changes: 162 additions & 152 deletions xmtp_proto/src/gen/xmtp.identity.api.v1.rs

Large diffs are not rendered by default.

464 changes: 239 additions & 225 deletions xmtp_proto/src/gen/xmtp.message_api.v1.rs

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions xmtp_proto/src/gen/xmtp.message_contents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -859,16 +859,16 @@ pub mod private_preferences_action {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AllowGroup {
/// Add the given group_ids to the allow list
#[prost(bytes="vec", repeated, tag="1")]
pub group_ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(string, repeated, tag="1")]
pub group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Deny (deny) Group access
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DenyGroup {
/// Add the given group_ids to the deny list
#[prost(bytes="vec", repeated, tag="1")]
pub group_ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(string, repeated, tag="1")]
pub group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
Expand Down Expand Up @@ -2892,10 +2892,10 @@ pub const FILE_DESCRIPTOR_SET: &[u8] = &[
0x69, 0x6e, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52,
0x08, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x73, 0x1a, 0x29, 0x0a, 0x0a, 0x41, 0x6c, 0x6c,
0x6f, 0x77, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70,
0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, 0x67, 0x72, 0x6f, 0x75,
0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x67, 0x72, 0x6f, 0x75,
0x70, 0x49, 0x64, 0x73, 0x1a, 0x28, 0x0a, 0x09, 0x44, 0x65, 0x6e, 0x79, 0x47, 0x72, 0x6f, 0x75,
0x70, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x73, 0x42, 0x0e,
0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x73, 0x42, 0x0e,
0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x5b,
0x0a, 0x19, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65,
0x6e, 0x63, 0x65, 0x73, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x33, 0x0a, 0x02, 0x76,
Expand Down Expand Up @@ -2990,25 +2990,25 @@ pub const FILE_DESCRIPTOR_SET: &[u8] = &[
0x20, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x20, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x61, 0x63, 0x63,
0x65, 0x73, 0x73, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x03, 0x04, 0x01, 0x12, 0x03, 0x2a,
0x0a, 0x14, 0x0a, 0x3a, 0x0a, 0x06, 0x04, 0x00, 0x03, 0x04, 0x02, 0x00, 0x12, 0x03, 0x2c, 0x04,
0x21, 0x1a, 0x2b, 0x20, 0x41, 0x64, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x69, 0x76, 0x65,
0x22, 0x1a, 0x2b, 0x20, 0x41, 0x64, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x69, 0x76, 0x65,
0x6e, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74,
0x68, 0x65, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x0a, 0x0a, 0x0e,
0x0a, 0x07, 0x04, 0x00, 0x03, 0x04, 0x02, 0x00, 0x04, 0x12, 0x03, 0x2c, 0x04, 0x0c, 0x0a, 0x0e,
0x0a, 0x07, 0x04, 0x00, 0x03, 0x04, 0x02, 0x00, 0x05, 0x12, 0x03, 0x2c, 0x0d, 0x12, 0x0a, 0x0e,
0x0a, 0x07, 0x04, 0x00, 0x03, 0x04, 0x02, 0x00, 0x01, 0x12, 0x03, 0x2c, 0x13, 0x1c, 0x0a, 0x0e,
0x0a, 0x07, 0x04, 0x00, 0x03, 0x04, 0x02, 0x00, 0x03, 0x12, 0x03, 0x2c, 0x1f, 0x20, 0x0a, 0x28,
0x0a, 0x07, 0x04, 0x00, 0x03, 0x04, 0x02, 0x00, 0x05, 0x12, 0x03, 0x2c, 0x0d, 0x13, 0x0a, 0x0e,
0x0a, 0x07, 0x04, 0x00, 0x03, 0x04, 0x02, 0x00, 0x01, 0x12, 0x03, 0x2c, 0x14, 0x1d, 0x0a, 0x0e,
0x0a, 0x07, 0x04, 0x00, 0x03, 0x04, 0x02, 0x00, 0x03, 0x12, 0x03, 0x2c, 0x20, 0x21, 0x0a, 0x28,
0x0a, 0x04, 0x04, 0x00, 0x03, 0x05, 0x12, 0x04, 0x30, 0x02, 0x33, 0x03, 0x1a, 0x1a, 0x20, 0x44,
0x65, 0x6e, 0x79, 0x20, 0x28, 0x64, 0x65, 0x6e, 0x79, 0x29, 0x20, 0x47, 0x72, 0x6f, 0x75, 0x70,
0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x03, 0x05,
0x01, 0x12, 0x03, 0x30, 0x0a, 0x13, 0x0a, 0x39, 0x0a, 0x06, 0x04, 0x00, 0x03, 0x05, 0x02, 0x00,
0x12, 0x03, 0x32, 0x04, 0x21, 0x1a, 0x2a, 0x20, 0x41, 0x64, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20,
0x12, 0x03, 0x32, 0x04, 0x22, 0x1a, 0x2a, 0x20, 0x41, 0x64, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20,
0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x73, 0x20,
0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x6e, 0x79, 0x20, 0x6c, 0x69, 0x73, 0x74,
0x0a, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x00, 0x03, 0x05, 0x02, 0x00, 0x04, 0x12, 0x03, 0x32, 0x04,
0x0c, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x00, 0x03, 0x05, 0x02, 0x00, 0x05, 0x12, 0x03, 0x32, 0x0d,
0x12, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x00, 0x03, 0x05, 0x02, 0x00, 0x01, 0x12, 0x03, 0x32, 0x13,
0x1c, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x00, 0x03, 0x05, 0x02, 0x00, 0x03, 0x12, 0x03, 0x32, 0x1f,
0x20, 0x0a, 0x0c, 0x0a, 0x04, 0x04, 0x00, 0x08, 0x00, 0x12, 0x04, 0x35, 0x02, 0x3c, 0x03, 0x0a,
0x13, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x00, 0x03, 0x05, 0x02, 0x00, 0x01, 0x12, 0x03, 0x32, 0x14,
0x1d, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x00, 0x03, 0x05, 0x02, 0x00, 0x03, 0x12, 0x03, 0x32, 0x20,
0x21, 0x0a, 0x0c, 0x0a, 0x04, 0x04, 0x00, 0x08, 0x00, 0x12, 0x04, 0x35, 0x02, 0x3c, 0x03, 0x0a,
0x0c, 0x0a, 0x05, 0x04, 0x00, 0x08, 0x00, 0x01, 0x12, 0x03, 0x35, 0x08, 0x14, 0x0a, 0x0b, 0x0a,
0x04, 0x04, 0x00, 0x02, 0x00, 0x12, 0x03, 0x36, 0x04, 0x23, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00,
0x02, 0x00, 0x06, 0x12, 0x03, 0x36, 0x04, 0x10, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00,
Expand Down
14 changes: 4 additions & 10 deletions xmtp_proto/src/gen/xmtp.message_contents.serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4171,7 +4171,7 @@ impl serde::Serialize for private_preferences_action::AllowGroup {
}
let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.PrivatePreferencesAction.AllowGroup", len)?;
if !self.group_ids.is_empty() {
struct_ser.serialize_field("groupIds", &self.group_ids.iter().map(pbjson::private::base64::encode).collect::<Vec<_>>())?;
struct_ser.serialize_field("groupIds", &self.group_ids)?;
}
struct_ser.end()
}
Expand Down Expand Up @@ -4238,10 +4238,7 @@ impl<'de> serde::Deserialize<'de> for private_preferences_action::AllowGroup {
if group_ids__.is_some() {
return Err(serde::de::Error::duplicate_field("groupIds"));
}
group_ids__ =
Some(map_.next_value::<Vec<::pbjson::private::BytesDeserialize<_>>>()?
.into_iter().map(|x| x.0).collect())
;
group_ids__ = Some(map_.next_value()?);
}
}
}
Expand Down Expand Up @@ -4450,7 +4447,7 @@ impl serde::Serialize for private_preferences_action::DenyGroup {
}
let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.PrivatePreferencesAction.DenyGroup", len)?;
if !self.group_ids.is_empty() {
struct_ser.serialize_field("groupIds", &self.group_ids.iter().map(pbjson::private::base64::encode).collect::<Vec<_>>())?;
struct_ser.serialize_field("groupIds", &self.group_ids)?;
}
struct_ser.end()
}
Expand Down Expand Up @@ -4517,10 +4514,7 @@ impl<'de> serde::Deserialize<'de> for private_preferences_action::DenyGroup {
if group_ids__.is_some() {
return Err(serde::de::Error::duplicate_field("groupIds"));
}
group_ids__ =
Some(map_.next_value::<Vec<::pbjson::private::BytesDeserialize<_>>>()?
.into_iter().map(|x| x.0).collect())
;
group_ids__ = Some(map_.next_value()?);
}
}
}
Expand Down
Loading

0 comments on commit ace8399

Please sign in to comment.