Browse Source

refactor(nocodb): audit model in swagger.json

pull/5222/head
Wing-Kam Wong 2 years ago
parent
commit
1e138b776e
  1. 172
      packages/nocodb/src/schema/swagger.json

172
packages/nocodb/src/schema/swagger.json

@ -7644,88 +7644,160 @@
"description": "Model for Audit", "description": "Model for Audit",
"examples": [ "examples": [
{ {
"base_id": "string", "id": "adt_l5we7pkx70vaao",
"description": "string", "user": "w@nocodb.com",
"details": "string", "ip": "::ffff:127.0.0.1",
"fk_model_id": "string", "base_id": "ds_3l9qx8xqksenrl",
"id": "string", "project_id": "p_9sx43moxhqtjm3",
"ip": "string", "fk_model_id": "md_ehn5izr99m7d45",
"op_sub_type": "string", "row_id": "rec0Adp9PMG9o7uJy",
"op_type": "string", "op_type": "AUTHENTICATION",
"project_id": "string", "op_sub_type": "UPDATE",
"row_id": "string",
"status": "string", "status": "string",
"user": "string" "description": "Table nc_snms___Table_1 : field Date got changed from 2023-03-12 to ",
"details": "<span class=\"\">Date</span> : <span class=\"text-decoration-line-through red px-2 lighten-4 black--text\">2023-03-12</span> <span class=\"black--text green lighten-4 px-2\"></span>"
} }
], ],
"title": "Audit Model",
"type": "object",
"properties": { "properties": {
"base_id": {
"type": "string"
},
"description": {
"type": "string"
},
"details": {
"type": "string"
},
"fk_model_id": {
"type": "string"
},
"id": { "id": {
"$ref": "#/components/schemas/Id", "$ref": "#/components/schemas/Id",
"description": "Unique ID" "description": "Unique ID"
}, },
"ip": { "user": {
"type": "string" "type": "string",
"description": "The user name performing the action",
"example": "w@nocodb.com"
}, },
"op_sub_type": { "ip": {
"type": "string" "type": "string",
"example": "::ffff:127.0.0.1",
"description": "IP address from the user"
}, },
"op_type": { "base_id": {
"type": "string" "type": "string",
"description": "Base ID in where action is performed",
"example": "ds_3l9qx8xqksenrl"
}, },
"project_id": { "project_id": {
"type": "string" "type": "string",
"description": "Project ID in where action is performed",
"example": "p_9sx43moxhqtjm3"
},
"fk_model_id": {
"type": "string",
"description": "Model ID in where action is performed",
"example": "md_ehn5izr99m7d45"
}, },
"row_id": { "row_id": {
"type": "string" "type": "string",
"description": "Row ID",
"example": "rec0Adp9PMG9o7uJy"
},
"op_type": {
"type": "string",
"description": "Operation Type",
"example": "AUTHENTICATION",
"enum": [
"COMMENT",
"DATA",
"PROJECT",
"VIRTUAL_RELATION",
"RELATION",
"TABLE_VIEW",
"TABLE",
"VIEW",
"META",
"WEBHOOKS",
"AUTHENTICATION",
"TABLE_COLUMN",
"ORG_USER"
]
},
"op_sub_type": {
"type": "string",
"description": "Operation Sub Type",
"example": "UPDATE",
"enum": [
"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"
]
}, },
"status": { "status": {
"type": "string" "type": "string",
"description": "Audit Status"
}, },
"user": { "description": {
"type": "string" "type": "string",
"description": "Description of the action",
"example": "Table nc_snms___Table_1 : field Date got changed from 2023-03-12 to "
},
"details": {
"type": "string",
"description": "Detail",
"example": "<span class=\"\">Date</span> : <span class=\"text-decoration-line-through red px-2 lighten-4 black--text\">2023-03-12</span> <span class=\"black--text green lighten-4 px-2\"></span>"
} }
}, }
"title": "Audit Model",
"type": "object"
}, },
"AuditRowUpdateReq": { "AuditRowUpdateReq": {
"description": "Model for Audit Row Update Request", "description": "Model for Audit Row Update Request",
"examples": [ "examples": [
{ {
"column_name": "string", "column_name": "baz",
"fk_model_id": "string", "fk_model_id": "md_ehn5izr99m7d45",
"prev_value": null, "row_id": "rec0Adp9PMG9o7uJy",
"row_id": "string", "prev_value": "foo",
"value": null "value": "bar"
} }
], ],
"title": "Audit Row Update Request Model",
"type": "object",
"properties": { "properties": {
"column_name": { "column_name": {
"type": "string" "type": "string",
"description": "Column Name",
"example": "baz"
}, },
"fk_model_id": { "fk_model_id": {
"type": "string" "type": "string",
"description": "Foreign Key to Model",
"example": "md_ehn5izr99m7d45"
}, },
"prev_value": {},
"row_id": { "row_id": {
"type": "string" "type": "string",
"example": "rec0Adp9PMG9o7uJy",
"description": "Row ID"
}, },
"value": {} "prev_value": {
}, "description": "The previous value before the action"
"title": "Audit Row Update Request Model", },
"type": "object" "value": {
"description": "The current value after the action"
}
}
}, },
"Base": { "Base": {
"description": "Model for Base", "description": "Model for Base",

Loading…
Cancel
Save