From 344a6f7893bae19ed0f05195bd53012a773596d8 Mon Sep 17 00:00:00 2001 From: Ale Mercado Date: Thu, 30 Oct 2025 15:42:14 -0600 Subject: [PATCH 01/23] feat: add slacklists.create method --- packages/web-api/src/methods.ts | 10 ++++++++++ packages/web-api/src/types/request/index.ts | 1 + .../web-api/src/types/request/slacklists.ts | 12 ++++++++++++ .../types/response/SlackListsCreateResponse.ts | 10 ++++++++++ packages/web-api/src/types/response/index.ts | 1 + .../test/types/methods/slacklists.test-d.ts | 17 +++++++++++++++++ 6 files changed, 51 insertions(+) create mode 100644 packages/web-api/src/types/request/slacklists.ts create mode 100644 packages/web-api/src/types/response/SlackListsCreateResponse.ts create mode 100644 packages/web-api/test/types/methods/slacklists.test-d.ts diff --git a/packages/web-api/src/methods.ts b/packages/web-api/src/methods.ts index 2ca69ee44..e88a33105 100644 --- a/packages/web-api/src/methods.ts +++ b/packages/web-api/src/methods.ts @@ -219,6 +219,7 @@ import type { SearchAllArguments, SearchFilesArguments, SearchMessagesArguments, + SlackListsCreateArguments, StarsAddRemoveArguments, StarsListArguments, TeamAccessLogsArguments, @@ -479,6 +480,7 @@ import type { SearchAllResponse, SearchFilesResponse, SearchMessagesResponse, + SlackListsCreateResponse, StarsAddResponse, StarsListResponse, StarsRemoveResponse, @@ -2173,6 +2175,14 @@ export abstract class Methods extends EventEmitter { messages: bindApiCall(this, 'search.messages'), }; + public readonly slacklists = { + /** + * @description Create a List. + * @see {@link https://docs.slack.dev/reference/methods/slacklists.create slackLists.create` API reference + */ + create: bindApiCall(this, 'slackLists.create'), + }; + public readonly team = { /** * @description Gets the access logs for the current team. diff --git a/packages/web-api/src/types/request/index.ts b/packages/web-api/src/types/request/index.ts index 5066143e8..cd84147ec 100644 --- a/packages/web-api/src/types/request/index.ts +++ b/packages/web-api/src/types/request/index.ts @@ -275,6 +275,7 @@ export type { SearchFilesArguments, SearchMessagesArguments, } from './search'; +export type { SlackListsCreateArguments } from './slacklists'; export type { StarsAddRemoveArguments, StarsListArguments, diff --git a/packages/web-api/src/types/request/slacklists.ts b/packages/web-api/src/types/request/slacklists.ts new file mode 100644 index 000000000..e0f2ffbeb --- /dev/null +++ b/packages/web-api/src/types/request/slacklists.ts @@ -0,0 +1,12 @@ +import type { Block, KnownBlock } from '@slack/types'; + +import type { TokenOverridable } from './common'; + +export interface SlackListsCreateArguments extends TokenOverridable { + name: string; + description_blocks?: Array>; + schema?: Array>; + copy_from_list_id?: string; + include_copied_list_records?: boolean; + todo_mode?: boolean; +} diff --git a/packages/web-api/src/types/response/SlackListsCreateResponse.ts b/packages/web-api/src/types/response/SlackListsCreateResponse.ts new file mode 100644 index 000000000..4a3b88100 --- /dev/null +++ b/packages/web-api/src/types/response/SlackListsCreateResponse.ts @@ -0,0 +1,10 @@ +import type { WebAPICallResult } from '../../WebClient'; + +export type SlackListsCreateResponse = WebAPICallResult & { + channel?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; + ts?: string; +}; diff --git a/packages/web-api/src/types/response/index.ts b/packages/web-api/src/types/response/index.ts index 210a6e374..f49323c38 100644 --- a/packages/web-api/src/types/response/index.ts +++ b/packages/web-api/src/types/response/index.ts @@ -275,6 +275,7 @@ export { RtmStartResponse } from './RtmStartResponse'; export { SearchAllResponse } from './SearchAllResponse'; export { SearchFilesResponse } from './SearchFilesResponse'; export { SearchMessagesResponse } from './SearchMessagesResponse'; +export { SlackListsCreateResponse } from './SlackListsCreateResponse'; export { StarsAddResponse } from './StarsAddResponse'; export { StarsListResponse } from './StarsListResponse'; export { StarsRemoveResponse } from './StarsRemoveResponse'; diff --git a/packages/web-api/test/types/methods/slacklists.test-d.ts b/packages/web-api/test/types/methods/slacklists.test-d.ts new file mode 100644 index 000000000..43916c180 --- /dev/null +++ b/packages/web-api/test/types/methods/slacklists.test-d.ts @@ -0,0 +1,17 @@ +import { expectAssignable, expectError } from 'tsd'; + +import { WebClient } from '../../../src/WebClient'; + +const web = new WebClient('TOKEN'); + +// slackLists.create +// -- sad path +expectError(web.slacklists.create()); // lacking argument +expectError(web.slacklists.create({})); // missing name + +// -- happy path +expectAssignable>([ + { + name: 'Backlog', + }, +]); From 978d804456199facd4d9d48d8853a59d16a4732b Mon Sep 17 00:00:00 2001 From: Maria Alejandra <104795114+srtaalej@users.noreply.github.com> Date: Tue, 11 Nov 2025 18:19:21 -0500 Subject: [PATCH 02/23] Update packages/web-api/src/methods.ts Co-authored-by: Eden Zimbelman --- packages/web-api/src/methods.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web-api/src/methods.ts b/packages/web-api/src/methods.ts index e88a33105..c8dd282ae 100644 --- a/packages/web-api/src/methods.ts +++ b/packages/web-api/src/methods.ts @@ -2175,7 +2175,7 @@ export abstract class Methods extends EventEmitter { messages: bindApiCall(this, 'search.messages'), }; - public readonly slacklists = { + public readonly slackLists = { /** * @description Create a List. * @see {@link https://docs.slack.dev/reference/methods/slacklists.create slackLists.create` API reference From a9b6e48288c4ffa207e9fd0109f4366be187097c Mon Sep 17 00:00:00 2001 From: Maria Alejandra <104795114+srtaalej@users.noreply.github.com> Date: Tue, 11 Nov 2025 18:19:31 -0500 Subject: [PATCH 03/23] Update packages/web-api/src/methods.ts Co-authored-by: Eden Zimbelman --- packages/web-api/src/methods.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web-api/src/methods.ts b/packages/web-api/src/methods.ts index c8dd282ae..c6bfebee0 100644 --- a/packages/web-api/src/methods.ts +++ b/packages/web-api/src/methods.ts @@ -2178,7 +2178,7 @@ export abstract class Methods extends EventEmitter { public readonly slackLists = { /** * @description Create a List. - * @see {@link https://docs.slack.dev/reference/methods/slacklists.create slackLists.create` API reference + * @see {@link https://docs.slack.dev/reference/methods/slackLists.create `slackLists.create` API reference}. */ create: bindApiCall(this, 'slackLists.create'), }; From a0a0cd61e875394ef508105965e0e61d70c1646c Mon Sep 17 00:00:00 2001 From: Maria Alejandra <104795114+srtaalej@users.noreply.github.com> Date: Tue, 11 Nov 2025 18:19:46 -0500 Subject: [PATCH 04/23] Update packages/web-api/src/types/request/slacklists.ts Co-authored-by: Eden Zimbelman --- packages/web-api/src/types/request/slacklists.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/web-api/src/types/request/slacklists.ts b/packages/web-api/src/types/request/slacklists.ts index e0f2ffbeb..7718983e2 100644 --- a/packages/web-api/src/types/request/slacklists.ts +++ b/packages/web-api/src/types/request/slacklists.ts @@ -2,6 +2,7 @@ import type { Block, KnownBlock } from '@slack/types'; import type { TokenOverridable } from './common'; +// https://docs.slack.dev/reference/methods/slackLists.create export interface SlackListsCreateArguments extends TokenOverridable { name: string; description_blocks?: Array>; From 03cbe0c111a58ada31346877a43f5dfe6ca705f7 Mon Sep 17 00:00:00 2001 From: Maria Alejandra <104795114+srtaalej@users.noreply.github.com> Date: Wed, 12 Nov 2025 13:44:01 -0500 Subject: [PATCH 05/23] Update packages/web-api/src/types/request/slacklists.ts Co-authored-by: Eden Zimbelman --- packages/web-api/src/types/request/slacklists.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web-api/src/types/request/slacklists.ts b/packages/web-api/src/types/request/slacklists.ts index 7718983e2..7d8a8fc65 100644 --- a/packages/web-api/src/types/request/slacklists.ts +++ b/packages/web-api/src/types/request/slacklists.ts @@ -5,7 +5,7 @@ import type { TokenOverridable } from './common'; // https://docs.slack.dev/reference/methods/slackLists.create export interface SlackListsCreateArguments extends TokenOverridable { name: string; - description_blocks?: Array>; + description_blocks?: Array; schema?: Array>; copy_from_list_id?: string; include_copied_list_records?: boolean; From 1b533e40b6ad4c3623a61c735a8798a473b5c9d9 Mon Sep 17 00:00:00 2001 From: Maria Alejandra <104795114+srtaalej@users.noreply.github.com> Date: Wed, 12 Nov 2025 13:44:49 -0500 Subject: [PATCH 06/23] Update packages/web-api/src/types/request/slacklists.ts Co-authored-by: Eden Zimbelman --- packages/web-api/src/types/request/slacklists.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web-api/src/types/request/slacklists.ts b/packages/web-api/src/types/request/slacklists.ts index 7d8a8fc65..714a7631c 100644 --- a/packages/web-api/src/types/request/slacklists.ts +++ b/packages/web-api/src/types/request/slacklists.ts @@ -6,7 +6,7 @@ import type { TokenOverridable } from './common'; export interface SlackListsCreateArguments extends TokenOverridable { name: string; description_blocks?: Array; - schema?: Array>; + schema?: Array>; copy_from_list_id?: string; include_copied_list_records?: boolean; todo_mode?: boolean; From df7fd7c60b531973b0a3d182dd71eea678e19e67 Mon Sep 17 00:00:00 2001 From: Ale Mercado Date: Wed, 12 Nov 2025 15:33:28 -0500 Subject: [PATCH 07/23] fix: type errors on description block and match method name to docs --- packages/web-api/src/types/request/slacklists.ts | 2 +- packages/web-api/test/types/methods/slacklists.test-d.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/web-api/src/types/request/slacklists.ts b/packages/web-api/src/types/request/slacklists.ts index 714a7631c..c1011a59c 100644 --- a/packages/web-api/src/types/request/slacklists.ts +++ b/packages/web-api/src/types/request/slacklists.ts @@ -1,4 +1,4 @@ -import type { Block, KnownBlock } from '@slack/types'; +import type { RichTextBlock } from '@slack/types'; import type { TokenOverridable } from './common'; diff --git a/packages/web-api/test/types/methods/slacklists.test-d.ts b/packages/web-api/test/types/methods/slacklists.test-d.ts index 43916c180..90f6b413b 100644 --- a/packages/web-api/test/types/methods/slacklists.test-d.ts +++ b/packages/web-api/test/types/methods/slacklists.test-d.ts @@ -6,11 +6,11 @@ const web = new WebClient('TOKEN'); // slackLists.create // -- sad path -expectError(web.slacklists.create()); // lacking argument -expectError(web.slacklists.create({})); // missing name +expectError(web.slackLists.create()); // lacking argument +expectError(web.slackLists.create({})); // missing name // -- happy path -expectAssignable>([ +expectAssignable>([ { name: 'Backlog', }, From eb931b1457784e053a19db1104e0961920b46a7b Mon Sep 17 00:00:00 2001 From: Ale Mercado Date: Thu, 13 Nov 2025 12:20:57 -0500 Subject: [PATCH 08/23] feat: remaining slack lists methods --- packages/web-api/src/methods.ts | 101 ++++++++++++ packages/web-api/src/types/request/index.ts | 2 +- .../web-api/src/types/request/slacklists.ts | 76 +++++++++ .../SlackListsAccessDeleteResponse.ts | 10 ++ .../response/SlackListsAccessSetResponse.ts | 10 ++ .../response/SlackListsDownloadGetResponse.ts | 10 ++ .../SlackListsDownloadStartResponse.ts | 10 ++ .../response/SlackListsItemsCreateResponse.ts | 10 ++ .../SlackListsItemsDeleteMultipleResponse.ts | 10 ++ .../response/SlackListsItemsDeleteResponse.ts | 10 ++ .../response/SlackListsItemsInfoResponse.ts | 10 ++ .../response/SlackListsItemsListResponse.ts | 10 ++ .../response/SlackListsItemsUpdateResponse.ts | 10 ++ .../response/SlackListsUpdateResponse.ts | 10 ++ packages/web-api/src/types/response/index.ts | 11 ++ .../test/types/methods/slacklists.test-d.ts | 144 ++++++++++++++++++ 16 files changed, 443 insertions(+), 1 deletion(-) create mode 100644 packages/web-api/src/types/response/SlackListsAccessDeleteResponse.ts create mode 100644 packages/web-api/src/types/response/SlackListsAccessSetResponse.ts create mode 100644 packages/web-api/src/types/response/SlackListsDownloadGetResponse.ts create mode 100644 packages/web-api/src/types/response/SlackListsDownloadStartResponse.ts create mode 100644 packages/web-api/src/types/response/SlackListsItemsCreateResponse.ts create mode 100644 packages/web-api/src/types/response/SlackListsItemsDeleteMultipleResponse.ts create mode 100644 packages/web-api/src/types/response/SlackListsItemsDeleteResponse.ts create mode 100644 packages/web-api/src/types/response/SlackListsItemsInfoResponse.ts create mode 100644 packages/web-api/src/types/response/SlackListsItemsListResponse.ts create mode 100644 packages/web-api/src/types/response/SlackListsItemsUpdateResponse.ts create mode 100644 packages/web-api/src/types/response/SlackListsUpdateResponse.ts diff --git a/packages/web-api/src/methods.ts b/packages/web-api/src/methods.ts index c6bfebee0..c6d60f884 100644 --- a/packages/web-api/src/methods.ts +++ b/packages/web-api/src/methods.ts @@ -219,7 +219,18 @@ import type { SearchAllArguments, SearchFilesArguments, SearchMessagesArguments, + SlackListsAccessDeleteArguments, + SlackListsAccessSetArguments, SlackListsCreateArguments, + SlackListsDownloadGetArguments, + SlackListsDownloadStartArguments, + SlackListsItemsCreateArguments, + SlackListsItemsDeleteArguments, + SlackListsItemsDeleteMultipleArguments, + SlackListsItemsInfoArguments, + SlackListsItemsListArguments, + SlackListsItemsUpdateArguments, + SlackListsUpdateArguments, StarsAddRemoveArguments, StarsListArguments, TeamAccessLogsArguments, @@ -480,7 +491,18 @@ import type { SearchAllResponse, SearchFilesResponse, SearchMessagesResponse, + SlackListsAccessDeleteResponse, + SlackListsAccessSetResponse, SlackListsCreateResponse, + SlackListsDownloadGetResponse, + SlackListsDownloadStartResponse, + SlackListsItemsCreateResponse, + SlackListsItemsDeleteMultipleResponse, + SlackListsItemsDeleteResponse, + SlackListsItemsInfoResponse, + SlackListsItemsListResponse, + SlackListsItemsUpdateResponse, + SlackListsUpdateResponse, StarsAddResponse, StarsListResponse, StarsRemoveResponse, @@ -2176,11 +2198,90 @@ export abstract class Methods extends EventEmitter { }; public readonly slackLists = { + access: { + /** + * @description Delete access for specified entities. + * @see {@link https://docs.slack.dev/reference/methods/slackLists.access.delete `slackLists.access.delete` API reference}. + */ + delete: bindApiCall( + this, + 'slackLists.access.delete', + ), + /** + * @description Set access level for specified entities. + * @see {@link https://docs.slack.dev/reference/methods/slackLists.access.set `slackLists.access.set` API reference}. + */ + set: bindApiCall(this, 'slackLists.access.set'), + }, /** * @description Create a List. * @see {@link https://docs.slack.dev/reference/methods/slackLists.create `slackLists.create` API reference}. */ create: bindApiCall(this, 'slackLists.create'), + download: { + /** + * @description Get download job status. + * @see {@link https://docs.slack.dev/reference/methods/slackLists.download.get `slackLists.download.get` API reference}. + */ + get: bindApiCall(this, 'slackLists.download.get'), + /** + * @description Start a download job for a list. + * @see {@link https://docs.slack.dev/reference/methods/slackLists.download.start `slackLists.download.start` API reference}. + */ + start: bindApiCall( + this, + 'slackLists.download.start', + ), + }, + items: { + /** + * @description Create a list item. + * @see {@link https://docs.slack.dev/reference/methods/slackLists.items.create `slackLists.items.create` API reference}. + */ + create: bindApiCall( + this, + 'slackLists.items.create', + ), + /** + * @description Delete a list item. + * @see {@link https://docs.slack.dev/reference/methods/slackLists.items.delete `slackLists.items.delete` API reference}. + */ + delete: bindApiCall( + this, + 'slackLists.items.delete', + ), + /** + * @description Delete multiple list items. + * @see {@link https://docs.slack.dev/reference/methods/slackLists.items.deleteMultiple `slackLists.items.deleteMultiple` API reference}. + */ + deleteMultiple: bindApiCall( + this, + 'slackLists.items.deleteMultiple', + ), + /** + * @description Get info about a list item. + * @see {@link https://docs.slack.dev/reference/methods/slackLists.items.info `slackLists.items.info` API reference}. + */ + info: bindApiCall(this, 'slackLists.items.info'), + /** + * @description List items in a list. + * @see {@link https://docs.slack.dev/reference/methods/slackLists.items.list `slackLists.items.list` API reference}. + */ + list: bindApiCall(this, 'slackLists.items.list'), + /** + * @description Update a list item. + * @see {@link https://docs.slack.dev/reference/methods/slackLists.items.update `slackLists.items.update` API reference}. + */ + update: bindApiCall( + this, + 'slackLists.items.update', + ), + }, + /** + * @description Update a list. + * @see {@link https://docs.slack.dev/reference/methods/slackLists.update `slackLists.update` API reference}. + */ + update: bindApiCall(this, 'slackLists.update'), }; public readonly team = { diff --git a/packages/web-api/src/types/request/index.ts b/packages/web-api/src/types/request/index.ts index cd84147ec..d92008425 100644 --- a/packages/web-api/src/types/request/index.ts +++ b/packages/web-api/src/types/request/index.ts @@ -275,7 +275,7 @@ export type { SearchFilesArguments, SearchMessagesArguments, } from './search'; -export type { SlackListsCreateArguments } from './slacklists'; +export type { SlackListsAccessDeleteArguments, SlackListsAccessSetArguments, SlackListsCreateArguments, SlackListsDownloadGetArguments, SlackListsDownloadStartArguments, SlackListsItemsCreateArguments, SlackListsItemsDeleteArguments, SlackListsItemsDeleteMultipleArguments, SlackListsItemsInfoArguments, SlackListsItemsListArguments, SlackListsItemsUpdateArguments, SlackListsUpdateArguments } from './slacklists'; export type { StarsAddRemoveArguments, StarsListArguments, diff --git a/packages/web-api/src/types/request/slacklists.ts b/packages/web-api/src/types/request/slacklists.ts index c1011a59c..548bd5240 100644 --- a/packages/web-api/src/types/request/slacklists.ts +++ b/packages/web-api/src/types/request/slacklists.ts @@ -2,6 +2,21 @@ import type { RichTextBlock } from '@slack/types'; import type { TokenOverridable } from './common'; +// https://docs.slack.dev/reference/methods/slackLists.access.delete +export interface SlackListsAccessDeleteArguments extends TokenOverridable { + list_id: string; + channel_ids?: string[]; + user_ids?: string[]; +} + +// https://docs.slack.dev/reference/methods/slackLists.access.set +export interface SlackListsAccessSetArguments extends TokenOverridable { + list_id: string; + access_level: string; + channel_ids?: string[]; + user_ids?: string[]; +} + // https://docs.slack.dev/reference/methods/slackLists.create export interface SlackListsCreateArguments extends TokenOverridable { name: string; @@ -11,3 +26,64 @@ export interface SlackListsCreateArguments extends TokenOverridable { include_copied_list_records?: boolean; todo_mode?: boolean; } + +// https://docs.slack.dev/reference/methods/slackLists.download.get +export interface SlackListsDownloadGetArguments extends TokenOverridable { + list_id: string; + job_id: string; +} + +// https://docs.slack.dev/reference/methods/slackLists.download.start +export interface SlackListsDownloadStartArguments extends TokenOverridable { + list_id: string; + include_archived?: boolean; +} + +// https://docs.slack.dev/reference/methods/slackLists.items.create +export interface SlackListsItemsCreateArguments extends TokenOverridable { + list_id: string; + duplicated_item_id?: string; + parent_item_id?: string; + initial_fields?: Array>; +} + +// https://docs.slack.dev/reference/methods/slackLists.items.delete +export interface SlackListsItemsDeleteArguments extends TokenOverridable { + list_id: string; + id: string; +} + +// https://docs.slack.dev/reference/methods/slackLists.items.deletemultiple +export interface SlackListsItemsDeleteMultipleArguments extends TokenOverridable { + list_id: string; + ids: string[]; +} + +// https://docs.slack.dev/reference/methods/slackLists.items.info +export interface SlackListsItemsInfoArguments extends TokenOverridable { + list_id: string; + id: string; + include_is_subscribed?: boolean; +} + +// https://docs.slack.dev/reference/methods/slackLists.items.list +export interface SlackListsItemsListArguments extends TokenOverridable { + list_id: string; + limit?: number; + cursor?: string; + archived?: boolean; +} + +// https://docs.slack.dev/reference/methods/slackLists.items.update +export interface SlackListsItemsUpdateArguments extends TokenOverridable { + list_id: string; + cells: Array>; +} + +// https://docs.slack.dev/reference/methods/slackLists.update +export interface SlackListsUpdateArguments extends TokenOverridable { + id: string; + name?: string; + description_blocks?: Array; + todo_mode?: boolean; +} diff --git a/packages/web-api/src/types/response/SlackListsAccessDeleteResponse.ts b/packages/web-api/src/types/response/SlackListsAccessDeleteResponse.ts new file mode 100644 index 000000000..fb66d74a6 --- /dev/null +++ b/packages/web-api/src/types/response/SlackListsAccessDeleteResponse.ts @@ -0,0 +1,10 @@ +import type { WebAPICallResult } from '../../WebClient'; + +export type SlackListsAccessDeleteResponse = WebAPICallResult & { + channel?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; + ts?: string; +}; diff --git a/packages/web-api/src/types/response/SlackListsAccessSetResponse.ts b/packages/web-api/src/types/response/SlackListsAccessSetResponse.ts new file mode 100644 index 000000000..b9d73f9ff --- /dev/null +++ b/packages/web-api/src/types/response/SlackListsAccessSetResponse.ts @@ -0,0 +1,10 @@ +import type { WebAPICallResult } from '../../WebClient'; + +export type SlackListsAccessSetResponse = WebAPICallResult & { + channel?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; + ts?: string; +}; diff --git a/packages/web-api/src/types/response/SlackListsDownloadGetResponse.ts b/packages/web-api/src/types/response/SlackListsDownloadGetResponse.ts new file mode 100644 index 000000000..a3029cfbd --- /dev/null +++ b/packages/web-api/src/types/response/SlackListsDownloadGetResponse.ts @@ -0,0 +1,10 @@ +import type { WebAPICallResult } from '../../WebClient'; + +export type SlackListsDownloadGetResponse = WebAPICallResult & { + channel?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; + ts?: string; +}; diff --git a/packages/web-api/src/types/response/SlackListsDownloadStartResponse.ts b/packages/web-api/src/types/response/SlackListsDownloadStartResponse.ts new file mode 100644 index 000000000..6555dfa31 --- /dev/null +++ b/packages/web-api/src/types/response/SlackListsDownloadStartResponse.ts @@ -0,0 +1,10 @@ +import type { WebAPICallResult } from '../../WebClient'; + +export type SlackListsDownloadStartResponse = WebAPICallResult & { + channel?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; + ts?: string; +}; diff --git a/packages/web-api/src/types/response/SlackListsItemsCreateResponse.ts b/packages/web-api/src/types/response/SlackListsItemsCreateResponse.ts new file mode 100644 index 000000000..e46609c07 --- /dev/null +++ b/packages/web-api/src/types/response/SlackListsItemsCreateResponse.ts @@ -0,0 +1,10 @@ +import type { WebAPICallResult } from '../../WebClient'; + +export type SlackListsItemsCreateResponse = WebAPICallResult & { + channel?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; + ts?: string; +}; diff --git a/packages/web-api/src/types/response/SlackListsItemsDeleteMultipleResponse.ts b/packages/web-api/src/types/response/SlackListsItemsDeleteMultipleResponse.ts new file mode 100644 index 000000000..fe99a2800 --- /dev/null +++ b/packages/web-api/src/types/response/SlackListsItemsDeleteMultipleResponse.ts @@ -0,0 +1,10 @@ +import type { WebAPICallResult } from '../../WebClient'; + +export type SlackListsItemsDeleteMultipleResponse = WebAPICallResult & { + channel?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; + ts?: string; +}; diff --git a/packages/web-api/src/types/response/SlackListsItemsDeleteResponse.ts b/packages/web-api/src/types/response/SlackListsItemsDeleteResponse.ts new file mode 100644 index 000000000..f8f22897a --- /dev/null +++ b/packages/web-api/src/types/response/SlackListsItemsDeleteResponse.ts @@ -0,0 +1,10 @@ +import type { WebAPICallResult } from '../../WebClient'; + +export type SlackListsItemsDeleteResponse = WebAPICallResult & { + channel?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; + ts?: string; +}; diff --git a/packages/web-api/src/types/response/SlackListsItemsInfoResponse.ts b/packages/web-api/src/types/response/SlackListsItemsInfoResponse.ts new file mode 100644 index 000000000..043ff26a4 --- /dev/null +++ b/packages/web-api/src/types/response/SlackListsItemsInfoResponse.ts @@ -0,0 +1,10 @@ +import type { WebAPICallResult } from '../../WebClient'; + +export type SlackListsItemsInfoResponse = WebAPICallResult & { + channel?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; + ts?: string; +}; diff --git a/packages/web-api/src/types/response/SlackListsItemsListResponse.ts b/packages/web-api/src/types/response/SlackListsItemsListResponse.ts new file mode 100644 index 000000000..d244beff4 --- /dev/null +++ b/packages/web-api/src/types/response/SlackListsItemsListResponse.ts @@ -0,0 +1,10 @@ +import type { WebAPICallResult } from '../../WebClient'; + +export type SlackListsItemsListResponse = WebAPICallResult & { + channel?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; + ts?: string; +}; diff --git a/packages/web-api/src/types/response/SlackListsItemsUpdateResponse.ts b/packages/web-api/src/types/response/SlackListsItemsUpdateResponse.ts new file mode 100644 index 000000000..42796c410 --- /dev/null +++ b/packages/web-api/src/types/response/SlackListsItemsUpdateResponse.ts @@ -0,0 +1,10 @@ +import type { WebAPICallResult } from '../../WebClient'; + +export type SlackListsItemsUpdateResponse = WebAPICallResult & { + channel?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; + ts?: string; +}; diff --git a/packages/web-api/src/types/response/SlackListsUpdateResponse.ts b/packages/web-api/src/types/response/SlackListsUpdateResponse.ts new file mode 100644 index 000000000..fe60055f0 --- /dev/null +++ b/packages/web-api/src/types/response/SlackListsUpdateResponse.ts @@ -0,0 +1,10 @@ +import type { WebAPICallResult } from '../../WebClient'; + +export type SlackListsUpdateResponse = WebAPICallResult & { + channel?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; + ts?: string; +}; diff --git a/packages/web-api/src/types/response/index.ts b/packages/web-api/src/types/response/index.ts index f49323c38..1b1ce2018 100644 --- a/packages/web-api/src/types/response/index.ts +++ b/packages/web-api/src/types/response/index.ts @@ -276,6 +276,17 @@ export { SearchAllResponse } from './SearchAllResponse'; export { SearchFilesResponse } from './SearchFilesResponse'; export { SearchMessagesResponse } from './SearchMessagesResponse'; export { SlackListsCreateResponse } from './SlackListsCreateResponse'; +export { SlackListsAccessDeleteResponse } from './SlackListsAccessDeleteResponse'; +export { SlackListsAccessSetResponse } from './SlackListsAccessSetResponse'; +export { SlackListsDownloadGetResponse } from './SlackListsDownloadGetResponse'; +export { SlackListsDownloadStartResponse } from './SlackListsDownloadStartResponse'; +export { SlackListsItemsCreateResponse } from './SlackListsItemsCreateResponse'; +export { SlackListsItemsDeleteMultipleResponse } from './SlackListsItemsDeleteMultipleResponse'; +export { SlackListsItemsDeleteResponse } from './SlackListsItemsDeleteResponse'; +export { SlackListsItemsInfoResponse } from './SlackListsItemsInfoResponse'; +export { SlackListsItemsListResponse } from './SlackListsItemsListResponse'; +export { SlackListsItemsUpdateResponse } from './SlackListsItemsUpdateResponse'; +export { SlackListsUpdateResponse } from './SlackListsUpdateResponse'; export { StarsAddResponse } from './StarsAddResponse'; export { StarsListResponse } from './StarsListResponse'; export { StarsRemoveResponse } from './StarsRemoveResponse'; diff --git a/packages/web-api/test/types/methods/slacklists.test-d.ts b/packages/web-api/test/types/methods/slacklists.test-d.ts index 90f6b413b..f7e6a666c 100644 --- a/packages/web-api/test/types/methods/slacklists.test-d.ts +++ b/packages/web-api/test/types/methods/slacklists.test-d.ts @@ -15,3 +15,147 @@ expectAssignable>([ name: 'Backlog', }, ]); + +// slackLists.access.delete +// -- sad path +expectError(web.slackLists.access.delete()); // lacking argument +expectError(web.slackLists.access.delete({})); // missing list_id + +// -- happy path +expectAssignable>([ + { + list_id: 'L1234567890', + }, +]); + +// slackLists.access.set +// -- sad path +expectError(web.slackLists.access.set()); // lacking argument +expectError(web.slackLists.access.set({})); // missing list_id and access_level +expectError(web.slackLists.access.set({ list_id: 'L1234567890' })); // missing access_level + +// -- happy path +expectAssignable>([ + { + list_id: 'L1234567890', + access_level: 'public', + }, +]); + +// slackLists.download.get +// -- sad path +expectError(web.slackLists.download.get()); // lacking argument +expectError(web.slackLists.download.get({})); // missing list_id and job_id +expectError(web.slackLists.download.get({ list_id: 'L1234567890' })); // missing job_id + +// -- happy path +expectAssignable>([ + { + list_id: 'L1234567890', + job_id: 'J1234567890', + }, +]); + +// slackLists.download.start +// -- sad path +expectError(web.slackLists.download.start()); // lacking argument +expectError(web.slackLists.download.start({})); // missing list_id + +// -- happy path +expectAssignable>([ + { + list_id: 'L1234567890', + }, +]); + +// slackLists.items.create +// -- sad path +expectError(web.slackLists.items.create()); // lacking argument +expectError(web.slackLists.items.create({})); // missing list_id + +// -- happy path +expectAssignable>([ + { + list_id: 'L1234567890', + }, +]); + +// slackLists.items.delete +// -- sad path +expectError(web.slackLists.items.delete()); // lacking argument +expectError(web.slackLists.items.delete({})); // missing list_id and id +expectError(web.slackLists.items.delete({ list_id: 'L1234567890' })); // missing id + +// -- happy path +expectAssignable>([ + { + list_id: 'L1234567890', + id: 'I1234567890', + }, +]); + +// slackLists.items.deleteMultiple +// -- sad path +expectError(web.slackLists.items.deleteMultiple()); // lacking argument +expectError(web.slackLists.items.deleteMultiple({})); // missing list_id and ids +expectError(web.slackLists.items.deleteMultiple({ list_id: 'L1234567890' })); // missing ids + +// -- happy path +expectAssignable>([ + { + list_id: 'L1234567890', + ids: ['I1234567890', 'I0987654321'], + }, +]); + +// slackLists.items.info +// -- sad path +expectError(web.slackLists.items.info()); // lacking argument +expectError(web.slackLists.items.info({})); // missing list_id and id +expectError(web.slackLists.items.info({ list_id: 'L1234567890' })); // missing id + +// -- happy path +expectAssignable>([ + { + list_id: 'L1234567890', + id: 'I1234567890', + }, +]); + +// slackLists.items.list +// -- sad path +expectError(web.slackLists.items.list()); // lacking argument +expectError(web.slackLists.items.list({})); // missing list_id + +// -- happy path +expectAssignable>([ + { + list_id: 'L1234567890', + }, +]); + +// slackLists.items.update +// -- sad path +expectError(web.slackLists.items.update()); // lacking argument +expectError(web.slackLists.items.update({})); // missing list_id and cells +expectError(web.slackLists.items.update({ list_id: 'L1234567890' })); // missing cells + +// -- happy path +expectAssignable>([ + { + list_id: 'L1234567890', + cells: [{ id: 'C1234567890', value: 'test' }], + }, +]); + +// slackLists.update +// -- sad path +expectError(web.slackLists.update()); // lacking argument +expectError(web.slackLists.update({})); // missing id + +// -- happy path +expectAssignable>([ + { + id: 'L1234567890', + }, +]); From a2657f54d7c58aa89b39f6d6747f7d933709c0c7 Mon Sep 17 00:00:00 2001 From: Ale Mercado Date: Thu, 13 Nov 2025 12:30:48 -0500 Subject: [PATCH 09/23] fix: linter errors --- packages/web-api/src/types/request/index.ts | 15 ++++++++++++++- packages/web-api/src/types/response/index.ts | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/web-api/src/types/request/index.ts b/packages/web-api/src/types/request/index.ts index d92008425..798d4425c 100644 --- a/packages/web-api/src/types/request/index.ts +++ b/packages/web-api/src/types/request/index.ts @@ -275,7 +275,20 @@ export type { SearchFilesArguments, SearchMessagesArguments, } from './search'; -export type { SlackListsAccessDeleteArguments, SlackListsAccessSetArguments, SlackListsCreateArguments, SlackListsDownloadGetArguments, SlackListsDownloadStartArguments, SlackListsItemsCreateArguments, SlackListsItemsDeleteArguments, SlackListsItemsDeleteMultipleArguments, SlackListsItemsInfoArguments, SlackListsItemsListArguments, SlackListsItemsUpdateArguments, SlackListsUpdateArguments } from './slacklists'; +export type { + SlackListsAccessDeleteArguments, + SlackListsAccessSetArguments, + SlackListsCreateArguments, + SlackListsDownloadGetArguments, + SlackListsDownloadStartArguments, + SlackListsItemsCreateArguments, + SlackListsItemsDeleteArguments, + SlackListsItemsDeleteMultipleArguments, + SlackListsItemsInfoArguments, + SlackListsItemsListArguments, + SlackListsItemsUpdateArguments, + SlackListsUpdateArguments, +} from './slacklists'; export type { StarsAddRemoveArguments, StarsListArguments, diff --git a/packages/web-api/src/types/response/index.ts b/packages/web-api/src/types/response/index.ts index 1b1ce2018..433659455 100644 --- a/packages/web-api/src/types/response/index.ts +++ b/packages/web-api/src/types/response/index.ts @@ -275,9 +275,9 @@ export { RtmStartResponse } from './RtmStartResponse'; export { SearchAllResponse } from './SearchAllResponse'; export { SearchFilesResponse } from './SearchFilesResponse'; export { SearchMessagesResponse } from './SearchMessagesResponse'; -export { SlackListsCreateResponse } from './SlackListsCreateResponse'; export { SlackListsAccessDeleteResponse } from './SlackListsAccessDeleteResponse'; export { SlackListsAccessSetResponse } from './SlackListsAccessSetResponse'; +export { SlackListsCreateResponse } from './SlackListsCreateResponse'; export { SlackListsDownloadGetResponse } from './SlackListsDownloadGetResponse'; export { SlackListsDownloadStartResponse } from './SlackListsDownloadStartResponse'; export { SlackListsItemsCreateResponse } from './SlackListsItemsCreateResponse'; From 84a637f5067c9a6a68198d0f53905b449721a453 Mon Sep 17 00:00:00 2001 From: Maria Alejandra <104795114+srtaalej@users.noreply.github.com> Date: Wed, 19 Nov 2025 15:23:26 -0500 Subject: [PATCH 10/23] Update packages/web-api/test/types/methods/slacklists.test-d.ts Co-authored-by: Eden Zimbelman --- packages/web-api/test/types/methods/slacklists.test-d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/web-api/test/types/methods/slacklists.test-d.ts b/packages/web-api/test/types/methods/slacklists.test-d.ts index f7e6a666c..b1e3a5a4c 100644 --- a/packages/web-api/test/types/methods/slacklists.test-d.ts +++ b/packages/web-api/test/types/methods/slacklists.test-d.ts @@ -51,8 +51,8 @@ expectError(web.slackLists.download.get({ list_id: 'L1234567890' })); // missing // -- happy path expectAssignable>([ { - list_id: 'L1234567890', - job_id: 'J1234567890', + list_id: 'F1234567890', + job_id: 'Le1234567890', }, ]); From addd47cff61730c0f087517ae2cc7876076ad1a8 Mon Sep 17 00:00:00 2001 From: Maria Alejandra <104795114+srtaalej@users.noreply.github.com> Date: Wed, 19 Nov 2025 15:24:00 -0500 Subject: [PATCH 11/23] Update packages/web-api/src/types/response/SlackListsAccessDeleteResponse.ts Co-authored-by: Eden Zimbelman --- .../src/types/response/SlackListsAccessDeleteResponse.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/web-api/src/types/response/SlackListsAccessDeleteResponse.ts b/packages/web-api/src/types/response/SlackListsAccessDeleteResponse.ts index fb66d74a6..645643dd7 100644 --- a/packages/web-api/src/types/response/SlackListsAccessDeleteResponse.ts +++ b/packages/web-api/src/types/response/SlackListsAccessDeleteResponse.ts @@ -1,10 +1,8 @@ import type { WebAPICallResult } from '../../WebClient'; export type SlackListsAccessDeleteResponse = WebAPICallResult & { - channel?: string; error?: string; needed?: string; ok?: boolean; provided?: string; - ts?: string; }; From ce8522270c8d45301669e30d18cd96ed43014a54 Mon Sep 17 00:00:00 2001 From: Maria Alejandra <104795114+srtaalej@users.noreply.github.com> Date: Wed, 19 Nov 2025 15:24:08 -0500 Subject: [PATCH 12/23] Update packages/web-api/src/types/request/slacklists.ts Co-authored-by: Eden Zimbelman --- packages/web-api/src/types/request/slacklists.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web-api/src/types/request/slacklists.ts b/packages/web-api/src/types/request/slacklists.ts index 548bd5240..6d57c546a 100644 --- a/packages/web-api/src/types/request/slacklists.ts +++ b/packages/web-api/src/types/request/slacklists.ts @@ -53,7 +53,7 @@ export interface SlackListsItemsDeleteArguments extends TokenOverridable { id: string; } -// https://docs.slack.dev/reference/methods/slackLists.items.deletemultiple +// https://docs.slack.dev/reference/methods/slackLists.items.deleteMultiple export interface SlackListsItemsDeleteMultipleArguments extends TokenOverridable { list_id: string; ids: string[]; From 7f949d964e0b3d7ba22f98f4ab2c4d469261baa5 Mon Sep 17 00:00:00 2001 From: Maria Alejandra <104795114+srtaalej@users.noreply.github.com> Date: Wed, 19 Nov 2025 15:24:24 -0500 Subject: [PATCH 13/23] Update packages/web-api/src/types/request/slacklists.ts Co-authored-by: Eden Zimbelman --- packages/web-api/src/types/request/slacklists.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/web-api/src/types/request/slacklists.ts b/packages/web-api/src/types/request/slacklists.ts index 6d57c546a..c1170abd8 100644 --- a/packages/web-api/src/types/request/slacklists.ts +++ b/packages/web-api/src/types/request/slacklists.ts @@ -21,6 +21,10 @@ export interface SlackListsAccessSetArguments extends TokenOverridable { export interface SlackListsCreateArguments extends TokenOverridable { name: string; description_blocks?: Array; + /** + * @description Column definition for the List. + * @see {@link https://docs.slack.dev/reference/methods/slackLists.create#schema-definition} + */ schema?: Array>; copy_from_list_id?: string; include_copied_list_records?: boolean; From 3064b3e9540f73139cc314db435e8c5b77dcafcf Mon Sep 17 00:00:00 2001 From: Maria Alejandra <104795114+srtaalej@users.noreply.github.com> Date: Wed, 19 Nov 2025 15:24:54 -0500 Subject: [PATCH 14/23] Update packages/web-api/src/types/request/slacklists.ts Co-authored-by: Eden Zimbelman --- packages/web-api/src/types/request/slacklists.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/web-api/src/types/request/slacklists.ts b/packages/web-api/src/types/request/slacklists.ts index c1170abd8..1d5497b9b 100644 --- a/packages/web-api/src/types/request/slacklists.ts +++ b/packages/web-api/src/types/request/slacklists.ts @@ -4,6 +4,9 @@ import type { TokenOverridable } from './common'; // https://docs.slack.dev/reference/methods/slackLists.access.delete export interface SlackListsAccessDeleteArguments extends TokenOverridable { + /** + * @description Encoded ID of the List. + */ list_id: string; channel_ids?: string[]; user_ids?: string[]; From 31fbb6d4797da75f3e2367fc669e41c583a13140 Mon Sep 17 00:00:00 2001 From: Ale Mercado Date: Wed, 19 Nov 2025 17:32:28 -0500 Subject: [PATCH 15/23] fix: review feedback --- packages/web-api/src/methods.ts | 2 +- packages/web-api/src/types/request/index.ts | 2 +- .../web-api/src/types/request/slacklists.ts | 134 ++++++++++++++++++ .../response/SlackListsAccessSetResponse.ts | 2 - .../response/SlackListsCreateResponse.ts | 2 - .../response/SlackListsDownloadGetResponse.ts | 2 - .../SlackListsDownloadStartResponse.ts | 2 - .../response/SlackListsItemsCreateResponse.ts | 2 - .../SlackListsItemsDeleteMultipleResponse.ts | 2 - .../response/SlackListsItemsDeleteResponse.ts | 2 - .../response/SlackListsItemsInfoResponse.ts | 2 - .../response/SlackListsItemsListResponse.ts | 2 - .../response/SlackListsItemsUpdateResponse.ts | 2 - .../response/SlackListsUpdateResponse.ts | 2 - .../test/types/methods/slacklists.test-d.ts | 2 +- 15 files changed, 137 insertions(+), 25 deletions(-) diff --git a/packages/web-api/src/methods.ts b/packages/web-api/src/methods.ts index c6d60f884..b02e5dd7a 100644 --- a/packages/web-api/src/methods.ts +++ b/packages/web-api/src/methods.ts @@ -2264,7 +2264,7 @@ export abstract class Methods extends EventEmitter { */ info: bindApiCall(this, 'slackLists.items.info'), /** - * @description List items in a list. + * @description Get records from a List. * @see {@link https://docs.slack.dev/reference/methods/slackLists.items.list `slackLists.items.list` API reference}. */ list: bindApiCall(this, 'slackLists.items.list'), diff --git a/packages/web-api/src/types/request/index.ts b/packages/web-api/src/types/request/index.ts index 798d4425c..ebd44bd2f 100644 --- a/packages/web-api/src/types/request/index.ts +++ b/packages/web-api/src/types/request/index.ts @@ -288,7 +288,7 @@ export type { SlackListsItemsListArguments, SlackListsItemsUpdateArguments, SlackListsUpdateArguments, -} from './slacklists'; +} from './slackLists'; export type { StarsAddRemoveArguments, StarsListArguments, diff --git a/packages/web-api/src/types/request/slacklists.ts b/packages/web-api/src/types/request/slacklists.ts index 1d5497b9b..fa42abcbc 100644 --- a/packages/web-api/src/types/request/slacklists.ts +++ b/packages/web-api/src/types/request/slacklists.ts @@ -8,89 +8,223 @@ export interface SlackListsAccessDeleteArguments extends TokenOverridable { * @description Encoded ID of the List. */ list_id: string; + + /** + * @description List of channels you wish to update access for. Can only be used if user_ids is not provided. + */ channel_ids?: string[]; + + /** + * @description List of users you wish to update access for. Can only be used if channel_ids is not provided. + */ user_ids?: string[]; } // https://docs.slack.dev/reference/methods/slackLists.access.set export interface SlackListsAccessSetArguments extends TokenOverridable { + /** + * @description Encoded ID of the List. + */ list_id: string; + + /** + * @description Desired level of access. + */ access_level: string; + + /** + * @description List of channels you wish to update access for. Can only be used if user_ids is not provided. + */ channel_ids?: string[]; + + /** + * @description List of users you wish to update access for. Can only be used if channel_ids is not provided. + */ user_ids?: string[]; } // https://docs.slack.dev/reference/methods/slackLists.create export interface SlackListsCreateArguments extends TokenOverridable { + /** + * @description Name of the List. + */ name: string; + + /** + * @description A rich text description of the List. + */ description_blocks?: Array; + /** * @description Column definition for the List. * @see {@link https://docs.slack.dev/reference/methods/slackLists.create#schema-definition} */ schema?: Array>; + + /** + * @description ID of the List to copy. + */ copy_from_list_id?: string; + + /** + * @description Boolean indicating whether to include records when a List is copied. + */ include_copied_list_records?: boolean; + + /** + * @description Boolean indicating whether the List should be used to track todo tasks. + */ todo_mode?: boolean; } // https://docs.slack.dev/reference/methods/slackLists.download.get export interface SlackListsDownloadGetArguments extends TokenOverridable { + /** + * @description Encoded ID of the List. + */ list_id: string; + + /** + * @description The ID of the recently started job to export the List. + */ job_id: string; } // https://docs.slack.dev/reference/methods/slackLists.download.start export interface SlackListsDownloadStartArguments extends TokenOverridable { + /** + * @description Encoded ID of the List. + */ list_id: string; + + /** + * @description Boolean indicating whether to include archived items. + */ include_archived?: boolean; } // https://docs.slack.dev/reference/methods/slackLists.items.create export interface SlackListsItemsCreateArguments extends TokenOverridable { + /** + * @description Encoded ID of the List. + */ list_id: string; + + /** + * @description ID of the record to make a copy of. + */ duplicated_item_id?: string; + + /** + * @description ID of the parent record for this subtask. + */ parent_item_id?: string; + + /** + * @description Initial item data. + */ initial_fields?: Array>; } // https://docs.slack.dev/reference/methods/slackLists.items.delete export interface SlackListsItemsDeleteArguments extends TokenOverridable { + /** + * @description Encoded ID of the List. + */ list_id: string; + + /** + * @description ID of item to delete. + */ id: string; } // https://docs.slack.dev/reference/methods/slackLists.items.deleteMultiple export interface SlackListsItemsDeleteMultipleArguments extends TokenOverridable { + /** + * @description Encoded ID of the List. + */ list_id: string; + + /** + * @description IDs of the items to delete. + */ ids: string[]; } // https://docs.slack.dev/reference/methods/slackLists.items.info export interface SlackListsItemsInfoArguments extends TokenOverridable { + /** + * @description Encoded ID of the List. + */ list_id: string; + + /** + * @description ID of item to delete. + */ id: string; + + /** + * @description Set to true to include is_subscribed data for the returned List row. + */ include_is_subscribed?: boolean; } // https://docs.slack.dev/reference/methods/slackLists.items.list export interface SlackListsItemsListArguments extends TokenOverridable { + /** + * @description Encoded ID of the List. + */ list_id: string; + + /** + * @description The maximum number of records to return. + */ limit?: number; + + /** + * @description Next cursor for pagination. + */ cursor?: string; + + /** + * @description Boolean indicating whether archived items or normal items should be returned. + */ archived?: boolean; } // https://docs.slack.dev/reference/methods/slackLists.items.update export interface SlackListsItemsUpdateArguments extends TokenOverridable { + /** + * @description Encoded ID of the List. + */ list_id: string; + + /** + * @description Cells to update. + */ cells: Array>; } // https://docs.slack.dev/reference/methods/slackLists.update export interface SlackListsUpdateArguments extends TokenOverridable { + /** + * @description Encoded ID of the List. + */ id: string; + + /** + * @description Name of the List. + */ name?: string; + + /** + * @description A rich text description of the List. + */ description_blocks?: Array; + + /** + * @description Boolean indicating whether the List should be used to track todo tasks. + */ todo_mode?: boolean; } diff --git a/packages/web-api/src/types/response/SlackListsAccessSetResponse.ts b/packages/web-api/src/types/response/SlackListsAccessSetResponse.ts index b9d73f9ff..33e2ffb08 100644 --- a/packages/web-api/src/types/response/SlackListsAccessSetResponse.ts +++ b/packages/web-api/src/types/response/SlackListsAccessSetResponse.ts @@ -1,10 +1,8 @@ import type { WebAPICallResult } from '../../WebClient'; export type SlackListsAccessSetResponse = WebAPICallResult & { - channel?: string; error?: string; needed?: string; ok?: boolean; provided?: string; - ts?: string; }; diff --git a/packages/web-api/src/types/response/SlackListsCreateResponse.ts b/packages/web-api/src/types/response/SlackListsCreateResponse.ts index 4a3b88100..a943f109c 100644 --- a/packages/web-api/src/types/response/SlackListsCreateResponse.ts +++ b/packages/web-api/src/types/response/SlackListsCreateResponse.ts @@ -1,10 +1,8 @@ import type { WebAPICallResult } from '../../WebClient'; export type SlackListsCreateResponse = WebAPICallResult & { - channel?: string; error?: string; needed?: string; ok?: boolean; provided?: string; - ts?: string; }; diff --git a/packages/web-api/src/types/response/SlackListsDownloadGetResponse.ts b/packages/web-api/src/types/response/SlackListsDownloadGetResponse.ts index a3029cfbd..8e9e97638 100644 --- a/packages/web-api/src/types/response/SlackListsDownloadGetResponse.ts +++ b/packages/web-api/src/types/response/SlackListsDownloadGetResponse.ts @@ -1,10 +1,8 @@ import type { WebAPICallResult } from '../../WebClient'; export type SlackListsDownloadGetResponse = WebAPICallResult & { - channel?: string; error?: string; needed?: string; ok?: boolean; provided?: string; - ts?: string; }; diff --git a/packages/web-api/src/types/response/SlackListsDownloadStartResponse.ts b/packages/web-api/src/types/response/SlackListsDownloadStartResponse.ts index 6555dfa31..e9379ae89 100644 --- a/packages/web-api/src/types/response/SlackListsDownloadStartResponse.ts +++ b/packages/web-api/src/types/response/SlackListsDownloadStartResponse.ts @@ -1,10 +1,8 @@ import type { WebAPICallResult } from '../../WebClient'; export type SlackListsDownloadStartResponse = WebAPICallResult & { - channel?: string; error?: string; needed?: string; ok?: boolean; provided?: string; - ts?: string; }; diff --git a/packages/web-api/src/types/response/SlackListsItemsCreateResponse.ts b/packages/web-api/src/types/response/SlackListsItemsCreateResponse.ts index e46609c07..404ce2d68 100644 --- a/packages/web-api/src/types/response/SlackListsItemsCreateResponse.ts +++ b/packages/web-api/src/types/response/SlackListsItemsCreateResponse.ts @@ -1,10 +1,8 @@ import type { WebAPICallResult } from '../../WebClient'; export type SlackListsItemsCreateResponse = WebAPICallResult & { - channel?: string; error?: string; needed?: string; ok?: boolean; provided?: string; - ts?: string; }; diff --git a/packages/web-api/src/types/response/SlackListsItemsDeleteMultipleResponse.ts b/packages/web-api/src/types/response/SlackListsItemsDeleteMultipleResponse.ts index fe99a2800..8b621ab22 100644 --- a/packages/web-api/src/types/response/SlackListsItemsDeleteMultipleResponse.ts +++ b/packages/web-api/src/types/response/SlackListsItemsDeleteMultipleResponse.ts @@ -1,10 +1,8 @@ import type { WebAPICallResult } from '../../WebClient'; export type SlackListsItemsDeleteMultipleResponse = WebAPICallResult & { - channel?: string; error?: string; needed?: string; ok?: boolean; provided?: string; - ts?: string; }; diff --git a/packages/web-api/src/types/response/SlackListsItemsDeleteResponse.ts b/packages/web-api/src/types/response/SlackListsItemsDeleteResponse.ts index f8f22897a..24e766dd7 100644 --- a/packages/web-api/src/types/response/SlackListsItemsDeleteResponse.ts +++ b/packages/web-api/src/types/response/SlackListsItemsDeleteResponse.ts @@ -1,10 +1,8 @@ import type { WebAPICallResult } from '../../WebClient'; export type SlackListsItemsDeleteResponse = WebAPICallResult & { - channel?: string; error?: string; needed?: string; ok?: boolean; provided?: string; - ts?: string; }; diff --git a/packages/web-api/src/types/response/SlackListsItemsInfoResponse.ts b/packages/web-api/src/types/response/SlackListsItemsInfoResponse.ts index 043ff26a4..0d25a3635 100644 --- a/packages/web-api/src/types/response/SlackListsItemsInfoResponse.ts +++ b/packages/web-api/src/types/response/SlackListsItemsInfoResponse.ts @@ -1,10 +1,8 @@ import type { WebAPICallResult } from '../../WebClient'; export type SlackListsItemsInfoResponse = WebAPICallResult & { - channel?: string; error?: string; needed?: string; ok?: boolean; provided?: string; - ts?: string; }; diff --git a/packages/web-api/src/types/response/SlackListsItemsListResponse.ts b/packages/web-api/src/types/response/SlackListsItemsListResponse.ts index d244beff4..87a370716 100644 --- a/packages/web-api/src/types/response/SlackListsItemsListResponse.ts +++ b/packages/web-api/src/types/response/SlackListsItemsListResponse.ts @@ -1,10 +1,8 @@ import type { WebAPICallResult } from '../../WebClient'; export type SlackListsItemsListResponse = WebAPICallResult & { - channel?: string; error?: string; needed?: string; ok?: boolean; provided?: string; - ts?: string; }; diff --git a/packages/web-api/src/types/response/SlackListsItemsUpdateResponse.ts b/packages/web-api/src/types/response/SlackListsItemsUpdateResponse.ts index 42796c410..96cda5421 100644 --- a/packages/web-api/src/types/response/SlackListsItemsUpdateResponse.ts +++ b/packages/web-api/src/types/response/SlackListsItemsUpdateResponse.ts @@ -1,10 +1,8 @@ import type { WebAPICallResult } from '../../WebClient'; export type SlackListsItemsUpdateResponse = WebAPICallResult & { - channel?: string; error?: string; needed?: string; ok?: boolean; provided?: string; - ts?: string; }; diff --git a/packages/web-api/src/types/response/SlackListsUpdateResponse.ts b/packages/web-api/src/types/response/SlackListsUpdateResponse.ts index fe60055f0..e61a9f969 100644 --- a/packages/web-api/src/types/response/SlackListsUpdateResponse.ts +++ b/packages/web-api/src/types/response/SlackListsUpdateResponse.ts @@ -1,10 +1,8 @@ import type { WebAPICallResult } from '../../WebClient'; export type SlackListsUpdateResponse = WebAPICallResult & { - channel?: string; error?: string; needed?: string; ok?: boolean; provided?: string; - ts?: string; }; diff --git a/packages/web-api/test/types/methods/slacklists.test-d.ts b/packages/web-api/test/types/methods/slacklists.test-d.ts index b1e3a5a4c..94919325f 100644 --- a/packages/web-api/test/types/methods/slacklists.test-d.ts +++ b/packages/web-api/test/types/methods/slacklists.test-d.ts @@ -144,7 +144,7 @@ expectError(web.slackLists.items.update({ list_id: 'L1234567890' })); // missing expectAssignable>([ { list_id: 'L1234567890', - cells: [{ id: 'C1234567890', value: 'test' }], + cells: [{ row_id: 'Rec014K005UQJ', column_id: 'Col014K005UQJ', user: ['U01284PCR98', 'U0137181B5H'] }], }, ]); From 1391ed1822bb4c24f981d77283da2a81d9d03f74 Mon Sep 17 00:00:00 2001 From: Ale Mercado Date: Wed, 19 Nov 2025 17:57:50 -0500 Subject: [PATCH 16/23] fix: rename slacklists.ts to match api --- .../web-api/src/types/request/{slacklists.ts => slackLists.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/web-api/src/types/request/{slacklists.ts => slackLists.ts} (100%) diff --git a/packages/web-api/src/types/request/slacklists.ts b/packages/web-api/src/types/request/slackLists.ts similarity index 100% rename from packages/web-api/src/types/request/slacklists.ts rename to packages/web-api/src/types/request/slackLists.ts From a370016aa1433786df05eafbf1bb2efff4de4eca Mon Sep 17 00:00:00 2001 From: Maria Alejandra <104795114+srtaalej@users.noreply.github.com> Date: Fri, 21 Nov 2025 11:10:53 -0500 Subject: [PATCH 17/23] Update packages/web-api/test/types/methods/slacklists.test-d.ts Co-authored-by: Eden Zimbelman --- packages/web-api/test/types/methods/slacklists.test-d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/web-api/test/types/methods/slacklists.test-d.ts b/packages/web-api/test/types/methods/slacklists.test-d.ts index 94919325f..78eabcd0b 100644 --- a/packages/web-api/test/types/methods/slacklists.test-d.ts +++ b/packages/web-api/test/types/methods/slacklists.test-d.ts @@ -103,8 +103,8 @@ expectError(web.slackLists.items.deleteMultiple({ list_id: 'L1234567890' })); // // -- happy path expectAssignable>([ { - list_id: 'L1234567890', - ids: ['I1234567890', 'I0987654321'], + list_id: 'F1234567890', + ids: ['Fe1234567890', 'Fe0987654321'], }, ]); From 583f403fb5d45352a791b201f1be85b41bb32a97 Mon Sep 17 00:00:00 2001 From: Ale Mercado Date: Fri, 21 Nov 2025 11:13:48 -0500 Subject: [PATCH 18/23] reorder tests to match method implementation --- .../test/types/methods/slacklists.test-d.ts | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/packages/web-api/test/types/methods/slacklists.test-d.ts b/packages/web-api/test/types/methods/slacklists.test-d.ts index 78eabcd0b..1ef97cc97 100644 --- a/packages/web-api/test/types/methods/slacklists.test-d.ts +++ b/packages/web-api/test/types/methods/slacklists.test-d.ts @@ -4,17 +4,6 @@ import { WebClient } from '../../../src/WebClient'; const web = new WebClient('TOKEN'); -// slackLists.create -// -- sad path -expectError(web.slackLists.create()); // lacking argument -expectError(web.slackLists.create({})); // missing name - -// -- happy path -expectAssignable>([ - { - name: 'Backlog', - }, -]); // slackLists.access.delete // -- sad path @@ -42,6 +31,18 @@ expectAssignable>([ }, ]); +// slackLists.create +// -- sad path +expectError(web.slackLists.create()); // lacking argument +expectError(web.slackLists.create({})); // missing name + +// -- happy path +expectAssignable>([ + { + name: 'Backlog', + }, +]); + // slackLists.download.get // -- sad path expectError(web.slackLists.download.get()); // lacking argument From ba6778382e87ec374a47cef6af77f85e5ba83732 Mon Sep 17 00:00:00 2001 From: Ale Mercado Date: Fri, 21 Nov 2025 12:12:52 -0500 Subject: [PATCH 19/23] fix: strict typing for complex list objects --- .../web-api/src/types/request/slackLists.ts | 688 +++++++++++++++++- .../response/SlackListsCreateResponse.ts | 6 + .../response/SlackListsDownloadGetResponse.ts | 2 + .../SlackListsDownloadStartResponse.ts | 1 + .../response/SlackListsItemsCreateResponse.ts | 2 + .../response/SlackListsItemsInfoResponse.ts | 4 + .../response/SlackListsItemsListResponse.ts | 5 + .../test/types/methods/slacklists.test-d.ts | 1 - 8 files changed, 704 insertions(+), 5 deletions(-) diff --git a/packages/web-api/src/types/request/slackLists.ts b/packages/web-api/src/types/request/slackLists.ts index fa42abcbc..73b5d832b 100644 --- a/packages/web-api/src/types/request/slackLists.ts +++ b/packages/web-api/src/types/request/slackLists.ts @@ -2,6 +2,329 @@ import type { RichTextBlock } from '@slack/types'; import type { TokenOverridable } from './common'; +// Field type definitions for Slack Lists items +// https://docs.slack.dev/reference/methods/slackLists.items.create#field-types + +/** + * @description Text field with rich text formatting. + */ +export interface SlackListsItemFieldRichText { + column_id: string; + rich_text: RichTextBlock[]; +} + +/** + * @description User field containing user IDs. + */ +export interface SlackListsItemFieldUser { + column_id: string; + user: string[]; +} + +/** + * @description Date field in YYYY-MM-DD format. + */ +export interface SlackListsItemFieldDate { + column_id: string; + date: string[]; +} + +/** + * @description Select field with option IDs. + */ +export interface SlackListsItemFieldSelect { + column_id: string; + select: string[]; +} + +/** + * @description Checkbox field with boolean value. + */ +export interface SlackListsItemFieldCheckbox { + column_id: string; + checkbox: boolean; +} + +/** + * @description Number field with numeric values. + */ +export interface SlackListsItemFieldNumber { + column_id: string; + number: number[]; +} + +/** + * @description Email field with email addresses. + */ +export interface SlackListsItemFieldEmail { + column_id: string; + email: string[]; +} + +/** + * @description Phone field with phone numbers. + */ +export interface SlackListsItemFieldPhone { + column_id: string; + phone: string[]; +} + +/** + * @description Attachment field with file IDs. + */ +export interface SlackListsItemFieldAttachment { + column_id: string; + attachment: string[]; +} + +/** + * @description Link field with URL data. + */ +export interface SlackListsItemFieldLink { + column_id: string; + link: Array<{ + original_url: string; + display_as_url: boolean; + display_name: string; + }>; +} + +/** + * @description Message field with message URLs. + */ +export interface SlackListsItemFieldMessage { + column_id: string; + message: string[]; +} + +/** + * @description Rating field with numeric rating values. + */ +export interface SlackListsItemFieldRating { + column_id: string; + rating: number[]; +} + +/** + * @description Timestamp field with Unix timestamps. + */ +export interface SlackListsItemFieldTimestamp { + column_id: string; + timestamp: number[]; +} + +/** + * @description Channel field with channel IDs. + */ +export interface SlackListsItemFieldChannel { + column_id: string; + channel: string[]; +} + +/** + * @description Reference field with file references. + */ +export interface SlackListsItemFieldReference { + column_id: string; + reference: Array<{ + file: { + file_id: string; + }; + }>; +} + +/** + * @description Union type of all possible Slack Lists item field types. + */ +export type SlackListsItemField = + | SlackListsItemFieldRichText + | SlackListsItemFieldUser + | SlackListsItemFieldDate + | SlackListsItemFieldSelect + | SlackListsItemFieldCheckbox + | SlackListsItemFieldNumber + | SlackListsItemFieldEmail + | SlackListsItemFieldPhone + | SlackListsItemFieldAttachment + | SlackListsItemFieldLink + | SlackListsItemFieldMessage + | SlackListsItemFieldRating + | SlackListsItemFieldTimestamp + | SlackListsItemFieldChannel + | SlackListsItemFieldReference; + +/** + * @description Slack Lists item structure. + */ +export interface SlackListsItem { + /** + * @description The unique identifier for the item. + */ + id: string; + /** + * @description The ID of the List this item belongs to. + */ + list_id: string; + /** + * @description Unix timestamp when the item was created. + */ + date_created: number; + /** + * @description User ID of the creator. + */ + created_by: string; + /** + * @description User ID of the last updater. + */ + updated_by: string; + /** + * @description Array of field data for this item. + */ + fields: SlackListsItemField[]; + /** + * @description String representation of the last update timestamp. + */ + updated_timestamp: string; +} + +/** + * @description Slack Lists item with subscription status (used in responses with include_is_subscribed). + */ +export interface SlackListsItemWithSubscription extends SlackListsItem { + /** + * @description Whether the user is subscribed to this item. + */ + is_subscribed?: boolean; +} + +/** + * @description Cell update that includes row_id along with field data. + * Used for slackLists.items.update to specify which row and column to update. + */ +export type SlackListsItemCellUpdate = SlackListsItemField & { + /** + * @description The ID of the row to update. + */ + row_id: string; +}; + +// Schema definition types for slackLists.create +// https://docs.slack.dev/reference/methods/slackLists.create#schema-definition + +/** + * @description Choice option for select columns. + */ +export interface SlackListsSchemaColumnChoice { + /** + * @description Value for the option. + */ + value: string; + /** + * @description Label of the option to be displayed in the List. + */ + label: string; + /** + * @description Color type. + */ + color: string; +} + +/** + * @description Default values for specific column types. + */ +export interface SlackListsSchemaColumnDefaultValue { + /** + * @description Default user values (encoded user ids) for the people column. + */ + user?: string[]; + /** + * @description Default channel values (encoded channel ids) for the channel column. + */ + channel?: string[]; + /** + * @description Default select values for the select column. These values should be the same ones used in the choices value. + * When defining a select column, you can add up to 100 options. However, you can only add up to 50 for a single cell. + */ + select?: string[]; +} + +/** + * @description Column options for configuring various column types. + */ +export interface SlackListsSchemaColumnOptions { + /** + * @description Used by select columns to specify options. + */ + choices?: SlackListsSchemaColumnChoice[]; + /** + * @description Used by some columns (such as the select column) to specify some options/formatting. + */ + format?: string; + /** + * @description Used by numeric columns to specify number of decimal places. + */ + precision?: number; + /** + * @description Used by date columns to specify the format of the date. + */ + date_format?: string; + /** + * @description The emoji to be displayed e.g., ":smile:". Used by rating and vote columns. + */ + emoji?: string; + /** + * @description The team ID the emoji belongs to. Used by rating columns. + */ + emoji_team_id?: string; + /** + * @description Used by rating columns to specify the maximum rate value. + */ + max?: number; + /** + * @description Default value for some columns. + */ + default_value_typed?: SlackListsSchemaColumnDefaultValue; + /** + * @description Used by people, channel, and canvas columns to specify whether the entity name should be shown. Default is true. + */ + show_member_name?: boolean; + /** + * @description Used by people columns to specify whether the users should be notified when the column is updated. + */ + notify_users?: boolean; +} + +/** + * @description Column definition for a Slack List. + */ +export interface SlackListsSchemaColumn { + /** + * @description Key of the column. + */ + key: string; + /** + * @description Name of the column to be displayed in the List. + */ + name: string; + /** + * @description Type of the column. + */ + type: string; + /** + * @description Whether the column is the primary column. + * Only one column in the List can be the primary column, and it must be a text column. + * In addition, you cannot reassign a different column to be the new primary column, even + * if the new column is also a text column. If you want a new text column to be the primary + * one, it is recommended to export the List to CSV, modify the order, and then create a + * new List from the new CSV with the columns reordered. + */ + is_primary_column?: boolean; + /** + * @description Column options. + */ + options?: SlackListsSchemaColumnOptions; +} + // https://docs.slack.dev/reference/methods/slackLists.access.delete export interface SlackListsAccessDeleteArguments extends TokenOverridable { /** @@ -59,7 +382,7 @@ export interface SlackListsCreateArguments extends TokenOverridable { * @description Column definition for the List. * @see {@link https://docs.slack.dev/reference/methods/slackLists.create#schema-definition} */ - schema?: Array>; + schema?: SlackListsSchemaColumn[]; /** * @description ID of the List to copy. @@ -123,7 +446,7 @@ export interface SlackListsItemsCreateArguments extends TokenOverridable { /** * @description Initial item data. */ - initial_fields?: Array>; + initial_fields?: SlackListsItemField[]; } // https://docs.slack.dev/reference/methods/slackLists.items.delete @@ -201,9 +524,9 @@ export interface SlackListsItemsUpdateArguments extends TokenOverridable { list_id: string; /** - * @description Cells to update. + * @description Cells to update. Each cell includes the row_id, column_id, and field value. */ - cells: Array>; + cells: SlackListsItemCellUpdate[]; } // https://docs.slack.dev/reference/methods/slackLists.update @@ -228,3 +551,360 @@ export interface SlackListsUpdateArguments extends TokenOverridable { */ todo_mode?: boolean; } + +// Response-only types for Slack Lists +// These types are used in API responses and include additional metadata + +/** + * @description Column visibility and position in a view. + */ +export interface SlackListsViewColumn { + /** + * @description Whether the column is visible in this view. + */ + visible: boolean; + /** + * @description The column key. + */ + key: string; + /** + * @description The column ID. + */ + id: string; + /** + * @description The position of the column in the view. + */ + position: string; +} + +/** + * @description A view configuration for a Slack List. + */ +export interface SlackListsView { + /** + * @description The unique identifier for the view. + */ + id: string; + /** + * @description The name of the view. + */ + name: string; + /** + * @description The type of view (e.g., "table", "record"). + */ + type: string; + /** + * @description Whether the view is locked from editing. + */ + is_locked: boolean; + /** + * @description The position of the view. + */ + position: string; + /** + * @description Array of column configurations for this view. + */ + columns: SlackListsViewColumn[]; + /** + * @description Unix timestamp when the view was created. + */ + date_created: number; + /** + * @description User ID of the creator. + */ + created_by: string; + /** + * @description Whether to stick the column to the left. + */ + stick_column_left: boolean; + /** + * @description Whether this is the "all items" view. + */ + is_all_items_view: boolean; + /** + * @description The default view key. + */ + default_view_key?: string; + /** + * @description Whether to show completed items. + */ + show_completed_items?: boolean; +} + +/** + * @description Source information for how the list was created. + */ +export interface SlackListsCreationSource { + /** + * @description The type of creation source (e.g., "copy_from_list"). + */ + type: string; + /** + * @description Reference ID for the source. + */ + reference_id: string; +} + +/** + * @description Limits and counts for various list resources. + */ +export interface SlackListsLimits { + /** + * @description Whether the list has exceeded the maximum row count. + */ + over_row_maximum: boolean; + /** + * @description The maximum number of rows allowed. + */ + row_count_limit: number; + /** + * @description The current number of rows. + */ + row_count: number; + /** + * @description The number of archived rows. + */ + archived_row_count: number; + /** + * @description Whether the list has exceeded the maximum column count. + */ + over_column_maximum: boolean; + /** + * @description The current number of columns. + */ + column_count: number; + /** + * @description The maximum number of columns allowed. + */ + column_count_limit: number; + /** + * @description Whether the list has exceeded the maximum view count. + */ + over_view_maximum: boolean; + /** + * @description The current number of views. + */ + view_count: number; + /** + * @description The maximum number of views allowed. + */ + view_count_limit: number; + /** + * @description The maximum number of attachments per cell. + */ + max_attachments_per_cell: number; +} + +/** + * @description Metadata for a Slack List including schema, views, and configuration. + */ +export interface SlackListsMetadata { + /** + * @description Array of column definitions with IDs. + */ + schema: SlackListsSchemaColumnResponse[]; + /** + * @description Array of view configurations. + */ + views: SlackListsView[]; + /** + * @description Array of integrations. + */ + integrations: unknown[]; + /** + * @description Icon for the list. + */ + icon: string; + /** + * @description Text description of the list. + */ + description: string; + /** + * @description Rich text blocks describing the list. + */ + description_blocks: RichTextBlock[]; + /** + * @description Whether the list is in trial mode. + */ + is_trial: boolean; + /** + * @description Array of column definitions for subtasks. + */ + subtask_schema: SlackListsSchemaColumnResponse[]; + /** + * @description Information about how the list was created. + */ + creation_source?: SlackListsCreationSource; + /** + * @description Whether the list is in todo mode. + */ + todo_mode: boolean; + /** + * @description The default view. + */ + default_view: string; +} + +/** + * @description Column definition returned in responses, includes all schema properties plus an id. + */ +export interface SlackListsSchemaColumnResponse extends SlackListsSchemaColumn { + /** + * @description The unique identifier for the column. + */ + id: string; +} + +/** + * @description A Slack List file object with complete metadata. + */ +export interface SlackList { + /** + * @description The unique identifier for the list. + */ + id: string; + /** + * @description Unix timestamp when the list was created. + */ + created: number; + /** + * @description Unix timestamp of the list. + */ + timestamp: number; + /** + * @description The name of the list file. + */ + name: string; + /** + * @description The display title of the list. + */ + title: string; + /** + * @description The MIME type of the list. + */ + mimetype: string; + /** + * @description The file type. + */ + filetype: string; + /** + * @description Human-readable file type. + */ + pretty_type: string; + /** + * @description User ID of the list owner. + */ + user: string; + /** + * @description Team ID of the user. + */ + user_team: string; + /** + * @description Whether the list is editable. + */ + editable: boolean; + /** + * @description Size of the list in bytes. + */ + size: number; + /** + * @description The mode of the list. + */ + mode: string; + /** + * @description Whether the list is external. + */ + is_external: boolean; + /** + * @description External type if applicable. + */ + external_type: string; + /** + * @description Whether the list is public. + */ + is_public: boolean; + /** + * @description Whether the public URL has been shared. + */ + public_url_shared: boolean; + /** + * @description Whether to display as a bot. + */ + display_as_bot: boolean; + /** + * @description Username if applicable. + */ + username: string; + /** + * @description List metadata including schema and views. + */ + list_metadata: SlackListsMetadata; + /** + * @description Limits and counts for the list. + */ + list_limits: SlackListsLimits; + /** + * @description Private URL for the list. + */ + url_private: string; + /** + * @description Private download URL. + */ + url_private_download: string; + /** + * @description Permalink to the list. + */ + permalink: string; + /** + * @description Public permalink. + */ + permalink_public: string; + /** + * @description User ID of the last editor. + */ + last_editor: string; + /** + * @description CSV download URL. + */ + list_csv_download_url: string; + /** + * @description Unix timestamp of last update. + */ + updated: number; + /** + * @description Whether the list is starred. + */ + is_starred: boolean; + /** + * @description Whether shares were skipped. + */ + skipped_shares: boolean; + /** + * @description Array of team IDs the list is shared with. + */ + teams_shared_with: string[]; + /** + * @description Whether restricted sharing is enabled. + */ + is_restricted_sharing_enabled: boolean; + /** + * @description Whether the list has a rich preview. + */ + has_rich_preview: boolean; + /** + * @description File access level. + */ + file_access: string; + /** + * @description Access level. + */ + access: string; + /** + * @description Organization or workspace access level. + */ + org_or_workspace_access: string; + /** + * @description Whether the list is AI suggested. + */ + is_ai_suggested: boolean; +} diff --git a/packages/web-api/src/types/response/SlackListsCreateResponse.ts b/packages/web-api/src/types/response/SlackListsCreateResponse.ts index a943f109c..684c1517a 100644 --- a/packages/web-api/src/types/response/SlackListsCreateResponse.ts +++ b/packages/web-api/src/types/response/SlackListsCreateResponse.ts @@ -1,8 +1,14 @@ import type { WebAPICallResult } from '../../WebClient'; +import type { SlackListsSchemaColumnResponse } from '../request/slackLists'; export type SlackListsCreateResponse = WebAPICallResult & { error?: string; needed?: string; ok?: boolean; provided?: string; + list_id?: string; + list_metadata?: { + schema?: SlackListsSchemaColumnResponse[]; + subtask_schema?: SlackListsSchemaColumnResponse[]; + }; }; diff --git a/packages/web-api/src/types/response/SlackListsDownloadGetResponse.ts b/packages/web-api/src/types/response/SlackListsDownloadGetResponse.ts index 8e9e97638..f1e2578a6 100644 --- a/packages/web-api/src/types/response/SlackListsDownloadGetResponse.ts +++ b/packages/web-api/src/types/response/SlackListsDownloadGetResponse.ts @@ -5,4 +5,6 @@ export type SlackListsDownloadGetResponse = WebAPICallResult & { needed?: string; ok?: boolean; provided?: string; + status?: string; + download_url?: string; }; diff --git a/packages/web-api/src/types/response/SlackListsDownloadStartResponse.ts b/packages/web-api/src/types/response/SlackListsDownloadStartResponse.ts index e9379ae89..d757708a5 100644 --- a/packages/web-api/src/types/response/SlackListsDownloadStartResponse.ts +++ b/packages/web-api/src/types/response/SlackListsDownloadStartResponse.ts @@ -5,4 +5,5 @@ export type SlackListsDownloadStartResponse = WebAPICallResult & { needed?: string; ok?: boolean; provided?: string; + job_id?: string; }; diff --git a/packages/web-api/src/types/response/SlackListsItemsCreateResponse.ts b/packages/web-api/src/types/response/SlackListsItemsCreateResponse.ts index 404ce2d68..220a5fec5 100644 --- a/packages/web-api/src/types/response/SlackListsItemsCreateResponse.ts +++ b/packages/web-api/src/types/response/SlackListsItemsCreateResponse.ts @@ -1,8 +1,10 @@ import type { WebAPICallResult } from '../../WebClient'; +import type { SlackListsItem } from '../request/slackLists'; export type SlackListsItemsCreateResponse = WebAPICallResult & { error?: string; needed?: string; ok?: boolean; provided?: string; + item?: SlackListsItem; }; diff --git a/packages/web-api/src/types/response/SlackListsItemsInfoResponse.ts b/packages/web-api/src/types/response/SlackListsItemsInfoResponse.ts index 0d25a3635..7e31f7e08 100644 --- a/packages/web-api/src/types/response/SlackListsItemsInfoResponse.ts +++ b/packages/web-api/src/types/response/SlackListsItemsInfoResponse.ts @@ -1,8 +1,12 @@ import type { WebAPICallResult } from '../../WebClient'; +import type { SlackList, SlackListsItem, SlackListsItemWithSubscription } from '../request/slackLists'; export type SlackListsItemsInfoResponse = WebAPICallResult & { error?: string; needed?: string; ok?: boolean; provided?: string; + list?: SlackList; + record?: SlackListsItemWithSubscription; + subtasks?: SlackListsItem[]; }; diff --git a/packages/web-api/src/types/response/SlackListsItemsListResponse.ts b/packages/web-api/src/types/response/SlackListsItemsListResponse.ts index 87a370716..b7741e6af 100644 --- a/packages/web-api/src/types/response/SlackListsItemsListResponse.ts +++ b/packages/web-api/src/types/response/SlackListsItemsListResponse.ts @@ -1,8 +1,13 @@ import type { WebAPICallResult } from '../../WebClient'; +import type { SlackListsItem } from '../request/slackLists'; export type SlackListsItemsListResponse = WebAPICallResult & { error?: string; needed?: string; ok?: boolean; provided?: string; + items?: Array; + response_metadata?: { + next_cursor?: string; + }; }; diff --git a/packages/web-api/test/types/methods/slacklists.test-d.ts b/packages/web-api/test/types/methods/slacklists.test-d.ts index 1ef97cc97..0f8a02274 100644 --- a/packages/web-api/test/types/methods/slacklists.test-d.ts +++ b/packages/web-api/test/types/methods/slacklists.test-d.ts @@ -4,7 +4,6 @@ import { WebClient } from '../../../src/WebClient'; const web = new WebClient('TOKEN'); - // slackLists.access.delete // -- sad path expectError(web.slackLists.access.delete()); // lacking argument From 97df94e7f0709bedd8c94f9ead87e41ac98e4a91 Mon Sep 17 00:00:00 2001 From: Maria Alejandra <104795114+srtaalej@users.noreply.github.com> Date: Tue, 25 Nov 2025 13:40:11 -0500 Subject: [PATCH 20/23] Update packages/web-api/src/types/request/slackLists.ts Co-authored-by: Michael Brooks --- .../web-api/src/types/request/slackLists.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/web-api/src/types/request/slackLists.ts b/packages/web-api/src/types/request/slackLists.ts index 73b5d832b..474ae426d 100644 --- a/packages/web-api/src/types/request/slackLists.ts +++ b/packages/web-api/src/types/request/slackLists.ts @@ -137,21 +137,21 @@ export interface SlackListsItemFieldReference { * @description Union type of all possible Slack Lists item field types. */ export type SlackListsItemField = - | SlackListsItemFieldRichText - | SlackListsItemFieldUser - | SlackListsItemFieldDate - | SlackListsItemFieldSelect + | SlackListsItemFieldAttachment + | SlackListsItemFieldChannel | SlackListsItemFieldCheckbox - | SlackListsItemFieldNumber + | SlackListsItemFieldDate | SlackListsItemFieldEmail - | SlackListsItemFieldPhone - | SlackListsItemFieldAttachment | SlackListsItemFieldLink | SlackListsItemFieldMessage + | SlackListsItemFieldNumber + | SlackListsItemFieldPhone | SlackListsItemFieldRating + | SlackListsItemFieldReference + | SlackListsItemFieldRichText + | SlackListsItemFieldSelect | SlackListsItemFieldTimestamp - | SlackListsItemFieldChannel - | SlackListsItemFieldReference; + | SlackListsItemFieldUser; /** * @description Slack Lists item structure. From d563d53b142e78cc0765fb12bcfbfbc5a9983e4b Mon Sep 17 00:00:00 2001 From: Maria Alejandra <104795114+srtaalej@users.noreply.github.com> Date: Tue, 25 Nov 2025 13:40:34 -0500 Subject: [PATCH 21/23] Update packages/web-api/src/types/request/slackLists.ts Co-authored-by: Michael Brooks --- packages/web-api/src/types/request/slackLists.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web-api/src/types/request/slackLists.ts b/packages/web-api/src/types/request/slackLists.ts index 474ae426d..5b54cdb3d 100644 --- a/packages/web-api/src/types/request/slackLists.ts +++ b/packages/web-api/src/types/request/slackLists.ts @@ -208,7 +208,7 @@ export type SlackListsItemCellUpdate = SlackListsItemField & { row_id: string; }; -// Schema definition types for slackLists.create +// Schema definition types for slackLists.create: // https://docs.slack.dev/reference/methods/slackLists.create#schema-definition /** From bc3ffb79f56ba107dc55de6c0de416a6fc14629b Mon Sep 17 00:00:00 2001 From: Maria Alejandra <104795114+srtaalej@users.noreply.github.com> Date: Tue, 25 Nov 2025 13:40:42 -0500 Subject: [PATCH 22/23] Update packages/web-api/src/types/request/slackLists.ts Co-authored-by: Michael Brooks --- packages/web-api/src/types/request/slackLists.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web-api/src/types/request/slackLists.ts b/packages/web-api/src/types/request/slackLists.ts index 5b54cdb3d..f5f68e94e 100644 --- a/packages/web-api/src/types/request/slackLists.ts +++ b/packages/web-api/src/types/request/slackLists.ts @@ -2,7 +2,7 @@ import type { RichTextBlock } from '@slack/types'; import type { TokenOverridable } from './common'; -// Field type definitions for Slack Lists items +// Field type definitions for Slack Lists items: // https://docs.slack.dev/reference/methods/slackLists.items.create#field-types /** From 921f023a715e4893da89e2b8c9efd978ec86aca0 Mon Sep 17 00:00:00 2001 From: Ale Mercado Date: Tue, 25 Nov 2025 14:00:29 -0500 Subject: [PATCH 23/23] fix: alphabetize exports --- .../web-api/src/types/request/slackLists.ts | 408 +++++++++--------- 1 file changed, 204 insertions(+), 204 deletions(-) diff --git a/packages/web-api/src/types/request/slackLists.ts b/packages/web-api/src/types/request/slackLists.ts index f5f68e94e..21cc8d431 100644 --- a/packages/web-api/src/types/request/slackLists.ts +++ b/packages/web-api/src/types/request/slackLists.ts @@ -6,19 +6,27 @@ import type { TokenOverridable } from './common'; // https://docs.slack.dev/reference/methods/slackLists.items.create#field-types /** - * @description Text field with rich text formatting. + * @description Attachment field with file IDs. */ -export interface SlackListsItemFieldRichText { +export interface SlackListsItemFieldAttachment { column_id: string; - rich_text: RichTextBlock[]; + attachment: string[]; } /** - * @description User field containing user IDs. + * @description Channel field with channel IDs. */ -export interface SlackListsItemFieldUser { +export interface SlackListsItemFieldChannel { column_id: string; - user: string[]; + channel: string[]; +} + +/** + * @description Checkbox field with boolean value. + */ +export interface SlackListsItemFieldCheckbox { + column_id: string; + checkbox: boolean; } /** @@ -30,35 +38,39 @@ export interface SlackListsItemFieldDate { } /** - * @description Select field with option IDs. + * @description Email field with email addresses. */ -export interface SlackListsItemFieldSelect { +export interface SlackListsItemFieldEmail { column_id: string; - select: string[]; + email: string[]; } /** - * @description Checkbox field with boolean value. + * @description Link field with URL data. */ -export interface SlackListsItemFieldCheckbox { +export interface SlackListsItemFieldLink { column_id: string; - checkbox: boolean; + link: Array<{ + original_url: string; + display_as_url: boolean; + display_name: string; + }>; } /** - * @description Number field with numeric values. + * @description Message field with message URLs. */ -export interface SlackListsItemFieldNumber { +export interface SlackListsItemFieldMessage { column_id: string; - number: number[]; + message: string[]; } /** - * @description Email field with email addresses. + * @description Number field with numeric values. */ -export interface SlackListsItemFieldEmail { +export interface SlackListsItemFieldNumber { column_id: string; - email: string[]; + number: number[]; } /** @@ -70,39 +82,39 @@ export interface SlackListsItemFieldPhone { } /** - * @description Attachment field with file IDs. + * @description Rating field with numeric rating values. */ -export interface SlackListsItemFieldAttachment { +export interface SlackListsItemFieldRating { column_id: string; - attachment: string[]; + rating: number[]; } /** - * @description Link field with URL data. + * @description Reference field with file references. */ -export interface SlackListsItemFieldLink { +export interface SlackListsItemFieldReference { column_id: string; - link: Array<{ - original_url: string; - display_as_url: boolean; - display_name: string; + reference: Array<{ + file: { + file_id: string; + }; }>; } /** - * @description Message field with message URLs. + * @description Text field with rich text formatting. */ -export interface SlackListsItemFieldMessage { +export interface SlackListsItemFieldRichText { column_id: string; - message: string[]; + rich_text: RichTextBlock[]; } /** - * @description Rating field with numeric rating values. + * @description Select field with option IDs. */ -export interface SlackListsItemFieldRating { +export interface SlackListsItemFieldSelect { column_id: string; - rating: number[]; + select: string[]; } /** @@ -114,23 +126,11 @@ export interface SlackListsItemFieldTimestamp { } /** - * @description Channel field with channel IDs. - */ -export interface SlackListsItemFieldChannel { - column_id: string; - channel: string[]; -} - -/** - * @description Reference field with file references. + * @description User field containing user IDs. */ -export interface SlackListsItemFieldReference { +export interface SlackListsItemFieldUser { column_id: string; - reference: Array<{ - file: { - file_id: string; - }; - }>; + user: string[]; } /** @@ -556,79 +556,157 @@ export interface SlackListsUpdateArguments extends TokenOverridable { // These types are used in API responses and include additional metadata /** - * @description Column visibility and position in a view. + * @description A Slack List file object with complete metadata. */ -export interface SlackListsViewColumn { +export interface SlackList { /** - * @description Whether the column is visible in this view. + * @description The unique identifier for the list. */ - visible: boolean; + id: string; /** - * @description The column key. + * @description Unix timestamp when the list was created. */ - key: string; + created: number; /** - * @description The column ID. + * @description Unix timestamp of the list. */ - id: string; + timestamp: number; /** - * @description The position of the column in the view. + * @description The name of the list file. */ - position: string; -} - -/** - * @description A view configuration for a Slack List. - */ -export interface SlackListsView { + name: string; /** - * @description The unique identifier for the view. + * @description The display title of the list. */ - id: string; + title: string; /** - * @description The name of the view. + * @description The MIME type of the list. */ - name: string; + mimetype: string; /** - * @description The type of view (e.g., "table", "record"). + * @description The file type. */ - type: string; + filetype: string; /** - * @description Whether the view is locked from editing. + * @description Human-readable file type. */ - is_locked: boolean; + pretty_type: string; /** - * @description The position of the view. + * @description User ID of the list owner. */ - position: string; + user: string; /** - * @description Array of column configurations for this view. + * @description Team ID of the user. */ - columns: SlackListsViewColumn[]; + user_team: string; /** - * @description Unix timestamp when the view was created. + * @description Whether the list is editable. */ - date_created: number; + editable: boolean; /** - * @description User ID of the creator. + * @description Size of the list in bytes. */ - created_by: string; + size: number; /** - * @description Whether to stick the column to the left. + * @description The mode of the list. */ - stick_column_left: boolean; + mode: string; /** - * @description Whether this is the "all items" view. + * @description Whether the list is external. */ - is_all_items_view: boolean; + is_external: boolean; /** - * @description The default view key. + * @description External type if applicable. */ - default_view_key?: string; + external_type: string; /** - * @description Whether to show completed items. + * @description Whether the list is public. */ - show_completed_items?: boolean; + is_public: boolean; + /** + * @description Whether the public URL has been shared. + */ + public_url_shared: boolean; + /** + * @description Whether to display as a bot. + */ + display_as_bot: boolean; + /** + * @description Username if applicable. + */ + username: string; + /** + * @description List metadata including schema and views. + */ + list_metadata: SlackListsMetadata; + /** + * @description Limits and counts for the list. + */ + list_limits: SlackListsLimits; + /** + * @description Private URL for the list. + */ + url_private: string; + /** + * @description Private download URL. + */ + url_private_download: string; + /** + * @description Permalink to the list. + */ + permalink: string; + /** + * @description Public permalink. + */ + permalink_public: string; + /** + * @description User ID of the last editor. + */ + last_editor: string; + /** + * @description CSV download URL. + */ + list_csv_download_url: string; + /** + * @description Unix timestamp of last update. + */ + updated: number; + /** + * @description Whether the list is starred. + */ + is_starred: boolean; + /** + * @description Whether shares were skipped. + */ + skipped_shares: boolean; + /** + * @description Array of team IDs the list is shared with. + */ + teams_shared_with: string[]; + /** + * @description Whether restricted sharing is enabled. + */ + is_restricted_sharing_enabled: boolean; + /** + * @description Whether the list has a rich preview. + */ + has_rich_preview: boolean; + /** + * @description File access level. + */ + file_access: string; + /** + * @description Access level. + */ + access: string; + /** + * @description Organization or workspace access level. + */ + org_or_workspace_access: string; + /** + * @description Whether the list is AI suggested. + */ + is_ai_suggested: boolean; } /** @@ -756,155 +834,77 @@ export interface SlackListsSchemaColumnResponse extends SlackListsSchemaColumn { } /** - * @description A Slack List file object with complete metadata. + * @description A view configuration for a Slack List. */ -export interface SlackList { +export interface SlackListsView { /** - * @description The unique identifier for the list. + * @description The unique identifier for the view. */ id: string; /** - * @description Unix timestamp when the list was created. - */ - created: number; - /** - * @description Unix timestamp of the list. - */ - timestamp: number; - /** - * @description The name of the list file. + * @description The name of the view. */ name: string; /** - * @description The display title of the list. - */ - title: string; - /** - * @description The MIME type of the list. - */ - mimetype: string; - /** - * @description The file type. - */ - filetype: string; - /** - * @description Human-readable file type. - */ - pretty_type: string; - /** - * @description User ID of the list owner. - */ - user: string; - /** - * @description Team ID of the user. - */ - user_team: string; - /** - * @description Whether the list is editable. - */ - editable: boolean; - /** - * @description Size of the list in bytes. - */ - size: number; - /** - * @description The mode of the list. - */ - mode: string; - /** - * @description Whether the list is external. - */ - is_external: boolean; - /** - * @description External type if applicable. - */ - external_type: string; - /** - * @description Whether the list is public. - */ - is_public: boolean; - /** - * @description Whether the public URL has been shared. - */ - public_url_shared: boolean; - /** - * @description Whether to display as a bot. - */ - display_as_bot: boolean; - /** - * @description Username if applicable. - */ - username: string; - /** - * @description List metadata including schema and views. - */ - list_metadata: SlackListsMetadata; - /** - * @description Limits and counts for the list. - */ - list_limits: SlackListsLimits; - /** - * @description Private URL for the list. - */ - url_private: string; - /** - * @description Private download URL. - */ - url_private_download: string; - /** - * @description Permalink to the list. + * @description The type of view (e.g., "table", "record"). */ - permalink: string; + type: string; /** - * @description Public permalink. + * @description Whether the view is locked from editing. */ - permalink_public: string; + is_locked: boolean; /** - * @description User ID of the last editor. + * @description The position of the view. */ - last_editor: string; + position: string; /** - * @description CSV download URL. + * @description Array of column configurations for this view. */ - list_csv_download_url: string; + columns: SlackListsViewColumn[]; /** - * @description Unix timestamp of last update. + * @description Unix timestamp when the view was created. */ - updated: number; + date_created: number; /** - * @description Whether the list is starred. + * @description User ID of the creator. */ - is_starred: boolean; + created_by: string; /** - * @description Whether shares were skipped. + * @description Whether to stick the column to the left. */ - skipped_shares: boolean; + stick_column_left: boolean; /** - * @description Array of team IDs the list is shared with. + * @description Whether this is the "all items" view. */ - teams_shared_with: string[]; + is_all_items_view: boolean; /** - * @description Whether restricted sharing is enabled. + * @description The default view key. */ - is_restricted_sharing_enabled: boolean; + default_view_key?: string; /** - * @description Whether the list has a rich preview. + * @description Whether to show completed items. */ - has_rich_preview: boolean; + show_completed_items?: boolean; +} + +/** + * @description Column visibility and position in a view. + */ +export interface SlackListsViewColumn { /** - * @description File access level. + * @description Whether the column is visible in this view. */ - file_access: string; + visible: boolean; /** - * @description Access level. + * @description The column key. */ - access: string; + key: string; /** - * @description Organization or workspace access level. + * @description The column ID. */ - org_or_workspace_access: string; + id: string; /** - * @description Whether the list is AI suggested. + * @description The position of the column in the view. */ - is_ai_suggested: boolean; + position: string; }