@mokei/host-protocol 0.13.1 → 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 +8 -7
- package/CHANGELOG.md +0 -9
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAsB,MAAM,kBAAkB,CAAA;AAClG,OAAO,KAAK,EAAE,UAAU,EAAU,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAsB,MAAM,kBAAkB,CAAA;AAClG,OAAO,KAAK,EAAE,UAAU,EAAU,MAAM,eAAe,CAAA;AAgCvD,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,KAAK,SAAS,EACd,eAAe,EACf,KAAK,SAAS,EACd,KAAK,UAAU,EACf,eAAe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,MAAM,QAAQ,EACd,MAAM,YAAY,GAAG,gBAAgB,GAAG,cAAc,CACvD,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAA;AACxD,MAAM,MAAM,aAAa,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAA;AACxD,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAA;AAChE,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAA"}
|
package/lib/index.js
CHANGED
|
@@ -8,7 +8,13 @@
|
|
|
8
8
|
* ```
|
|
9
9
|
*
|
|
10
10
|
* @module host-protocol
|
|
11
|
-
*/
|
|
11
|
+
*/ import { flowCheckResultSchema, flowRunSnapshotSchema, flowServiceStatusSchema, flowSummarySchema, inboxItemSchema, jsonDefinitions, jsonObjectSchema, runStateSchema, storedLogSchema, storedSpanSchema } from './flow-schemas.js';
|
|
12
|
+
import { monitorAttachParamSchema, monitorAttachReceiveSchema, monitorPresenceParamSchema, monitorPresenceReceiveSchema, monitorPresenceSendSchema } from './monitor-schemas.js';
|
|
13
|
+
import { openSpanSchema, traceLogSchema, traceSummarySchema, tracesGetParamsSchema, tracesGetResultSchema, tracesListParamsSchema, tracesListResultSchema, tracingInfoSchema } from './trace-schemas.js';
|
|
14
|
+
export { flowCheckResultSchema, flowIssueSchema, flowRunSnapshotSchema, flowServiceStatusSchema, flowSummarySchema, inboxItemSchema, storedLogSchema, storedSpanSchema } from './flow-schemas.js';
|
|
15
|
+
export { monitorAttachParamSchema, monitorAttachReceiveSchema, monitorPresenceParamSchema, monitorPresenceReceiveSchema, monitorPresenceSendSchema } from './monitor-schemas.js';
|
|
16
|
+
export { openSpanSchema, traceLogSchema, traceSummarySchema, tracesGetParamsSchema, tracesGetResultSchema, tracesListParamsSchema, tracesListResultSchema, tracingInfoSchema } from './trace-schemas.js';
|
|
17
|
+
export const hostEventMetaSchema = {
|
|
12
18
|
type: 'object',
|
|
13
19
|
properties: {
|
|
14
20
|
contextID: {
|
|
@@ -28,7 +34,25 @@
|
|
|
28
34
|
],
|
|
29
35
|
additionalProperties: false
|
|
30
36
|
};
|
|
37
|
+
export const serviceEventMetaSchema = {
|
|
38
|
+
type: 'object',
|
|
39
|
+
properties: {
|
|
40
|
+
eventID: {
|
|
41
|
+
type: 'string'
|
|
42
|
+
},
|
|
43
|
+
time: {
|
|
44
|
+
type: 'integer'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
required: [
|
|
48
|
+
'eventID',
|
|
49
|
+
'time'
|
|
50
|
+
],
|
|
51
|
+
additionalProperties: false
|
|
52
|
+
};
|
|
31
53
|
export const hostEventSchema = {
|
|
54
|
+
type: 'object',
|
|
55
|
+
definitions: jsonDefinitions,
|
|
32
56
|
anyOf: [
|
|
33
57
|
{
|
|
34
58
|
type: 'object',
|
|
@@ -70,6 +94,107 @@ export const hostEventSchema = {
|
|
|
70
94
|
],
|
|
71
95
|
additionalProperties: false
|
|
72
96
|
},
|
|
97
|
+
{
|
|
98
|
+
type: 'object',
|
|
99
|
+
properties: {
|
|
100
|
+
type: {
|
|
101
|
+
type: 'string',
|
|
102
|
+
const: 'service:status'
|
|
103
|
+
},
|
|
104
|
+
meta: serviceEventMetaSchema,
|
|
105
|
+
data: {
|
|
106
|
+
type: 'object',
|
|
107
|
+
properties: {
|
|
108
|
+
service: {
|
|
109
|
+
type: 'string',
|
|
110
|
+
const: 'flow'
|
|
111
|
+
},
|
|
112
|
+
status: flowServiceStatusSchema
|
|
113
|
+
},
|
|
114
|
+
required: [
|
|
115
|
+
'service',
|
|
116
|
+
'status'
|
|
117
|
+
],
|
|
118
|
+
additionalProperties: false
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
required: [
|
|
122
|
+
'type',
|
|
123
|
+
'meta',
|
|
124
|
+
'data'
|
|
125
|
+
],
|
|
126
|
+
additionalProperties: false
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: 'object',
|
|
130
|
+
properties: {
|
|
131
|
+
type: {
|
|
132
|
+
type: 'string',
|
|
133
|
+
const: 'run:state'
|
|
134
|
+
},
|
|
135
|
+
meta: serviceEventMetaSchema,
|
|
136
|
+
data: flowRunSnapshotSchema
|
|
137
|
+
},
|
|
138
|
+
required: [
|
|
139
|
+
'type',
|
|
140
|
+
'meta',
|
|
141
|
+
'data'
|
|
142
|
+
],
|
|
143
|
+
additionalProperties: false
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
type: 'object',
|
|
147
|
+
properties: {
|
|
148
|
+
type: {
|
|
149
|
+
type: 'string',
|
|
150
|
+
const: 'inbox:added'
|
|
151
|
+
},
|
|
152
|
+
meta: serviceEventMetaSchema,
|
|
153
|
+
data: inboxItemSchema
|
|
154
|
+
},
|
|
155
|
+
required: [
|
|
156
|
+
'type',
|
|
157
|
+
'meta',
|
|
158
|
+
'data'
|
|
159
|
+
],
|
|
160
|
+
additionalProperties: false
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
type: 'object',
|
|
164
|
+
properties: {
|
|
165
|
+
type: {
|
|
166
|
+
type: 'string',
|
|
167
|
+
const: 'inbox:settled'
|
|
168
|
+
},
|
|
169
|
+
meta: serviceEventMetaSchema,
|
|
170
|
+
data: {
|
|
171
|
+
type: 'object',
|
|
172
|
+
properties: {
|
|
173
|
+
item: inboxItemSchema,
|
|
174
|
+
outcome: {
|
|
175
|
+
type: 'string',
|
|
176
|
+
enum: [
|
|
177
|
+
'answered',
|
|
178
|
+
'declined',
|
|
179
|
+
'cancelled',
|
|
180
|
+
'withdrawn'
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
required: [
|
|
185
|
+
'item',
|
|
186
|
+
'outcome'
|
|
187
|
+
],
|
|
188
|
+
additionalProperties: false
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
required: [
|
|
192
|
+
'type',
|
|
193
|
+
'meta',
|
|
194
|
+
'data'
|
|
195
|
+
],
|
|
196
|
+
additionalProperties: false
|
|
197
|
+
},
|
|
73
198
|
{
|
|
74
199
|
type: 'object',
|
|
75
200
|
properties: {
|
|
@@ -120,7 +245,77 @@ export const hostEventSchema = {
|
|
|
120
245
|
'data'
|
|
121
246
|
],
|
|
122
247
|
additionalProperties: false
|
|
123
|
-
}
|
|
248
|
+
},
|
|
249
|
+
...[
|
|
250
|
+
{
|
|
251
|
+
type: 'object',
|
|
252
|
+
properties: {
|
|
253
|
+
type: {
|
|
254
|
+
type: 'string',
|
|
255
|
+
const: 'span:start'
|
|
256
|
+
},
|
|
257
|
+
meta: serviceEventMetaSchema,
|
|
258
|
+
data: openSpanSchema
|
|
259
|
+
},
|
|
260
|
+
required: [
|
|
261
|
+
'type',
|
|
262
|
+
'meta',
|
|
263
|
+
'data'
|
|
264
|
+
],
|
|
265
|
+
additionalProperties: false
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
type: 'object',
|
|
269
|
+
properties: {
|
|
270
|
+
type: {
|
|
271
|
+
type: 'string',
|
|
272
|
+
const: 'span:end'
|
|
273
|
+
},
|
|
274
|
+
meta: serviceEventMetaSchema,
|
|
275
|
+
data: storedSpanSchema
|
|
276
|
+
},
|
|
277
|
+
required: [
|
|
278
|
+
'type',
|
|
279
|
+
'meta',
|
|
280
|
+
'data'
|
|
281
|
+
],
|
|
282
|
+
additionalProperties: false
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
type: 'object',
|
|
286
|
+
properties: {
|
|
287
|
+
type: {
|
|
288
|
+
type: 'string',
|
|
289
|
+
const: 'log'
|
|
290
|
+
},
|
|
291
|
+
meta: serviceEventMetaSchema,
|
|
292
|
+
data: traceLogSchema
|
|
293
|
+
},
|
|
294
|
+
required: [
|
|
295
|
+
'type',
|
|
296
|
+
'meta',
|
|
297
|
+
'data'
|
|
298
|
+
],
|
|
299
|
+
additionalProperties: false
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
type: 'object',
|
|
303
|
+
properties: {
|
|
304
|
+
type: {
|
|
305
|
+
type: 'string',
|
|
306
|
+
const: 'trace:summary'
|
|
307
|
+
},
|
|
308
|
+
meta: serviceEventMetaSchema,
|
|
309
|
+
data: traceSummarySchema
|
|
310
|
+
},
|
|
311
|
+
required: [
|
|
312
|
+
'type',
|
|
313
|
+
'meta',
|
|
314
|
+
'data'
|
|
315
|
+
],
|
|
316
|
+
additionalProperties: false
|
|
317
|
+
}
|
|
318
|
+
]
|
|
124
319
|
]
|
|
125
320
|
};
|
|
126
321
|
export const activeContextInfoSchema = {
|
|
@@ -143,20 +338,58 @@ export const hostInfoResultSchema = {
|
|
|
143
338
|
},
|
|
144
339
|
startedTime: {
|
|
145
340
|
type: 'integer'
|
|
146
|
-
}
|
|
341
|
+
},
|
|
342
|
+
flowService: flowServiceStatusSchema,
|
|
343
|
+
tracing: tracingInfoSchema
|
|
147
344
|
},
|
|
148
345
|
required: [
|
|
149
346
|
'activeContexts',
|
|
150
|
-
'startedTime'
|
|
347
|
+
'startedTime',
|
|
348
|
+
'flowService'
|
|
349
|
+
],
|
|
350
|
+
additionalProperties: false
|
|
351
|
+
};
|
|
352
|
+
const runIDParamSchema = {
|
|
353
|
+
type: 'object',
|
|
354
|
+
properties: {
|
|
355
|
+
runID: {
|
|
356
|
+
type: 'string'
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
required: [
|
|
360
|
+
'runID'
|
|
361
|
+
],
|
|
362
|
+
additionalProperties: false
|
|
363
|
+
};
|
|
364
|
+
const inboxIDParamSchema = {
|
|
365
|
+
type: 'object',
|
|
366
|
+
properties: {
|
|
367
|
+
id: {
|
|
368
|
+
type: 'string'
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
required: [
|
|
372
|
+
'id'
|
|
373
|
+
],
|
|
374
|
+
additionalProperties: false
|
|
375
|
+
};
|
|
376
|
+
const settledResultSchema = {
|
|
377
|
+
type: 'object',
|
|
378
|
+
properties: {
|
|
379
|
+
settled: {
|
|
380
|
+
type: 'boolean',
|
|
381
|
+
const: true
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
required: [
|
|
385
|
+
'settled'
|
|
151
386
|
],
|
|
152
387
|
additionalProperties: false
|
|
153
388
|
};
|
|
154
389
|
export const protocol = {
|
|
155
390
|
events: {
|
|
156
391
|
type: 'stream',
|
|
157
|
-
receive:
|
|
158
|
-
type: 'object'
|
|
159
|
-
}
|
|
392
|
+
receive: hostEventSchema
|
|
160
393
|
},
|
|
161
394
|
info: {
|
|
162
395
|
type: 'request',
|
|
@@ -165,6 +398,25 @@ export const protocol = {
|
|
|
165
398
|
shutdown: {
|
|
166
399
|
type: 'request'
|
|
167
400
|
},
|
|
401
|
+
'monitor.attach': {
|
|
402
|
+
type: 'stream',
|
|
403
|
+
param: monitorAttachParamSchema,
|
|
404
|
+
receive: monitorAttachReceiveSchema
|
|
405
|
+
},
|
|
406
|
+
'monitor.presence': {
|
|
407
|
+
type: 'channel',
|
|
408
|
+
param: monitorPresenceParamSchema,
|
|
409
|
+
send: {
|
|
410
|
+
anyOf: [
|
|
411
|
+
...monitorPresenceSendSchema.anyOf
|
|
412
|
+
]
|
|
413
|
+
},
|
|
414
|
+
receive: {
|
|
415
|
+
anyOf: [
|
|
416
|
+
...monitorPresenceReceiveSchema.anyOf
|
|
417
|
+
]
|
|
418
|
+
}
|
|
419
|
+
},
|
|
168
420
|
spawn: {
|
|
169
421
|
type: 'channel',
|
|
170
422
|
param: {
|
|
@@ -197,5 +449,208 @@ export const protocol = {
|
|
|
197
449
|
receive: {
|
|
198
450
|
type: 'object'
|
|
199
451
|
}
|
|
452
|
+
},
|
|
453
|
+
'flows.list': {
|
|
454
|
+
type: 'request',
|
|
455
|
+
result: {
|
|
456
|
+
definitions: jsonDefinitions,
|
|
457
|
+
type: 'array',
|
|
458
|
+
items: flowSummarySchema
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
'flows.check': {
|
|
462
|
+
type: 'request',
|
|
463
|
+
param: {
|
|
464
|
+
definitions: jsonDefinitions,
|
|
465
|
+
type: 'object',
|
|
466
|
+
properties: {
|
|
467
|
+
definition: jsonObjectSchema
|
|
468
|
+
},
|
|
469
|
+
required: [
|
|
470
|
+
'definition'
|
|
471
|
+
],
|
|
472
|
+
additionalProperties: false
|
|
473
|
+
},
|
|
474
|
+
result: flowCheckResultSchema
|
|
475
|
+
},
|
|
476
|
+
'runs.start': {
|
|
477
|
+
type: 'request',
|
|
478
|
+
param: {
|
|
479
|
+
definitions: jsonDefinitions,
|
|
480
|
+
anyOf: [
|
|
481
|
+
{
|
|
482
|
+
type: 'object',
|
|
483
|
+
properties: {
|
|
484
|
+
flow: {
|
|
485
|
+
type: 'string'
|
|
486
|
+
},
|
|
487
|
+
input: jsonObjectSchema,
|
|
488
|
+
label: {
|
|
489
|
+
type: 'string'
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
required: [
|
|
493
|
+
'flow'
|
|
494
|
+
],
|
|
495
|
+
additionalProperties: false
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
type: 'object',
|
|
499
|
+
properties: {
|
|
500
|
+
definition: jsonObjectSchema,
|
|
501
|
+
input: jsonObjectSchema,
|
|
502
|
+
label: {
|
|
503
|
+
type: 'string'
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
required: [
|
|
507
|
+
'definition'
|
|
508
|
+
],
|
|
509
|
+
additionalProperties: false
|
|
510
|
+
}
|
|
511
|
+
]
|
|
512
|
+
},
|
|
513
|
+
result: flowRunSnapshotSchema
|
|
514
|
+
},
|
|
515
|
+
'runs.get': {
|
|
516
|
+
type: 'request',
|
|
517
|
+
param: runIDParamSchema,
|
|
518
|
+
result: flowRunSnapshotSchema
|
|
519
|
+
},
|
|
520
|
+
'runs.list': {
|
|
521
|
+
type: 'request',
|
|
522
|
+
param: {
|
|
523
|
+
type: 'object',
|
|
524
|
+
properties: {
|
|
525
|
+
states: {
|
|
526
|
+
type: 'array',
|
|
527
|
+
items: runStateSchema
|
|
528
|
+
},
|
|
529
|
+
limit: {
|
|
530
|
+
type: 'integer',
|
|
531
|
+
minimum: 0
|
|
532
|
+
},
|
|
533
|
+
updatedBefore: {
|
|
534
|
+
type: 'number'
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
additionalProperties: false
|
|
538
|
+
},
|
|
539
|
+
result: {
|
|
540
|
+
definitions: jsonDefinitions,
|
|
541
|
+
type: 'array',
|
|
542
|
+
items: flowRunSnapshotSchema
|
|
543
|
+
}
|
|
544
|
+
},
|
|
545
|
+
'runs.cancel': {
|
|
546
|
+
type: 'request',
|
|
547
|
+
param: runIDParamSchema,
|
|
548
|
+
result: flowRunSnapshotSchema
|
|
549
|
+
},
|
|
550
|
+
'runs.trace': {
|
|
551
|
+
type: 'request',
|
|
552
|
+
param: runIDParamSchema,
|
|
553
|
+
result: {
|
|
554
|
+
definitions: jsonDefinitions,
|
|
555
|
+
type: 'object',
|
|
556
|
+
properties: {
|
|
557
|
+
spans: {
|
|
558
|
+
type: 'array',
|
|
559
|
+
items: storedSpanSchema
|
|
560
|
+
},
|
|
561
|
+
logs: {
|
|
562
|
+
type: 'array',
|
|
563
|
+
items: storedLogSchema
|
|
564
|
+
}
|
|
565
|
+
},
|
|
566
|
+
required: [
|
|
567
|
+
'spans',
|
|
568
|
+
'logs'
|
|
569
|
+
],
|
|
570
|
+
additionalProperties: false
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
'traces.list': {
|
|
574
|
+
type: 'request',
|
|
575
|
+
param: tracesListParamsSchema,
|
|
576
|
+
result: tracesListResultSchema
|
|
577
|
+
},
|
|
578
|
+
'traces.get': {
|
|
579
|
+
type: 'request',
|
|
580
|
+
param: tracesGetParamsSchema,
|
|
581
|
+
result: tracesGetResultSchema
|
|
582
|
+
},
|
|
583
|
+
'inbox.list': {
|
|
584
|
+
type: 'request',
|
|
585
|
+
param: {
|
|
586
|
+
type: 'object',
|
|
587
|
+
properties: {
|
|
588
|
+
runID: {
|
|
589
|
+
type: 'string'
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
additionalProperties: false
|
|
593
|
+
},
|
|
594
|
+
result: {
|
|
595
|
+
definitions: jsonDefinitions,
|
|
596
|
+
type: 'array',
|
|
597
|
+
items: inboxItemSchema
|
|
598
|
+
}
|
|
599
|
+
},
|
|
600
|
+
'inbox.get': {
|
|
601
|
+
type: 'request',
|
|
602
|
+
param: inboxIDParamSchema,
|
|
603
|
+
result: inboxItemSchema
|
|
604
|
+
},
|
|
605
|
+
'inbox.answer': {
|
|
606
|
+
type: 'request',
|
|
607
|
+
param: {
|
|
608
|
+
definitions: jsonDefinitions,
|
|
609
|
+
...inboxIDParamSchema,
|
|
610
|
+
properties: {
|
|
611
|
+
...inboxIDParamSchema.properties,
|
|
612
|
+
content: jsonObjectSchema
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
result: settledResultSchema
|
|
616
|
+
},
|
|
617
|
+
'inbox.decline': {
|
|
618
|
+
type: 'request',
|
|
619
|
+
param: {
|
|
620
|
+
...inboxIDParamSchema,
|
|
621
|
+
properties: {
|
|
622
|
+
...inboxIDParamSchema.properties,
|
|
623
|
+
reason: {
|
|
624
|
+
type: 'string'
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
result: settledResultSchema
|
|
629
|
+
},
|
|
630
|
+
'inbox.cancel': {
|
|
631
|
+
type: 'request',
|
|
632
|
+
param: inboxIDParamSchema,
|
|
633
|
+
result: settledResultSchema
|
|
634
|
+
},
|
|
635
|
+
'inbox.prompt': {
|
|
636
|
+
type: 'request',
|
|
637
|
+
param: inboxIDParamSchema,
|
|
638
|
+
result: {
|
|
639
|
+
type: 'object',
|
|
640
|
+
properties: {
|
|
641
|
+
action: {
|
|
642
|
+
type: 'string',
|
|
643
|
+
enum: [
|
|
644
|
+
'accept',
|
|
645
|
+
'decline',
|
|
646
|
+
'cancel'
|
|
647
|
+
]
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
required: [
|
|
651
|
+
'action'
|
|
652
|
+
],
|
|
653
|
+
additionalProperties: false
|
|
654
|
+
}
|
|
200
655
|
}
|
|
201
656
|
};
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import type { FromSchema } from '@sozai/schema';
|
|
2
|
+
export declare const monitorAttachParamSchema: {
|
|
3
|
+
readonly type: "object";
|
|
4
|
+
readonly properties: {
|
|
5
|
+
readonly url: {
|
|
6
|
+
readonly type: "string";
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
readonly required: readonly ["url"];
|
|
10
|
+
readonly additionalProperties: false;
|
|
11
|
+
};
|
|
12
|
+
export declare const monitorAttachReceiveSchema: {
|
|
13
|
+
readonly type: "object";
|
|
14
|
+
readonly properties: {
|
|
15
|
+
readonly type: {
|
|
16
|
+
readonly type: "string";
|
|
17
|
+
readonly const: "attached";
|
|
18
|
+
};
|
|
19
|
+
readonly attachmentID: {
|
|
20
|
+
readonly type: "string";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
readonly required: readonly ["type", "attachmentID"];
|
|
24
|
+
readonly additionalProperties: false;
|
|
25
|
+
};
|
|
26
|
+
export declare const monitorPresenceParamSchema: {
|
|
27
|
+
readonly type: "object";
|
|
28
|
+
readonly properties: {
|
|
29
|
+
readonly attachmentID: {
|
|
30
|
+
readonly type: "string";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
readonly additionalProperties: false;
|
|
34
|
+
};
|
|
35
|
+
export declare const monitorPresenceSendSchema: {
|
|
36
|
+
readonly anyOf: readonly [{
|
|
37
|
+
readonly type: "object";
|
|
38
|
+
readonly properties: {
|
|
39
|
+
readonly type: {
|
|
40
|
+
readonly type: "string";
|
|
41
|
+
readonly const: "state";
|
|
42
|
+
};
|
|
43
|
+
readonly visible: {
|
|
44
|
+
readonly type: "boolean";
|
|
45
|
+
};
|
|
46
|
+
readonly canNotify: {
|
|
47
|
+
readonly type: "boolean";
|
|
48
|
+
};
|
|
49
|
+
readonly activeItemID: {
|
|
50
|
+
readonly type: "string";
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
readonly required: readonly ["type", "visible", "canNotify"];
|
|
54
|
+
readonly additionalProperties: false;
|
|
55
|
+
}, {
|
|
56
|
+
readonly type: "object";
|
|
57
|
+
readonly properties: {
|
|
58
|
+
readonly type: {
|
|
59
|
+
readonly type: "string";
|
|
60
|
+
readonly const: "pong";
|
|
61
|
+
};
|
|
62
|
+
readonly nonce: {
|
|
63
|
+
readonly type: "string";
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
readonly required: readonly ["type", "nonce"];
|
|
67
|
+
readonly additionalProperties: false;
|
|
68
|
+
}, {
|
|
69
|
+
readonly type: "object";
|
|
70
|
+
readonly properties: {
|
|
71
|
+
readonly type: {
|
|
72
|
+
readonly type: "string";
|
|
73
|
+
readonly const: "ack";
|
|
74
|
+
};
|
|
75
|
+
readonly attemptID: {
|
|
76
|
+
readonly type: "string";
|
|
77
|
+
};
|
|
78
|
+
readonly shown: {
|
|
79
|
+
readonly type: "boolean";
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
readonly required: readonly ["type", "attemptID", "shown"];
|
|
83
|
+
readonly additionalProperties: false;
|
|
84
|
+
}];
|
|
85
|
+
};
|
|
86
|
+
export declare const monitorPresenceReceiveSchema: {
|
|
87
|
+
readonly anyOf: readonly [{
|
|
88
|
+
readonly type: "object";
|
|
89
|
+
readonly properties: {
|
|
90
|
+
readonly type: {
|
|
91
|
+
readonly type: "string";
|
|
92
|
+
readonly const: "ping";
|
|
93
|
+
};
|
|
94
|
+
readonly nonce: {
|
|
95
|
+
readonly type: "string";
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
readonly required: readonly ["type", "nonce"];
|
|
99
|
+
readonly additionalProperties: false;
|
|
100
|
+
}, {
|
|
101
|
+
readonly type: "object";
|
|
102
|
+
readonly properties: {
|
|
103
|
+
readonly type: {
|
|
104
|
+
readonly type: "string";
|
|
105
|
+
readonly const: "notify";
|
|
106
|
+
};
|
|
107
|
+
readonly attemptID: {
|
|
108
|
+
readonly type: "string";
|
|
109
|
+
};
|
|
110
|
+
readonly deadline: {
|
|
111
|
+
readonly type: "number";
|
|
112
|
+
};
|
|
113
|
+
readonly itemID: {
|
|
114
|
+
readonly type: "string";
|
|
115
|
+
};
|
|
116
|
+
readonly title: {
|
|
117
|
+
readonly type: "string";
|
|
118
|
+
};
|
|
119
|
+
readonly message: {
|
|
120
|
+
readonly type: "string";
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
readonly required: readonly ["type", "attemptID", "deadline", "itemID", "title", "message"];
|
|
124
|
+
readonly additionalProperties: false;
|
|
125
|
+
}, {
|
|
126
|
+
readonly type: "object";
|
|
127
|
+
readonly properties: {
|
|
128
|
+
readonly type: {
|
|
129
|
+
readonly type: "string";
|
|
130
|
+
readonly const: "prompt";
|
|
131
|
+
};
|
|
132
|
+
readonly attemptID: {
|
|
133
|
+
readonly type: "string";
|
|
134
|
+
};
|
|
135
|
+
readonly deadline: {
|
|
136
|
+
readonly type: "number";
|
|
137
|
+
};
|
|
138
|
+
readonly itemID: {
|
|
139
|
+
readonly type: "string";
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
readonly required: readonly ["type", "attemptID", "deadline", "itemID"];
|
|
143
|
+
readonly additionalProperties: false;
|
|
144
|
+
}, {
|
|
145
|
+
readonly type: "object";
|
|
146
|
+
readonly properties: {
|
|
147
|
+
readonly type: {
|
|
148
|
+
readonly type: "string";
|
|
149
|
+
readonly const: "withdraw";
|
|
150
|
+
};
|
|
151
|
+
readonly attemptID: {
|
|
152
|
+
readonly type: "string";
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
readonly required: readonly ["type", "attemptID"];
|
|
156
|
+
readonly additionalProperties: false;
|
|
157
|
+
}];
|
|
158
|
+
};
|
|
159
|
+
export type MonitorPresenceSend = FromSchema<typeof monitorPresenceSendSchema>;
|
|
160
|
+
export type MonitorPresenceReceive = FromSchema<typeof monitorPresenceReceiveSchema>;
|
|
161
|
+
//# sourceMappingURL=monitor-schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monitor-schemas.d.ts","sourceRoot":"","sources":["../src/monitor-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAU,MAAM,eAAe,CAAA;AAEvD,eAAO,MAAM,wBAAwB;;;;;;;;;CAKV,CAAA;AAE3B,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;CAQZ,CAAA;AAE3B,eAAO,MAAM,0BAA0B;;;;;;;;CAIZ,CAAA;AAwE3B,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEX,CAAA;AAE3B,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEd,CAAA;AAE3B,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAC9E,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,OAAO,4BAA4B,CAAC,CAAA"}
|