mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 07:35:09 +00:00
improved filtering format
This commit is contained in:
@@ -418,8 +418,8 @@ export const secretV2BridgeDALFactory = (db: TDbClient) => {
|
||||
if (filters?.secretMetadata && filters.secretMetadata.length > 0) {
|
||||
filters.secretMetadata.forEach((meta) => {
|
||||
void qb.where({
|
||||
[`${TableName.ResourceMetadata}.key` as string]: meta.key,
|
||||
[`${TableName.ResourceMetadata}.value` as string]: meta.value
|
||||
...(meta.key ? { [`${TableName.ResourceMetadata}.key` as string]: meta.key } : {}),
|
||||
...(meta.value ? { [`${TableName.ResourceMetadata}.value` as string]: meta.value } : {})
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -31,8 +31,8 @@ export type TGetSecretsDTO = {
|
||||
recursive?: boolean;
|
||||
tagSlugs?: string[];
|
||||
secretMetadata?: {
|
||||
key: string;
|
||||
value: string;
|
||||
key?: string;
|
||||
value?: string;
|
||||
}[];
|
||||
orderBy?: SecretsOrderBy;
|
||||
orderDirection?: OrderByDirection;
|
||||
@@ -314,7 +314,7 @@ export type TFindSecretsByFolderIdsFilter = {
|
||||
orderDirection?: OrderByDirection;
|
||||
search?: string;
|
||||
tagSlugs?: string[];
|
||||
secretMetadata?: { key: string; value: string }[];
|
||||
secretMetadata?: { key?: string; value?: string }[];
|
||||
includeTagsInSearch?: boolean;
|
||||
keys?: string[];
|
||||
};
|
||||
|
||||
@@ -183,8 +183,8 @@ export type TGetSecretsRawDTO = {
|
||||
recursive?: boolean;
|
||||
tagSlugs?: string[];
|
||||
secretMetadata?: {
|
||||
key: string;
|
||||
value: string;
|
||||
key?: string;
|
||||
value?: string;
|
||||
}[];
|
||||
orderBy?: SecretsOrderBy;
|
||||
orderDirection?: OrderByDirection;
|
||||
|
||||
Reference in New Issue
Block a user