-
Notifications
You must be signed in to change notification settings - Fork 681
feat(web-api): add slackLists methods #2421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 9 commits
344a6f7
978d804
a9b6e48
a0a0cd6
03cbe0c
1b533e4
df7fd7c
eb931b1
a2657f5
84a637f
addd47c
ce85222
7f949d9
3064b3e
c44fc91
a9b332b
31fbb6d
1391ed1
a370016
583f403
ba67783
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 | ||
srtaalej marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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; | ||
| }; | ||
srtaalej marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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; | ||
| }; |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔏 note: Let's revisit these responses after a
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚧 issue: Not having all response types can cause issues with
|
| 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; | ||
| }; |
| 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; | ||
| }; |
Uh oh!
There was an error while loading. Please reload this page.