losant_rest 1.13.1 → 1.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/docs/_schemas.md +2919 -507
  3. data/docs/application.md +1 -1
  4. data/docs/device.md +43 -0
  5. data/docs/devices.md +39 -0
  6. data/docs/edgeDeployment.md +49 -0
  7. data/docs/flow.md +1 -1
  8. data/docs/instanceOrg.md +2 -0
  9. data/docs/instanceOrgInvite.md +139 -0
  10. data/docs/instanceOrgInvites.md +96 -0
  11. data/docs/instanceOrgMembers.md +2 -2
  12. data/docs/instanceOrgs.md +1 -1
  13. data/docs/me.md +1 -1
  14. data/docs/org.md +1 -1
  15. data/lib/losant_rest.rb +3 -0
  16. data/lib/losant_rest/client.rb +14 -2
  17. data/lib/losant_rest/device.rb +50 -0
  18. data/lib/losant_rest/devices.rb +46 -0
  19. data/lib/losant_rest/edge_deployment.rb +81 -0
  20. data/lib/losant_rest/flow.rb +1 -1
  21. data/lib/losant_rest/instance_org.rb +4 -0
  22. data/lib/losant_rest/instance_org_invite.rb +182 -0
  23. data/lib/losant_rest/instance_org_invites.rb +138 -0
  24. data/lib/losant_rest/instance_org_members.rb +2 -2
  25. data/lib/losant_rest/instance_orgs.rb +2 -2
  26. data/lib/losant_rest/version.rb +1 -1
  27. data/schemas/apiTokenPost.json +11 -0
  28. data/schemas/devicePayloadCounts.json +24 -0
  29. data/schemas/devicesExportPayloadCountPost.json +1350 -0
  30. data/schemas/edgeDeployment.json +16 -0
  31. data/schemas/edgeDeployments.json +16 -0
  32. data/schemas/experienceLinkedResources.json +45 -0
  33. data/schemas/flow.json +15 -0
  34. data/schemas/flowPatch.json +15 -0
  35. data/schemas/flowPost.json +15 -0
  36. data/schemas/flowVersion.json +30 -0
  37. data/schemas/flowVersionPost.json +15 -0
  38. data/schemas/flowVersions.json +30 -0
  39. data/schemas/flows.json +15 -0
  40. data/schemas/flowsImportPost.json +30 -0
  41. data/schemas/flowsImportResult.json +45 -0
  42. data/schemas/githubLogin.json +11 -0
  43. data/schemas/historicalSummary.json +60 -28
  44. data/schemas/instanceMember.json +4 -0
  45. data/schemas/instanceMemberPost.json +18 -3
  46. data/schemas/instanceMembers.json +8 -0
  47. data/schemas/instanceOrgMember.json +8 -0
  48. data/schemas/instanceOrgMembers.json +8 -0
  49. data/schemas/instanceOrgs.json +4 -0
  50. data/schemas/me.json +30 -14
  51. data/schemas/notebook.json +30 -0
  52. data/schemas/notebookPatch.json +30 -0
  53. data/schemas/notebookPost.json +30 -0
  54. data/schemas/notebooks.json +30 -0
  55. data/schemas/org.json +30 -14
  56. data/schemas/orgInvite.json +90 -0
  57. data/schemas/orgInviteCollection.json +130 -0
  58. data/schemas/orgInvites.json +82 -77
  59. data/schemas/orgRoleInfo.json +69 -0
  60. data/schemas/orgs.json +30 -14
  61. data/schemas/payloadStats.json +28 -12
  62. data/schemas/userCredentials.json +11 -0
  63. data/schemas/userPost.json +11 -0
  64. data/schemas/virtualButtonPress.json +4 -0
  65. metadata +13 -2
@@ -232,11 +232,11 @@
232
232
  "type": "number"
233
233
  },
234
234
  "payloadCountDetails": {
235
- "title": "Payload Counts",
236
- "description": "Schema for the result of a payload count request",
235
+ "title": "Payload Stats",
236
+ "description": "Schema for the result of a payload stats request",
237
237
  "type": "object",
238
238
  "properties": {
239
- "mqttOut": {
239
+ "dataTable": {
240
240
  "type": "object",
241
241
  "patternProperties": {
242
242
  ".*": {
@@ -244,7 +244,7 @@
244
244
  }
245
245
  }
246
246
  },
247
- "mqttIn": {
247
+ "deviceCommand": {
248
248
  "type": "object",
249
249
  "patternProperties": {
250
250
  ".*": {
@@ -252,7 +252,15 @@
252
252
  }
253
253
  }
254
254
  },
255
- "dataTable": {
255
+ "deviceConnect": {
256
+ "type": "object",
257
+ "patternProperties": {
258
+ ".*": {
259
+ "type": "number"
260
+ }
261
+ }
262
+ },
263
+ "deviceDisconnect": {
256
264
  "type": "object",
257
265
  "patternProperties": {
258
266
  ".*": {
@@ -268,7 +276,7 @@
268
276
  }
269
277
  }
270
278
  },
271
- "deviceCommand": {
279
+ "endpoint": {
272
280
  "type": "object",
273
281
  "patternProperties": {
274
282
  ".*": {
@@ -276,7 +284,7 @@
276
284
  }
277
285
  }
278
286
  },
279
- "webhook": {
287
+ "event": {
280
288
  "type": "object",
281
289
  "patternProperties": {
282
290
  ".*": {
@@ -284,7 +292,7 @@
284
292
  }
285
293
  }
286
294
  },
287
- "timer": {
295
+ "flowError": {
288
296
  "type": "object",
289
297
  "patternProperties": {
290
298
  ".*": {
@@ -292,7 +300,7 @@
292
300
  }
293
301
  }
294
302
  },
295
- "event": {
303
+ "integration": {
296
304
  "type": "object",
297
305
  "patternProperties": {
298
306
  ".*": {
@@ -300,7 +308,7 @@
300
308
  }
301
309
  }
302
310
  },
303
- "virtualButton": {
311
+ "mqttIn": {
304
312
  "type": "object",
305
313
  "patternProperties": {
306
314
  ".*": {
@@ -308,7 +316,7 @@
308
316
  }
309
317
  }
310
318
  },
311
- "deviceConnect": {
319
+ "mqttOut": {
312
320
  "type": "object",
313
321
  "patternProperties": {
314
322
  ".*": {
@@ -316,7 +324,7 @@
316
324
  }
317
325
  }
318
326
  },
319
- "deviceDisconnect": {
327
+ "notebook": {
320
328
  "type": "object",
321
329
  "patternProperties": {
322
330
  ".*": {
@@ -324,7 +332,7 @@
324
332
  }
325
333
  }
326
334
  },
327
- "endpoint": {
335
+ "timer": {
328
336
  "type": "object",
329
337
  "patternProperties": {
330
338
  ".*": {
@@ -332,7 +340,15 @@
332
340
  }
333
341
  }
334
342
  },
335
- "integration": {
343
+ "virtualButton": {
344
+ "type": "object",
345
+ "patternProperties": {
346
+ ".*": {
347
+ "type": "number"
348
+ }
349
+ }
350
+ },
351
+ "webhook": {
336
352
  "type": "object",
337
353
  "patternProperties": {
338
354
  ".*": {
@@ -343,11 +359,11 @@
343
359
  }
344
360
  },
345
361
  "payloadSizeDetails": {
346
- "title": "Payload Counts",
347
- "description": "Schema for the result of a payload count request",
362
+ "title": "Payload Stats",
363
+ "description": "Schema for the result of a payload stats request",
348
364
  "type": "object",
349
365
  "properties": {
350
- "mqttOut": {
366
+ "dataTable": {
351
367
  "type": "object",
352
368
  "patternProperties": {
353
369
  ".*": {
@@ -355,7 +371,7 @@
355
371
  }
356
372
  }
357
373
  },
358
- "mqttIn": {
374
+ "deviceCommand": {
359
375
  "type": "object",
360
376
  "patternProperties": {
361
377
  ".*": {
@@ -363,7 +379,15 @@
363
379
  }
364
380
  }
365
381
  },
366
- "dataTable": {
382
+ "deviceConnect": {
383
+ "type": "object",
384
+ "patternProperties": {
385
+ ".*": {
386
+ "type": "number"
387
+ }
388
+ }
389
+ },
390
+ "deviceDisconnect": {
367
391
  "type": "object",
368
392
  "patternProperties": {
369
393
  ".*": {
@@ -379,7 +403,7 @@
379
403
  }
380
404
  }
381
405
  },
382
- "deviceCommand": {
406
+ "endpoint": {
383
407
  "type": "object",
384
408
  "patternProperties": {
385
409
  ".*": {
@@ -387,7 +411,7 @@
387
411
  }
388
412
  }
389
413
  },
390
- "webhook": {
414
+ "event": {
391
415
  "type": "object",
392
416
  "patternProperties": {
393
417
  ".*": {
@@ -395,7 +419,7 @@
395
419
  }
396
420
  }
397
421
  },
398
- "timer": {
422
+ "flowError": {
399
423
  "type": "object",
400
424
  "patternProperties": {
401
425
  ".*": {
@@ -403,7 +427,7 @@
403
427
  }
404
428
  }
405
429
  },
406
- "event": {
430
+ "integration": {
407
431
  "type": "object",
408
432
  "patternProperties": {
409
433
  ".*": {
@@ -411,7 +435,7 @@
411
435
  }
412
436
  }
413
437
  },
414
- "virtualButton": {
438
+ "mqttIn": {
415
439
  "type": "object",
416
440
  "patternProperties": {
417
441
  ".*": {
@@ -419,7 +443,7 @@
419
443
  }
420
444
  }
421
445
  },
422
- "deviceConnect": {
446
+ "mqttOut": {
423
447
  "type": "object",
424
448
  "patternProperties": {
425
449
  ".*": {
@@ -427,7 +451,7 @@
427
451
  }
428
452
  }
429
453
  },
430
- "deviceDisconnect": {
454
+ "notebook": {
431
455
  "type": "object",
432
456
  "patternProperties": {
433
457
  ".*": {
@@ -435,7 +459,7 @@
435
459
  }
436
460
  }
437
461
  },
438
- "endpoint": {
462
+ "timer": {
439
463
  "type": "object",
440
464
  "patternProperties": {
441
465
  ".*": {
@@ -443,7 +467,15 @@
443
467
  }
444
468
  }
445
469
  },
446
- "integration": {
470
+ "virtualButton": {
471
+ "type": "object",
472
+ "patternProperties": {
473
+ ".*": {
474
+ "type": "number"
475
+ }
476
+ }
477
+ },
478
+ "webhook": {
447
479
  "type": "object",
448
480
  "patternProperties": {
449
481
  ".*": {
@@ -2,6 +2,10 @@
2
2
  "$schema": "http://json-schema.org/draft-04/schema#",
3
3
  "type": "object",
4
4
  "properties": {
5
+ "instanceId": {
6
+ "type": "string",
7
+ "pattern": "^[A-Fa-f\\d]{24}$"
8
+ },
5
9
  "userId": {
6
10
  "type": "string",
7
11
  "pattern": "^[A-Fa-f\\d]{24}$"
@@ -6,6 +6,11 @@
6
6
  "type": "string",
7
7
  "pattern": "^[A-Fa-f\\d]{24}$"
8
8
  },
9
+ "email": {
10
+ "type": "string",
11
+ "format": "email",
12
+ "maxLength": 1024
13
+ },
9
14
  "role": {
10
15
  "type": "string",
11
16
  "enum": [
@@ -15,8 +20,18 @@
15
20
  }
16
21
  },
17
22
  "additionalProperties": false,
18
- "required": [
19
- "userId",
20
- "role"
23
+ "anyOf": [
24
+ {
25
+ "required": [
26
+ "email",
27
+ "role"
28
+ ]
29
+ },
30
+ {
31
+ "required": [
32
+ "userId",
33
+ "role"
34
+ ]
35
+ }
21
36
  ]
22
37
  }
@@ -9,6 +9,10 @@
9
9
  "description": "Schema for an Instance member",
10
10
  "type": "object",
11
11
  "properties": {
12
+ "instanceId": {
13
+ "type": "string",
14
+ "pattern": "^[A-Fa-f\\d]{24}$"
15
+ },
12
16
  "userId": {
13
17
  "type": "string",
14
18
  "pattern": "^[A-Fa-f\\d]{24}$"
@@ -43,6 +47,10 @@
43
47
  "additionalProperties": false
44
48
  }
45
49
  },
50
+ "instanceId": {
51
+ "type": "string",
52
+ "pattern": "^[A-Fa-f\\d]{24}$"
53
+ },
46
54
  "count": {
47
55
  "type": "integer"
48
56
  },
@@ -2,6 +2,14 @@
2
2
  "$schema": "http://json-schema.org/draft-04/schema#",
3
3
  "type": "object",
4
4
  "properties": {
5
+ "instanceId": {
6
+ "type": "string",
7
+ "pattern": "^[A-Fa-f\\d]{24}$"
8
+ },
9
+ "orgId": {
10
+ "type": "string",
11
+ "pattern": "^[A-Fa-f\\d]{24}$"
12
+ },
5
13
  "userId": {
6
14
  "type": "string",
7
15
  "pattern": "^[A-Fa-f\\d]{24}$"
@@ -8,6 +8,14 @@
8
8
  "$ref": "#/definitions/instanceOrgMembers"
9
9
  }
10
10
  },
11
+ "instanceId": {
12
+ "type": "string",
13
+ "pattern": "^[A-Fa-f\\d]{24}$"
14
+ },
15
+ "orgId": {
16
+ "type": "string",
17
+ "pattern": "^[A-Fa-f\\d]{24}$"
18
+ },
11
19
  "count": {
12
20
  "type": "integer"
13
21
  },
@@ -139,6 +139,10 @@
139
139
  ]
140
140
  }
141
141
  },
142
+ "instanceId": {
143
+ "type": "string",
144
+ "pattern": "^[A-Fa-f\\d]{24}$"
145
+ },
142
146
  "count": {
143
147
  "type": "integer"
144
148
  },
data/schemas/me.json CHANGED
@@ -323,11 +323,11 @@
323
323
  "type": "number"
324
324
  },
325
325
  "payloadCount": {
326
- "title": "Payload Counts",
327
- "description": "Schema for the result of a payload count request",
326
+ "title": "Payload Stats",
327
+ "description": "Schema for the result of a payload stats request",
328
328
  "type": "object",
329
329
  "properties": {
330
- "mqttOut": {
330
+ "dataTable": {
331
331
  "type": "object",
332
332
  "patternProperties": {
333
333
  ".*": {
@@ -335,7 +335,7 @@
335
335
  }
336
336
  }
337
337
  },
338
- "mqttIn": {
338
+ "deviceCommand": {
339
339
  "type": "object",
340
340
  "patternProperties": {
341
341
  ".*": {
@@ -343,7 +343,15 @@
343
343
  }
344
344
  }
345
345
  },
346
- "dataTable": {
346
+ "deviceConnect": {
347
+ "type": "object",
348
+ "patternProperties": {
349
+ ".*": {
350
+ "type": "number"
351
+ }
352
+ }
353
+ },
354
+ "deviceDisconnect": {
347
355
  "type": "object",
348
356
  "patternProperties": {
349
357
  ".*": {
@@ -359,7 +367,7 @@
359
367
  }
360
368
  }
361
369
  },
362
- "deviceCommand": {
370
+ "endpoint": {
363
371
  "type": "object",
364
372
  "patternProperties": {
365
373
  ".*": {
@@ -367,7 +375,7 @@
367
375
  }
368
376
  }
369
377
  },
370
- "webhook": {
378
+ "event": {
371
379
  "type": "object",
372
380
  "patternProperties": {
373
381
  ".*": {
@@ -375,7 +383,7 @@
375
383
  }
376
384
  }
377
385
  },
378
- "timer": {
386
+ "flowError": {
379
387
  "type": "object",
380
388
  "patternProperties": {
381
389
  ".*": {
@@ -383,7 +391,7 @@
383
391
  }
384
392
  }
385
393
  },
386
- "event": {
394
+ "integration": {
387
395
  "type": "object",
388
396
  "patternProperties": {
389
397
  ".*": {
@@ -391,7 +399,7 @@
391
399
  }
392
400
  }
393
401
  },
394
- "virtualButton": {
402
+ "mqttIn": {
395
403
  "type": "object",
396
404
  "patternProperties": {
397
405
  ".*": {
@@ -399,7 +407,7 @@
399
407
  }
400
408
  }
401
409
  },
402
- "deviceConnect": {
410
+ "mqttOut": {
403
411
  "type": "object",
404
412
  "patternProperties": {
405
413
  ".*": {
@@ -407,7 +415,7 @@
407
415
  }
408
416
  }
409
417
  },
410
- "deviceDisconnect": {
418
+ "notebook": {
411
419
  "type": "object",
412
420
  "patternProperties": {
413
421
  ".*": {
@@ -415,7 +423,7 @@
415
423
  }
416
424
  }
417
425
  },
418
- "endpoint": {
426
+ "timer": {
419
427
  "type": "object",
420
428
  "patternProperties": {
421
429
  ".*": {
@@ -423,7 +431,15 @@
423
431
  }
424
432
  }
425
433
  },
426
- "integration": {
434
+ "virtualButton": {
435
+ "type": "object",
436
+ "patternProperties": {
437
+ ".*": {
438
+ "type": "number"
439
+ }
440
+ }
441
+ },
442
+ "webhook": {
427
443
  "type": "object",
428
444
  "patternProperties": {
429
445
  ".*": {