@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
@@ -0,0 +1,369 @@
1
+ [
2
+ {
3
+ "hasMoreData": false,
4
+ "usageHistory": [
5
+ {
6
+ "bytesUsed": 5,
7
+ "extendedAttributes": [
8
+ {
9
+ "key": "string",
10
+ "value": "string"
11
+ },
12
+ {
13
+ "key": "string",
14
+ "value": "string"
15
+ },
16
+ {
17
+ "key": "string",
18
+ "value": "string"
19
+ },
20
+ {
21
+ "key": "string",
22
+ "value": "string"
23
+ },
24
+ {
25
+ "key": "string",
26
+ "value": "string"
27
+ },
28
+ {
29
+ "key": "string",
30
+ "value": "string"
31
+ },
32
+ {
33
+ "key": "string",
34
+ "value": "string"
35
+ }
36
+ ],
37
+ "servicePlan": "string",
38
+ "smsUsed": 1,
39
+ "source": "string",
40
+ "timestamp": "string"
41
+ },
42
+ {
43
+ "bytesUsed": 10,
44
+ "extendedAttributes": [
45
+ {
46
+ "key": "string",
47
+ "value": "string"
48
+ },
49
+ {
50
+ "key": "string",
51
+ "value": "string"
52
+ },
53
+ {
54
+ "key": "string",
55
+ "value": "string"
56
+ },
57
+ {
58
+ "key": "string",
59
+ "value": "string"
60
+ },
61
+ {
62
+ "key": "string",
63
+ "value": "string"
64
+ }
65
+ ],
66
+ "servicePlan": "string",
67
+ "smsUsed": 6,
68
+ "source": "string",
69
+ "timestamp": "string"
70
+ },
71
+ {
72
+ "bytesUsed": 7,
73
+ "extendedAttributes": [
74
+ {
75
+ "key": "string",
76
+ "value": "string"
77
+ },
78
+ {
79
+ "key": "string",
80
+ "value": "string"
81
+ },
82
+ {
83
+ "key": "string",
84
+ "value": "string"
85
+ },
86
+ {
87
+ "key": "string",
88
+ "value": "string"
89
+ }
90
+ ],
91
+ "servicePlan": "string",
92
+ "smsUsed": 7,
93
+ "source": "string",
94
+ "timestamp": "string"
95
+ },
96
+ {
97
+ "bytesUsed": 4,
98
+ "extendedAttributes": [
99
+ {
100
+ "key": "string",
101
+ "value": "string"
102
+ },
103
+ {
104
+ "key": "string",
105
+ "value": "string"
106
+ },
107
+ {
108
+ "key": "string",
109
+ "value": "string"
110
+ },
111
+ {
112
+ "key": "string",
113
+ "value": "string"
114
+ },
115
+ {
116
+ "key": "string",
117
+ "value": "string"
118
+ },
119
+ {
120
+ "key": "string",
121
+ "value": "string"
122
+ },
123
+ {
124
+ "key": "string",
125
+ "value": "string"
126
+ }
127
+ ],
128
+ "servicePlan": "string",
129
+ "smsUsed": 8,
130
+ "source": "string",
131
+ "timestamp": "string"
132
+ },
133
+ {
134
+ "bytesUsed": 3,
135
+ "extendedAttributes": [
136
+ {
137
+ "key": "string",
138
+ "value": "string"
139
+ },
140
+ {
141
+ "key": "string",
142
+ "value": "string"
143
+ },
144
+ {
145
+ "key": "string",
146
+ "value": "string"
147
+ },
148
+ {
149
+ "key": "string",
150
+ "value": "string"
151
+ },
152
+ {
153
+ "key": "string",
154
+ "value": "string"
155
+ },
156
+ {
157
+ "key": "string",
158
+ "value": "string"
159
+ },
160
+ {
161
+ "key": "string",
162
+ "value": "string"
163
+ },
164
+ {
165
+ "key": "string",
166
+ "value": "string"
167
+ },
168
+ {
169
+ "key": "string",
170
+ "value": "string"
171
+ },
172
+ {
173
+ "key": "string",
174
+ "value": "string"
175
+ }
176
+ ],
177
+ "servicePlan": "string",
178
+ "smsUsed": 5,
179
+ "source": "string",
180
+ "timestamp": "string"
181
+ },
182
+ {
183
+ "bytesUsed": 2,
184
+ "extendedAttributes": [
185
+ {
186
+ "key": "string",
187
+ "value": "string"
188
+ },
189
+ {
190
+ "key": "string",
191
+ "value": "string"
192
+ },
193
+ {
194
+ "key": "string",
195
+ "value": "string"
196
+ },
197
+ {
198
+ "key": "string",
199
+ "value": "string"
200
+ },
201
+ {
202
+ "key": "string",
203
+ "value": "string"
204
+ },
205
+ {
206
+ "key": "string",
207
+ "value": "string"
208
+ },
209
+ {
210
+ "key": "string",
211
+ "value": "string"
212
+ },
213
+ {
214
+ "key": "string",
215
+ "value": "string"
216
+ }
217
+ ],
218
+ "servicePlan": "string",
219
+ "smsUsed": 4,
220
+ "source": "string",
221
+ "timestamp": "string"
222
+ },
223
+ {
224
+ "bytesUsed": 9,
225
+ "extendedAttributes": [
226
+ {
227
+ "key": "string",
228
+ "value": "string"
229
+ },
230
+ {
231
+ "key": "string",
232
+ "value": "string"
233
+ },
234
+ {
235
+ "key": "string",
236
+ "value": "string"
237
+ },
238
+ {
239
+ "key": "string",
240
+ "value": "string"
241
+ },
242
+ {
243
+ "key": "string",
244
+ "value": "string"
245
+ },
246
+ {
247
+ "key": "string",
248
+ "value": "string"
249
+ }
250
+ ],
251
+ "servicePlan": "string",
252
+ "smsUsed": 7,
253
+ "source": "string",
254
+ "timestamp": "string"
255
+ },
256
+ {
257
+ "bytesUsed": 3,
258
+ "extendedAttributes": [
259
+ {
260
+ "key": "string",
261
+ "value": "string"
262
+ },
263
+ {
264
+ "key": "string",
265
+ "value": "string"
266
+ },
267
+ {
268
+ "key": "string",
269
+ "value": "string"
270
+ },
271
+ {
272
+ "key": "string",
273
+ "value": "string"
274
+ },
275
+ {
276
+ "key": "string",
277
+ "value": "string"
278
+ },
279
+ {
280
+ "key": "string",
281
+ "value": "string"
282
+ },
283
+ {
284
+ "key": "string",
285
+ "value": "string"
286
+ }
287
+ ],
288
+ "servicePlan": "string",
289
+ "smsUsed": 8,
290
+ "source": "string",
291
+ "timestamp": "string"
292
+ },
293
+ {
294
+ "bytesUsed": 6,
295
+ "extendedAttributes": [
296
+ {
297
+ "key": "string",
298
+ "value": "string"
299
+ },
300
+ {
301
+ "key": "string",
302
+ "value": "string"
303
+ },
304
+ {
305
+ "key": "string",
306
+ "value": "string"
307
+ },
308
+ {
309
+ "key": "string",
310
+ "value": "string"
311
+ },
312
+ {
313
+ "key": "string",
314
+ "value": "string"
315
+ }
316
+ ],
317
+ "servicePlan": "string",
318
+ "smsUsed": 9,
319
+ "source": "string",
320
+ "timestamp": "string"
321
+ },
322
+ {
323
+ "bytesUsed": 4,
324
+ "extendedAttributes": [
325
+ {
326
+ "key": "string",
327
+ "value": "string"
328
+ },
329
+ {
330
+ "key": "string",
331
+ "value": "string"
332
+ },
333
+ {
334
+ "key": "string",
335
+ "value": "string"
336
+ },
337
+ {
338
+ "key": "string",
339
+ "value": "string"
340
+ },
341
+ {
342
+ "key": "string",
343
+ "value": "string"
344
+ },
345
+ {
346
+ "key": "string",
347
+ "value": "string"
348
+ },
349
+ {
350
+ "key": "string",
351
+ "value": "string"
352
+ },
353
+ {
354
+ "key": "string",
355
+ "value": "string"
356
+ },
357
+ {
358
+ "key": "string",
359
+ "value": "string"
360
+ }
361
+ ],
362
+ "servicePlan": "string",
363
+ "smsUsed": 8,
364
+ "source": "string",
365
+ "timestamp": "string"
366
+ }
367
+ ]
368
+ }
369
+ ]
@@ -0,0 +1,41 @@
1
+ {
2
+ "$id": "schema.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": false,
6
+ "dynamicfields": true,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "activeUsingPOST",
12
+ "enum": [
13
+ "activeUsingPOST",
14
+ "addUsingPOST",
15
+ "updateContactInfoUsingPUT",
16
+ "updateCustomFieldsUsingPUT",
17
+ "deactiveUsingPOST",
18
+ "deleteUsingPOST",
19
+ "listUsingPOST",
20
+ "imeiIccidMismatchListUsingPOST",
21
+ "moveUsingPut",
22
+ "gotostateUsingPut",
23
+ "updateServicePlanUsingPUT",
24
+ "suspendUsingPOST",
25
+ "restoreUsingPOST",
26
+ "deviceAvailabilityListUsingPOST",
27
+ "connectionListHistoryUsingPOST",
28
+ "changeCostCenterUsingPUT",
29
+ "getExtendedDiagsUsingPOST",
30
+ "provisioningHistoryListUsingPOST",
31
+ "prlListUsingPOST",
32
+ "getDeviceSuspensionStatusUsingPOST",
33
+ "usageListUsingPOST",
34
+ "aggregateUsingPOST",
35
+ "changeDeviceIdUsingPUT"
36
+ ],
37
+ "external_name": "ph_request_type"
38
+ }
39
+ },
40
+ "definitions": {}
41
+ }
@@ -0,0 +1,106 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "createDeviceGroupUsingPOST",
5
+ "protocol": "REST",
6
+ "method": "POST",
7
+ "entitypath": "{base_path}/{version}/groups?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "requestDatatype": "JSON",
13
+ "responseDatatype": "JSON",
14
+ "headers": {},
15
+ "responseObjects": [
16
+ {
17
+ "type": "default",
18
+ "key": "",
19
+ "mockFile": ""
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ "name": "getListUsingGET",
25
+ "protocol": "REST",
26
+ "method": "GET",
27
+ "entitypath": "{base_path}/{version}/groups/{pathv1}?{query}",
28
+ "requestSchema": "schema.json",
29
+ "responseSchema": "schema.json",
30
+ "timeout": 0,
31
+ "sendEmpty": false,
32
+ "sendGetBody": false,
33
+ "requestDatatype": "JSON",
34
+ "responseDatatype": "JSON",
35
+ "headers": {},
36
+ "responseObjects": [
37
+ {
38
+ "type": "default",
39
+ "key": "",
40
+ "mockFile": "mockdatafiles/getListUsingGET-default.json"
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "name": "getDeviceGroupInfoUsingGET",
46
+ "protocol": "REST",
47
+ "method": "GET",
48
+ "entitypath": "{base_path}/{version}/groups/{pathv1}/name/{pathv2}?{query}",
49
+ "requestSchema": "schema.json",
50
+ "responseSchema": "schema.json",
51
+ "timeout": 0,
52
+ "sendEmpty": false,
53
+ "sendGetBody": false,
54
+ "requestDatatype": "JSON",
55
+ "responseDatatype": "JSON",
56
+ "headers": {},
57
+ "responseObjects": [
58
+ {
59
+ "type": "default",
60
+ "key": "",
61
+ "mockFile": ""
62
+ }
63
+ ]
64
+ },
65
+ {
66
+ "name": "updateDeviceGroupUsingPUT",
67
+ "protocol": "REST",
68
+ "method": "PUT",
69
+ "entitypath": "{base_path}/{version}/groups/{pathv1}/name/{pathv2}?{query}",
70
+ "requestSchema": "schema.json",
71
+ "responseSchema": "schema.json",
72
+ "timeout": 0,
73
+ "sendEmpty": false,
74
+ "requestDatatype": "JSON",
75
+ "responseDatatype": "JSON",
76
+ "headers": {},
77
+ "responseObjects": [
78
+ {
79
+ "type": "default",
80
+ "key": "",
81
+ "mockFile": ""
82
+ }
83
+ ]
84
+ },
85
+ {
86
+ "name": "deleteDeviceGroupUsingDELETE",
87
+ "protocol": "REST",
88
+ "method": "DELETE",
89
+ "entitypath": "{base_path}/{version}/groups/{pathv1}/name/{pathv2}?{query}",
90
+ "requestSchema": "schema.json",
91
+ "responseSchema": "schema.json",
92
+ "timeout": 0,
93
+ "sendEmpty": false,
94
+ "requestDatatype": "JSON",
95
+ "responseDatatype": "JSON",
96
+ "headers": {},
97
+ "responseObjects": [
98
+ {
99
+ "type": "default",
100
+ "key": "",
101
+ "mockFile": ""
102
+ }
103
+ ]
104
+ }
105
+ ]
106
+ }
@@ -0,0 +1,68 @@
1
+ [
2
+ {
3
+ "description": "string",
4
+ "extendedAttributes": [
5
+ {
6
+ "key": "string",
7
+ "value": "string"
8
+ },
9
+ {
10
+ "key": "string",
11
+ "value": "string"
12
+ },
13
+ {
14
+ "key": "string",
15
+ "value": "string"
16
+ },
17
+ {
18
+ "key": "string",
19
+ "value": "string"
20
+ }
21
+ ],
22
+ "isDefaultGroup": false,
23
+ "name": "string"
24
+ },
25
+ {
26
+ "description": "string",
27
+ "extendedAttributes": [
28
+ {
29
+ "key": "string",
30
+ "value": "string"
31
+ },
32
+ {
33
+ "key": "string",
34
+ "value": "string"
35
+ },
36
+ {
37
+ "key": "string",
38
+ "value": "string"
39
+ },
40
+ {
41
+ "key": "string",
42
+ "value": "string"
43
+ },
44
+ {
45
+ "key": "string",
46
+ "value": "string"
47
+ },
48
+ {
49
+ "key": "string",
50
+ "value": "string"
51
+ },
52
+ {
53
+ "key": "string",
54
+ "value": "string"
55
+ },
56
+ {
57
+ "key": "string",
58
+ "value": "string"
59
+ },
60
+ {
61
+ "key": "string",
62
+ "value": "string"
63
+ }
64
+ ],
65
+ "isDefaultGroup": false,
66
+ "name": "string"
67
+ }
68
+ ]
@@ -0,0 +1,23 @@
1
+ {
2
+ "$id": "schema.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": false,
6
+ "dynamicfields": true,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "createDeviceGroupUsingPOST",
12
+ "enum": [
13
+ "createDeviceGroupUsingPOST",
14
+ "getListUsingGET",
15
+ "getDeviceGroupInfoUsingGET",
16
+ "updateDeviceGroupUsingPUT",
17
+ "deleteDeviceGroupUsingDELETE"
18
+ ],
19
+ "external_name": "ph_request_type"
20
+ }
21
+ },
22
+ "definitions": {}
23
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "getServicePlanListUsingGET",
5
+ "protocol": "REST",
6
+ "method": "GET",
7
+ "entitypath": "{base_path}/{version}/plans/{pathv1}?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "sendGetBody": false,
13
+ "requestDatatype": "JSON",
14
+ "responseDatatype": "JSON",
15
+ "headers": {},
16
+ "responseObjects": [
17
+ {
18
+ "type": "default",
19
+ "key": "",
20
+ "mockFile": "mockdatafiles/getServicePlanListUsingGET-default.json"
21
+ }
22
+ ]
23
+ }
24
+ ]
25
+ }