|
|
@ -4,6 +4,49 @@ import Noco from '../Noco'; |
|
|
|
import Model from './Model'; |
|
|
|
import Model from './Model'; |
|
|
|
import { extractProps } from '../meta/helpers/extractProps'; |
|
|
|
import { extractProps } from '../meta/helpers/extractProps'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const opTypes = <const>[ |
|
|
|
|
|
|
|
'COMMENT', |
|
|
|
|
|
|
|
'DATA', |
|
|
|
|
|
|
|
'PROJECT', |
|
|
|
|
|
|
|
'VIRTUAL_RELATION', |
|
|
|
|
|
|
|
'RELATION', |
|
|
|
|
|
|
|
'TABLE_VIEW', |
|
|
|
|
|
|
|
'TABLE', |
|
|
|
|
|
|
|
'VIEW', |
|
|
|
|
|
|
|
'META', |
|
|
|
|
|
|
|
'WEBHOOKS', |
|
|
|
|
|
|
|
'AUTHENTICATION', |
|
|
|
|
|
|
|
'TABLE_COLUMN', |
|
|
|
|
|
|
|
'ORG_USER', |
|
|
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const opSubTypes = <const>[ |
|
|
|
|
|
|
|
'UPDATE', |
|
|
|
|
|
|
|
'INSERT', |
|
|
|
|
|
|
|
'BULK_INSERT', |
|
|
|
|
|
|
|
'BULK_UPDATE', |
|
|
|
|
|
|
|
'BULK_DELETE', |
|
|
|
|
|
|
|
'LINK_RECORD', |
|
|
|
|
|
|
|
'UNLINK_RECORD', |
|
|
|
|
|
|
|
'DELETE', |
|
|
|
|
|
|
|
'CREATED', |
|
|
|
|
|
|
|
'DELETED', |
|
|
|
|
|
|
|
'RENAMED', |
|
|
|
|
|
|
|
'IMPORT_FROM_ZIP', |
|
|
|
|
|
|
|
'EXPORT_TO_FS', |
|
|
|
|
|
|
|
'EXPORT_TO_ZIP', |
|
|
|
|
|
|
|
'UPDATED', |
|
|
|
|
|
|
|
'SIGNIN', |
|
|
|
|
|
|
|
'SIGN', |
|
|
|
|
|
|
|
'PASSWORD_RESET', |
|
|
|
|
|
|
|
'PASSWORD_FORGOT', |
|
|
|
|
|
|
|
'PASSWORD_CHANGE', |
|
|
|
|
|
|
|
'EMAIL_VERIFICATION', |
|
|
|
|
|
|
|
'ROLES_MANAGEMENT', |
|
|
|
|
|
|
|
'INVITE', |
|
|
|
|
|
|
|
'RESEND_INVITE', |
|
|
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
export default class Audit implements AuditType { |
|
|
|
export default class Audit implements AuditType { |
|
|
|
id?: string; |
|
|
|
id?: string; |
|
|
|
user?: string; |
|
|
|
user?: string; |
|
|
@ -12,8 +55,8 @@ export default class Audit implements AuditType { |
|
|
|
project_id?: string; |
|
|
|
project_id?: string; |
|
|
|
fk_model_id?: string; |
|
|
|
fk_model_id?: string; |
|
|
|
row_id?: string; |
|
|
|
row_id?: string; |
|
|
|
op_type?: string; |
|
|
|
op_type?: typeof opTypes[number]; |
|
|
|
op_sub_type?: string; |
|
|
|
op_sub_type?: typeof opSubTypes[number]; |
|
|
|
status?: string; |
|
|
|
status?: string; |
|
|
|
description?: string; |
|
|
|
description?: string; |
|
|
|
details?: string; |
|
|
|
details?: string; |
|
|
|