losant_rest 1.10.0 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/docs/_schemas.md +18838 -4104
  3. data/docs/application.md +85 -0
  4. data/docs/applicationApiTokens.md +2 -2
  5. data/docs/applicationCertificateAuthorities.md +1 -1
  6. data/docs/applicationCertificates.md +1 -1
  7. data/docs/applicationKeys.md +1 -1
  8. data/docs/applicationTemplate.md +46 -0
  9. data/docs/applicationTemplates.md +77 -2
  10. data/docs/applications.md +1 -1
  11. data/docs/auditLogs.md +1 -1
  12. data/docs/dashboards.md +1 -1
  13. data/docs/dataTables.md +1 -1
  14. data/docs/device.md +7 -3
  15. data/docs/deviceRecipes.md +1 -1
  16. data/docs/devices.md +93 -5
  17. data/docs/edgeDeployments.md +1 -1
  18. data/docs/events.md +1 -1
  19. data/docs/experienceEndpoints.md +1 -0
  20. data/docs/experienceGroups.md +1 -1
  21. data/docs/experienceUsers.md +1 -1
  22. data/docs/experienceVersions.md +1 -1
  23. data/docs/experienceViews.md +1 -1
  24. data/docs/file.md +4 -4
  25. data/docs/files.md +1 -1
  26. data/docs/flow.md +94 -1
  27. data/docs/flowVersion.md +96 -1
  28. data/docs/flowVersions.md +1 -1
  29. data/docs/flows.md +2 -2
  30. data/docs/integrations.md +1 -1
  31. data/docs/me.md +0 -36
  32. data/docs/notebooks.md +1 -1
  33. data/docs/orgs.md +1 -1
  34. data/docs/webhooks.md +1 -1
  35. data/lib/losant_rest.rb +1 -0
  36. data/lib/losant_rest/application.rb +48 -0
  37. data/lib/losant_rest/application_api_tokens.rb +1 -1
  38. data/lib/losant_rest/application_template.rb +79 -0
  39. data/lib/losant_rest/application_templates.rb +89 -1
  40. data/lib/losant_rest/client.rb +6 -2
  41. data/lib/losant_rest/device.rb +11 -3
  42. data/lib/losant_rest/devices.rb +103 -3
  43. data/lib/losant_rest/experience_endpoints.rb +2 -0
  44. data/lib/losant_rest/file.rb +3 -3
  45. data/lib/losant_rest/flow.rb +115 -1
  46. data/lib/losant_rest/flow_version.rb +115 -1
  47. data/lib/losant_rest/me.rb +0 -41
  48. data/lib/losant_rest/version.rb +1 -1
  49. data/schemas/advancedDeviceQuery.json +110 -0
  50. data/schemas/advancedEventQuery.json +198 -0
  51. data/schemas/advancedQuery.json +22 -0
  52. data/schemas/application.json +13 -0
  53. data/schemas/applicationApiTokenPost.json +10 -1
  54. data/schemas/applicationApplyTemplatePatch.json +19 -0
  55. data/schemas/applicationCreationByTemplateResult.json +13 -0
  56. data/schemas/applicationPatch.json +5 -0
  57. data/schemas/applicationPost.json +13 -0
  58. data/schemas/applicationTemplate.json +20 -0
  59. data/schemas/applicationTemplateCategories.json +43 -0
  60. data/schemas/applicationTemplateCategory.json +23 -0
  61. data/schemas/applicationTemplates.json +32 -0
  62. data/schemas/applications.json +13 -0
  63. data/schemas/authedUser.json +3 -0
  64. data/schemas/changePassword.json +2 -2
  65. data/schemas/dashboard.json +1288 -145
  66. data/schemas/dashboardPatch.json +1288 -145
  67. data/schemas/dashboardPost.json +1288 -145
  68. data/schemas/dashboards.json +1288 -145
  69. data/schemas/dataExport.json +142 -0
  70. data/schemas/dataTableRowsExport.json +22 -0
  71. data/schemas/device.json +16 -3
  72. data/schemas/deviceAttributeDataTypeFilter.json +29 -0
  73. data/schemas/deviceClassFilter.json +1 -2
  74. data/schemas/devicePatch.json +16 -3
  75. data/schemas/devicePost.json +16 -3
  76. data/schemas/deviceRecipe.json +16 -3
  77. data/schemas/deviceRecipePatch.json +16 -3
  78. data/schemas/deviceRecipePost.json +16 -3
  79. data/schemas/deviceRecipes.json +16 -3
  80. data/schemas/devices.json +16 -3
  81. data/schemas/devicesDataRemoved.json +12 -0
  82. data/schemas/devicesDeletePost.json +1034 -0
  83. data/schemas/devicesDeleted.json +12 -0
  84. data/schemas/devicesExportPost.json +1035 -0
  85. data/schemas/devicesPatch.json +1773 -7
  86. data/schemas/devicesRemoveDataPost.json +1056 -0
  87. data/schemas/devicesUpdated.json +18 -0
  88. data/schemas/eventPost.json +22 -0
  89. data/schemas/eventsExport.json +198 -0
  90. data/schemas/experienceDomain.json +1 -1
  91. data/schemas/experienceDomainPatch.json +1 -1
  92. data/schemas/experienceDomainPost.json +1 -1
  93. data/schemas/experienceDomains.json +1 -1
  94. data/schemas/experienceLinkedResources.json +372 -3
  95. data/schemas/experienceVersion.json +1 -1
  96. data/schemas/experienceVersions.json +1 -1
  97. data/schemas/flow.json +124 -1
  98. data/schemas/flowErrors.json +87 -0
  99. data/schemas/flowPatch.json +124 -1
  100. data/schemas/flowPost.json +124 -1
  101. data/schemas/flowStats.json +54 -0
  102. data/schemas/flowVersion.json +248 -2
  103. data/schemas/flowVersionPost.json +124 -1
  104. data/schemas/flowVersions.json +248 -2
  105. data/schemas/flows.json +124 -1
  106. data/schemas/flowsImportPost.json +248 -2
  107. data/schemas/flowsImportResult.json +372 -3
  108. data/schemas/githubLogin.json +16 -4
  109. data/schemas/me.json +3 -3
  110. data/schemas/mePatch.json +2 -2
  111. data/schemas/multiDeviceCommand.json +1019 -0
  112. data/schemas/notebook.json +89 -0
  113. data/schemas/notebookPatch.json +89 -0
  114. data/schemas/notebookPost.json +89 -0
  115. data/schemas/notebooks.json +89 -0
  116. data/schemas/org.json +1 -1
  117. data/schemas/orgInviteInfo.json +3 -0
  118. data/schemas/orgInvitePost.json +3 -0
  119. data/schemas/orgInvites.json +3 -0
  120. data/schemas/orgPatch.json +1 -1
  121. data/schemas/orgs.json +1 -1
  122. data/schemas/passwordResetFinish.json +2 -2
  123. data/schemas/samlResponse.json +1 -1
  124. data/schemas/templateKeywords.json +14 -0
  125. data/schemas/timeSeriesData.json +101 -12
  126. data/schemas/timeSeriesQuery.json +101 -12
  127. data/schemas/userCredentials.json +14 -3
  128. data/schemas/userPost.json +22 -7
  129. metadata +20 -5
@@ -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",
@@ -152,7 +154,10 @@
152
154
  "deviceRecipe.patch",
153
155
  "deviceRecipes.get",
154
156
  "deviceRecipes.post",
157
+ "devices.attributeNames",
155
158
  "devices.patch",
159
+ "devices.delete",
160
+ "devices.removeData",
156
161
  "devices.detailedSummary",
157
162
  "devices.export",
158
163
  "devices.get",
@@ -223,23 +228,27 @@
223
228
  "file.upload",
224
229
  "files.get",
225
230
  "files.post",
231
+ "flow.clearStorageEntries",
226
232
  "flow.debug",
227
233
  "flow.delete",
228
- "flow.clearStorageEntries",
234
+ "flow.errors",
229
235
  "flow.get",
230
236
  "flow.getStorageEntries",
231
237
  "flow.log",
232
238
  "flow.patch",
233
239
  "flow.pressVirtualButton",
234
240
  "flow.setStorageEntry",
241
+ "flow.stats",
235
242
  "flows.get",
236
243
  "flows.getByVersion",
237
244
  "flows.import",
238
245
  "flows.post",
239
246
  "flowVersion.delete",
247
+ "flowVersion.errors",
240
248
  "flowVersion.get",
241
249
  "flowVersion.log",
242
250
  "flowVersion.patch",
251
+ "flowVersion.stats",
243
252
  "flowVersions.get",
244
253
  "flowVersions.post",
245
254
  "integration.delete",
@@ -307,8 +316,12 @@
307
316
  "enum": [
308
317
  "all.User",
309
318
  "all.User.read",
319
+ "applicationTemplate.*",
320
+ "applicationTemplate.get",
310
321
  "applicationTemplates.*",
311
322
  "applicationTemplates.get",
323
+ "applicationTemplates.getCategories",
324
+ "applicationTemplates.getUniqueKeywords",
312
325
  "me.*",
313
326
  "orgs.*",
314
327
  "me.get",
@@ -320,8 +333,6 @@
320
333
  "me.disableTwoFactorAuth",
321
334
  "me.disconnectGithub",
322
335
  "me.connectGithub",
323
- "me.disconnectTwitter",
324
- "me.connectTwitter",
325
336
  "me.addRecentItem",
326
337
  "me.fetchRecentItems",
327
338
  "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-Za-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",
@@ -207,7 +213,10 @@
207
213
  "deviceRecipe.patch",
208
214
  "deviceRecipes.get",
209
215
  "deviceRecipes.post",
216
+ "devices.attributeNames",
210
217
  "devices.patch",
218
+ "devices.delete",
219
+ "devices.removeData",
211
220
  "devices.detailedSummary",
212
221
  "devices.export",
213
222
  "devices.get",
@@ -278,23 +287,27 @@
278
287
  "file.upload",
279
288
  "files.get",
280
289
  "files.post",
290
+ "flow.clearStorageEntries",
281
291
  "flow.debug",
282
292
  "flow.delete",
283
- "flow.clearStorageEntries",
293
+ "flow.errors",
284
294
  "flow.get",
285
295
  "flow.getStorageEntries",
286
296
  "flow.log",
287
297
  "flow.patch",
288
298
  "flow.pressVirtualButton",
289
299
  "flow.setStorageEntry",
300
+ "flow.stats",
290
301
  "flows.get",
291
302
  "flows.getByVersion",
292
303
  "flows.import",
293
304
  "flows.post",
294
305
  "flowVersion.delete",
306
+ "flowVersion.errors",
295
307
  "flowVersion.get",
296
308
  "flowVersion.log",
297
309
  "flowVersion.patch",
310
+ "flowVersion.stats",
298
311
  "flowVersions.get",
299
312
  "flowVersions.post",
300
313
  "integration.delete",
@@ -362,8 +375,12 @@
362
375
  "enum": [
363
376
  "all.User",
364
377
  "all.User.read",
378
+ "applicationTemplate.*",
379
+ "applicationTemplate.get",
365
380
  "applicationTemplates.*",
366
381
  "applicationTemplates.get",
382
+ "applicationTemplates.getCategories",
383
+ "applicationTemplates.getUniqueKeywords",
367
384
  "me.*",
368
385
  "orgs.*",
369
386
  "me.get",
@@ -375,8 +392,6 @@
375
392
  "me.disableTwoFactorAuth",
376
393
  "me.disconnectGithub",
377
394
  "me.connectGithub",
378
- "me.disconnectTwitter",
379
- "me.connectTwitter",
380
395
  "me.addRecentItem",
381
396
  "me.fetchRecentItems",
382
397
  "me.payloadCounts",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: losant_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Kuehl
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-18 00:00:00.000000000 Z
11
+ date: 2020-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -91,6 +91,7 @@ files:
91
91
  - docs/applicationCertificates.md
92
92
  - docs/applicationKey.md
93
93
  - docs/applicationKeys.md
94
+ - docs/applicationTemplate.md
94
95
  - docs/applicationTemplates.md
95
96
  - docs/applications.md
96
97
  - docs/auditLog.md
@@ -153,6 +154,7 @@ files:
153
154
  - lib/losant_rest/application_certificates.rb
154
155
  - lib/losant_rest/application_key.rb
155
156
  - lib/losant_rest/application_keys.rb
157
+ - lib/losant_rest/application_template.rb
156
158
  - lib/losant_rest/application_templates.rb
157
159
  - lib/losant_rest/applications.rb
158
160
  - lib/losant_rest/audit_log.rb
@@ -216,6 +218,7 @@ files:
216
218
  - schemas/apiTokens.json
217
219
  - schemas/application.json
218
220
  - schemas/applicationApiTokenPost.json
221
+ - schemas/applicationApplyTemplatePatch.json
219
222
  - schemas/applicationCertificate.json
220
223
  - schemas/applicationCertificateAuthorities.json
221
224
  - schemas/applicationCertificateAuthority.json
@@ -240,6 +243,8 @@ files:
240
243
  - schemas/applicationReadmePatch.json
241
244
  - schemas/applicationSearchResult.json
242
245
  - schemas/applicationTemplate.json
246
+ - schemas/applicationTemplateCategories.json
247
+ - schemas/applicationTemplateCategory.json
243
248
  - schemas/applicationTemplates.json
244
249
  - schemas/applications.json
245
250
  - schemas/auditLog.json
@@ -271,6 +276,7 @@ files:
271
276
  - schemas/dataTableRowsExport.json
272
277
  - schemas/dataTables.json
273
278
  - schemas/device.json
279
+ - schemas/deviceAttributeDataTypeFilter.json
274
280
  - schemas/deviceClassFilter.json
275
281
  - schemas/deviceCommand.json
276
282
  - schemas/deviceCommands.json
@@ -291,7 +297,13 @@ files:
291
297
  - schemas/deviceStates.json
292
298
  - schemas/deviceTagFilter.json
293
299
  - schemas/devices.json
300
+ - schemas/devicesDataRemoved.json
301
+ - schemas/devicesDeletePost.json
302
+ - schemas/devicesDeleted.json
303
+ - schemas/devicesExportPost.json
294
304
  - schemas/devicesPatch.json
305
+ - schemas/devicesRemoveDataPost.json
306
+ - schemas/devicesUpdated.json
295
307
  - schemas/disableTwoFactorAuth.json
296
308
  - schemas/edgeDeployment.json
297
309
  - schemas/edgeDeploymentRelease.json
@@ -346,9 +358,11 @@ files:
346
358
  - schemas/fileUploadPostResponse.json
347
359
  - schemas/files.json
348
360
  - schemas/flow.json
361
+ - schemas/flowErrors.json
349
362
  - schemas/flowLog.json
350
363
  - schemas/flowPatch.json
351
364
  - schemas/flowPost.json
365
+ - schemas/flowStats.json
352
366
  - schemas/flowStorageEntries.json
353
367
  - schemas/flowStorageEntry.json
354
368
  - schemas/flowTriggerFilter.json
@@ -398,6 +412,7 @@ files:
398
412
  - schemas/samlResponse.json
399
413
  - schemas/ssoRequest.json
400
414
  - schemas/success.json
415
+ - schemas/templateKeywords.json
401
416
  - schemas/timeSeriesData.json
402
417
  - schemas/timeSeriesQuery.json
403
418
  - schemas/userCredentials.json
@@ -416,7 +431,7 @@ homepage: https://github.com/Losant/losant-rest-ruby
416
431
  licenses:
417
432
  - MIT
418
433
  metadata: {}
419
- post_install_message:
434
+ post_install_message:
420
435
  rdoc_options: []
421
436
  require_paths:
422
437
  - lib
@@ -432,7 +447,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
432
447
  version: '0'
433
448
  requirements: []
434
449
  rubygems_version: 3.1.2
435
- signing_key:
450
+ signing_key:
436
451
  specification_version: 4
437
452
  summary: Provides a simple ruby wrapper around the Losant REST API
438
453
  test_files: