codecombat/app/schemas/subscriptions/scripts.coffee
2014-08-27 12:24:11 -07:00

27 lines
1 KiB
CoffeeScript

c = require 'schemas/schemas'
module.exports =
'script:end-current-script': c.object {}
'script:reset': c.object {}
'script:ended': c.object {required: ['scriptID']},
scriptID: {type: 'string'}
'script:state-changed': c.object {required: ['currentScript', 'currentScriptOffset']},
currentScript: {type: ['string', 'null']}
currentScriptOffset: {type: 'integer', minimum: 0}
'script:tick': c.object {required: ['scriptRunning', 'noteGroupRunning', 'scriptStates', 'timeSinceLastScriptEnded']},
scriptRunning: {type: 'string'}
noteGroupRunning: {type: 'string'}
timeSinceLastScriptEnded: {type: 'number'}
scriptStates:
type: 'object'
additionalProperties: c.object {title: 'Script State'},
timeSinceLastEnded: {type: 'number', minimum: 0, description: 'seconds since this script ended last'}
timeSinceLastTriggered: {type: 'number', minimum: 0, description: 'seconds since this script was triggered last'}
'script:note-group-started': c.object {}
'script:note-group-ended': c.object {}