import actionsInteractor, {Types} from 'actions-interactor';
interactor = actionsInteractor.create({
name:'My interactor',
description:'My description'
})
console.log(interactor);
// {
// name:'My interactor',
// description:'My description',
// actions:[]
// }
interactor.addAction({
name:'Name'
description:'Description',
type: Types.ACTION_BASE
})
create(interactor: object) : Interactor
interactor object :
- name: String
- description: String,
- actions: Action[]
import {Types} from 'actions-interactor';
- ACTION_BASE:
- name:
String
- description:
String
- name:
- ACTION_INPUT: as ACTION_BASE plus
- required:
Boolean
- defaultValue:
String
- required:
- ACTION_COMBO: as ACTION_BASE plus
- required:
Boolean
- choices:
Array
- required:
- name: String
- description: String
- actions: Action[]
Return true if all actions are valid.
Add an action to the list of actions
obj :
- name:
String
- description:
String
- type:
ACTION_TYPE
- required:
Boolean
- defaultValue:
String
, - choices:
Array
- name: String
- description: String
Return true if all actions are valid.