losant_rest 1.9.3 → 1.10.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/docs/_schemas.md +17405 -2766
  3. data/docs/application.md +85 -0
  4. data/docs/applicationApiTokens.md +1 -1
  5. data/docs/applicationTemplate.md +46 -0
  6. data/docs/applicationTemplates.md +76 -1
  7. data/docs/device.md +7 -3
  8. data/docs/devices.md +92 -4
  9. data/docs/experienceEndpoints.md +1 -0
  10. data/docs/file.md +4 -4
  11. data/docs/flow.md +94 -1
  12. data/docs/flowVersion.md +96 -1
  13. data/docs/me.md +0 -36
  14. data/lib/losant_rest.rb +1 -0
  15. data/lib/losant_rest/application.rb +48 -0
  16. data/lib/losant_rest/application_api_tokens.rb +1 -1
  17. data/lib/losant_rest/application_template.rb +79 -0
  18. data/lib/losant_rest/application_templates.rb +89 -1
  19. data/lib/losant_rest/client.rb +6 -2
  20. data/lib/losant_rest/device.rb +11 -3
  21. data/lib/losant_rest/devices.rb +103 -3
  22. data/lib/losant_rest/experience_endpoints.rb +2 -0
  23. data/lib/losant_rest/file.rb +3 -3
  24. data/lib/losant_rest/flow.rb +115 -1
  25. data/lib/losant_rest/flow_version.rb +115 -1
  26. data/lib/losant_rest/me.rb +0 -41
  27. data/lib/losant_rest/version.rb +1 -1
  28. data/schemas/advancedDeviceQuery.json +117 -0
  29. data/schemas/advancedEventQuery.json +205 -0
  30. data/schemas/advancedQuery.json +34 -3
  31. data/schemas/application.json +13 -0
  32. data/schemas/applicationApiTokenPost.json +9 -1
  33. data/schemas/applicationApplyTemplatePatch.json +19 -0
  34. data/schemas/applicationCreationByTemplateResult.json +13 -0
  35. data/schemas/applicationPatch.json +5 -0
  36. data/schemas/applicationPost.json +13 -0
  37. data/schemas/applicationTemplate.json +32 -0
  38. data/schemas/applicationTemplateCategories.json +43 -0
  39. data/schemas/applicationTemplateCategory.json +23 -0
  40. data/schemas/applicationTemplates.json +44 -0
  41. data/schemas/applications.json +13 -0
  42. data/schemas/changePassword.json +2 -2
  43. data/schemas/dashboard.json +1285 -145
  44. data/schemas/dashboardPatch.json +1285 -145
  45. data/schemas/dashboardPost.json +1285 -145
  46. data/schemas/dashboards.json +1285 -145
  47. data/schemas/dataExport.json +142 -0
  48. data/schemas/dataTableRowsExport.json +34 -3
  49. data/schemas/device.json +16 -3
  50. data/schemas/devicePatch.json +16 -3
  51. data/schemas/devicePost.json +16 -3
  52. data/schemas/deviceRecipe.json +16 -3
  53. data/schemas/deviceRecipePatch.json +16 -3
  54. data/schemas/deviceRecipePost.json +16 -3
  55. data/schemas/deviceRecipes.json +16 -3
  56. data/schemas/devices.json +16 -3
  57. data/schemas/devicesDataRemoved.json +12 -0
  58. data/schemas/devicesDeletePost.json +1034 -0
  59. data/schemas/devicesDeleted.json +12 -0
  60. data/schemas/devicesExportPost.json +1035 -0
  61. data/schemas/devicesPatch.json +1773 -7
  62. data/schemas/devicesRemoveDataPost.json +1056 -0
  63. data/schemas/devicesUpdated.json +18 -0
  64. data/schemas/eventPost.json +22 -0
  65. data/schemas/eventsExport.json +205 -0
  66. data/schemas/experienceDomain.json +1 -1
  67. data/schemas/experienceDomainPatch.json +1 -1
  68. data/schemas/experienceDomainPost.json +1 -1
  69. data/schemas/experienceDomains.json +1 -1
  70. data/schemas/experienceGroup.json +7 -0
  71. data/schemas/experienceGroupPatch.json +7 -0
  72. data/schemas/experienceGroupPost.json +7 -0
  73. data/schemas/experienceGroups.json +7 -0
  74. data/schemas/experienceLinkedResources.json +348 -3
  75. data/schemas/experienceVersion.json +1 -1
  76. data/schemas/experienceVersions.json +1 -1
  77. data/schemas/flow.json +116 -1
  78. data/schemas/flowErrors.json +87 -0
  79. data/schemas/flowPatch.json +116 -1
  80. data/schemas/flowPost.json +116 -1
  81. data/schemas/flowStats.json +54 -0
  82. data/schemas/flowVersion.json +232 -2
  83. data/schemas/flowVersionPost.json +116 -1
  84. data/schemas/flowVersions.json +232 -2
  85. data/schemas/flows.json +116 -1
  86. data/schemas/flowsImportPost.json +232 -2
  87. data/schemas/flowsImportResult.json +348 -3
  88. data/schemas/githubLogin.json +15 -4
  89. data/schemas/me.json +0 -3
  90. data/schemas/mePatch.json +2 -2
  91. data/schemas/multiDeviceCommand.json +1019 -0
  92. data/schemas/notebook.json +99 -2
  93. data/schemas/notebookPatch.json +99 -2
  94. data/schemas/notebookPost.json +99 -2
  95. data/schemas/notebooks.json +99 -2
  96. data/schemas/org.json +1 -1
  97. data/schemas/orgInviteInfo.json +3 -0
  98. data/schemas/orgInvitePost.json +3 -0
  99. data/schemas/orgInvites.json +3 -0
  100. data/schemas/orgPatch.json +1 -1
  101. data/schemas/orgPost.json +0 -9
  102. data/schemas/orgs.json +1 -1
  103. data/schemas/passwordResetFinish.json +2 -2
  104. data/schemas/samlResponse.json +1 -1
  105. data/schemas/templateKeywords.json +14 -0
  106. data/schemas/timeSeriesData.json +101 -12
  107. data/schemas/timeSeriesQuery.json +101 -12
  108. data/schemas/userCredentials.json +13 -3
  109. data/schemas/userPost.json +21 -7
  110. metadata +19 -5
@@ -422,7 +422,7 @@
422
422
  "type": "array",
423
423
  "items": {
424
424
  "type": "string",
425
- "maxLength": 1024,
425
+ "maxLength": 45,
426
426
  "minLength": 3
427
427
  }
428
428
  }
@@ -28,6 +28,9 @@
28
28
  },
29
29
  "ttl": {
30
30
  "type": "number"
31
+ },
32
+ "disallowTransfer": {
33
+ "type": "boolean"
31
34
  }
32
35
  }
33
36
  }
@@ -68,6 +68,9 @@
68
68
  "additionalProperties": false
69
69
  },
70
70
  "maxItems": 1000
71
+ },
72
+ "disallowTransfer": {
73
+ "type": "boolean"
71
74
  }
72
75
  },
73
76
  "additionalProperties": false,
@@ -84,6 +84,9 @@
84
84
  },
85
85
  "hasExpired": {
86
86
  "type": "boolean"
87
+ },
88
+ "disallowTransfer": {
89
+ "type": "boolean"
87
90
  }
88
91
  }
89
92
  }
@@ -33,7 +33,7 @@
33
33
  "maxItems": 25,
34
34
  "items": {
35
35
  "type": "string",
36
- "maxLength": 1024,
36
+ "maxLength": 45,
37
37
  "minLength": 3
38
38
  }
39
39
  }
@@ -27,15 +27,6 @@
27
27
  "iconColor": {
28
28
  "type": "string",
29
29
  "maxLength": 64
30
- },
31
- "whitelistedEmailDomains": {
32
- "type": "array",
33
- "maxItems": 25,
34
- "items": {
35
- "type": "string",
36
- "maxLength": 1024,
37
- "minLength": 3
38
- }
39
30
  }
40
31
  },
41
32
  "additionalProperties": false,
@@ -429,7 +429,7 @@
429
429
  "type": "array",
430
430
  "items": {
431
431
  "type": "string",
432
- "maxLength": 1024,
432
+ "maxLength": 45,
433
433
  "minLength": 3
434
434
  }
435
435
  }
@@ -13,9 +13,9 @@
13
13
  },
14
14
  "password": {
15
15
  "type": "string",
16
- "minLength": 8,
16
+ "minLength": 12,
17
17
  "maxLength": 2048,
18
- "pattern": "^(?=.*[A-Z])(?=.*[^A-z0-9])(?=.*[0-9])(?=.*[a-z]).{8,}$"
18
+ "pattern": "^(?=.*[A-Z])(?=.*[^A-z0-9])(?=.*[0-9])(?=.*[a-z]).{12,}$"
19
19
  }
20
20
  },
21
21
  "required": [
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "SAMLDomain": {
11
11
  "type": "string",
12
- "maxLength": 1024,
12
+ "maxLength": 45,
13
13
  "minLength": 3
14
14
  }
15
15
  },
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "properties": {
4
+ "keywords": {
5
+ "type": "array",
6
+ "items": {
7
+ "type": "string",
8
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
9
+ },
10
+ "maxItems": 100
11
+ }
12
+ },
13
+ "additionalProperties": false
14
+ }
@@ -14,18 +14,107 @@
14
14
  "type": "number"
15
15
  },
16
16
  "aggregation": {
17
- "type": "string",
18
- "enum": [
19
- "FIRST",
20
- "LAST",
21
- "COUNT",
22
- "MAX",
23
- "MIN",
24
- "MEDIAN",
25
- "MEAN",
26
- "SUM",
27
- "STD_DEV",
28
- "NONE"
17
+ "oneOf": [
18
+ {
19
+ "oneOf": [
20
+ {
21
+ "type": "string",
22
+ "enum": [
23
+ "FIRST",
24
+ "LAST",
25
+ "COUNT",
26
+ "MAX",
27
+ "MIN",
28
+ "MEDIAN",
29
+ "MEAN",
30
+ "SUM",
31
+ "STD_DEV"
32
+ ]
33
+ },
34
+ {
35
+ "type": "string",
36
+ "enum": [
37
+ "NONE"
38
+ ]
39
+ }
40
+ ]
41
+ },
42
+ {
43
+ "type": "object",
44
+ "properties": {
45
+ "type": {
46
+ "oneOf": [
47
+ {
48
+ "type": "string",
49
+ "enum": [
50
+ "FIRST",
51
+ "LAST",
52
+ "COUNT",
53
+ "MAX",
54
+ "MIN",
55
+ "MEDIAN",
56
+ "MEAN",
57
+ "SUM",
58
+ "STD_DEV"
59
+ ]
60
+ },
61
+ {
62
+ "type": "string",
63
+ "enum": [
64
+ "NONE"
65
+ ]
66
+ }
67
+ ]
68
+ },
69
+ "options": {
70
+ "type": "object",
71
+ "additionalProperties": false
72
+ }
73
+ },
74
+ "additionalProperties": false,
75
+ "required": [
76
+ "type"
77
+ ]
78
+ },
79
+ {
80
+ "type": "object",
81
+ "properties": {
82
+ "type": {
83
+ "type": "string",
84
+ "enum": [
85
+ "TIMEATVALUE"
86
+ ]
87
+ },
88
+ "options": {
89
+ "type": "object",
90
+ "properties": {
91
+ "value": {
92
+ "oneOf": [
93
+ {
94
+ "type": "string",
95
+ "maxLength": 255
96
+ },
97
+ {
98
+ "type": "number"
99
+ },
100
+ {
101
+ "type": "boolean"
102
+ }
103
+ ]
104
+ }
105
+ },
106
+ "additionalProperties": false,
107
+ "required": [
108
+ "value"
109
+ ]
110
+ }
111
+ },
112
+ "additionalProperties": false,
113
+ "required": [
114
+ "type",
115
+ "options"
116
+ ]
117
+ }
29
118
  ]
30
119
  },
31
120
  "devices": {
@@ -15,18 +15,107 @@
15
15
  "type": "number"
16
16
  },
17
17
  "aggregation": {
18
- "type": "string",
19
- "enum": [
20
- "FIRST",
21
- "LAST",
22
- "COUNT",
23
- "MAX",
24
- "MIN",
25
- "MEDIAN",
26
- "MEAN",
27
- "SUM",
28
- "STD_DEV",
29
- "NONE"
18
+ "oneOf": [
19
+ {
20
+ "oneOf": [
21
+ {
22
+ "type": "string",
23
+ "enum": [
24
+ "FIRST",
25
+ "LAST",
26
+ "COUNT",
27
+ "MAX",
28
+ "MIN",
29
+ "MEDIAN",
30
+ "MEAN",
31
+ "SUM",
32
+ "STD_DEV"
33
+ ]
34
+ },
35
+ {
36
+ "type": "string",
37
+ "enum": [
38
+ "NONE"
39
+ ]
40
+ }
41
+ ]
42
+ },
43
+ {
44
+ "type": "object",
45
+ "properties": {
46
+ "type": {
47
+ "oneOf": [
48
+ {
49
+ "type": "string",
50
+ "enum": [
51
+ "FIRST",
52
+ "LAST",
53
+ "COUNT",
54
+ "MAX",
55
+ "MIN",
56
+ "MEDIAN",
57
+ "MEAN",
58
+ "SUM",
59
+ "STD_DEV"
60
+ ]
61
+ },
62
+ {
63
+ "type": "string",
64
+ "enum": [
65
+ "NONE"
66
+ ]
67
+ }
68
+ ]
69
+ },
70
+ "options": {
71
+ "type": "object",
72
+ "additionalProperties": false
73
+ }
74
+ },
75
+ "additionalProperties": false,
76
+ "required": [
77
+ "type"
78
+ ]
79
+ },
80
+ {
81
+ "type": "object",
82
+ "properties": {
83
+ "type": {
84
+ "type": "string",
85
+ "enum": [
86
+ "TIMEATVALUE"
87
+ ]
88
+ },
89
+ "options": {
90
+ "type": "object",
91
+ "properties": {
92
+ "value": {
93
+ "oneOf": [
94
+ {
95
+ "type": "string",
96
+ "maxLength": 255
97
+ },
98
+ {
99
+ "type": "number"
100
+ },
101
+ {
102
+ "type": "boolean"
103
+ }
104
+ ]
105
+ }
106
+ },
107
+ "additionalProperties": false,
108
+ "required": [
109
+ "value"
110
+ ]
111
+ }
112
+ },
113
+ "additionalProperties": false,
114
+ "required": [
115
+ "type",
116
+ "options"
117
+ ]
118
+ }
30
119
  ]
31
120
  },
32
121
  "attributes": {
@@ -78,10 +78,12 @@
78
78
  "notebooks.*",
79
79
  "webhook.*",
80
80
  "webhooks.*",
81
+ "application.applyTemplate",
81
82
  "application.archiveData",
82
83
  "application.backfillArchiveData",
83
84
  "application.clone",
84
85
  "application.export",
86
+ "application.import",
85
87
  "application.fullEventsArchive",
86
88
  "application.fullDataTablesArchive",
87
89
  "application.debug",
@@ -153,6 +155,8 @@
153
155
  "deviceRecipes.get",
154
156
  "deviceRecipes.post",
155
157
  "devices.patch",
158
+ "devices.delete",
159
+ "devices.removeData",
156
160
  "devices.detailedSummary",
157
161
  "devices.export",
158
162
  "devices.get",
@@ -223,23 +227,27 @@
223
227
  "file.upload",
224
228
  "files.get",
225
229
  "files.post",
230
+ "flow.clearStorageEntries",
226
231
  "flow.debug",
227
232
  "flow.delete",
228
- "flow.clearStorageEntries",
233
+ "flow.errors",
229
234
  "flow.get",
230
235
  "flow.getStorageEntries",
231
236
  "flow.log",
232
237
  "flow.patch",
233
238
  "flow.pressVirtualButton",
234
239
  "flow.setStorageEntry",
240
+ "flow.stats",
235
241
  "flows.get",
236
242
  "flows.getByVersion",
237
243
  "flows.import",
238
244
  "flows.post",
239
245
  "flowVersion.delete",
246
+ "flowVersion.errors",
240
247
  "flowVersion.get",
241
248
  "flowVersion.log",
242
249
  "flowVersion.patch",
250
+ "flowVersion.stats",
243
251
  "flowVersions.get",
244
252
  "flowVersions.post",
245
253
  "integration.delete",
@@ -307,8 +315,12 @@
307
315
  "enum": [
308
316
  "all.User",
309
317
  "all.User.read",
318
+ "applicationTemplate.*",
319
+ "applicationTemplate.get",
310
320
  "applicationTemplates.*",
311
321
  "applicationTemplates.get",
322
+ "applicationTemplates.getCategories",
323
+ "applicationTemplates.getUniqueKeywords",
312
324
  "me.*",
313
325
  "orgs.*",
314
326
  "me.get",
@@ -320,8 +332,6 @@
320
332
  "me.disableTwoFactorAuth",
321
333
  "me.disconnectGithub",
322
334
  "me.connectGithub",
323
- "me.disconnectTwitter",
324
- "me.connectTwitter",
325
335
  "me.addRecentItem",
326
336
  "me.fetchRecentItems",
327
337
  "me.payloadCounts",
@@ -41,10 +41,14 @@
41
41
  "type": "object",
42
42
  "properties": {
43
43
  "service": {
44
- "type": "string"
44
+ "enum": [
45
+ "github"
46
+ ]
45
47
  },
46
48
  "accessToken": {
47
- "type": "string"
49
+ "type": "string",
50
+ "minLength": 1,
51
+ "maxLength": 1024
48
52
  }
49
53
  },
50
54
  "required": [
@@ -54,9 +58,9 @@
54
58
  },
55
59
  "password": {
56
60
  "type": "string",
57
- "minLength": 8,
61
+ "minLength": 12,
58
62
  "maxLength": 2048,
59
- "pattern": "^(?=.*[A-Z])(?=.*[^A-z0-9])(?=.*[0-9])(?=.*[a-z]).{8,}$"
63
+ "pattern": "^(?=.*[A-Z])(?=.*[^A-z0-9])(?=.*[0-9])(?=.*[a-z]).{12,}$"
60
64
  },
61
65
  "acceptTerms": {
62
66
  "enum": [
@@ -133,10 +137,12 @@
133
137
  "notebooks.*",
134
138
  "webhook.*",
135
139
  "webhooks.*",
140
+ "application.applyTemplate",
136
141
  "application.archiveData",
137
142
  "application.backfillArchiveData",
138
143
  "application.clone",
139
144
  "application.export",
145
+ "application.import",
140
146
  "application.fullEventsArchive",
141
147
  "application.fullDataTablesArchive",
142
148
  "application.debug",
@@ -208,6 +214,8 @@
208
214
  "deviceRecipes.get",
209
215
  "deviceRecipes.post",
210
216
  "devices.patch",
217
+ "devices.delete",
218
+ "devices.removeData",
211
219
  "devices.detailedSummary",
212
220
  "devices.export",
213
221
  "devices.get",
@@ -278,23 +286,27 @@
278
286
  "file.upload",
279
287
  "files.get",
280
288
  "files.post",
289
+ "flow.clearStorageEntries",
281
290
  "flow.debug",
282
291
  "flow.delete",
283
- "flow.clearStorageEntries",
292
+ "flow.errors",
284
293
  "flow.get",
285
294
  "flow.getStorageEntries",
286
295
  "flow.log",
287
296
  "flow.patch",
288
297
  "flow.pressVirtualButton",
289
298
  "flow.setStorageEntry",
299
+ "flow.stats",
290
300
  "flows.get",
291
301
  "flows.getByVersion",
292
302
  "flows.import",
293
303
  "flows.post",
294
304
  "flowVersion.delete",
305
+ "flowVersion.errors",
295
306
  "flowVersion.get",
296
307
  "flowVersion.log",
297
308
  "flowVersion.patch",
309
+ "flowVersion.stats",
298
310
  "flowVersions.get",
299
311
  "flowVersions.post",
300
312
  "integration.delete",
@@ -362,8 +374,12 @@
362
374
  "enum": [
363
375
  "all.User",
364
376
  "all.User.read",
377
+ "applicationTemplate.*",
378
+ "applicationTemplate.get",
365
379
  "applicationTemplates.*",
366
380
  "applicationTemplates.get",
381
+ "applicationTemplates.getCategories",
382
+ "applicationTemplates.getUniqueKeywords",
367
383
  "me.*",
368
384
  "orgs.*",
369
385
  "me.get",
@@ -375,8 +391,6 @@
375
391
  "me.disableTwoFactorAuth",
376
392
  "me.disconnectGithub",
377
393
  "me.connectGithub",
378
- "me.disconnectTwitter",
379
- "me.connectTwitter",
380
394
  "me.addRecentItem",
381
395
  "me.fetchRecentItems",
382
396
  "me.payloadCounts",