losant_rest 1.21.3 → 1.22.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 (43) hide show
  1. checksums.yaml +4 -4
  2. data/docs/_schemas.md +1796 -152
  3. data/docs/deviceAttribute.md +139 -0
  4. data/docs/deviceAttributes.md +96 -0
  5. data/lib/platform_rest/client.rb +10 -2
  6. data/lib/platform_rest/device_attribute.rb +182 -0
  7. data/lib/platform_rest/device_attributes.rb +138 -0
  8. data/lib/platform_rest/version.rb +1 -1
  9. data/lib/platform_rest.rb +2 -0
  10. data/schemas/apiTokenPost.json +8 -0
  11. data/schemas/applicationDashboardPost.json +120 -0
  12. data/schemas/applicationExportPost.json +29 -0
  13. data/schemas/applicationImportExecutions.json +18 -1
  14. data/schemas/credential.json +39 -1
  15. data/schemas/credentialPatch.json +37 -0
  16. data/schemas/credentialPost.json +54 -1
  17. data/schemas/credentials.json +39 -1
  18. data/schemas/dashboard.json +120 -0
  19. data/schemas/dashboardPatch.json +120 -0
  20. data/schemas/dashboardPost.json +120 -0
  21. data/schemas/dashboards.json +120 -0
  22. data/schemas/dataExport.json +4 -0
  23. data/schemas/device.json +0 -1
  24. data/schemas/deviceAttribute.json +128 -0
  25. data/schemas/deviceAttributePatch.json +111 -0
  26. data/schemas/deviceAttributePost.json +125 -0
  27. data/schemas/deviceAttributes.json +171 -0
  28. data/schemas/devicePatch.json +0 -1
  29. data/schemas/devicePost.json +0 -1
  30. data/schemas/deviceRecipe.json +0 -1
  31. data/schemas/deviceRecipePatch.json +0 -1
  32. data/schemas/deviceRecipePost.json +0 -1
  33. data/schemas/deviceRecipes.json +0 -1
  34. data/schemas/devices.json +0 -1
  35. data/schemas/devicesPatch.json +65 -3
  36. data/schemas/githubLogin.json +8 -0
  37. data/schemas/importIntoApplicationOptions.json +17 -0
  38. data/schemas/samlResponse.json +8 -0
  39. data/schemas/suggestFunctionPost.json +15 -0
  40. data/schemas/suggestFunctionResponse.json +37 -0
  41. data/schemas/userCredentials.json +8 -0
  42. data/schemas/userPost.json +8 -0
  43. metadata +12 -2
@@ -0,0 +1,125 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "name": {
6
+ "type": "string",
7
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
8
+ },
9
+ "dataType": {
10
+ "type": "string",
11
+ "enum": [
12
+ "string",
13
+ "number",
14
+ "gps",
15
+ "boolean",
16
+ "blob"
17
+ ]
18
+ },
19
+ "contentType": {
20
+ "type": "string",
21
+ "maxLength": 64
22
+ },
23
+ "description": {
24
+ "type": "string",
25
+ "maxLength": 32767
26
+ },
27
+ "attributeTags": {
28
+ "type": "object",
29
+ "patternProperties": {
30
+ "^[0-9a-zA-Z_-]{1,255}$": {
31
+ "type": "string",
32
+ "minLength": 1,
33
+ "maxLength": 255
34
+ }
35
+ },
36
+ "additionalProperties": false
37
+ },
38
+ "system": {
39
+ "type": "object",
40
+ "properties": {
41
+ "aggregation": {
42
+ "type": "string",
43
+ "enum": [
44
+ "FIRST",
45
+ "LAST",
46
+ "COUNT",
47
+ "MAX",
48
+ "MIN",
49
+ "MEDIAN",
50
+ "MEAN",
51
+ "SUM",
52
+ "STD_DEV"
53
+ ]
54
+ },
55
+ "aggregationOptions": {
56
+ "type": "array",
57
+ "items": {
58
+ "type": "object",
59
+ "additionalProperties": false
60
+ },
61
+ "maxItems": 0
62
+ },
63
+ "childAttributes": {
64
+ "type": "array",
65
+ "items": {
66
+ "type": "object",
67
+ "properties": {
68
+ "name": {
69
+ "type": "string",
70
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
71
+ },
72
+ "mode": {
73
+ "type": "string",
74
+ "enum": [
75
+ "all",
76
+ "whitelist",
77
+ "blacklist"
78
+ ]
79
+ },
80
+ "deviceIds": {
81
+ "type": "array",
82
+ "items": {
83
+ "type": "string",
84
+ "pattern": "^[A-Fa-f\\d]{24}$"
85
+ },
86
+ "maxItems": 1000
87
+ },
88
+ "deviceTags": {
89
+ "type": "array",
90
+ "items": {
91
+ "type": "object",
92
+ "properties": {
93
+ "key": {
94
+ "type": "string",
95
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
96
+ },
97
+ "value": {
98
+ "type": "string",
99
+ "minLength": 1,
100
+ "maxLength": 255
101
+ }
102
+ },
103
+ "additionalProperties": false
104
+ },
105
+ "maxItems": 100
106
+ }
107
+ },
108
+ "required": [
109
+ "name",
110
+ "mode"
111
+ ],
112
+ "additionalProperties": false
113
+ },
114
+ "maxItems": 256
115
+ }
116
+ },
117
+ "additionalProperties": false
118
+ }
119
+ },
120
+ "required": [
121
+ "name",
122
+ "dataType"
123
+ ],
124
+ "additionalProperties": false
125
+ }
@@ -0,0 +1,171 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "items": {
6
+ "type": "array",
7
+ "items": {
8
+ "title": "Device Attribute",
9
+ "description": "Schema for a single Device Attribute",
10
+ "type": "object",
11
+ "properties": {
12
+ "name": {
13
+ "type": "string",
14
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
15
+ },
16
+ "dataType": {
17
+ "type": "string",
18
+ "enum": [
19
+ "string",
20
+ "number",
21
+ "gps",
22
+ "boolean",
23
+ "blob"
24
+ ]
25
+ },
26
+ "contentType": {
27
+ "type": "string",
28
+ "maxLength": 64
29
+ },
30
+ "description": {
31
+ "type": "string",
32
+ "maxLength": 32767
33
+ },
34
+ "attributeTags": {
35
+ "type": "object",
36
+ "patternProperties": {
37
+ "^[0-9a-zA-Z_-]{1,255}$": {
38
+ "type": "string",
39
+ "minLength": 1,
40
+ "maxLength": 255
41
+ }
42
+ },
43
+ "additionalProperties": false
44
+ },
45
+ "system": {
46
+ "type": "object",
47
+ "properties": {
48
+ "aggregation": {
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
+ "aggregationOptions": {
63
+ "type": "array",
64
+ "items": {
65
+ "type": "object",
66
+ "additionalProperties": false
67
+ },
68
+ "maxItems": 0
69
+ },
70
+ "childAttributes": {
71
+ "type": "array",
72
+ "items": {
73
+ "type": "object",
74
+ "properties": {
75
+ "name": {
76
+ "type": "string",
77
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
78
+ },
79
+ "mode": {
80
+ "type": "string",
81
+ "enum": [
82
+ "all",
83
+ "whitelist",
84
+ "blacklist"
85
+ ]
86
+ },
87
+ "deviceIds": {
88
+ "type": "array",
89
+ "items": {
90
+ "type": "string",
91
+ "pattern": "^[A-Fa-f\\d]{24}$"
92
+ },
93
+ "maxItems": 1000
94
+ },
95
+ "deviceTags": {
96
+ "type": "array",
97
+ "items": {
98
+ "type": "object",
99
+ "properties": {
100
+ "key": {
101
+ "type": "string",
102
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
103
+ },
104
+ "value": {
105
+ "type": "string",
106
+ "minLength": 1,
107
+ "maxLength": 255
108
+ }
109
+ },
110
+ "additionalProperties": false
111
+ },
112
+ "maxItems": 100
113
+ }
114
+ },
115
+ "required": [
116
+ "name",
117
+ "mode"
118
+ ],
119
+ "additionalProperties": false
120
+ },
121
+ "maxItems": 256
122
+ }
123
+ },
124
+ "additionalProperties": false
125
+ },
126
+ "applicationId": {
127
+ "type": "string",
128
+ "pattern": "^[A-Fa-f\\d]{24}$"
129
+ },
130
+ "deviceId": {
131
+ "type": "string",
132
+ "pattern": "^[A-Fa-f\\d]{24}$"
133
+ }
134
+ }
135
+ }
136
+ },
137
+ "count": {
138
+ "type": "integer"
139
+ },
140
+ "totalCount": {
141
+ "type": "integer"
142
+ },
143
+ "filter": {
144
+ "type": "string"
145
+ },
146
+ "filterField": {
147
+ "type": "string"
148
+ },
149
+ "sortField": {
150
+ "type": "string"
151
+ },
152
+ "sortDirection": {
153
+ "type": "string",
154
+ "enum": [
155
+ "asc",
156
+ "desc",
157
+ "ASC",
158
+ "DESC",
159
+ ""
160
+ ]
161
+ },
162
+ "applicationId": {
163
+ "type": "string",
164
+ "pattern": "^[A-Fa-f\\d]{24}$"
165
+ },
166
+ "deviceId": {
167
+ "type": "string",
168
+ "pattern": "^[A-Fa-f\\d]{24}$"
169
+ }
170
+ }
171
+ }
@@ -95,7 +95,6 @@
95
95
  "type": "object",
96
96
  "additionalProperties": false
97
97
  },
98
- "additionalProperties": false,
99
98
  "maxItems": 0
100
99
  },
101
100
  "childAttributes": {
@@ -95,7 +95,6 @@
95
95
  "type": "object",
96
96
  "additionalProperties": false
97
97
  },
98
- "additionalProperties": false,
99
98
  "maxItems": 0
100
99
  },
101
100
  "childAttributes": {
@@ -124,7 +124,6 @@
124
124
  "type": "object",
125
125
  "additionalProperties": false
126
126
  },
127
- "additionalProperties": false,
128
127
  "maxItems": 0
129
128
  },
130
129
  "childAttributes": {
@@ -104,7 +104,6 @@
104
104
  "type": "object",
105
105
  "additionalProperties": false
106
106
  },
107
- "additionalProperties": false,
108
107
  "maxItems": 0
109
108
  },
110
109
  "childAttributes": {
@@ -104,7 +104,6 @@
104
104
  "type": "object",
105
105
  "additionalProperties": false
106
106
  },
107
- "additionalProperties": false,
108
107
  "maxItems": 0
109
108
  },
110
109
  "childAttributes": {
@@ -131,7 +131,6 @@
131
131
  "type": "object",
132
132
  "additionalProperties": false
133
133
  },
134
- "additionalProperties": false,
135
134
  "maxItems": 0
136
135
  },
137
136
  "childAttributes": {
data/schemas/devices.json CHANGED
@@ -126,7 +126,6 @@
126
126
  "type": "object",
127
127
  "additionalProperties": false
128
128
  },
129
- "additionalProperties": false,
130
129
  "maxItems": 0
131
130
  },
132
131
  "childAttributes": {
@@ -100,7 +100,6 @@
100
100
  "type": "object",
101
101
  "additionalProperties": false
102
102
  },
103
- "additionalProperties": false,
104
103
  "maxItems": 0
105
104
  },
106
105
  "childAttributes": {
@@ -2549,6 +2548,71 @@
2549
2548
  ],
2550
2549
  "additionalProperties": false
2551
2550
  },
2551
+ {
2552
+ "type": "object",
2553
+ "properties": {
2554
+ "operation": {
2555
+ "type": "string",
2556
+ "enum": [
2557
+ "set"
2558
+ ]
2559
+ },
2560
+ "target": {
2561
+ "type": "string",
2562
+ "enum": [
2563
+ "attributeContentType"
2564
+ ]
2565
+ },
2566
+ "attributeName": {
2567
+ "type": "string",
2568
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
2569
+ },
2570
+ "value": {
2571
+ "type": "string",
2572
+ "maxLength": 64,
2573
+ "minLength": 1
2574
+ }
2575
+ },
2576
+ "required": [
2577
+ "operation",
2578
+ "target",
2579
+ "attributeName",
2580
+ "value"
2581
+ ],
2582
+ "additionalProperties": false
2583
+ },
2584
+ {
2585
+ "type": "object",
2586
+ "properties": {
2587
+ "operation": {
2588
+ "type": "string",
2589
+ "enum": [
2590
+ "set"
2591
+ ]
2592
+ },
2593
+ "target": {
2594
+ "type": "string",
2595
+ "enum": [
2596
+ "attributeName"
2597
+ ]
2598
+ },
2599
+ "attributeName": {
2600
+ "type": "string",
2601
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
2602
+ },
2603
+ "value": {
2604
+ "type": "string",
2605
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
2606
+ }
2607
+ },
2608
+ "required": [
2609
+ "operation",
2610
+ "target",
2611
+ "attributeName",
2612
+ "value"
2613
+ ],
2614
+ "additionalProperties": false
2615
+ },
2552
2616
  {
2553
2617
  "type": "object",
2554
2618
  "properties": {
@@ -2759,7 +2823,6 @@
2759
2823
  "type": "object",
2760
2824
  "additionalProperties": false
2761
2825
  },
2762
- "additionalProperties": false,
2763
2826
  "maxItems": 0
2764
2827
  },
2765
2828
  "childAttributes": {
@@ -2907,7 +2970,6 @@
2907
2970
  "type": "object",
2908
2971
  "additionalProperties": false
2909
2972
  },
2910
- "additionalProperties": false,
2911
2973
  "maxItems": 0
2912
2974
  },
2913
2975
  "childAttributes": {
@@ -44,6 +44,8 @@
44
44
  "deviceRecipe.*",
45
45
  "deviceRecipes.*",
46
46
  "devices.*",
47
+ "deviceAttribute.*",
48
+ "deviceAttributes.*",
47
49
  "edgeDeployment.*",
48
50
  "edgeDeployments.*",
49
51
  "embeddedDeployment.*",
@@ -190,6 +192,11 @@
190
192
  "devices.sendCommand",
191
193
  "devices.tagKeys",
192
194
  "devices.tagValues",
195
+ "deviceAttribute.get",
196
+ "deviceAttribute.patch",
197
+ "deviceAttribute.delete",
198
+ "deviceAttributes.get",
199
+ "deviceAttributes.post",
193
200
  "edgeDeployment.get",
194
201
  "edgeDeployments.get",
195
202
  "edgeDeployments.release",
@@ -275,6 +282,7 @@
275
282
  "flow.setStorageEntry",
276
283
  "flow.getStorageEntriesMetadata",
277
284
  "flow.stats",
285
+ "flow.suggestFunction",
278
286
  "flows.get",
279
287
  "flows.getByVersion",
280
288
  "flows.import",
@@ -62,6 +62,23 @@
62
62
  ]
63
63
  },
64
64
  "uniqueItems": true
65
+ },
66
+ "credentialName": {
67
+ "type": "string",
68
+ "maxLength": 255
69
+ },
70
+ "repo": {
71
+ "type": "object",
72
+ "properties": {
73
+ "branch": {
74
+ "type": "string",
75
+ "maxLength": 255
76
+ },
77
+ "directory": {
78
+ "type": "string",
79
+ "maxLength": 1024
80
+ }
81
+ }
65
82
  }
66
83
  },
67
84
  "additionalProperties": false
@@ -49,6 +49,8 @@
49
49
  "deviceRecipe.*",
50
50
  "deviceRecipes.*",
51
51
  "devices.*",
52
+ "deviceAttribute.*",
53
+ "deviceAttributes.*",
52
54
  "edgeDeployment.*",
53
55
  "edgeDeployments.*",
54
56
  "embeddedDeployment.*",
@@ -195,6 +197,11 @@
195
197
  "devices.sendCommand",
196
198
  "devices.tagKeys",
197
199
  "devices.tagValues",
200
+ "deviceAttribute.get",
201
+ "deviceAttribute.patch",
202
+ "deviceAttribute.delete",
203
+ "deviceAttributes.get",
204
+ "deviceAttributes.post",
198
205
  "edgeDeployment.get",
199
206
  "edgeDeployments.get",
200
207
  "edgeDeployments.release",
@@ -280,6 +287,7 @@
280
287
  "flow.setStorageEntry",
281
288
  "flow.getStorageEntriesMetadata",
282
289
  "flow.stats",
290
+ "flow.suggestFunction",
283
291
  "flows.get",
284
292
  "flows.getByVersion",
285
293
  "flows.import",
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "text": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "maxLength": 8192
9
+ }
10
+ },
11
+ "required": [
12
+ "text"
13
+ ],
14
+ "additionalProperties": false
15
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "text": {
6
+ "type": "string",
7
+ "maxLength": 32767,
8
+ "minLength": 1
9
+ },
10
+ "responseId": {
11
+ "type": "string",
12
+ "minLength": 1,
13
+ "maxLength": 1024
14
+ },
15
+ "finishReason": {
16
+ "type": "string",
17
+ "enum": [
18
+ "FINISH_REASON_UNSPECIFIED",
19
+ "STOP",
20
+ "MAX_TOKENS",
21
+ "SAFETY",
22
+ "RECITATION",
23
+ "OTHER",
24
+ "BLOCKLIST",
25
+ "PROHIBITED_CONTENT",
26
+ "SPII",
27
+ "MALFORMED_FUNCTION_CALL"
28
+ ]
29
+ }
30
+ },
31
+ "required": [
32
+ "text",
33
+ "responseId",
34
+ "finishReason"
35
+ ],
36
+ "additionalProperties": false
37
+ }
@@ -53,6 +53,8 @@
53
53
  "deviceRecipe.*",
54
54
  "deviceRecipes.*",
55
55
  "devices.*",
56
+ "deviceAttribute.*",
57
+ "deviceAttributes.*",
56
58
  "edgeDeployment.*",
57
59
  "edgeDeployments.*",
58
60
  "embeddedDeployment.*",
@@ -199,6 +201,11 @@
199
201
  "devices.sendCommand",
200
202
  "devices.tagKeys",
201
203
  "devices.tagValues",
204
+ "deviceAttribute.get",
205
+ "deviceAttribute.patch",
206
+ "deviceAttribute.delete",
207
+ "deviceAttributes.get",
208
+ "deviceAttributes.post",
202
209
  "edgeDeployment.get",
203
210
  "edgeDeployments.get",
204
211
  "edgeDeployments.release",
@@ -284,6 +291,7 @@
284
291
  "flow.setStorageEntry",
285
292
  "flow.getStorageEntriesMetadata",
286
293
  "flow.stats",
294
+ "flow.suggestFunction",
287
295
  "flows.get",
288
296
  "flows.getByVersion",
289
297
  "flows.import",
@@ -111,6 +111,8 @@
111
111
  "deviceRecipe.*",
112
112
  "deviceRecipes.*",
113
113
  "devices.*",
114
+ "deviceAttribute.*",
115
+ "deviceAttributes.*",
114
116
  "edgeDeployment.*",
115
117
  "edgeDeployments.*",
116
118
  "embeddedDeployment.*",
@@ -257,6 +259,11 @@
257
259
  "devices.sendCommand",
258
260
  "devices.tagKeys",
259
261
  "devices.tagValues",
262
+ "deviceAttribute.get",
263
+ "deviceAttribute.patch",
264
+ "deviceAttribute.delete",
265
+ "deviceAttributes.get",
266
+ "deviceAttributes.post",
260
267
  "edgeDeployment.get",
261
268
  "edgeDeployments.get",
262
269
  "edgeDeployments.release",
@@ -342,6 +349,7 @@
342
349
  "flow.setStorageEntry",
343
350
  "flow.getStorageEntriesMetadata",
344
351
  "flow.stats",
352
+ "flow.suggestFunction",
345
353
  "flows.get",
346
354
  "flows.getByVersion",
347
355
  "flows.import",