Repository navigation
v0.19.0
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:
UseApiTokenProviderfor Web API requests.UseAppLevelTokenProviderfor app-level API requests.UseSigningSecretProviderandUseVerificationTokenProviderfor 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:
FunctionExecutedevent.FunctionsApi.CompleteSuccessandCompleteError.FunctionDistributionPermissionsApi.FunctionWorkflowStepsApi, including form-response exports.WorkflowsFeaturedApiandWorkflowTriggerPermissionsApi.
- 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.OpenandPush. - Added
AgentsSessionsApi.SetStatusandAgentSessionStopped. - Added chunks, task display mode, icon and username overrides to message streaming.
StopStreamalso supports setting the agent session status. - Added
TaskCardBlock,PlanBlock,CardBlock,CarouselBlock,ContainerBlock,AlertBlock,DataTableBlockandDataVisualizationBlock, with supporting icons, URL sources and chart types. - Added
RawNumberCellandRichTextPreformatted.Language. - Added
AppContextChanged,AppHomeOpened.ContextandMessageEvent.AppContext. - Added
MessageDeleted.PreviousMessage, andUserTeamandSourceTeamto message events. - Added
MetadataJsonandMetadataObjecttoMessageUpdate. - Added
BotIdandEnterpriseIdtoAuthTestResponse. - Added
codeVerifiertoOAuthV2Api.Accessfor PKCE. - Added an
AssistantThreadsApi.SetSuggestedPromptsoverload 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.AppsConnectionsApitoAppsConnections. - Removed deprecated configuration from
SlackEndpointConfiguration:- Move
UseSigningSecret,VerifyWith,UseEventUrlVerificationandUseSocketModeinto theAddSlackNetcallback. - Pass connection options to
UseSocketMode. - Keep
MapToPrefixandDelayResponseinUseSlackNet.UseSocketModenow returns the service configuration.
- Move
- Removed
ISlackRequestValidationConfiguration. Custom validation configuration should useISlackSigningSecretProviderand/orISlackVerificationTokenProvider. - Configured signing secrets and verification tokens returning
nullor an empty string now reject requests. ReplaceEventHandling,ISlackHandlerFactory.CreateEventHandlerandSlackRequestContext.EventHandlersnow useSlackNet.Handlers.Experimental.IEventHandler<Event>. ImplementHandle(IEventContext<Event>), or adapt existing handlers with.ToEventHandler(). ExistingRegisterEventHandlerregistrations continue to work.ISlackServiceProviderimplementations must provideGetApiTokenProvider()andGetAppLevelTokenProvider().- New parameters precede
cancellationTokeninOAuthV2Api.AccessandChatApi.StartStream,AppendStreamandStopStream. Pass cancellation tokens by name, e.g.cancellationToken: token, and rebuild dependent projects. - Set
SlackRequestContext.RequestIdthrough 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.OpenandPushoverloads. UseOpen(view, triggerId: triggerId)andPush(view, triggerId: triggerId). - Deprecated the
SlackApiClientconstructor 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 🥳