@itentialopensource/adapter-salesforce 0.7.4 → 0.9.0
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/AUTH.md +39 -0
- package/BROKER.md +199 -0
- package/CALLS.md +454 -0
- package/CHANGELOG.md +49 -29
- package/CODE_OF_CONDUCT.md +12 -17
- package/CONTRIBUTING.md +3 -148
- package/ENHANCE.md +69 -0
- package/PROPERTIES.md +641 -0
- package/README.md +239 -507
- package/SUMMARY.md +9 -0
- package/SYSTEMINFO.md +11 -0
- package/TROUBLESHOOT.md +47 -0
- package/adapter.js +423 -304
- package/adapterBase.js +854 -408
- package/changelogs/changelog.md +94 -0
- package/entities/.generic/action.json +110 -5
- package/entities/.generic/schema.json +6 -1
- package/entities/.system/action.json +4 -4
- package/entities/.system/schemaTokenReq.json +33 -4
- package/entities/.system/schemaTokenResp.json +1 -34
- package/error.json +12 -0
- package/metadata.json +49 -0
- package/package.json +28 -22
- package/pronghorn.json +691 -88
- package/propertiesDecorators.json +14 -0
- package/propertiesSchema.json +842 -6
- package/refs?service=git-upload-pack +0 -0
- package/report/adapter-openapi.json +1543 -0
- package/report/adapter-openapi.yaml +1201 -0
- package/report/adapterInfo.json +10 -0
- package/report/updateReport1653403992147.json +120 -0
- package/report/updateReport1691511372644.json +120 -0
- package/report/updateReport1692202876451.json +120 -0
- package/report/updateReport1694464610053.json +120 -0
- package/report/updateReport1698421735618.json +120 -0
- package/sampleProperties.json +156 -3
- package/test/integration/adapterTestBasicGet.js +4 -6
- package/test/integration/adapterTestConnectivity.js +91 -42
- package/test/integration/adapterTestIntegration.js +158 -104
- package/test/unit/adapterBaseTestUnit.js +393 -310
- package/test/unit/adapterTestUnit.js +833 -209
- package/utils/adapterInfo.js +206 -0
- package/utils/addAuth.js +94 -0
- package/utils/artifactize.js +1 -1
- package/utils/basicGet.js +1 -14
- package/utils/checkMigrate.js +1 -1
- package/utils/entitiesToDB.js +179 -0
- package/utils/findPath.js +1 -1
- package/utils/methodDocumentor.js +273 -0
- package/utils/modify.js +14 -16
- package/utils/packModificationScript.js +2 -2
- package/utils/patches2bundledDeps.js +90 -0
- package/utils/pre-commit.sh +5 -0
- package/utils/removeHooks.js +20 -0
- package/utils/taskMover.js +309 -0
- package/utils/tbScript.js +129 -53
- package/utils/tbUtils.js +152 -35
- package/utils/testRunner.js +17 -17
- package/utils/troubleshootingAdapter.js +10 -31
- package/workflows/README.md +0 -3
package/adapter.js
CHANGED
|
@@ -82,10 +82,15 @@ class Salesforce extends AdapterBaseCl {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
|
-
* @
|
|
85
|
+
* @iapGetAdapterWorkflowFunctions
|
|
86
86
|
*/
|
|
87
|
-
|
|
88
|
-
let myIgnore = [
|
|
87
|
+
iapGetAdapterWorkflowFunctions(inIgnore) {
|
|
88
|
+
let myIgnore = [
|
|
89
|
+
'healthCheck',
|
|
90
|
+
'iapGetAdapterWorkflowFunctions',
|
|
91
|
+
'hasEntities',
|
|
92
|
+
'getAuthorization'
|
|
93
|
+
];
|
|
89
94
|
if (!inIgnore && Array.isArray(inIgnore)) {
|
|
90
95
|
myIgnore = inIgnore;
|
|
91
96
|
} else if (!inIgnore && typeof inIgnore === 'string') {
|
|
@@ -96,52 +101,44 @@ class Salesforce extends AdapterBaseCl {
|
|
|
96
101
|
// you can add specific methods that you do not want to be workflow functions to ignore like below
|
|
97
102
|
// myIgnore.push('myMethodNotInWorkflow');
|
|
98
103
|
|
|
99
|
-
return super.
|
|
104
|
+
return super.iapGetAdapterWorkflowFunctions(myIgnore);
|
|
100
105
|
}
|
|
101
106
|
|
|
102
107
|
/**
|
|
103
|
-
*
|
|
108
|
+
* iapUpdateAdapterConfiguration is used to update any of the adapter configuration files. This
|
|
104
109
|
* allows customers to make changes to adapter configuration without having to be on the
|
|
105
110
|
* file system.
|
|
106
111
|
*
|
|
107
|
-
* @function
|
|
112
|
+
* @function iapUpdateAdapterConfiguration
|
|
108
113
|
* @param {string} configFile - the name of the file being updated (required)
|
|
109
114
|
* @param {Object} changes - an object containing all of the changes = formatted like the configuration file (required)
|
|
110
115
|
* @param {string} entity - the entity to be changed, if an action, schema or mock data file (optional)
|
|
111
116
|
* @param {string} type - the type of entity file to change, (action, schema, mock) (optional)
|
|
112
117
|
* @param {string} action - the action to be changed, if an action, schema or mock data file (optional)
|
|
118
|
+
* @param {boolean} replace - true to replace entire mock data, false to merge/append
|
|
113
119
|
* @param {Callback} callback - The results of the call
|
|
114
120
|
*/
|
|
115
|
-
|
|
116
|
-
const
|
|
121
|
+
iapUpdateAdapterConfiguration(configFile, changes, entity, type, action, replace, callback) {
|
|
122
|
+
const meth = 'adapter-iapUpdateAdapterConfiguration';
|
|
123
|
+
const origin = `${this.id}-${meth}`;
|
|
117
124
|
log.trace(origin);
|
|
118
|
-
super.updateAdapterConfiguration(configFile, changes, entity, type, action, callback);
|
|
119
|
-
}
|
|
120
125
|
|
|
121
|
-
|
|
122
|
-
* See if the API path provided is found in this adapter
|
|
123
|
-
*
|
|
124
|
-
* @function findPath
|
|
125
|
-
* @param {string} apiPath - the api path to check on
|
|
126
|
-
* @param {Callback} callback - The results of the call
|
|
127
|
-
*/
|
|
128
|
-
findPath(apiPath, callback) {
|
|
129
|
-
const origin = `${this.id}-adapter-findPath`;
|
|
130
|
-
log.trace(origin);
|
|
131
|
-
super.findPath(apiPath, callback);
|
|
126
|
+
super.iapUpdateAdapterConfiguration(configFile, changes, entity, type, action, replace, callback);
|
|
132
127
|
}
|
|
133
128
|
|
|
134
129
|
/**
|
|
135
130
|
* @summary Suspends adapter
|
|
136
131
|
*
|
|
137
|
-
* @function
|
|
132
|
+
* @function iapSuspendAdapter
|
|
138
133
|
* @param {Callback} callback - callback function
|
|
139
134
|
*/
|
|
140
|
-
|
|
141
|
-
const
|
|
135
|
+
iapSuspendAdapter(mode, callback) {
|
|
136
|
+
const meth = 'adapter-iapSuspendAdapter';
|
|
137
|
+
const origin = `${this.id}-${meth}`;
|
|
142
138
|
log.trace(origin);
|
|
139
|
+
|
|
143
140
|
try {
|
|
144
|
-
return super.
|
|
141
|
+
return super.iapSuspendAdapter(mode, callback);
|
|
145
142
|
} catch (error) {
|
|
146
143
|
log.error(`${origin}: ${error}`);
|
|
147
144
|
return callback(null, error);
|
|
@@ -151,14 +148,16 @@ class Salesforce extends AdapterBaseCl {
|
|
|
151
148
|
/**
|
|
152
149
|
* @summary Unsuspends adapter
|
|
153
150
|
*
|
|
154
|
-
* @function
|
|
151
|
+
* @function iapUnsuspendAdapter
|
|
155
152
|
* @param {Callback} callback - callback function
|
|
156
153
|
*/
|
|
157
|
-
|
|
158
|
-
const
|
|
154
|
+
iapUnsuspendAdapter(callback) {
|
|
155
|
+
const meth = 'adapter-iapUnsuspendAdapter';
|
|
156
|
+
const origin = `${this.id}-${meth}`;
|
|
159
157
|
log.trace(origin);
|
|
158
|
+
|
|
160
159
|
try {
|
|
161
|
-
return super.
|
|
160
|
+
return super.iapUnsuspendAdapter(callback);
|
|
162
161
|
} catch (error) {
|
|
163
162
|
log.error(`${origin}: ${error}`);
|
|
164
163
|
return callback(null, error);
|
|
@@ -166,31 +165,51 @@ class Salesforce extends AdapterBaseCl {
|
|
|
166
165
|
}
|
|
167
166
|
|
|
168
167
|
/**
|
|
169
|
-
* @summary Get the
|
|
168
|
+
* @summary Get the Adapter Queue
|
|
170
169
|
*
|
|
171
|
-
* @function
|
|
170
|
+
* @function iapGetAdapterQueue
|
|
172
171
|
* @param {Callback} callback - callback function
|
|
173
172
|
*/
|
|
174
|
-
|
|
175
|
-
const
|
|
173
|
+
iapGetAdapterQueue(callback) {
|
|
174
|
+
const meth = 'adapter-iapGetAdapterQueue';
|
|
175
|
+
const origin = `${this.id}-${meth}`;
|
|
176
176
|
log.trace(origin);
|
|
177
|
-
|
|
177
|
+
|
|
178
|
+
return super.iapGetAdapterQueue(callback);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/* SCRIPT CALLS */
|
|
182
|
+
/**
|
|
183
|
+
* See if the API path provided is found in this adapter
|
|
184
|
+
*
|
|
185
|
+
* @function iapFindAdapterPath
|
|
186
|
+
* @param {string} apiPath - the api path to check on
|
|
187
|
+
* @param {Callback} callback - The results of the call
|
|
188
|
+
*/
|
|
189
|
+
iapFindAdapterPath(apiPath, callback) {
|
|
190
|
+
const meth = 'adapter-iapFindAdapterPath';
|
|
191
|
+
const origin = `${this.id}-${meth}`;
|
|
192
|
+
log.trace(origin);
|
|
193
|
+
|
|
194
|
+
super.iapFindAdapterPath(apiPath, callback);
|
|
178
195
|
}
|
|
179
196
|
|
|
180
197
|
/**
|
|
181
198
|
* @summary Runs troubleshoot scripts for adapter
|
|
182
199
|
*
|
|
183
|
-
* @function
|
|
200
|
+
* @function iapTroubleshootAdapter
|
|
184
201
|
* @param {Object} props - the connection, healthcheck and authentication properties
|
|
185
202
|
*
|
|
186
203
|
* @param {boolean} persistFlag - whether the adapter properties should be updated
|
|
187
204
|
* @param {Callback} callback - The results of the call
|
|
188
205
|
*/
|
|
189
|
-
|
|
190
|
-
const
|
|
206
|
+
iapTroubleshootAdapter(props, persistFlag, callback) {
|
|
207
|
+
const meth = 'adapter-iapTroubleshootAdapter';
|
|
208
|
+
const origin = `${this.id}-${meth}`;
|
|
191
209
|
log.trace(origin);
|
|
210
|
+
|
|
192
211
|
try {
|
|
193
|
-
return super.
|
|
212
|
+
return super.iapTroubleshootAdapter(props, persistFlag, this, callback);
|
|
194
213
|
} catch (error) {
|
|
195
214
|
log.error(`${origin}: ${error}`);
|
|
196
215
|
return callback(null, error);
|
|
@@ -200,15 +219,17 @@ class Salesforce extends AdapterBaseCl {
|
|
|
200
219
|
/**
|
|
201
220
|
* @summary runs healthcheck script for adapter
|
|
202
221
|
*
|
|
203
|
-
* @function
|
|
222
|
+
* @function iapRunAdapterHealthcheck
|
|
204
223
|
* @param {Adapter} adapter - adapter instance to troubleshoot
|
|
205
224
|
* @param {Callback} callback - callback function
|
|
206
225
|
*/
|
|
207
|
-
|
|
208
|
-
const
|
|
226
|
+
iapRunAdapterHealthcheck(callback) {
|
|
227
|
+
const meth = 'adapter-iapRunAdapterHealthcheck';
|
|
228
|
+
const origin = `${this.id}-${meth}`;
|
|
209
229
|
log.trace(origin);
|
|
230
|
+
|
|
210
231
|
try {
|
|
211
|
-
return super.
|
|
232
|
+
return super.iapRunAdapterHealthcheck(this, callback);
|
|
212
233
|
} catch (error) {
|
|
213
234
|
log.error(`${origin}: ${error}`);
|
|
214
235
|
return callback(null, error);
|
|
@@ -218,14 +239,16 @@ class Salesforce extends AdapterBaseCl {
|
|
|
218
239
|
/**
|
|
219
240
|
* @summary runs connectivity check script for adapter
|
|
220
241
|
*
|
|
221
|
-
* @function
|
|
242
|
+
* @function iapRunAdapterConnectivity
|
|
222
243
|
* @param {Callback} callback - callback function
|
|
223
244
|
*/
|
|
224
|
-
|
|
225
|
-
const
|
|
245
|
+
iapRunAdapterConnectivity(callback) {
|
|
246
|
+
const meth = 'adapter-iapRunAdapterConnectivity';
|
|
247
|
+
const origin = `${this.id}-${meth}`;
|
|
226
248
|
log.trace(origin);
|
|
249
|
+
|
|
227
250
|
try {
|
|
228
|
-
return super.
|
|
251
|
+
return super.iapRunAdapterConnectivity(callback);
|
|
229
252
|
} catch (error) {
|
|
230
253
|
log.error(`${origin}: ${error}`);
|
|
231
254
|
return callback(null, error);
|
|
@@ -235,14 +258,16 @@ class Salesforce extends AdapterBaseCl {
|
|
|
235
258
|
/**
|
|
236
259
|
* @summary runs basicGet script for adapter
|
|
237
260
|
*
|
|
238
|
-
* @function
|
|
261
|
+
* @function iapRunAdapterBasicGet
|
|
239
262
|
* @param {Callback} callback - callback function
|
|
240
263
|
*/
|
|
241
|
-
|
|
242
|
-
const
|
|
264
|
+
iapRunAdapterBasicGet(callback) {
|
|
265
|
+
const meth = 'adapter-iapRunAdapterBasicGet';
|
|
266
|
+
const origin = `${this.id}-${meth}`;
|
|
243
267
|
log.trace(origin);
|
|
268
|
+
|
|
244
269
|
try {
|
|
245
|
-
return super.
|
|
270
|
+
return super.iapRunAdapterBasicGet(callback);
|
|
246
271
|
} catch (error) {
|
|
247
272
|
log.error(`${origin}: ${error}`);
|
|
248
273
|
return callback(null, error);
|
|
@@ -250,171 +275,275 @@ class Salesforce extends AdapterBaseCl {
|
|
|
250
275
|
}
|
|
251
276
|
|
|
252
277
|
/**
|
|
253
|
-
* @summary
|
|
278
|
+
* @summary moves entites into Mongo DB
|
|
254
279
|
*
|
|
255
|
-
* @function
|
|
256
|
-
* @param {
|
|
257
|
-
*
|
|
280
|
+
* @function iapMoveAdapterEntitiesToDB
|
|
281
|
+
* @param {getCallback} callback - a callback function to return the result (Generics)
|
|
282
|
+
* or the error
|
|
283
|
+
*/
|
|
284
|
+
iapMoveAdapterEntitiesToDB(callback) {
|
|
285
|
+
const meth = 'adapter-iapMoveAdapterEntitiesToDB';
|
|
286
|
+
const origin = `${this.id}-${meth}`;
|
|
287
|
+
log.trace(origin);
|
|
288
|
+
|
|
289
|
+
try {
|
|
290
|
+
return super.iapMoveAdapterEntitiesToDB(callback);
|
|
291
|
+
} catch (err) {
|
|
292
|
+
log.error(`${origin}: ${err}`);
|
|
293
|
+
return callback(null, err);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* @summary Deactivate adapter tasks
|
|
299
|
+
*
|
|
300
|
+
* @function iapDeactivateTasks
|
|
258
301
|
*
|
|
259
|
-
* @param {
|
|
260
|
-
*
|
|
302
|
+
* @param {Array} tasks - List of tasks to deactivate
|
|
303
|
+
* @param {Callback} callback
|
|
261
304
|
*/
|
|
262
|
-
|
|
263
|
-
const
|
|
305
|
+
iapDeactivateTasks(tasks, callback) {
|
|
306
|
+
const meth = 'adapter-iapDeactivateTasks';
|
|
307
|
+
const origin = `${this.id}-${meth}`;
|
|
264
308
|
log.trace(origin);
|
|
265
309
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
310
|
+
try {
|
|
311
|
+
return super.iapDeactivateTasks(tasks, callback);
|
|
312
|
+
} catch (err) {
|
|
313
|
+
log.error(`${origin}: ${err}`);
|
|
314
|
+
return callback(null, err);
|
|
315
|
+
}
|
|
269
316
|
}
|
|
270
317
|
|
|
271
318
|
/**
|
|
272
|
-
* @summary
|
|
273
|
-
*
|
|
319
|
+
* @summary Activate adapter tasks that have previously been deactivated
|
|
320
|
+
*
|
|
321
|
+
* @function iapActivateTasks
|
|
322
|
+
*
|
|
323
|
+
* @param {Array} tasks - List of tasks to activate
|
|
324
|
+
* @param {Callback} callback
|
|
325
|
+
*/
|
|
326
|
+
iapActivateTasks(tasks, callback) {
|
|
327
|
+
const meth = 'adapter-iapActivateTasks';
|
|
328
|
+
const origin = `${this.id}-${meth}`;
|
|
329
|
+
log.trace(origin);
|
|
330
|
+
|
|
331
|
+
try {
|
|
332
|
+
return super.iapActivateTasks(tasks, callback);
|
|
333
|
+
} catch (err) {
|
|
334
|
+
log.error(`${origin}: ${err}`);
|
|
335
|
+
return callback(null, err);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/* CACHE CALLS */
|
|
340
|
+
/**
|
|
341
|
+
* @summary Populate the cache for the given entities
|
|
342
|
+
*
|
|
343
|
+
* @function iapPopulateEntityCache
|
|
344
|
+
* @param {String/Array of Strings} entityType - the entity type(s) to populate
|
|
345
|
+
* @param {Callback} callback - whether the cache was updated or not for each entity type
|
|
274
346
|
*
|
|
275
|
-
* @
|
|
347
|
+
* @returns status of the populate
|
|
348
|
+
*/
|
|
349
|
+
iapPopulateEntityCache(entityTypes, callback) {
|
|
350
|
+
const meth = 'adapter-iapPopulateEntityCache';
|
|
351
|
+
const origin = `${this.id}-${meth}`;
|
|
352
|
+
log.trace(origin);
|
|
353
|
+
|
|
354
|
+
try {
|
|
355
|
+
return super.iapPopulateEntityCache(entityTypes, callback);
|
|
356
|
+
} catch (err) {
|
|
357
|
+
log.error(`${origin}: ${err}`);
|
|
358
|
+
return callback(null, err);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* @summary Retrieves data from cache for specified entity type
|
|
364
|
+
*
|
|
365
|
+
* @function iapRetrieveEntitiesCache
|
|
366
|
+
* @param {String} entityType - entity of which to retrieve
|
|
367
|
+
* @param {Object} options - settings of which data to return and how to return it
|
|
368
|
+
* @param {Callback} callback - the data if it was retrieved
|
|
369
|
+
*/
|
|
370
|
+
iapRetrieveEntitiesCache(entityType, options, callback) {
|
|
371
|
+
const meth = 'adapter-iapCheckEiapRetrieveEntitiesCachentityCached';
|
|
372
|
+
const origin = `${this.id}-${meth}`;
|
|
373
|
+
log.trace(origin);
|
|
374
|
+
|
|
375
|
+
try {
|
|
376
|
+
return super.iapRetrieveEntitiesCache(entityType, options, callback);
|
|
377
|
+
} catch (err) {
|
|
378
|
+
log.error(`${origin}: ${err}`);
|
|
379
|
+
return callback(null, err);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/* BROKER CALLS */
|
|
384
|
+
/**
|
|
385
|
+
* @summary Determines if this adapter supports any in a list of entities
|
|
386
|
+
*
|
|
387
|
+
* @function hasEntities
|
|
276
388
|
* @param {String} entityType - the entity type to check for
|
|
277
|
-
* @param {
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
return
|
|
292
|
-
if (error) {
|
|
293
|
-
return callback(null, error);
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
// if the cache needs to be updated, update and try again
|
|
297
|
-
if (results && results[0] === 'needupdate') {
|
|
298
|
-
switch (entityType) {
|
|
299
|
-
case 'template_entity': {
|
|
300
|
-
// if the cache is invalid, update the cache
|
|
301
|
-
return this.getEntities(null, null, null, null, (data, err) => {
|
|
302
|
-
if (err) {
|
|
303
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Could not update entity: $VARIABLE$, cache', [entityType], null, null, null);
|
|
304
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
305
|
-
return callback(null, errorObj);
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
// need to check the cache again since it has been updated
|
|
309
|
-
return this.requestHandlerInst.verifyCapability(entityType, actionType, entityId, (vcapable, verror) => {
|
|
310
|
-
if (verror) {
|
|
311
|
-
return callback(null, verror);
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
return this.capabilityResults(vcapable, callback);
|
|
315
|
-
});
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
default: {
|
|
319
|
-
// unsupported entity type
|
|
320
|
-
const result = [false];
|
|
321
|
-
|
|
322
|
-
// put false in array for all entities
|
|
323
|
-
if (Array.isArray(entityId)) {
|
|
324
|
-
for (let e = 1; e < entityId.length; e += 1) {
|
|
325
|
-
result.push(false);
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
return callback(result);
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
// return the results
|
|
335
|
-
return this.capabilityResults(results, callback);
|
|
336
|
-
});
|
|
389
|
+
* @param {Array} entityList - the list of entities we are looking for
|
|
390
|
+
*
|
|
391
|
+
* @param {Callback} callback - A map where the entity is the key and the
|
|
392
|
+
* value is true or false
|
|
393
|
+
*/
|
|
394
|
+
hasEntities(entityType, entityList, callback) {
|
|
395
|
+
const meth = 'adapter-hasEntities';
|
|
396
|
+
const origin = `${this.id}-${meth}`;
|
|
397
|
+
log.trace(origin);
|
|
398
|
+
|
|
399
|
+
try {
|
|
400
|
+
return super.hasEntities(entityType, entityList, callback);
|
|
401
|
+
} catch (err) {
|
|
402
|
+
log.error(`${origin}: ${err}`);
|
|
403
|
+
return callback(null, err);
|
|
337
404
|
}
|
|
405
|
+
}
|
|
338
406
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
407
|
+
/**
|
|
408
|
+
* @summary Get Appliance that match the deviceName
|
|
409
|
+
*
|
|
410
|
+
* @function getDevice
|
|
411
|
+
* @param {String} deviceName - the deviceName to find (required)
|
|
412
|
+
*
|
|
413
|
+
* @param {getCallback} callback - a callback function to return the result
|
|
414
|
+
* (appliance) or the error
|
|
415
|
+
*/
|
|
416
|
+
getDevice(deviceName, callback) {
|
|
417
|
+
const meth = 'adapter-getDevice';
|
|
418
|
+
const origin = `${this.id}-${meth}`;
|
|
419
|
+
log.trace(origin);
|
|
346
420
|
|
|
347
|
-
|
|
348
|
-
|
|
421
|
+
try {
|
|
422
|
+
return super.getDevice(deviceName, callback);
|
|
423
|
+
} catch (err) {
|
|
424
|
+
log.error(`${origin}: ${err}`);
|
|
425
|
+
return callback(null, err);
|
|
349
426
|
}
|
|
427
|
+
}
|
|
350
428
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
if (verror) {
|
|
365
|
-
return callback(null, verror);
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
// is the entity in the list?
|
|
369
|
-
const isEntity = this.entityInList(entityId, data.response, callback);
|
|
370
|
-
const res = [];
|
|
371
|
-
|
|
372
|
-
// not found
|
|
373
|
-
for (let i = 0; i < isEntity.length; i += 1) {
|
|
374
|
-
if (vcapable) {
|
|
375
|
-
res.push(isEntity[i]);
|
|
376
|
-
} else {
|
|
377
|
-
res.push(false);
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
return callback(res);
|
|
382
|
-
});
|
|
383
|
-
});
|
|
384
|
-
}
|
|
385
|
-
default: {
|
|
386
|
-
// unsupported entity type
|
|
387
|
-
const result = [false];
|
|
429
|
+
/**
|
|
430
|
+
* @summary Get Appliances that match the filter
|
|
431
|
+
*
|
|
432
|
+
* @function getDevicesFiltered
|
|
433
|
+
* @param {Object} options - the data to use to filter the appliances (optional)
|
|
434
|
+
*
|
|
435
|
+
* @param {getCallback} callback - a callback function to return the result
|
|
436
|
+
* (appliances) or the error
|
|
437
|
+
*/
|
|
438
|
+
getDevicesFiltered(options, callback) {
|
|
439
|
+
const meth = 'adapter-getDevicesFiltered';
|
|
440
|
+
const origin = `${this.id}-${meth}`;
|
|
441
|
+
log.trace(origin);
|
|
388
442
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
443
|
+
try {
|
|
444
|
+
return super.getDevicesFiltered(options, callback);
|
|
445
|
+
} catch (err) {
|
|
446
|
+
log.error(`${origin}: ${err}`);
|
|
447
|
+
return callback(null, err);
|
|
448
|
+
}
|
|
449
|
+
}
|
|
395
450
|
|
|
396
|
-
|
|
397
|
-
|
|
451
|
+
/**
|
|
452
|
+
* @summary Gets the status for the provided appliance
|
|
453
|
+
*
|
|
454
|
+
* @function isAlive
|
|
455
|
+
* @param {String} deviceName - the deviceName of the appliance. (required)
|
|
456
|
+
*
|
|
457
|
+
* @param {configCallback} callback - callback function to return the result
|
|
458
|
+
* (appliance isAlive) or the error
|
|
459
|
+
*/
|
|
460
|
+
isAlive(deviceName, callback) {
|
|
461
|
+
const meth = 'adapter-isAlive';
|
|
462
|
+
const origin = `${this.id}-${meth}`;
|
|
463
|
+
log.trace(origin);
|
|
464
|
+
|
|
465
|
+
try {
|
|
466
|
+
return super.isAlive(deviceName, callback);
|
|
467
|
+
} catch (err) {
|
|
468
|
+
log.error(`${origin}: ${err}`);
|
|
469
|
+
return callback(null, err);
|
|
398
470
|
}
|
|
399
471
|
}
|
|
400
472
|
|
|
401
473
|
/**
|
|
402
|
-
* @summary
|
|
474
|
+
* @summary Gets a config for the provided Appliance
|
|
403
475
|
*
|
|
404
|
-
* @function
|
|
476
|
+
* @function getConfig
|
|
477
|
+
* @param {String} deviceName - the deviceName of the appliance. (required)
|
|
478
|
+
* @param {String} format - the desired format of the config. (optional)
|
|
405
479
|
*
|
|
480
|
+
* @param {configCallback} callback - callback function to return the result
|
|
481
|
+
* (appliance config) or the error
|
|
406
482
|
*/
|
|
407
|
-
|
|
408
|
-
const
|
|
483
|
+
getConfig(deviceName, format, callback) {
|
|
484
|
+
const meth = 'adapter-getConfig';
|
|
485
|
+
const origin = `${this.id}-${meth}`;
|
|
409
486
|
log.trace(origin);
|
|
410
487
|
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
488
|
+
try {
|
|
489
|
+
return super.getConfig(deviceName, format, callback);
|
|
490
|
+
} catch (err) {
|
|
491
|
+
log.error(`${origin}: ${err}`);
|
|
492
|
+
return callback(null, err);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* @summary Gets the device count from the system
|
|
498
|
+
*
|
|
499
|
+
* @function iapGetDeviceCount
|
|
500
|
+
*
|
|
501
|
+
* @param {getCallback} callback - callback function to return the result
|
|
502
|
+
* (count) or the error
|
|
503
|
+
*/
|
|
504
|
+
iapGetDeviceCount(callback) {
|
|
505
|
+
const meth = 'adapter-iapGetDeviceCount';
|
|
506
|
+
const origin = `${this.id}-${meth}`;
|
|
507
|
+
log.trace(origin);
|
|
508
|
+
|
|
509
|
+
try {
|
|
510
|
+
return super.iapGetDeviceCount(callback);
|
|
511
|
+
} catch (err) {
|
|
512
|
+
log.error(`${origin}: ${err}`);
|
|
513
|
+
return callback(null, err);
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/* GENERIC ADAPTER REQUEST - allows extension of adapter without new calls being added */
|
|
518
|
+
/**
|
|
519
|
+
* Makes the requested generic call
|
|
520
|
+
*
|
|
521
|
+
* @function iapExpandedGenericAdapterRequest
|
|
522
|
+
* @param {Object} metadata - metadata for the call (optional).
|
|
523
|
+
* Can be a stringified Object.
|
|
524
|
+
* @param {String} uriPath - the path of the api call - do not include the host, port, base path or version (optional)
|
|
525
|
+
* @param {String} restMethod - the rest method (GET, POST, PUT, PATCH, DELETE) (optional)
|
|
526
|
+
* @param {Object} pathVars - the parameters to be put within the url path (optional).
|
|
527
|
+
* Can be a stringified Object.
|
|
528
|
+
* @param {Object} queryData - the parameters to be put on the url (optional).
|
|
529
|
+
* Can be a stringified Object.
|
|
530
|
+
* @param {Object} requestBody - the body to add to the request (optional).
|
|
531
|
+
* Can be a stringified Object.
|
|
532
|
+
* @param {Object} addlHeaders - additional headers to be put on the call (optional).
|
|
533
|
+
* Can be a stringified Object.
|
|
534
|
+
* @param {getCallback} callback - a callback function to return the result (Generics)
|
|
535
|
+
* or the error
|
|
536
|
+
*/
|
|
537
|
+
iapExpandedGenericAdapterRequest(metadata, uriPath, restMethod, pathVars, queryData, requestBody, addlHeaders, callback) {
|
|
538
|
+
const meth = 'adapter-iapExpandedGenericAdapterRequest';
|
|
539
|
+
const origin = `${this.id}-${meth}`;
|
|
540
|
+
log.trace(origin);
|
|
541
|
+
|
|
542
|
+
try {
|
|
543
|
+
return super.iapExpandedGenericAdapterRequest(metadata, uriPath, restMethod, pathVars, queryData, requestBody, addlHeaders, callback);
|
|
544
|
+
} catch (err) {
|
|
545
|
+
log.error(`${origin}: ${err}`);
|
|
546
|
+
return callback(null, err);
|
|
418
547
|
}
|
|
419
548
|
}
|
|
420
549
|
|
|
@@ -438,94 +567,84 @@ class Salesforce extends AdapterBaseCl {
|
|
|
438
567
|
const origin = `${this.id}-${meth}`;
|
|
439
568
|
log.trace(origin);
|
|
440
569
|
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
570
|
+
try {
|
|
571
|
+
return super.genericAdapterRequest(uriPath, restMethod, queryData, requestBody, addlHeaders, callback);
|
|
572
|
+
} catch (err) {
|
|
573
|
+
log.error(`${origin}: ${err}`);
|
|
574
|
+
return callback(null, err);
|
|
445
575
|
}
|
|
576
|
+
}
|
|
446
577
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
578
|
+
/**
|
|
579
|
+
* Makes the requested generic call with no base path or version
|
|
580
|
+
*
|
|
581
|
+
* @function genericAdapterRequestNoBasePath
|
|
582
|
+
* @param {String} uriPath - the path of the api call - do not include the host, port, base path or version (required)
|
|
583
|
+
* @param {String} restMethod - the rest method (GET, POST, PUT, PATCH, DELETE) (required)
|
|
584
|
+
* @param {Object} queryData - the parameters to be put on the url (optional).
|
|
585
|
+
* Can be a stringified Object.
|
|
586
|
+
* @param {Object} requestBody - the body to add to the request (optional).
|
|
587
|
+
* Can be a stringified Object.
|
|
588
|
+
* @param {Object} addlHeaders - additional headers to be put on the call (optional).
|
|
589
|
+
* Can be a stringified Object.
|
|
590
|
+
* @param {getCallback} callback - a callback function to return the result (Generics)
|
|
591
|
+
* or the error
|
|
592
|
+
*/
|
|
593
|
+
genericAdapterRequestNoBasePath(uriPath, restMethod, queryData, requestBody, addlHeaders, callback) {
|
|
594
|
+
const meth = 'adapter-genericAdapterRequestNoBasePath';
|
|
595
|
+
const origin = `${this.id}-${meth}`;
|
|
596
|
+
log.trace(origin);
|
|
458
597
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
598
|
+
try {
|
|
599
|
+
return super.genericAdapterRequestNoBasePath(uriPath, restMethod, queryData, requestBody, addlHeaders, callback);
|
|
600
|
+
} catch (err) {
|
|
601
|
+
log.error(`${origin}: ${err}`);
|
|
602
|
+
return callback(null, err);
|
|
464
603
|
}
|
|
465
|
-
|
|
466
|
-
const queryParamsAvailable = queryData;
|
|
467
|
-
const queryParams = {};
|
|
468
|
-
const bodyVars = requestBody;
|
|
604
|
+
}
|
|
469
605
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
606
|
+
/* INVENTORY CALLS */
|
|
607
|
+
/**
|
|
608
|
+
* @summary run the adapter lint script to return the results.
|
|
609
|
+
*
|
|
610
|
+
* @function iapRunAdapterLint
|
|
611
|
+
* @param {Callback} callback - callback function
|
|
612
|
+
*/
|
|
613
|
+
iapRunAdapterLint(callback) {
|
|
614
|
+
const meth = 'adapter-iapRunAdapterLint';
|
|
615
|
+
const origin = `${this.id}-${meth}`;
|
|
616
|
+
log.trace(origin);
|
|
477
617
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
payload: bodyVars,
|
|
481
|
-
uriPathVars: pathVars,
|
|
482
|
-
uriQuery: queryParams,
|
|
483
|
-
uriOptions: {}
|
|
484
|
-
};
|
|
485
|
-
// add headers if provided
|
|
486
|
-
if (addlHeaders) {
|
|
487
|
-
reqObj.addlHeaders = addlHeaders;
|
|
488
|
-
}
|
|
618
|
+
return super.iapRunAdapterLint(callback);
|
|
619
|
+
}
|
|
489
620
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
returnF = false;
|
|
502
|
-
}
|
|
621
|
+
/**
|
|
622
|
+
* @summary run the adapter test scripts (baseunit and unit) to return the results.
|
|
623
|
+
* can not run integration as there can be implications with that.
|
|
624
|
+
*
|
|
625
|
+
* @function iapRunAdapterTests
|
|
626
|
+
* @param {Callback} callback - callback function
|
|
627
|
+
*/
|
|
628
|
+
iapRunAdapterTests(callback) {
|
|
629
|
+
const meth = 'adapter-iapRunAdapterTests';
|
|
630
|
+
const origin = `${this.id}-${meth}`;
|
|
631
|
+
log.trace(origin);
|
|
503
632
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
507
|
-
return this.requestHandlerInst.identifyRequest('.generic', action, reqObj, returnF, (irReturnData, irReturnError) => {
|
|
508
|
-
// if we received an error or their is no response on the results
|
|
509
|
-
// return an error
|
|
510
|
-
if (irReturnError) {
|
|
511
|
-
/* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
|
|
512
|
-
return callback(null, irReturnError);
|
|
513
|
-
}
|
|
514
|
-
if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
|
|
515
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['genericAdapterRequest'], null, null, null);
|
|
516
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
517
|
-
return callback(null, errorObj);
|
|
518
|
-
}
|
|
633
|
+
return super.iapRunAdapterTests(callback);
|
|
634
|
+
}
|
|
519
635
|
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
}
|
|
636
|
+
/**
|
|
637
|
+
* @summary provide inventory information abbout the adapter
|
|
638
|
+
*
|
|
639
|
+
* @function iapGetAdapterInventory
|
|
640
|
+
* @param {Callback} callback - callback function
|
|
641
|
+
*/
|
|
642
|
+
iapGetAdapterInventory(callback) {
|
|
643
|
+
const meth = 'adapter-iapGetAdapterInventory';
|
|
644
|
+
const origin = `${this.id}-${meth}`;
|
|
645
|
+
log.trace(origin);
|
|
646
|
+
|
|
647
|
+
return super.iapGetAdapterInventory(callback);
|
|
529
648
|
}
|
|
530
649
|
|
|
531
650
|
/**
|
|
@@ -583,7 +702,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
583
702
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
584
703
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
585
704
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
586
|
-
|
|
705
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
587
706
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
588
707
|
}
|
|
589
708
|
});
|
|
@@ -659,7 +778,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
659
778
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
660
779
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
661
780
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
662
|
-
|
|
781
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
663
782
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
664
783
|
}
|
|
665
784
|
});
|
|
@@ -734,7 +853,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
734
853
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
735
854
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
736
855
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
737
|
-
|
|
856
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
738
857
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
739
858
|
}
|
|
740
859
|
});
|
|
@@ -803,7 +922,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
803
922
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
804
923
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
805
924
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
806
|
-
|
|
925
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
807
926
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
808
927
|
}
|
|
809
928
|
});
|
|
@@ -872,7 +991,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
872
991
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
873
992
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
874
993
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
875
|
-
|
|
994
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
876
995
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
877
996
|
}
|
|
878
997
|
});
|
|
@@ -941,7 +1060,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
941
1060
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
942
1061
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
943
1062
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
944
|
-
|
|
1063
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
945
1064
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
946
1065
|
}
|
|
947
1066
|
});
|
|
@@ -1018,7 +1137,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
1018
1137
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1019
1138
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1020
1139
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1021
|
-
|
|
1140
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1022
1141
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1023
1142
|
}
|
|
1024
1143
|
});
|
|
@@ -1093,7 +1212,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
1093
1212
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1094
1213
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1095
1214
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1096
|
-
|
|
1215
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1097
1216
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1098
1217
|
}
|
|
1099
1218
|
});
|
|
@@ -1162,7 +1281,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
1162
1281
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1163
1282
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1164
1283
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1165
|
-
|
|
1284
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1166
1285
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1167
1286
|
}
|
|
1168
1287
|
});
|
|
@@ -1231,7 +1350,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
1231
1350
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1232
1351
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1233
1352
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1234
|
-
|
|
1353
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1235
1354
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1236
1355
|
}
|
|
1237
1356
|
});
|
|
@@ -1301,7 +1420,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
1301
1420
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1302
1421
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1303
1422
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1304
|
-
|
|
1423
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1305
1424
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1306
1425
|
}
|
|
1307
1426
|
});
|
|
@@ -1375,7 +1494,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
1375
1494
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1376
1495
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1377
1496
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1378
|
-
|
|
1497
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1379
1498
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1380
1499
|
}
|
|
1381
1500
|
});
|
|
@@ -1447,7 +1566,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
1447
1566
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1448
1567
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1449
1568
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1450
|
-
|
|
1569
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1451
1570
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1452
1571
|
}
|
|
1453
1572
|
});
|
|
@@ -1521,7 +1640,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
1521
1640
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1522
1641
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1523
1642
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1524
|
-
|
|
1643
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1525
1644
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1526
1645
|
}
|
|
1527
1646
|
});
|
|
@@ -1590,7 +1709,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
1590
1709
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1591
1710
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1592
1711
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1593
|
-
|
|
1712
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1594
1713
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1595
1714
|
}
|
|
1596
1715
|
});
|
|
@@ -1659,7 +1778,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
1659
1778
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1660
1779
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1661
1780
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1662
|
-
|
|
1781
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1663
1782
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1664
1783
|
}
|
|
1665
1784
|
});
|
|
@@ -1733,7 +1852,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
1733
1852
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1734
1853
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1735
1854
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1736
|
-
|
|
1855
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1737
1856
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1738
1857
|
}
|
|
1739
1858
|
});
|
|
@@ -1825,7 +1944,7 @@ Return all instances and associated incidents
|
|
|
1825
1944
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1826
1945
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1827
1946
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1828
|
-
|
|
1947
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1829
1948
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1830
1949
|
}
|
|
1831
1950
|
});
|
|
@@ -1929,7 +2048,7 @@ Status Enums
|
|
|
1929
2048
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1930
2049
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1931
2050
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1932
|
-
|
|
2051
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1933
2052
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1934
2053
|
}
|
|
1935
2054
|
});
|
|
@@ -2050,7 +2169,7 @@ Status Enums
|
|
|
2050
2169
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2051
2170
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2052
2171
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2053
|
-
|
|
2172
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2054
2173
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2055
2174
|
}
|
|
2056
2175
|
});
|
|
@@ -2171,7 +2290,7 @@ Status Enums:
|
|
|
2171
2290
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2172
2291
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2173
2292
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2174
|
-
|
|
2293
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2175
2294
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2176
2295
|
}
|
|
2177
2296
|
});
|
|
@@ -2256,7 +2375,7 @@ Status Enums:
|
|
|
2256
2375
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2257
2376
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2258
2377
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2259
|
-
|
|
2378
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2260
2379
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2261
2380
|
}
|
|
2262
2381
|
});
|
|
@@ -2330,7 +2449,7 @@ Status Enums:
|
|
|
2330
2449
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2331
2450
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2332
2451
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2333
|
-
|
|
2452
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2334
2453
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2335
2454
|
}
|
|
2336
2455
|
});
|
|
@@ -2455,7 +2574,7 @@ Status Enums:
|
|
|
2455
2574
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2456
2575
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2457
2576
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2458
|
-
|
|
2577
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2459
2578
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2460
2579
|
}
|
|
2461
2580
|
});
|
|
@@ -2530,7 +2649,7 @@ Status Enums:
|
|
|
2530
2649
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2531
2650
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2532
2651
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2533
|
-
|
|
2652
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2534
2653
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2535
2654
|
}
|
|
2536
2655
|
});
|
|
@@ -2600,7 +2719,7 @@ Status Enums:
|
|
|
2600
2719
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2601
2720
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2602
2721
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2603
|
-
|
|
2722
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2604
2723
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2605
2724
|
}
|
|
2606
2725
|
});
|
|
@@ -2670,7 +2789,7 @@ Status Enums:
|
|
|
2670
2789
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2671
2790
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2672
2791
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2673
|
-
|
|
2792
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2674
2793
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2675
2794
|
}
|
|
2676
2795
|
});
|
|
@@ -2745,7 +2864,7 @@ Status Enums:
|
|
|
2745
2864
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2746
2865
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2747
2866
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2748
|
-
|
|
2867
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2749
2868
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2750
2869
|
}
|
|
2751
2870
|
});
|
|
@@ -2819,7 +2938,7 @@ Status Enums:
|
|
|
2819
2938
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2820
2939
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2821
2940
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2822
|
-
|
|
2941
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2823
2942
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2824
2943
|
}
|
|
2825
2944
|
});
|
|
@@ -2894,7 +3013,7 @@ Status Enums:
|
|
|
2894
3013
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2895
3014
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2896
3015
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2897
|
-
|
|
3016
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2898
3017
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2899
3018
|
}
|
|
2900
3019
|
});
|
|
@@ -2975,7 +3094,7 @@ Status Enums:
|
|
|
2975
3094
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2976
3095
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2977
3096
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2978
|
-
|
|
3097
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2979
3098
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2980
3099
|
}
|
|
2981
3100
|
});
|
|
@@ -3061,7 +3180,7 @@ Status Enums:
|
|
|
3061
3180
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
3062
3181
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
3063
3182
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
3064
|
-
|
|
3183
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
3065
3184
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
3066
3185
|
}
|
|
3067
3186
|
});
|
|
@@ -3147,7 +3266,7 @@ Status Enums:
|
|
|
3147
3266
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
3148
3267
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
3149
3268
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
3150
|
-
|
|
3269
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
3151
3270
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
3152
3271
|
}
|
|
3153
3272
|
});
|
|
@@ -3233,7 +3352,7 @@ Status Enums:
|
|
|
3233
3352
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
3234
3353
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
3235
3354
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
3236
|
-
|
|
3355
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
3237
3356
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
3238
3357
|
}
|
|
3239
3358
|
});
|
|
@@ -3307,7 +3426,7 @@ Status Enums:
|
|
|
3307
3426
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
3308
3427
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
3309
3428
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
3310
|
-
|
|
3429
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
3311
3430
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
3312
3431
|
}
|
|
3313
3432
|
});
|
|
@@ -3433,7 +3552,7 @@ Status Enums:
|
|
|
3433
3552
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
3434
3553
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
3435
3554
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
3436
|
-
|
|
3555
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
3437
3556
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
3438
3557
|
}
|
|
3439
3558
|
});
|