losant_rest 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "notes": {
6
+ "type": "string",
7
+ "maxLength": 32767
8
+ },
9
+ "enabled": {
10
+ "type": "boolean"
11
+ }
12
+ },
13
+ "additionalProperties": false
14
+ }
@@ -0,0 +1,134 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "version": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "maxLength": 255
9
+ },
10
+ "notes": {
11
+ "type": "string",
12
+ "maxLength": 32767
13
+ },
14
+ "enabled": {
15
+ "type": "boolean"
16
+ },
17
+ "triggers": {
18
+ "type": "array",
19
+ "items": {
20
+ "type": "object",
21
+ "properties": {
22
+ "key": {
23
+ "type": "string",
24
+ "maxLength": 1024
25
+ },
26
+ "type": {
27
+ "type": "string",
28
+ "enum": [
29
+ "deviceId",
30
+ "deviceIdConnect",
31
+ "deviceIdDisconnect",
32
+ "deviceTag",
33
+ "deviceTagConnect",
34
+ "deviceTagDisconnect",
35
+ "endpoint",
36
+ "event",
37
+ "mqttTopic",
38
+ "integration",
39
+ "timer",
40
+ "virtualButton",
41
+ "webhook"
42
+ ]
43
+ },
44
+ "config": {
45
+ "type": "object"
46
+ },
47
+ "meta": {
48
+ "type": "object"
49
+ },
50
+ "outputIds": {
51
+ "type": "array",
52
+ "items": {
53
+ "type": "array",
54
+ "items": {
55
+ "type": "string",
56
+ "maxLength": 255
57
+ },
58
+ "maxItems": 100
59
+ },
60
+ "maxItems": 100
61
+ }
62
+ },
63
+ "additionalProperties": false,
64
+ "required": [
65
+ "type"
66
+ ]
67
+ }
68
+ },
69
+ "nodes": {
70
+ "type": "array",
71
+ "items": {
72
+ "type": "object",
73
+ "properties": {
74
+ "id": {
75
+ "type": "string",
76
+ "maxLength": 1024
77
+ },
78
+ "type": {
79
+ "type": "string",
80
+ "minLength": 1,
81
+ "maxLength": 1024
82
+ },
83
+ "config": {
84
+ "type": "object"
85
+ },
86
+ "meta": {
87
+ "type": "object"
88
+ },
89
+ "outputIds": {
90
+ "type": "array",
91
+ "items": {
92
+ "type": "array",
93
+ "items": {
94
+ "type": "string",
95
+ "maxLength": 255
96
+ },
97
+ "maxItems": 100
98
+ },
99
+ "maxItems": 100
100
+ }
101
+ },
102
+ "additionalProperties": false,
103
+ "required": [
104
+ "type"
105
+ ]
106
+ }
107
+ },
108
+ "globals": {
109
+ "type": "array",
110
+ "items": {
111
+ "type": "object",
112
+ "properties": {
113
+ "key": {
114
+ "type": "string",
115
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
116
+ },
117
+ "json": {
118
+ "type": "string",
119
+ "minLength": 1
120
+ }
121
+ },
122
+ "additionalProperties": false,
123
+ "required": [
124
+ "key",
125
+ "json"
126
+ ]
127
+ }
128
+ }
129
+ },
130
+ "additionalProperties": false,
131
+ "required": [
132
+ "version"
133
+ ]
134
+ }
@@ -0,0 +1,200 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "items": {
6
+ "type": "array",
7
+ "items": {
8
+ "title": "Workflow Version",
9
+ "description": "Schema for a single Workflow Version",
10
+ "type": "object",
11
+ "properties": {
12
+ "id": {
13
+ "type": "string",
14
+ "pattern": "^[A-Fa-f\\d]{24}$"
15
+ },
16
+ "flowVersionId": {
17
+ "type": "string",
18
+ "pattern": "^[A-Fa-f\\d]{24}$"
19
+ },
20
+ "flowId": {
21
+ "type": "string",
22
+ "pattern": "^[A-Fa-f\\d]{24}$"
23
+ },
24
+ "applicationId": {
25
+ "type": "string",
26
+ "pattern": "^[A-Fa-f\\d]{24}$"
27
+ },
28
+ "creationDate": {
29
+ "type": "string",
30
+ "format": "date-time"
31
+ },
32
+ "lastUpdated": {
33
+ "type": "string",
34
+ "format": "date-time"
35
+ },
36
+ "version": {
37
+ "type": "string",
38
+ "minLength": 1,
39
+ "maxLength": 255
40
+ },
41
+ "notes": {
42
+ "type": "string",
43
+ "maxLength": 32767
44
+ },
45
+ "enabled": {
46
+ "type": "boolean"
47
+ },
48
+ "triggers": {
49
+ "type": "array",
50
+ "items": {
51
+ "type": "object",
52
+ "properties": {
53
+ "key": {
54
+ "type": "string",
55
+ "maxLength": 1024
56
+ },
57
+ "type": {
58
+ "type": "string",
59
+ "enum": [
60
+ "deviceId",
61
+ "deviceIdConnect",
62
+ "deviceIdDisconnect",
63
+ "deviceTag",
64
+ "deviceTagConnect",
65
+ "deviceTagDisconnect",
66
+ "endpoint",
67
+ "event",
68
+ "mqttTopic",
69
+ "integration",
70
+ "timer",
71
+ "virtualButton",
72
+ "webhook"
73
+ ]
74
+ },
75
+ "config": {
76
+ "type": "object"
77
+ },
78
+ "meta": {
79
+ "type": "object"
80
+ },
81
+ "outputIds": {
82
+ "type": "array",
83
+ "items": {
84
+ "type": "array",
85
+ "items": {
86
+ "type": "string",
87
+ "maxLength": 255
88
+ },
89
+ "maxItems": 100
90
+ },
91
+ "maxItems": 100
92
+ }
93
+ },
94
+ "additionalProperties": false,
95
+ "required": [
96
+ "type"
97
+ ]
98
+ }
99
+ },
100
+ "nodes": {
101
+ "type": "array",
102
+ "items": {
103
+ "type": "object",
104
+ "properties": {
105
+ "id": {
106
+ "type": "string",
107
+ "maxLength": 1024
108
+ },
109
+ "type": {
110
+ "type": "string",
111
+ "minLength": 1,
112
+ "maxLength": 1024
113
+ },
114
+ "config": {
115
+ "type": "object"
116
+ },
117
+ "meta": {
118
+ "type": "object"
119
+ },
120
+ "outputIds": {
121
+ "type": "array",
122
+ "items": {
123
+ "type": "array",
124
+ "items": {
125
+ "type": "string",
126
+ "maxLength": 255
127
+ },
128
+ "maxItems": 100
129
+ },
130
+ "maxItems": 100
131
+ }
132
+ },
133
+ "additionalProperties": false,
134
+ "required": [
135
+ "type"
136
+ ]
137
+ }
138
+ },
139
+ "globals": {
140
+ "type": "array",
141
+ "items": {
142
+ "type": "object",
143
+ "properties": {
144
+ "key": {
145
+ "type": "string",
146
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
147
+ },
148
+ "json": {
149
+ "type": "string",
150
+ "minLength": 1
151
+ }
152
+ },
153
+ "additionalProperties": false,
154
+ "required": [
155
+ "key",
156
+ "json"
157
+ ]
158
+ }
159
+ }
160
+ }
161
+ }
162
+ },
163
+ "count": {
164
+ "type": "integer"
165
+ },
166
+ "totalCount": {
167
+ "type": "integer"
168
+ },
169
+ "perPage": {
170
+ "type": "integer"
171
+ },
172
+ "page": {
173
+ "type": "integer"
174
+ },
175
+ "filter": {
176
+ "type": "string"
177
+ },
178
+ "filterField": {
179
+ "type": "string"
180
+ },
181
+ "sortField": {
182
+ "type": "string"
183
+ },
184
+ "sortDirection": {
185
+ "type": "string",
186
+ "enum": [
187
+ "asc",
188
+ "desc"
189
+ ]
190
+ },
191
+ "applicationId": {
192
+ "type": "string",
193
+ "pattern": "^[A-Fa-f\\d]{24}$"
194
+ },
195
+ "flowId": {
196
+ "type": "string",
197
+ "pattern": "^[A-Fa-f\\d]{24}$"
198
+ }
199
+ }
200
+ }
data/schemas/flows.json CHANGED
@@ -41,6 +41,10 @@
41
41
  "enabled": {
42
42
  "type": "boolean"
43
43
  },
44
+ "defaultVersionId": {
45
+ "type": "string",
46
+ "pattern": "^[A-Fa-f\\d]{24}$"
47
+ },
44
48
  "triggers": {
45
49
  "type": "array",
46
50
  "items": {
@@ -161,6 +165,22 @@
161
165
  },
162
166
  "errorCount": {
163
167
  "type": "number"
168
+ },
169
+ "byVersion": {
170
+ "type": "object",
171
+ "patternProperties": {
172
+ ".*": {
173
+ "type": "object",
174
+ "properties": {
175
+ "runCount": {
176
+ "type": "number"
177
+ },
178
+ "errorCount": {
179
+ "type": "number"
180
+ }
181
+ }
182
+ }
183
+ }
164
184
  }
165
185
  }
166
186
  }
@@ -31,7 +31,8 @@
31
31
  "type": "string",
32
32
  "enum": [
33
33
  "mqtt",
34
- "googlePubSub"
34
+ "googlePubSub",
35
+ "particle"
35
36
  ]
36
37
  },
37
38
  "enabled": {
@@ -128,6 +129,35 @@
128
129
  "host"
129
130
  ]
130
131
  },
132
+ "particleConfig": {
133
+ "type": "object",
134
+ "properties": {
135
+ "accessToken": {
136
+ "type": "string",
137
+ "maxLength": 1024,
138
+ "minLength": 1
139
+ },
140
+ "productSlugOrId": {
141
+ "type": "string",
142
+ "maxLength": 1024,
143
+ "minLength": 1
144
+ },
145
+ "orgSlugOrId": {
146
+ "type": "string",
147
+ "maxLength": 1024,
148
+ "minLength": 1
149
+ },
150
+ "deviceNameOrId": {
151
+ "type": "string",
152
+ "maxLength": 1024,
153
+ "minLength": 1
154
+ }
155
+ },
156
+ "additionalProperties": false,
157
+ "required": [
158
+ "accessToken"
159
+ ]
160
+ },
131
161
  "status": {
132
162
  "lastKeepAlive": {
133
163
  "type": [
@@ -11,7 +11,8 @@
11
11
  "type": "string",
12
12
  "enum": [
13
13
  "mqtt",
14
- "googlePubSub"
14
+ "googlePubSub",
15
+ "particle"
15
16
  ]
16
17
  },
17
18
  "enabled": {
@@ -107,6 +108,35 @@
107
108
  "protocol",
108
109
  "host"
109
110
  ]
111
+ },
112
+ "particleConfig": {
113
+ "type": "object",
114
+ "properties": {
115
+ "accessToken": {
116
+ "type": "string",
117
+ "maxLength": 1024,
118
+ "minLength": 1
119
+ },
120
+ "productSlugOrId": {
121
+ "type": "string",
122
+ "maxLength": 1024,
123
+ "minLength": 1
124
+ },
125
+ "orgSlugOrId": {
126
+ "type": "string",
127
+ "maxLength": 1024,
128
+ "minLength": 1
129
+ },
130
+ "deviceNameOrId": {
131
+ "type": "string",
132
+ "maxLength": 1024,
133
+ "minLength": 1
134
+ }
135
+ },
136
+ "additionalProperties": false,
137
+ "required": [
138
+ "accessToken"
139
+ ]
110
140
  }
111
141
  },
112
142
  "additionalProperties": false