2
0

🛂 (radar) Add isVerified field in workspace

This commit is contained in:
Baptiste Arnaud
2023-12-19 14:14:47 +01:00
parent deab1a12e9
commit 655b32ef75
7 changed files with 32 additions and 8 deletions

View File

@@ -48,6 +48,7 @@ export const publishTypebot = authenticatedProcedure
workspace: {
select: {
plan: true,
isVerified: true,
isSuspended: true,
isPastDue: true,
members: {
@@ -87,7 +88,8 @@ export const publishTypebot = authenticatedProcedure
'Radar detected a potential malicious typebot. This bot is being manually reviewed by Fraud Prevention team.',
})
const typebotWasVerified = existingTypebot.riskLevel === -1
const typebotWasVerified =
existingTypebot.riskLevel === -1 || existingTypebot.workspace.isVerified
const riskLevel = typebotWasVerified ? 0 : computeRiskLevel(existingTypebot)

View File

@@ -7072,6 +7072,10 @@
},
"isPastDue": {
"type": "boolean"
},
"isVerified": {
"type": "boolean",
"nullable": true
}
},
"required": [
@@ -7093,7 +7097,8 @@
"customSeatsLimit",
"isQuarantined",
"isSuspended",
"isPastDue"
"isPastDue",
"isVerified"
],
"additionalProperties": false
}
@@ -7225,6 +7230,10 @@
},
"isPastDue": {
"type": "boolean"
},
"isVerified": {
"type": "boolean",
"nullable": true
}
},
"required": [
@@ -7246,7 +7255,8 @@
"customSeatsLimit",
"isQuarantined",
"isSuspended",
"isPastDue"
"isPastDue",
"isVerified"
],
"additionalProperties": false
}
@@ -7395,6 +7405,10 @@
},
"isPastDue": {
"type": "boolean"
},
"isVerified": {
"type": "boolean",
"nullable": true
}
},
"required": [
@@ -7416,7 +7430,8 @@
"customSeatsLimit",
"isQuarantined",
"isSuspended",
"isPastDue"
"isPastDue",
"isVerified"
],
"additionalProperties": false
}
@@ -54488,6 +54503,10 @@
},
"isPastDue": {
"type": "boolean"
},
"isVerified": {
"type": "boolean",
"nullable": true
}
},
"required": [
@@ -54509,7 +54528,8 @@
"customSeatsLimit",
"isQuarantined",
"isSuspended",
"isPastDue"
"isPastDue",
"isVerified"
],
"additionalProperties": false,
"nullable": true