refactor(io): added new method addChild

This commit is contained in:
Leifer Mendez
2022-11-30 21:04:45 +01:00
18 changed files with 9863 additions and 15 deletions

View File

@@ -0,0 +1,15 @@
const { toSerialize } = require('./toSerialize')
/**
* @deprecate
* @param answer string
* @param options {media:string, buttons:[], capture:true default false}
* @returns
*/
const addChild = (flowIn = null) => {
if (!flowIn?.toJson) {
throw new Error('DEBE SER UN FLOW CON toJSON()')
}
return toSerialize(flowIn.toJson())
}
module.exports = { addChild }