losant_rest 1.11.1 → 1.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (213) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +1 -1
  4. data/docs/_schemas.md +34959 -19022
  5. data/docs/application.md +46 -5
  6. data/docs/applicationApiTokens.md +1 -1
  7. data/docs/applicationDashboard.md +133 -0
  8. data/docs/applicationDashboards.md +93 -0
  9. data/docs/applicationKeys.md +3 -2
  10. data/docs/applications.md +1 -1
  11. data/docs/dataTable.md +1 -1
  12. data/docs/dataTableRows.md +1 -1
  13. data/docs/dataTables.md +1 -1
  14. data/docs/device.md +43 -0
  15. data/docs/devices.md +41 -2
  16. data/docs/edgeDeployment.md +49 -0
  17. data/docs/events.md +3 -3
  18. data/docs/experience.md +1 -1
  19. data/docs/experienceDomains.md +1 -1
  20. data/docs/experienceEndpoint.md +1 -0
  21. data/docs/experienceGroup.md +2 -0
  22. data/docs/experienceSlugs.md +1 -1
  23. data/docs/experienceVersion.md +3 -3
  24. data/docs/experienceVersions.md +2 -2
  25. data/docs/experienceView.md +4 -4
  26. data/docs/experienceViews.md +2 -2
  27. data/docs/file.md +5 -5
  28. data/docs/files.md +2 -2
  29. data/docs/flow.md +41 -0
  30. data/docs/flowVersions.md +44 -0
  31. data/docs/flows.md +1 -0
  32. data/docs/instance.md +166 -0
  33. data/docs/instanceApiToken.md +133 -0
  34. data/docs/instanceApiTokens.md +91 -0
  35. data/docs/instanceMember.md +133 -0
  36. data/docs/instanceMembers.md +91 -0
  37. data/docs/instanceOrg.md +135 -0
  38. data/docs/instanceOrgInvite.md +139 -0
  39. data/docs/instanceOrgInvites.md +96 -0
  40. data/docs/instanceOrgMember.md +139 -0
  41. data/docs/instanceOrgMembers.md +96 -0
  42. data/docs/instanceOrgs.md +91 -0
  43. data/docs/instances.md +50 -0
  44. data/docs/integration.md +1 -0
  45. data/docs/me.md +1 -1
  46. data/docs/org.md +1 -1
  47. data/docs/userApiToken.md +125 -0
  48. data/docs/userApiTokens.md +87 -0
  49. data/docs/webhook.md +1 -0
  50. data/lib/losant_rest.rb +18 -1
  51. data/lib/losant_rest/application.rb +53 -6
  52. data/lib/losant_rest/application_api_token.rb +1 -1
  53. data/lib/losant_rest/application_api_tokens.rb +2 -2
  54. data/lib/losant_rest/application_certificate.rb +1 -1
  55. data/lib/losant_rest/application_certificate_authorities.rb +1 -1
  56. data/lib/losant_rest/application_certificate_authority.rb +1 -1
  57. data/lib/losant_rest/application_certificates.rb +1 -1
  58. data/lib/losant_rest/application_dashboard.rb +176 -0
  59. data/lib/losant_rest/application_dashboards.rb +138 -0
  60. data/lib/losant_rest/application_key.rb +1 -1
  61. data/lib/losant_rest/application_keys.rb +4 -1
  62. data/lib/losant_rest/application_template.rb +1 -1
  63. data/lib/losant_rest/application_templates.rb +1 -1
  64. data/lib/losant_rest/applications.rb +2 -2
  65. data/lib/losant_rest/audit_log.rb +1 -1
  66. data/lib/losant_rest/audit_logs.rb +1 -1
  67. data/lib/losant_rest/auth.rb +1 -1
  68. data/lib/losant_rest/client.rb +71 -3
  69. data/lib/losant_rest/dashboard.rb +1 -1
  70. data/lib/losant_rest/dashboards.rb +1 -1
  71. data/lib/losant_rest/data.rb +1 -1
  72. data/lib/losant_rest/data_table.rb +2 -2
  73. data/lib/losant_rest/data_table_row.rb +1 -1
  74. data/lib/losant_rest/data_table_rows.rb +2 -2
  75. data/lib/losant_rest/data_tables.rb +2 -2
  76. data/lib/losant_rest/device.rb +51 -1
  77. data/lib/losant_rest/device_recipe.rb +1 -1
  78. data/lib/losant_rest/device_recipes.rb +1 -1
  79. data/lib/losant_rest/devices.rb +49 -3
  80. data/lib/losant_rest/edge_deployment.rb +81 -0
  81. data/lib/losant_rest/edge_deployments.rb +1 -1
  82. data/lib/losant_rest/error.rb +1 -1
  83. data/lib/losant_rest/event.rb +1 -1
  84. data/lib/losant_rest/events.rb +4 -4
  85. data/lib/losant_rest/experience.rb +2 -2
  86. data/lib/losant_rest/experience_domain.rb +1 -1
  87. data/lib/losant_rest/experience_domains.rb +2 -2
  88. data/lib/losant_rest/experience_endpoint.rb +3 -1
  89. data/lib/losant_rest/experience_endpoints.rb +1 -1
  90. data/lib/losant_rest/experience_group.rb +5 -1
  91. data/lib/losant_rest/experience_groups.rb +1 -1
  92. data/lib/losant_rest/experience_slug.rb +1 -1
  93. data/lib/losant_rest/experience_slugs.rb +2 -2
  94. data/lib/losant_rest/experience_user.rb +1 -1
  95. data/lib/losant_rest/experience_users.rb +1 -1
  96. data/lib/losant_rest/experience_version.rb +4 -4
  97. data/lib/losant_rest/experience_versions.rb +3 -3
  98. data/lib/losant_rest/experience_view.rb +5 -5
  99. data/lib/losant_rest/experience_views.rb +3 -3
  100. data/lib/losant_rest/file.rb +5 -5
  101. data/lib/losant_rest/files.rb +3 -3
  102. data/lib/losant_rest/flow.rb +47 -1
  103. data/lib/losant_rest/flow_version.rb +1 -1
  104. data/lib/losant_rest/flow_versions.rb +51 -1
  105. data/lib/losant_rest/flows.rb +3 -1
  106. data/lib/losant_rest/instance.rb +226 -0
  107. data/lib/losant_rest/instance_api_token.rb +176 -0
  108. data/lib/losant_rest/instance_api_tokens.rb +136 -0
  109. data/lib/losant_rest/instance_member.rb +176 -0
  110. data/lib/losant_rest/instance_members.rb +134 -0
  111. data/lib/losant_rest/instance_org.rb +180 -0
  112. data/lib/losant_rest/instance_org_invite.rb +182 -0
  113. data/lib/losant_rest/instance_org_invites.rb +138 -0
  114. data/lib/losant_rest/instance_org_member.rb +182 -0
  115. data/lib/losant_rest/instance_org_members.rb +138 -0
  116. data/lib/losant_rest/instance_orgs.rb +139 -0
  117. data/lib/losant_rest/instances.rb +88 -0
  118. data/lib/losant_rest/integration.rb +3 -1
  119. data/lib/losant_rest/integrations.rb +1 -1
  120. data/lib/losant_rest/me.rb +2 -2
  121. data/lib/losant_rest/notebook.rb +1 -1
  122. data/lib/losant_rest/notebooks.rb +1 -1
  123. data/lib/losant_rest/org.rb +2 -2
  124. data/lib/losant_rest/org_invites.rb +1 -1
  125. data/lib/losant_rest/orgs.rb +1 -1
  126. data/lib/losant_rest/user_api_token.rb +170 -0
  127. data/lib/losant_rest/user_api_tokens.rb +132 -0
  128. data/lib/losant_rest/utils.rb +1 -1
  129. data/lib/losant_rest/version.rb +2 -2
  130. data/lib/losant_rest/webhook.rb +3 -1
  131. data/lib/losant_rest/webhooks.rb +1 -1
  132. data/schemas/advancedApplicationKeyQuery.json +1082 -0
  133. data/schemas/advancedDeviceQuery.json +309 -0
  134. data/schemas/advancedFlowQuery.json +218 -0
  135. data/schemas/advancedFlowVersionQuery.json +218 -0
  136. data/schemas/apiToken.json +2 -1
  137. data/schemas/apiTokenPost.json +431 -0
  138. data/schemas/apiTokens.json +4 -2
  139. data/schemas/applicationApiTokenPost.json +8 -0
  140. data/schemas/applicationDashboardPost.json +5687 -0
  141. data/schemas/applicationGlobalPatch.json +33 -0
  142. data/schemas/auditLog.json +4 -0
  143. data/schemas/auditLogFilter.json +4 -0
  144. data/schemas/auditLogs.json +4 -0
  145. data/schemas/bulkDeleteResponse.json +12 -0
  146. data/schemas/dashboard.json +66 -17
  147. data/schemas/dashboardPatch.json +66 -17
  148. data/schemas/dashboardPost.json +66 -17
  149. data/schemas/dashboardSendReport.json +4 -0
  150. data/schemas/dashboards.json +66 -17
  151. data/schemas/devicePayloadCounts.json +24 -0
  152. data/schemas/devicesDeletePost.json +309 -0
  153. data/schemas/devicesExportPayloadCountPost.json +1350 -0
  154. data/schemas/devicesExportPost.json +309 -0
  155. data/schemas/devicesPatch.json +309 -0
  156. data/schemas/devicesRemoveDataPost.json +309 -0
  157. data/schemas/edgeDeployment.json +16 -0
  158. data/schemas/edgeDeployments.json +16 -0
  159. data/schemas/experienceGroup.json +6 -0
  160. data/schemas/experienceGroups.json +6 -0
  161. data/schemas/experienceLinkedResources.json +45 -0
  162. data/schemas/filePost.json +8 -2
  163. data/schemas/files.json +3 -0
  164. data/schemas/flow.json +15 -0
  165. data/schemas/flowPatch.json +15 -0
  166. data/schemas/flowPost.json +15 -0
  167. data/schemas/flowStorageMetadata.json +13 -0
  168. data/schemas/flowVersion.json +30 -0
  169. data/schemas/flowVersionPost.json +15 -0
  170. data/schemas/flowVersions.json +30 -0
  171. data/schemas/flowVersionsDeletePost.json +941 -0
  172. data/schemas/flows.json +15 -0
  173. data/schemas/flowsImportPost.json +30 -0
  174. data/schemas/flowsImportResult.json +45 -0
  175. data/schemas/githubLogin.json +72 -1
  176. data/schemas/historicalSummaries.json +43 -0
  177. data/schemas/historicalSummary.json +490 -0
  178. data/schemas/instance.json +192 -0
  179. data/schemas/instanceMember.json +41 -0
  180. data/schemas/instanceMemberPatch.json +17 -0
  181. data/schemas/instanceMemberPost.json +37 -0
  182. data/schemas/instanceMembers.json +77 -0
  183. data/schemas/instanceOrg.json +133 -0
  184. data/schemas/instanceOrgMember.json +45 -0
  185. data/schemas/instanceOrgMemberPatch.json +69 -0
  186. data/schemas/instanceOrgMemberPost.json +161 -0
  187. data/schemas/instanceOrgMembers.json +42 -0
  188. data/schemas/instanceOrgPatch.json +122 -0
  189. data/schemas/instanceOrgPost.json +291 -0
  190. data/schemas/instanceOrgs.json +178 -0
  191. data/schemas/instancePatch.json +67 -0
  192. data/schemas/instanceReportOptionsPost.json +41 -0
  193. data/schemas/instances.json +43 -0
  194. data/schemas/me.json +30 -14
  195. data/schemas/multiDeviceCommand.json +309 -0
  196. data/schemas/notebook.json +45 -0
  197. data/schemas/notebookPatch.json +30 -0
  198. data/schemas/notebookPost.json +30 -0
  199. data/schemas/notebooks.json +45 -0
  200. data/schemas/org.json +30 -14
  201. data/schemas/orgInvite.json +90 -0
  202. data/schemas/orgInviteCollection.json +130 -0
  203. data/schemas/orgInvites.json +82 -77
  204. data/schemas/orgPatch.json +0 -9
  205. data/schemas/orgRoleInfo.json +69 -0
  206. data/schemas/orgs.json +30 -14
  207. data/schemas/payloadStats.json +126 -0
  208. data/schemas/userCredentials.json +72 -1
  209. data/schemas/userPost.json +72 -1
  210. data/schemas/validateContextError.json +34 -0
  211. data/schemas/validateContextSuccess.json +34 -0
  212. data/schemas/virtualButtonPress.json +4 -0
  213. metadata +68 -3
@@ -0,0 +1,132 @@
1
+ # The MIT License (MIT)
2
+ #
3
+ # Copyright (c) 2021 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 User Api Tokens Resource
28
+ class UserApiTokens
29
+
30
+ def initialize(client)
31
+ @client = client
32
+ end
33
+
34
+ # Returns the API tokens for a user
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.User, all.User.read, userApiTokens.*, or userApiTokens.get.
41
+ #
42
+ # Parameters:
43
+ # * {string} sortField - Field to sort the results by. Accepted values are: name, status, id, creationDate, lastUpdated, expirationDate
44
+ # * {string} sortDirection - Direction to sort the results by. Accepted values are: asc, desc
45
+ # * {string} page - Which page of results to return
46
+ # * {string} perPage - How many items to return per page
47
+ # * {string} filterField - Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name, status
48
+ # * {string} filter - Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering.
49
+ # * {string} losantdomain - Domain scope of request (rarely needed)
50
+ # * {boolean} _actions - Return resource actions in response
51
+ # * {boolean} _links - Return resource link in response
52
+ # * {boolean} _embedded - Return embedded resources in response
53
+ #
54
+ # Responses:
55
+ # * 200 - Collection of API tokens (https://api.losant.com/#/definitions/apiToken)
56
+ #
57
+ # Errors:
58
+ # * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
59
+ def get(params = {})
60
+ params = Utils.symbolize_hash_keys(params)
61
+ query_params = { _actions: false, _links: true, _embedded: true }
62
+ headers = {}
63
+ body = nil
64
+
65
+
66
+ query_params[:sortField] = params[:sortField] if params.has_key?(:sortField)
67
+ query_params[:sortDirection] = params[:sortDirection] if params.has_key?(:sortDirection)
68
+ query_params[:page] = params[:page] if params.has_key?(:page)
69
+ query_params[:perPage] = params[:perPage] if params.has_key?(:perPage)
70
+ query_params[:filterField] = params[:filterField] if params.has_key?(:filterField)
71
+ query_params[:filter] = params[:filter] if params.has_key?(:filter)
72
+ headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
73
+ query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
74
+ query_params[:_links] = params[:_links] if params.has_key?(:_links)
75
+ query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
76
+
77
+ path = "/me/tokens"
78
+
79
+ @client.request(
80
+ method: :get,
81
+ path: path,
82
+ query: query_params,
83
+ headers: headers,
84
+ body: body)
85
+ end
86
+
87
+ # Create a new API token for an user
88
+ #
89
+ # Authentication:
90
+ # The client must be configured with a valid api
91
+ # access token to call this action. The token
92
+ # must include at least one of the following scopes:
93
+ # all.User, userApiTokens.*, or userApiTokens.post.
94
+ #
95
+ # Parameters:
96
+ # * {hash} apiToken - API token information (https://api.losant.com/#/definitions/apiTokenPost)
97
+ # * {string} losantdomain - Domain scope of request (rarely needed)
98
+ # * {boolean} _actions - Return resource actions in response
99
+ # * {boolean} _links - Return resource link in response
100
+ # * {boolean} _embedded - Return embedded resources in response
101
+ #
102
+ # Responses:
103
+ # * 201 - The successfully created API token (https://api.losant.com/#/definitions/apiToken)
104
+ #
105
+ # Errors:
106
+ # * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
107
+ def post(params = {})
108
+ params = Utils.symbolize_hash_keys(params)
109
+ query_params = { _actions: false, _links: true, _embedded: true }
110
+ headers = {}
111
+ body = nil
112
+
113
+ raise ArgumentError.new("apiToken is required") unless params.has_key?(:apiToken)
114
+
115
+ body = params[:apiToken] if params.has_key?(:apiToken)
116
+ headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
117
+ query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
118
+ query_params[:_links] = params[:_links] if params.has_key?(:_links)
119
+ query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
120
+
121
+ path = "/me/tokens"
122
+
123
+ @client.request(
124
+ method: :post,
125
+ path: path,
126
+ query: query_params,
127
+ headers: headers,
128
+ body: body)
129
+ end
130
+
131
+ end
132
+ end
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2020 Losant IoT, Inc.
3
+ # Copyright (c) 2021 Losant IoT, Inc.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2020 Losant IoT, Inc.
3
+ # Copyright (c) 2021 Losant IoT, Inc.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -21,5 +21,5 @@
21
21
  # SOFTWARE.
22
22
 
23
23
  module LosantRest
24
- VERSION = "1.11.1"
24
+ VERSION = "1.14.0"
25
25
  end
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2020 Losant IoT, Inc.
3
+ # Copyright (c) 2021 Losant IoT, Inc.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -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)
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2020 Losant IoT, Inc.
3
+ # Copyright (c) 2021 Losant IoT, Inc.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -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
+ }