@apidaze/node-red-contrib-apidaze
Version:
Node-RED module for Apidaze
81 lines (68 loc) • 2.58 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('data-provider', {
category: 'apidaze',
color: '#E9967A',
defaults: {},
inputs: 1,
outputs: 0,
icon: 'font-awesome/fa-database',
label: 'Data provider'
});
</script>
<script type="text/html" data-template-name="data-provider">
<div class="form-tips">
<p>In the message payload, a property of `addressBook` should be provided to this node to persist the data in the flow context at the runtime.</p>
<p>
The `addressBook` property should contain an object where the keys are DID numbers that are provided by Apidaze and the values are objects.
One value object must, at least, contain a property of "mobileDestination" that is associated with the "contact". There is also one special contact under the property of `default` that is used when there is no "matching" contact.
A sample `addressBook` object;
</p>
<pre>
<code>
msg.payload.addressBook = {
"14123123123": {
"mobileDestination": "491234567890",
"firstName": "Ali",
"prefix": "Mr.",
"lastName": "BARIN"
},
"default": {
"mobileDestination": "491234567890",
"firstName": "Ali",
"prefix": "Mr.",
"lastName": "BARIN"
}
}
</code>
</pre>
<p>All the mentioned phone number should have the pattern of CountryCode, Number. e.g. "14125423968". </p>
</div>
</script>
<script type="text/html" data-help-name="data-provider">
<p>Custom data to expose in the flow executions.</p>
<p>In the message payload, a property of `addressBook` should be provided to this node to persist the data in the flow context at the runtime.</p>
<p>
The `addressBook` property should contain an object where the keys are DID numbers that are provided by Apidaze and the values are objects.
One value object must, at least, contain a property of "mobileDestination" that is associated with the "contact". There is also one special contact under the property of `default` that is used when there is no "matching" contact.
A sample `addressBook` object;
</p>
<pre>
<code>
msg.payload.addressBook = {
"14123123123": {
"mobileDestination": "491234567890",
"firstName": "Ali",
"prefix": "Mr.",
"lastName": "BARIN"
},
"default": {
"mobileDestination": "491234567890",
"firstName": "Ali",
"prefix": "Mr.",
"lastName": "BARIN"
}
}
</code>
</pre>
<p>All the mentioned phone number should have the pattern of CountryCode, Number. e.g. "14125423968". </p>
</script>