mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-03 22:26:07 +00:00
explicitly pass values
This commit is contained in:
@@ -2917,7 +2917,7 @@ interface OrgUpdateEvent {
|
|||||||
|
|
||||||
interface ProjectCreateEvent {
|
interface ProjectCreateEvent {
|
||||||
type: EventType.CREATE_PROJECT;
|
type: EventType.CREATE_PROJECT;
|
||||||
metadata: Record<string, string | boolean | object | number>; // The creation parameters
|
metadata: Record<string, string | boolean | object | number | null>; // The creation parameters
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ProjectUpdateEvent {
|
interface ProjectUpdateEvent {
|
||||||
|
|||||||
@@ -406,7 +406,14 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
projectId: req.params.workspaceId,
|
projectId: req.params.workspaceId,
|
||||||
event: {
|
event: {
|
||||||
type: EventType.UPDATE_PROJECT,
|
type: EventType.UPDATE_PROJECT,
|
||||||
metadata: req.body
|
metadata: {
|
||||||
|
...(req.body.name !== undefined && { name: req.body.name }),
|
||||||
|
...(req.body.description !== undefined && { description: req.body.description }),
|
||||||
|
...(req.body.autoCapitalization !== undefined && { autoCapitalization: req.body.autoCapitalization }),
|
||||||
|
...(req.body.hasDeleteProtection !== undefined && { hasDeleteProtection: req.body.hasDeleteProtection }),
|
||||||
|
...(req.body.slug !== undefined && { slug: req.body.slug }),
|
||||||
|
...(req.body.secretSharing !== undefined && { secretSharing: req.body.secretSharing })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -453,7 +460,9 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
projectId: req.params.workspaceId,
|
projectId: req.params.workspaceId,
|
||||||
event: {
|
event: {
|
||||||
type: EventType.UPDATE_PROJECT,
|
type: EventType.UPDATE_PROJECT,
|
||||||
metadata: req.body
|
metadata: {
|
||||||
|
autoCapitalization: req.body.autoCapitalization
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -501,7 +510,9 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
projectId: req.params.workspaceId,
|
projectId: req.params.workspaceId,
|
||||||
event: {
|
event: {
|
||||||
type: EventType.UPDATE_PROJECT,
|
type: EventType.UPDATE_PROJECT,
|
||||||
metadata: req.body
|
metadata: {
|
||||||
|
hasDeleteProtection: req.body.hasDeleteProtection
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -549,7 +560,9 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
projectId: workspace.id,
|
projectId: workspace.id,
|
||||||
event: {
|
event: {
|
||||||
type: EventType.UPDATE_PROJECT,
|
type: EventType.UPDATE_PROJECT,
|
||||||
metadata: req.body
|
metadata: {
|
||||||
|
pitVersionLimit: req.body.pitVersionLimit
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -597,7 +610,9 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
projectId: workspace.id,
|
projectId: workspace.id,
|
||||||
event: {
|
event: {
|
||||||
type: EventType.UPDATE_PROJECT,
|
type: EventType.UPDATE_PROJECT,
|
||||||
metadata: req.body
|
metadata: {
|
||||||
|
auditLogsRetentionDays: req.body.auditLogsRetentionDays
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -212,7 +212,21 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
projectId: project.id,
|
projectId: project.id,
|
||||||
event: {
|
event: {
|
||||||
type: EventType.CREATE_PROJECT,
|
type: EventType.CREATE_PROJECT,
|
||||||
metadata: req.body
|
metadata: {
|
||||||
|
actorId: req.permission.id,
|
||||||
|
actor: req.permission.type,
|
||||||
|
actorOrgId: req.permission.orgId,
|
||||||
|
actorAuthMethod: req.permission.authMethod,
|
||||||
|
...(req.body.projectName !== undefined && { workspaceName: req.body.projectName }),
|
||||||
|
...(req.body.projectDescription !== undefined && { workspaceDescription: req.body.projectDescription }),
|
||||||
|
...(req.body.slug !== undefined && { slug: req.body.slug }),
|
||||||
|
...(req.body.kmsKeyId !== undefined && { kmsKeyId: req.body.kmsKeyId }),
|
||||||
|
...(req.body.template !== undefined && { template: req.body.template }),
|
||||||
|
...(req.body.type !== undefined && { type: req.body.type }),
|
||||||
|
...(req.body.shouldCreateDefaultEnvs !== undefined && {
|
||||||
|
createDefaultEnvs: req.body.shouldCreateDefaultEnvs
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -353,7 +367,12 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
projectId: project.id,
|
projectId: project.id,
|
||||||
event: {
|
event: {
|
||||||
type: EventType.UPDATE_PROJECT,
|
type: EventType.UPDATE_PROJECT,
|
||||||
metadata: req.body
|
metadata: {
|
||||||
|
...(req.body.name !== undefined && { name: req.body.name }),
|
||||||
|
...(req.body.description !== undefined && { description: req.body.description }),
|
||||||
|
...(req.body.autoCapitalization !== undefined && { autoCapitalization: req.body.autoCapitalization }),
|
||||||
|
...(req.body.hasDeleteProtection !== undefined && { hasDeleteProtection: req.body.hasDeleteProtection })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user