-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for Slack Connect invitations
- Loading branch information
Showing
11 changed files
with
237 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace SlackNet.Events | ||
{ | ||
public class SharedChannelInviteAccepted : Event | ||
{ | ||
public bool ApprovalRequired { get; set; } | ||
public Invite Invite { get; set; } | ||
public User InvitingUser { get; set; } | ||
public string RecipientEmail { get; set; } | ||
public string RecipientUserId { get; set; } | ||
public InviteChannel Channel { get; set; } | ||
public IList<ConnectedTeam> TeamsInChannel { get; set; } = new List<ConnectedTeam>(); | ||
public User AcceptingUser { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace SlackNet.Events | ||
{ | ||
public class SharedChannelInviteApproved : Event | ||
{ | ||
public Invite Invite { get; set; } | ||
public InviteChannel Channel { get; set; } | ||
public string ApprovingTeamId { get; set; } | ||
public IList<ConnectedTeam> TeamsInChannel { get; set; } = new List<ConnectedTeam>(); | ||
public User ApprovingUser { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace SlackNet.Events | ||
{ | ||
public class SharedChannelInviteDeclined : Event | ||
{ | ||
public Invite Invite { get; set; } | ||
public InviteChannel Channel { get; set; } | ||
public string DecliningTeamId { get; set; } | ||
public IList<ConnectedTeam> TeamsInChannel { get; set; } = new List<ConnectedTeam>(); | ||
public User DecliningUser { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace SlackNet.Events | ||
{ | ||
public class SharedChannelInviteReceived : Event | ||
{ | ||
public Invite Invite { get; set; } | ||
public InviteChannel Channel { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace SlackNet | ||
{ | ||
public class ConnectedTeam | ||
{ | ||
public string Id { get; set; } | ||
public string Name { get; set; } | ||
public Icons Icon { get; set; } | ||
public bool IsVerified { get; set; } | ||
public string Domain { get; set; } | ||
public int DateCreated { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace SlackNet | ||
{ | ||
public class Invite | ||
{ | ||
public string Id { get; set; } | ||
public int DateCreated { get; set; } | ||
public int DateInvalid { get; set; } | ||
public ConnectedTeam InvitingTeam { get; set; } | ||
public User InvitingUser { get; set; } | ||
public string RecipientUserId { get; set; } | ||
public string Link { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace SlackNet | ||
{ | ||
public class InviteChannel | ||
{ | ||
public string Id { get; set; } | ||
public bool IsPrivate { get; set; } | ||
public bool IsIm { get; set; } | ||
public string Name { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace SlackNet.WebApi | ||
{ | ||
public class AcceptSharedInviteResponse | ||
{ | ||
public bool ImplicitApproval { get; set; } | ||
public string ChannelId { get; set; } | ||
public string InviteId { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace SlackNet.WebApi | ||
{ | ||
public class ConnectInvitesListResponse | ||
{ | ||
public IList<PendingInvite> Invites { get; set; } | ||
public ResponseMetadata ResponseMetadata { get; set; } = new(); | ||
} | ||
|
||
public class PendingInvite | ||
{ | ||
public string Direction { get; set; } | ||
public string Status { get; set; } | ||
public int DateLastUpdated { get; set; } | ||
public string InviteType { get; set; } | ||
public Invite Invite { get; set; } | ||
public InviteChannel Channel { get; set; } | ||
public IList<InviteAcceptance> Acceptances { get; set; } = new List<InviteAcceptance>(); | ||
} | ||
|
||
public class InviteAcceptance | ||
{ | ||
public string ApprovalStatus { get; set; } | ||
public int DateAccepted { get; set; } | ||
public int DateInvalid { get; set; } | ||
public int DateLastUpdated { get; set; } | ||
public ConnectedTeam AcceptingTeam { get; set; } | ||
public User AcceptingUser { get; set; } | ||
public IList<InviteReview> Reviews { get; set; } = new List<InviteReview>(); | ||
} | ||
|
||
public class InviteReview | ||
{ | ||
public string Type { get; set; } | ||
public int DateReview { get; set; } | ||
public ConnectedTeam ReviewingTeam { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace SlackNet.WebApi | ||
{ | ||
public class InviteSharedResponse | ||
{ | ||
public string InviteId { get; set; } | ||
public bool IsLegacySharedChannel { get; set; } | ||
public string ConfCode { get; set; } | ||
public string Url { get; set; } | ||
} | ||
} |