From b995358b7e4b1485e1f86c9b3417a0f809b10114 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard Date: Wed, 26 Feb 2025 23:40:18 +0900 Subject: [PATCH] fix: type fixes --- backend/src/ee/routes/v1/secret-approval-request-router.ts | 1 - backend/src/ee/routes/v1/snapshot-router.ts | 1 - .../ee/services/ssh-certificate/ssh-certificate-schema.ts | 1 - .../organization/SecretSharingPage/ShareSecretSection.tsx | 5 ----- .../organization/SecretSharingPage/components/index.tsx | 1 - .../components/SecretListView/SecretListView.tsx | 2 +- 6 files changed, 1 insertion(+), 10 deletions(-) delete mode 100644 frontend/src/pages/organization/SecretSharingPage/components/index.tsx diff --git a/backend/src/ee/routes/v1/secret-approval-request-router.ts b/backend/src/ee/routes/v1/secret-approval-request-router.ts index fe4d8ee81..c6998f105 100644 --- a/backend/src/ee/routes/v1/secret-approval-request-router.ts +++ b/backend/src/ee/routes/v1/secret-approval-request-router.ts @@ -235,7 +235,6 @@ export const registerSecretApprovalRequestRouter = async (server: FastifyZodProv const tagSchema = SecretTagsSchema.pick({ id: true, slug: true, - name: true, color: true }) .array() diff --git a/backend/src/ee/routes/v1/snapshot-router.ts b/backend/src/ee/routes/v1/snapshot-router.ts index a716aabd7..fc2d25712 100644 --- a/backend/src/ee/routes/v1/snapshot-router.ts +++ b/backend/src/ee/routes/v1/snapshot-router.ts @@ -35,7 +35,6 @@ export const registerSnapshotRouter = async (server: FastifyZodProvider) => { tags: SecretTagsSchema.pick({ id: true, slug: true, - name: true, color: true }).array() }) diff --git a/backend/src/ee/services/ssh-certificate/ssh-certificate-schema.ts b/backend/src/ee/services/ssh-certificate/ssh-certificate-schema.ts index 9c3b7a392..cf8d59d8c 100644 --- a/backend/src/ee/services/ssh-certificate/ssh-certificate-schema.ts +++ b/backend/src/ee/services/ssh-certificate/ssh-certificate-schema.ts @@ -6,7 +6,6 @@ export const sanitizedSshCertificate = SshCertificatesSchema.pick({ sshCertificateTemplateId: true, serialNumber: true, certType: true, - publicKey: true, principals: true, keyId: true, notBefore: true, diff --git a/frontend/src/pages/organization/SecretSharingPage/ShareSecretSection.tsx b/frontend/src/pages/organization/SecretSharingPage/ShareSecretSection.tsx index 156f4cbb5..5e75af445 100644 --- a/frontend/src/pages/organization/SecretSharingPage/ShareSecretSection.tsx +++ b/frontend/src/pages/organization/SecretSharingPage/ShareSecretSection.tsx @@ -1,24 +1,19 @@ import { Helmet } from "react-helmet"; import { useNavigate, useSearch } from "@tanstack/react-router"; -import { createNotification } from "@app/components/notifications"; import { Tab, TabList, TabPanel, Tabs } from "@app/components/v2"; import { ROUTE_PATHS } from "@app/const/routes"; import { usePopUp } from "@app/hooks"; -import { useDeleteSharedSecret } from "@app/hooks/api/secretSharing"; import { RequestSecretTab } from "./components/RequestSecret/RequestSecretTab"; import { ShareSecretTab } from "./components/ShareSecret/ShareSecretTab"; -type DeleteModalData = { name: string; id: string }; - enum SecretSharingPageTabs { ShareSecret = "share-secret", RequestSecret = "request-secret" } export const ShareSecretSection = () => { - const deleteSharedSecret = useDeleteSharedSecret(); const { popUp, handlePopUpToggle, handlePopUpClose, handlePopUpOpen } = usePopUp([ "createSharedSecret", "deleteSharedSecretConfirmation", diff --git a/frontend/src/pages/organization/SecretSharingPage/components/index.tsx b/frontend/src/pages/organization/SecretSharingPage/components/index.tsx deleted file mode 100644 index 64a0c2774..000000000 --- a/frontend/src/pages/organization/SecretSharingPage/components/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export { ShareSecretSection } from "./ShareSecretSection"; diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretListView.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretListView.tsx index 3a89a58ab..85d687505 100644 --- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretListView.tsx +++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretListView.tsx @@ -13,7 +13,7 @@ import { secretKeys } from "@app/hooks/api/secrets/queries"; import { SecretType, SecretV3RawSanitized } from "@app/hooks/api/secrets/types"; import { secretSnapshotKeys } from "@app/hooks/api/secretSnapshots/queries"; import { WsTag } from "@app/hooks/api/types"; -import { AddShareSecretModal } from "@app/pages/organization/SecretSharingPage/components/AddShareSecretModal"; +import { AddShareSecretModal } from "@app/pages/organization/SecretSharingPage/components/ShareSecret/AddShareSecretModal"; import { useSelectedSecretActions, useSelectedSecrets } from "../../SecretMainPage.store"; import { SecretDetailSidebar } from "./SecretDetailSidebar";