diff --git a/apps/client-ts/src/app/(Dashboard)/configuration/page.tsx b/apps/client-ts/src/app/(Dashboard)/configuration/page.tsx index 01c866fa0..17183a098 100644 --- a/apps/client-ts/src/app/(Dashboard)/configuration/page.tsx +++ b/apps/client-ts/src/app/(Dashboard)/configuration/page.tsx @@ -30,7 +30,6 @@ import useFieldMappings from "@/hooks/get/useFieldMappings"; import { Skeleton } from "@/components/ui/skeleton"; import { useState } from "react"; import AddWebhook from "@/components/Configuration/Webhooks/AddWebhook"; -import { cn } from "@/lib/utils"; import { WebhooksPage } from "@/components/Configuration/Webhooks/WebhooksPage"; import useWebhooks from "@/hooks/get/useWebhooks"; import { usePostHog } from 'posthog-js/react' @@ -40,7 +39,6 @@ import useConnectionStrategies from "@/hooks/get/useConnectionStrategies"; import { extractAuthMode,extractProvider,extractVertical} from '@panora/shared' import { Heading } from "@/components/ui/heading"; import CustomConnectorPage from "@/components/Configuration/Connector/CustomConnectorPage"; -import { PlusCircle } from "lucide-react"; export default function Page() { const {idProject} = useProjectStore(); @@ -94,15 +92,6 @@ export default function Page() { destination_field: mapping.slug, data_type: mapping.data_type, })) - - const mappingConnectionStrategies = connectionStrategies?.map(cs => ({ - id_cs : cs.id_connection_strategy, - provider_name : extractProvider(cs.type), - auth_type: extractAuthMode(cs.type), - vertical: extractVertical(cs.type), - type: cs.type, - status: cs.status - })) return ( diff --git a/apps/client-ts/src/components/Configuration/Webhooks/WebhooksPage.tsx b/apps/client-ts/src/components/Configuration/Webhooks/WebhooksPage.tsx index 38f1f766f..ca4540ebc 100644 --- a/apps/client-ts/src/components/Configuration/Webhooks/WebhooksPage.tsx +++ b/apps/client-ts/src/components/Configuration/Webhooks/WebhooksPage.tsx @@ -6,10 +6,10 @@ import { DataTableLoading } from "@/components/shared/data-table-loading"; import { useEffect, useState } from "react"; import { useColumns } from "./columns"; -interface Webhook { - scope: string; +export interface Webhook { + scope: string[]; url: string; - endpoint_description: string; + endpoint_description: string | null; secret: string; id_webhook_endpoint: string; active: boolean; diff --git a/apps/client-ts/src/components/Configuration/Webhooks/columns.tsx b/apps/client-ts/src/components/Configuration/Webhooks/columns.tsx index 633c6b610..f343ccaf3 100644 --- a/apps/client-ts/src/components/Configuration/Webhooks/columns.tsx +++ b/apps/client-ts/src/components/Configuration/Webhooks/columns.tsx @@ -3,7 +3,6 @@ import { ColumnDef } from "@tanstack/react-table" import { Badge } from "@/components/ui/badge" -import { Webhook } from "./schema" import { PasswordInput } from "@/components/ui/password-input" import { useState } from "react" import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip" @@ -12,19 +11,10 @@ import { DataTableColumnHeader } from "@/components/shared/data-table-column-hea import { DataTableRowActions } from "@/components/shared/data-table-row-actions" import { Switch } from "@/components/ui/switch" import useUpdateWebhookStatus from "@/hooks/update/useUpdateWebhookStatus" -import { Input } from "@/components/ui/input" -import { Archive } from "lucide-react" +import { Webhook } from "./WebhooksPage" -interface WebhookType { - scope: string; - url: string; - endpoint_description: string; - secret: string; - id_webhook_endpoint: string; - active: boolean; -} -export function useColumns(webhooks: WebhookType[] | undefined, setWebhooks: React.Dispatch>) { +export function useColumns(webhooks: Webhook[] | undefined, setWebhooks: React.Dispatch>) { const [copiedState, setCopiedState] = useState<{ [key: string]: boolean }>({}); const { mutate } = useUpdateWebhookStatus(); @@ -185,5 +175,5 @@ export function useColumns(webhooks: WebhookType[] | undefined, setWebhooks: Rea id: "actions", cell: ({ row }) => , }, - ] as ColumnDef[]; + ] as ColumnDef[]; }