feat(signalwire): add add-voice-xml-node and respond-with-voice-xml actions

This commit is contained in:
Ali BARIN
2024-12-13 19:26:22 +00:00
parent 0056940fa2
commit 661a5b24b2
9 changed files with 295 additions and 8 deletions

View File

@@ -0,0 +1,3 @@
import listNodeFields from './list-node-fields/index.js';
export default [listNodeFields];

View File

@@ -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,
},
],
},
],
},
];
},
};