* Add an available action. * * @param {String} name Name of the action * @param {Object} metadata Action metadata, i.e. type, description, etc., as * an object. * @param {Object} cls Class to instantiate for this action
(name: string,
metadata: Action.ActionMetadata|null,
cls: Action.ActionTypeClass)
| 520 | * @param {Object} cls Class to instantiate for this action |
| 521 | */ |
| 522 | addAvailableAction(name: string, |
| 523 | metadata: Action.ActionMetadata|null, |
| 524 | cls: Action.ActionTypeClass): void { |
| 525 | if (!metadata) { |
| 526 | metadata = {}; |
| 527 | } |
| 528 | |
| 529 | this.availableActions[name] = { |
| 530 | metadata: metadata, |
| 531 | class: cls, |
| 532 | }; |
| 533 | this.actions[name] = []; |
| 534 | } |
| 535 | |
| 536 | /** |
| 537 | * Add a new websocket subscriber. |
no outgoing calls
no test coverage detected