feat(signalwire): add add-voice-xml-node and respond-with-voice-xml actions
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
import listNodeFields from './list-node-fields/index.js';
|
||||
|
||||
export default [listNodeFields];
|
||||
@@ -0,0 +1,75 @@
|
||||
export default {
|
||||
name: 'List node fields',
|
||||
key: 'listNodeFields',
|
||||
|
||||
async run($) {
|
||||
const hasChildrenNodes = $.step.parameters.hasChildrenNodes;
|
||||
|
||||
if (!hasChildrenNodes) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return [
|
||||
{
|
||||
label: 'Children nodes',
|
||||
key: 'childrenNodes',
|
||||
type: 'dynamic',
|
||||
required: false,
|
||||
description: 'Add or remove nested node as needed',
|
||||
value: [
|
||||
{
|
||||
key: 'Content-Type',
|
||||
value: 'application/json',
|
||||
},
|
||||
],
|
||||
fields: [
|
||||
{
|
||||
label: 'Node name',
|
||||
key: 'nodeName',
|
||||
type: 'string',
|
||||
required: false,
|
||||
description: 'The name of the node to be added.',
|
||||
variables: true,
|
||||
},
|
||||
{
|
||||
label: 'Node value',
|
||||
key: 'nodeValue',
|
||||
type: 'string',
|
||||
required: false,
|
||||
description: 'The value of the node to be added.',
|
||||
variables: true,
|
||||
},
|
||||
{
|
||||
label: 'Attributes',
|
||||
key: 'attributes',
|
||||
type: 'dynamic',
|
||||
required: false,
|
||||
description: 'Add or remove attributes for the node as needed',
|
||||
value: [
|
||||
{
|
||||
key: '',
|
||||
value: '',
|
||||
},
|
||||
],
|
||||
fields: [
|
||||
{
|
||||
label: 'Attribute name',
|
||||
key: 'key',
|
||||
type: 'string',
|
||||
required: false,
|
||||
variables: true,
|
||||
},
|
||||
{
|
||||
label: 'Attribute value',
|
||||
key: 'value',
|
||||
type: 'string',
|
||||
required: false,
|
||||
variables: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user