Properties panel - Add/Remove Input/Output parameters programmatically


I would like to add/remove input/output parameters into properties panel from javaScript code programmatically.
Is there any way to achieve these?

I tried to manually activate the changes by using the following code:

var propertiesPanel = BpmnJs.get("propertiesPanel"),
     entry = propertyPanel.getEntry("inputs"),
     values = [{
          extensionElementValue: "paramName"
     node = $("div[data-entry='inputs']");
propertyPanel.applyChanges(entry, values, node[0]);
propertyPanel.updateState(entry, node[0]);

But fails at ExtensionElements.js:132 (if ( === CREATE_EXTENSION_ELEMENT_ACTION) {)
=> TypeError: action is undefined

I am using:
bpmn-js: 0.19.0
bpmn-js-properties-panel: 0.11.2

Thank you for your help in advance.
Best regards,
Rómeó Nagy