From e3c223ebac307bb8cb1b05017969443ff25657e2 Mon Sep 17 00:00:00 2001 From: William Bergamin Date: Wed, 14 Oct 2026 13:33:06 -0400 Subject: [PATCH 1/4] feat: add the user_connections feature to the app manifest types --- .changeset/manifest-user-connections.md | 5 ++ .../web-api/src/types/request/manifest.ts | 15 ++++++ .../web-api/test/types/methods/apps.test-d.ts | 53 +++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 .changeset/manifest-user-connections.md diff --git a/.changeset/manifest-user-connections.md b/.changeset/manifest-user-connections.md new file mode 100644 index 000000000..f78962638 --- /dev/null +++ b/.changeset/manifest-user-connections.md @@ -0,0 +1,5 @@ +--- +"@slack/web-api": minor +--- + +feat: add the `user_connections` feature (`is_enabled`, `auth_hosts`) to the app manifest types diff --git a/packages/web-api/src/types/request/manifest.ts b/packages/web-api/src/types/request/manifest.ts index 05bb110a8..d8f7b6122 100644 --- a/packages/web-api/src/types/request/manifest.ts +++ b/packages/web-api/src/types/request/manifest.ts @@ -83,6 +83,11 @@ interface ManifestFeatures { * @see {@link https://docs.slack.dev/messaging/unfurling-links-in-messages Link unfurling: configuring domains}. */ unfurl_domains?: string[]; + /** + * @description A subgroup of settings that opt the app into the standardized user connection flow, where users + * connect the app to an account on an external provider. + */ + user_connections?: ManifestUserConnections; } interface ManifestAgentView { @@ -189,6 +194,16 @@ interface ManifestSlashCommand { usage_hint?: string; } +interface ManifestUserConnections { + /** @description Whether the user connection flow is enabled for the app. */ + is_enabled: boolean; + /** + * @description An array of hosts, without a scheme, that the provider's `auth_url` and `disconnect_url` may use. + * Subdomains of a listed host are also allowed. Between 1 and 25 hosts can be included in this array. + */ + auth_hosts: string[]; +} + interface ManifestOAuthConfig { /** * @description An array of strings containing {@link https://docs.slack.dev/authentication/installing-with-oauth OAuth redirect URLs}. diff --git a/packages/web-api/test/types/methods/apps.test-d.ts b/packages/web-api/test/types/methods/apps.test-d.ts index 3260a3c61..31eca1731 100644 --- a/packages/web-api/test/types/methods/apps.test-d.ts +++ b/packages/web-api/test/types/methods/apps.test-d.ts @@ -24,6 +24,32 @@ expectAssignable>([ // -- sad path expectError(web.apps.manifest.create()); // lacking argument expectError(web.apps.manifest.create({})); // empty argument +expectError( + web.apps.manifest.create({ + manifest: { + display_information: { name: 'Connector' }, + features: { + user_connections: { + // missing is_enabled + auth_hosts: ['example.com'], + }, + }, + }, + }), +); +expectError( + web.apps.manifest.create({ + manifest: { + display_information: { name: 'Connector' }, + features: { + user_connections: { + // missing auth_hosts + is_enabled: true, + }, + }, + }, + }), +); expectError( web.apps.manifest.create({ manifest: { @@ -75,6 +101,33 @@ expectAssignable>([ }, }, ]); +// -- happy path: user_connections +expectAssignable>([ + { + manifest: { + display_information: { name: 'Connector' }, + features: { + user_connections: { + is_enabled: true, + auth_hosts: ['example.com', 'auth.example.com'], + }, + }, + }, + }, +]); +expectAssignable>([ + { + manifest: { + display_information: { name: 'Connector' }, + features: { + user_connections: { + is_enabled: false, + auth_hosts: ['example.com'], + }, + }, + }, + }, +]); // apps.manifest.delete // -- sad path From 42c09761e7044228a4bb2a47e56d09bbb1b28a18 Mon Sep 17 00:00:00 2001 From: William Bergamin Date: Thu, 22 Oct 2026 17:36:30 -0400 Subject: [PATCH 2/4] docs(web-api): align user_connections manifest comments with the docs Use the house style for manifest descriptions and the public feature name, standardized app authentication, with a link to its docs page. Drop the host count limit so the comment can't drift from what Slack validates. Co-Authored-By: Claude --- packages/web-api/src/types/request/manifest.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/web-api/src/types/request/manifest.ts b/packages/web-api/src/types/request/manifest.ts index d8f7b6122..6e27ff822 100644 --- a/packages/web-api/src/types/request/manifest.ts +++ b/packages/web-api/src/types/request/manifest.ts @@ -84,8 +84,8 @@ interface ManifestFeatures { */ unfurl_domains?: string[]; /** - * @description A subgroup of settings that opt the app into the standardized user connection flow, where users - * connect the app to an account on an external provider. + * @description A subgroup of settings that describe {@link https://docs.slack.dev/authentication/standardized-auth standardized app authentication} + * configuration. */ user_connections?: ManifestUserConnections; } @@ -195,11 +195,11 @@ interface ManifestSlashCommand { } interface ManifestUserConnections { - /** @description Whether the user connection flow is enabled for the app. */ + /** @description A boolean that specifies whether or not standardized app authentication is enabled for the app. */ is_enabled: boolean; /** - * @description An array of hosts, without a scheme, that the provider's `auth_url` and `disconnect_url` may use. - * Subdomains of a listed host are also allowed. Between 1 and 25 hosts can be included in this array. + * @description An array of strings containing the hosts, without a scheme, that a provider's `auth_url` and + * `disconnect_url` may use. Subdomains of a listed host are also allowed. */ auth_hosts: string[]; } From 8192c7c9ae707fa1dad7efe3e4612cdb156f72af Mon Sep 17 00:00:00 2001 From: William Bergamin Date: Fri, 23 Oct 2026 09:47:25 -0400 Subject: [PATCH 3/4] feat(web-api): add the user_connection events to the manifest event types Slack now requires an app with features.user_connections enabled to subscribe to user_connection and user_connection_status_requested, but ManifestEvent listed neither, so a valid manifest failed to type-check. The doc comments note that requirement and that auth_hosts are kept while is_enabled is false. Co-Authored-By: Claude --- .changeset/manifest-user-connections.md | 2 +- packages/web-api/src/types/request/manifest.ts | 8 ++++++-- packages/web-api/test/types/methods/apps.test-d.ts | 6 ++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.changeset/manifest-user-connections.md b/.changeset/manifest-user-connections.md index f78962638..27ad8bedf 100644 --- a/.changeset/manifest-user-connections.md +++ b/.changeset/manifest-user-connections.md @@ -2,4 +2,4 @@ "@slack/web-api": minor --- -feat: add the `user_connections` feature (`is_enabled`, `auth_hosts`) to the app manifest types +feat: add the `user_connections` feature (`is_enabled`, `auth_hosts`) and the `user_connection` and `user_connection_status_requested` events to the app manifest types diff --git a/packages/web-api/src/types/request/manifest.ts b/packages/web-api/src/types/request/manifest.ts index 725b6aee6..13db82684 100644 --- a/packages/web-api/src/types/request/manifest.ts +++ b/packages/web-api/src/types/request/manifest.ts @@ -85,7 +85,8 @@ interface ManifestFeatures { unfurl_domains?: string[]; /** * @description A subgroup of settings that describe {@link https://docs.slack.dev/authentication/standardized-auth standardized app authentication} - * configuration. + * configuration. When enabled, the app must subscribe to the `user_connection` and + * `user_connection_status_requested` events, and have an interactivity request URL or Socket Mode enabled. */ user_connections?: ManifestUserConnections; } @@ -199,7 +200,8 @@ interface ManifestUserConnections { is_enabled: boolean; /** * @description An array of strings containing the hosts, without a scheme, that a provider's `auth_url` and - * `disconnect_url` may use. Subdomains of a listed host are also allowed. + * `disconnect_url` may use. Subdomains of a listed host are also allowed. The hosts are kept while `is_enabled` is + * false, so turning standardized app authentication off only flips `is_enabled`. */ auth_hosts: string[]; } @@ -619,6 +621,8 @@ type ManifestEvent = | 'tokens_revoked' | 'url_verification' | 'user_change' + | 'user_connection' + | 'user_connection_status_requested' | 'user_huddle_changed' | 'user_profile_changed' | 'user_resource_denied' diff --git a/packages/web-api/test/types/methods/apps.test-d.ts b/packages/web-api/test/types/methods/apps.test-d.ts index 7b7f427f2..a715bf0e4 100644 --- a/packages/web-api/test/types/methods/apps.test-d.ts +++ b/packages/web-api/test/types/methods/apps.test-d.ts @@ -112,6 +112,12 @@ expectAssignable>([ auth_hosts: ['example.com', 'auth.example.com'], }, }, + settings: { + event_subscriptions: { + bot_events: ['user_connection', 'user_connection_status_requested'], + }, + socket_mode_enabled: true, + }, }, }, ]); From f5463ea8be338f1c21fde36b3dd1c27425d7f453 Mon Sep 17 00:00:00 2001 From: William Bergamin Date: Fri, 23 Oct 2026 09:58:19 -0400 Subject: [PATCH 4/4] docs(web-api): leave the user_connections event requirement to Slack Slack's manifest validation enforces the user_connection and user_connection_status_requested subscriptions and the interactivity or Socket Mode requirement, so restating them in the comment could drift. Co-Authored-By: Claude --- packages/web-api/src/types/request/manifest.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/web-api/src/types/request/manifest.ts b/packages/web-api/src/types/request/manifest.ts index 13db82684..b52ea290d 100644 --- a/packages/web-api/src/types/request/manifest.ts +++ b/packages/web-api/src/types/request/manifest.ts @@ -85,8 +85,7 @@ interface ManifestFeatures { unfurl_domains?: string[]; /** * @description A subgroup of settings that describe {@link https://docs.slack.dev/authentication/standardized-auth standardized app authentication} - * configuration. When enabled, the app must subscribe to the `user_connection` and - * `user_connection_status_requested` events, and have an interactivity request URL or Socket Mode enabled. + * configuration. */ user_connections?: ManifestUserConnections; }