import { integrationScope as scope } from "../../../automation/integrations" export const SLACK_CHAT_WRITE_SCOPE = "chat:write" export const SLACK_CHAT_WRITE_PUBLIC_SCOPE = "chat:write.public" export const SLACK_APP_MENTIONS_READ_SCOPE = "app_mentions:read" export const SLACK_CHANNELS_READ_SCOPE = "channels:read" export const SLACK_CHANNELS_JOIN_SCOPE = "channels:join" export const SLACK_CHANNELS_MANAGE_SCOPE = "channels:manage" export const SLACK_GROUPS_READ_SCOPE = "groups:read" export const SLACK_IM_READ_SCOPE = "im:read" export const SLACK_MPIM_READ_SCOPE = "mpim:read" export const SLACK_USERS_READ_SCOPE = "users:read" export const SLACK_IM_WRITE_SCOPE = "im:write" export const SLACK_REACTIONS_WRITE_SCOPE = "reactions:write" export const SLACK_REACTIONS_READ_SCOPE = "reactions:read" export const SLACK_FILES_WRITE_SCOPE = "files:write" export const SLACK_FILES_READ_SCOPE = "files:read" export const SLACK_PINS_READ_SCOPE = "pins:read" export const SLACK_PINS_WRITE_SCOPE = "pins:write" export const SLACK_BOOKMARKS_READ_SCOPE = "bookmarks:read" export const SLACK_BOOKMARKS_WRITE_SCOPE = "bookmarks:write" export const SLACK_USERS_READ_EMAIL_SCOPE = "users:read.email" export const SLACK_USERS_PROFILE_READ_SCOPE = "users.profile:read" export const SLACK_EMOJI_READ_SCOPE = "emoji:read" export const SLACK_TEAM_READ_SCOPE = "team:read" export const SLACK_USERGROUPS_READ_SCOPE = "usergroups:read" export const SLACK_USERGROUPS_WRITE_SCOPE = "usergroups:write" export const SLACK_MPIM_WRITE_SCOPE = "mpim:write" export const SLACK_PUBLIC_CHANNEL_MANAGE_REQUIREMENT = SLACK_CHANNELS_MANAGE_SCOPE export const SLACK_USERS_READ_EMAIL_REQUIREMENT = scope.and( SLACK_USERS_READ_SCOPE, SLACK_USERS_READ_EMAIL_SCOPE, ) export const SLACK_PUBLIC_CHANNEL_INVITE_REQUIREMENT = scope.any( SLACK_CHANNELS_MANAGE_SCOPE, "channels:write.invites", ) export const SLACK_PUBLIC_CHANNEL_TOPIC_REQUIREMENT = scope.any( SLACK_CHANNELS_MANAGE_SCOPE, "channels:write.topic", ) export const SLACK_PRIVATE_CHANNEL_WRITE_SCOPE = "groups:write" export const SLACK_PRIVATE_CHANNEL_INVITE_REQUIREMENT = scope.any( SLACK_PRIVATE_CHANNEL_WRITE_SCOPE, "groups:write.invites", ) export const SLACK_PRIVATE_CHANNEL_TOPIC_REQUIREMENT = scope.any( SLACK_PRIVATE_CHANNEL_WRITE_SCOPE, "groups:write.topic", ) /** Posting requires membership; `chat:write.public` is an optional override. */ export const SLACK_MESSAGE_WRITE_REQUIREMENT = SLACK_CHAT_WRITE_SCOPE /** Posting to a public channel without joining requires both chat scopes. */ export const SLACK_PUBLIC_MESSAGE_WRITE_REQUIREMENT = scope.and( SLACK_CHAT_WRITE_SCOPE, SLACK_CHAT_WRITE_PUBLIC_SCOPE, ) export const SLACK_CONVERSATION_READ_REQUIREMENT = scope.and( SLACK_CHANNELS_READ_SCOPE, SLACK_GROUPS_READ_SCOPE, SLACK_IM_READ_SCOPE, SLACK_MPIM_READ_SCOPE, ) export const SLACK_CHANNEL_READ_REQUIREMENT = scope.and( SLACK_CHANNELS_READ_SCOPE, SLACK_GROUPS_READ_SCOPE, ) export const SLACK_CONVERSATION_HISTORY_REQUIREMENT = scope.and( "channels:history", "groups:history", "im:history", "mpim:history", )