@universis/evaluations
Version:
Universis evaluations library
137 lines (136 loc) • 3.91 kB
JSON
{
"$schema": "https://themost-framework.github.io/themost/models/2018/2/schema.json",
"@id": "http://schema.org/EvaluationAccessToken",
"name": "EvaluationAccessToken",
"description": "An access token provided for evaluating an object.",
"title": "EvaluationAccessToken",
"abstract": false,
"sealed": false,
"hidden": false,
"inherits": "AccessToken",
"version": "1.2",
"classPath": "./models/evaluation-access-token-model",
"fields": [
{
"@id": "http://schema.org/evaluationEvent",
"name": "evaluationEvent",
"title": "evaluationEvent",
"type": "EvaluationEvent",
"nullable": false
},
{
"@id": "https://themost.io/schemas/access_token",
"name": "access_token",
"title": "Access Token",
"description": "An access token is a string representing an authorization issued to the client.",
"type": "Text",
"nullable": false,
"primary": true,
"value": "javascript:return require('lodash').sampleSize('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', 20).join('');"
},
{
"@id": "https://themost.io/schemas/scope",
"name": "scope",
"title": "Scope",
"description": "Scope is used to limit the authorization granted to the client by the resource owner.",
"type": "Text",
"readonly": true,
"value": "javascript:return 'evaluation';"
},
{
"@id": "https://themost.io/schemas/user_id",
"name": "user_id",
"title": "User",
"type": "Text",
"nullable": false,
"editable": false,
"value": "javascript:return 'anonymous';"
},
{
"@id": "https://themost.io/schemas/client_id",
"name": "client_id",
"title": "Client ID",
"description": "The authorization server issues the registered client a client identifier -- a unique string representing the registration information provided by the client.",
"type": "WebApplication",
"nullable": false,
"indexed": true,
"value": "javascript:return 'evaluation-center';",
"mapping": {
"associationType": "association",
"parentModel": "WebApplication",
"parentField": "alternateName",
"childModel": "EvaluationAccessToken",
"childField": "client_id"
}
},
{
"@id": "https://themost.io/schemas/expires",
"description": "The expiration date and time of this access token.",
"name": "expires",
"title": "Expires",
"type": "DateTime",
"nullable": true,
"value": "javascript:return require('moment')(new Date()).add(1, 'd').toDate();"
},
{
"@id": "https://themost.io/schemas/webApplication",
"name": "webApplication",
"title": "Web Application",
"type": "Text",
"nullable": true
},
{
"@id": "https://themost.io/sent",
"name": "sent",
"title": "Token sent",
"description": "A boolean which represents whether the token has been sent",
"type": "Boolean",
"value": "javascript:return 0;"
},
{
"name": "used",
"title": "Token used",
"description": "A boolean which represents whether the token has been used",
"type": "Boolean",
"value": "javascript:return 0;"
}
],
"constraints": [
],
"privileges": [
{
"mask": 15,
"type": "global"
},
{
"mask": 15,
"type": "global",
"account": "Administrators"
},
{
"mask": 1,
"type": "global",
"account": "QualityAssuranceDepartment"
},
{
"mask": 1,
"type": "global",
"account": "QualityAssuranceUnit"
},
{
"mask": 1,
"type": "global",
"account": "Registrar"
},
{
"mask": 1,
"type": "global",
"account": "Instructors"
}
],
"eventListeners": [
{
"type": "./listeners/force-set-state-listener"
}
]
}