mirror of
https://github.com/documenso/documenso.git
synced 2025-11-15 17:21:41 +10:00
fix: audit logs
This commit is contained in:
@ -13,6 +13,7 @@ import { ZRecipientActionAuthTypesSchema } from './document-auth';
|
||||
export const ZDocumentAuditLogTypeSchema = z.enum([
|
||||
// Document actions.
|
||||
'EMAIL_SENT',
|
||||
'SELF_SIGN',
|
||||
|
||||
// Document modification events.
|
||||
'FIELD_CREATED',
|
||||
@ -178,6 +179,14 @@ export const ZDocumentAuditLogEventEmailSentSchema = z.object({
|
||||
}),
|
||||
});
|
||||
|
||||
/**
|
||||
* Event: Self sign
|
||||
*/
|
||||
export const ZDocumentAuditLogSelfSignSchema = z.object({
|
||||
type: z.literal(DOCUMENT_AUDIT_LOG_TYPE.SELF_SIGN),
|
||||
data: ZBaseRecipientDataSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* Event: Document completed.
|
||||
*/
|
||||
@ -475,6 +484,7 @@ export const ZDocumentAuditLogBaseSchema = z.object({
|
||||
export const ZDocumentAuditLogSchema = ZDocumentAuditLogBaseSchema.and(
|
||||
z.union([
|
||||
ZDocumentAuditLogEventEmailSentSchema,
|
||||
ZDocumentAuditLogSelfSignSchema,
|
||||
ZDocumentAuditLogEventDocumentCompletedSchema,
|
||||
ZDocumentAuditLogEventDocumentCreatedSchema,
|
||||
ZDocumentAuditLogEventDocumentDeletedSchema,
|
||||
|
||||
Reference in New Issue
Block a user