mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 21:40:31 +00:00
Merge remote-tracking branch 'origin/main' into feat/totp-dynamic-secret
This commit is contained in:
@@ -5,6 +5,7 @@ import axios from "axios";
|
||||
import { createNotification } from "@app/components/notifications";
|
||||
import { apiRequest } from "@app/config/request";
|
||||
import {
|
||||
DashboardProjectSecretsByKeys,
|
||||
DashboardProjectSecretsDetails,
|
||||
DashboardProjectSecretsDetailsResponse,
|
||||
DashboardProjectSecretsOverview,
|
||||
@@ -12,6 +13,7 @@ import {
|
||||
DashboardSecretsOrderBy,
|
||||
TDashboardProjectSecretsQuickSearch,
|
||||
TDashboardProjectSecretsQuickSearchResponse,
|
||||
TGetDashboardProjectSecretsByKeys,
|
||||
TGetDashboardProjectSecretsDetailsDTO,
|
||||
TGetDashboardProjectSecretsOverviewDTO,
|
||||
TGetDashboardProjectSecretsQuickSearchDTO
|
||||
@@ -101,6 +103,23 @@ export const fetchProjectSecretsDetails = async ({
|
||||
return data;
|
||||
};
|
||||
|
||||
export const fetchDashboardProjectSecretsByKeys = async ({
|
||||
keys,
|
||||
...params
|
||||
}: TGetDashboardProjectSecretsByKeys) => {
|
||||
const { data } = await apiRequest.get<DashboardProjectSecretsByKeys>(
|
||||
"/api/v1/dashboard/secrets-by-keys",
|
||||
{
|
||||
params: {
|
||||
...params,
|
||||
keys: encodeURIComponent(keys.join(","))
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
return data;
|
||||
};
|
||||
|
||||
export const useGetProjectSecretsOverview = (
|
||||
{
|
||||
projectId,
|
||||
|
||||
@@ -29,6 +29,10 @@ export type DashboardProjectSecretsDetailsResponse = {
|
||||
totalCount: number;
|
||||
};
|
||||
|
||||
export type DashboardProjectSecretsByKeys = {
|
||||
secrets: SecretV3Raw[];
|
||||
};
|
||||
|
||||
export type DashboardProjectSecretsOverview = Omit<
|
||||
DashboardProjectSecretsOverviewResponse,
|
||||
"secrets"
|
||||
@@ -89,3 +93,10 @@ export type TGetDashboardProjectSecretsQuickSearchDTO = {
|
||||
search: string;
|
||||
environments: string[];
|
||||
};
|
||||
|
||||
export type TGetDashboardProjectSecretsByKeys = {
|
||||
projectId: string;
|
||||
secretPath: string;
|
||||
environment: string;
|
||||
keys: string[];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user