losant_rest 1.9.1 → 1.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. checksums.yaml +5 -5
  2. data/LICENSE +1 -1
  3. data/README.md +1 -1
  4. data/docs/_schemas.md +41608 -19945
  5. data/docs/application.md +168 -4
  6. data/docs/applicationTemplates.md +50 -0
  7. data/docs/applications.md +46 -0
  8. data/docs/auth.md +72 -0
  9. data/docs/device.md +1 -0
  10. data/docs/devices.md +89 -2
  11. data/docs/experienceEndpoint.md +43 -0
  12. data/docs/experienceEndpoints.md +1 -1
  13. data/docs/experienceView.md +43 -0
  14. data/lib/losant_rest.rb +2 -1
  15. data/lib/losant_rest/application.rb +144 -5
  16. data/lib/losant_rest/application_api_token.rb +1 -1
  17. data/lib/losant_rest/application_api_tokens.rb +1 -1
  18. data/lib/losant_rest/application_certificate.rb +1 -1
  19. data/lib/losant_rest/application_certificate_authorities.rb +1 -1
  20. data/lib/losant_rest/application_certificate_authority.rb +1 -1
  21. data/lib/losant_rest/application_certificates.rb +1 -1
  22. data/lib/losant_rest/application_key.rb +1 -1
  23. data/lib/losant_rest/application_keys.rb +1 -1
  24. data/lib/losant_rest/application_templates.rb +88 -0
  25. data/lib/losant_rest/applications.rb +1 -1
  26. data/lib/losant_rest/audit_log.rb +1 -1
  27. data/lib/losant_rest/audit_logs.rb +1 -1
  28. data/lib/losant_rest/auth.rb +85 -1
  29. data/lib/losant_rest/client.rb +7 -3
  30. data/lib/losant_rest/dashboard.rb +1 -1
  31. data/lib/losant_rest/dashboards.rb +1 -1
  32. data/lib/losant_rest/data.rb +1 -1
  33. data/lib/losant_rest/data_table.rb +1 -1
  34. data/lib/losant_rest/data_table_row.rb +1 -1
  35. data/lib/losant_rest/data_table_rows.rb +1 -1
  36. data/lib/losant_rest/data_tables.rb +1 -1
  37. data/lib/losant_rest/device.rb +3 -1
  38. data/lib/losant_rest/device_recipe.rb +1 -1
  39. data/lib/losant_rest/device_recipes.rb +1 -1
  40. data/lib/losant_rest/devices.rb +105 -3
  41. data/lib/losant_rest/edge_deployments.rb +1 -1
  42. data/lib/losant_rest/error.rb +1 -1
  43. data/lib/losant_rest/event.rb +1 -1
  44. data/lib/losant_rest/events.rb +1 -1
  45. data/lib/losant_rest/experience.rb +1 -1
  46. data/lib/losant_rest/experience_domain.rb +1 -1
  47. data/lib/losant_rest/experience_domains.rb +1 -1
  48. data/lib/losant_rest/experience_endpoint.rb +51 -1
  49. data/lib/losant_rest/experience_endpoints.rb +1 -1
  50. data/lib/losant_rest/experience_group.rb +1 -1
  51. data/lib/losant_rest/experience_groups.rb +1 -1
  52. data/lib/losant_rest/experience_slug.rb +1 -1
  53. data/lib/losant_rest/experience_slugs.rb +1 -1
  54. data/lib/losant_rest/experience_user.rb +1 -1
  55. data/lib/losant_rest/experience_users.rb +1 -1
  56. data/lib/losant_rest/experience_version.rb +1 -1
  57. data/lib/losant_rest/experience_versions.rb +1 -1
  58. data/lib/losant_rest/experience_view.rb +51 -1
  59. data/lib/losant_rest/experience_views.rb +1 -1
  60. data/lib/losant_rest/file.rb +1 -1
  61. data/lib/losant_rest/files.rb +1 -1
  62. data/lib/losant_rest/flow.rb +1 -1
  63. data/lib/losant_rest/flow_version.rb +1 -1
  64. data/lib/losant_rest/flow_versions.rb +1 -1
  65. data/lib/losant_rest/flows.rb +1 -1
  66. data/lib/losant_rest/integration.rb +1 -1
  67. data/lib/losant_rest/integrations.rb +1 -1
  68. data/lib/losant_rest/me.rb +1 -1
  69. data/lib/losant_rest/notebook.rb +1 -1
  70. data/lib/losant_rest/notebooks.rb +1 -1
  71. data/lib/losant_rest/org.rb +1 -1
  72. data/lib/losant_rest/org_invites.rb +1 -1
  73. data/lib/losant_rest/orgs.rb +1 -1
  74. data/lib/losant_rest/utils.rb +1 -1
  75. data/lib/losant_rest/version.rb +2 -2
  76. data/lib/losant_rest/webhook.rb +1 -1
  77. data/lib/losant_rest/webhooks.rb +1 -1
  78. data/schemas/advancedDeviceQuery.json +1018 -0
  79. data/schemas/advancedEventQuery.json +382 -13
  80. data/schemas/advancedQuery.json +37 -3
  81. data/schemas/application.json +10 -5
  82. data/schemas/applicationApiTokenPost.json +6 -0
  83. data/schemas/applicationCertificate.json +34 -0
  84. data/schemas/applicationCertificatePatch.json +34 -0
  85. data/schemas/applicationCertificatePost.json +34 -0
  86. data/schemas/applicationCertificates.json +34 -0
  87. data/schemas/{applicationCloneResult.json → applicationCreationByTemplateResult.json} +21 -8
  88. data/schemas/applicationExportPost.json +24 -0
  89. data/schemas/applicationExportResult.json +10 -0
  90. data/schemas/applicationKey.json +34 -0
  91. data/schemas/applicationKeyPatch.json +34 -0
  92. data/schemas/applicationKeyPost.json +34 -0
  93. data/schemas/applicationKeyPostResponse.json +34 -0
  94. data/schemas/applicationKeys.json +34 -0
  95. data/schemas/applicationPatch.json +10 -5
  96. data/schemas/applicationPost.json +14 -5
  97. data/schemas/applicationReadme.json +29 -0
  98. data/schemas/applicationReadmePatch.json +11 -0
  99. data/schemas/applicationTemplate.json +99 -0
  100. data/schemas/applicationTemplates.json +140 -0
  101. data/schemas/applications.json +10 -5
  102. data/schemas/authedDevice.json +34 -0
  103. data/schemas/dashboard.json +1228 -144
  104. data/schemas/dashboardPatch.json +1228 -144
  105. data/schemas/dashboardPost.json +1228 -144
  106. data/schemas/dashboards.json +1228 -144
  107. data/schemas/dataExport.json +11 -0
  108. data/schemas/dataTableRows.json +3 -0
  109. data/schemas/dataTableRowsExport.json +37 -3
  110. data/schemas/device.json +16 -3
  111. data/schemas/devicePatch.json +16 -3
  112. data/schemas/devicePost.json +16 -3
  113. data/schemas/deviceRecipe.json +16 -3
  114. data/schemas/deviceRecipePatch.json +16 -3
  115. data/schemas/deviceRecipePost.json +16 -3
  116. data/schemas/deviceRecipes.json +16 -3
  117. data/schemas/devices.json +19 -3
  118. data/schemas/devicesDataRemoved.json +12 -0
  119. data/schemas/devicesDeletePost.json +1034 -0
  120. data/schemas/devicesDeleted.json +12 -0
  121. data/schemas/devicesExportPost.json +1035 -0
  122. data/schemas/devicesPatch.json +1773 -7
  123. data/schemas/devicesRemoveDataPost.json +1056 -0
  124. data/schemas/devicesUpdated.json +18 -0
  125. data/schemas/events.json +1 -816
  126. data/schemas/eventsExport.json +382 -13
  127. data/schemas/experienceGroup.json +7 -0
  128. data/schemas/experienceGroupPatch.json +7 -0
  129. data/schemas/experienceGroupPost.json +7 -0
  130. data/schemas/experienceGroups.json +7 -0
  131. data/schemas/experienceLinkedResources.json +6659 -0
  132. data/schemas/flow.json +103 -1
  133. data/schemas/flowPatch.json +103 -1
  134. data/schemas/flowPost.json +103 -1
  135. data/schemas/flowVersion.json +206 -2
  136. data/schemas/flowVersionPost.json +103 -1
  137. data/schemas/flowVersions.json +206 -2
  138. data/schemas/flows.json +103 -1
  139. data/schemas/flowsImportPost.json +206 -2
  140. data/schemas/flowsImportResult.json +309 -3
  141. data/schemas/githubLogin.json +9 -0
  142. data/schemas/integration.json +4 -4
  143. data/schemas/integrationPatch.json +4 -4
  144. data/schemas/integrationPost.json +4 -4
  145. data/schemas/integrations.json +4 -4
  146. data/schemas/{applicationCloneEnqueued.json → jobEnqueuedResult.json} +0 -0
  147. data/schemas/me.json +3 -0
  148. data/schemas/multiDeviceCommand.json +1019 -0
  149. data/schemas/notebook.json +207 -35
  150. data/schemas/notebookDataExportOptions.json +4 -0
  151. data/schemas/notebookExecutionLogs.json +4 -0
  152. data/schemas/notebookExecutionOptions.json +4 -0
  153. data/schemas/notebookPatch.json +207 -35
  154. data/schemas/notebookPost.json +207 -35
  155. data/schemas/notebooks.json +207 -35
  156. data/schemas/org.json +8 -0
  157. data/schemas/orgPatch.json +9 -0
  158. data/schemas/orgs.json +8 -0
  159. data/schemas/samlResponse.json +21 -0
  160. data/schemas/ssoRequest.json +20 -0
  161. data/schemas/timeSeriesData.json +91 -12
  162. data/schemas/timeSeriesQuery.json +21 -12
  163. data/schemas/userCredentials.json +9 -0
  164. data/schemas/userPost.json +9 -0
  165. data/schemas/{validationCloneErrors.json → validationErrors.json} +9 -2
  166. metadata +24 -7
@@ -54,17 +54,38 @@
54
54
  ]
55
55
  },
56
56
  "fileName": {
57
- "type": "string",
58
- "pattern": "^[0-9a-zA-Z_.-]{1,255}$"
57
+ "oneOf": [
58
+ {
59
+ "type": "string",
60
+ "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$"
61
+ },
62
+ {
63
+ "type": "string",
64
+ "minLength": 4,
65
+ "maxLength": 255,
66
+ "pattern": ".*{{.+}}.*"
67
+ }
68
+ ]
59
69
  },
60
70
  "deviceTags": {
61
71
  "type": "array",
72
+ "maxItems": 100,
62
73
  "items": {
63
74
  "type": "object",
64
75
  "properties": {
65
76
  "key": {
66
- "type": "string",
67
- "pattern": "^[0-9a-zA-Z_-]{1,255}$"
77
+ "oneOf": [
78
+ {
79
+ "type": "string",
80
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
81
+ },
82
+ {
83
+ "type": "string",
84
+ "minLength": 4,
85
+ "maxLength": 255,
86
+ "pattern": ".*{{.+}}.*"
87
+ }
88
+ ]
68
89
  },
69
90
  "value": {
70
91
  "type": "string",
@@ -73,16 +94,29 @@
73
94
  }
74
95
  },
75
96
  "additionalProperties": false
76
- },
77
- "maxItems": 100
97
+ }
78
98
  },
79
99
  "deviceIds": {
80
100
  "type": "array",
101
+ "maxItems": 100,
81
102
  "items": {
82
- "type": "string",
83
- "pattern": "^[A-Fa-f\\d]{24}$"
84
- },
85
- "maxItems": 1000
103
+ "oneOf": [
104
+ {
105
+ "type": "string",
106
+ "pattern": "^[A-Fa-f\\d]{24}$"
107
+ },
108
+ {
109
+ "type": "string",
110
+ "minLength": 4,
111
+ "maxLength": 255,
112
+ "pattern": ".*{{.+}}.*"
113
+ }
114
+ ]
115
+ }
116
+ },
117
+ "queryJson": {
118
+ "type": "string",
119
+ "maxLength": 8192
86
120
  },
87
121
  "attributes": {
88
122
  "type": "array",
@@ -117,17 +151,38 @@
117
151
  ]
118
152
  },
119
153
  "fileName": {
120
- "type": "string",
121
- "pattern": "^[0-9a-zA-Z_.-]{1,255}$"
154
+ "oneOf": [
155
+ {
156
+ "type": "string",
157
+ "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$"
158
+ },
159
+ {
160
+ "type": "string",
161
+ "minLength": 4,
162
+ "maxLength": 255,
163
+ "pattern": ".*{{.+}}.*"
164
+ }
165
+ ]
122
166
  },
123
167
  "deviceTags": {
124
168
  "type": "array",
169
+ "maxItems": 100,
125
170
  "items": {
126
171
  "type": "object",
127
172
  "properties": {
128
173
  "key": {
129
- "type": "string",
130
- "pattern": "^[0-9a-zA-Z_-]{1,255}$"
174
+ "oneOf": [
175
+ {
176
+ "type": "string",
177
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
178
+ },
179
+ {
180
+ "type": "string",
181
+ "minLength": 4,
182
+ "maxLength": 255,
183
+ "pattern": ".*{{.+}}.*"
184
+ }
185
+ ]
131
186
  },
132
187
  "value": {
133
188
  "type": "string",
@@ -136,16 +191,29 @@
136
191
  }
137
192
  },
138
193
  "additionalProperties": false
139
- },
140
- "maxItems": 100
194
+ }
141
195
  },
142
196
  "deviceIds": {
143
197
  "type": "array",
198
+ "maxItems": 100,
144
199
  "items": {
145
- "type": "string",
146
- "pattern": "^[A-Fa-f\\d]{24}$"
147
- },
148
- "maxItems": 1000
200
+ "oneOf": [
201
+ {
202
+ "type": "string",
203
+ "pattern": "^[A-Fa-f\\d]{24}$"
204
+ },
205
+ {
206
+ "type": "string",
207
+ "minLength": 4,
208
+ "maxLength": 255,
209
+ "pattern": ".*{{.+}}.*"
210
+ }
211
+ ]
212
+ }
213
+ },
214
+ "queryJson": {
215
+ "type": "string",
216
+ "maxLength": 8192
149
217
  }
150
218
  },
151
219
  "required": [
@@ -164,16 +232,36 @@
164
232
  ]
165
233
  },
166
234
  "fileName": {
167
- "type": "string",
168
- "pattern": "^[0-9a-zA-Z_.-]{1,255}$"
235
+ "oneOf": [
236
+ {
237
+ "type": "string",
238
+ "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$"
239
+ },
240
+ {
241
+ "type": "string",
242
+ "minLength": 4,
243
+ "maxLength": 255,
244
+ "pattern": ".*{{.+}}.*"
245
+ }
246
+ ]
169
247
  },
170
248
  "dataTableId": {
171
- "type": "string",
172
- "pattern": "^[A-Fa-f\\d]{24}$"
249
+ "oneOf": [
250
+ {
251
+ "type": "string",
252
+ "pattern": "^[A-Fa-f\\d]{24}$"
253
+ },
254
+ {
255
+ "type": "string",
256
+ "minLength": 4,
257
+ "maxLength": 255,
258
+ "pattern": ".*{{.+}}.*"
259
+ }
260
+ ]
173
261
  },
174
262
  "queryJson": {
175
263
  "type": "string",
176
- "maxLength": 32767
264
+ "maxLength": 8192
177
265
  }
178
266
  },
179
267
  "required": [
@@ -189,12 +277,56 @@
189
277
  "inputType": {
190
278
  "type": "string",
191
279
  "enum": [
192
- "externalUrl"
280
+ "eventData"
193
281
  ]
194
282
  },
195
283
  "fileName": {
284
+ "oneOf": [
285
+ {
286
+ "type": "string",
287
+ "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$"
288
+ },
289
+ {
290
+ "type": "string",
291
+ "minLength": 4,
292
+ "maxLength": 255,
293
+ "pattern": ".*{{.+}}.*"
294
+ }
295
+ ]
296
+ },
297
+ "queryJson": {
196
298
  "type": "string",
197
- "pattern": "^[0-9a-zA-Z_.-]{1,255}$"
299
+ "maxLength": 8192
300
+ }
301
+ },
302
+ "required": [
303
+ "inputType",
304
+ "fileName"
305
+ ],
306
+ "additionalProperties": false
307
+ },
308
+ {
309
+ "type": "object",
310
+ "properties": {
311
+ "inputType": {
312
+ "type": "string",
313
+ "enum": [
314
+ "externalUrl"
315
+ ]
316
+ },
317
+ "fileName": {
318
+ "oneOf": [
319
+ {
320
+ "type": "string",
321
+ "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$"
322
+ },
323
+ {
324
+ "type": "string",
325
+ "minLength": 4,
326
+ "maxLength": 255,
327
+ "pattern": ".*{{.+}}.*"
328
+ }
329
+ ]
198
330
  },
199
331
  "sourceUrl": {
200
332
  "type": "string",
@@ -227,12 +359,32 @@
227
359
  ]
228
360
  },
229
361
  "fileName": {
230
- "type": "string",
231
- "pattern": "^[0-9a-zA-Z_.-]{1,255}$"
362
+ "oneOf": [
363
+ {
364
+ "type": "string",
365
+ "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$"
366
+ },
367
+ {
368
+ "type": "string",
369
+ "minLength": 4,
370
+ "maxLength": 255,
371
+ "pattern": ".*{{.+}}.*"
372
+ }
373
+ ]
232
374
  },
233
375
  "dataTableId": {
234
- "type": "string",
235
- "pattern": "^[A-Fa-f\\d]{24}$"
376
+ "oneOf": [
377
+ {
378
+ "type": "string",
379
+ "pattern": "^[A-Fa-f\\d]{24}$"
380
+ },
381
+ {
382
+ "type": "string",
383
+ "minLength": 4,
384
+ "maxLength": 255,
385
+ "pattern": ".*{{.+}}.*"
386
+ }
387
+ ]
236
388
  },
237
389
  "createMissingColumns": {
238
390
  "type": "boolean"
@@ -258,8 +410,18 @@
258
410
  ]
259
411
  },
260
412
  "fileName": {
261
- "type": "string",
262
- "pattern": "^[0-9a-zA-Z_.-]{1,255}$"
413
+ "oneOf": [
414
+ {
415
+ "type": "string",
416
+ "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$"
417
+ },
418
+ {
419
+ "type": "string",
420
+ "minLength": 4,
421
+ "maxLength": 255,
422
+ "pattern": ".*{{.+}}.*"
423
+ }
424
+ ]
263
425
  },
264
426
  "destinationDirectoryTemplate": {
265
427
  "type": "string",
@@ -289,8 +451,18 @@
289
451
  ]
290
452
  },
291
453
  "directoryName": {
292
- "type": "string",
293
- "pattern": "^[0-9a-zA-Z_.-]{1,255}$"
454
+ "oneOf": [
455
+ {
456
+ "type": "string",
457
+ "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$"
458
+ },
459
+ {
460
+ "type": "string",
461
+ "minLength": 4,
462
+ "maxLength": 255,
463
+ "pattern": ".*{{.+}}.*"
464
+ }
465
+ ]
294
466
  },
295
467
  "destinationDirectoryTemplate": {
296
468
  "type": "string",
@@ -28,6 +28,10 @@
28
28
  ]
29
29
  }
30
30
  ]
31
+ },
32
+ "templateContext": {
33
+ "type": "string",
34
+ "maxLength": 32767
31
35
  }
32
36
  },
33
37
  "additionalProperties": false
@@ -71,6 +71,10 @@
71
71
  "type": "string",
72
72
  "format": "date-time"
73
73
  },
74
+ "templateContext": {
75
+ "type": "string",
76
+ "maxLength": 32767
77
+ },
74
78
  "inputInfo": {
75
79
  "type": "object",
76
80
  "patternProperties": {
@@ -23,6 +23,10 @@
23
23
  ]
24
24
  }
25
25
  ]
26
+ },
27
+ "templateContext": {
28
+ "type": "string",
29
+ "maxLength": 32767
26
30
  }
27
31
  },
28
32
  "additionalProperties": false
@@ -26,17 +26,38 @@
26
26
  ]
27
27
  },
28
28
  "fileName": {
29
- "type": "string",
30
- "pattern": "^[0-9a-zA-Z_.-]{1,255}$"
29
+ "oneOf": [
30
+ {
31
+ "type": "string",
32
+ "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$"
33
+ },
34
+ {
35
+ "type": "string",
36
+ "minLength": 4,
37
+ "maxLength": 255,
38
+ "pattern": ".*{{.+}}.*"
39
+ }
40
+ ]
31
41
  },
32
42
  "deviceTags": {
33
43
  "type": "array",
44
+ "maxItems": 100,
34
45
  "items": {
35
46
  "type": "object",
36
47
  "properties": {
37
48
  "key": {
38
- "type": "string",
39
- "pattern": "^[0-9a-zA-Z_-]{1,255}$"
49
+ "oneOf": [
50
+ {
51
+ "type": "string",
52
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
53
+ },
54
+ {
55
+ "type": "string",
56
+ "minLength": 4,
57
+ "maxLength": 255,
58
+ "pattern": ".*{{.+}}.*"
59
+ }
60
+ ]
40
61
  },
41
62
  "value": {
42
63
  "type": "string",
@@ -45,16 +66,29 @@
45
66
  }
46
67
  },
47
68
  "additionalProperties": false
48
- },
49
- "maxItems": 100
69
+ }
50
70
  },
51
71
  "deviceIds": {
52
72
  "type": "array",
73
+ "maxItems": 100,
53
74
  "items": {
54
- "type": "string",
55
- "pattern": "^[A-Fa-f\\d]{24}$"
56
- },
57
- "maxItems": 1000
75
+ "oneOf": [
76
+ {
77
+ "type": "string",
78
+ "pattern": "^[A-Fa-f\\d]{24}$"
79
+ },
80
+ {
81
+ "type": "string",
82
+ "minLength": 4,
83
+ "maxLength": 255,
84
+ "pattern": ".*{{.+}}.*"
85
+ }
86
+ ]
87
+ }
88
+ },
89
+ "queryJson": {
90
+ "type": "string",
91
+ "maxLength": 8192
58
92
  },
59
93
  "attributes": {
60
94
  "type": "array",
@@ -89,17 +123,38 @@
89
123
  ]
90
124
  },
91
125
  "fileName": {
92
- "type": "string",
93
- "pattern": "^[0-9a-zA-Z_.-]{1,255}$"
126
+ "oneOf": [
127
+ {
128
+ "type": "string",
129
+ "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$"
130
+ },
131
+ {
132
+ "type": "string",
133
+ "minLength": 4,
134
+ "maxLength": 255,
135
+ "pattern": ".*{{.+}}.*"
136
+ }
137
+ ]
94
138
  },
95
139
  "deviceTags": {
96
140
  "type": "array",
141
+ "maxItems": 100,
97
142
  "items": {
98
143
  "type": "object",
99
144
  "properties": {
100
145
  "key": {
101
- "type": "string",
102
- "pattern": "^[0-9a-zA-Z_-]{1,255}$"
146
+ "oneOf": [
147
+ {
148
+ "type": "string",
149
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
150
+ },
151
+ {
152
+ "type": "string",
153
+ "minLength": 4,
154
+ "maxLength": 255,
155
+ "pattern": ".*{{.+}}.*"
156
+ }
157
+ ]
103
158
  },
104
159
  "value": {
105
160
  "type": "string",
@@ -108,16 +163,29 @@
108
163
  }
109
164
  },
110
165
  "additionalProperties": false
111
- },
112
- "maxItems": 100
166
+ }
113
167
  },
114
168
  "deviceIds": {
115
169
  "type": "array",
170
+ "maxItems": 100,
116
171
  "items": {
117
- "type": "string",
118
- "pattern": "^[A-Fa-f\\d]{24}$"
119
- },
120
- "maxItems": 1000
172
+ "oneOf": [
173
+ {
174
+ "type": "string",
175
+ "pattern": "^[A-Fa-f\\d]{24}$"
176
+ },
177
+ {
178
+ "type": "string",
179
+ "minLength": 4,
180
+ "maxLength": 255,
181
+ "pattern": ".*{{.+}}.*"
182
+ }
183
+ ]
184
+ }
185
+ },
186
+ "queryJson": {
187
+ "type": "string",
188
+ "maxLength": 8192
121
189
  }
122
190
  },
123
191
  "required": [
@@ -136,16 +204,36 @@
136
204
  ]
137
205
  },
138
206
  "fileName": {
139
- "type": "string",
140
- "pattern": "^[0-9a-zA-Z_.-]{1,255}$"
207
+ "oneOf": [
208
+ {
209
+ "type": "string",
210
+ "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$"
211
+ },
212
+ {
213
+ "type": "string",
214
+ "minLength": 4,
215
+ "maxLength": 255,
216
+ "pattern": ".*{{.+}}.*"
217
+ }
218
+ ]
141
219
  },
142
220
  "dataTableId": {
143
- "type": "string",
144
- "pattern": "^[A-Fa-f\\d]{24}$"
221
+ "oneOf": [
222
+ {
223
+ "type": "string",
224
+ "pattern": "^[A-Fa-f\\d]{24}$"
225
+ },
226
+ {
227
+ "type": "string",
228
+ "minLength": 4,
229
+ "maxLength": 255,
230
+ "pattern": ".*{{.+}}.*"
231
+ }
232
+ ]
145
233
  },
146
234
  "queryJson": {
147
235
  "type": "string",
148
- "maxLength": 32767
236
+ "maxLength": 8192
149
237
  }
150
238
  },
151
239
  "required": [
@@ -161,12 +249,56 @@
161
249
  "inputType": {
162
250
  "type": "string",
163
251
  "enum": [
164
- "externalUrl"
252
+ "eventData"
165
253
  ]
166
254
  },
167
255
  "fileName": {
256
+ "oneOf": [
257
+ {
258
+ "type": "string",
259
+ "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$"
260
+ },
261
+ {
262
+ "type": "string",
263
+ "minLength": 4,
264
+ "maxLength": 255,
265
+ "pattern": ".*{{.+}}.*"
266
+ }
267
+ ]
268
+ },
269
+ "queryJson": {
168
270
  "type": "string",
169
- "pattern": "^[0-9a-zA-Z_.-]{1,255}$"
271
+ "maxLength": 8192
272
+ }
273
+ },
274
+ "required": [
275
+ "inputType",
276
+ "fileName"
277
+ ],
278
+ "additionalProperties": false
279
+ },
280
+ {
281
+ "type": "object",
282
+ "properties": {
283
+ "inputType": {
284
+ "type": "string",
285
+ "enum": [
286
+ "externalUrl"
287
+ ]
288
+ },
289
+ "fileName": {
290
+ "oneOf": [
291
+ {
292
+ "type": "string",
293
+ "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$"
294
+ },
295
+ {
296
+ "type": "string",
297
+ "minLength": 4,
298
+ "maxLength": 255,
299
+ "pattern": ".*{{.+}}.*"
300
+ }
301
+ ]
170
302
  },
171
303
  "sourceUrl": {
172
304
  "type": "string",
@@ -199,12 +331,32 @@
199
331
  ]
200
332
  },
201
333
  "fileName": {
202
- "type": "string",
203
- "pattern": "^[0-9a-zA-Z_.-]{1,255}$"
334
+ "oneOf": [
335
+ {
336
+ "type": "string",
337
+ "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$"
338
+ },
339
+ {
340
+ "type": "string",
341
+ "minLength": 4,
342
+ "maxLength": 255,
343
+ "pattern": ".*{{.+}}.*"
344
+ }
345
+ ]
204
346
  },
205
347
  "dataTableId": {
206
- "type": "string",
207
- "pattern": "^[A-Fa-f\\d]{24}$"
348
+ "oneOf": [
349
+ {
350
+ "type": "string",
351
+ "pattern": "^[A-Fa-f\\d]{24}$"
352
+ },
353
+ {
354
+ "type": "string",
355
+ "minLength": 4,
356
+ "maxLength": 255,
357
+ "pattern": ".*{{.+}}.*"
358
+ }
359
+ ]
208
360
  },
209
361
  "createMissingColumns": {
210
362
  "type": "boolean"
@@ -230,8 +382,18 @@
230
382
  ]
231
383
  },
232
384
  "fileName": {
233
- "type": "string",
234
- "pattern": "^[0-9a-zA-Z_.-]{1,255}$"
385
+ "oneOf": [
386
+ {
387
+ "type": "string",
388
+ "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$"
389
+ },
390
+ {
391
+ "type": "string",
392
+ "minLength": 4,
393
+ "maxLength": 255,
394
+ "pattern": ".*{{.+}}.*"
395
+ }
396
+ ]
235
397
  },
236
398
  "destinationDirectoryTemplate": {
237
399
  "type": "string",
@@ -261,8 +423,18 @@
261
423
  ]
262
424
  },
263
425
  "directoryName": {
264
- "type": "string",
265
- "pattern": "^[0-9a-zA-Z_.-]{1,255}$"
426
+ "oneOf": [
427
+ {
428
+ "type": "string",
429
+ "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$"
430
+ },
431
+ {
432
+ "type": "string",
433
+ "minLength": 4,
434
+ "maxLength": 255,
435
+ "pattern": ".*{{.+}}.*"
436
+ }
437
+ ]
266
438
  },
267
439
  "destinationDirectoryTemplate": {
268
440
  "type": "string",