Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/features/community.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@ impl CreateCommunityOptions {

/// Result of creating a community.
#[derive(Debug, Clone)]
#[non_exhaustive]
pub struct CreateCommunityResult {
pub metadata: GroupMetadata,
}

/// A subgroup within a community.
#[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub struct CommunitySubgroup {
pub id: Jid,
pub subject: String,
Expand All @@ -76,13 +78,15 @@ pub struct CommunitySubgroup {

/// Result of linking subgroups to a community.
#[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub struct LinkSubgroupsResult {
pub linked_jids: Vec<Jid>,
pub failed_groups: Vec<(Jid, u32)>,
}

/// Result of unlinking subgroups from a community.
#[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub struct UnlinkSubgroupsResult {
pub unlinked_jids: Vec<Jid>,
pub failed_groups: Vec<(Jid, u32)>,
Expand Down
1 change: 1 addition & 0 deletions src/features/groups.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ impl From<GroupInfoResponse> for GroupMetadata {
}

#[derive(Debug, Clone)]
#[non_exhaustive]
pub struct CreateGroupResult {
pub metadata: GroupMetadata,
}
Expand Down
1 change: 1 addition & 0 deletions src/send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ pub struct SendOptions {

/// Result of a successfully sent message.
#[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub struct SendResult {
pub message_id: String,
pub to: Jid,
Expand Down
1 change: 1 addition & 0 deletions src/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ where
}

#[derive(Debug, Clone)]
#[non_exhaustive]
pub struct UploadResponse {
pub url: String,
pub direct_path: String,
Expand Down
4 changes: 4 additions & 0 deletions wacore/src/iq/business.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ fn node_text(node: &NodeRef<'_>) -> Option<String> {
}

#[derive(Debug, Clone, Default, serde::Serialize)]
#[non_exhaustive]
pub struct BusinessProfile {
#[serde(skip_serializing_if = "Option::is_none")]
pub wid: Option<Jid>,
Expand All @@ -64,6 +65,7 @@ pub struct BusinessProfile {
}

#[derive(Debug, Clone, Default, serde::Serialize)]
#[non_exhaustive]
pub struct BusinessHours {
#[serde(skip_serializing_if = "Option::is_none")]
pub timezone: Option<String>,
Expand All @@ -72,6 +74,7 @@ pub struct BusinessHours {
}

#[derive(Debug, Clone, serde::Serialize)]
#[non_exhaustive]
pub struct BusinessHoursConfig {
pub day_of_week: DayOfWeek,
pub mode: BusinessHourMode,
Expand All @@ -80,6 +83,7 @@ pub struct BusinessHoursConfig {
}

#[derive(Debug, Clone, serde::Serialize)]
#[non_exhaustive]
pub struct BusinessCategory {
pub id: String,
pub name: String,
Expand Down
4 changes: 4 additions & 0 deletions wacore/src/iq/groups.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ pub struct GroupQueryRequest {

/// A participant in a group response.
#[derive(Debug, Clone)]
#[non_exhaustive]
pub struct GroupParticipantResponse {
pub jid: Jid,
pub phone_number: Option<Jid>,
Expand Down Expand Up @@ -542,6 +543,7 @@ impl ProtocolNode for GroupParticipantResponse {

/// Response from a group info query.
#[derive(Debug, Clone)]
#[non_exhaustive]
pub struct GroupInfoResponse {
pub id: Jid,
pub subject: GroupSubject,
Expand Down Expand Up @@ -986,6 +988,7 @@ impl ProtocolNode for GroupParticipatingRequest {

/// Response containing all groups the user is participating in.
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub struct GroupParticipatingResponse {
pub groups: Vec<GroupInfoResponse>,
}
Expand Down Expand Up @@ -1166,6 +1169,7 @@ pub struct AddRequestInfo {
/// `type` is often omitted by the server. On `error == "403"` the
/// `<add_request>` child (`add_request` field) carries the V4 invite token.
#[derive(Debug, Clone)]
#[non_exhaustive]
pub struct ParticipantChangeResponse {
pub jid: Jid,
pub status: Option<String>,
Expand Down
2 changes: 2 additions & 0 deletions wacore/src/iq/usync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ pub struct IsOnWhatsAppResult {

/// User information from usync.
#[derive(Debug, Clone)]
#[non_exhaustive]
pub struct UserInfo {
pub jid: Jid,
pub lid: Option<Jid>,
Expand Down Expand Up @@ -739,6 +740,7 @@ impl LidQuerySpec {

/// Response: just the LID mappings learned.
#[derive(Debug, Clone)]
#[non_exhaustive]
pub struct LidQueryResponse {
pub lid_mappings: Vec<UsyncLidMapping>,
}
Expand Down
Loading