♻️ show list of resources on policy list

This commit is contained in:
Fred KISSIE
2026-03-06 04:03:25 +01:00
parent 136c3eff0c
commit 38aa2dace8
2 changed files with 60 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
import type { ResourcePolicy } from "@server/db";
import type { Resource, ResourcePolicy } from "@server/db";
import type { PaginatedResponse } from "@server/types/Pagination";
export type GetMaintenanceInfoResponse = {
@@ -12,8 +12,13 @@ export type GetMaintenanceInfoResponse = {
maintenanceEstimatedTime: string | null;
};
export type ResourcePolicyWithResources = Pick<
ResourcePolicy,
"resourcePolicyId" | "niceId" | "name" | "orgId"
> & {
resources: Array<Pick<Resource, "resourceId" | "name" | "fullDomain">>;
};
export type ListResourcePoliciesResponse = PaginatedResponse<{
policies: Array<
Pick<ResourcePolicy, "resourcePolicyId" | "niceId" | "name" | "orgId">
>;
policies: Array<ResourcePolicyWithResources>;
}>;