@mokei/host-protocol 0.14.0 → 0.15.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.
- package/LICENSE +0 -0
- package/README.md +20 -1
- package/lib/flow-schemas.d.ts +764 -0
- package/lib/flow-schemas.d.ts.map +1 -0
- package/lib/flow-schemas.js +541 -0
- package/lib/index.d.ts +4672 -94
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +462 -7
- package/lib/monitor-schemas.d.ts +161 -0
- package/lib/monitor-schemas.d.ts.map +1 -0
- package/lib/monitor-schemas.js +207 -0
- package/lib/trace-schemas.d.ts +878 -0
- package/lib/trace-schemas.d.ts.map +1 -0
- package/lib/trace-schemas.js +269 -0
- package/package.json +6 -5
- package/CHANGELOG.md +0 -11
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
export const monitorAttachParamSchema = {
|
|
2
|
+
type: 'object',
|
|
3
|
+
properties: {
|
|
4
|
+
url: {
|
|
5
|
+
type: 'string'
|
|
6
|
+
}
|
|
7
|
+
},
|
|
8
|
+
required: [
|
|
9
|
+
'url'
|
|
10
|
+
],
|
|
11
|
+
additionalProperties: false
|
|
12
|
+
};
|
|
13
|
+
export const monitorAttachReceiveSchema = {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
type: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
const: 'attached'
|
|
19
|
+
},
|
|
20
|
+
attachmentID: {
|
|
21
|
+
type: 'string'
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
required: [
|
|
25
|
+
'type',
|
|
26
|
+
'attachmentID'
|
|
27
|
+
],
|
|
28
|
+
additionalProperties: false
|
|
29
|
+
};
|
|
30
|
+
export const monitorPresenceParamSchema = {
|
|
31
|
+
type: 'object',
|
|
32
|
+
properties: {
|
|
33
|
+
attachmentID: {
|
|
34
|
+
type: 'string'
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
additionalProperties: false
|
|
38
|
+
};
|
|
39
|
+
const monitorStateSchema = {
|
|
40
|
+
type: 'object',
|
|
41
|
+
properties: {
|
|
42
|
+
type: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
const: 'state'
|
|
45
|
+
},
|
|
46
|
+
visible: {
|
|
47
|
+
type: 'boolean'
|
|
48
|
+
},
|
|
49
|
+
canNotify: {
|
|
50
|
+
type: 'boolean'
|
|
51
|
+
},
|
|
52
|
+
activeItemID: {
|
|
53
|
+
type: 'string'
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
required: [
|
|
57
|
+
'type',
|
|
58
|
+
'visible',
|
|
59
|
+
'canNotify'
|
|
60
|
+
],
|
|
61
|
+
additionalProperties: false
|
|
62
|
+
};
|
|
63
|
+
const monitorPongSchema = {
|
|
64
|
+
type: 'object',
|
|
65
|
+
properties: {
|
|
66
|
+
type: {
|
|
67
|
+
type: 'string',
|
|
68
|
+
const: 'pong'
|
|
69
|
+
},
|
|
70
|
+
nonce: {
|
|
71
|
+
type: 'string'
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
required: [
|
|
75
|
+
'type',
|
|
76
|
+
'nonce'
|
|
77
|
+
],
|
|
78
|
+
additionalProperties: false
|
|
79
|
+
};
|
|
80
|
+
const monitorAckSchema = {
|
|
81
|
+
type: 'object',
|
|
82
|
+
properties: {
|
|
83
|
+
type: {
|
|
84
|
+
type: 'string',
|
|
85
|
+
const: 'ack'
|
|
86
|
+
},
|
|
87
|
+
attemptID: {
|
|
88
|
+
type: 'string'
|
|
89
|
+
},
|
|
90
|
+
shown: {
|
|
91
|
+
type: 'boolean'
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
required: [
|
|
95
|
+
'type',
|
|
96
|
+
'attemptID',
|
|
97
|
+
'shown'
|
|
98
|
+
],
|
|
99
|
+
additionalProperties: false
|
|
100
|
+
};
|
|
101
|
+
const monitorPingSchema = {
|
|
102
|
+
type: 'object',
|
|
103
|
+
properties: {
|
|
104
|
+
type: {
|
|
105
|
+
type: 'string',
|
|
106
|
+
const: 'ping'
|
|
107
|
+
},
|
|
108
|
+
nonce: {
|
|
109
|
+
type: 'string'
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
required: [
|
|
113
|
+
'type',
|
|
114
|
+
'nonce'
|
|
115
|
+
],
|
|
116
|
+
additionalProperties: false
|
|
117
|
+
};
|
|
118
|
+
const monitorNotifySchema = {
|
|
119
|
+
type: 'object',
|
|
120
|
+
properties: {
|
|
121
|
+
type: {
|
|
122
|
+
type: 'string',
|
|
123
|
+
const: 'notify'
|
|
124
|
+
},
|
|
125
|
+
attemptID: {
|
|
126
|
+
type: 'string'
|
|
127
|
+
},
|
|
128
|
+
deadline: {
|
|
129
|
+
type: 'number'
|
|
130
|
+
},
|
|
131
|
+
itemID: {
|
|
132
|
+
type: 'string'
|
|
133
|
+
},
|
|
134
|
+
title: {
|
|
135
|
+
type: 'string'
|
|
136
|
+
},
|
|
137
|
+
message: {
|
|
138
|
+
type: 'string'
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
required: [
|
|
142
|
+
'type',
|
|
143
|
+
'attemptID',
|
|
144
|
+
'deadline',
|
|
145
|
+
'itemID',
|
|
146
|
+
'title',
|
|
147
|
+
'message'
|
|
148
|
+
],
|
|
149
|
+
additionalProperties: false
|
|
150
|
+
};
|
|
151
|
+
const monitorPromptSchema = {
|
|
152
|
+
type: 'object',
|
|
153
|
+
properties: {
|
|
154
|
+
type: {
|
|
155
|
+
type: 'string',
|
|
156
|
+
const: 'prompt'
|
|
157
|
+
},
|
|
158
|
+
attemptID: {
|
|
159
|
+
type: 'string'
|
|
160
|
+
},
|
|
161
|
+
deadline: {
|
|
162
|
+
type: 'number'
|
|
163
|
+
},
|
|
164
|
+
itemID: {
|
|
165
|
+
type: 'string'
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
required: [
|
|
169
|
+
'type',
|
|
170
|
+
'attemptID',
|
|
171
|
+
'deadline',
|
|
172
|
+
'itemID'
|
|
173
|
+
],
|
|
174
|
+
additionalProperties: false
|
|
175
|
+
};
|
|
176
|
+
const monitorWithdrawSchema = {
|
|
177
|
+
type: 'object',
|
|
178
|
+
properties: {
|
|
179
|
+
type: {
|
|
180
|
+
type: 'string',
|
|
181
|
+
const: 'withdraw'
|
|
182
|
+
},
|
|
183
|
+
attemptID: {
|
|
184
|
+
type: 'string'
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
required: [
|
|
188
|
+
'type',
|
|
189
|
+
'attemptID'
|
|
190
|
+
],
|
|
191
|
+
additionalProperties: false
|
|
192
|
+
};
|
|
193
|
+
export const monitorPresenceSendSchema = {
|
|
194
|
+
anyOf: [
|
|
195
|
+
monitorStateSchema,
|
|
196
|
+
monitorPongSchema,
|
|
197
|
+
monitorAckSchema
|
|
198
|
+
]
|
|
199
|
+
};
|
|
200
|
+
export const monitorPresenceReceiveSchema = {
|
|
201
|
+
anyOf: [
|
|
202
|
+
monitorPingSchema,
|
|
203
|
+
monitorNotifySchema,
|
|
204
|
+
monitorPromptSchema,
|
|
205
|
+
monitorWithdrawSchema
|
|
206
|
+
]
|
|
207
|
+
};
|