@itentialopensource/adapter-thingspace 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/.eslintignore +6 -0
  2. package/.eslintrc.js +18 -0
  3. package/.gitlab/.gitkeep +0 -0
  4. package/.gitlab/issue_templates/.gitkeep +0 -0
  5. package/.gitlab/issue_templates/Default.md +17 -0
  6. package/.gitlab/issue_templates/bugReportTemplate.md +76 -0
  7. package/.gitlab/issue_templates/featureRequestTemplate.md +14 -0
  8. package/.jshintrc +0 -0
  9. package/AUTH.md +39 -0
  10. package/BROKER.md +199 -0
  11. package/CALLS.md +422 -0
  12. package/CHANGELOG.md +9 -0
  13. package/CODE_OF_CONDUCT.md +43 -0
  14. package/CONTRIBUTING.md +172 -0
  15. package/ENHANCE.md +69 -0
  16. package/LICENSE +201 -0
  17. package/PROPERTIES.md +641 -0
  18. package/README.md +337 -0
  19. package/SUMMARY.md +9 -0
  20. package/SYSTEMINFO.md +11 -0
  21. package/TROUBLESHOOT.md +47 -0
  22. package/adapter.js +5026 -0
  23. package/adapterBase.js +1787 -0
  24. package/entities/.generic/action.json +214 -0
  25. package/entities/.generic/schema.json +28 -0
  26. package/entities/.system/action.json +69 -0
  27. package/entities/.system/mockdatafiles/getToken-default.json +3 -0
  28. package/entities/.system/mockdatafiles/healthcheck-default.json +3 -0
  29. package/entities/.system/schema.json +19 -0
  30. package/entities/.system/schemaTokenReq_MFA_Step_1.json +19 -0
  31. package/entities/.system/schemaTokenReq_MFA_Step_2.json +32 -0
  32. package/entities/.system/schemaTokenResp_MFA_Step_1.json +27 -0
  33. package/entities/.system/schemaTokenResp_MFA_Step_2.json +27 -0
  34. package/entities/Accounts/action.json +67 -0
  35. package/entities/Accounts/schema.json +21 -0
  36. package/entities/Callbacks/action.json +65 -0
  37. package/entities/Callbacks/mockdatafiles/listCallbacksUsingGET-default.json +23 -0
  38. package/entities/Callbacks/schema.json +21 -0
  39. package/entities/Devices/action.json +464 -0
  40. package/entities/Devices/mockdatafiles/addUsingPOST-default.json +23 -0
  41. package/entities/Devices/mockdatafiles/connectionListHistoryUsingPOST-default.json +868 -0
  42. package/entities/Devices/mockdatafiles/deleteUsingPOST-default.json +32 -0
  43. package/entities/Devices/mockdatafiles/provisioningHistoryListUsingPOST-default.json +427 -0
  44. package/entities/Devices/mockdatafiles/usageListUsingPOST-default.json +369 -0
  45. package/entities/Devices/schema.json +41 -0
  46. package/entities/Groups/action.json +106 -0
  47. package/entities/Groups/mockdatafiles/getListUsingGET-default.json +68 -0
  48. package/entities/Groups/schema.json +23 -0
  49. package/entities/Plans/action.json +25 -0
  50. package/entities/Plans/mockdatafiles/getServicePlanListUsingGET-default.json +98 -0
  51. package/entities/Plans/schema.json +19 -0
  52. package/entities/Requests/action.json +25 -0
  53. package/entities/Requests/schema.json +19 -0
  54. package/entities/Session/action.json +64 -0
  55. package/entities/Session/schema.json +21 -0
  56. package/entities/Sms/action.json +65 -0
  57. package/entities/Sms/schema.json +21 -0
  58. package/error.json +190 -0
  59. package/package.json +85 -0
  60. package/pronghorn.json +3761 -0
  61. package/propertiesDecorators.json +14 -0
  62. package/propertiesSchema.json +1249 -0
  63. package/refs?service=git-upload-pack +0 -0
  64. package/report/adapterInfo.json +10 -0
  65. package/report/creationReport.json +485 -0
  66. package/report/m2m-all.json +4020 -0
  67. package/sampleProperties.json +195 -0
  68. package/test/integration/adapterTestBasicGet.js +83 -0
  69. package/test/integration/adapterTestConnectivity.js +93 -0
  70. package/test/integration/adapterTestIntegration.js +1957 -0
  71. package/test/unit/adapterBaseTestUnit.js +950 -0
  72. package/test/unit/adapterTestUnit.js +2631 -0
  73. package/utils/adapterInfo.js +206 -0
  74. package/utils/addAuth.js +94 -0
  75. package/utils/artifactize.js +146 -0
  76. package/utils/basicGet.js +50 -0
  77. package/utils/checkMigrate.js +63 -0
  78. package/utils/entitiesToDB.js +178 -0
  79. package/utils/findPath.js +74 -0
  80. package/utils/methodDocumentor.js +225 -0
  81. package/utils/modify.js +154 -0
  82. package/utils/packModificationScript.js +35 -0
  83. package/utils/patches2bundledDeps.js +90 -0
  84. package/utils/pre-commit.sh +32 -0
  85. package/utils/removeHooks.js +20 -0
  86. package/utils/setup.js +33 -0
  87. package/utils/tbScript.js +246 -0
  88. package/utils/tbUtils.js +490 -0
  89. package/utils/testRunner.js +298 -0
  90. package/utils/troubleshootingAdapter.js +195 -0
  91. package/workflows/README.md +3 -0
Binary file
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": "0.1.0",
3
+ "configLines": 5201,
4
+ "scriptLines": 1795,
5
+ "codeLines": 6815,
6
+ "testLines": 5719,
7
+ "testCases": 250,
8
+ "totalCodeLines": 14329,
9
+ "wfTasks": 59
10
+ }
@@ -0,0 +1,485 @@
1
+ {
2
+ "errors": [],
3
+ "statistics": [
4
+ {
5
+ "owner": "errorJson",
6
+ "description": "Standard adapter errors available for use",
7
+ "value": 31
8
+ },
9
+ {
10
+ "owner": "packageJson",
11
+ "description": "Number of production dependencies",
12
+ "value": 16
13
+ },
14
+ {
15
+ "owner": "packageJson",
16
+ "description": "Number of development dependencies",
17
+ "value": 7
18
+ },
19
+ {
20
+ "owner": "packageJson",
21
+ "description": "Number of npm scripts",
22
+ "value": 22
23
+ },
24
+ {
25
+ "owner": "packageJson",
26
+ "description": "Runtime Library dependency",
27
+ "value": "^4.48.0"
28
+ },
29
+ {
30
+ "owner": "propertiesSchemaJson",
31
+ "description": "Adapter properties defined in the propertiesSchema file",
32
+ "value": 70
33
+ },
34
+ {
35
+ "owner": "adapterJS",
36
+ "description": "Lines of code generated in adapter.js",
37
+ "value": 5027
38
+ },
39
+ {
40
+ "owner": "adapterJS",
41
+ "description": "Number of Functions added to adapter.js",
42
+ "value": 42
43
+ },
44
+ {
45
+ "owner": "pronghornJson",
46
+ "description": "Number of Methods added to pronghorn.json",
47
+ "value": 42
48
+ },
49
+ {
50
+ "owner": "markdown",
51
+ "description": "Number of lines in the README.md",
52
+ "value": 338
53
+ },
54
+ {
55
+ "owner": "markdown",
56
+ "description": "Number of lines in the SUMMARY.md",
57
+ "value": 9
58
+ },
59
+ {
60
+ "owner": "markdown",
61
+ "description": "Number of lines in the PROPERTIES.md",
62
+ "value": 642
63
+ },
64
+ {
65
+ "owner": "markdown",
66
+ "description": "Number of lines in the TROUBLESHOOT.md",
67
+ "value": 48
68
+ },
69
+ {
70
+ "owner": "markdown",
71
+ "description": "Number of lines in the ENHANCE.md",
72
+ "value": 70
73
+ },
74
+ {
75
+ "owner": "markdown",
76
+ "description": "Number of lines in the BROKER.md",
77
+ "value": 200
78
+ },
79
+ {
80
+ "owner": "markdown",
81
+ "description": "Number of lines in the CALLS.md",
82
+ "value": 171
83
+ },
84
+ {
85
+ "owner": "markdown",
86
+ "description": "Number of lines in the AUTH.md",
87
+ "value": 40
88
+ },
89
+ {
90
+ "owner": "markdown",
91
+ "description": "Number of lines in the SYSTEMINFO.md",
92
+ "value": 11
93
+ },
94
+ {
95
+ "owner": "unitTestJS",
96
+ "description": "Number of lines of code in unit tests",
97
+ "value": 2632
98
+ },
99
+ {
100
+ "owner": "unitTestJS",
101
+ "description": "Number of unit tests",
102
+ "value": 145
103
+ },
104
+ {
105
+ "owner": "integrationTestJS",
106
+ "description": "Number of lines of code in integration tests",
107
+ "value": 1958
108
+ },
109
+ {
110
+ "owner": "integrationTestJS",
111
+ "description": "Number of integration tests",
112
+ "value": 47
113
+ },
114
+ {
115
+ "owner": "actionJson",
116
+ "description": "Number of actions for Accounts entity",
117
+ "value": 3
118
+ },
119
+ {
120
+ "owner": "actionJson",
121
+ "description": "Number of actions for Requests entity",
122
+ "value": 1
123
+ },
124
+ {
125
+ "owner": "actionJson",
126
+ "description": "Number of actions for Callbacks entity",
127
+ "value": 3
128
+ },
129
+ {
130
+ "owner": "actionJson",
131
+ "description": "Number of actions for Devices entity",
132
+ "value": 23
133
+ },
134
+ {
135
+ "owner": "actionJson",
136
+ "description": "Number of actions for Groups entity",
137
+ "value": 5
138
+ },
139
+ {
140
+ "owner": "actionJson",
141
+ "description": "Number of actions for Plans entity",
142
+ "value": 1
143
+ },
144
+ {
145
+ "owner": "actionJson",
146
+ "description": "Number of actions for Session entity",
147
+ "value": 3
148
+ },
149
+ {
150
+ "owner": "actionJson",
151
+ "description": "Number of actions for Sms entity",
152
+ "value": 3
153
+ },
154
+ {
155
+ "owner": "actionJson",
156
+ "description": "Total number of actions",
157
+ "value": 42
158
+ },
159
+ {
160
+ "owner": "actionJson",
161
+ "description": "Total number of entities",
162
+ "value": 8
163
+ },
164
+ {
165
+ "owner": "schemaJson",
166
+ "description": "Number of schemas for Accounts entity",
167
+ "value": 1
168
+ },
169
+ {
170
+ "owner": "schemaJson",
171
+ "description": "Number of schemas for Requests entity",
172
+ "value": 1
173
+ },
174
+ {
175
+ "owner": "schemaJson",
176
+ "description": "Number of schemas for Callbacks entity",
177
+ "value": 1
178
+ },
179
+ {
180
+ "owner": "schemaJson",
181
+ "description": "Number of schemas for Devices entity",
182
+ "value": 1
183
+ },
184
+ {
185
+ "owner": "schemaJson",
186
+ "description": "Number of schemas for Groups entity",
187
+ "value": 1
188
+ },
189
+ {
190
+ "owner": "schemaJson",
191
+ "description": "Number of schemas for Plans entity",
192
+ "value": 1
193
+ },
194
+ {
195
+ "owner": "schemaJson",
196
+ "description": "Number of schemas for Session entity",
197
+ "value": 1
198
+ },
199
+ {
200
+ "owner": "schemaJson",
201
+ "description": "Number of schemas for Sms entity",
202
+ "value": 1
203
+ },
204
+ {
205
+ "owner": "schemaJson",
206
+ "description": "Total number of schemas",
207
+ "value": 8
208
+ },
209
+ {
210
+ "owner": "mockdata",
211
+ "description": "Number of mock data files for Accounts entity",
212
+ "value": 0
213
+ },
214
+ {
215
+ "owner": "mockdata",
216
+ "description": "Number of mock data files for Requests entity",
217
+ "value": 0
218
+ },
219
+ {
220
+ "owner": "mockdata",
221
+ "description": "Number of mock data files for Callbacks entity",
222
+ "value": 1
223
+ },
224
+ {
225
+ "owner": "mockdata",
226
+ "description": "Number of mock data files for Devices entity",
227
+ "value": 5
228
+ },
229
+ {
230
+ "owner": "mockdata",
231
+ "description": "Number of mock data files for Groups entity",
232
+ "value": 1
233
+ },
234
+ {
235
+ "owner": "mockdata",
236
+ "description": "Number of mock data files for Plans entity",
237
+ "value": 1
238
+ },
239
+ {
240
+ "owner": "mockdata",
241
+ "description": "Number of mock data files for Session entity",
242
+ "value": 0
243
+ },
244
+ {
245
+ "owner": "mockdata",
246
+ "description": "Number of mock data files for Sms entity",
247
+ "value": 0
248
+ },
249
+ {
250
+ "owner": "mockdata",
251
+ "description": "Total number of mock data files",
252
+ "value": 8
253
+ },
254
+ {
255
+ "owner": "actionJson",
256
+ "description": "Number of actions for .system entity",
257
+ "value": 2
258
+ },
259
+ {
260
+ "owner": "schemaJson",
261
+ "description": "Number of schemas for .system entity",
262
+ "value": 3
263
+ },
264
+ {
265
+ "owner": "mockdata",
266
+ "description": "Number of mock data files for .system entity",
267
+ "value": 2
268
+ },
269
+ {
270
+ "owner": "System",
271
+ "description": "System entity files",
272
+ "value": 6
273
+ },
274
+ {
275
+ "owner": "usecases",
276
+ "description": "Number of workflows",
277
+ "value": 0
278
+ },
279
+ {
280
+ "owner": "staticFile",
281
+ "description": "Number of lines of code in adapterBase.js",
282
+ "value": 1788
283
+ },
284
+ {
285
+ "owner": "staticFile",
286
+ "description": "Number of static files added",
287
+ "value": 38
288
+ },
289
+ {
290
+ "owner": "Overall",
291
+ "description": "Total lines of Code",
292
+ "value": 11405
293
+ },
294
+ {
295
+ "owner": "Overall",
296
+ "description": "Total Tests",
297
+ "value": 192
298
+ },
299
+ {
300
+ "owner": "Overall",
301
+ "description": "Total Files",
302
+ "value": 76
303
+ }
304
+ ],
305
+ "warnings": [],
306
+ "apiParsingReport": {
307
+ "no_mockdata": [
308
+ {
309
+ "fnName": "getAccountUsingGET",
310
+ "method": "get",
311
+ "path": "/accounts/{aname}"
312
+ },
313
+ {
314
+ "fnName": "getServicesAndStatesUsingGET",
315
+ "method": "get",
316
+ "path": "/accounts/{aname}/statesandservices"
317
+ },
318
+ {
319
+ "fnName": "getListUsingGET1",
320
+ "method": "get",
321
+ "path": "/leads/{aname}"
322
+ },
323
+ {
324
+ "fnName": "getRequestStatusUsingGET",
325
+ "method": "get",
326
+ "path": "/accounts/{aname}/requests/{requestId}/status"
327
+ },
328
+ {
329
+ "fnName": "registerCallbackUsingPOST",
330
+ "method": "post",
331
+ "path": "/callbacks/{aname}"
332
+ },
333
+ {
334
+ "fnName": "unregisterCallbackUsingDELETE",
335
+ "method": "delete",
336
+ "path": "/callbacks/{aname}/name/{sname}"
337
+ },
338
+ {
339
+ "fnName": "activeUsingPOST",
340
+ "method": "post",
341
+ "path": "/devices/actions/activate"
342
+ },
343
+ {
344
+ "fnName": "updateContactInfoUsingPUT",
345
+ "method": "put",
346
+ "path": "/devices/actions/contactinfo"
347
+ },
348
+ {
349
+ "fnName": "updateCustomFieldsUsingPUT",
350
+ "method": "put",
351
+ "path": "/devices/actions/customFields"
352
+ },
353
+ {
354
+ "fnName": "deactiveUsingPOST",
355
+ "method": "post",
356
+ "path": "/devices/actions/deactivate"
357
+ },
358
+ {
359
+ "fnName": "listUsingPOST",
360
+ "method": "post",
361
+ "path": "/devices/actions/list"
362
+ },
363
+ {
364
+ "fnName": "imeiIccidMismatchListUsingPOST",
365
+ "method": "post",
366
+ "path": "/devices/actions/list/imeiiccidmismatch"
367
+ },
368
+ {
369
+ "fnName": "moveUsingPut",
370
+ "method": "put",
371
+ "path": "/devices/actions/move"
372
+ },
373
+ {
374
+ "fnName": "gotostateUsingPut",
375
+ "method": "put",
376
+ "path": "/devices/actions/gotostate"
377
+ },
378
+ {
379
+ "fnName": "updateServicePlanUsingPUT",
380
+ "method": "put",
381
+ "path": "/devices/actions/plan"
382
+ },
383
+ {
384
+ "fnName": "suspendUsingPOST",
385
+ "method": "post",
386
+ "path": "/devices/actions/suspend"
387
+ },
388
+ {
389
+ "fnName": "restoreUsingPOST",
390
+ "method": "post",
391
+ "path": "/devices/actions/restore"
392
+ },
393
+ {
394
+ "fnName": "deviceAvailabilityListUsingPOST",
395
+ "method": "post",
396
+ "path": "/devices/availability/actions/list"
397
+ },
398
+ {
399
+ "fnName": "changeCostCenterUsingPUT",
400
+ "method": "put",
401
+ "path": "/devices/costCenter"
402
+ },
403
+ {
404
+ "fnName": "getExtendedDiagsUsingPOST",
405
+ "method": "post",
406
+ "path": "/devices/extendeddiagnostics/actions/list"
407
+ },
408
+ {
409
+ "fnName": "prlListUsingPOST",
410
+ "method": "post",
411
+ "path": "/devices/prl/actions/list"
412
+ },
413
+ {
414
+ "fnName": "getDeviceSuspensionStatusUsingPOST",
415
+ "method": "post",
416
+ "path": "/devices/suspension/status"
417
+ },
418
+ {
419
+ "fnName": "aggregateUsingPOST",
420
+ "method": "post",
421
+ "path": "/devices/usage/actions/list/aggregate"
422
+ },
423
+ {
424
+ "fnName": "changeDeviceIdUsingPUT",
425
+ "method": "put",
426
+ "path": "/devices/{serviceType}/actions/deviceId"
427
+ },
428
+ {
429
+ "fnName": "createDeviceGroupUsingPOST",
430
+ "method": "post",
431
+ "path": "/groups"
432
+ },
433
+ {
434
+ "fnName": "getDeviceGroupInfoUsingGET",
435
+ "method": "get",
436
+ "path": "/groups/{aname}/name/{gname}"
437
+ },
438
+ {
439
+ "fnName": "updateDeviceGroupUsingPUT",
440
+ "method": "put",
441
+ "path": "/groups/{aname}/name/{gname}"
442
+ },
443
+ {
444
+ "fnName": "deleteDeviceGroupUsingDELETE",
445
+ "method": "delete",
446
+ "path": "/groups/{aname}/name/{gname}"
447
+ },
448
+ {
449
+ "fnName": "loginUsingPOST",
450
+ "method": "post",
451
+ "path": "/session/login"
452
+ },
453
+ {
454
+ "fnName": "logoutUsingPOST",
455
+ "method": "post",
456
+ "path": "/session/logout"
457
+ },
458
+ {
459
+ "fnName": "resetUsingPUT",
460
+ "method": "put",
461
+ "path": "/session/password/actions/reset"
462
+ },
463
+ {
464
+ "fnName": "sendSmsMessageUsingPOST",
465
+ "method": "post",
466
+ "path": "/sms"
467
+ },
468
+ {
469
+ "fnName": "getSmsMessagesUsingGET",
470
+ "method": "get",
471
+ "path": "/sms/{aname}/history"
472
+ },
473
+ {
474
+ "fnName": "startSmsCallbackUsingPUT",
475
+ "method": "put",
476
+ "path": "/sms/{aname}/startCallbacks"
477
+ }
478
+ ],
479
+ "errors": [],
480
+ "warnings": [],
481
+ "callsTotal": 42,
482
+ "callsConverted": 42,
483
+ "no_mockdata_num": 34
484
+ }
485
+ }