| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- /**
- * Operation Log Types
- */
- export enum DocumentOperationType {
- // Document operations
- DOCUMENT_CREATE = 'document.create',
- DOCUMENT_UPDATE = 'document.update',
- DOCUMENT_DELETE = 'document.delete',
- DOCUMENT_RENAME = 'document.rename',
- // Document status operations
- DOCUMENT_ENABLE = 'document.enable',
- DOCUMENT_DISABLE = 'document.disable',
- DOCUMENT_ARCHIVE = 'document.archive',
- DOCUMENT_UNARCHIVE = 'document.unarchive',
- DOCUMENT_BATCH_ENABLE = 'document.batch_enable',
- DOCUMENT_BATCH_DISABLE = 'document.batch_disable',
- DOCUMENT_BATCH_ARCHIVE = 'document.batch_archive',
- DOCUMENT_BATCH_UNARCHIVE = 'document.batch_unarchive',
- // Document schedule operations
- DOCUMENT_SCHEDULE_CREATE = 'document.schedule.create',
- DOCUMENT_SCHEDULE_CANCEL = 'document.schedule.cancel',
- DOCUMENT_SCHEDULE_EXECUTE = 'document.schedule.execute',
- }
- export type OperationLog = {
- id: string
- action: string
- created_at: string
- created_ip: string
- content: {
- dataset_id: string
- resource_type: string
- resource_id: string
- action: string
- timestamp: string
- changes?: {
- old: Record<string, any>
- new: Record<string, any>
- }
- metadata?: Record<string, any>
- }
- }
- export type OperationLogListResponse = {
- logs: OperationLog[]
- total: number
- page: number
- per_page: number
- pages: number
- }
- export type OperationLogQueryParams = {
- action?: string
- start_date?: string
- end_date?: string
- page?: number
- per_page?: number
- resource_type?: 'document' | 'segment' | 'metadata' | 'dataset'
- }
|