@itentialopensource/adapter-salesforce 0.7.4 → 0.8.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 +169 -0
- package/CHANGELOG.md +41 -29
- package/CODE_OF_CONDUCT.md +12 -17
- package/CONTRIBUTING.md +88 -74
- package/ENHANCE.md +69 -0
- package/PROPERTIES.md +641 -0
- package/README.md +225 -502
- package/SUMMARY.md +9 -0
- package/SYSTEMINFO.md +11 -0
- package/TROUBLESHOOT.md +47 -0
- package/adapter.js +385 -94
- package/adapterBase.js +1021 -245
- package/entities/.generic/action.json +110 -5
- package/entities/.generic/schema.json +6 -1
- package/error.json +12 -0
- package/package.json +20 -13
- package/pronghorn.json +338 -67
- package/propertiesDecorators.json +14 -0
- package/propertiesSchema.json +436 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +10 -0
- package/report/updateReport1653403992147.json +120 -0
- package/sampleProperties.json +94 -2
- package/test/integration/adapterTestBasicGet.js +2 -2
- package/test/integration/adapterTestIntegration.js +29 -103
- package/test/unit/adapterBaseTestUnit.js +35 -27
- package/test/unit/adapterTestUnit.js +540 -142
- package/utils/adapterInfo.js +206 -0
- package/utils/addAuth.js +94 -0
- package/utils/basicGet.js +1 -14
- package/utils/entitiesToDB.js +179 -0
- package/utils/modify.js +1 -1
- package/utils/packModificationScript.js +1 -1
- package/utils/patches2bundledDeps.js +90 -0
- package/utils/pre-commit.sh +3 -0
- package/utils/removeHooks.js +20 -0
- package/utils/tbScript.js +43 -22
- package/utils/tbUtils.js +126 -29
- package/utils/testRunner.js +16 -16
- package/utils/troubleshootingAdapter.js +2 -26
package/adapter.js
CHANGED
|
@@ -82,10 +82,18 @@ 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
|
+
'iapHasAdapterEntity',
|
|
92
|
+
'iapVerifyAdapterCapability',
|
|
93
|
+
'iapUpdateAdapterEntityCache',
|
|
94
|
+
'hasEntities',
|
|
95
|
+
'getAuthorization'
|
|
96
|
+
];
|
|
89
97
|
if (!inIgnore && Array.isArray(inIgnore)) {
|
|
90
98
|
myIgnore = inIgnore;
|
|
91
99
|
} else if (!inIgnore && typeof inIgnore === 'string') {
|
|
@@ -96,15 +104,15 @@ class Salesforce extends AdapterBaseCl {
|
|
|
96
104
|
// you can add specific methods that you do not want to be workflow functions to ignore like below
|
|
97
105
|
// myIgnore.push('myMethodNotInWorkflow');
|
|
98
106
|
|
|
99
|
-
return super.
|
|
107
|
+
return super.iapGetAdapterWorkflowFunctions(myIgnore);
|
|
100
108
|
}
|
|
101
109
|
|
|
102
110
|
/**
|
|
103
|
-
*
|
|
111
|
+
* iapUpdateAdapterConfiguration is used to update any of the adapter configuration files. This
|
|
104
112
|
* allows customers to make changes to adapter configuration without having to be on the
|
|
105
113
|
* file system.
|
|
106
114
|
*
|
|
107
|
-
* @function
|
|
115
|
+
* @function iapUpdateAdapterConfiguration
|
|
108
116
|
* @param {string} configFile - the name of the file being updated (required)
|
|
109
117
|
* @param {Object} changes - an object containing all of the changes = formatted like the configuration file (required)
|
|
110
118
|
* @param {string} entity - the entity to be changed, if an action, schema or mock data file (optional)
|
|
@@ -112,36 +120,42 @@ class Salesforce extends AdapterBaseCl {
|
|
|
112
120
|
* @param {string} action - the action to be changed, if an action, schema or mock data file (optional)
|
|
113
121
|
* @param {Callback} callback - The results of the call
|
|
114
122
|
*/
|
|
115
|
-
|
|
116
|
-
const
|
|
123
|
+
iapUpdateAdapterConfiguration(configFile, changes, entity, type, action, callback) {
|
|
124
|
+
const meth = 'adapter-iapUpdateAdapterConfiguration';
|
|
125
|
+
const origin = `${this.id}-${meth}`;
|
|
117
126
|
log.trace(origin);
|
|
118
|
-
|
|
127
|
+
|
|
128
|
+
super.iapUpdateAdapterConfiguration(configFile, changes, entity, type, action, callback);
|
|
119
129
|
}
|
|
120
130
|
|
|
121
131
|
/**
|
|
122
132
|
* See if the API path provided is found in this adapter
|
|
123
133
|
*
|
|
124
|
-
* @function
|
|
134
|
+
* @function iapFindAdapterPath
|
|
125
135
|
* @param {string} apiPath - the api path to check on
|
|
126
136
|
* @param {Callback} callback - The results of the call
|
|
127
137
|
*/
|
|
128
|
-
|
|
129
|
-
const
|
|
138
|
+
iapFindAdapterPath(apiPath, callback) {
|
|
139
|
+
const meth = 'adapter-iapFindAdapterPath';
|
|
140
|
+
const origin = `${this.id}-${meth}`;
|
|
130
141
|
log.trace(origin);
|
|
131
|
-
|
|
142
|
+
|
|
143
|
+
super.iapFindAdapterPath(apiPath, callback);
|
|
132
144
|
}
|
|
133
145
|
|
|
134
146
|
/**
|
|
135
147
|
* @summary Suspends adapter
|
|
136
148
|
*
|
|
137
|
-
* @function
|
|
149
|
+
* @function iapSuspendAdapter
|
|
138
150
|
* @param {Callback} callback - callback function
|
|
139
151
|
*/
|
|
140
|
-
|
|
141
|
-
const
|
|
152
|
+
iapSuspendAdapter(mode, callback) {
|
|
153
|
+
const meth = 'adapter-iapSuspendAdapter';
|
|
154
|
+
const origin = `${this.id}-${meth}`;
|
|
142
155
|
log.trace(origin);
|
|
156
|
+
|
|
143
157
|
try {
|
|
144
|
-
return super.
|
|
158
|
+
return super.iapSuspendAdapter(mode, callback);
|
|
145
159
|
} catch (error) {
|
|
146
160
|
log.error(`${origin}: ${error}`);
|
|
147
161
|
return callback(null, error);
|
|
@@ -151,14 +165,16 @@ class Salesforce extends AdapterBaseCl {
|
|
|
151
165
|
/**
|
|
152
166
|
* @summary Unsuspends adapter
|
|
153
167
|
*
|
|
154
|
-
* @function
|
|
168
|
+
* @function iapUnsuspendAdapter
|
|
155
169
|
* @param {Callback} callback - callback function
|
|
156
170
|
*/
|
|
157
|
-
|
|
158
|
-
const
|
|
171
|
+
iapUnsuspendAdapter(callback) {
|
|
172
|
+
const meth = 'adapter-iapUnsuspendAdapter';
|
|
173
|
+
const origin = `${this.id}-${meth}`;
|
|
159
174
|
log.trace(origin);
|
|
175
|
+
|
|
160
176
|
try {
|
|
161
|
-
return super.
|
|
177
|
+
return super.iapUnsuspendAdapter(callback);
|
|
162
178
|
} catch (error) {
|
|
163
179
|
log.error(`${origin}: ${error}`);
|
|
164
180
|
return callback(null, error);
|
|
@@ -168,29 +184,33 @@ class Salesforce extends AdapterBaseCl {
|
|
|
168
184
|
/**
|
|
169
185
|
* @summary Get the Adaoter Queue
|
|
170
186
|
*
|
|
171
|
-
* @function
|
|
187
|
+
* @function iapGetAdapterQueue
|
|
172
188
|
* @param {Callback} callback - callback function
|
|
173
189
|
*/
|
|
174
|
-
|
|
175
|
-
const
|
|
190
|
+
iapGetAdapterQueue(callback) {
|
|
191
|
+
const meth = 'adapter-iapGetAdapterQueue';
|
|
192
|
+
const origin = `${this.id}-${meth}`;
|
|
176
193
|
log.trace(origin);
|
|
177
|
-
|
|
194
|
+
|
|
195
|
+
return super.iapGetAdapterQueue(callback);
|
|
178
196
|
}
|
|
179
197
|
|
|
180
198
|
/**
|
|
181
199
|
* @summary Runs troubleshoot scripts for adapter
|
|
182
200
|
*
|
|
183
|
-
* @function
|
|
201
|
+
* @function iapTroubleshootAdapter
|
|
184
202
|
* @param {Object} props - the connection, healthcheck and authentication properties
|
|
185
203
|
*
|
|
186
204
|
* @param {boolean} persistFlag - whether the adapter properties should be updated
|
|
187
205
|
* @param {Callback} callback - The results of the call
|
|
188
206
|
*/
|
|
189
|
-
|
|
190
|
-
const
|
|
207
|
+
iapTroubleshootAdapter(props, persistFlag, callback) {
|
|
208
|
+
const meth = 'adapter-iapTroubleshootAdapter';
|
|
209
|
+
const origin = `${this.id}-${meth}`;
|
|
191
210
|
log.trace(origin);
|
|
211
|
+
|
|
192
212
|
try {
|
|
193
|
-
return super.
|
|
213
|
+
return super.iapTroubleshootAdapter(props, persistFlag, this, callback);
|
|
194
214
|
} catch (error) {
|
|
195
215
|
log.error(`${origin}: ${error}`);
|
|
196
216
|
return callback(null, error);
|
|
@@ -200,15 +220,17 @@ class Salesforce extends AdapterBaseCl {
|
|
|
200
220
|
/**
|
|
201
221
|
* @summary runs healthcheck script for adapter
|
|
202
222
|
*
|
|
203
|
-
* @function
|
|
223
|
+
* @function iapRunAdapterHealthcheck
|
|
204
224
|
* @param {Adapter} adapter - adapter instance to troubleshoot
|
|
205
225
|
* @param {Callback} callback - callback function
|
|
206
226
|
*/
|
|
207
|
-
|
|
208
|
-
const
|
|
227
|
+
iapRunAdapterHealthcheck(callback) {
|
|
228
|
+
const meth = 'adapter-iapRunAdapterHealthcheck';
|
|
229
|
+
const origin = `${this.id}-${meth}`;
|
|
209
230
|
log.trace(origin);
|
|
231
|
+
|
|
210
232
|
try {
|
|
211
|
-
return super.
|
|
233
|
+
return super.iapRunAdapterHealthcheck(this, callback);
|
|
212
234
|
} catch (error) {
|
|
213
235
|
log.error(`${origin}: ${error}`);
|
|
214
236
|
return callback(null, error);
|
|
@@ -218,14 +240,16 @@ class Salesforce extends AdapterBaseCl {
|
|
|
218
240
|
/**
|
|
219
241
|
* @summary runs connectivity check script for adapter
|
|
220
242
|
*
|
|
221
|
-
* @function
|
|
243
|
+
* @function iapRunAdapterConnectivity
|
|
222
244
|
* @param {Callback} callback - callback function
|
|
223
245
|
*/
|
|
224
|
-
|
|
225
|
-
const
|
|
246
|
+
iapRunAdapterConnectivity(callback) {
|
|
247
|
+
const meth = 'adapter-iapRunAdapterConnectivity';
|
|
248
|
+
const origin = `${this.id}-${meth}`;
|
|
226
249
|
log.trace(origin);
|
|
250
|
+
|
|
227
251
|
try {
|
|
228
|
-
return super.
|
|
252
|
+
return super.iapRunAdapterConnectivity(callback);
|
|
229
253
|
} catch (error) {
|
|
230
254
|
log.error(`${origin}: ${error}`);
|
|
231
255
|
return callback(null, error);
|
|
@@ -235,44 +259,67 @@ class Salesforce extends AdapterBaseCl {
|
|
|
235
259
|
/**
|
|
236
260
|
* @summary runs basicGet script for adapter
|
|
237
261
|
*
|
|
238
|
-
* @function
|
|
262
|
+
* @function iapRunAdapterBasicGet
|
|
239
263
|
* @param {Callback} callback - callback function
|
|
240
264
|
*/
|
|
241
|
-
|
|
242
|
-
const
|
|
265
|
+
iapRunAdapterBasicGet(callback) {
|
|
266
|
+
const meth = 'adapter-iapRunAdapterBasicGet';
|
|
267
|
+
const origin = `${this.id}-${meth}`;
|
|
243
268
|
log.trace(origin);
|
|
269
|
+
|
|
244
270
|
try {
|
|
245
|
-
return super.
|
|
271
|
+
return super.iapRunAdapterBasicGet(callback);
|
|
246
272
|
} catch (error) {
|
|
247
273
|
log.error(`${origin}: ${error}`);
|
|
248
274
|
return callback(null, error);
|
|
249
275
|
}
|
|
250
276
|
}
|
|
251
277
|
|
|
278
|
+
/**
|
|
279
|
+
* @summary moves entites into Mongo DB
|
|
280
|
+
*
|
|
281
|
+
* @function iapMoveAdapterEntitiesToDB
|
|
282
|
+
* @param {getCallback} callback - a callback function to return the result (Generics)
|
|
283
|
+
* or the error
|
|
284
|
+
*/
|
|
285
|
+
iapMoveAdapterEntitiesToDB(callback) {
|
|
286
|
+
const meth = 'adapter-iapMoveAdapterEntitiesToDB';
|
|
287
|
+
const origin = `${this.id}-${meth}`;
|
|
288
|
+
log.trace(origin);
|
|
289
|
+
|
|
290
|
+
try {
|
|
291
|
+
return super.iapMoveAdapterEntitiesToDB(callback);
|
|
292
|
+
} catch (err) {
|
|
293
|
+
log.error(`${origin}: ${err}`);
|
|
294
|
+
return callback(null, err);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/* BROKER CALLS */
|
|
252
299
|
/**
|
|
253
300
|
* @summary Determines if this adapter supports the specific entity
|
|
254
301
|
*
|
|
255
|
-
* @function
|
|
302
|
+
* @function iapHasAdapterEntity
|
|
256
303
|
* @param {String} entityType - the entity type to check for
|
|
257
304
|
* @param {String/Array} entityId - the specific entity we are looking for
|
|
258
305
|
*
|
|
259
306
|
* @param {Callback} callback - An array of whether the adapter can has the
|
|
260
307
|
* desired capability or an error
|
|
261
308
|
*/
|
|
262
|
-
|
|
263
|
-
const origin = `${this.id}-adapter-
|
|
309
|
+
iapHasAdapterEntity(entityType, entityId, callback) {
|
|
310
|
+
const origin = `${this.id}-adapter-iapHasAdapterEntity`;
|
|
264
311
|
log.trace(origin);
|
|
265
312
|
|
|
266
313
|
// Make the call -
|
|
267
|
-
//
|
|
268
|
-
return this.
|
|
314
|
+
// iapVerifyAdapterCapability(entityType, actionType, entityId, callback)
|
|
315
|
+
return this.iapVerifyAdapterCapability(entityType, null, entityId, callback);
|
|
269
316
|
}
|
|
270
317
|
|
|
271
318
|
/**
|
|
272
319
|
* @summary Provides a way for the adapter to tell north bound integrations
|
|
273
320
|
* whether the adapter supports type, action and specific entity
|
|
274
321
|
*
|
|
275
|
-
* @function
|
|
322
|
+
* @function iapVerifyAdapterCapability
|
|
276
323
|
* @param {String} entityType - the entity type to check for
|
|
277
324
|
* @param {String} actionType - the action type to check for
|
|
278
325
|
* @param {String/Array} entityId - the specific entity we are looking for
|
|
@@ -280,15 +327,15 @@ class Salesforce extends AdapterBaseCl {
|
|
|
280
327
|
* @param {Callback} callback - An array of whether the adapter can has the
|
|
281
328
|
* desired capability or an error
|
|
282
329
|
*/
|
|
283
|
-
|
|
284
|
-
const meth = 'adapterBase-
|
|
330
|
+
iapVerifyAdapterCapability(entityType, actionType, entityId, callback) {
|
|
331
|
+
const meth = 'adapterBase-iapVerifyAdapterCapability';
|
|
285
332
|
const origin = `${this.id}-${meth}`;
|
|
286
333
|
log.trace(origin);
|
|
287
334
|
|
|
288
335
|
// if caching
|
|
289
336
|
if (this.caching) {
|
|
290
|
-
// Make the call -
|
|
291
|
-
return this.requestHandlerInst.
|
|
337
|
+
// Make the call - iapVerifyAdapterCapability(entityType, actionType, entityId, callback)
|
|
338
|
+
return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, entityId, (results, error) => {
|
|
292
339
|
if (error) {
|
|
293
340
|
return callback(null, error);
|
|
294
341
|
}
|
|
@@ -306,7 +353,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
306
353
|
}
|
|
307
354
|
|
|
308
355
|
// need to check the cache again since it has been updated
|
|
309
|
-
return this.requestHandlerInst.
|
|
356
|
+
return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, entityId, (vcapable, verror) => {
|
|
310
357
|
if (verror) {
|
|
311
358
|
return callback(null, verror);
|
|
312
359
|
}
|
|
@@ -339,7 +386,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
339
386
|
// if no entity id
|
|
340
387
|
if (!entityId) {
|
|
341
388
|
// need to check the cache again since it has been updated
|
|
342
|
-
return this.requestHandlerInst.
|
|
389
|
+
return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, null, (vcapable, verror) => {
|
|
343
390
|
if (verror) {
|
|
344
391
|
return callback(null, verror);
|
|
345
392
|
}
|
|
@@ -360,7 +407,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
360
407
|
}
|
|
361
408
|
|
|
362
409
|
// need to check the cache again since it has been updated
|
|
363
|
-
return this.requestHandlerInst.
|
|
410
|
+
return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, null, (vcapable, verror) => {
|
|
364
411
|
if (verror) {
|
|
365
412
|
return callback(null, verror);
|
|
366
413
|
}
|
|
@@ -401,11 +448,11 @@ class Salesforce extends AdapterBaseCl {
|
|
|
401
448
|
/**
|
|
402
449
|
* @summary Updates the cache for all entities by call the get All entity method
|
|
403
450
|
*
|
|
404
|
-
* @function
|
|
451
|
+
* @function iapUpdateAdapterEntityCache
|
|
405
452
|
*
|
|
406
453
|
*/
|
|
407
|
-
|
|
408
|
-
const origin = `${this.id}-adapter-
|
|
454
|
+
iapUpdateAdapterEntityCache() {
|
|
455
|
+
const origin = `${this.id}-adapter-iapUpdateAdapterEntityCache`;
|
|
409
456
|
log.trace(origin);
|
|
410
457
|
|
|
411
458
|
if (this.caching) {
|
|
@@ -418,6 +465,140 @@ class Salesforce extends AdapterBaseCl {
|
|
|
418
465
|
}
|
|
419
466
|
}
|
|
420
467
|
|
|
468
|
+
/**
|
|
469
|
+
* @summary Determines if this adapter supports any in a list of entities
|
|
470
|
+
*
|
|
471
|
+
* @function hasEntities
|
|
472
|
+
* @param {String} entityType - the entity type to check for
|
|
473
|
+
* @param {Array} entityList - the list of entities we are looking for
|
|
474
|
+
*
|
|
475
|
+
* @param {Callback} callback - A map where the entity is the key and the
|
|
476
|
+
* value is true or false
|
|
477
|
+
*/
|
|
478
|
+
hasEntities(entityType, entityList, callback) {
|
|
479
|
+
const meth = 'adapter-hasEntities';
|
|
480
|
+
const origin = `${this.id}-${meth}`;
|
|
481
|
+
log.trace(origin);
|
|
482
|
+
|
|
483
|
+
try {
|
|
484
|
+
return super.hasEntities(entityType, entityList, callback);
|
|
485
|
+
} catch (err) {
|
|
486
|
+
log.error(`${origin}: ${err}`);
|
|
487
|
+
return callback(null, err);
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* @summary Get Appliance that match the deviceName
|
|
493
|
+
*
|
|
494
|
+
* @function getDevice
|
|
495
|
+
* @param {String} deviceName - the deviceName to find (required)
|
|
496
|
+
*
|
|
497
|
+
* @param {getCallback} callback - a callback function to return the result
|
|
498
|
+
* (appliance) or the error
|
|
499
|
+
*/
|
|
500
|
+
getDevice(deviceName, callback) {
|
|
501
|
+
const meth = 'adapter-getDevice';
|
|
502
|
+
const origin = `${this.id}-${meth}`;
|
|
503
|
+
log.trace(origin);
|
|
504
|
+
|
|
505
|
+
try {
|
|
506
|
+
return super.getDevice(deviceName, callback);
|
|
507
|
+
} catch (err) {
|
|
508
|
+
log.error(`${origin}: ${err}`);
|
|
509
|
+
return callback(null, err);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* @summary Get Appliances that match the filter
|
|
515
|
+
*
|
|
516
|
+
* @function getDevicesFiltered
|
|
517
|
+
* @param {Object} options - the data to use to filter the appliances (optional)
|
|
518
|
+
*
|
|
519
|
+
* @param {getCallback} callback - a callback function to return the result
|
|
520
|
+
* (appliances) or the error
|
|
521
|
+
*/
|
|
522
|
+
getDevicesFiltered(options, callback) {
|
|
523
|
+
const meth = 'adapter-getDevicesFiltered';
|
|
524
|
+
const origin = `${this.id}-${meth}`;
|
|
525
|
+
log.trace(origin);
|
|
526
|
+
|
|
527
|
+
try {
|
|
528
|
+
return super.getDevicesFiltered(options, callback);
|
|
529
|
+
} catch (err) {
|
|
530
|
+
log.error(`${origin}: ${err}`);
|
|
531
|
+
return callback(null, err);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* @summary Gets the status for the provided appliance
|
|
537
|
+
*
|
|
538
|
+
* @function isAlive
|
|
539
|
+
* @param {String} deviceName - the deviceName of the appliance. (required)
|
|
540
|
+
*
|
|
541
|
+
* @param {configCallback} callback - callback function to return the result
|
|
542
|
+
* (appliance isAlive) or the error
|
|
543
|
+
*/
|
|
544
|
+
isAlive(deviceName, callback) {
|
|
545
|
+
const meth = 'adapter-isAlive';
|
|
546
|
+
const origin = `${this.id}-${meth}`;
|
|
547
|
+
log.trace(origin);
|
|
548
|
+
|
|
549
|
+
try {
|
|
550
|
+
return super.isAlive(deviceName, callback);
|
|
551
|
+
} catch (err) {
|
|
552
|
+
log.error(`${origin}: ${err}`);
|
|
553
|
+
return callback(null, err);
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* @summary Gets a config for the provided Appliance
|
|
559
|
+
*
|
|
560
|
+
* @function getConfig
|
|
561
|
+
* @param {String} deviceName - the deviceName of the appliance. (required)
|
|
562
|
+
* @param {String} format - the desired format of the config. (optional)
|
|
563
|
+
*
|
|
564
|
+
* @param {configCallback} callback - callback function to return the result
|
|
565
|
+
* (appliance config) or the error
|
|
566
|
+
*/
|
|
567
|
+
getConfig(deviceName, format, callback) {
|
|
568
|
+
const meth = 'adapter-getConfig';
|
|
569
|
+
const origin = `${this.id}-${meth}`;
|
|
570
|
+
log.trace(origin);
|
|
571
|
+
|
|
572
|
+
try {
|
|
573
|
+
return super.getConfig(deviceName, format, callback);
|
|
574
|
+
} catch (err) {
|
|
575
|
+
log.error(`${origin}: ${err}`);
|
|
576
|
+
return callback(null, err);
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* @summary Gets the device count from the system
|
|
582
|
+
*
|
|
583
|
+
* @function iapGetDeviceCount
|
|
584
|
+
*
|
|
585
|
+
* @param {getCallback} callback - callback function to return the result
|
|
586
|
+
* (count) or the error
|
|
587
|
+
*/
|
|
588
|
+
iapGetDeviceCount(callback) {
|
|
589
|
+
const meth = 'adapter-iapGetDeviceCount';
|
|
590
|
+
const origin = `${this.id}-${meth}`;
|
|
591
|
+
log.trace(origin);
|
|
592
|
+
|
|
593
|
+
try {
|
|
594
|
+
return super.iapGetDeviceCount(callback);
|
|
595
|
+
} catch (err) {
|
|
596
|
+
log.error(`${origin}: ${err}`);
|
|
597
|
+
return callback(null, err);
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
/* GENERIC ADAPTER REQUEST - allows extension of adapter without new calls being added */
|
|
421
602
|
/**
|
|
422
603
|
* Makes the requested generic call
|
|
423
604
|
*
|
|
@@ -470,7 +651,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
470
651
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
471
652
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
472
653
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
473
|
-
|
|
654
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
474
655
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
475
656
|
}
|
|
476
657
|
});
|
|
@@ -528,6 +709,116 @@ class Salesforce extends AdapterBaseCl {
|
|
|
528
709
|
}
|
|
529
710
|
}
|
|
530
711
|
|
|
712
|
+
/**
|
|
713
|
+
* Makes the requested generic call with no base path or version
|
|
714
|
+
*
|
|
715
|
+
* @function genericAdapterRequestNoBasePath
|
|
716
|
+
* @param {String} uriPath - the path of the api call - do not include the host, port, base path or version (required)
|
|
717
|
+
* @param {String} restMethod - the rest method (GET, POST, PUT, PATCH, DELETE) (required)
|
|
718
|
+
* @param {Object} queryData - the parameters to be put on the url (optional).
|
|
719
|
+
* Can be a stringified Object.
|
|
720
|
+
* @param {Object} requestBody - the body to add to the request (optional).
|
|
721
|
+
* Can be a stringified Object.
|
|
722
|
+
* @param {Object} addlHeaders - additional headers to be put on the call (optional).
|
|
723
|
+
* Can be a stringified Object.
|
|
724
|
+
* @param {getCallback} callback - a callback function to return the result (Generics)
|
|
725
|
+
* or the error
|
|
726
|
+
*/
|
|
727
|
+
genericAdapterRequestNoBasePath(uriPath, restMethod, queryData, requestBody, addlHeaders, callback) {
|
|
728
|
+
const meth = 'adapter-genericAdapterRequestNoBasePath';
|
|
729
|
+
const origin = `${this.id}-${meth}`;
|
|
730
|
+
log.trace(origin);
|
|
731
|
+
|
|
732
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
733
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
734
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
735
|
+
return callback(null, errorObj);
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
739
|
+
if (uriPath === undefined || uriPath === null || uriPath === '') {
|
|
740
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['uriPath'], null, null, null);
|
|
741
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
742
|
+
return callback(null, errorObj);
|
|
743
|
+
}
|
|
744
|
+
if (restMethod === undefined || restMethod === null || restMethod === '') {
|
|
745
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['restMethod'], null, null, null);
|
|
746
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
747
|
+
return callback(null, errorObj);
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
751
|
+
// remove any leading / and split the uripath into path variables
|
|
752
|
+
let myPath = uriPath;
|
|
753
|
+
while (myPath.indexOf('/') === 0) {
|
|
754
|
+
myPath = myPath.substring(1);
|
|
755
|
+
}
|
|
756
|
+
const pathVars = myPath.split('/');
|
|
757
|
+
const queryParamsAvailable = queryData;
|
|
758
|
+
const queryParams = {};
|
|
759
|
+
const bodyVars = requestBody;
|
|
760
|
+
|
|
761
|
+
// loop in template. long callback arg name to avoid identifier conflicts
|
|
762
|
+
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
763
|
+
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
764
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
765
|
+
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
766
|
+
}
|
|
767
|
+
});
|
|
768
|
+
|
|
769
|
+
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
770
|
+
const reqObj = {
|
|
771
|
+
payload: bodyVars,
|
|
772
|
+
uriPathVars: pathVars,
|
|
773
|
+
uriQuery: queryParams,
|
|
774
|
+
uriOptions: {}
|
|
775
|
+
};
|
|
776
|
+
// add headers if provided
|
|
777
|
+
if (addlHeaders) {
|
|
778
|
+
reqObj.addlHeaders = addlHeaders;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
// determine the call and return flag
|
|
782
|
+
let action = 'getGenericsNoBase';
|
|
783
|
+
let returnF = true;
|
|
784
|
+
if (restMethod.toUpperCase() === 'POST') {
|
|
785
|
+
action = 'createGenericNoBase';
|
|
786
|
+
} else if (restMethod.toUpperCase() === 'PUT') {
|
|
787
|
+
action = 'updateGenericNoBase';
|
|
788
|
+
} else if (restMethod.toUpperCase() === 'PATCH') {
|
|
789
|
+
action = 'patchGenericNoBase';
|
|
790
|
+
} else if (restMethod.toUpperCase() === 'DELETE') {
|
|
791
|
+
action = 'deleteGenericNoBase';
|
|
792
|
+
returnF = false;
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
try {
|
|
796
|
+
// Make the call -
|
|
797
|
+
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
798
|
+
return this.requestHandlerInst.identifyRequest('.generic', action, reqObj, returnF, (irReturnData, irReturnError) => {
|
|
799
|
+
// if we received an error or their is no response on the results
|
|
800
|
+
// return an error
|
|
801
|
+
if (irReturnError) {
|
|
802
|
+
/* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
|
|
803
|
+
return callback(null, irReturnError);
|
|
804
|
+
}
|
|
805
|
+
if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
|
|
806
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['genericAdapterRequestNoBasePath'], null, null, null);
|
|
807
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
808
|
+
return callback(null, errorObj);
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
/* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
|
|
812
|
+
// return the response
|
|
813
|
+
return callback(irReturnData, null);
|
|
814
|
+
});
|
|
815
|
+
} catch (ex) {
|
|
816
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
|
|
817
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
818
|
+
return callback(null, errorObj);
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
|
|
531
822
|
/**
|
|
532
823
|
* @callback healthCallback
|
|
533
824
|
* @param {Object} result - the result of the get request (contains an id and a status)
|
|
@@ -583,7 +874,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
583
874
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
584
875
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
585
876
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
586
|
-
|
|
877
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
587
878
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
588
879
|
}
|
|
589
880
|
});
|
|
@@ -659,7 +950,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
659
950
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
660
951
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
661
952
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
662
|
-
|
|
953
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
663
954
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
664
955
|
}
|
|
665
956
|
});
|
|
@@ -734,7 +1025,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
734
1025
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
735
1026
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
736
1027
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
737
|
-
|
|
1028
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
738
1029
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
739
1030
|
}
|
|
740
1031
|
});
|
|
@@ -803,7 +1094,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
803
1094
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
804
1095
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
805
1096
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
806
|
-
|
|
1097
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
807
1098
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
808
1099
|
}
|
|
809
1100
|
});
|
|
@@ -872,7 +1163,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
872
1163
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
873
1164
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
874
1165
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
875
|
-
|
|
1166
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
876
1167
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
877
1168
|
}
|
|
878
1169
|
});
|
|
@@ -941,7 +1232,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
941
1232
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
942
1233
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
943
1234
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
944
|
-
|
|
1235
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
945
1236
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
946
1237
|
}
|
|
947
1238
|
});
|
|
@@ -1018,7 +1309,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
1018
1309
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1019
1310
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1020
1311
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1021
|
-
|
|
1312
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1022
1313
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1023
1314
|
}
|
|
1024
1315
|
});
|
|
@@ -1093,7 +1384,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
1093
1384
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1094
1385
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1095
1386
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1096
|
-
|
|
1387
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1097
1388
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1098
1389
|
}
|
|
1099
1390
|
});
|
|
@@ -1162,7 +1453,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
1162
1453
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1163
1454
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1164
1455
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1165
|
-
|
|
1456
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1166
1457
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1167
1458
|
}
|
|
1168
1459
|
});
|
|
@@ -1231,7 +1522,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
1231
1522
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1232
1523
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1233
1524
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1234
|
-
|
|
1525
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1235
1526
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1236
1527
|
}
|
|
1237
1528
|
});
|
|
@@ -1301,7 +1592,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
1301
1592
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1302
1593
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1303
1594
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1304
|
-
|
|
1595
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1305
1596
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1306
1597
|
}
|
|
1307
1598
|
});
|
|
@@ -1375,7 +1666,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
1375
1666
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1376
1667
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1377
1668
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1378
|
-
|
|
1669
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1379
1670
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1380
1671
|
}
|
|
1381
1672
|
});
|
|
@@ -1447,7 +1738,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
1447
1738
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1448
1739
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1449
1740
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1450
|
-
|
|
1741
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1451
1742
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1452
1743
|
}
|
|
1453
1744
|
});
|
|
@@ -1521,7 +1812,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
1521
1812
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1522
1813
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1523
1814
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1524
|
-
|
|
1815
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1525
1816
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1526
1817
|
}
|
|
1527
1818
|
});
|
|
@@ -1590,7 +1881,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
1590
1881
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1591
1882
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1592
1883
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1593
|
-
|
|
1884
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1594
1885
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1595
1886
|
}
|
|
1596
1887
|
});
|
|
@@ -1659,7 +1950,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
1659
1950
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1660
1951
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1661
1952
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1662
|
-
|
|
1953
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1663
1954
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1664
1955
|
}
|
|
1665
1956
|
});
|
|
@@ -1733,7 +2024,7 @@ class Salesforce extends AdapterBaseCl {
|
|
|
1733
2024
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1734
2025
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1735
2026
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1736
|
-
|
|
2027
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1737
2028
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1738
2029
|
}
|
|
1739
2030
|
});
|
|
@@ -1825,7 +2116,7 @@ Return all instances and associated incidents
|
|
|
1825
2116
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1826
2117
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1827
2118
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1828
|
-
|
|
2119
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1829
2120
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1830
2121
|
}
|
|
1831
2122
|
});
|
|
@@ -1929,7 +2220,7 @@ Status Enums
|
|
|
1929
2220
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
1930
2221
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
1931
2222
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
1932
|
-
|
|
2223
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
1933
2224
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
1934
2225
|
}
|
|
1935
2226
|
});
|
|
@@ -2050,7 +2341,7 @@ Status Enums
|
|
|
2050
2341
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2051
2342
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2052
2343
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2053
|
-
|
|
2344
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2054
2345
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2055
2346
|
}
|
|
2056
2347
|
});
|
|
@@ -2171,7 +2462,7 @@ Status Enums:
|
|
|
2171
2462
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2172
2463
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2173
2464
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2174
|
-
|
|
2465
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2175
2466
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2176
2467
|
}
|
|
2177
2468
|
});
|
|
@@ -2256,7 +2547,7 @@ Status Enums:
|
|
|
2256
2547
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2257
2548
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2258
2549
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2259
|
-
|
|
2550
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2260
2551
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2261
2552
|
}
|
|
2262
2553
|
});
|
|
@@ -2330,7 +2621,7 @@ Status Enums:
|
|
|
2330
2621
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2331
2622
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2332
2623
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2333
|
-
|
|
2624
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2334
2625
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2335
2626
|
}
|
|
2336
2627
|
});
|
|
@@ -2455,7 +2746,7 @@ Status Enums:
|
|
|
2455
2746
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2456
2747
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2457
2748
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2458
|
-
|
|
2749
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2459
2750
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2460
2751
|
}
|
|
2461
2752
|
});
|
|
@@ -2530,7 +2821,7 @@ Status Enums:
|
|
|
2530
2821
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2531
2822
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2532
2823
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2533
|
-
|
|
2824
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2534
2825
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2535
2826
|
}
|
|
2536
2827
|
});
|
|
@@ -2600,7 +2891,7 @@ Status Enums:
|
|
|
2600
2891
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2601
2892
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2602
2893
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2603
|
-
|
|
2894
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2604
2895
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2605
2896
|
}
|
|
2606
2897
|
});
|
|
@@ -2670,7 +2961,7 @@ Status Enums:
|
|
|
2670
2961
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2671
2962
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2672
2963
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2673
|
-
|
|
2964
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2674
2965
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2675
2966
|
}
|
|
2676
2967
|
});
|
|
@@ -2745,7 +3036,7 @@ Status Enums:
|
|
|
2745
3036
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2746
3037
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2747
3038
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2748
|
-
|
|
3039
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2749
3040
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2750
3041
|
}
|
|
2751
3042
|
});
|
|
@@ -2819,7 +3110,7 @@ Status Enums:
|
|
|
2819
3110
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2820
3111
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2821
3112
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2822
|
-
|
|
3113
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2823
3114
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2824
3115
|
}
|
|
2825
3116
|
});
|
|
@@ -2894,7 +3185,7 @@ Status Enums:
|
|
|
2894
3185
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2895
3186
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2896
3187
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2897
|
-
|
|
3188
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2898
3189
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2899
3190
|
}
|
|
2900
3191
|
});
|
|
@@ -2975,7 +3266,7 @@ Status Enums:
|
|
|
2975
3266
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
2976
3267
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
2977
3268
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
2978
|
-
|
|
3269
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
2979
3270
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
2980
3271
|
}
|
|
2981
3272
|
});
|
|
@@ -3061,7 +3352,7 @@ Status Enums:
|
|
|
3061
3352
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
3062
3353
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
3063
3354
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
3064
|
-
|
|
3355
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
3065
3356
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
3066
3357
|
}
|
|
3067
3358
|
});
|
|
@@ -3147,7 +3438,7 @@ Status Enums:
|
|
|
3147
3438
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
3148
3439
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
3149
3440
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
3150
|
-
|
|
3441
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
3151
3442
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
3152
3443
|
}
|
|
3153
3444
|
});
|
|
@@ -3233,7 +3524,7 @@ Status Enums:
|
|
|
3233
3524
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
3234
3525
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
3235
3526
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
3236
|
-
|
|
3527
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
3237
3528
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
3238
3529
|
}
|
|
3239
3530
|
});
|
|
@@ -3307,7 +3598,7 @@ Status Enums:
|
|
|
3307
3598
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
3308
3599
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
3309
3600
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
3310
|
-
|
|
3601
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
3311
3602
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
3312
3603
|
}
|
|
3313
3604
|
});
|
|
@@ -3433,7 +3724,7 @@ Status Enums:
|
|
|
3433
3724
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
3434
3725
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
3435
3726
|
if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
|
|
3436
|
-
|
|
3727
|
+
&& queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
|
|
3437
3728
|
queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
|
|
3438
3729
|
}
|
|
3439
3730
|
});
|