Source: actions/CreateObjectAction.js

import { Utils } from '../common/Utils'
import { BaseAction } from './BaseAction';

/**
 * @class CreateObjectAction
 * The create object action.
 * @memberof THING
 */
class CreateObjectAction extends BaseAction {

	onRun(param) {
		const scope = this;
		return new Promise((resolve, reject) => {
			let options = param.options;

			// do action
			const object = scope.app.create(options);
			object.waitForComplete().then(resolve, reject);
		});
	}

}

export { CreateObjectAction }