@mhome/app-facade-protocol 1.57.0 → 1.60.1

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,153 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$defs": {
4
+ "view": {
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "page",
9
+ "presentation"
10
+ ],
11
+ "properties": {
12
+ "page": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "maxLength": 128
16
+ },
17
+ "presentation": {
18
+ "enum": [
19
+ "page",
20
+ "drawer"
21
+ ]
22
+ },
23
+ "payload": {
24
+ "type": "object"
25
+ }
26
+ }
27
+ },
28
+ "request": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "required": [
32
+ "current"
33
+ ],
34
+ "properties": {
35
+ "current": {
36
+ "$ref": "#/$defs/view"
37
+ },
38
+ "base": {
39
+ "$ref": "#/$defs/view"
40
+ }
41
+ },
42
+ "allOf": [
43
+ {
44
+ "if": {
45
+ "properties": {
46
+ "current": {
47
+ "properties": {
48
+ "presentation": {
49
+ "const": "drawer"
50
+ }
51
+ }
52
+ }
53
+ }
54
+ },
55
+ "then": {
56
+ "required": [
57
+ "base"
58
+ ],
59
+ "properties": {
60
+ "base": {
61
+ "properties": {
62
+ "presentation": {
63
+ "const": "page"
64
+ }
65
+ }
66
+ }
67
+ }
68
+ },
69
+ "else": {
70
+ "not": {
71
+ "required": [
72
+ "base"
73
+ ]
74
+ }
75
+ }
76
+ }
77
+ ]
78
+ },
79
+ "response": {
80
+ "type": "object",
81
+ "additionalProperties": false,
82
+ "properties": {}
83
+ },
84
+ "emptyRequest": {
85
+ "type": "object",
86
+ "additionalProperties": false,
87
+ "properties": {}
88
+ },
89
+ "openRequest": {
90
+ "type": "object",
91
+ "additionalProperties": false,
92
+ "required": [
93
+ "page"
94
+ ],
95
+ "properties": {
96
+ "page": {
97
+ "type": "string",
98
+ "minLength": 1,
99
+ "maxLength": 128,
100
+ "pattern": "\\S"
101
+ },
102
+ "payload": {
103
+ "type": "object"
104
+ }
105
+ }
106
+ },
107
+ "navigationResponse": {
108
+ "$ref": "#/$defs/request"
109
+ },
110
+ "catalogResponse": {
111
+ "type": "object",
112
+ "additionalProperties": false,
113
+ "required": [
114
+ "pages",
115
+ "pageDefinitions"
116
+ ],
117
+ "properties": {
118
+ "pages": {
119
+ "type": "array",
120
+ "uniqueItems": true,
121
+ "items": {
122
+ "type": "string",
123
+ "minLength": 1
124
+ }
125
+ },
126
+ "pageDefinitions": {
127
+ "type": "array",
128
+ "items": {
129
+ "type": "object",
130
+ "additionalProperties": false,
131
+ "required": [
132
+ "page",
133
+ "title",
134
+ "payloadSchema"
135
+ ],
136
+ "properties": {
137
+ "page": {
138
+ "type": "string",
139
+ "minLength": 1
140
+ },
141
+ "title": {
142
+ "type": "string"
143
+ },
144
+ "payloadSchema": {
145
+ "type": "object"
146
+ }
147
+ }
148
+ }
149
+ }
150
+ }
151
+ }
152
+ }
153
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.mhome.ai/app-facade/delegated-call.v1.schema.json",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "authority",
8
+ "call"
9
+ ],
10
+ "properties": {
11
+ "authority": {
12
+ "oneOf": [
13
+ {
14
+ "type": "object",
15
+ "additionalProperties": false,
16
+ "required": [
17
+ "kind"
18
+ ],
19
+ "properties": {
20
+ "kind": {
21
+ "const": "service"
22
+ }
23
+ }
24
+ },
25
+ {
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": [
29
+ "kind",
30
+ "principal"
31
+ ],
32
+ "properties": {
33
+ "kind": {
34
+ "const": "caller"
35
+ },
36
+ "principal": {
37
+ "oneOf": [
38
+ {
39
+ "type": "object",
40
+ "additionalProperties": false,
41
+ "required": [
42
+ "kind",
43
+ "userId"
44
+ ],
45
+ "properties": {
46
+ "kind": {
47
+ "const": "user"
48
+ },
49
+ "userId": {
50
+ "type": "string",
51
+ "minLength": 1
52
+ }
53
+ }
54
+ },
55
+ {
56
+ "type": "object",
57
+ "additionalProperties": false,
58
+ "required": [
59
+ "kind",
60
+ "tenantId",
61
+ "scopeId"
62
+ ],
63
+ "properties": {
64
+ "kind": {
65
+ "const": "space"
66
+ },
67
+ "tenantId": {
68
+ "type": "string",
69
+ "minLength": 1
70
+ },
71
+ "scopeId": {
72
+ "type": "string",
73
+ "minLength": 1
74
+ }
75
+ }
76
+ }
77
+ ]
78
+ }
79
+ }
80
+ }
81
+ ]
82
+ },
83
+ "call": {
84
+ "$ref": "facade-call.v1.schema.json"
85
+ }
86
+ }
87
+ }
@@ -0,0 +1,206 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://schemas.mhome.ai/app/host-management.v1.schema.json",
4
+ "$defs": {
5
+ "host_list": {
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [],
9
+ "properties": {}
10
+ },
11
+ "host_metrics": {
12
+ "type": "object",
13
+ "additionalProperties": false,
14
+ "required": [
15
+ "hostId"
16
+ ],
17
+ "properties": {
18
+ "hostId": {
19
+ "type": "string",
20
+ "minLength": 1,
21
+ "maxLength": 128
22
+ }
23
+ }
24
+ },
25
+ "host_administrator_list": {
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": [
29
+ "hostId"
30
+ ],
31
+ "properties": {
32
+ "hostId": {
33
+ "type": "string",
34
+ "minLength": 1,
35
+ "maxLength": 128
36
+ }
37
+ }
38
+ },
39
+ "host_administrator_request": {
40
+ "type": "object",
41
+ "additionalProperties": false,
42
+ "required": [
43
+ "hostId"
44
+ ],
45
+ "properties": {
46
+ "hostId": {
47
+ "type": "string",
48
+ "minLength": 1,
49
+ "maxLength": 128
50
+ }
51
+ }
52
+ },
53
+ "host_administrator_status": {
54
+ "type": "object",
55
+ "additionalProperties": false,
56
+ "required": [
57
+ "hostId"
58
+ ],
59
+ "properties": {
60
+ "hostId": {
61
+ "type": "string",
62
+ "minLength": 1,
63
+ "maxLength": 128
64
+ }
65
+ }
66
+ },
67
+ "host_administrator_cancel": {
68
+ "type": "object",
69
+ "additionalProperties": false,
70
+ "required": [
71
+ "hostId"
72
+ ],
73
+ "properties": {
74
+ "hostId": {
75
+ "type": "string",
76
+ "minLength": 1,
77
+ "maxLength": 128
78
+ }
79
+ }
80
+ },
81
+ "host_administrator_approve": {
82
+ "type": "object",
83
+ "additionalProperties": false,
84
+ "required": [
85
+ "hostId",
86
+ "requestId"
87
+ ],
88
+ "properties": {
89
+ "hostId": {
90
+ "type": "string",
91
+ "minLength": 1,
92
+ "maxLength": 128
93
+ },
94
+ "requestId": {
95
+ "type": "string",
96
+ "minLength": 1,
97
+ "maxLength": 128
98
+ }
99
+ }
100
+ },
101
+ "host_administrator_reject": {
102
+ "type": "object",
103
+ "additionalProperties": false,
104
+ "required": [
105
+ "hostId",
106
+ "requestId"
107
+ ],
108
+ "properties": {
109
+ "hostId": {
110
+ "type": "string",
111
+ "minLength": 1,
112
+ "maxLength": 128
113
+ },
114
+ "requestId": {
115
+ "type": "string",
116
+ "minLength": 1,
117
+ "maxLength": 128
118
+ }
119
+ }
120
+ },
121
+ "host_permissions_get": {
122
+ "type": "object",
123
+ "additionalProperties": false,
124
+ "required": [
125
+ "hostId"
126
+ ],
127
+ "properties": {
128
+ "hostId": {
129
+ "type": "string",
130
+ "minLength": 1,
131
+ "maxLength": 128
132
+ }
133
+ }
134
+ },
135
+ "host_service_install": {
136
+ "type": "object",
137
+ "additionalProperties": false,
138
+ "required": [
139
+ "hostId",
140
+ "service"
141
+ ],
142
+ "properties": {
143
+ "hostId": {
144
+ "type": "string",
145
+ "minLength": 1,
146
+ "maxLength": 128
147
+ },
148
+ "service": {
149
+ "type": "string",
150
+ "pattern": "^[a-z][a-z0-9-]{0,79}$",
151
+ "description": "core or a Plugin service ID without the node- package prefix",
152
+ "not": {
153
+ "anyOf": [
154
+ {
155
+ "enum": [
156
+ "host",
157
+ "client",
158
+ "all",
159
+ "node"
160
+ ]
161
+ },
162
+ {
163
+ "pattern": "^node-"
164
+ }
165
+ ]
166
+ }
167
+ }
168
+ }
169
+ },
170
+ "host_service_restart": {
171
+ "type": "object",
172
+ "additionalProperties": false,
173
+ "required": [
174
+ "hostId",
175
+ "service"
176
+ ],
177
+ "properties": {
178
+ "hostId": {
179
+ "type": "string",
180
+ "minLength": 1,
181
+ "maxLength": 128
182
+ },
183
+ "service": {
184
+ "type": "string",
185
+ "pattern": "^[a-z][a-z0-9-]{0,79}$",
186
+ "description": "core or a Plugin service ID without the node- package prefix",
187
+ "not": {
188
+ "anyOf": [
189
+ {
190
+ "enum": [
191
+ "host",
192
+ "client",
193
+ "all",
194
+ "node"
195
+ ]
196
+ },
197
+ {
198
+ "pattern": "^node-"
199
+ }
200
+ ]
201
+ }
202
+ }
203
+ }
204
+ }
205
+ }
206
+ }
@@ -0,0 +1,93 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "required": [
5
+ "version",
6
+ "plugins",
7
+ "platformErrors"
8
+ ],
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "version": {
12
+ "const": "1"
13
+ },
14
+ "plugins": {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "object",
18
+ "required": [
19
+ "nodeType",
20
+ "displayName",
21
+ "description",
22
+ "componentId",
23
+ "bindingCardinality",
24
+ "id",
25
+ "serviceId",
26
+ "kind",
27
+ "platforms",
28
+ "versions"
29
+ ],
30
+ "additionalProperties": false,
31
+ "properties": {
32
+ "nodeType": {
33
+ "type": "string",
34
+ "minLength": 1
35
+ },
36
+ "displayName": {
37
+ "type": "string",
38
+ "minLength": 1
39
+ },
40
+ "description": {
41
+ "type": "string",
42
+ "minLength": 1
43
+ },
44
+ "componentId": {
45
+ "type": "string",
46
+ "minLength": 1
47
+ },
48
+ "bindingCardinality": {
49
+ "enum": [
50
+ "single",
51
+ "multiple"
52
+ ]
53
+ },
54
+ "id": {
55
+ "type": "string",
56
+ "minLength": 1
57
+ },
58
+ "serviceId": {
59
+ "type": "string",
60
+ "minLength": 1
61
+ },
62
+ "kind": {
63
+ "enum": [
64
+ "core",
65
+ "extension"
66
+ ]
67
+ },
68
+ "platforms": {
69
+ "type": "array",
70
+ "uniqueItems": true,
71
+ "items": {
72
+ "type": "string",
73
+ "minLength": 1
74
+ }
75
+ },
76
+ "versions": {
77
+ "type": "object",
78
+ "additionalProperties": {
79
+ "type": "string",
80
+ "minLength": 1
81
+ }
82
+ }
83
+ }
84
+ }
85
+ },
86
+ "platformErrors": {
87
+ "type": "object",
88
+ "additionalProperties": {
89
+ "type": "string"
90
+ }
91
+ }
92
+ }
93
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mhome.ai/schema/user-profile.v1.schema.json",
4
+ "title": "MeowLink account profile",
5
+ "description": "Cloud account display name and private avatar. The account stores an object key. Read and upload URLs are short-lived and are not durable links. Request bodies are selected by target and defined alongside the profile.",
6
+ "$ref": "#/$defs/profile",
7
+ "$defs": {
8
+ "profileGetRequest": {
9
+ "type": "object",
10
+ "additionalProperties": false
11
+ },
12
+ "profileUpdateRequest": {
13
+ "type": "object",
14
+ "additionalProperties": false,
15
+ "required": ["name"],
16
+ "properties": {
17
+ "name": { "type": "string", "minLength": 1, "maxLength": 40 }
18
+ }
19
+ },
20
+ "prepareAvatarRequest": {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "required": ["contentType"],
24
+ "properties": {
25
+ "contentType": {
26
+ "enum": ["image/jpeg", "image/png", "image/webp"]
27
+ }
28
+ }
29
+ },
30
+ "commitAvatarRequest": {
31
+ "type": "object",
32
+ "additionalProperties": false,
33
+ "required": ["objectKey"],
34
+ "properties": {
35
+ "objectKey": { "type": "string", "minLength": 1, "maxLength": 512 }
36
+ }
37
+ },
38
+ "clearAvatarRequest": {
39
+ "type": "object",
40
+ "additionalProperties": false
41
+ },
42
+ "profile": {
43
+ "type": "object",
44
+ "additionalProperties": false,
45
+ "required": ["name", "email"],
46
+ "properties": {
47
+ "name": { "type": "string" },
48
+ "email": { "type": "string" },
49
+ "avatarUrl": { "type": ["string", "null"] },
50
+ "avatarExpiresAtMs": { "type": ["integer", "null"] }
51
+ }
52
+ },
53
+ "preparedAvatarUpload": {
54
+ "type": "object",
55
+ "additionalProperties": false,
56
+ "required": ["objectKey", "uploadUrl", "expiresAtMs", "contentType", "maxBytes"],
57
+ "properties": {
58
+ "objectKey": { "type": "string", "minLength": 1 },
59
+ "uploadUrl": { "type": "string", "minLength": 1 },
60
+ "expiresAtMs": { "type": "integer" },
61
+ "contentType": { "enum": ["image/jpeg", "image/png", "image/webp"] },
62
+ "maxBytes": { "type": "integer", "minimum": 1 }
63
+ }
64
+ }
65
+ }
66
+ }