UNPKG

26.1 kBJSONView Raw
1{
2 "title": "Graph protocol",
3 "description": "This protocol is utilized for communicating about graph changes in both directions.",
4 "output": {
5 "error": {
6 "description": "Graph error"
7 },
8 "addnode": {
9 "description": "Add node to a graph.",
10 "properties": {
11 "id": {
12 "type": "string",
13 "description": "identifier for the node",
14 "required": true
15 },
16 "component": {
17 "type": "string",
18 "description": "component name used for the node",
19 "required": true
20 },
21 "metadata": {
22 "type": "object",
23 "description": "(optional): structure of key-value pairs for node metadata"
24 },
25 "graph": {
26 "type": "string",
27 "description": "graph the action targets",
28 "required": true
29 }
30 }
31 },
32 "removenode": {
33 "description": "Remove a node from a graph.",
34 "properties": {
35 "id": {
36 "type": "string",
37 "description": "identifier for the node",
38 "required": true
39 },
40 "graph": {
41 "type": "string",
42 "description": "graph the action targets",
43 "required": true
44 }
45 }
46 },
47 "renamenode": {
48 "description": "Change the ID of a node in the graph",
49 "properties": {
50 "from": {
51 "type": "string",
52 "description": "original identifier for the node",
53 "required": true
54 },
55 "to": {
56 "type": "string",
57 "description": "new identifier for the node",
58 "required": true
59 },
60 "graph": {
61 "type": "string",
62 "description": "graph the action targets",
63 "required": true
64 }
65 }
66 },
67 "changenode": {
68 "description": "Change the metadata associated to a node in the graph",
69 "properties": {
70 "id": {
71 "type": "string",
72 "description": "identifier for the node",
73 "required": true
74 },
75 "metadata": {
76 "type": "object",
77 "description": "structure of key-value pairs for node metadata",
78 "required": true
79 },
80 "graph": {
81 "type": "string",
82 "description": "graph the action targets",
83 "required": true
84 }
85 }
86 },
87 "addedge": {
88 "description": "Add an edge to the graph",
89 "properties": {
90 "src": {
91 "type": "object",
92 "description": "source node for the edge",
93 "required": true,
94 "properties": {
95 "node": {
96 "type": "string",
97 "description": "node identifier",
98 "required": true
99 },
100 "port": {
101 "type": "string",
102 "description": "port name",
103 "required": true
104 },
105 "index": {
106 "type": [
107 "string",
108 "number"
109 ],
110 "description": "connection index (optional, for addressable ports)"
111 }
112 }
113 },
114 "tgt": {
115 "type": "object",
116 "description": "target node for the edge",
117 "required": true,
118 "properties": {
119 "node": {
120 "type": "string",
121 "description": "node identifier",
122 "required": true
123 },
124 "port": {
125 "type": "string",
126 "description": "port name",
127 "required": true
128 },
129 "index": {
130 "type": "string",
131 "description": "connection index (optional, for addressable ports)"
132 }
133 }
134 },
135 "metadata": {
136 "type": "object",
137 "description": "(optional): structure of key-value pairs for edge metadata"
138 },
139 "graph": {
140 "description": "graph the action targets",
141 "required": true
142 }
143 }
144 },
145 "removeedge": {
146 "description": "Remove an edge from the graph",
147 "properties": {
148 "graph": {
149 "type": "string",
150 "description": "graph the action targets",
151 "required": true
152 },
153 "src": {
154 "description": "source node for the edge",
155 "required": true,
156 "properties": {
157 "node": {
158 "type": "string",
159 "description": "node identifier"
160 },
161 "port": {
162 "type": "string",
163 "description": "port name"
164 }
165 }
166 },
167 "tgt": {
168 "description": "target node for the edge",
169 "required": true,
170 "properties": {
171 "node": {
172 "type": "string",
173 "description": "node identifier"
174 },
175 "port": {
176 "type": "string",
177 "description": "port name"
178 }
179 }
180 }
181 }
182 },
183 "changeedge": {
184 "description": "Change an edge's metadata",
185 "properties": {
186 "graph": {
187 "type": "string",
188 "description": "graph the action targets",
189 "required": true
190 },
191 "metadata": {
192 "type": "object",
193 "description": "struct of key-value pairs for edge metadata"
194 },
195 "src": {
196 "type": "object",
197 "description": "source node for the edge",
198 "properties": {
199 "node": {
200 "type": "string",
201 "description": "node identifier"
202 },
203 "port": {
204 "type": "string",
205 "description": "port name"
206 }
207 }
208 },
209 "tgt": {
210 "type": "object",
211 "description": "target node for the edge",
212 "properties": {
213 "node": {
214 "type": "string",
215 "description": "node identifier"
216 },
217 "port": {
218 "type": "string",
219 "description": "port name"
220 }
221 }
222 }
223 }
224 },
225 "addinitial": {
226 "description": "Add an IIP to the graph",
227 "properties": {
228 "graph": {
229 "type": "string",
230 "description": "graph the action targets"
231 },
232 "metadata": {
233 "type": "object",
234 "description": "(optional): structure of key-value pairs for edge metadata"
235 },
236 "src": {
237 "type": "object",
238 "properties": {
239 "data": {
240 "type": "any",
241 "description": "IIP value in its actual data type"
242 }
243 }
244 },
245 "tgt": {
246 "type": "object",
247 "description": "target node for the edge",
248 "properties": {
249 "node": {
250 "type": "string",
251 "description": "node identifier"
252 },
253 "port": {
254 "type": "string",
255 "description": "port name"
256 },
257 "index": {
258 "type": [
259 "string",
260 "number"
261 ],
262 "description": "connection index (optional, for addressable ports)"
263 }
264 }
265 }
266 }
267 },
268 "removeinitial": {
269 "description": "Remove an IIP from the graph",
270 "properties": {
271 "tgt": {
272 "type": "object",
273 "properties": {
274 "node": {
275 "type": "string",
276 "description": "node identifier"
277 },
278 "port": {
279 "type": "string",
280 "description": "port name"
281 }
282 },
283 "description": "target node for the edge"
284 },
285 "graph": {
286 "type": "string",
287 "description": "graph the action targets"
288 }
289 }
290 },
291 "addinport": {
292 "description": "Add an exported inport to the graph.",
293 "properties": {
294 "public": {
295 "type": "string",
296 "description": "the exported name of the port"
297 },
298 "node": {
299 "type": "string",
300 "description": "node identifier"
301 },
302 "port": {
303 "type": "string",
304 "description": "internal port name"
305 },
306 "metadata": {
307 "type": "object",
308 "description": "(optional): structure of key-value pairs for node metadata"
309 },
310 "graph": {
311 "type": "string",
312 "description": "graph the action targets"
313 }
314 }
315 },
316 "removeinport": {
317 "description": "Remove an exported port from the graph",
318 "properties": {
319 "public": {
320 "type": "string",
321 "description": "the exported name of the port to remove"
322 },
323 "graph": {
324 "type": "string",
325 "description": "graph the action targets"
326 }
327 }
328 },
329 "renameinport": {
330 "description": "Rename an exported port in the graph",
331 "properties": {
332 "from": {
333 "type": "string",
334 "description": "original exported port name"
335 },
336 "to": {
337 "type": "string",
338 "description": "new exported port name"
339 },
340 "graph": {
341 "type": "string",
342 "description": "graph the action targets"
343 }
344 }
345 },
346 "addoutport": {
347 "description": "Add an exported outport to the graph.",
348 "properties": {
349 "public": {
350 "type": "string",
351 "description": "the exported name of the port"
352 },
353 "node": {
354 "type": "string",
355 "description": "node identifier"
356 },
357 "port": {
358 "type": "string",
359 "description": "internal port name"
360 },
361 "metadata": {
362 "type": "object",
363 "description": "(optional): structure of key-value pairs for port metadata"
364 },
365 "graph": {
366 "type": "string",
367 "description": "graph the action targets"
368 }
369 }
370 },
371 "removeoutport": {
372 "description": "Remove an exported port from the graph",
373 "properties": {
374 "public": {
375 "type": "string",
376 "description": "the exported name of the port to remove"
377 },
378 "graph": {
379 "type": "string",
380 "description": "graph the action targets"
381 }
382 }
383 },
384 "renameoutport": {
385 "description": "Rename an exported port in the graph",
386 "properties": {
387 "from": {
388 "type": "string",
389 "description": "original exported port name"
390 },
391 "to": {
392 "type": "string",
393 "description": "new exported port name"
394 },
395 "graph": {
396 "type": "string",
397 "description": "graph the action targets"
398 }
399 }
400 },
401 "addgroup": {
402 "description": "Add a group to the graph",
403 "properties": {
404 "name": {
405 "type": "string",
406 "description": "the group name"
407 },
408 "nodes": {
409 "type": "array",
410 "description": "an array of node ids part of the group"
411 },
412 "metadata": {
413 "type": "object",
414 "description": "(optional): structure of key-value pairs for group metadata"
415 },
416 "graph": {
417 "type": "string",
418 "description": "graph the action targets"
419 }
420 }
421 },
422 "removegroup": {
423 "description": "Remove a group from the graph",
424 "properties": {
425 "name": {
426 "type": "string",
427 "description": "the group name"
428 },
429 "graph": {
430 "type": "string",
431 "description": "graph the action targets"
432 }
433 }
434 },
435 "renamegroup": {
436 "description": "Rename a group in the graph.",
437 "properties": {
438 "from": {
439 "type": "string",
440 "description": "original group name"
441 },
442 "to": {
443 "type": "string",
444 "description": "new group name"
445 },
446 "graph": {
447 "type": "string",
448 "description": "graph the action targets"
449 }
450 }
451 },
452 "changegroup": {
453 "description": "Change a group's metadata",
454 "properties": {
455 "name": {
456 "type": "string",
457 "description": "the group name",
458 "required": true
459 },
460 "metadata": {
461 "type": "object",
462 "description": "structure of key-value pairs for group metadata"
463 },
464 "graph": {
465 "type": "string",
466 "description": "graph the action targets",
467 "required": true
468 }
469 }
470 }
471 },
472 "input": {
473 "error": {
474 "description": "Graph error"
475 },
476 "clear": {
477 "description": "Initialize an empty graph.",
478 "properties": {
479 "id": {
480 "type": "string",
481 "description": "identifier for the graph being created. Used for all subsequent messages related to the graph instance",
482 "required": true
483 },
484 "name": {
485 "type": "string",
486 "description": "(optional) Human-readable label for the graph"
487 },
488 "library": {
489 "type": "string",
490 "description": "(optional) Component library identifier"
491 },
492 "main": {
493 "type": "boolean",
494 "description": "(optional) Identifies the graph as a main graph of a project that should not be registered as a component\nGraphs registered in this way should also be available for use as subgraphs in other graphs. Therefore a graph registration and later changes to it may cause component messages of the Component protocol to be sent back to the client informing of possible changes in the ports of the subgraph component."
495 }
496 }
497 },
498 "addnode": {
499 "description": "Add node to a graph.",
500 "properties": {
501 "id": {
502 "type": "string",
503 "description": "identifier for the node",
504 "required": true
505 },
506 "component": {
507 "type": "string",
508 "description": "component name used for the node",
509 "required": true
510 },
511 "metadata": {
512 "type": "object",
513 "description": "(optional): structure of key-value pairs for node metadata"
514 },
515 "graph": {
516 "type": "string",
517 "description": "graph the action targets",
518 "required": true
519 }
520 }
521 },
522 "removenode": {
523 "description": "Remove a node from a graph.",
524 "properties": {
525 "id": {
526 "type": "string",
527 "description": "identifier for the node",
528 "required": true
529 },
530 "graph": {
531 "type": "string",
532 "description": "graph the action targets",
533 "required": true
534 }
535 }
536 },
537 "renamenode": {
538 "description": "Change the ID of a node in the graph",
539 "properties": {
540 "from": {
541 "type": "string",
542 "description": "original identifier for the node",
543 "required": true
544 },
545 "to": {
546 "type": "string",
547 "description": "new identifier for the node",
548 "required": true
549 },
550 "graph": {
551 "type": "string",
552 "description": "graph the action targets",
553 "required": true
554 }
555 }
556 },
557 "changenode": {
558 "description": "Change the metadata associated to a node in the graph",
559 "properties": {
560 "id": {
561 "type": "string",
562 "description": "identifier for the node",
563 "required": true
564 },
565 "metadata": {
566 "type": "object",
567 "description": "structure of key-value pairs for node metadata",
568 "required": true
569 },
570 "graph": {
571 "type": "string",
572 "description": "graph the action targets",
573 "required": true
574 }
575 }
576 },
577 "addedge": {
578 "description": "Add an edge to the graph",
579 "properties": {
580 "src": {
581 "type": "object",
582 "description": "source node for the edge",
583 "properties": {
584 "node": {
585 "type": "string",
586 "description": "node identifier"
587 },
588 "port": {
589 "type": "string",
590 "description": "port name"
591 },
592 "index": {
593 "type": [
594 "string",
595 "number"
596 ],
597 "description": "connection index (optional, for addressable ports)"
598 }
599 }
600 },
601 "tgt": {
602 "type": "object",
603 "description": "target node for the edge",
604 "properties": {
605 "node": {
606 "type": "string",
607 "description": "node identifier"
608 },
609 "port": {
610 "type": "string",
611 "description": "port name"
612 },
613 "index": {
614 "type": [
615 "string",
616 "number"
617 ],
618 "description": "connection index (optional, for addressable ports)"
619 }
620 }
621 },
622 "metadata": {
623 "type": "object",
624 "description": "(optional): structure of key-value pairs for edge metadata"
625 },
626 "graph": {
627 "description": "graph the action targets"
628 }
629 }
630 },
631 "removeedge": {
632 "description": "Remove an edge from the graph",
633 "properties": {
634 "graph": {
635 "type": "string",
636 "description": "graph the action targets"
637 },
638 "src": {
639 "type": "object",
640 "description": "source node for the edge",
641 "properties": {
642 "node": {
643 "type": "string",
644 "description": "node identifier"
645 },
646 "port": {
647 "type": "string",
648 "description": "port name"
649 }
650 }
651 },
652 "tgt": {
653 "type": "object",
654 "description": "target node for the edge",
655 "properties": {
656 "node": {
657 "type": "string",
658 "description": "node identifier"
659 },
660 "port": {
661 "type": "string",
662 "description": "port name"
663 }
664 }
665 }
666 }
667 },
668 "changeedge": {
669 "description": "Change an edge's metadata",
670 "properties": {
671 "graph": {
672 "type": "string",
673 "description": "graph the action targets"
674 },
675 "metadata": {
676 "type": "object",
677 "description": "struct of key-value pairs for edge metadata"
678 },
679 "src": {
680 "type": "object",
681 "description": "source node for the edge",
682 "properties": {
683 "node": {
684 "type": "string",
685 "description": "node identifier"
686 },
687 "port": {
688 "type": "string",
689 "description": "port name"
690 }
691 }
692 },
693 "tgt": {
694 "type": "object",
695 "description": "target node for the edge",
696 "properties": {
697 "node": {
698 "type": "string",
699 "description": "node identifier"
700 },
701 "port": {
702 "type": "string",
703 "description": "port name"
704 }
705 }
706 }
707 }
708 },
709 "addinitial": {
710 "description": "Add an IIP to the graph",
711 "properties": {
712 "graph": {
713 "type": "string",
714 "description": "graph the action targets"
715 },
716 "metadata": {
717 "type": "object",
718 "description": "(optional): structure of key-value pairs for edge metadata"
719 },
720 "src": {
721 "type": "object",
722 "properties": {
723 "data": {
724 "type": "any",
725 "description": "IIP value in its actual data type"
726 }
727 }
728 },
729 "tgt": {
730 "type": "object",
731 "description": "target node for the edge",
732 "properties": {
733 "node": {
734 "type": "string",
735 "description": "node identifier"
736 },
737 "port": {
738 "type": "string",
739 "description": "port name"
740 },
741 "index": {
742 "type": [
743 "string",
744 "number"
745 ],
746 "description": "connection index (optional, for addressable ports)"
747 }
748 }
749 }
750 }
751 },
752 "removeinitial": {
753 "description": "Remove an IIP from the graph",
754 "properties": {
755 "tgt": {
756 "type": "object",
757 "properties": {
758 "node": {
759 "type": "string",
760 "description": "node identifier"
761 },
762 "port": {
763 "type": "string",
764 "description": "port name"
765 }
766 },
767 "description": "target node for the edge"
768 },
769 "graph": {
770 "type": "string",
771 "description": "graph the action targets"
772 }
773 }
774 },
775 "addinport": {
776 "description": "Add an exported inport to the graph.",
777 "properties": {
778 "public": {
779 "type": "string",
780 "description": "the exported name of the port"
781 },
782 "node": {
783 "type": "string",
784 "description": "node identifier"
785 },
786 "port": {
787 "type": "string",
788 "description": "internal port name"
789 },
790 "metadata": {
791 "type": "object",
792 "description": "(optional): structure of key-value pairs for node metadata"
793 },
794 "graph": {
795 "type": "string",
796 "description": "graph the action targets"
797 }
798 }
799 },
800 "removeinport": {
801 "description": "Remove an exported port from the graph",
802 "properties": {
803 "public": {
804 "type": "string",
805 "description": "the exported name of the port to remove"
806 },
807 "graph": {
808 "type": "string",
809 "description": "graph the action targets"
810 }
811 }
812 },
813 "renameinport": {
814 "description": "Rename an exported port in the graph",
815 "properties": {
816 "from": {
817 "type": "string",
818 "description": "original exported port name"
819 },
820 "to": {
821 "type": "string",
822 "description": "new exported port name"
823 },
824 "graph": {
825 "type": "string",
826 "description": "graph the action targets"
827 }
828 }
829 },
830 "addoutport": {
831 "description": "Add an exported outport to the graph.",
832 "properties": {
833 "public": {
834 "type": "string",
835 "description": "the exported name of the port"
836 },
837 "node": {
838 "type": "string",
839 "description": "node identifier"
840 },
841 "port": {
842 "type": "string",
843 "description": "internal port name"
844 },
845 "metadata": {
846 "type": "object",
847 "description": "(optional): structure of key-value pairs for port metadata"
848 },
849 "graph": {
850 "type": "string",
851 "description": "graph the action targets"
852 }
853 }
854 },
855 "removeoutport": {
856 "description": "Remove an exported port from the graph",
857 "properties": {
858 "public": {
859 "type": "string",
860 "description": "the exported name of the port to remove"
861 },
862 "graph": {
863 "type": "string",
864 "description": "graph the action targets"
865 }
866 }
867 },
868 "renameoutport": {
869 "description": "Rename an exported port in the graph",
870 "properties": {
871 "from": {
872 "type": "string",
873 "description": "original exported port name"
874 },
875 "to": {
876 "type": "string",
877 "description": "new exported port name"
878 },
879 "graph": {
880 "type": "string",
881 "description": "graph the action targets"
882 }
883 }
884 },
885 "addgroup": {
886 "description": "Add a group to the graph",
887 "properties": {
888 "name": {
889 "type": "string",
890 "description": "the group name"
891 },
892 "nodes": {
893 "type": "array",
894 "description": "an array of node ids part of the group"
895 },
896 "metadata": {
897 "type": "object",
898 "description": "(optional): structure of key-value pairs for group metadata"
899 },
900 "graph": {
901 "type": "string",
902 "description": "graph the action targets"
903 }
904 }
905 },
906 "removegroup": {
907 "description": "Remove a group from the graph",
908 "properties": {
909 "name": {
910 "type": "string",
911 "description": "the group name"
912 },
913 "graph": {
914 "type": "string",
915 "description": "graph the action targets"
916 }
917 }
918 },
919 "renamegroup": {
920 "description": "Rename a group in the graph.",
921 "properties": {
922 "from": {
923 "type": "string",
924 "description": "original group name"
925 },
926 "to": {
927 "type": "string",
928 "description": "new group name"
929 },
930 "graph": {
931 "type": "string",
932 "description": "graph the action targets"
933 }
934 }
935 },
936 "changegroup": {
937 "description": "Change a group's metadata",
938 "properties": {
939 "name": {
940 "type": "string",
941 "description": "the group name"
942 },
943 "metadata": {
944 "type": "object",
945 "description": "structure of key-value pairs for group metadata"
946 },
947 "graph": {
948 "type": "string",
949 "description": "graph the action targets"
950 }
951 }
952 }
953 }
954}