@yousolution/node-red-contrib-you-sap-service-layer 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierrc +6 -6
- package/.vscode/launch.json +23 -23
- package/CHANGELOG.md +61 -52
- package/README.md +126 -126
- package/docker-compose.yml +14 -14
- package/examples/example.json +625 -625
- package/nodes/SQLQuery.html +179 -179
- package/nodes/SQLQuery.js +46 -46
- package/nodes/authenticateSap.html +146 -146
- package/nodes/authenticateSap.js +129 -129
- package/nodes/closeSap.html +128 -97
- package/nodes/closeSap.js +36 -36
- package/nodes/createSQLQuery.html +165 -165
- package/nodes/createSQLQuery.js +70 -70
- package/nodes/createSap.html +391 -391
- package/nodes/createSap.js +40 -40
- package/nodes/crossJoinSap.html +394 -394
- package/nodes/crossJoinSap.js +37 -37
- package/nodes/deleteSap.html +406 -406
- package/nodes/deleteSap.js +35 -35
- package/nodes/getSap.html +427 -427
- package/nodes/getSap.js +34 -34
- package/nodes/listSap.html +402 -402
- package/nodes/listSap.js +37 -37
- package/nodes/manageErrors.js +38 -38
- package/nodes/manipulateEntitySap.html +176 -176
- package/nodes/manipulateEntitySap.js +46 -46
- package/nodes/nextLink.html +100 -100
- package/nodes/nextLink.js +18 -18
- package/nodes/patchSap.html +424 -424
- package/nodes/patchSap.js +40 -40
- package/nodes/serviceSap.html +160 -206
- package/nodes/serviceSap.js +39 -39
- package/nodes/support.js +363 -363
- package/package.json +65 -65
- package/resources/entities.json +59 -59
- package/resources/services.json +343 -343
- package/test/authenticateSap.spec.js +307 -307
- package/test/closeSap.spec.js +156 -156
- package/test/createSQLQuery.spec.js +174 -174
- package/test/createSap.spec.js +183 -183
- package/test/crossJoinSap.spec.js +156 -156
- package/test/deleteSap.spec.js +156 -156
- package/test/getSap.spec.js +156 -156
- package/test/listSap.spec.js +156 -156
- package/test/manipulateEntitySap.spec.js +191 -191
- package/test/patchSap.spec.js +184 -184
- package/test/serviceSap.spec.js +170 -170
- package/test/support.spec.js +1419 -1419
- package/data/.gitkeep +0 -0
package/nodes/nextLink.html
CHANGED
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
<script type="text/javascript">
|
|
2
|
-
RED.nodes.registerType('nextLink', {
|
|
3
|
-
category: 'Sap',
|
|
4
|
-
color: '#FFC300',
|
|
5
|
-
defaults: {
|
|
6
|
-
name: { value: '' },
|
|
7
|
-
nextLink: { value: '' },
|
|
8
|
-
},
|
|
9
|
-
inputs: 1,
|
|
10
|
-
outputs: 2,
|
|
11
|
-
outputLabels: ['next', 'end'],
|
|
12
|
-
// outputLabels: function (index) {
|
|
13
|
-
// if (index == 0) {
|
|
14
|
-
// return 'next iteration';
|
|
15
|
-
// }
|
|
16
|
-
// return 'last iteration';
|
|
17
|
-
// },
|
|
18
|
-
icon: 'font-awesome/fa-arrows-h',
|
|
19
|
-
label: function () {
|
|
20
|
-
return this.name || 'Next link';
|
|
21
|
-
},
|
|
22
|
-
oneditprepare: function () {
|
|
23
|
-
$('#node-input-nextLink').typedInput({
|
|
24
|
-
type: 'msg',
|
|
25
|
-
types: ['msg'],
|
|
26
|
-
typeField: '#node-input-nextLink-type',
|
|
27
|
-
value: 'nextLink',
|
|
28
|
-
});
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
</script>
|
|
32
|
-
|
|
33
|
-
<script type="text/html" data-template-name="nextLink">
|
|
34
|
-
<div class="form-row">
|
|
35
|
-
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
36
|
-
<input type="text" id="node-input-name" placeholder="Name" />
|
|
37
|
-
</div>
|
|
38
|
-
|
|
39
|
-
<div class="form-row">
|
|
40
|
-
<label for="node-input-type"><i class="fa fa-gears"></i> NextLink</label>
|
|
41
|
-
<input type="text" id="node-input-nextLink" />
|
|
42
|
-
<input type="hidden" id="node-input-nextLink-type" />
|
|
43
|
-
</div>
|
|
44
|
-
</script>
|
|
45
|
-
|
|
46
|
-
<!-- Documentation -->
|
|
47
|
-
<script type="text/html" data-help-name="nextLink">
|
|
48
|
-
<p>Next link</p>
|
|
49
|
-
|
|
50
|
-
<h3>Inputs</h3>
|
|
51
|
-
<dl class="message-properties">
|
|
52
|
-
<dt>
|
|
53
|
-
Name
|
|
54
|
-
<span class="property-type">string</span>
|
|
55
|
-
</dt>
|
|
56
|
-
<dd>the node's name</dd>
|
|
57
|
-
<dt>
|
|
58
|
-
NextLink
|
|
59
|
-
<span class="property-type">string</span>
|
|
60
|
-
</dt>
|
|
61
|
-
<dd>the url link to next Service Layer page</dd>
|
|
62
|
-
</dl>
|
|
63
|
-
|
|
64
|
-
<h3>Outputs</h3>
|
|
65
|
-
<ol class="node-ports">
|
|
66
|
-
<li>
|
|
67
|
-
Standard output
|
|
68
|
-
<dl class="message-properties">
|
|
69
|
-
<dt>payload <span class="property-type">msg</span></dt>
|
|
70
|
-
<dd>It returns the message with next link to the next page.</dd>
|
|
71
|
-
</dl>
|
|
72
|
-
</li>
|
|
73
|
-
<li>
|
|
74
|
-
Standard output
|
|
75
|
-
<dl class="message-properties">
|
|
76
|
-
<dt>payload <span class="property-type">msg</span></dt>
|
|
77
|
-
<dd>It returns the message when the last page is reached.</dd>
|
|
78
|
-
</dl>
|
|
79
|
-
</li>
|
|
80
|
-
</ol>
|
|
81
|
-
|
|
82
|
-
<h3>Details</h3>
|
|
83
|
-
<p>this node is used to get the next page of result of items from service layer. See the examples to understand how to use it.</p>
|
|
84
|
-
<!-- <p><code>msg.payload</code> is used as the payload of the published message.
|
|
85
|
-
If it contains an Object it will be converted to a JSON string before being sent.
|
|
86
|
-
If it contains a binary Buffer the message will be published as-is.</p>
|
|
87
|
-
<p>The topic used can be configured in the node or, if left blank, can be set
|
|
88
|
-
by <code>msg.topic</code>.</p>
|
|
89
|
-
<p>Likewise the QoS and retain values can be configured in the node or, if left
|
|
90
|
-
blank, set by <code>msg.qos</code> and <code>msg.retain</code> respectively.</p> -->
|
|
91
|
-
|
|
92
|
-
<h3>References</h3>
|
|
93
|
-
<ul>
|
|
94
|
-
<li><a href="https://sap-samples.github.io/smb-summit-hackathon/b1sl.html" target="_black">Service layer API docs</a> - for more details</li>
|
|
95
|
-
<li>
|
|
96
|
-
<a href="https://github.com/yousolution-cloud/node-red-contrib-you-sap-service-layer">@yousolution-cloud/node-red-contrib-you-sap-service-layer</a> - the
|
|
97
|
-
nodes github repository
|
|
98
|
-
</li>
|
|
99
|
-
</ul>
|
|
100
|
-
</script>
|
|
1
|
+
<script type="text/javascript">
|
|
2
|
+
RED.nodes.registerType('nextLink', {
|
|
3
|
+
category: 'Sap',
|
|
4
|
+
color: '#FFC300',
|
|
5
|
+
defaults: {
|
|
6
|
+
name: { value: '' },
|
|
7
|
+
nextLink: { value: '' },
|
|
8
|
+
},
|
|
9
|
+
inputs: 1,
|
|
10
|
+
outputs: 2,
|
|
11
|
+
outputLabels: ['next', 'end'],
|
|
12
|
+
// outputLabels: function (index) {
|
|
13
|
+
// if (index == 0) {
|
|
14
|
+
// return 'next iteration';
|
|
15
|
+
// }
|
|
16
|
+
// return 'last iteration';
|
|
17
|
+
// },
|
|
18
|
+
icon: 'font-awesome/fa-arrows-h',
|
|
19
|
+
label: function () {
|
|
20
|
+
return this.name || 'Next link';
|
|
21
|
+
},
|
|
22
|
+
oneditprepare: function () {
|
|
23
|
+
$('#node-input-nextLink').typedInput({
|
|
24
|
+
type: 'msg',
|
|
25
|
+
types: ['msg'],
|
|
26
|
+
typeField: '#node-input-nextLink-type',
|
|
27
|
+
value: 'nextLink',
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<script type="text/html" data-template-name="nextLink">
|
|
34
|
+
<div class="form-row">
|
|
35
|
+
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
36
|
+
<input type="text" id="node-input-name" placeholder="Name" />
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div class="form-row">
|
|
40
|
+
<label for="node-input-type"><i class="fa fa-gears"></i> NextLink</label>
|
|
41
|
+
<input type="text" id="node-input-nextLink" />
|
|
42
|
+
<input type="hidden" id="node-input-nextLink-type" />
|
|
43
|
+
</div>
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<!-- Documentation -->
|
|
47
|
+
<script type="text/html" data-help-name="nextLink">
|
|
48
|
+
<p>Next link</p>
|
|
49
|
+
|
|
50
|
+
<h3>Inputs</h3>
|
|
51
|
+
<dl class="message-properties">
|
|
52
|
+
<dt>
|
|
53
|
+
Name
|
|
54
|
+
<span class="property-type">string</span>
|
|
55
|
+
</dt>
|
|
56
|
+
<dd>the node's name</dd>
|
|
57
|
+
<dt>
|
|
58
|
+
NextLink
|
|
59
|
+
<span class="property-type">string</span>
|
|
60
|
+
</dt>
|
|
61
|
+
<dd>the url link to next Service Layer page</dd>
|
|
62
|
+
</dl>
|
|
63
|
+
|
|
64
|
+
<h3>Outputs</h3>
|
|
65
|
+
<ol class="node-ports">
|
|
66
|
+
<li>
|
|
67
|
+
Standard output
|
|
68
|
+
<dl class="message-properties">
|
|
69
|
+
<dt>payload <span class="property-type">msg</span></dt>
|
|
70
|
+
<dd>It returns the message with next link to the next page.</dd>
|
|
71
|
+
</dl>
|
|
72
|
+
</li>
|
|
73
|
+
<li>
|
|
74
|
+
Standard output
|
|
75
|
+
<dl class="message-properties">
|
|
76
|
+
<dt>payload <span class="property-type">msg</span></dt>
|
|
77
|
+
<dd>It returns the message when the last page is reached.</dd>
|
|
78
|
+
</dl>
|
|
79
|
+
</li>
|
|
80
|
+
</ol>
|
|
81
|
+
|
|
82
|
+
<h3>Details</h3>
|
|
83
|
+
<p>this node is used to get the next page of result of items from service layer. See the examples to understand how to use it.</p>
|
|
84
|
+
<!-- <p><code>msg.payload</code> is used as the payload of the published message.
|
|
85
|
+
If it contains an Object it will be converted to a JSON string before being sent.
|
|
86
|
+
If it contains a binary Buffer the message will be published as-is.</p>
|
|
87
|
+
<p>The topic used can be configured in the node or, if left blank, can be set
|
|
88
|
+
by <code>msg.topic</code>.</p>
|
|
89
|
+
<p>Likewise the QoS and retain values can be configured in the node or, if left
|
|
90
|
+
blank, set by <code>msg.qos</code> and <code>msg.retain</code> respectively.</p> -->
|
|
91
|
+
|
|
92
|
+
<h3>References</h3>
|
|
93
|
+
<ul>
|
|
94
|
+
<li><a href="https://sap-samples.github.io/smb-summit-hackathon/b1sl.html" target="_black">Service layer API docs</a> - for more details</li>
|
|
95
|
+
<li>
|
|
96
|
+
<a href="https://github.com/yousolution-cloud/node-red-contrib-you-sap-service-layer">@yousolution-cloud/node-red-contrib-you-sap-service-layer</a> - the
|
|
97
|
+
nodes github repository
|
|
98
|
+
</li>
|
|
99
|
+
</ul>
|
|
100
|
+
</script>
|
package/nodes/nextLink.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
module.exports = function (RED) {
|
|
2
|
-
function NextLinkNode(config) {
|
|
3
|
-
RED.nodes.createNode(this, config);
|
|
4
|
-
const node = this;
|
|
5
|
-
|
|
6
|
-
node.on('input', async (msg) => {
|
|
7
|
-
const nextLink = msg[config.nextLink];
|
|
8
|
-
|
|
9
|
-
if (!nextLink) {
|
|
10
|
-
node.send([null, msg]);
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
node.send([msg, null]);
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
RED.nodes.registerType('nextLink', NextLinkNode, {});
|
|
18
|
-
};
|
|
1
|
+
module.exports = function (RED) {
|
|
2
|
+
function NextLinkNode(config) {
|
|
3
|
+
RED.nodes.createNode(this, config);
|
|
4
|
+
const node = this;
|
|
5
|
+
|
|
6
|
+
node.on('input', async (msg) => {
|
|
7
|
+
const nextLink = msg[config.nextLink];
|
|
8
|
+
|
|
9
|
+
if (!nextLink) {
|
|
10
|
+
node.send([null, msg]);
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
node.send([msg, null]);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
RED.nodes.registerType('nextLink', NextLinkNode, {});
|
|
18
|
+
};
|