77 lines
2.1 KiB
JSON
77 lines
2.1 KiB
JSON
[
|
|
{
|
|
"collMod": "invitations",
|
|
"validator": {
|
|
"$jsonSchema": {
|
|
"bsonType": "object",
|
|
"required": [
|
|
"_id",
|
|
"version",
|
|
"created_at",
|
|
"updated_at",
|
|
"org_id",
|
|
"email",
|
|
"role",
|
|
"workspace_id",
|
|
"token_hash",
|
|
"expires_at",
|
|
"invited_by"
|
|
],
|
|
"properties": {
|
|
"_id": {
|
|
"bsonType": "string",
|
|
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
},
|
|
"version": {
|
|
"bsonType": "number"
|
|
},
|
|
"created_at": {
|
|
"bsonType": "string",
|
|
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
|
|
},
|
|
"updated_at": {
|
|
"bsonType": "string",
|
|
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
|
|
},
|
|
"org_id": {
|
|
"bsonType": "string",
|
|
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
},
|
|
"email": {
|
|
"bsonType": "string"
|
|
},
|
|
"role": {
|
|
"bsonType": "string",
|
|
"enum": ["viewer", "member", "admin", "owner"]
|
|
},
|
|
"workspace_id": {
|
|
"bsonType": "string",
|
|
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
},
|
|
"workspace_role": {
|
|
"bsonType": ["string", "null"],
|
|
"enum": ["viewer", "editor", "admin", null]
|
|
},
|
|
"role_key": {
|
|
"bsonType": ["string", "null"]
|
|
},
|
|
"token_hash": {
|
|
"bsonType": "string"
|
|
},
|
|
"expires_at": {
|
|
"bsonType": "string"
|
|
},
|
|
"accepted_at": {
|
|
"bsonType": ["string", "null"]
|
|
},
|
|
"invited_by": {
|
|
"bsonType": "string",
|
|
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
}
|
|
]
|