@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.
Files changed (50) hide show
  1. package/.prettierrc +6 -6
  2. package/.vscode/launch.json +23 -23
  3. package/CHANGELOG.md +61 -52
  4. package/README.md +126 -126
  5. package/docker-compose.yml +14 -14
  6. package/examples/example.json +625 -625
  7. package/nodes/SQLQuery.html +179 -179
  8. package/nodes/SQLQuery.js +46 -46
  9. package/nodes/authenticateSap.html +146 -146
  10. package/nodes/authenticateSap.js +129 -129
  11. package/nodes/closeSap.html +128 -97
  12. package/nodes/closeSap.js +36 -36
  13. package/nodes/createSQLQuery.html +165 -165
  14. package/nodes/createSQLQuery.js +70 -70
  15. package/nodes/createSap.html +391 -391
  16. package/nodes/createSap.js +40 -40
  17. package/nodes/crossJoinSap.html +394 -394
  18. package/nodes/crossJoinSap.js +37 -37
  19. package/nodes/deleteSap.html +406 -406
  20. package/nodes/deleteSap.js +35 -35
  21. package/nodes/getSap.html +427 -427
  22. package/nodes/getSap.js +34 -34
  23. package/nodes/listSap.html +402 -402
  24. package/nodes/listSap.js +37 -37
  25. package/nodes/manageErrors.js +38 -38
  26. package/nodes/manipulateEntitySap.html +176 -176
  27. package/nodes/manipulateEntitySap.js +46 -46
  28. package/nodes/nextLink.html +100 -100
  29. package/nodes/nextLink.js +18 -18
  30. package/nodes/patchSap.html +424 -424
  31. package/nodes/patchSap.js +40 -40
  32. package/nodes/serviceSap.html +160 -206
  33. package/nodes/serviceSap.js +39 -39
  34. package/nodes/support.js +363 -363
  35. package/package.json +65 -65
  36. package/resources/entities.json +59 -59
  37. package/resources/services.json +343 -343
  38. package/test/authenticateSap.spec.js +307 -307
  39. package/test/closeSap.spec.js +156 -156
  40. package/test/createSQLQuery.spec.js +174 -174
  41. package/test/createSap.spec.js +183 -183
  42. package/test/crossJoinSap.spec.js +156 -156
  43. package/test/deleteSap.spec.js +156 -156
  44. package/test/getSap.spec.js +156 -156
  45. package/test/listSap.spec.js +156 -156
  46. package/test/manipulateEntitySap.spec.js +191 -191
  47. package/test/patchSap.spec.js +184 -184
  48. package/test/serviceSap.spec.js +170 -170
  49. package/test/support.spec.js +1419 -1419
  50. package/data/.gitkeep +0 -0
package/.prettierrc CHANGED
@@ -1,6 +1,6 @@
1
- {
2
- "singleQuote": true,
3
- "useTabs":false,
4
- "tabWidth": 2,
5
- "printWidth": 120
6
- }
1
+ {
2
+ "singleQuote": true,
3
+ "useTabs":false,
4
+ "tabWidth": 2,
5
+ "printWidth": 120
6
+ }
@@ -1,23 +1,23 @@
1
- {
2
- "version": "0.2.0",
3
- "configurations": [
4
- {
5
- "args": [
6
- "-u",
7
- "tdd",
8
- "--timeout",
9
- "999999",
10
- "--colors",
11
- "${workspaceFolder}/test"
12
- ],
13
- "internalConsoleOptions": "openOnSessionStart",
14
- "name": "Mocha Tests",
15
- "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
16
- "request": "launch",
17
- "skipFiles": [
18
- "<node_internals>/**"
19
- ],
20
- "type": "pwa-node"
21
- }
22
- ]
23
- }
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "args": [
6
+ "-u",
7
+ "tdd",
8
+ "--timeout",
9
+ "999999",
10
+ "--colors",
11
+ "${workspaceFolder}/test"
12
+ ],
13
+ "internalConsoleOptions": "openOnSessionStart",
14
+ "name": "Mocha Tests",
15
+ "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
16
+ "request": "launch",
17
+ "skipFiles": [
18
+ "<node_internals>/**"
19
+ ],
20
+ "type": "pwa-node"
21
+ }
22
+ ]
23
+ }
package/CHANGELOG.md CHANGED
@@ -1,52 +1,61 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
- # [0.2.2] - 2024-10-23
5
-
6
- - Fix compatibility node-RED > 3.1.0
7
-
8
- # [0.2.0] - 2024-06-19
9
-
10
- > *Warning Breaking Change!* please make backups of flows and try in test environment before upgrading
11
-
12
- - We have improved the management of login token expiration
13
- - We have updated the manage dynamic login on AUTH Request
14
- - We have updated the result handling in PATCH request
15
- - We have resolved an error send Entry on UDT PATCH request
16
- - We have updated the result handling in SERVICE request
17
- - We have updated the error parsing function
18
- - We Add Service "OrdersService_Preview" on SERVICE
19
- - Bug Fix
20
- - Library Axios & Odata Updated
21
-
22
- # [0.1.1] - 2022-12-09
23
-
24
- - Added label output to nextLink block
25
- - Fix authentication for subflows compatibility
26
- - Bug fix
27
-
28
- # [0.1.0] - 2022-07-28
29
-
30
- - Added sqlQuery node to execute saved sql from SAP Service Layer
31
- - Added a second output to the nextLink node to check when pagination is finished
32
- - Bug fix
33
-
34
- # [0.0.5] - 2022-05-27
35
-
36
- - Change cross join
37
- - Fix html icons
38
-
39
- # [0.0.4] - 2022-05-12
40
-
41
- - Add all services of SAP service layer
42
- - Add manipulate entity
43
-
44
- # [0.0.3] - 2022-04-15
45
-
46
- - Refactoring and add unit tests
47
-
48
- # [0.0.1] - 2021-11-22
49
-
50
- ### First release.
51
-
52
- - First public release of unofficial SAP Service Layer for NODE-RED.
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ # [0.2.4] - 2024-11-07
6
+
7
+ - Fix compatibility on serviceSap and manipulateEntitySap
8
+
9
+ # [0.2.3] - 2024-11-01
10
+
11
+ - Upgrade List on CloseSap Node
12
+
13
+ # [0.2.2] - 2024-10-23
14
+
15
+ - Fix compatibility node-RED > 3.1.0
16
+
17
+ # [0.2.0] - 2024-06-19
18
+
19
+ > *Warning Breaking Change!* please make backups of flows and try in test environment before upgrading
20
+
21
+ - We have improved the management of login token expiration
22
+ - We have updated the manage dynamic login on AUTH Request
23
+ - We have updated the result handling in PATCH request
24
+ - We have resolved an error send Entry on UDT PATCH request
25
+ - We have updated the result handling in SERVICE request
26
+ - We have updated the error parsing function
27
+ - We Add Service "OrdersService_Preview" on SERVICE
28
+ - Bug Fix
29
+ - Library Axios & Odata Updated
30
+
31
+ # [0.1.1] - 2022-12-09
32
+
33
+ - Added label output to nextLink block
34
+ - Fix authentication for subflows compatibility
35
+ - Bug fix
36
+
37
+ # [0.1.0] - 2022-07-28
38
+
39
+ - Added sqlQuery node to execute saved sql from SAP Service Layer
40
+ - Added a second output to the nextLink node to check when pagination is finished
41
+ - Bug fix
42
+
43
+ # [0.0.5] - 2022-05-27
44
+
45
+ - Change cross join
46
+ - Fix html icons
47
+
48
+ # [0.0.4] - 2022-05-12
49
+
50
+ - Add all services of SAP service layer
51
+ - Add manipulate entity
52
+
53
+ # [0.0.3] - 2022-04-15
54
+
55
+ - Refactoring and add unit tests
56
+
57
+ # [0.0.1] - 2021-11-22
58
+
59
+ ### First release.
60
+
61
+ - First public release of unofficial SAP Service Layer for NODE-RED.
package/README.md CHANGED
@@ -1,126 +1,126 @@
1
- <!-- [![NPM version][npm-version-image]][npm-url]
2
- [![NPM downloads per month][npm-downloads-month-image]][npm-url]
3
- [![NPM downloads total][npm-downloads-total-image]][npm-url]
4
- [![MIT License][license-image]][license-url] -->
5
-
6
- # Unofficial SAP Service layer nodes for Node-RED.
7
-
8
- [![Platform](https://img.shields.io/badge/platform-Node--RED-red)](https://nodered.org)
9
-
10
- This module provides a set of nodes for Node-RED to quickly create integration flows with SAP service layer.
11
-
12
- # Installation
13
-
14
- [![NPM](https://nodei.co/npm/node-red-contrib-you-sap-service-layer.png?downloads=true)](https://nodei.co/npm/node-red-contrib-you-sap-service-layer/)
15
-
16
- You can install the nodes using node-red's "Manage palette" in the side bar.
17
-
18
- Or run the following command in the root directory of your Node-RED installation
19
-
20
- npm install @yousolution/node-red-contrib-you-sap-service-layer --save
21
-
22
- # Dependencies
23
-
24
- The nodes are tested with `Node.js v12.22.6` and `Node-RED v2.0.6`.
25
-
26
- - [axios](https://github.com/axios/axios)
27
- - [odata-query](https://github.com/techniq/odata-query)
28
-
29
- # Changelog
30
-
31
- Changes can be followed [here](/CHANGELOG.md).
32
-
33
- # Usage
34
-
35
- ## Basics
36
-
37
- ### Authenticate (node authenticateSap)
38
-
39
- Use this node to authenticate with a valid SAP service layer API access\
40
- The node requires the following credentials:
41
-
42
- - host
43
- - port
44
- - company
45
- - user
46
- - password
47
-
48
- You can see how to use it in the example flows in the _/examples_ directory.\
49
- _For more details see official [SAP Service layer documentation](https://sap-samples.github.io/smb-summit-hackathon/b1sl.html)_
50
-
51
- ### Retrieve a list of entities (node listSap)
52
-
53
- Use this node to retrieve a list of entities
54
-
55
- 1. Select the type of entity you want to retrieve as a list
56
- 2. If you want to add filter/options use oData params _optional_\
57
- Query options on entities:
58
-
59
- | option | description |
60
- | -------- | --------------------------------------------------------------------------- |
61
- | $filter | Restrict the set of business objects returned. |
62
- | $orderby | Specify the order in which business objects are returned from the service. |
63
- | $select | Restrict the service to return only the properties requested by the client. |
64
- | $skip | Specify that the result excludes the first n entities. |
65
- | $top | Specify that only the first n records should be returned. |
66
-
67
- You can see how to use it in the example flows in the _/examples_ directory.\
68
- _For more details see official [SAP Service layer documentation](https://sap-samples.github.io/smb-summit-hackathon/b1sl.html)_
69
-
70
- ### Get single entity (node getSap)
71
-
72
- Use this node to get a single entity by providing the primary key
73
-
74
- 1. Select the type of entity you want to retrieve
75
- 2. Use _objectId_ as primary key of entity
76
- 3. Use _oData_ to filter the response fields _optional_\
77
-
78
- Query options on single entity:
79
-
80
- | option | description |
81
- | ------- | --------------------------------------------------------------------------- |
82
- | $select | Restrict the service to return only the properties requested by the client. |
83
-
84
- You can see how to use it in the example flows in the _/examples_ directory.\
85
- _For more details see official [SAP Service layer documentation](https://sap-samples.github.io/smb-summit-hackathon/b1sl.html)_
86
-
87
- ### Create a new entity (node createSap)
88
-
89
- Use this node to create a new entity.
90
-
91
- 1. Select the type of entity you want to create
92
- 2. Use _msg.bodyPost_ to provide the entity's fields
93
- 3. Use _msg.createParams_ to provide object params
94
-
95
- You can see how to use it in the example flows in the _/examples_ directory.\
96
- _For more details see official [SAP Service layer documentation](https://sap-samples.github.io/smb-summit-hackathon/b1sl.html)_
97
-
98
- ### Update an object
99
-
100
- Use this node to update an object.
101
-
102
- 1. Select the type of object you want to update
103
- 2. Use _objectId_ as primary key of object
104
- 3. Use _msg.updateParams_ to provide object params
105
-
106
- You can see how to use it in the example flows in the _/examples_ directory.\
107
- _For more details see official [SAP Service layer documentation](https://sap-samples.github.io/smb-summit-hackathon/b1sl.html)_
108
-
109
- ### Delete an Object
110
-
111
- Use this node to delete an object.
112
-
113
- 1. Select the type of object you want to delete
114
- 2. Use _objectId_ as primary key of object
115
-
116
- You can see how to use it in the example flows in the _/examples_ directory.\
117
- _For more details see official [SAP Service layer documentation](https://sap-samples.github.io/smb-summit-hackathon/b1sl.html)_
118
-
119
- ### Count the number of objects per type
120
-
121
- Use this node to count the number of objects per type.
122
-
123
- 1. Select the type of object you want to count
124
-
125
- You can see how to use it in the example flows in the _/examples_ directory.\
126
- _For more details see official [SAP Service layer documentation](https://sap-samples.github.io/smb-summit-hackathon/b1sl.html)_
1
+ <!-- [![NPM version][npm-version-image]][npm-url]
2
+ [![NPM downloads per month][npm-downloads-month-image]][npm-url]
3
+ [![NPM downloads total][npm-downloads-total-image]][npm-url]
4
+ [![MIT License][license-image]][license-url] -->
5
+
6
+ # Unofficial SAP Service layer nodes for Node-RED.
7
+
8
+ [![Platform](https://img.shields.io/badge/platform-Node--RED-red)](https://nodered.org)
9
+
10
+ This module provides a set of nodes for Node-RED to quickly create integration flows with SAP service layer.
11
+
12
+ # Installation
13
+
14
+ [![NPM](https://nodei.co/npm/node-red-contrib-you-sap-service-layer.png?downloads=true)](https://nodei.co/npm/node-red-contrib-you-sap-service-layer/)
15
+
16
+ You can install the nodes using node-red's "Manage palette" in the side bar.
17
+
18
+ Or run the following command in the root directory of your Node-RED installation
19
+
20
+ npm install @yousolution/node-red-contrib-you-sap-service-layer --save
21
+
22
+ # Dependencies
23
+
24
+ The nodes are tested with `Node.js v12.22.6` and `Node-RED v2.0.6`.
25
+
26
+ - [axios](https://github.com/axios/axios)
27
+ - [odata-query](https://github.com/techniq/odata-query)
28
+
29
+ # Changelog
30
+
31
+ Changes can be followed [here](/CHANGELOG.md).
32
+
33
+ # Usage
34
+
35
+ ## Basics
36
+
37
+ ### Authenticate (node authenticateSap)
38
+
39
+ Use this node to authenticate with a valid SAP service layer API access\
40
+ The node requires the following credentials:
41
+
42
+ - host
43
+ - port
44
+ - company
45
+ - user
46
+ - password
47
+
48
+ You can see how to use it in the example flows in the _/examples_ directory.\
49
+ _For more details see official [SAP Service layer documentation](https://sap-samples.github.io/smb-summit-hackathon/b1sl.html)_
50
+
51
+ ### Retrieve a list of entities (node listSap)
52
+
53
+ Use this node to retrieve a list of entities
54
+
55
+ 1. Select the type of entity you want to retrieve as a list
56
+ 2. If you want to add filter/options use oData params _optional_\
57
+ Query options on entities:
58
+
59
+ | option | description |
60
+ | -------- | --------------------------------------------------------------------------- |
61
+ | $filter | Restrict the set of business objects returned. |
62
+ | $orderby | Specify the order in which business objects are returned from the service. |
63
+ | $select | Restrict the service to return only the properties requested by the client. |
64
+ | $skip | Specify that the result excludes the first n entities. |
65
+ | $top | Specify that only the first n records should be returned. |
66
+
67
+ You can see how to use it in the example flows in the _/examples_ directory.\
68
+ _For more details see official [SAP Service layer documentation](https://sap-samples.github.io/smb-summit-hackathon/b1sl.html)_
69
+
70
+ ### Get single entity (node getSap)
71
+
72
+ Use this node to get a single entity by providing the primary key
73
+
74
+ 1. Select the type of entity you want to retrieve
75
+ 2. Use _objectId_ as primary key of entity
76
+ 3. Use _oData_ to filter the response fields _optional_\
77
+
78
+ Query options on single entity:
79
+
80
+ | option | description |
81
+ | ------- | --------------------------------------------------------------------------- |
82
+ | $select | Restrict the service to return only the properties requested by the client. |
83
+
84
+ You can see how to use it in the example flows in the _/examples_ directory.\
85
+ _For more details see official [SAP Service layer documentation](https://sap-samples.github.io/smb-summit-hackathon/b1sl.html)_
86
+
87
+ ### Create a new entity (node createSap)
88
+
89
+ Use this node to create a new entity.
90
+
91
+ 1. Select the type of entity you want to create
92
+ 2. Use _msg.bodyPost_ to provide the entity's fields
93
+ 3. Use _msg.createParams_ to provide object params
94
+
95
+ You can see how to use it in the example flows in the _/examples_ directory.\
96
+ _For more details see official [SAP Service layer documentation](https://sap-samples.github.io/smb-summit-hackathon/b1sl.html)_
97
+
98
+ ### Update an object
99
+
100
+ Use this node to update an object.
101
+
102
+ 1. Select the type of object you want to update
103
+ 2. Use _objectId_ as primary key of object
104
+ 3. Use _msg.updateParams_ to provide object params
105
+
106
+ You can see how to use it in the example flows in the _/examples_ directory.\
107
+ _For more details see official [SAP Service layer documentation](https://sap-samples.github.io/smb-summit-hackathon/b1sl.html)_
108
+
109
+ ### Delete an Object
110
+
111
+ Use this node to delete an object.
112
+
113
+ 1. Select the type of object you want to delete
114
+ 2. Use _objectId_ as primary key of object
115
+
116
+ You can see how to use it in the example flows in the _/examples_ directory.\
117
+ _For more details see official [SAP Service layer documentation](https://sap-samples.github.io/smb-summit-hackathon/b1sl.html)_
118
+
119
+ ### Count the number of objects per type
120
+
121
+ Use this node to count the number of objects per type.
122
+
123
+ 1. Select the type of object you want to count
124
+
125
+ You can see how to use it in the example flows in the _/examples_ directory.\
126
+ _For more details see official [SAP Service layer documentation](https://sap-samples.github.io/smb-summit-hackathon/b1sl.html)_
@@ -1,14 +1,14 @@
1
- version: '3.7'
2
-
3
- services:
4
- nodered:
5
- image: nodered/node-red:3.1.9-18
6
- # network_mode: host
7
- extra_hosts:
8
- - 'api.yousolution.local:192.168.1.100'
9
- volumes:
10
- - ./data:/data
11
- ports:
12
- - '1880:1880'
13
- environment:
14
- NODE_ENV: 'dev'
1
+ version: '3.7'
2
+
3
+ services:
4
+ nodered:
5
+ image: nodered/node-red:3.1.9-18
6
+ # network_mode: host
7
+ extra_hosts:
8
+ - 'api.yousolution.local:192.168.1.100'
9
+ volumes:
10
+ - ./data:/data
11
+ ports:
12
+ - '1880:1880'
13
+ environment:
14
+ NODE_ENV: 'dev'