mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-12 00:29:04 +00:00
feat(secret-sync): add support for secret sync error notifications in project router and Slack integration, including channel selection enhancements
This commit is contained in:
@@ -614,8 +614,10 @@ export const registerDeprecatedProjectRouter = async (server: FastifyZodProvider
|
||||
integrationId: z.string(),
|
||||
accessRequestChannels: validateSlackChannelsField,
|
||||
secretRequestChannels: validateSlackChannelsField,
|
||||
secretSyncErrorChannels: validateSlackChannelsField,
|
||||
isAccessRequestNotificationEnabled: z.boolean(),
|
||||
isSecretRequestNotificationEnabled: z.boolean()
|
||||
isSecretRequestNotificationEnabled: z.boolean(),
|
||||
isSecretSyncErrorNotificationEnabled: z.boolean()
|
||||
}),
|
||||
z.object({
|
||||
integration: z.literal(WorkflowIntegration.MICROSOFT_TEAMS),
|
||||
@@ -633,7 +635,9 @@ export const registerDeprecatedProjectRouter = async (server: FastifyZodProvider
|
||||
isAccessRequestNotificationEnabled: true,
|
||||
accessRequestChannels: true,
|
||||
isSecretRequestNotificationEnabled: true,
|
||||
secretRequestChannels: true
|
||||
secretRequestChannels: true,
|
||||
isSecretSyncErrorNotificationEnabled: true,
|
||||
secretSyncErrorChannels: true
|
||||
}).merge(
|
||||
z.object({
|
||||
integration: z.literal(WorkflowIntegration.SLACK),
|
||||
|
||||
@@ -1573,8 +1573,8 @@ export const projectServiceFactory = ({
|
||||
isSecretSyncErrorNotificationEnabled
|
||||
}: TUpdateProjectWorkflowIntegration & {
|
||||
// workaround intersection type while we don't have the microsoft teams integration for failed secret syncs
|
||||
isSecretSyncErrorNotificationEnabled: boolean;
|
||||
secretSyncErrorChannels: string;
|
||||
isSecretSyncErrorNotificationEnabled?: boolean;
|
||||
secretSyncErrorChannels?: string;
|
||||
}) => {
|
||||
const project = await projectDAL.findById(projectId);
|
||||
if (!project) {
|
||||
|
||||
Reference in New Issue
Block a user