From 15dd16fc698375ae1d67d8895e4ddb36cdf19d4f Mon Sep 17 00:00:00 2001 From: William Bergamin Date: Wed, 4 Mar 2026 17:04:18 -0500 Subject: [PATCH 1/3] feat: add support for apps.user.connection.update --- packages/web-api/src/methods.ts | 14 ++++++++++ packages/web-api/src/types/request/apps.ts | 8 ++++++ packages/web-api/src/types/request/index.ts | 1 + .../AppsUserConnectionUpdateResponse.ts | 17 +++++++++++ packages/web-api/src/types/response/index.ts | 1 + .../web-api/test/types/methods/apps.test-d.ts | 28 +++++++++++++++++++ 6 files changed, 69 insertions(+) create mode 100644 packages/web-api/src/types/response/AppsUserConnectionUpdateResponse.ts diff --git a/packages/web-api/src/methods.ts b/packages/web-api/src/methods.ts index b02e5dd7a..d6e584d9e 100644 --- a/packages/web-api/src/methods.ts +++ b/packages/web-api/src/methods.ts @@ -106,6 +106,7 @@ import type { AppsManifestUpdateArguments, AppsManifestValidateArguments, AppsUninstallArguments, + AppsUserConnectionUpdateArguments, AssistantThreadsSetStatusArguments, AssistantThreadsSetSuggestedPromptsArguments, AssistantThreadsSetTitleArguments, @@ -379,6 +380,7 @@ import type { AppsManifestUpdateResponse, AppsManifestValidateResponse, AppsUninstallResponse, + AppsUserConnectionUpdateResponse, AssistantThreadsSetStatusResponse, AssistantThreadsSetSuggestedPromptsResponse, AssistantThreadsSetTitleResponse, @@ -1469,6 +1471,18 @@ export abstract class Methods extends EventEmitter { * @see {@link https://docs.slack.dev/reference/methods/apps.uninstall `apps.uninstall` API reference}. */ uninstall: bindApiCall(this, 'apps.uninstall'), + user: { + connection: { + /** + * @description Updates the connection status between a user and an app. + * @see {@link https://docs.slack.dev/reference/methods/apps.user.connection.update `apps.user.connection.update` API reference}. + */ + update: bindApiCall( + this, + 'apps.user.connection.update', + ), + }, + }, }; public readonly auth = { diff --git a/packages/web-api/src/types/request/apps.ts b/packages/web-api/src/types/request/apps.ts index 47a97b36f..7c0e063e6 100644 --- a/packages/web-api/src/types/request/apps.ts +++ b/packages/web-api/src/types/request/apps.ts @@ -32,6 +32,14 @@ export interface AppsManifestValidateArguments extends Partial, TokenOver manifest: Manifest; } +// https://docs.slack.dev/reference/methods/apps.user.connection.update +export interface AppsUserConnectionUpdateArguments extends TokenOverridable { + /** @description The identifier for the user receiving the status update. */ + user_id: string; + /** @description The connection status value to assign to the user. `connected` or `disconnected`. */ + status: string; +} + // https://docs.slack.dev/reference/methods/apps.uninstall export interface AppsUninstallArguments extends Pick, diff --git a/packages/web-api/src/types/request/index.ts b/packages/web-api/src/types/request/index.ts index ebd44bd2f..fb387f1d4 100644 --- a/packages/web-api/src/types/request/index.ts +++ b/packages/web-api/src/types/request/index.ts @@ -127,6 +127,7 @@ export type { AppsManifestUpdateArguments, AppsManifestValidateArguments, AppsUninstallArguments, + AppsUserConnectionUpdateArguments, } from './apps'; export type { AssistantThreadsSetStatusArguments, diff --git a/packages/web-api/src/types/response/AppsUserConnectionUpdateResponse.ts b/packages/web-api/src/types/response/AppsUserConnectionUpdateResponse.ts new file mode 100644 index 000000000..8e26b98b4 --- /dev/null +++ b/packages/web-api/src/types/response/AppsUserConnectionUpdateResponse.ts @@ -0,0 +1,17 @@ +///////////////////////////////////////////////////////////////////////////////////////// +// // +// !!! DO NOT EDIT THIS FILE !!! // +// // +// This file is auto-generated by scripts/generate-web-api-types.sh in the repository. // +// Please refer to the script code to learn how to update the source data. // +// // +///////////////////////////////////////////////////////////////////////////////////////// + +import type { WebAPICallResult } from '../../WebClient'; +export type AppsUserConnectionUpdateResponse = WebAPICallResult & { + error?: string; + needed?: string; + ok?: boolean; + provided?: string; + warning?: string; +}; diff --git a/packages/web-api/src/types/response/index.ts b/packages/web-api/src/types/response/index.ts index 433659455..e1c324253 100644 --- a/packages/web-api/src/types/response/index.ts +++ b/packages/web-api/src/types/response/index.ts @@ -116,6 +116,7 @@ export { AppsPermissionsScopesListResponse } from './AppsPermissionsScopesListRe export { AppsPermissionsUsersListResponse } from './AppsPermissionsUsersListResponse'; export { AppsPermissionsUsersRequestResponse } from './AppsPermissionsUsersRequestResponse'; export { AppsUninstallResponse } from './AppsUninstallResponse'; +export { AppsUserConnectionUpdateResponse } from './AppsUserConnectionUpdateResponse'; export { AssistantThreadsSetStatusResponse } from './AssistantThreadsSetStatusResponse'; export { AssistantThreadsSetSuggestedPromptsResponse } from './AssistantThreadsSetSuggestedPromptsResponse'; export { AssistantThreadsSetTitleResponse } from './AssistantThreadsSetTitleResponse'; 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 a59b9cdc8..8c9a38189 100644 --- a/packages/web-api/test/types/methods/apps.test-d.ts +++ b/packages/web-api/test/types/methods/apps.test-d.ts @@ -103,6 +103,34 @@ expectAssignable>([ }, ]); +// apps.user.connection.update +// -- sad path +expectError(web.apps.user.connection.update()); // lacking argument +expectError(web.apps.user.connection.update({})); // empty argument +expectError( + web.apps.user.connection.update({ + user_id: 'U1234', // missing status + }), +); +expectError( + web.apps.user.connection.update({ + status: 'connected', // missing user_id + }), +); +// -- happy path +expectAssignable>([ + { + user_id: 'U1234', + status: 'connected', + }, +]); +expectAssignable>([ + { + user_id: 'U1234', + status: 'disconnected', + }, +]); + // apps.uninstall // -- sad path expectError(web.apps.uninstall()); // lacking argument From a3993df3e4b874b18aabc06c1de45bfa78ab0d03 Mon Sep 17 00:00:00 2001 From: William Bergamin Date: Wed, 4 Mar 2026 17:21:55 -0500 Subject: [PATCH 2/3] Add a changeset --- .changeset/grumpy-jobs-poke.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/grumpy-jobs-poke.md diff --git a/.changeset/grumpy-jobs-poke.md b/.changeset/grumpy-jobs-poke.md new file mode 100644 index 000000000..0a1f2a4f8 --- /dev/null +++ b/.changeset/grumpy-jobs-poke.md @@ -0,0 +1,5 @@ +--- +"@slack/web-api": minor +--- + +Add support for the `apps.user.connection.update` API method From 401fd25ae05b9c1a741221192ee2966e75bc1fc2 Mon Sep 17 00:00:00 2001 From: William Bergamin Date: Thu, 5 Mar 2026 09:49:35 -0500 Subject: [PATCH 3/3] conventional commit format for changeset --- .changeset/grumpy-jobs-poke.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/grumpy-jobs-poke.md b/.changeset/grumpy-jobs-poke.md index 0a1f2a4f8..e1add0dd0 100644 --- a/.changeset/grumpy-jobs-poke.md +++ b/.changeset/grumpy-jobs-poke.md @@ -2,4 +2,4 @@ "@slack/web-api": minor --- -Add support for the `apps.user.connection.update` API method +feat: add support for apps.user.connection.update