feat(infisical-pg): completed secret approval policy and services for approval requests

This commit is contained in:
Akhil Mohan
2024-01-27 12:38:23 +05:30
parent a6a60b7bbb
commit 17e61bfc68
40 changed files with 2114 additions and 43 deletions
@@ -1,4 +1,6 @@
import { IntegrationAuthsSchema } from "@app/db/schemas";
import { z } from "zod";
import { IntegrationAuthsSchema, SecretApprovalPoliciesSchema } from "@app/db/schemas";
// sometimes the return data must be santizied to avoid leaking important values
// always prefer pick over omit in zod
@@ -13,3 +15,14 @@ export const integrationAuthPubSchema = IntegrationAuthsSchema.pick({
createdAt: true,
updatedAt: true
});
export const sapPubSchema = SecretApprovalPoliciesSchema.merge(
z.object({
environment: z.object({
id: z.string(),
name: z.string(),
slug: z.string()
}),
projectId: z.string()
})
);