mirror of
https://github.com/documenso/documenso.git
synced 2025-11-24 05:32:12 +10:00
feat: filter by audit log event type
This commit is contained in:
@ -18,6 +18,7 @@ export const findDocumentAuditLogsRoute = authenticatedProcedure
|
||||
documentId,
|
||||
cursor,
|
||||
filterForRecentActivity,
|
||||
eventTypes,
|
||||
orderByColumn,
|
||||
orderByDirection,
|
||||
} = input;
|
||||
@ -36,6 +37,7 @@ export const findDocumentAuditLogsRoute = authenticatedProcedure
|
||||
documentId,
|
||||
cursor,
|
||||
filterForRecentActivity,
|
||||
eventTypes,
|
||||
orderBy: orderByColumn ? { column: orderByColumn, direction: orderByDirection } : undefined,
|
||||
});
|
||||
});
|
||||
|
||||
@ -7,6 +7,7 @@ export const ZFindDocumentAuditLogsRequestSchema = ZFindSearchParamsSchema.exten
|
||||
documentId: z.number().min(1),
|
||||
cursor: z.string().optional(),
|
||||
filterForRecentActivity: z.boolean().optional(),
|
||||
eventTypes: z.array(z.string()).optional(),
|
||||
orderByColumn: z.enum(['createdAt', 'type']).optional(),
|
||||
orderByDirection: z.enum(['asc', 'desc']).default('desc'),
|
||||
});
|
||||
|
||||
@ -20,6 +20,7 @@ export const findEnvelopeAuditLogsRoute = authenticatedProcedure
|
||||
envelopeId,
|
||||
cursor,
|
||||
filterForRecentActivity,
|
||||
eventTypes,
|
||||
orderByColumn,
|
||||
orderByDirection,
|
||||
} = input;
|
||||
@ -38,6 +39,7 @@ export const findEnvelopeAuditLogsRoute = authenticatedProcedure
|
||||
envelopeId,
|
||||
cursor,
|
||||
filterForRecentActivity,
|
||||
eventTypes,
|
||||
orderBy: orderByColumn ? { column: orderByColumn, direction: orderByDirection } : undefined,
|
||||
});
|
||||
});
|
||||
|
||||
@ -22,6 +22,10 @@ export const ZFindEnvelopeAuditLogsRequestSchema = ZFindSearchParamsSchema.exten
|
||||
.describe('Envelope ID (e.g., envelope_xxx) or legacy document ID (e.g., 12345)'),
|
||||
cursor: z.string().optional(),
|
||||
filterForRecentActivity: z.boolean().optional(),
|
||||
eventTypes: z
|
||||
.array(z.string())
|
||||
.optional()
|
||||
.describe('Filter by specific event types (e.g., ["DOCUMENT_CREATED", "DOCUMENT_SENT"])'),
|
||||
orderByColumn: z.enum(['createdAt', 'type']).optional(),
|
||||
orderByDirection: z.enum(['asc', 'desc']).default('desc'),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user