@mhome/app-facade-protocol 1.20.1 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,117 @@
1
+ {
2
+ "valid": [
3
+ {
4
+ "name": "main definition",
5
+ "value": {
6
+ "capabilityId": "basic.device.command.onOff",
7
+ "type": "COMMAND",
8
+ "displayName": "Power on / off",
9
+ "description": "Controls the device on/off state.",
10
+ "visibility": "full",
11
+ "tag": "on/off"
12
+ }
13
+ },
14
+ {
15
+ "name": "provider implementation",
16
+ "value": {
17
+ "capabilityId": "mlinkHue.device.command.onOff",
18
+ "type": "COMMAND",
19
+ "displayName": "Power on / off",
20
+ "description": "Controls the device on/off state.",
21
+ "visibility": "full",
22
+ "tag": "on/off",
23
+ "parentCapabilityId": "basic.device.command.onOff"
24
+ }
25
+ },
26
+ {
27
+ "name": "no primary tag",
28
+ "value": {
29
+ "capabilityId": "basic.device.command.onOff",
30
+ "type": "COMMAND",
31
+ "displayName": "Power on / off",
32
+ "description": "Controls the device on/off state.",
33
+ "visibility": "full"
34
+ }
35
+ },
36
+ {
37
+ "name": "parent without tag",
38
+ "value": {
39
+ "capabilityId": "mlinkHue.device.command.onOff",
40
+ "type": "COMMAND",
41
+ "displayName": "Power on / off",
42
+ "description": "Controls the device on/off state.",
43
+ "visibility": "full",
44
+ "parentCapabilityId": "basic.device.command.onOff"
45
+ }
46
+ },
47
+ {
48
+ "name": "data capability",
49
+ "value": {
50
+ "capabilityId": "basic.time.data.now",
51
+ "type": "DATA",
52
+ "displayName": "Power on / off",
53
+ "description": "Controls the device on/off state.",
54
+ "visibility": "full",
55
+ "tag": "time"
56
+ }
57
+ }
58
+ ],
59
+ "invalid": [
60
+ {
61
+ "name": "null tag",
62
+ "value": {
63
+ "capabilityId": "basic.device.command.onOff",
64
+ "type": "COMMAND",
65
+ "displayName": "Power on / off",
66
+ "description": "Controls the device on/off state.",
67
+ "visibility": "full",
68
+ "tag": null
69
+ }
70
+ },
71
+ {
72
+ "name": "empty tag",
73
+ "value": {
74
+ "capabilityId": "basic.device.command.onOff",
75
+ "type": "COMMAND",
76
+ "displayName": "Power on / off",
77
+ "description": "Controls the device on/off state.",
78
+ "visibility": "full",
79
+ "tag": ""
80
+ }
81
+ },
82
+ {
83
+ "name": "partial ID",
84
+ "value": {
85
+ "capabilityId": "command.onOff",
86
+ "type": "COMMAND",
87
+ "displayName": "Power on / off",
88
+ "description": "Controls the device on/off state.",
89
+ "visibility": "full",
90
+ "tag": "on/off"
91
+ }
92
+ },
93
+ {
94
+ "name": "obsolete definitionId",
95
+ "value": {
96
+ "capabilityId": "basic.device.command.onOff",
97
+ "type": "COMMAND",
98
+ "displayName": "Power on / off",
99
+ "description": "Controls the device on/off state.",
100
+ "visibility": "full",
101
+ "tag": "on/off",
102
+ "definitionId": "basic.device.command.onOff"
103
+ }
104
+ },
105
+ {
106
+ "name": "whitespace in ID",
107
+ "value": {
108
+ "capabilityId": "basic.device.command.on Off",
109
+ "type": "COMMAND",
110
+ "displayName": "Power on / off",
111
+ "description": "Controls the device on/off state.",
112
+ "visibility": "full",
113
+ "tag": "on/off"
114
+ }
115
+ }
116
+ ]
117
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.v1",
3
- "contractVersion": "1.20.1",
3
+ "contractVersion": "1.22.0",
4
4
  "callSchema": "schema/facade-call.v1.schema.json",
5
5
  "routing": "manifest/routing.v1.json",
6
6
  "routingSchema": "schema/routing.v1.schema.json",
@@ -82,6 +82,43 @@
82
82
  "/app/system/hosts/runtime",
83
83
  "/app/system/hosts/claim"
84
84
  ]
85
+ },
86
+ "integration": {
87
+ "capabilitySchema": "schema/capability-descriptor.v1.schema.json",
88
+ "requestTargets": [
89
+ "/app/integration/detail/get",
90
+ "/app/integration/installed/list",
91
+ "/app/integration/capability/detail/get"
92
+ ],
93
+ "includeDocumentationDefault": true
94
+ },
95
+ "person": {
96
+ "contract": "mhome.person.v1",
97
+ "schema": "schema/person.v1.schema.json",
98
+ "requestTargets": [
99
+ "/app/person/backup/export",
100
+ "/app/person/backup/import/commit",
101
+ "/app/person/backup/import/start",
102
+ "/app/person/backup/import/write",
103
+ "/app/person/backup/read",
104
+ "/app/person/clusters/assign",
105
+ "/app/person/clusters/get",
106
+ "/app/person/clusters/list",
107
+ "/app/person/clusters/merge",
108
+ "/app/person/clusters/split",
109
+ "/app/person/create",
110
+ "/app/person/delete",
111
+ "/app/person/get",
112
+ "/app/person/list",
113
+ "/app/person/reset",
114
+ "/app/person/samples/image",
115
+ "/app/person/samples/review",
116
+ "/app/person/status",
117
+ "/app/person/update"
118
+ ],
119
+ "managementPermission": "spaceMember",
120
+ "owner": "scopeHub",
121
+ "cloudPersistence": false
85
122
  }
86
123
  }
87
124
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.hub.targets.v1",
3
- "contractVersion": "1.20.1",
3
+ "contractVersion": "1.22.0",
4
4
  "appTargets": [
5
5
  "/app/hub/get",
6
6
  "/app/hub/remove",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.routing.v1",
3
- "contractVersion": "1.20.1",
3
+ "contractVersion": "1.22.0",
4
4
  "targetPrefix": "/app/",
5
5
  "default": {
6
6
  "execution": "scopeMode",
@@ -34,7 +34,8 @@
34
34
  "/app/runtime/",
35
35
  "/app/system/instances/",
36
36
  "/app/system/clients/",
37
- "/app/system/hosts/"
37
+ "/app/system/hosts/",
38
+ "/app/person/"
38
39
  ],
39
40
  "requestPlacementPrefixes": [
40
41
  "/app/messaging/"
@@ -53,7 +54,26 @@
53
54
  "/app/system/clients/get",
54
55
  "/app/system/hosts/get",
55
56
  "/app/system/hosts/runtime",
56
- "/app/system/hosts/claim"
57
+ "/app/system/hosts/claim",
58
+ "/app/person/status",
59
+ "/app/person/list",
60
+ "/app/person/get",
61
+ "/app/person/create",
62
+ "/app/person/update",
63
+ "/app/person/delete",
64
+ "/app/person/reset",
65
+ "/app/person/clusters/list",
66
+ "/app/person/clusters/get",
67
+ "/app/person/clusters/assign",
68
+ "/app/person/clusters/merge",
69
+ "/app/person/clusters/split",
70
+ "/app/person/samples/review",
71
+ "/app/person/samples/image",
72
+ "/app/person/backup/export",
73
+ "/app/person/backup/read",
74
+ "/app/person/backup/import/start",
75
+ "/app/person/backup/import/write",
76
+ "/app/person/backup/import/commit"
57
77
  ]
58
78
  }
59
79
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.messaging.targets.v1",
3
- "contractVersion": "1.20.1",
3
+ "contractVersion": "1.22.0",
4
4
  "requestTargets": [
5
5
  "/app/messaging/provider/list",
6
6
  "/app/messaging/provider-account/list",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mhome/app-facade-protocol",
3
- "version": "1.20.1",
3
+ "version": "1.22.0",
4
4
  "description": "Build-time protocol artifacts for mhome.app-facade",
5
5
  "license": "MIT",
6
6
  "repository": {
package/protocol.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "protocol": "mhome.app-facade",
3
- "contractVersion": "1.20.1",
3
+ "contractVersion": "1.22.0",
4
4
  "manifest": "manifest/app-facade.v1.json",
5
5
  "schemas": {
6
+ "capabilityDescriptor": "schema/capability-descriptor.v1.schema.json",
6
7
  "call": "schema/facade-call.v1.schema.json",
7
8
  "frame": "schema/messaging-frame.v3.schema.json",
8
9
  "interactionFlow": "schema/interaction-flow-app.v1.schema.json",
@@ -13,11 +14,13 @@
13
14
  "systemHosts": "schema/system-hosts.v1.schema.json",
14
15
  "systemHostsRuntime": "schema/system-hosts-runtime.v1.schema.json",
15
16
  "systemInstances": "schema/system-instances.v1.schema.json",
16
- "topology": "schema/topology.v1.schema.json"
17
+ "topology": "schema/topology.v1.schema.json",
18
+ "person": "schema/person.v1.schema.json"
17
19
  },
18
20
  "fixtures": {
19
21
  "valid": "fixtures",
20
22
  "invalid": "fixtures/invalid",
23
+ "capabilityDescriptor": "fixtures/capability-descriptor.conformance.json",
21
24
  "interactionFlow": "fixtures/interaction-flow.conformance.json"
22
25
  }
23
26
  }
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mhome.ai/schema/capability-descriptor.v1.schema.json",
4
+ "title": "CapabilityDescriptor",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "capabilityId",
9
+ "type",
10
+ "displayName",
11
+ "description",
12
+ "visibility"
13
+ ],
14
+ "properties": {
15
+ "capabilityId": {
16
+ "type": "string",
17
+ "pattern": "^[^.\\s]+\\.[^.\\s]+\\.(command|state|event|data)\\.[^.\\s]+$"
18
+ },
19
+ "parentCapabilityId": {
20
+ "type": "string",
21
+ "pattern": "^[^.\\s]+\\.[^.\\s]+\\.(command|state|event|data)\\.[^.\\s]+$"
22
+ },
23
+ "type": {
24
+ "enum": [
25
+ "COMMAND",
26
+ "STATE",
27
+ "EVENT",
28
+ "DATA"
29
+ ]
30
+ },
31
+ "displayName": {
32
+ "type": "string"
33
+ },
34
+ "description": {
35
+ "type": "string"
36
+ },
37
+ "visibility": {
38
+ "enum": [
39
+ "full",
40
+ "internal"
41
+ ]
42
+ },
43
+ "tag": {
44
+ "type": "string",
45
+ "minLength": 1,
46
+ "pattern": "^\\S(?:.*\\S)?$"
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,297 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "mhome.person.v1",
4
+ "title": "Person management inputs",
5
+ "$defs": {
6
+ "ListInput": {
7
+ "type": "object",
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "cursor": {
11
+ "type": "string"
12
+ },
13
+ "limit": {
14
+ "type": "integer",
15
+ "minimum": 1,
16
+ "maximum": 100
17
+ }
18
+ },
19
+ "required": []
20
+ },
21
+ "IdInput": {
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "properties": {
25
+ "id": {
26
+ "type": "string"
27
+ }
28
+ },
29
+ "required": [
30
+ "id"
31
+ ]
32
+ },
33
+ "PersonCreate": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "properties": {
37
+ "name": {
38
+ "type": "string"
39
+ },
40
+ "tags": {
41
+ "type": "array",
42
+ "items": {
43
+ "type": "string"
44
+ }
45
+ },
46
+ "notes": {
47
+ "type": "string"
48
+ },
49
+ "idempotencyKey": {
50
+ "type": "string"
51
+ }
52
+ },
53
+ "required": [
54
+ "name",
55
+ "idempotencyKey"
56
+ ]
57
+ },
58
+ "PersonUpdate": {
59
+ "type": "object",
60
+ "additionalProperties": false,
61
+ "properties": {
62
+ "id": {
63
+ "type": "string"
64
+ },
65
+ "expectedRevision": {
66
+ "type": "string",
67
+ "pattern": "^[0-9]+$"
68
+ },
69
+ "name": {
70
+ "type": "string"
71
+ },
72
+ "tags": {
73
+ "type": "array",
74
+ "items": {
75
+ "type": "string"
76
+ }
77
+ },
78
+ "notes": {
79
+ "type": "string"
80
+ }
81
+ },
82
+ "required": [
83
+ "id",
84
+ "expectedRevision",
85
+ "name",
86
+ "tags",
87
+ "notes"
88
+ ]
89
+ },
90
+ "RevisionInput": {
91
+ "type": "object",
92
+ "additionalProperties": false,
93
+ "properties": {
94
+ "id": {
95
+ "type": "string"
96
+ },
97
+ "expectedRevision": {
98
+ "type": "string",
99
+ "pattern": "^[0-9]+$"
100
+ }
101
+ },
102
+ "required": [
103
+ "id",
104
+ "expectedRevision"
105
+ ]
106
+ },
107
+ "ClusterAssign": {
108
+ "type": "object",
109
+ "additionalProperties": false,
110
+ "properties": {
111
+ "id": {
112
+ "type": "string"
113
+ },
114
+ "expectedRevision": {
115
+ "type": "string",
116
+ "pattern": "^[0-9]+$"
117
+ },
118
+ "personId": {
119
+ "type": [
120
+ "string",
121
+ "null"
122
+ ]
123
+ }
124
+ },
125
+ "required": [
126
+ "id",
127
+ "expectedRevision"
128
+ ]
129
+ },
130
+ "ClusterMerge": {
131
+ "type": "object",
132
+ "additionalProperties": false,
133
+ "properties": {
134
+ "sourceId": {
135
+ "type": "string"
136
+ },
137
+ "sourceRevision": {
138
+ "type": "string",
139
+ "pattern": "^[0-9]+$"
140
+ },
141
+ "targetId": {
142
+ "type": "string"
143
+ },
144
+ "targetRevision": {
145
+ "type": "string",
146
+ "pattern": "^[0-9]+$"
147
+ }
148
+ },
149
+ "required": [
150
+ "sourceId",
151
+ "sourceRevision",
152
+ "targetId",
153
+ "targetRevision"
154
+ ]
155
+ },
156
+ "ClusterSplit": {
157
+ "type": "object",
158
+ "additionalProperties": false,
159
+ "properties": {
160
+ "id": {
161
+ "type": "string"
162
+ },
163
+ "expectedRevision": {
164
+ "type": "string",
165
+ "pattern": "^[0-9]+$"
166
+ },
167
+ "sampleIds": {
168
+ "type": "array",
169
+ "items": {
170
+ "type": "string"
171
+ }
172
+ }
173
+ },
174
+ "required": [
175
+ "id",
176
+ "expectedRevision",
177
+ "sampleIds"
178
+ ]
179
+ },
180
+ "SampleReview": {
181
+ "type": "object",
182
+ "additionalProperties": false,
183
+ "properties": {
184
+ "id": {
185
+ "type": "string"
186
+ },
187
+ "clusterRevision": {
188
+ "type": "string",
189
+ "pattern": "^[0-9]+$"
190
+ },
191
+ "accept": {
192
+ "type": "boolean"
193
+ }
194
+ },
195
+ "required": [
196
+ "id",
197
+ "clusterRevision",
198
+ "accept"
199
+ ]
200
+ },
201
+ "ResetInput": {
202
+ "type": "object",
203
+ "additionalProperties": false,
204
+ "properties": {
205
+ "expectedEpoch": {
206
+ "type": "string"
207
+ }
208
+ },
209
+ "required": [
210
+ "expectedEpoch"
211
+ ]
212
+ },
213
+ "ExportInput": {
214
+ "type": "object",
215
+ "additionalProperties": false,
216
+ "properties": {
217
+ "password": {
218
+ "type": "string"
219
+ }
220
+ },
221
+ "required": [
222
+ "password"
223
+ ]
224
+ },
225
+ "ReadInput": {
226
+ "type": "object",
227
+ "additionalProperties": false,
228
+ "properties": {
229
+ "id": {
230
+ "type": "string"
231
+ },
232
+ "offset": {
233
+ "type": "integer",
234
+ "minimum": 0
235
+ }
236
+ },
237
+ "required": [
238
+ "id",
239
+ "offset"
240
+ ]
241
+ },
242
+ "ImportStart": {
243
+ "type": "object",
244
+ "additionalProperties": false,
245
+ "properties": {
246
+ "sizeBytes": {
247
+ "type": "integer",
248
+ "minimum": 1
249
+ }
250
+ },
251
+ "required": [
252
+ "sizeBytes"
253
+ ]
254
+ },
255
+ "ImportWrite": {
256
+ "type": "object",
257
+ "additionalProperties": false,
258
+ "properties": {
259
+ "id": {
260
+ "type": "string"
261
+ },
262
+ "offset": {
263
+ "type": "integer",
264
+ "minimum": 0
265
+ },
266
+ "dataBase64": {
267
+ "type": "string"
268
+ }
269
+ },
270
+ "required": [
271
+ "id",
272
+ "offset",
273
+ "dataBase64"
274
+ ]
275
+ },
276
+ "ImportCommit": {
277
+ "type": "object",
278
+ "additionalProperties": false,
279
+ "properties": {
280
+ "id": {
281
+ "type": "string"
282
+ },
283
+ "password": {
284
+ "type": "string"
285
+ },
286
+ "expectedEpoch": {
287
+ "type": "string"
288
+ }
289
+ },
290
+ "required": [
291
+ "id",
292
+ "password",
293
+ "expectedEpoch"
294
+ ]
295
+ }
296
+ }
297
+ }