mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 23:52:09 +00:00
feat(secret-approval): added auto naming policy and minor ux enhancements
This commit is contained in:
@@ -15,24 +15,36 @@ export const GetSecretApprovalPolicyOfABoard = z.object({
|
||||
});
|
||||
|
||||
export const CreateSecretApprovalRule = z.object({
|
||||
body: z.object({
|
||||
workspaceId: z.string(),
|
||||
environment: z.string(),
|
||||
secretPath: z.string().optional().nullable(),
|
||||
approvers: z.string().array().optional(),
|
||||
approvals: z.number().min(1).default(1)
|
||||
})
|
||||
body: z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
name: z.string().optional(),
|
||||
environment: z.string(),
|
||||
secretPath: z.string().optional().nullable(),
|
||||
approvers: z.string().array().min(1),
|
||||
approvals: z.number().min(1).default(1)
|
||||
})
|
||||
.refine((data) => data.approvals <= data.approvers.length, {
|
||||
path: ["approvals"],
|
||||
message: "Approvals should be lower than approvals"
|
||||
})
|
||||
});
|
||||
|
||||
export const UpdateSecretApprovalRule = z.object({
|
||||
params: z.object({
|
||||
id: z.string()
|
||||
}),
|
||||
body: z.object({
|
||||
approvers: z.string().array().optional(),
|
||||
approvals: z.number().min(1).optional(),
|
||||
secretPath: z.string().optional().nullable()
|
||||
})
|
||||
body: z
|
||||
.object({
|
||||
name: z.string().optional(),
|
||||
approvers: z.string().array().min(1),
|
||||
approvals: z.number().min(1).default(1),
|
||||
secretPath: z.string().optional().nullable()
|
||||
})
|
||||
.refine((data) => data.approvals <= data.approvers.length, {
|
||||
path: ["approvals"],
|
||||
message: "Approvals should be lower than approvals"
|
||||
})
|
||||
});
|
||||
|
||||
export const DeleteSecretApprovalRule = z.object({
|
||||
|
||||
Reference in New Issue
Block a user