mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 14:27:23 +00:00
improvements: address feedback/requests
This commit is contained in:
@@ -19,7 +19,7 @@ import {
|
||||
Team,
|
||||
TeamCityBuildConfig,
|
||||
TGetIntegrationAuthOctopusDeployScopeValuesDTO,
|
||||
TOctopusDeployScopeValues
|
||||
TOctopusDeployVariableSetScopeValues
|
||||
} from "./types";
|
||||
|
||||
const integrationAuthKeys = {
|
||||
@@ -503,7 +503,7 @@ const fetchIntegrationAuthOctopusDeployScopeValues = async ({
|
||||
spaceId,
|
||||
resourceId
|
||||
}: TGetIntegrationAuthOctopusDeployScopeValuesDTO) => {
|
||||
const { data } = await apiRequest.get<TOctopusDeployScopeValues>(
|
||||
const { data } = await apiRequest.get<TOctopusDeployVariableSetScopeValues>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}/octopus-deploy/scope-values`,
|
||||
{ params: { scope, spaceId, resourceId } }
|
||||
);
|
||||
@@ -799,14 +799,18 @@ export const useGetIntegrationAuthBitBucketWorkspaces = (integrationAuthId: stri
|
||||
|
||||
export const useGetIntegrationAuthOctopusDeploySpaces = (integrationAuthId: string) => {
|
||||
return useQuery({
|
||||
queryKey: integrationAuthKeys.getIntegrationAuthBitBucketWorkspaces(integrationAuthId),
|
||||
queryKey: integrationAuthKeys.getIntegrationAuthOctopusDeploySpaces(integrationAuthId),
|
||||
queryFn: () => fetchIntegrationAuthOctopusDeploySpaces(integrationAuthId)
|
||||
});
|
||||
};
|
||||
|
||||
export const useGetIntegrationAuthOctopusDeployScopeValues = (
|
||||
params: TGetIntegrationAuthOctopusDeployScopeValuesDTO,
|
||||
options?: UseQueryOptions<TOctopusDeployScopeValues, unknown, TOctopusDeployScopeValues>
|
||||
options?: UseQueryOptions<
|
||||
TOctopusDeployVariableSetScopeValues,
|
||||
unknown,
|
||||
TOctopusDeployVariableSetScopeValues
|
||||
>
|
||||
) =>
|
||||
useQuery({
|
||||
queryKey: integrationAuthKeys.getIntegrationAuthOctopusDeployScopeValues(params),
|
||||
|
||||
@@ -112,7 +112,7 @@ export type TGetIntegrationAuthOctopusDeployScopeValuesDTO = {
|
||||
scope: OctopusDeployScope;
|
||||
};
|
||||
|
||||
export type TOctopusDeployScopeValues = {
|
||||
export type TOctopusDeployVariableSetScopeValues = {
|
||||
Environments: { Id: string; Name: string }[];
|
||||
Machines: { Id: string; Name: string }[];
|
||||
Actions: { Id: string; Name: string }[];
|
||||
|
||||
@@ -4,7 +4,7 @@ import { createNotification } from "@app/components/notifications";
|
||||
import { apiRequest } from "@app/config/request";
|
||||
|
||||
import { workspaceKeys } from "../workspace";
|
||||
import { TCloudIntegration, TIntegrationWithEnv } from "./types";
|
||||
import { TCloudIntegration, TIntegrationWithEnv, TOctopusDeployScopeValues } from "./types";
|
||||
|
||||
export const integrationQueryKeys = {
|
||||
getIntegrations: () => ["integrations"] as const,
|
||||
@@ -87,14 +87,7 @@ export const useCreateIntegration = () => {
|
||||
shouldMaskSecrets?: boolean;
|
||||
shouldProtectSecrets?: boolean;
|
||||
shouldEnableDelete?: boolean;
|
||||
octopusDeployScopeValues?: {
|
||||
Environment?: string[];
|
||||
Action?: string[];
|
||||
Channel?: string[];
|
||||
Machine?: string[];
|
||||
ProcessOwner?: string[];
|
||||
Role?: string[];
|
||||
};
|
||||
octopusDeployScopeValues?: TOctopusDeployScopeValues;
|
||||
};
|
||||
}) => {
|
||||
const {
|
||||
|
||||
@@ -57,9 +57,20 @@ export type TIntegration = {
|
||||
shouldMaskSecrets?: boolean;
|
||||
shouldProtectSecrets?: boolean;
|
||||
shouldEnableDelete?: boolean;
|
||||
|
||||
octopusDeployScopeValues?: TOctopusDeployScopeValues;
|
||||
};
|
||||
};
|
||||
|
||||
export type TOctopusDeployScopeValues = {
|
||||
Environment?: string[];
|
||||
Action?: string[];
|
||||
Channel?: string[];
|
||||
Machine?: string[];
|
||||
ProcessOwner?: string[];
|
||||
Role?: string[];
|
||||
};
|
||||
|
||||
export type TIntegrationWithEnv = TIntegration & {
|
||||
environment: {
|
||||
id: string;
|
||||
|
||||
Reference in New Issue
Block a user