@yousolution/node-red-contrib-you-sap-service-layer 0.2.10 → 0.2.11

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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ # [0.2.11] - 2025-07-28
6
+
7
+ - Add Manage NextLink on ServiceNode
8
+ > the node ServiceNode does *not manage “NextLink” directly* as it is very case-dependent, the property is provided and *delegated to the flow for management*
9
+ - Bug fix view on PatchSAP Node
10
+
5
11
  # [0.2.10] - 2025-03-20
6
12
 
7
13
  - Add Manage AlternateCatNum on LayerOne2SL Get / List / Create / Delete / Update
package/nodes/nextLink.js CHANGED
@@ -14,12 +14,21 @@ module.exports = function (RED) {
14
14
  } else if (nextLink.includes('/b1s/v1/')) {
15
15
  msg.nextLink = nextLink.replace('/b1s/v1/', "").trim();
16
16
  node.log('NextLink Replace SL SetUp /b1s/v1/');
17
- } else {
17
+ }
18
+ else {
18
19
  node.log('NextLink OK for SL');
19
20
  }
20
- }
21
21
 
22
22
 
23
+ if(msg.nextLink.includes('QueryService_PostQuery') ){ // Specific for QueryService_PostQuery
24
+ // msg.nextLink = nextLink.replace('/b1s/v2/', "").trim();
25
+ // msg.nextLink = nextLink.replace('/b1s/v1/', "").trim();
26
+ msg.nextLink = msg.nextLink.replace('QueryService_PostQuery?', "").trim();
27
+ }
28
+
29
+
30
+ }
31
+
23
32
  if (!nextLink) {
24
33
  node.send([null, msg]);
25
34
  return;
@@ -6,9 +6,9 @@
6
6
  name: { value: '' },
7
7
  method: { value: 'PATCH' },
8
8
  entity: { value: '' },
9
- udo: { value: '' },
10
- udt: { value: '' },
11
- entityId: { value: '' },
9
+ udo: { value: '', validate: (v) => true },
10
+ udt: { value: '', validate: (v) => true },
11
+ entityId: { value: '', validate: (v) => true },
12
12
  docEntry: {
13
13
  value: '',
14
14
  validate: (v) => true,
@@ -162,6 +162,9 @@
162
162
  <p>Likewise the QoS and retain values can be configured in the node or, if left
163
163
  blank, set by <code>msg.qos</code> and <code>msg.retain</code> respectively.</p> -->
164
164
 
165
+ <h3>NextLink</h3>
166
+ <p>the node does not manage “NextLink” directly as it is very case-dependent, the property is provided and delegated to the flow for management</p>
167
+
165
168
  <h3>References</h3>
166
169
  <ul>
167
170
  <li><a href="https://sap-samples.github.io/smb-summit-hackathon/b1sl.html" target="_black">Service layer API docs</a> - for more details </li>
@@ -18,8 +18,10 @@ module.exports = function (RED) {
18
18
  const data = msg[config.bodyPost];
19
19
  const options = { method: 'POST', hasRawQuery: false, isService: true, data: data };
20
20
  const login = Support.login;
21
-
21
+ //config.nextLink = "nextLink";
22
22
  const result = await Support.sendRequest({ node, msg, config, axios, login, options }, config.manageError);
23
+ msg.nextLink = result.data['odata.nextLink'] || result.data['@odata.nextLink'];
24
+
23
25
  if(config.manageError) {
24
26
  msg.payload = VerifyErrorSL(node, msg, result.data, true);//result.data;
25
27
  msg.statusCode = result.status;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yousolution/node-red-contrib-you-sap-service-layer",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "Unofficial module SAP Service Layer for NODE-RED",
5
5
  "license": "MIT",
6
6
  "scripts": {