Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix lint

Matheus Nogueira28521a3fb091
diff --git a/frontend/src/hooks/api/dynamicSecret/queries.ts b/frontend/src/hooks/api/dynamicSecret/queries.ts
index ad49801589..a31b9e84f1 100644
--- a/frontend/src/hooks/api/dynamicSecret/queries.ts
+++ b/frontend/src/hooks/api/dynamicSecret/queries.ts
@@ -143,7 +143,14 @@ export const useGetIbmApiConnectOrgCatalogs = ({
enabled: boolean;
}) => {
return useQuery({
- queryKey: ["ibm-api-connect-org-catalogs", instanceUrl, apiKey, clientId, clientSecret, orgName],
+ queryKey: [
+ "ibm-api-connect-org-catalogs",
+ instanceUrl,
+ apiKey,
+ clientId,
+ clientSecret,
+ orgName
+ ],
queryFn: async () => {
const { data } = await apiRequest.post<{ name: string; title: string; id: string }[]>(
`/api/v1/dynamic-secrets/ibm-api-connect/orgs/${orgName}/catalogs`,
@@ -185,10 +192,12 @@ export const useGetIbmApiConnectOrgApps = ({
queryFn: async () => {
const { data } = await apiRequest.post<
{ name: string; title: string; id: string; consumerOrgId: string }[]
- >(
- `/api/v1/dynamic-secrets/ibm-api-connect/orgs/${orgName}/catalogs/${catalogName}/apps`,
- { instanceUrl, apiKey, clientId, clientSecret }
- );
+ >(`/api/v1/dynamic-secrets/ibm-api-connect/orgs/${orgName}/catalogs/${catalogName}/apps`, {
+ instanceUrl,
+ apiKey,
+ clientId,
+ clientSecret
+ });
return data;
},
enabled
diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/IbmApiConnectInputForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/IbmApiConnectInputForm.tsx
index 31742288ce..4e611a346c 100644
--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/IbmApiConnectInputForm.tsx
+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/CreateDynamicSecretForm/IbmApiConnectInputForm.tsx
@@ -11,6 +11,8 @@ import { z } from "zod";
import { TtlFormLabel } from "@app/components/features";
import { OrgPermissionCan } from "@app/components/permissions";
+import { SingleValue } from "react-select";
+
import { Button, FilterableSelect, FormControl, Input, SecretInput } from "@app/components/v2";
import { Tooltip } from "@app/components/v2/Tooltip";
import { GatewayPicker } from "@app/components/v3/platform/GatewayPicker";
@@ -403,7 +405,8 @@ export const IbmApiConnectInputForm = ({
isLoading={isOrgsFetching}
options={orgs ?? []}
value={orgs?.find((o) => o.id === value) ?? null}
- onChange={(option) => {
+ onChange={(opt) => {
+ const option = opt as SingleValue<NonNullable<typeof orgs>[number]>;
onChange(option?.id ?? "");
setValue("provider.catalogId", "");
setValue("provider.consumerOrgId", "");
@@ -445,7 +448,8 @@ export const IbmApiConnectInputForm = ({
isLoading={isCatalogsFetching}
options={catalogs ?? []}
value={catalogs?.find((c) => c.id === value) ?? null}
- onChange={(option) => {
+ onChange={(opt) => {
+ const option = opt as SingleValue<NonNullable<typeof catalogs>[number]>;
onChange(option?.id ?? "");
setValue("provider.consumerOrgId", "");
setValue("provider.appId", "");
@@ -486,7 +490,8 @@ export const IbmApiConnectInputForm = ({
isLoading={isAppsFetching}
options={apps ?? []}
value={apps?.find((a) => a.id === value) ?? null}
- onChange={(option) => {
+ onChange={(opt) => {
+ const option = opt as SingleValue<NonNullable<typeof apps>[number]>;
onChange(option?.id ?? "");
setValue("provider.consumerOrgId", option?.consumerOrgId ?? "");
}}
diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretIbmApiConnectForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretIbmApiConnectForm.tsx
index f50dd4d22a..78d080a1a9 100644
--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretIbmApiConnectForm.tsx
+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretIbmApiConnectForm.tsx
@@ -1,4 +1,5 @@
import { Controller, useForm } from "react-hook-form";
+import { SingleValue } from "react-select";
import {
faCheckCircle,
faCircleNotch,
@@ -393,7 +394,8 @@ export const EditDynamicSecretIbmApiConnectForm = ({
isLoading={isOrgsFetching}
options={orgs ?? []}
value={orgs?.find((o) => o.id === value) ?? null}
- onChange={(option) => {
+ onChange={(opt) => {
+ const option = opt as SingleValue<NonNullable<typeof orgs>[number]>;
onChange(option?.id ?? "");
setValue("inputs.catalogId", "");
setValue("inputs.consumerOrgId", "");
@@ -434,7 +436,8 @@ export const EditDynamicSecretIbmApiConnectForm = ({
isLoading={isCatalogsFetching}
options={catalogs ?? []}
value={catalogs?.find((c) => c.id === value) ?? null}
- onChange={(option) => {
+ onChange={(opt) => {
+ const option = opt as SingleValue<NonNullable<typeof catalogs>[number]>;
onChange(option?.id ?? "");
setValue("inputs.consumerOrgId", "");
setValue("inputs.appId", "");
@@ -474,7 +477,8 @@ export const EditDynamicSecretIbmApiConnectForm = ({
isLoading={isAppsFetching}
options={apps ?? []}
value={apps?.find((a) => a.id === value) ?? null}
- onChange={(option) => {
+ onChange={(opt) => {
+ const option = opt as SingleValue<NonNullable<typeof apps>[number]>;
onChange(option?.id ?? "");
setValue("inputs.consumerOrgId", option?.consumerOrgId ?? "");
}}