Move schemas to constant folder (#15207)
- move schemas to constants - increase npm package version
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"$id": "https://raw.githubusercontent.com/twentyhq/twenty/main/packages/twenty-cli/src/constants/schemas/trigger.schema.json",
|
||||
"type": "object",
|
||||
"required": ["universalIdentifier", "type"],
|
||||
"properties": {
|
||||
"$schema": {
|
||||
"type": "string",
|
||||
"description": "JSON Schema reference for validation and IDE support"
|
||||
},
|
||||
|
||||
"universalIdentifier": {
|
||||
"type": "string",
|
||||
"description": "Unique identifier (UUID format recommended)",
|
||||
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
||||
},
|
||||
|
||||
"type": { "enum": ["cron", "databaseEvent", "route"] },
|
||||
|
||||
"schedule": { "type": "string" },
|
||||
|
||||
"eventName": { "type": "string" },
|
||||
|
||||
"path": { "type": "string" },
|
||||
|
||||
"httpMethod": { "enum": ["GET", "POST", "PUT", "PATCH", "DELETE"] },
|
||||
|
||||
"isAuthRequired": { "type": "boolean" }
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"if": { "properties": { "type": { "const": "cron" } } },
|
||||
"then": { "required": ["schedule"] }
|
||||
},
|
||||
{
|
||||
"if": { "properties": { "type": { "const": "databaseEvent" } } },
|
||||
"then": { "required": ["eventName"] }
|
||||
},
|
||||
{
|
||||
"if": { "properties": { "type": { "const": "route" } } },
|
||||
"then": { "required": ["path", "httpMethod", "isAuthRequired"] }
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user