Skip to content
111 changes: 111 additions & 0 deletions packages/web-api/src/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,18 @@ import type {
SearchAllArguments,
SearchFilesArguments,
SearchMessagesArguments,
SlackListsAccessDeleteArguments,
SlackListsAccessSetArguments,
SlackListsCreateArguments,
SlackListsDownloadGetArguments,
SlackListsDownloadStartArguments,
SlackListsItemsCreateArguments,
SlackListsItemsDeleteArguments,
SlackListsItemsDeleteMultipleArguments,
SlackListsItemsInfoArguments,
SlackListsItemsListArguments,
SlackListsItemsUpdateArguments,
SlackListsUpdateArguments,
StarsAddRemoveArguments,
StarsListArguments,
TeamAccessLogsArguments,
Expand Down Expand Up @@ -479,6 +491,18 @@ import type {
SearchAllResponse,
SearchFilesResponse,
SearchMessagesResponse,
SlackListsAccessDeleteResponse,
SlackListsAccessSetResponse,
SlackListsCreateResponse,
SlackListsDownloadGetResponse,
SlackListsDownloadStartResponse,
SlackListsItemsCreateResponse,
SlackListsItemsDeleteMultipleResponse,
SlackListsItemsDeleteResponse,
SlackListsItemsInfoResponse,
SlackListsItemsListResponse,
SlackListsItemsUpdateResponse,
SlackListsUpdateResponse,
StarsAddResponse,
StarsListResponse,
StarsRemoveResponse,
Expand Down Expand Up @@ -2173,6 +2197,93 @@ export abstract class Methods extends EventEmitter<WebClientEvent> {
messages: bindApiCall<SearchMessagesArguments, SearchMessagesResponse>(this, 'search.messages'),
};

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<SlackListsAccessDeleteArguments, SlackListsAccessDeleteResponse>(
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<SlackListsAccessSetArguments, SlackListsAccessSetResponse>(this, 'slackLists.access.set'),
},
/**
* @description Create a List.
* @see {@link https://docs.slack.dev/reference/methods/slackLists.create `slackLists.create` API reference}.
*/
create: bindApiCall<SlackListsCreateArguments, SlackListsCreateResponse>(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<SlackListsDownloadGetArguments, SlackListsDownloadGetResponse>(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<SlackListsDownloadStartArguments, SlackListsDownloadStartResponse>(
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<SlackListsItemsCreateArguments, SlackListsItemsCreateResponse>(
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<SlackListsItemsDeleteArguments, SlackListsItemsDeleteResponse>(
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<SlackListsItemsDeleteMultipleArguments, SlackListsItemsDeleteMultipleResponse>(
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<SlackListsItemsInfoArguments, SlackListsItemsInfoResponse>(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<SlackListsItemsListArguments, SlackListsItemsListResponse>(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<SlackListsItemsUpdateArguments, SlackListsItemsUpdateResponse>(
this,
'slackLists.items.update',
),
},
/**
* @description Update a list.
* @see {@link https://docs.slack.dev/reference/methods/slackLists.update `slackLists.update` API reference}.
*/
update: bindApiCall<SlackListsUpdateArguments, SlackListsUpdateResponse>(this, 'slackLists.update'),
};

public readonly team = {
/**
* @description Gets the access logs for the current team.
Expand Down
14 changes: 14 additions & 0 deletions packages/web-api/src/types/request/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +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 {
StarsAddRemoveArguments,
StarsListArguments,
Expand Down
89 changes: 89 additions & 0 deletions packages/web-api/src/types/request/slacklists.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
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;
description_blocks?: Array<RichTextBlock>;
schema?: Array<Record<string, unknown>>;
copy_from_list_id?: string;
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<Record<string, unknown>>;
}

// 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<Record<string, unknown>>;
}

// https://docs.slack.dev/reference/methods/slackLists.update
export interface SlackListsUpdateArguments extends TokenOverridable {
id: string;
name?: string;
description_blocks?: Array<RichTextBlock>;
todo_mode?: boolean;
}
Original file line number Diff line number Diff line change
@@ -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;
};
Original file line number Diff line number Diff line change
@@ -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;
};
10 changes: 10 additions & 0 deletions packages/web-api/src/types/response/SlackListsCreateResponse.ts
Original file line number Diff line number Diff line change
@@ -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;
};
Original file line number Diff line number Diff line change
@@ -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;
};
Original file line number Diff line number Diff line change
@@ -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;
};
Original file line number Diff line number Diff line change
@@ -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;
};
Original file line number Diff line number Diff line change
@@ -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;
};
Original file line number Diff line number Diff line change
@@ -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;
};
Original file line number Diff line number Diff line change
@@ -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;
};
Original file line number Diff line number Diff line change
@@ -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;
};
Original file line number Diff line number Diff line change
@@ -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;
};
10 changes: 10 additions & 0 deletions packages/web-api/src/types/response/SlackListsUpdateResponse.ts
Original file line number Diff line number Diff line change
@@ -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;
};
12 changes: 12 additions & 0 deletions packages/web-api/src/types/response/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,18 @@ export { RtmStartResponse } from './RtmStartResponse';
export { SearchAllResponse } from './SearchAllResponse';
export { SearchFilesResponse } from './SearchFilesResponse';
export { SearchMessagesResponse } from './SearchMessagesResponse';
export { SlackListsAccessDeleteResponse } from './SlackListsAccessDeleteResponse';
export { SlackListsAccessSetResponse } from './SlackListsAccessSetResponse';
export { SlackListsCreateResponse } from './SlackListsCreateResponse';
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';
Expand Down
Loading
Loading