mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-24 21:38:09 +02:00
feat: add endpoint to fetch Slack channels with bot membership status and update UI to display channels
This commit is contained in:
parent
eaf0a454b1
commit
59dd9554b3
4 changed files with 296 additions and 3 deletions
|
|
@ -203,6 +203,25 @@ export const listGoogleDriveFoldersResponse = z.object({
|
|||
items: z.array(googleDriveItem),
|
||||
});
|
||||
|
||||
/**
|
||||
* Slack channel with bot membership status
|
||||
*/
|
||||
export const slackChannel = z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
is_private: z.boolean(),
|
||||
is_member: z.boolean(),
|
||||
});
|
||||
|
||||
/**
|
||||
* List Slack channels
|
||||
*/
|
||||
export const listSlackChannelsRequest = z.object({
|
||||
connector_id: z.number(),
|
||||
});
|
||||
|
||||
export const listSlackChannelsResponse = z.array(slackChannel);
|
||||
|
||||
// Inferred types
|
||||
export type SearchSourceConnectorType = z.infer<typeof searchSourceConnectorTypeEnum>;
|
||||
export type SearchSourceConnector = z.infer<typeof searchSourceConnector>;
|
||||
|
|
@ -223,3 +242,6 @@ export type ListGitHubRepositoriesResponse = z.infer<typeof listGitHubRepositori
|
|||
export type ListGoogleDriveFoldersRequest = z.infer<typeof listGoogleDriveFoldersRequest>;
|
||||
export type ListGoogleDriveFoldersResponse = z.infer<typeof listGoogleDriveFoldersResponse>;
|
||||
export type GoogleDriveItem = z.infer<typeof googleDriveItem>;
|
||||
export type SlackChannel = z.infer<typeof slackChannel>;
|
||||
export type ListSlackChannelsRequest = z.infer<typeof listSlackChannelsRequest>;
|
||||
export type ListSlackChannelsResponse = z.infer<typeof listSlackChannelsResponse>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue