@itentialopensource/adapter-salesforce_rest 0.1.1 → 0.1.3

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
@@ -1,4 +1,20 @@
1
1
 
2
+ ## 0.1.3 [10-15-2024]
3
+
4
+ * Changes made at 2024.10.14_18:28PM
5
+
6
+ See merge request itentialopensource/adapters/adapter-salesforce_rest!2
7
+
8
+ ---
9
+
10
+ ## 0.1.2 [10-14-2024]
11
+
12
+ * Changes made at 2024.10.14_15:03PM
13
+
14
+ See merge request itentialopensource/adapters/adapter-salesforce_rest!1
15
+
16
+ ---
17
+
2
18
  ## 0.1.1 [10-10-2024]
3
19
 
4
20
  * Bug fixes and performance improvements
@@ -6,4 +22,3 @@
6
22
  See commit 9a52913
7
23
 
8
24
  ---
9
-
package/TAB1.md ADDED
@@ -0,0 +1,10 @@
1
+ # Overview
2
+
3
+ This adapter is used to integrate the Itential Automation Platform (IAP) with the Salesforce_rest System. The API that was used to build the adapter for Salesforce_rest is usually available in the report directory of this adapter. The adapter utilizes the Salesforce_rest API to provide the integrations that are deemed pertinent to IAP. The ReadMe file is intended to provide information on this adapter it is generated from various other Markdown files.
4
+
5
+ ## Details
6
+ The Salesforce REST adapter from Itential is used to integrate the Itential Automation Platform (IAP) with Salesforce using REST API. With this adapter you have the ability to perform operations such as:
7
+
8
+ - Create, Update, or Delete a Record
9
+
10
+ For further technical details on how to install and use this adapter, please click the Technical Documentation tab.
package/TAB2.md ADDED
@@ -0,0 +1,320 @@
1
+ # Adapter for Salesforce REST
2
+
3
+ ## Table of Contents
4
+
5
+ - [Specific Adapter Information](#specific-adapter-information)
6
+ - [Authentication](#authentication)
7
+ - [Sample Properties](#sample-properties)
8
+ - [Swagger](#swagger)
9
+ - [Generic Adapter Information](#generic-adapter-information)
10
+
11
+ ## Specific Adapter Information
12
+ ### Authentication
13
+
14
+ This document will go through the steps for authenticating the Salesforce REST adapter with OAuth Authentication. Properly configuring the properties for an adapter in IAP is critical for getting the adapter online. You can read more about adapter authentication <a href="https://docs.itential.com/opensource/docs/authentication" target="_blank">HERE</a>.
15
+
16
+ #### OAuth Authentication
17
+ The Salesforce REST adapter requires OAuth Authentication. If you change authentication methods, you should change this section accordingly and merge it back into the adapter repository.
18
+
19
+ STEPS
20
+ 1. Ensure you have access to a Salesforce server and that it is running
21
+ 2. Follow the steps in the README.md to import the adapter into IAP if you have not already done so
22
+ 3. Use the properties below for the ```properties.authentication``` field
23
+ ```json
24
+ "authentication": {
25
+ "auth_method": "request_token",
26
+ "username": "username",
27
+ "password": "passwordsecretToken",
28
+ "token_timeout": 1800000,
29
+ "token_cache": "local",
30
+ "invalid_token_error": 401,
31
+ "auth_field": "header.headers.Authorization",
32
+ "auth_field_format": "Bearer {token}",
33
+ "client_id": "client_id",
34
+ "client_secret": "client_secret",
35
+ "grant_type": "password"
36
+ }
37
+ ```
38
+ 4. Restart the adapter. If your properties were set correctly, the adapter should go online.
39
+
40
+ #### Troubleshooting
41
+ - Make sure you copied over the correct credentials.
42
+ - Turn on debug level logs for the adapter in IAP Admin Essentials.
43
+ - Turn on auth_logging for the adapter in IAP Admin Essentials (adapter properties).
44
+ - Investigate the logs - in particular:
45
+ - The FULL REQUEST log to make sure the proper headers are being sent with the request.
46
+ - The FULL BODY log to make sure the payload is accurate.
47
+ - The CALL RETURN log to see what the other system is telling us.
48
+ - Credentials should be ** masked ** by the adapter so make sure you verify token.
49
+ - Remember when you are done to turn auth_logging off as you do not want to log credentials.
50
+
51
+ ### Sample Properties
52
+
53
+ Sample Properties can be used to help you configure the adapter in the Itential Automation Platform. You will need to update connectivity information such as the host, port, protocol and credentials.
54
+
55
+ ```json
56
+ "properties": {
57
+ "host": "localhost",
58
+ "port": 443,
59
+ "choosepath": "",
60
+ "base_path": "/services",
61
+ "version": "",
62
+ "cache_location": "none",
63
+ "encode_pathvars": true,
64
+ "encode_queryvars": true,
65
+ "save_metric": false,
66
+ "stub": true,
67
+ "protocol": "https",
68
+ "authentication": {
69
+ "auth_method": "request_token",
70
+ "username": "username",
71
+ "password": "password",
72
+ "token": "token",
73
+ "token_timeout": 1800000,
74
+ "token_cache": "local",
75
+ "invalid_token_error": 401,
76
+ "auth_field": "header.headers.Authorization",
77
+ "auth_field_format": "Bearer {token}",
78
+ "auth_logging": false,
79
+ "client_id": "client_id",
80
+ "client_secret": "client_secret",
81
+ "grant_type": "password",
82
+ "sensitive": [],
83
+ "sso": {
84
+ "protocol": "",
85
+ "host": "",
86
+ "port": 0
87
+ },
88
+ "multiStepAuthCalls": [
89
+ {
90
+ "name": "",
91
+ "requestFields": {},
92
+ "responseFields": {},
93
+ "successfullResponseCode": 200
94
+ }
95
+ ]
96
+ },
97
+ "healthcheck": {
98
+ "type": "startup",
99
+ "frequency": 300000,
100
+ "query_object": {},
101
+ "addlHeaders": {}
102
+ },
103
+ "throttle": {
104
+ "throttle_enabled": false,
105
+ "number_pronghorns": 1,
106
+ "sync_async": "sync",
107
+ "max_in_queue": 1000,
108
+ "concurrent_max": 1,
109
+ "expire_timeout": 0,
110
+ "avg_runtime": 200,
111
+ "priorities": [
112
+ {
113
+ "value": 0,
114
+ "percent": 100
115
+ }
116
+ ]
117
+ },
118
+ "request": {
119
+ "number_redirects": 0,
120
+ "number_retries": 3,
121
+ "limit_retry_error": [
122
+ 0
123
+ ],
124
+ "failover_codes": [],
125
+ "attempt_timeout": 5000,
126
+ "global_request": {
127
+ "payload": {},
128
+ "uriOptions": {},
129
+ "addlHeaders": {},
130
+ "authData": {}
131
+ },
132
+ "healthcheck_on_timeout": false,
133
+ "return_raw": false,
134
+ "archiving": false,
135
+ "return_request": false
136
+ },
137
+ "proxy": {
138
+ "enabled": false,
139
+ "host": "",
140
+ "port": 1,
141
+ "protocol": "http",
142
+ "username": "",
143
+ "password": ""
144
+ },
145
+ "ssl": {
146
+ "ecdhCurve": "",
147
+ "enabled": false,
148
+ "accept_invalid_cert": true,
149
+ "ca_file": "",
150
+ "key_file": "",
151
+ "cert_file": "",
152
+ "secure_protocol": "",
153
+ "ciphers": ""
154
+ },
155
+ "mongo": {
156
+ "host": "",
157
+ "port": 0,
158
+ "database": "",
159
+ "username": "",
160
+ "password": "",
161
+ "replSet": "",
162
+ "db_ssl": {
163
+ "enabled": false,
164
+ "accept_invalid_cert": false,
165
+ "ca_file": "",
166
+ "key_file": "",
167
+ "cert_file": ""
168
+ }
169
+ },
170
+ "devicebroker": {
171
+ "enabled": false,
172
+ "getDevice": [
173
+ {
174
+ "path": "/not/mapped",
175
+ "method": "GET",
176
+ "query": {},
177
+ "body": {},
178
+ "headers": {},
179
+ "handleFailure": "ignore",
180
+ "requestFields": {
181
+ "insample": "{port}"
182
+ },
183
+ "responseDatakey": "",
184
+ "responseFields": {
185
+ "name": "{this}{||}{that}",
186
+ "ostype": "{osfield}",
187
+ "ostypePrefix": "meraki-",
188
+ "port": "{port}",
189
+ "ipaddress": "{ip_addr}",
190
+ "serial": "{serial}"
191
+ }
192
+ }
193
+ ],
194
+ "getDevicesFiltered": [
195
+ {
196
+ "path": "/not/mapped",
197
+ "method": "GET",
198
+ "pagination": {
199
+ "offsetVar": "",
200
+ "limitVar": "",
201
+ "incrementBy": "limit",
202
+ "requestLocation": "query"
203
+ },
204
+ "query": {},
205
+ "body": {},
206
+ "headers": {},
207
+ "handleFailure": "ignore",
208
+ "requestFields": {},
209
+ "responseDatakey": "",
210
+ "responseFields": {
211
+ "name": "{this}{||}{that}",
212
+ "ostype": "{osfield}",
213
+ "ostypePrefix": "meraki-",
214
+ "port": "{port}",
215
+ "ipaddress": "{ip_addr}",
216
+ "serial": "{serial}",
217
+ "id": "{myid}"
218
+ }
219
+ }
220
+ ],
221
+ "isAlive": [
222
+ {
223
+ "path": "/not/mapped/{devID}",
224
+ "method": "GET",
225
+ "query": {},
226
+ "body": {},
227
+ "headers": {},
228
+ "handleFailure": "ignore",
229
+ "requestFields": {
230
+ "devID": "{id}"
231
+ },
232
+ "responseDatakey": "",
233
+ "responseFields": {
234
+ "status": "return2xx",
235
+ "statusValue": "AD.200"
236
+ }
237
+ }
238
+ ],
239
+ "getConfig": [
240
+ {
241
+ "path": "/not/mapped/{devID}",
242
+ "method": "GET",
243
+ "query": {},
244
+ "body": {},
245
+ "headers": {},
246
+ "handleFailure": "ignore",
247
+ "requestFields": {
248
+ "devID": "{id}"
249
+ },
250
+ "responseDatakey": "",
251
+ "responseFields": {}
252
+ }
253
+ ],
254
+ "getCount": [
255
+ {
256
+ "path": "/not/mapped",
257
+ "method": "GET",
258
+ "query": {},
259
+ "body": {},
260
+ "headers": {},
261
+ "handleFailure": "ignore",
262
+ "requestFields": {},
263
+ "responseDatakey": "",
264
+ "responseFields": {}
265
+ }
266
+ ]
267
+ },
268
+ "cache": {
269
+ "enabled": false,
270
+ "entities": [
271
+ {
272
+ "entityType": "device",
273
+ "frequency": 3600,
274
+ "flushOnFail": false,
275
+ "limit": 10000,
276
+ "retryAttempts": 5,
277
+ "sort": true,
278
+ "populate": [
279
+ {
280
+ "path": "/not/mapped",
281
+ "method": "GET",
282
+ "pagination": {
283
+ "offsetVar": "",
284
+ "limitVar": "",
285
+ "incrementBy": "limit",
286
+ "requestLocation": "query"
287
+ },
288
+ "query": {},
289
+ "body": {},
290
+ "headers": {},
291
+ "handleFailure": "ignore",
292
+ "requestFields": {},
293
+ "responseDatakey": "",
294
+ "responseFields": {
295
+ "name": "{this}{||}{that}",
296
+ "ostype": "{osfield}",
297
+ "ostypePrefix": "meraki-",
298
+ "port": "{port}",
299
+ "ipaddress": "{ip_addr}",
300
+ "serial": "{serial}",
301
+ "id": "{myid}"
302
+ }
303
+ }
304
+ ],
305
+ "cachedTasks": [
306
+ {
307
+ "name": "",
308
+ "filterField": "",
309
+ "filterLoc": ""
310
+ }
311
+ ]
312
+ }
313
+ ]
314
+ }
315
+ }
316
+ ```
317
+ ### [Swagger](https://gitlab.com/itentialopensource/adapters/adapter-salesforce_rest/-/blob/master/report/adapter-openapi.json)
318
+
319
+ ## [Generic Adapter Information](https://gitlab.com/itentialopensource/adapters/adapter-salesforce_rest/-/blob/master/README.md)
320
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-salesforce_rest",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "This adapter integrates with system described as: Salesforce REST.",
5
5
  "main": "adapter.js",
6
6
  "systemName": "Salesforce_rest",
@@ -52,7 +52,7 @@
52
52
  "author": "Itential",
53
53
  "homepage": "https://gitlab.com/itentialopensource/adapters/adapter-salesforce_rest#readme",
54
54
  "dependencies": {
55
- "@itentialopensource/adapter-utils": "^5.9.0",
55
+ "@itentialopensource/adapter-utils": "^5.9.4",
56
56
  "acorn": "^8.12.1",
57
57
  "ajv": "^8.17.1",
58
58
  "axios": "^1.7.4",
Binary file