diff --git a/apps/web/components/add-document/connections.tsx b/apps/web/components/add-document/connections.tsx index 7aa0250d..fd24b7db 100644 --- a/apps/web/components/add-document/connections.tsx +++ b/apps/web/components/add-document/connections.tsx @@ -4,7 +4,7 @@ import { $fetch } from "@lib/api" import { hasActivePlan } from "@lib/queries" import type { ConnectionResponseSchema } from "@repo/validation/api" import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query" -import { GoogleDrive, Notion, OneDrive } from "@ui/assets/icons" +import { GoogleDrive, Notion, OneDrive, Slack } from "@ui/assets/icons" import { useCustomer } from "autumn-js/react" import { Check, @@ -48,7 +48,7 @@ const GDRIVE_SCOPE_LABELS: Record = { type Connection = z.infer -type ConnectorProvider = "google-drive" | "notion" | "onedrive" +type ConnectorProvider = "google-drive" | "notion" | "onedrive" | "slack" const CONNECTORS: Record< ConnectorProvider, @@ -77,6 +77,12 @@ const CONNECTORS: Record< documentLabel: "documents", icon: OneDrive, }, + slack: { + title: "Slack", + description: "Sync messages and threads from selected channels", + documentLabel: "channels", + icon: Slack, + }, } as const /** Extract typed metadata from a connection, with runtime validation. */ @@ -753,6 +759,23 @@ export function ConnectContent({ selectedProject }: ConnectContentProps) { + { + setConnectingProvider("slack") + addConnectionMutation.mutate({ provider: "slack" }) + }} + className="flex items-start gap-2.5 px-3 py-2.5 rounded-md cursor-pointer text-white opacity-60 hover:opacity-100 hover:bg-[#293952]/40 focus:bg-[#293952]/40 focus:opacity-100" + > + +
+ + Slack + + + Messages & threads + +
+