Skip to content

Releases

v0.20.1

Choose a tag to compare

@github-actions github-actions released this 22 Nov 06:01

This release adds all the remaining Slack Web API methods, including the admin APIs for Enterprise organizations. It also starts reducing how much of SlackNet's public API depends on Newtonsoft.Json, and adds nullable annotations to Web API responses.

Added

  • AdminAnalyticsApi, which reads an Enterprise organization's member analytics, public channel analytics and public channel metadata as MemberAnalytics, PublicChannelAnalytics and PublicChannelMetadata records, streamed from Slack's compressed analytics files as you enumerate them.
  • AdminAnalyticsMessagesApi, which gets activity metrics and metadata for a channel's messages, with MessageActivity and AnalyticsMessage. File has Subtype and DurationMs.
  • AdminAnalyticsSlackbotApi, which gets per-user Slackbot skill and tool usage, with SlackbotSkillUsage and SlackbotToolUsage.
  • AdminAppsApi, which approves, restricts, clears the resolution of, and uninstalls apps in an Enterprise organization.
  • AdminAppsActivitiesApi, which lists workflow app logs across an Enterprise organization, with AppActivity.
  • AdminAppsApprovedApi and AdminAppsRestrictedApi, which list approved and restricted apps, with AppResolution.
  • AdminAppsConfigApi, which looks up and sets connector configs, with AppConfig, AppDomainRestrictions, WorkflowAuthStrategy and RichLinkPreviewType.
  • AdminAppsMcpServersApi, which lists the third-party app MCP servers approved for an Enterprise organization, with AppMcpServer, and AdminAppsMcpServersPermissionsApi, which lists and sets who can use an app's MCP servers, with McpServerPermissions.
  • AdminAppsPermissionsApi, which sets, lists, adds and removes who can access an app and where it can be used, with AppPermissionType and AppPermissions.
  • AdminAppsRequestsApi, which lists and cancels app install requests, with AppRequest.
  • AdminAuditAnomalyAllowApi, which reads and overwrites an Enterprise organization's allow list of IP blocks and ASNs, with AnomalyAllowList.
  • AdminAuthPolicyApi, which assigns, lists and removes the users assigned to an authentication policy, with AuthPolicyEntity and AuthPolicyEntityType.
  • AdminBarriersApi, which creates, lists, updates and deletes information barriers, with InformationBarrier and RestrictedSubject.
  • AdminConversationsApi, which creates, archives, unarchives, renames, deletes, converts, searches and looks up channels across an Enterprise organization, invites and removes their members, and sets or disconnects the workspaces they're connected to, with AdminConversation, ConversationSearchType and ConversationSearchSort. Its bulk methods return the channels Slack couldn't act on as ConversationBulkActionFailures, and Kick returns the users it couldn't remove as ConversationKickFailures. It also creates Salesforce channels and links and unlinks Salesforce records, gets and sets channels' posting, threading, huddle and mention preferences, with ConversationPrefs, ConversationPermission and ConversationPermissionType, and gets, sets and removes conversations' custom retention policies, with ConversationRetention.
  • AdminConversationsEkmApi, which lists disconnected channels and their original channel IDs for Enterprise Key Management, with OriginalConnectedChannelInfo.
  • AdminConversationsRestrictAccessApi, which adds, lists and removes the IDP groups allowed to access a private channel.
  • AdminEmojiApi, which adds, aliases, lists, renames and removes custom emoji across an Enterprise organization, with CustomEmoji.
  • AdminFunctionsApi, which lists apps' functions as Functions, and AdminFunctionsPermissionsApi, which looks up and sets who can use functions, with FunctionPermissions, FunctionAccess, FunctionMetadata, FunctionPermissionSetting, EntityPermission and PermissionVisibility. FunctionPermissionType has NoOne.
  • AdminInviteRequestsApi, which approves, denies and lists pending requests to invite people to workspaces, as InviteRequests, and AdminInviteRequestsApprovedApi and AdminInviteRequestsDeniedApi, which list approved and denied requests, with ApprovedInviteRequest, DeniedInviteRequest, WorkspaceInvite and Actor.
  • AdminRolesApi, which adds, lists and removes users' admin role assignments, with RoleAssignment. Users and entities that couldn't be added or removed can be read from the SlackException as RoleAssignmentRejections.
  • AdminSlackbotSkillsApi, which lists, publishes, unpublishes and auto-enables an organization's Slackbot skills, with SkillSort, SkillAutoEnabledStatus and SkillAutoEnabled. Skills that couldn't be published or unpublished can be read from the SlackException as SkillFailures.
  • AdminTeamsApi, which creates and lists workspaces in an Enterprise organization, with EnterpriseTeam and TeamDiscoverability, AdminTeamsAdminsApi and AdminTeamsOwnersApi, which list a workspace's admins and owners, and AdminTeamsSettingsApi, which gets a workspace's settings and sets its default channels, description, discoverability, icon and name. Team has DefaultChannels.
  • AdminUserGroupsApi, which creates, fetches and updates organization-wide user groups, adds, removes and uploads their members, and adds, lists and removes the default channels and workspaces of IDP groups. Users that couldn't be added are returned as UserFailures. UserGroup has EnterpriseId, EnterpriseSubteamId, IsSubteam, AutoProvision, IsSection, IsEditingRestricted, IsMembershipLocked, IsIdpGroup, IsVisible, IsOrgLevel, Teams and ChannelCount, and Conversation has TeamId and IsRedacted.
  • AdminUsersApi, which assigns, invites, lists, removes and deactivates users in an Enterprise organization, sets them as admins, owners or regular users, and gets and sets guests' expirations, with AdminUser, AdminUsersAccessApi, which pauses and resumes frontline members' access, AdminUsersSessionApi, which lists, invalidates and resets users' sessions and gets, sets and clears their session settings, with ActiveSession, SessionDetails and UserSessionSettings, and AdminUsersUnsupportedVersionsApi, which exports the members using unsupported software. Users whose access couldn't be paused or resumed can be read from the SlackException as UserFailures.
  • AdminWorkflowsApi, which searches and unpublishes workflows, with Workflow, WorkflowSource, WorkflowSearchSort and PublishStatus, AdminWorkflowsCollaboratorsApi, which adds and removes workflow collaborators, AdminWorkflowsPermissionsApi, which looks up who can run workflows, with WorkflowPermissions, and AdminWorkflowsTriggersTypesPermissionsApi, which looks up and sets who can use trigger types, with TriggerTypePermissions, TriggerTypeMetadata and TriggerTypePermissionSetting.
  • AgentsConversationsApi, which creates, archives and sets properties and slash commands on code channels, and manages their views and canvases, with CodeChannelProperties, ContextBarItem, AgentResource, AgentCommand, AgentView and CanvasComment. AccessLevel has Comment for comment-only canvas views.
  • AgentsSessionsApi.Rename, which renames an agent session.
  • AppDeleted, AppInstalled, AppRequested and AppUninstalledTeam events, with AppRequest, App and AppScope.
  • AppRateLimited event, which Slack sends when your app's event subscriptions are rate limited. Event handlers receive it in an EventCallback, over HTTP or Socket Mode, even though Slack doesn't send it in one.
  • AppsApi.Uninstall, which uninstalls your app from a workspace, revoking all of the installation's tokens.
  • AppsIconApi, which sets an app's icon from an uploaded image or a URL.
  • AppsManagedPermissionsApi, which sets who can interact with a managed app, with ManagedAppPermissionType, and returns its AppPermissions.
  • AppsManifestApi, which creates, updates, exports, validates and deletes apps from app manifests, with AppCreationResponse, AppCredentials, and AppManifest and its parts in the SlackNet.AppManifests namespace.
  • AppsUserConnectionApi, which updates the connection status between a user and your app, in response to a UserConnection event.
  • BlocksApi.Validate, which validates blocks, a message or a view against the Block Kit schema.
  • CallRejected event, which Slack sends when a user rejects a call shared with them in a DM.
  • CanvasesApi.GetContent, which gets the content of a canvas as markdown or HTML.
  • ChannelPostingPermissions message event, which Slack sends when a user changes a channel's posting permissions.
  • ContentType.Channels and ContentType.Users, for searching channels and users with AssistantSearchApi.Context.
  • DateTime properties alongside Unix timestamp properties: CreatedChannel.CreatedDate, RenamedChannel.CreatedDate, PinnedInfo.PinnedTimestamp, SubteamMembersChanged.PreviousUpdate and Updated, Bookmark.Created and Updated, Call.Started, ConnectedTeam.Created, Conversation.UpdatedDate, ExternalTeam.LastActive, File.CreatedDate, FileComment.CreatedDate, Function.Created, Updated and Deleted, Invite.Created and Expires, InviteChannel.Created, ListView.Created, OwnDndStatus.SnoozeEnd, Topic.LastSetDate, Purpose.LastSetDate, UserProfile.StatusExpirationDate and HuddleStateExpiration, Login.First and Last, ScheduledMessage.PostAtDate and Created, PendingInvite.LastUpdated, InviteAcceptance.Accepted, Expires and LastUpdated, InviteReview.Reviewed, and TokenRotationResponse.Expires and IssuedAt.
  • EntityApi.PresentComments and EntityApi.AcknowledgeCommentAction, with EntityComment, the EntityCommentsRequested event, and WorkObjectEntity.EntityComments to enable the comments tab, for Work Object comments.
  • EntityCommentViewInfo and ViewSubmission.TriggerId, so view submissions for Work Ob...
Read more

v0.20.0

Choose a tag to compare

@github-actions github-actions released this 01 Nov 09:10

Breaking

  • Removed ISlackTypeResolver, along with UseTypeResolver, ISlackServiceProvider.GetTypeResolver, SlackServiceBuilder.GetTypeResolver, Default.SlackTypeResolver and Default.AssembliesContainingSlackTypes. Default.JsonSettings no longer takes a type resolver. Use ReplaceSlackType or RegisterSlackType to deserialize your own types.

Added

  • ReplaceSlackType<TSlackType, TReplacement>() deserializes your own type wherever SlackNet would create one of its own, so you can add properties SlackNet doesn't have yet.
  • RegisterSlackType<TSlackType>(typeIdentifier) deserializes Slack types that SlackNet doesn't have yet.
  • RegisterFunctionHandler handles executions of a single custom function by callback ID, with optional typed input values.
  • AgentSessionTitleChanged event.
  • ContextTeamId, Updated, IsOpen, IsFrozen, SharedTeamIds, InternalTeamIds, ConnectedTeamIds and PendingConnectedTeamIds on Conversation.
  • UserTeam, SourceTeam, DisplayAsBot, MediaDisplayType and HasMoreShares on File.
  • IsEmailConfirmed, WhoCanShareContactCard and IsWorkflowBot on User, and DisplayNameNormalized, Image1024 and IsCustomImage on UserProfile.
  • ParentUserId and Subscribed on MessageEvent.
  • ContextTeamId and ContextEnterpriseId on EventCallback, and IsEnterpriseInstall on Authorization.
  • Team and Enterprise on MemberJoinedChannel, and Team on MemberLeftChannel.

Fixed

  • channel_archive, channel_unarchive, group_archive and group_unarchive events are deserialized as ChannelArchive, ChannelUnarchive, GroupArchive and GroupUnarchive events, rather than as message subtypes.

Thankyou to @we4sz for his help with this release 💪

v0.19.0

Choose a tag to compare

@soxtoby soxtoby released this 19 Oct 05:55

This release adds support for custom workflow functions and dynamic credential providers (which should make it easier to support multiple Slack apps and workspaces). Both of these required some subtle breaking changes, so be sure to check the section below.

Custom step functions that return dynamic options need to complete before acknowledging the event, so I've introduced an experimental IEventHandler<T> interface, which provides access to the typed event, the EventCallback, and a manual Acknowledge function. This can be used for any event type though, so you might find it useful outside of custom step functions.

  • Added dynamic credential providers:
    • UseApiTokenProvider for Web API requests.
    • UseAppLevelTokenProvider for app-level API requests.
    • UseSigningSecretProvider and UseVerificationTokenProvider for ASP.NET Core request validation.
  • Added request type, app, workspace and enterprise IDs to SlackRequestContext. API token providers also receive the API method, arguments and originating request.
  • Added experimental context-aware event handlers, with callback metadata and control over acknowledgement.
  • Added support for custom workflow functions:
    • FunctionExecuted event.
    • FunctionsApi.CompleteSuccess and CompleteError.
    • FunctionDistributionPermissionsApi.
    • FunctionWorkflowStepsApi, including form-response exports.
    • WorkflowsFeaturedApi and WorkflowTriggerPermissionsApi.
  • Added function execution data, bot access tokens and interactivity pointers to interaction requests. Block option requests also expose function execution data and bot access tokens.
  • Added interactivity-pointer support to ViewsApi.Open and Push.
  • Added AgentsSessionsApi.SetStatus and AgentSessionStopped.
  • Added chunks, task display mode, icon and username overrides to message streaming. StopStream also supports setting the agent session status.
  • Added TaskCardBlock, PlanBlock, CardBlock, CarouselBlock, ContainerBlock, AlertBlock, DataTableBlock and DataVisualizationBlock, with supporting icons, URL sources and chart types.
  • Added RawNumberCell and RichTextPreformatted.Language.
  • Added AppContextChanged, AppHomeOpened.Context and MessageEvent.AppContext.
  • Added MessageDeleted.PreviousMessage, and UserTeam and SourceTeam to message events.
  • Added MetadataJson and MetadataObject to MessageUpdate.
  • Added BotId and EnterpriseId to AuthTestResponse.
  • Added codeVerifier to OAuthV2Api.Access for PKCE.
  • Added an AssistantThreadsApi.SetSuggestedPrompts overload without a thread timestamp, for the Messages tab.
  • Date-like strings remain strings when deserializing untyped JSON.
  • ASP.NET Core only creates the hosted Socket Mode client when enabled, and cleans up request scopes when handlers fail.

Breaking changes

  • Renamed ISlackApiClient.AppsConnectionsApi to AppsConnections.
  • Removed deprecated configuration from SlackEndpointConfiguration:
    • Move UseSigningSecret, VerifyWith, UseEventUrlVerification and UseSocketMode into the AddSlackNet callback.
    • Pass connection options to UseSocketMode.
    • Keep MapToPrefix and DelayResponse in UseSlackNet. UseSocketMode now returns the service configuration.
  • Removed ISlackRequestValidationConfiguration. Custom validation configuration should use ISlackSigningSecretProvider and/or ISlackVerificationTokenProvider.
  • Configured signing secrets and verification tokens returning null or an empty string now reject requests.
  • ReplaceEventHandling, ISlackHandlerFactory.CreateEventHandler and SlackRequestContext.EventHandlers now use SlackNet.Handlers.Experimental.IEventHandler<Event>. Implement Handle(IEventContext<Event>), or adapt existing handlers with .ToEventHandler(). Existing RegisterEventHandler registrations continue to work.
  • ISlackServiceProvider implementations must provide GetApiTokenProvider() and GetAppLevelTokenProvider().
  • New parameters precede cancellationToken in OAuthV2Api.Access and ChatApi.StartStream, AppendStream and StopStream. Pass cancellation tokens by name, e.g. cancellationToken: token, and rebuild dependent projects.
  • Set SlackRequestContext.RequestId through its initializer; setting the corresponding dictionary entry no longer updates it.
  • Custom API clients must supply their own app-level token for Socket Mode to work.
  • Code relying on automatic date conversion in untyped JSON should parse date strings explicitly.
  • Deprecated trigger-first ViewsApi.Open and Push overloads. Use Open(view, triggerId: triggerId) and Push(view, triggerId: triggerId).
  • Deprecated the SlackApiClient constructor accepting HTTP dependencies and a token string. Use the constructor accepting separate API-token and app-level-token providers.

A big thanks to @enhancer13, @vgribok-aws, and @we4sz for their help with this release 🥳

v0.18.0

Choose a tag to compare

@soxtoby soxtoby released this 01 Sep 11:20
  • More robust connection handling for socket mode - fixes an issue where socket mode could silently stop working after connections failed.

Breaking changes

  • ISlackSocketModeClient and ICoreSocketModeClient:
    • Now extends IAsyncDisposable.
    • Added DisconnectAsync() method.
    • Existing Disconnect() marked as obsolete.

v0.17.11

Choose a tag to compare

@soxtoby soxtoby released this 08 Aug 07:59
  • Added RichTextAttachmentMention element.
  • Added RichTextStyle.Underline.

Thankyou to @AlexanderMakarov124 for this release 🌟

v0.17.10

Choose a tag to compare

@soxtoby soxtoby released this 16 Mar 00:33
  • Added UseSocketMode to config in AddSlackNet callback and deprecated it inside UseSlackNet.

v0.17.9

Choose a tag to compare

@soxtoby soxtoby released this 20 Dec 01:05
  • Removed dependency on Microsoft.Bcl.AsyncInterfaces on .NET 8.
  • Added loadingMessages parameter to AssistantThreadsApi.SetStatus.

Thankyou to @verdie-g for his help with this release 👍

v0.17.8

Choose a tag to compare

@soxtoby soxtoby released this 07 Dec 02:33
  • Added FeedbackButtonsAction and IconButtonAction types.

v0.17.7

Choose a tag to compare

@soxtoby soxtoby released this 01 Dec 00:49
  • Changed Attachment.IsAppUnfurl to a nullable bool to align with other bool properties.

v0.17.6

Choose a tag to compare

@soxtoby soxtoby released this 23 Nov 01:10
  • Added StartStream, AppendStream, and StopStream methods to ChatApi.
  • Added Info method to AssistantSearchApi.
  • Added ToolingApi with RotateToken method.
  • Added support for work objects
    • Added EntityApi with PresentDetails method.
    • Added EntityDetailsRequested event.
    • Added a number of new properties to attachments and interaction requests and containers.
    • Added support for including work object metadata in ChatApi.Unfurl and Chat.PostMessage methods.