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

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,16 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ # [0.2.12] - 2025-08-05
6
+
7
+ - Bug Fix on DeleteSAP node for manage Drafts cancelation
8
+
9
+ # [0.2.11] - 2025-07-28
10
+
11
+ - Add Manage NextLink on ServiceNode
12
+ > 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*
13
+ - Bug fix view on PatchSAP Node
14
+
5
15
  # [0.2.10] - 2025-03-20
6
16
 
7
17
  - Add Manage AlternateCatNum on LayerOne2SL Get / List / Create / Delete / Update
@@ -90,6 +90,11 @@
90
90
  ) {
91
91
  jQuery('#container-entityId').hide();
92
92
  }
93
+
94
+ if(jQuery(this).val() === 'Drafts'){
95
+ jQuery('#container-entityId').show();
96
+ }
97
+
93
98
  });
94
99
  },
95
100
  });
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/nodes/support.js CHANGED
@@ -251,7 +251,9 @@ function generateRequest(node, msg, config, options) {
251
251
  if (!entityId && config.entity != 'UDO' && config.entity != 'UDT') {
252
252
  throw new Error('Missing entityId');
253
253
  }
254
+
254
255
  const docEntry = msg[config.docEntry];
256
+
255
257
  if (config.entity == 'UDO') {
256
258
  if (!docEntry) {
257
259
  throw new Error('Missing docEntry');
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.12",
4
4
  "description": "Unofficial module SAP Service Layer for NODE-RED",
5
5
  "license": "MIT",
6
6
  "scripts": {