losant_rest 1.11.1 → 1.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/docs/_schemas.md +17165 -8770
  3. data/docs/application.md +41 -0
  4. data/docs/applicationDashboard.md +133 -0
  5. data/docs/applicationDashboards.md +93 -0
  6. data/docs/applicationKeys.md +3 -2
  7. data/docs/experienceEndpoint.md +1 -0
  8. data/docs/flows.md +1 -0
  9. data/docs/integration.md +1 -0
  10. data/docs/webhook.md +1 -0
  11. data/lib/losant_rest.rb +2 -0
  12. data/lib/losant_rest/application.rb +47 -0
  13. data/lib/losant_rest/application_dashboard.rb +176 -0
  14. data/lib/losant_rest/application_dashboards.rb +138 -0
  15. data/lib/losant_rest/application_keys.rb +3 -0
  16. data/lib/losant_rest/client.rb +10 -2
  17. data/lib/losant_rest/experience_endpoint.rb +2 -0
  18. data/lib/losant_rest/flows.rb +2 -0
  19. data/lib/losant_rest/integration.rb +2 -0
  20. data/lib/losant_rest/version.rb +1 -1
  21. data/lib/losant_rest/webhook.rb +2 -0
  22. data/schemas/advancedApplicationKeyQuery.json +1082 -0
  23. data/schemas/advancedFlowQuery.json +218 -0
  24. data/schemas/advancedFlowVersionQuery.json +218 -0
  25. data/schemas/applicationApiTokenPost.json +7 -0
  26. data/schemas/applicationDashboardPost.json +5665 -0
  27. data/schemas/applicationGlobalPatch.json +33 -0
  28. data/schemas/dashboard.json +28 -1
  29. data/schemas/dashboardPatch.json +28 -1
  30. data/schemas/dashboardPost.json +28 -1
  31. data/schemas/dashboards.json +28 -1
  32. data/schemas/files.json +3 -0
  33. data/schemas/githubLogin.json +18 -0
  34. data/schemas/instance.json +132 -0
  35. data/schemas/instanceOrg.json +119 -0
  36. data/schemas/instanceOrgPatch.json +103 -0
  37. data/schemas/instanceOrgPost.json +114 -0
  38. data/schemas/instanceOrgs.json +160 -0
  39. data/schemas/instances.json +43 -0
  40. data/schemas/userCredentials.json +18 -0
  41. data/schemas/userPost.json +18 -0
  42. metadata +16 -3
@@ -0,0 +1,138 @@
1
+ # The MIT License (MIT)
2
+ #
3
+ # Copyright (c) 2020 Losant IoT, Inc.
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in all
13
+ # copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ # SOFTWARE.
22
+
23
+ require "json"
24
+
25
+ module LosantRest
26
+
27
+ # Class containing all the actions for the Application Dashboards Resource
28
+ class ApplicationDashboards
29
+
30
+ def initialize(client)
31
+ @client = client
32
+ end
33
+
34
+ # Returns all dashboards scoped to the given application.
35
+ #
36
+ # Authentication:
37
+ # The client must be configured with a valid api
38
+ # access token to call this action. The token
39
+ # must include at least one of the following scopes:
40
+ # all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, applicationDashboards.*, or applicationDashboards.get.
41
+ #
42
+ # Parameters:
43
+ # * {string} applicationId - ID associated with the application
44
+ # * {string} sortField - Field to sort the results by. Accepted values are: name, id, creationDate
45
+ # * {string} sortDirection - Direction to sort the results by. Accepted values are: asc, desc
46
+ # * {string} page - Which page of results to return
47
+ # * {string} perPage - How many items to return per page
48
+ # * {string} filterField - Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name
49
+ # * {string} filter - Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering.
50
+ # * {string} losantdomain - Domain scope of request (rarely needed)
51
+ # * {boolean} _actions - Return resource actions in response
52
+ # * {boolean} _links - Return resource link in response
53
+ # * {boolean} _embedded - Return embedded resources in response
54
+ #
55
+ # Responses:
56
+ # * 200 - Collection of dashboards (https://api.losant.com/#/definitions/dashboards)
57
+ #
58
+ # Errors:
59
+ # * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
60
+ # * 404 - Error if application was not found (https://api.losant.com/#/definitions/error)
61
+ def get(params = {})
62
+ params = Utils.symbolize_hash_keys(params)
63
+ query_params = { _actions: false, _links: true, _embedded: true }
64
+ headers = {}
65
+ body = nil
66
+
67
+ raise ArgumentError.new("applicationId is required") unless params.has_key?(:applicationId)
68
+
69
+ query_params[:sortField] = params[:sortField] if params.has_key?(:sortField)
70
+ query_params[:sortDirection] = params[:sortDirection] if params.has_key?(:sortDirection)
71
+ query_params[:page] = params[:page] if params.has_key?(:page)
72
+ query_params[:perPage] = params[:perPage] if params.has_key?(:perPage)
73
+ query_params[:filterField] = params[:filterField] if params.has_key?(:filterField)
74
+ query_params[:filter] = params[:filter] if params.has_key?(:filter)
75
+ headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
76
+ query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
77
+ query_params[:_links] = params[:_links] if params.has_key?(:_links)
78
+ query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
79
+
80
+ path = "/applications/#{params[:applicationId]}/dashboards"
81
+
82
+ @client.request(
83
+ method: :get,
84
+ path: path,
85
+ query: query_params,
86
+ headers: headers,
87
+ body: body)
88
+ end
89
+
90
+ # Create a new dashboard
91
+ #
92
+ # Authentication:
93
+ # The client must be configured with a valid api
94
+ # access token to call this action. The token
95
+ # must include at least one of the following scopes:
96
+ # all.Application, all.Organization, all.User, applicationDashboards.*, or applicationDashboards.post.
97
+ #
98
+ # Parameters:
99
+ # * {string} applicationId - ID associated with the application
100
+ # * {hash} dashboard - New dashboard information (https://api.losant.com/#/definitions/applicationDashboardPost)
101
+ # * {string} losantdomain - Domain scope of request (rarely needed)
102
+ # * {boolean} _actions - Return resource actions in response
103
+ # * {boolean} _links - Return resource link in response
104
+ # * {boolean} _embedded - Return embedded resources in response
105
+ #
106
+ # Responses:
107
+ # * 201 - Successfully created dashboard (https://api.losant.com/#/definitions/dashboard)
108
+ #
109
+ # Errors:
110
+ # * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
111
+ # * 404 - Error if application was not found (https://api.losant.com/#/definitions/error)
112
+ def post(params = {})
113
+ params = Utils.symbolize_hash_keys(params)
114
+ query_params = { _actions: false, _links: true, _embedded: true }
115
+ headers = {}
116
+ body = nil
117
+
118
+ raise ArgumentError.new("applicationId is required") unless params.has_key?(:applicationId)
119
+ raise ArgumentError.new("dashboard is required") unless params.has_key?(:dashboard)
120
+
121
+ body = params[:dashboard] if params.has_key?(:dashboard)
122
+ headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
123
+ query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
124
+ query_params[:_links] = params[:_links] if params.has_key?(:_links)
125
+ query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
126
+
127
+ path = "/applications/#{params[:applicationId]}/dashboards"
128
+
129
+ @client.request(
130
+ method: :post,
131
+ path: path,
132
+ query: query_params,
133
+ headers: headers,
134
+ body: body)
135
+ end
136
+
137
+ end
138
+ end
@@ -47,6 +47,7 @@ module LosantRest
47
47
  # * {string} perPage - How many items to return per page
48
48
  # * {string} filterField - Field to filter the results by. Blank or not provided means no filtering. Accepted values are: key, status
49
49
  # * {string} filter - Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering.
50
+ # * {hash} query - Application key filter JSON object which overrides the filterField and filter parameters. (https://api.losant.com/#/definitions/advancedApplicationKeyQuery)
50
51
  # * {string} losantdomain - Domain scope of request (rarely needed)
51
52
  # * {boolean} _actions - Return resource actions in response
52
53
  # * {boolean} _links - Return resource link in response
@@ -72,6 +73,8 @@ module LosantRest
72
73
  query_params[:perPage] = params[:perPage] if params.has_key?(:perPage)
73
74
  query_params[:filterField] = params[:filterField] if params.has_key?(:filterField)
74
75
  query_params[:filter] = params[:filter] if params.has_key?(:filter)
76
+ query_params[:query] = params[:query] if params.has_key?(:query)
77
+ query_params[:query] = JSON.dump(query_params[:query]) if query_params.has_key?(:query)
75
78
  headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
76
79
  query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
77
80
  query_params[:_links] = params[:_links] if params.has_key?(:_links)
@@ -27,7 +27,7 @@ module LosantRest
27
27
  #
28
28
  # User API for accessing Losant data
29
29
  #
30
- # Built For Version 1.18.1
30
+ # Built For Version 1.19.0
31
31
  class Client
32
32
  attr_accessor :auth_token, :url
33
33
 
@@ -64,6 +64,14 @@ module LosantRest
64
64
  @application_certificates ||= ApplicationCertificates.new(self)
65
65
  end
66
66
 
67
+ def application_dashboard
68
+ @application_dashboard ||= ApplicationDashboard.new(self)
69
+ end
70
+
71
+ def application_dashboards
72
+ @application_dashboards ||= ApplicationDashboards.new(self)
73
+ end
74
+
67
75
  def application_key
68
76
  @application_key ||= ApplicationKey.new(self)
69
77
  end
@@ -282,7 +290,7 @@ module LosantRest
282
290
 
283
291
  headers["Accept"] = "application/json"
284
292
  headers["Content-Type"] = "application/json"
285
- headers["Accept-Version"] = "^1.18.1"
293
+ headers["Accept-Version"] = "^1.19.0"
286
294
  headers["Authorization"] = "Bearer #{self.auth_token}" if self.auth_token
287
295
  path = self.url + options.fetch(:path, "")
288
296
 
@@ -42,6 +42,7 @@ module LosantRest
42
42
  # Parameters:
43
43
  # * {string} applicationId - ID associated with the application
44
44
  # * {string} experienceEndpointId - ID associated with the experience endpoint
45
+ # * {string} includeWorkflows - If the workflows that utilize this experience endpoint should also be deleted.
45
46
  # * {string} losantdomain - Domain scope of request (rarely needed)
46
47
  # * {boolean} _actions - Return resource actions in response
47
48
  # * {boolean} _links - Return resource link in response
@@ -62,6 +63,7 @@ module LosantRest
62
63
  raise ArgumentError.new("applicationId is required") unless params.has_key?(:applicationId)
63
64
  raise ArgumentError.new("experienceEndpointId is required") unless params.has_key?(:experienceEndpointId)
64
65
 
66
+ query_params[:includeWorkflows] = params[:includeWorkflows] if params.has_key?(:includeWorkflows)
65
67
  headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
66
68
  query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
67
69
  query_params[:_links] = params[:_links] if params.has_key?(:_links)
@@ -51,6 +51,7 @@ module LosantRest
51
51
  # * {hash} triggerFilter - Array of triggers to filter by - always filters against default flow version. (https://api.losant.com/#/definitions/flowTriggerFilter)
52
52
  # * {string} includeCustomNodes - If the result of the request should also include the details of any custom nodes referenced by the returned workflows
53
53
  # * {hash} query - Workflow filter JSON object which overrides the filterField, filter, triggerFilter, and flowClass parameters. (https://api.losant.com/#/definitions/advancedFlowQuery)
54
+ # * {string} allVersions - If the request should also return flows with matching versions. Only applicable for requests with an advanced query.
54
55
  # * {string} losantdomain - Domain scope of request (rarely needed)
55
56
  # * {boolean} _actions - Return resource actions in response
56
57
  # * {boolean} _links - Return resource link in response
@@ -81,6 +82,7 @@ module LosantRest
81
82
  query_params[:includeCustomNodes] = params[:includeCustomNodes] if params.has_key?(:includeCustomNodes)
82
83
  query_params[:query] = params[:query] if params.has_key?(:query)
83
84
  query_params[:query] = JSON.dump(query_params[:query]) if query_params.has_key?(:query)
85
+ query_params[:allVersions] = params[:allVersions] if params.has_key?(:allVersions)
84
86
  headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
85
87
  query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
86
88
  query_params[:_links] = params[:_links] if params.has_key?(:_links)
@@ -42,6 +42,7 @@ module LosantRest
42
42
  # Parameters:
43
43
  # * {string} applicationId - ID associated with the application
44
44
  # * {string} integrationId - ID associated with the integration
45
+ # * {string} includeWorkflows - If the workflows that utilize this integration should also be deleted.
45
46
  # * {string} losantdomain - Domain scope of request (rarely needed)
46
47
  # * {boolean} _actions - Return resource actions in response
47
48
  # * {boolean} _links - Return resource link in response
@@ -62,6 +63,7 @@ module LosantRest
62
63
  raise ArgumentError.new("applicationId is required") unless params.has_key?(:applicationId)
63
64
  raise ArgumentError.new("integrationId is required") unless params.has_key?(:integrationId)
64
65
 
66
+ query_params[:includeWorkflows] = params[:includeWorkflows] if params.has_key?(:includeWorkflows)
65
67
  headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
66
68
  query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
67
69
  query_params[:_links] = params[:_links] if params.has_key?(:_links)
@@ -21,5 +21,5 @@
21
21
  # SOFTWARE.
22
22
 
23
23
  module LosantRest
24
- VERSION = "1.11.1"
24
+ VERSION = "1.12.0"
25
25
  end
@@ -42,6 +42,7 @@ module LosantRest
42
42
  # Parameters:
43
43
  # * {string} applicationId - ID associated with the application
44
44
  # * {string} webhookId - ID associated with the webhook
45
+ # * {string} includeWorkflows - If the workflows that utilize this webhook should also be deleted.
45
46
  # * {string} losantdomain - Domain scope of request (rarely needed)
46
47
  # * {boolean} _actions - Return resource actions in response
47
48
  # * {boolean} _links - Return resource link in response
@@ -62,6 +63,7 @@ module LosantRest
62
63
  raise ArgumentError.new("applicationId is required") unless params.has_key?(:applicationId)
63
64
  raise ArgumentError.new("webhookId is required") unless params.has_key?(:webhookId)
64
65
 
66
+ query_params[:includeWorkflows] = params[:includeWorkflows] if params.has_key?(:includeWorkflows)
65
67
  headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
66
68
  query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
67
69
  query_params[:_links] = params[:_links] if params.has_key?(:_links)
@@ -0,0 +1,1082 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "$and": {
6
+ "type": "array",
7
+ "items": {
8
+ "$ref": "#/definitions/advancedApplicationKeyQuery"
9
+ },
10
+ "maxItems": 100
11
+ },
12
+ "$or": {
13
+ "type": "array",
14
+ "items": {
15
+ "$ref": "#/definitions/advancedApplicationKeyQuery"
16
+ },
17
+ "maxItems": 100
18
+ },
19
+ "$nor": {
20
+ "type": "array",
21
+ "items": {
22
+ "$ref": "#/definitions/advancedApplicationKeyQuery"
23
+ },
24
+ "maxItems": 100
25
+ },
26
+ "id": {
27
+ "oneOf": [
28
+ {
29
+ "oneOf": [
30
+ {
31
+ "type": "string",
32
+ "pattern": "^[A-Fa-f\\d]{24}$"
33
+ },
34
+ {
35
+ "type": "null"
36
+ }
37
+ ]
38
+ },
39
+ {
40
+ "type": "object",
41
+ "properties": {
42
+ "$eq": {
43
+ "oneOf": [
44
+ {
45
+ "type": "string",
46
+ "pattern": "^[A-Fa-f\\d]{24}$"
47
+ },
48
+ {
49
+ "type": "null"
50
+ }
51
+ ]
52
+ },
53
+ "$ne": {
54
+ "oneOf": [
55
+ {
56
+ "type": "string",
57
+ "pattern": "^[A-Fa-f\\d]{24}$"
58
+ },
59
+ {
60
+ "type": "null"
61
+ }
62
+ ]
63
+ },
64
+ "$in": {
65
+ "type": "array",
66
+ "maxItems": 100,
67
+ "items": {
68
+ "type": "string",
69
+ "pattern": "^[A-Fa-f\\d]{24}$"
70
+ }
71
+ },
72
+ "$nin": {
73
+ "type": "array",
74
+ "maxItems": 100,
75
+ "items": {
76
+ "type": "string",
77
+ "pattern": "^[A-Fa-f\\d]{24}$"
78
+ }
79
+ }
80
+ },
81
+ "additionalProperties": false,
82
+ "minProperties": 1,
83
+ "maxProperties": 1
84
+ }
85
+ ]
86
+ },
87
+ "creationDate": {
88
+ "oneOf": [
89
+ {
90
+ "type": [
91
+ "string",
92
+ "number",
93
+ "boolean",
94
+ "null"
95
+ ]
96
+ },
97
+ {
98
+ "type": "object",
99
+ "properties": {
100
+ "$eq": {
101
+ "type": [
102
+ "string",
103
+ "number",
104
+ "boolean",
105
+ "null"
106
+ ]
107
+ },
108
+ "$ne": {
109
+ "type": [
110
+ "string",
111
+ "number",
112
+ "boolean",
113
+ "null"
114
+ ]
115
+ },
116
+ "$gt": {
117
+ "type": [
118
+ "string",
119
+ "number",
120
+ "boolean",
121
+ "null"
122
+ ]
123
+ },
124
+ "$lt": {
125
+ "type": [
126
+ "string",
127
+ "number",
128
+ "boolean",
129
+ "null"
130
+ ]
131
+ },
132
+ "$gte": {
133
+ "type": [
134
+ "string",
135
+ "number",
136
+ "boolean",
137
+ "null"
138
+ ]
139
+ },
140
+ "$lte": {
141
+ "type": [
142
+ "string",
143
+ "number",
144
+ "boolean",
145
+ "null"
146
+ ]
147
+ },
148
+ "$startsWith": {
149
+ "type": "string",
150
+ "minLength": 1
151
+ },
152
+ "$endsWith": {
153
+ "type": "string",
154
+ "minLength": 1
155
+ },
156
+ "$contains": {
157
+ "type": "string",
158
+ "minLength": 1
159
+ },
160
+ "$ci": {
161
+ "type": "boolean"
162
+ },
163
+ "$in": {
164
+ "type": "array",
165
+ "maxItems": 100,
166
+ "items": {
167
+ "type": [
168
+ "string",
169
+ "number",
170
+ "boolean"
171
+ ]
172
+ }
173
+ },
174
+ "$nin": {
175
+ "type": "array",
176
+ "maxItems": 100,
177
+ "items": {
178
+ "type": [
179
+ "string",
180
+ "number",
181
+ "boolean"
182
+ ]
183
+ }
184
+ }
185
+ },
186
+ "additionalProperties": false
187
+ }
188
+ ]
189
+ },
190
+ "lastUpdated": {
191
+ "oneOf": [
192
+ {
193
+ "type": [
194
+ "string",
195
+ "number",
196
+ "boolean",
197
+ "null"
198
+ ]
199
+ },
200
+ {
201
+ "type": "object",
202
+ "properties": {
203
+ "$eq": {
204
+ "type": [
205
+ "string",
206
+ "number",
207
+ "boolean",
208
+ "null"
209
+ ]
210
+ },
211
+ "$ne": {
212
+ "type": [
213
+ "string",
214
+ "number",
215
+ "boolean",
216
+ "null"
217
+ ]
218
+ },
219
+ "$gt": {
220
+ "type": [
221
+ "string",
222
+ "number",
223
+ "boolean",
224
+ "null"
225
+ ]
226
+ },
227
+ "$lt": {
228
+ "type": [
229
+ "string",
230
+ "number",
231
+ "boolean",
232
+ "null"
233
+ ]
234
+ },
235
+ "$gte": {
236
+ "type": [
237
+ "string",
238
+ "number",
239
+ "boolean",
240
+ "null"
241
+ ]
242
+ },
243
+ "$lte": {
244
+ "type": [
245
+ "string",
246
+ "number",
247
+ "boolean",
248
+ "null"
249
+ ]
250
+ },
251
+ "$startsWith": {
252
+ "type": "string",
253
+ "minLength": 1
254
+ },
255
+ "$endsWith": {
256
+ "type": "string",
257
+ "minLength": 1
258
+ },
259
+ "$contains": {
260
+ "type": "string",
261
+ "minLength": 1
262
+ },
263
+ "$ci": {
264
+ "type": "boolean"
265
+ },
266
+ "$in": {
267
+ "type": "array",
268
+ "maxItems": 100,
269
+ "items": {
270
+ "type": [
271
+ "string",
272
+ "number",
273
+ "boolean"
274
+ ]
275
+ }
276
+ },
277
+ "$nin": {
278
+ "type": "array",
279
+ "maxItems": 100,
280
+ "items": {
281
+ "type": [
282
+ "string",
283
+ "number",
284
+ "boolean"
285
+ ]
286
+ }
287
+ }
288
+ },
289
+ "additionalProperties": false
290
+ }
291
+ ]
292
+ },
293
+ "status": {
294
+ "oneOf": [
295
+ {
296
+ "type": [
297
+ "string",
298
+ "number",
299
+ "boolean",
300
+ "null"
301
+ ]
302
+ },
303
+ {
304
+ "type": "object",
305
+ "properties": {
306
+ "$eq": {
307
+ "type": [
308
+ "string",
309
+ "number",
310
+ "boolean",
311
+ "null"
312
+ ]
313
+ },
314
+ "$ne": {
315
+ "type": [
316
+ "string",
317
+ "number",
318
+ "boolean",
319
+ "null"
320
+ ]
321
+ },
322
+ "$gt": {
323
+ "type": [
324
+ "string",
325
+ "number",
326
+ "boolean",
327
+ "null"
328
+ ]
329
+ },
330
+ "$lt": {
331
+ "type": [
332
+ "string",
333
+ "number",
334
+ "boolean",
335
+ "null"
336
+ ]
337
+ },
338
+ "$gte": {
339
+ "type": [
340
+ "string",
341
+ "number",
342
+ "boolean",
343
+ "null"
344
+ ]
345
+ },
346
+ "$lte": {
347
+ "type": [
348
+ "string",
349
+ "number",
350
+ "boolean",
351
+ "null"
352
+ ]
353
+ },
354
+ "$startsWith": {
355
+ "type": "string",
356
+ "minLength": 1
357
+ },
358
+ "$endsWith": {
359
+ "type": "string",
360
+ "minLength": 1
361
+ },
362
+ "$contains": {
363
+ "type": "string",
364
+ "minLength": 1
365
+ },
366
+ "$ci": {
367
+ "type": "boolean"
368
+ },
369
+ "$in": {
370
+ "type": "array",
371
+ "maxItems": 100,
372
+ "items": {
373
+ "type": [
374
+ "string",
375
+ "number",
376
+ "boolean"
377
+ ]
378
+ }
379
+ },
380
+ "$nin": {
381
+ "type": "array",
382
+ "maxItems": 100,
383
+ "items": {
384
+ "type": [
385
+ "string",
386
+ "number",
387
+ "boolean"
388
+ ]
389
+ }
390
+ }
391
+ },
392
+ "additionalProperties": false
393
+ }
394
+ ]
395
+ },
396
+ "deviceIds": {
397
+ "oneOf": [
398
+ {
399
+ "oneOf": [
400
+ {
401
+ "type": "string",
402
+ "pattern": "^[A-Fa-f\\d]{24}$"
403
+ },
404
+ {
405
+ "type": "null"
406
+ }
407
+ ]
408
+ },
409
+ {
410
+ "type": "object",
411
+ "properties": {
412
+ "$eq": {
413
+ "oneOf": [
414
+ {
415
+ "type": "string",
416
+ "pattern": "^[A-Fa-f\\d]{24}$"
417
+ },
418
+ {
419
+ "type": "null"
420
+ }
421
+ ]
422
+ },
423
+ "$ne": {
424
+ "oneOf": [
425
+ {
426
+ "type": "string",
427
+ "pattern": "^[A-Fa-f\\d]{24}$"
428
+ },
429
+ {
430
+ "type": "null"
431
+ }
432
+ ]
433
+ },
434
+ "$in": {
435
+ "type": "array",
436
+ "maxItems": 100,
437
+ "items": {
438
+ "type": "string",
439
+ "pattern": "^[A-Fa-f\\d]{24}$"
440
+ }
441
+ },
442
+ "$nin": {
443
+ "type": "array",
444
+ "maxItems": 100,
445
+ "items": {
446
+ "type": "string",
447
+ "pattern": "^[A-Fa-f\\d]{24}$"
448
+ }
449
+ }
450
+ },
451
+ "additionalProperties": false,
452
+ "minProperties": 1,
453
+ "maxProperties": 1
454
+ }
455
+ ]
456
+ },
457
+ "deviceTags": {
458
+ "oneOf": [
459
+ {
460
+ "oneOf": [
461
+ {
462
+ "type": "object",
463
+ "properties": {
464
+ "$tagKey": {
465
+ "type": "string",
466
+ "maxLength": 255
467
+ },
468
+ "$tagValue": {
469
+ "type": "string",
470
+ "maxLength": 255
471
+ }
472
+ },
473
+ "additionalProperties": false,
474
+ "minProperties": 1
475
+ },
476
+ {
477
+ "type": "object",
478
+ "patternProperties": {
479
+ "^[0-9a-zA-Z_-]{1,255}": {
480
+ "type": "string",
481
+ "maxLength": 255
482
+ }
483
+ },
484
+ "additionalProperties": false
485
+ }
486
+ ]
487
+ },
488
+ {
489
+ "type": "object",
490
+ "properties": {
491
+ "$eq": {
492
+ "oneOf": [
493
+ {
494
+ "type": "object",
495
+ "properties": {
496
+ "$tagKey": {
497
+ "type": "string",
498
+ "maxLength": 255
499
+ },
500
+ "$tagValue": {
501
+ "type": "string",
502
+ "maxLength": 255
503
+ }
504
+ },
505
+ "additionalProperties": false,
506
+ "minProperties": 1
507
+ },
508
+ {
509
+ "type": "object",
510
+ "patternProperties": {
511
+ "^[0-9a-zA-Z_-]{1,255}": {
512
+ "type": "string",
513
+ "maxLength": 255
514
+ }
515
+ },
516
+ "additionalProperties": false
517
+ }
518
+ ]
519
+ }
520
+ },
521
+ "required": [
522
+ "$eq"
523
+ ],
524
+ "additionalProperties": false
525
+ },
526
+ {
527
+ "type": "object",
528
+ "properties": {
529
+ "$ne": {
530
+ "oneOf": [
531
+ {
532
+ "type": "object",
533
+ "properties": {
534
+ "$tagKey": {
535
+ "type": "string",
536
+ "maxLength": 255
537
+ },
538
+ "$tagValue": {
539
+ "type": "string",
540
+ "maxLength": 255
541
+ }
542
+ },
543
+ "additionalProperties": false,
544
+ "minProperties": 1
545
+ },
546
+ {
547
+ "type": "object",
548
+ "patternProperties": {
549
+ "^[0-9a-zA-Z_-]{1,255}": {
550
+ "type": "string",
551
+ "maxLength": 255
552
+ }
553
+ },
554
+ "additionalProperties": false
555
+ }
556
+ ]
557
+ }
558
+ },
559
+ "required": [
560
+ "$ne"
561
+ ],
562
+ "additionalProperties": false
563
+ }
564
+ ]
565
+ },
566
+ "key": {
567
+ "oneOf": [
568
+ {
569
+ "type": [
570
+ "string",
571
+ "number",
572
+ "boolean",
573
+ "null"
574
+ ]
575
+ },
576
+ {
577
+ "type": "object",
578
+ "properties": {
579
+ "$eq": {
580
+ "type": [
581
+ "string",
582
+ "number",
583
+ "boolean",
584
+ "null"
585
+ ]
586
+ },
587
+ "$ne": {
588
+ "type": [
589
+ "string",
590
+ "number",
591
+ "boolean",
592
+ "null"
593
+ ]
594
+ },
595
+ "$gt": {
596
+ "type": [
597
+ "string",
598
+ "number",
599
+ "boolean",
600
+ "null"
601
+ ]
602
+ },
603
+ "$lt": {
604
+ "type": [
605
+ "string",
606
+ "number",
607
+ "boolean",
608
+ "null"
609
+ ]
610
+ },
611
+ "$gte": {
612
+ "type": [
613
+ "string",
614
+ "number",
615
+ "boolean",
616
+ "null"
617
+ ]
618
+ },
619
+ "$lte": {
620
+ "type": [
621
+ "string",
622
+ "number",
623
+ "boolean",
624
+ "null"
625
+ ]
626
+ },
627
+ "$startsWith": {
628
+ "type": "string",
629
+ "minLength": 1
630
+ },
631
+ "$endsWith": {
632
+ "type": "string",
633
+ "minLength": 1
634
+ },
635
+ "$contains": {
636
+ "type": "string",
637
+ "minLength": 1
638
+ },
639
+ "$ci": {
640
+ "type": "boolean"
641
+ },
642
+ "$in": {
643
+ "type": "array",
644
+ "maxItems": 100,
645
+ "items": {
646
+ "type": [
647
+ "string",
648
+ "number",
649
+ "boolean"
650
+ ]
651
+ }
652
+ },
653
+ "$nin": {
654
+ "type": "array",
655
+ "maxItems": 100,
656
+ "items": {
657
+ "type": [
658
+ "string",
659
+ "number",
660
+ "boolean"
661
+ ]
662
+ }
663
+ }
664
+ },
665
+ "additionalProperties": false
666
+ }
667
+ ]
668
+ },
669
+ "description": {
670
+ "oneOf": [
671
+ {
672
+ "type": [
673
+ "string",
674
+ "number",
675
+ "boolean",
676
+ "null"
677
+ ]
678
+ },
679
+ {
680
+ "type": "object",
681
+ "properties": {
682
+ "$eq": {
683
+ "type": [
684
+ "string",
685
+ "number",
686
+ "boolean",
687
+ "null"
688
+ ]
689
+ },
690
+ "$ne": {
691
+ "type": [
692
+ "string",
693
+ "number",
694
+ "boolean",
695
+ "null"
696
+ ]
697
+ },
698
+ "$gt": {
699
+ "type": [
700
+ "string",
701
+ "number",
702
+ "boolean",
703
+ "null"
704
+ ]
705
+ },
706
+ "$lt": {
707
+ "type": [
708
+ "string",
709
+ "number",
710
+ "boolean",
711
+ "null"
712
+ ]
713
+ },
714
+ "$gte": {
715
+ "type": [
716
+ "string",
717
+ "number",
718
+ "boolean",
719
+ "null"
720
+ ]
721
+ },
722
+ "$lte": {
723
+ "type": [
724
+ "string",
725
+ "number",
726
+ "boolean",
727
+ "null"
728
+ ]
729
+ },
730
+ "$startsWith": {
731
+ "type": "string",
732
+ "minLength": 1
733
+ },
734
+ "$endsWith": {
735
+ "type": "string",
736
+ "minLength": 1
737
+ },
738
+ "$contains": {
739
+ "type": "string",
740
+ "minLength": 1
741
+ },
742
+ "$ci": {
743
+ "type": "boolean"
744
+ },
745
+ "$in": {
746
+ "type": "array",
747
+ "maxItems": 100,
748
+ "items": {
749
+ "type": [
750
+ "string",
751
+ "number",
752
+ "boolean"
753
+ ]
754
+ }
755
+ },
756
+ "$nin": {
757
+ "type": "array",
758
+ "maxItems": 100,
759
+ "items": {
760
+ "type": [
761
+ "string",
762
+ "number",
763
+ "boolean"
764
+ ]
765
+ }
766
+ }
767
+ },
768
+ "additionalProperties": false
769
+ }
770
+ ]
771
+ },
772
+ "filterType": {
773
+ "oneOf": [
774
+ {
775
+ "type": [
776
+ "string",
777
+ "number",
778
+ "boolean",
779
+ "null"
780
+ ]
781
+ },
782
+ {
783
+ "type": "object",
784
+ "properties": {
785
+ "$eq": {
786
+ "type": [
787
+ "string",
788
+ "number",
789
+ "boolean",
790
+ "null"
791
+ ]
792
+ },
793
+ "$ne": {
794
+ "type": [
795
+ "string",
796
+ "number",
797
+ "boolean",
798
+ "null"
799
+ ]
800
+ },
801
+ "$gt": {
802
+ "type": [
803
+ "string",
804
+ "number",
805
+ "boolean",
806
+ "null"
807
+ ]
808
+ },
809
+ "$lt": {
810
+ "type": [
811
+ "string",
812
+ "number",
813
+ "boolean",
814
+ "null"
815
+ ]
816
+ },
817
+ "$gte": {
818
+ "type": [
819
+ "string",
820
+ "number",
821
+ "boolean",
822
+ "null"
823
+ ]
824
+ },
825
+ "$lte": {
826
+ "type": [
827
+ "string",
828
+ "number",
829
+ "boolean",
830
+ "null"
831
+ ]
832
+ },
833
+ "$startsWith": {
834
+ "type": "string",
835
+ "minLength": 1
836
+ },
837
+ "$endsWith": {
838
+ "type": "string",
839
+ "minLength": 1
840
+ },
841
+ "$contains": {
842
+ "type": "string",
843
+ "minLength": 1
844
+ },
845
+ "$ci": {
846
+ "type": "boolean"
847
+ },
848
+ "$in": {
849
+ "type": "array",
850
+ "maxItems": 100,
851
+ "items": {
852
+ "type": [
853
+ "string",
854
+ "number",
855
+ "boolean"
856
+ ]
857
+ }
858
+ },
859
+ "$nin": {
860
+ "type": "array",
861
+ "maxItems": 100,
862
+ "items": {
863
+ "type": [
864
+ "string",
865
+ "number",
866
+ "boolean"
867
+ ]
868
+ }
869
+ }
870
+ },
871
+ "additionalProperties": false
872
+ }
873
+ ]
874
+ },
875
+ "pubTopics": {
876
+ "oneOf": [
877
+ {
878
+ "type": [
879
+ "string",
880
+ "number",
881
+ "boolean",
882
+ "null"
883
+ ]
884
+ },
885
+ {
886
+ "type": "object",
887
+ "properties": {
888
+ "$eq": {
889
+ "type": [
890
+ "string",
891
+ "number",
892
+ "boolean",
893
+ "null"
894
+ ]
895
+ },
896
+ "$ne": {
897
+ "type": [
898
+ "string",
899
+ "number",
900
+ "boolean",
901
+ "null"
902
+ ]
903
+ },
904
+ "$gt": {
905
+ "type": [
906
+ "string",
907
+ "number",
908
+ "boolean",
909
+ "null"
910
+ ]
911
+ },
912
+ "$lt": {
913
+ "type": [
914
+ "string",
915
+ "number",
916
+ "boolean",
917
+ "null"
918
+ ]
919
+ },
920
+ "$gte": {
921
+ "type": [
922
+ "string",
923
+ "number",
924
+ "boolean",
925
+ "null"
926
+ ]
927
+ },
928
+ "$lte": {
929
+ "type": [
930
+ "string",
931
+ "number",
932
+ "boolean",
933
+ "null"
934
+ ]
935
+ },
936
+ "$startsWith": {
937
+ "type": "string",
938
+ "minLength": 1
939
+ },
940
+ "$endsWith": {
941
+ "type": "string",
942
+ "minLength": 1
943
+ },
944
+ "$contains": {
945
+ "type": "string",
946
+ "minLength": 1
947
+ },
948
+ "$ci": {
949
+ "type": "boolean"
950
+ },
951
+ "$in": {
952
+ "type": "array",
953
+ "maxItems": 100,
954
+ "items": {
955
+ "type": [
956
+ "string",
957
+ "number",
958
+ "boolean"
959
+ ]
960
+ }
961
+ },
962
+ "$nin": {
963
+ "type": "array",
964
+ "maxItems": 100,
965
+ "items": {
966
+ "type": [
967
+ "string",
968
+ "number",
969
+ "boolean"
970
+ ]
971
+ }
972
+ }
973
+ },
974
+ "additionalProperties": false
975
+ }
976
+ ]
977
+ },
978
+ "subTopics": {
979
+ "oneOf": [
980
+ {
981
+ "type": [
982
+ "string",
983
+ "number",
984
+ "boolean",
985
+ "null"
986
+ ]
987
+ },
988
+ {
989
+ "type": "object",
990
+ "properties": {
991
+ "$eq": {
992
+ "type": [
993
+ "string",
994
+ "number",
995
+ "boolean",
996
+ "null"
997
+ ]
998
+ },
999
+ "$ne": {
1000
+ "type": [
1001
+ "string",
1002
+ "number",
1003
+ "boolean",
1004
+ "null"
1005
+ ]
1006
+ },
1007
+ "$gt": {
1008
+ "type": [
1009
+ "string",
1010
+ "number",
1011
+ "boolean",
1012
+ "null"
1013
+ ]
1014
+ },
1015
+ "$lt": {
1016
+ "type": [
1017
+ "string",
1018
+ "number",
1019
+ "boolean",
1020
+ "null"
1021
+ ]
1022
+ },
1023
+ "$gte": {
1024
+ "type": [
1025
+ "string",
1026
+ "number",
1027
+ "boolean",
1028
+ "null"
1029
+ ]
1030
+ },
1031
+ "$lte": {
1032
+ "type": [
1033
+ "string",
1034
+ "number",
1035
+ "boolean",
1036
+ "null"
1037
+ ]
1038
+ },
1039
+ "$startsWith": {
1040
+ "type": "string",
1041
+ "minLength": 1
1042
+ },
1043
+ "$endsWith": {
1044
+ "type": "string",
1045
+ "minLength": 1
1046
+ },
1047
+ "$contains": {
1048
+ "type": "string",
1049
+ "minLength": 1
1050
+ },
1051
+ "$ci": {
1052
+ "type": "boolean"
1053
+ },
1054
+ "$in": {
1055
+ "type": "array",
1056
+ "maxItems": 100,
1057
+ "items": {
1058
+ "type": [
1059
+ "string",
1060
+ "number",
1061
+ "boolean"
1062
+ ]
1063
+ }
1064
+ },
1065
+ "$nin": {
1066
+ "type": "array",
1067
+ "maxItems": 100,
1068
+ "items": {
1069
+ "type": [
1070
+ "string",
1071
+ "number",
1072
+ "boolean"
1073
+ ]
1074
+ }
1075
+ }
1076
+ },
1077
+ "additionalProperties": false
1078
+ }
1079
+ ]
1080
+ }
1081
+ }
1082
+ }