@skenion/contracts 0.34.0 → 0.36.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/dist/generated/schemas.d.ts +563 -0
- package/dist/generated/schemas.d.ts.map +1 -1
- package/dist/generated/schemas.js +682 -0
- package/dist/generated/schemas.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/project.d.ts +4 -2
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +43 -0
- package/dist/project.js.map +1 -1
- package/dist/runtimeHttp.d.ts +4 -1
- package/dist/runtimeHttp.d.ts.map +1 -1
- package/dist/runtimeHttp.js +130 -1
- package/dist/runtimeHttp.js.map +1 -1
- package/dist/types.d.ts +164 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/validate.d.ts +8 -1
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +193 -6
- package/dist/validate.js.map +1 -1
- package/package.json +13 -1
|
@@ -654,6 +654,123 @@ export const graphV02Schema = {
|
|
|
654
654
|
}
|
|
655
655
|
}
|
|
656
656
|
};
|
|
657
|
+
export const graphFragmentV02Schema = {
|
|
658
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
659
|
+
"$id": "https://skenion.dev/schemas/graph/v0.2/fragment.schema.json",
|
|
660
|
+
"title": "Skenion Graph Fragment v0.2",
|
|
661
|
+
"type": "object",
|
|
662
|
+
"required": [
|
|
663
|
+
"schema",
|
|
664
|
+
"schemaVersion",
|
|
665
|
+
"nodes",
|
|
666
|
+
"edges"
|
|
667
|
+
],
|
|
668
|
+
"properties": {
|
|
669
|
+
"schema": {
|
|
670
|
+
"const": "skenion.graph.fragment"
|
|
671
|
+
},
|
|
672
|
+
"schemaVersion": {
|
|
673
|
+
"const": "0.2.0"
|
|
674
|
+
},
|
|
675
|
+
"id": {
|
|
676
|
+
"type": "string",
|
|
677
|
+
"minLength": 1
|
|
678
|
+
},
|
|
679
|
+
"nodes": {
|
|
680
|
+
"type": "array",
|
|
681
|
+
"items": {
|
|
682
|
+
"$ref": "https://skenion.dev/schemas/graph/v0.2/graph.schema.json#/$defs/node"
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
"edges": {
|
|
686
|
+
"type": "array",
|
|
687
|
+
"items": {
|
|
688
|
+
"$ref": "https://skenion.dev/schemas/graph/v0.2/graph.schema.json#/$defs/edge"
|
|
689
|
+
}
|
|
690
|
+
},
|
|
691
|
+
"view": {
|
|
692
|
+
"$ref": "#/$defs/fragmentView"
|
|
693
|
+
},
|
|
694
|
+
"omittedEdges": {
|
|
695
|
+
"type": "array",
|
|
696
|
+
"items": {
|
|
697
|
+
"$ref": "#/$defs/omittedEdge"
|
|
698
|
+
}
|
|
699
|
+
},
|
|
700
|
+
"metadata": {
|
|
701
|
+
"type": "object",
|
|
702
|
+
"additionalProperties": true
|
|
703
|
+
}
|
|
704
|
+
},
|
|
705
|
+
"additionalProperties": false,
|
|
706
|
+
"$defs": {
|
|
707
|
+
"fragmentView": {
|
|
708
|
+
"type": "object",
|
|
709
|
+
"properties": {
|
|
710
|
+
"nodes": {
|
|
711
|
+
"type": "object",
|
|
712
|
+
"additionalProperties": {
|
|
713
|
+
"$ref": "#/$defs/nodeView"
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
},
|
|
717
|
+
"additionalProperties": false
|
|
718
|
+
},
|
|
719
|
+
"nodeView": {
|
|
720
|
+
"type": "object",
|
|
721
|
+
"required": [
|
|
722
|
+
"x",
|
|
723
|
+
"y"
|
|
724
|
+
],
|
|
725
|
+
"properties": {
|
|
726
|
+
"x": {
|
|
727
|
+
"type": "number"
|
|
728
|
+
},
|
|
729
|
+
"y": {
|
|
730
|
+
"type": "number"
|
|
731
|
+
},
|
|
732
|
+
"width": {
|
|
733
|
+
"type": "number"
|
|
734
|
+
},
|
|
735
|
+
"height": {
|
|
736
|
+
"type": "number"
|
|
737
|
+
},
|
|
738
|
+
"collapsed": {
|
|
739
|
+
"type": "boolean"
|
|
740
|
+
}
|
|
741
|
+
},
|
|
742
|
+
"additionalProperties": false
|
|
743
|
+
},
|
|
744
|
+
"omittedEdge": {
|
|
745
|
+
"type": "object",
|
|
746
|
+
"required": [
|
|
747
|
+
"id",
|
|
748
|
+
"source",
|
|
749
|
+
"target",
|
|
750
|
+
"reason"
|
|
751
|
+
],
|
|
752
|
+
"properties": {
|
|
753
|
+
"id": {
|
|
754
|
+
"type": "string",
|
|
755
|
+
"minLength": 1
|
|
756
|
+
},
|
|
757
|
+
"source": {
|
|
758
|
+
"$ref": "https://skenion.dev/schemas/graph/v0.2/graph.schema.json#/$defs/portEndpoint"
|
|
759
|
+
},
|
|
760
|
+
"target": {
|
|
761
|
+
"$ref": "https://skenion.dev/schemas/graph/v0.2/graph.schema.json#/$defs/portEndpoint"
|
|
762
|
+
},
|
|
763
|
+
"reason": {
|
|
764
|
+
"enum": [
|
|
765
|
+
"outside-fragment",
|
|
766
|
+
"policy-omit"
|
|
767
|
+
]
|
|
768
|
+
}
|
|
769
|
+
},
|
|
770
|
+
"additionalProperties": false
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
};
|
|
657
774
|
export const viewStateV01Schema = {
|
|
658
775
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
659
776
|
"$id": "https://skenion.dev/schemas/view/v0.1/view-state.schema.json",
|
|
@@ -805,6 +922,571 @@ export const projectV01Schema = {
|
|
|
805
922
|
},
|
|
806
923
|
"additionalProperties": false
|
|
807
924
|
};
|
|
925
|
+
export const projectV02Schema = {
|
|
926
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
927
|
+
"$id": "https://skenion.dev/schemas/project/v0.2/project.schema.json",
|
|
928
|
+
"title": "Skenion Project Document v0.2",
|
|
929
|
+
"type": "object",
|
|
930
|
+
"required": [
|
|
931
|
+
"schema",
|
|
932
|
+
"schemaVersion",
|
|
933
|
+
"id",
|
|
934
|
+
"revision",
|
|
935
|
+
"graph",
|
|
936
|
+
"viewState",
|
|
937
|
+
"patchLibrary"
|
|
938
|
+
],
|
|
939
|
+
"properties": {
|
|
940
|
+
"schema": {
|
|
941
|
+
"const": "skenion.project"
|
|
942
|
+
},
|
|
943
|
+
"schemaVersion": {
|
|
944
|
+
"const": "0.2.0"
|
|
945
|
+
},
|
|
946
|
+
"id": {
|
|
947
|
+
"type": "string",
|
|
948
|
+
"minLength": 1
|
|
949
|
+
},
|
|
950
|
+
"revision": {
|
|
951
|
+
"type": "string",
|
|
952
|
+
"minLength": 1
|
|
953
|
+
},
|
|
954
|
+
"metadata": {
|
|
955
|
+
"$ref": "#/$defs/metadata"
|
|
956
|
+
},
|
|
957
|
+
"graph": {
|
|
958
|
+
"$ref": "https://skenion.dev/schemas/graph/v0.2/graph.schema.json"
|
|
959
|
+
},
|
|
960
|
+
"viewState": {
|
|
961
|
+
"$ref": "https://skenion.dev/schemas/view/v0.1/view-state.schema.json"
|
|
962
|
+
},
|
|
963
|
+
"patchLibrary": {
|
|
964
|
+
"type": "array",
|
|
965
|
+
"items": {
|
|
966
|
+
"$ref": "#/$defs/patchDefinition"
|
|
967
|
+
}
|
|
968
|
+
},
|
|
969
|
+
"tutorial": {
|
|
970
|
+
"type": "object",
|
|
971
|
+
"additionalProperties": true
|
|
972
|
+
},
|
|
973
|
+
"help": {
|
|
974
|
+
"type": "object",
|
|
975
|
+
"additionalProperties": true
|
|
976
|
+
}
|
|
977
|
+
},
|
|
978
|
+
"additionalProperties": false,
|
|
979
|
+
"$defs": {
|
|
980
|
+
"metadata": {
|
|
981
|
+
"type": "object",
|
|
982
|
+
"properties": {
|
|
983
|
+
"title": {
|
|
984
|
+
"type": "string"
|
|
985
|
+
},
|
|
986
|
+
"description": {
|
|
987
|
+
"type": "string"
|
|
988
|
+
},
|
|
989
|
+
"createdAt": {
|
|
990
|
+
"type": "string"
|
|
991
|
+
},
|
|
992
|
+
"updatedAt": {
|
|
993
|
+
"type": "string"
|
|
994
|
+
}
|
|
995
|
+
},
|
|
996
|
+
"additionalProperties": true
|
|
997
|
+
},
|
|
998
|
+
"patchDefinition": {
|
|
999
|
+
"type": "object",
|
|
1000
|
+
"required": [
|
|
1001
|
+
"id",
|
|
1002
|
+
"revision",
|
|
1003
|
+
"graph"
|
|
1004
|
+
],
|
|
1005
|
+
"properties": {
|
|
1006
|
+
"id": {
|
|
1007
|
+
"type": "string",
|
|
1008
|
+
"minLength": 1
|
|
1009
|
+
},
|
|
1010
|
+
"revision": {
|
|
1011
|
+
"type": "string",
|
|
1012
|
+
"minLength": 1
|
|
1013
|
+
},
|
|
1014
|
+
"metadata": {
|
|
1015
|
+
"$ref": "#/$defs/metadata"
|
|
1016
|
+
},
|
|
1017
|
+
"graph": {
|
|
1018
|
+
"$ref": "https://skenion.dev/schemas/graph/v0.2/graph.schema.json"
|
|
1019
|
+
},
|
|
1020
|
+
"viewState": {
|
|
1021
|
+
"$ref": "https://skenion.dev/schemas/view/v0.1/view-state.schema.json"
|
|
1022
|
+
}
|
|
1023
|
+
},
|
|
1024
|
+
"additionalProperties": false
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
};
|
|
1028
|
+
export const runtimeOperationV0Schema = {
|
|
1029
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1030
|
+
"$id": "https://skenion.dev/schemas/runtime/v0/operation.schema.json",
|
|
1031
|
+
"title": "Skenion Runtime Operation Envelope v0",
|
|
1032
|
+
"type": "object",
|
|
1033
|
+
"required": [
|
|
1034
|
+
"schema",
|
|
1035
|
+
"schemaVersion",
|
|
1036
|
+
"id",
|
|
1037
|
+
"kind",
|
|
1038
|
+
"request"
|
|
1039
|
+
],
|
|
1040
|
+
"properties": {
|
|
1041
|
+
"schema": {
|
|
1042
|
+
"const": "skenion.runtime.operation"
|
|
1043
|
+
},
|
|
1044
|
+
"schemaVersion": {
|
|
1045
|
+
"const": "0.1.0"
|
|
1046
|
+
},
|
|
1047
|
+
"id": {
|
|
1048
|
+
"type": "string",
|
|
1049
|
+
"minLength": 1
|
|
1050
|
+
},
|
|
1051
|
+
"kind": {
|
|
1052
|
+
"const": "pasteGraphFragment"
|
|
1053
|
+
},
|
|
1054
|
+
"request": {
|
|
1055
|
+
"$ref": "#/$defs/pasteGraphFragmentRequest"
|
|
1056
|
+
},
|
|
1057
|
+
"attribution": {
|
|
1058
|
+
"$ref": "#/$defs/runtimeOperationAttribution"
|
|
1059
|
+
},
|
|
1060
|
+
"correlationId": {
|
|
1061
|
+
"type": "string",
|
|
1062
|
+
"minLength": 1
|
|
1063
|
+
},
|
|
1064
|
+
"createdAt": {
|
|
1065
|
+
"type": "string"
|
|
1066
|
+
}
|
|
1067
|
+
},
|
|
1068
|
+
"additionalProperties": false,
|
|
1069
|
+
"$defs": {
|
|
1070
|
+
"patchPath": {
|
|
1071
|
+
"oneOf": [
|
|
1072
|
+
{
|
|
1073
|
+
"type": "object",
|
|
1074
|
+
"required": [
|
|
1075
|
+
"kind"
|
|
1076
|
+
],
|
|
1077
|
+
"properties": {
|
|
1078
|
+
"kind": {
|
|
1079
|
+
"const": "root"
|
|
1080
|
+
}
|
|
1081
|
+
},
|
|
1082
|
+
"additionalProperties": false
|
|
1083
|
+
},
|
|
1084
|
+
{
|
|
1085
|
+
"type": "object",
|
|
1086
|
+
"required": [
|
|
1087
|
+
"kind",
|
|
1088
|
+
"patchId"
|
|
1089
|
+
],
|
|
1090
|
+
"properties": {
|
|
1091
|
+
"kind": {
|
|
1092
|
+
"const": "project-patch-definition"
|
|
1093
|
+
},
|
|
1094
|
+
"patchId": {
|
|
1095
|
+
"type": "string",
|
|
1096
|
+
"minLength": 1
|
|
1097
|
+
}
|
|
1098
|
+
},
|
|
1099
|
+
"additionalProperties": false
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
"type": "object",
|
|
1103
|
+
"required": [
|
|
1104
|
+
"kind",
|
|
1105
|
+
"packageId",
|
|
1106
|
+
"patchId"
|
|
1107
|
+
],
|
|
1108
|
+
"properties": {
|
|
1109
|
+
"kind": {
|
|
1110
|
+
"const": "package-patch-definition"
|
|
1111
|
+
},
|
|
1112
|
+
"packageId": {
|
|
1113
|
+
"type": "string",
|
|
1114
|
+
"minLength": 1
|
|
1115
|
+
},
|
|
1116
|
+
"patchId": {
|
|
1117
|
+
"type": "string",
|
|
1118
|
+
"minLength": 1
|
|
1119
|
+
},
|
|
1120
|
+
"version": {
|
|
1121
|
+
"type": "string",
|
|
1122
|
+
"minLength": 1
|
|
1123
|
+
}
|
|
1124
|
+
},
|
|
1125
|
+
"additionalProperties": false
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
"type": "object",
|
|
1129
|
+
"required": [
|
|
1130
|
+
"kind",
|
|
1131
|
+
"ownerPath",
|
|
1132
|
+
"nodeId"
|
|
1133
|
+
],
|
|
1134
|
+
"properties": {
|
|
1135
|
+
"kind": {
|
|
1136
|
+
"const": "embedded-patch-instance"
|
|
1137
|
+
},
|
|
1138
|
+
"ownerPath": {
|
|
1139
|
+
"type": "array",
|
|
1140
|
+
"items": {
|
|
1141
|
+
"type": "string",
|
|
1142
|
+
"minLength": 1
|
|
1143
|
+
}
|
|
1144
|
+
},
|
|
1145
|
+
"nodeId": {
|
|
1146
|
+
"type": "string",
|
|
1147
|
+
"minLength": 1
|
|
1148
|
+
}
|
|
1149
|
+
},
|
|
1150
|
+
"additionalProperties": false
|
|
1151
|
+
},
|
|
1152
|
+
{
|
|
1153
|
+
"type": "object",
|
|
1154
|
+
"required": [
|
|
1155
|
+
"kind",
|
|
1156
|
+
"workingCopyId"
|
|
1157
|
+
],
|
|
1158
|
+
"properties": {
|
|
1159
|
+
"kind": {
|
|
1160
|
+
"const": "help-working-copy"
|
|
1161
|
+
},
|
|
1162
|
+
"workingCopyId": {
|
|
1163
|
+
"type": "string",
|
|
1164
|
+
"minLength": 1
|
|
1165
|
+
},
|
|
1166
|
+
"sourcePackageId": {
|
|
1167
|
+
"type": "string",
|
|
1168
|
+
"minLength": 1
|
|
1169
|
+
},
|
|
1170
|
+
"sourcePatchId": {
|
|
1171
|
+
"type": "string",
|
|
1172
|
+
"minLength": 1
|
|
1173
|
+
}
|
|
1174
|
+
},
|
|
1175
|
+
"additionalProperties": false
|
|
1176
|
+
}
|
|
1177
|
+
]
|
|
1178
|
+
},
|
|
1179
|
+
"graphTargetRef": {
|
|
1180
|
+
"type": "object",
|
|
1181
|
+
"required": [
|
|
1182
|
+
"path",
|
|
1183
|
+
"baseRevision"
|
|
1184
|
+
],
|
|
1185
|
+
"properties": {
|
|
1186
|
+
"path": {
|
|
1187
|
+
"$ref": "#/$defs/patchPath"
|
|
1188
|
+
},
|
|
1189
|
+
"baseRevision": {
|
|
1190
|
+
"type": "string",
|
|
1191
|
+
"minLength": 1
|
|
1192
|
+
},
|
|
1193
|
+
"targetRevision": {
|
|
1194
|
+
"type": "string",
|
|
1195
|
+
"minLength": 1
|
|
1196
|
+
}
|
|
1197
|
+
},
|
|
1198
|
+
"additionalProperties": false
|
|
1199
|
+
},
|
|
1200
|
+
"pastePlacement": {
|
|
1201
|
+
"oneOf": [
|
|
1202
|
+
{
|
|
1203
|
+
"type": "object",
|
|
1204
|
+
"required": [
|
|
1205
|
+
"kind",
|
|
1206
|
+
"x",
|
|
1207
|
+
"y"
|
|
1208
|
+
],
|
|
1209
|
+
"properties": {
|
|
1210
|
+
"kind": {
|
|
1211
|
+
"const": "position"
|
|
1212
|
+
},
|
|
1213
|
+
"x": {
|
|
1214
|
+
"type": "number"
|
|
1215
|
+
},
|
|
1216
|
+
"y": {
|
|
1217
|
+
"type": "number"
|
|
1218
|
+
}
|
|
1219
|
+
},
|
|
1220
|
+
"additionalProperties": false
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
"type": "object",
|
|
1224
|
+
"required": [
|
|
1225
|
+
"kind",
|
|
1226
|
+
"nodeId"
|
|
1227
|
+
],
|
|
1228
|
+
"properties": {
|
|
1229
|
+
"kind": {
|
|
1230
|
+
"const": "anchor"
|
|
1231
|
+
},
|
|
1232
|
+
"nodeId": {
|
|
1233
|
+
"type": "string",
|
|
1234
|
+
"minLength": 1
|
|
1235
|
+
},
|
|
1236
|
+
"offsetX": {
|
|
1237
|
+
"type": "number"
|
|
1238
|
+
},
|
|
1239
|
+
"offsetY": {
|
|
1240
|
+
"type": "number"
|
|
1241
|
+
}
|
|
1242
|
+
},
|
|
1243
|
+
"additionalProperties": false
|
|
1244
|
+
}
|
|
1245
|
+
]
|
|
1246
|
+
},
|
|
1247
|
+
"pasteGraphFragmentOptions": {
|
|
1248
|
+
"type": "object",
|
|
1249
|
+
"properties": {
|
|
1250
|
+
"outsideEndpointPolicy": {
|
|
1251
|
+
"enum": [
|
|
1252
|
+
"reject",
|
|
1253
|
+
"omit"
|
|
1254
|
+
],
|
|
1255
|
+
"default": "reject"
|
|
1256
|
+
},
|
|
1257
|
+
"idConflictPolicy": {
|
|
1258
|
+
"enum": [
|
|
1259
|
+
"remap",
|
|
1260
|
+
"reject"
|
|
1261
|
+
],
|
|
1262
|
+
"default": "remap"
|
|
1263
|
+
},
|
|
1264
|
+
"preserveRelativePositions": {
|
|
1265
|
+
"type": "boolean",
|
|
1266
|
+
"default": true
|
|
1267
|
+
}
|
|
1268
|
+
},
|
|
1269
|
+
"additionalProperties": false
|
|
1270
|
+
},
|
|
1271
|
+
"pasteGraphFragmentRequest": {
|
|
1272
|
+
"type": "object",
|
|
1273
|
+
"required": [
|
|
1274
|
+
"target",
|
|
1275
|
+
"fragment"
|
|
1276
|
+
],
|
|
1277
|
+
"properties": {
|
|
1278
|
+
"target": {
|
|
1279
|
+
"$ref": "#/$defs/graphTargetRef"
|
|
1280
|
+
},
|
|
1281
|
+
"fragment": {
|
|
1282
|
+
"$ref": "https://skenion.dev/schemas/graph/v0.2/fragment.schema.json"
|
|
1283
|
+
},
|
|
1284
|
+
"placement": {
|
|
1285
|
+
"$ref": "#/$defs/pastePlacement"
|
|
1286
|
+
},
|
|
1287
|
+
"options": {
|
|
1288
|
+
"$ref": "#/$defs/pasteGraphFragmentOptions"
|
|
1289
|
+
}
|
|
1290
|
+
},
|
|
1291
|
+
"additionalProperties": false
|
|
1292
|
+
},
|
|
1293
|
+
"runtimeOperationAttribution": {
|
|
1294
|
+
"type": "object",
|
|
1295
|
+
"properties": {
|
|
1296
|
+
"actorId": {
|
|
1297
|
+
"type": "string",
|
|
1298
|
+
"minLength": 1
|
|
1299
|
+
},
|
|
1300
|
+
"clientId": {
|
|
1301
|
+
"type": "string",
|
|
1302
|
+
"minLength": 1
|
|
1303
|
+
},
|
|
1304
|
+
"label": {
|
|
1305
|
+
"type": "string"
|
|
1306
|
+
}
|
|
1307
|
+
},
|
|
1308
|
+
"additionalProperties": false
|
|
1309
|
+
},
|
|
1310
|
+
"idRemapResult": {
|
|
1311
|
+
"type": "object",
|
|
1312
|
+
"required": [
|
|
1313
|
+
"nodeIdMap",
|
|
1314
|
+
"edgeIdMap",
|
|
1315
|
+
"omittedEdgeIds"
|
|
1316
|
+
],
|
|
1317
|
+
"properties": {
|
|
1318
|
+
"nodeIdMap": {
|
|
1319
|
+
"type": "object",
|
|
1320
|
+
"additionalProperties": {
|
|
1321
|
+
"type": "string",
|
|
1322
|
+
"minLength": 1
|
|
1323
|
+
}
|
|
1324
|
+
},
|
|
1325
|
+
"edgeIdMap": {
|
|
1326
|
+
"type": "object",
|
|
1327
|
+
"additionalProperties": {
|
|
1328
|
+
"type": "string",
|
|
1329
|
+
"minLength": 1
|
|
1330
|
+
}
|
|
1331
|
+
},
|
|
1332
|
+
"omittedEdgeIds": {
|
|
1333
|
+
"type": "array",
|
|
1334
|
+
"items": {
|
|
1335
|
+
"type": "string",
|
|
1336
|
+
"minLength": 1
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
},
|
|
1340
|
+
"additionalProperties": false
|
|
1341
|
+
},
|
|
1342
|
+
"runtimeOperationDiagnosticSeverity": {
|
|
1343
|
+
"enum": [
|
|
1344
|
+
"error",
|
|
1345
|
+
"warning",
|
|
1346
|
+
"info"
|
|
1347
|
+
]
|
|
1348
|
+
},
|
|
1349
|
+
"runtimeOperationDiagnostic": {
|
|
1350
|
+
"type": "object",
|
|
1351
|
+
"required": [
|
|
1352
|
+
"severity",
|
|
1353
|
+
"code",
|
|
1354
|
+
"message"
|
|
1355
|
+
],
|
|
1356
|
+
"properties": {
|
|
1357
|
+
"severity": {
|
|
1358
|
+
"$ref": "#/$defs/runtimeOperationDiagnosticSeverity"
|
|
1359
|
+
},
|
|
1360
|
+
"code": {
|
|
1361
|
+
"enum": [
|
|
1362
|
+
"base-revision-mismatch",
|
|
1363
|
+
"duplicate-edge-id",
|
|
1364
|
+
"duplicate-node-id",
|
|
1365
|
+
"duplicate-target-path",
|
|
1366
|
+
"fragment-edge-outside-selection",
|
|
1367
|
+
"id-conflict",
|
|
1368
|
+
"invalid-target-path",
|
|
1369
|
+
"operation-rebased",
|
|
1370
|
+
"target-not-found",
|
|
1371
|
+
"unsupported-operation"
|
|
1372
|
+
]
|
|
1373
|
+
},
|
|
1374
|
+
"message": {
|
|
1375
|
+
"type": "string"
|
|
1376
|
+
},
|
|
1377
|
+
"path": {
|
|
1378
|
+
"type": "string",
|
|
1379
|
+
"minLength": 1
|
|
1380
|
+
},
|
|
1381
|
+
"target": {
|
|
1382
|
+
"$ref": "#/$defs/graphTargetRef"
|
|
1383
|
+
},
|
|
1384
|
+
"expectedRevision": {
|
|
1385
|
+
"type": "string",
|
|
1386
|
+
"minLength": 1
|
|
1387
|
+
},
|
|
1388
|
+
"actualRevision": {
|
|
1389
|
+
"type": "string",
|
|
1390
|
+
"minLength": 1
|
|
1391
|
+
},
|
|
1392
|
+
"duplicates": {
|
|
1393
|
+
"type": "array",
|
|
1394
|
+
"items": {
|
|
1395
|
+
"type": "string",
|
|
1396
|
+
"minLength": 1
|
|
1397
|
+
}
|
|
1398
|
+
},
|
|
1399
|
+
"nodes": {
|
|
1400
|
+
"type": "array",
|
|
1401
|
+
"items": {
|
|
1402
|
+
"type": "string",
|
|
1403
|
+
"minLength": 1
|
|
1404
|
+
}
|
|
1405
|
+
},
|
|
1406
|
+
"edges": {
|
|
1407
|
+
"type": "array",
|
|
1408
|
+
"items": {
|
|
1409
|
+
"type": "string",
|
|
1410
|
+
"minLength": 1
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
},
|
|
1414
|
+
"additionalProperties": false
|
|
1415
|
+
},
|
|
1416
|
+
"pasteGraphFragmentResponse": {
|
|
1417
|
+
"type": "object",
|
|
1418
|
+
"required": [
|
|
1419
|
+
"schema",
|
|
1420
|
+
"schemaVersion",
|
|
1421
|
+
"ok",
|
|
1422
|
+
"applied",
|
|
1423
|
+
"conflict",
|
|
1424
|
+
"target",
|
|
1425
|
+
"revisionBefore",
|
|
1426
|
+
"revisionAfter",
|
|
1427
|
+
"historyEntryId",
|
|
1428
|
+
"idRemap",
|
|
1429
|
+
"diagnostics"
|
|
1430
|
+
],
|
|
1431
|
+
"properties": {
|
|
1432
|
+
"schema": {
|
|
1433
|
+
"const": "skenion.runtime.paste-graph-fragment.response"
|
|
1434
|
+
},
|
|
1435
|
+
"schemaVersion": {
|
|
1436
|
+
"const": "0.1.0"
|
|
1437
|
+
},
|
|
1438
|
+
"ok": {
|
|
1439
|
+
"type": "boolean"
|
|
1440
|
+
},
|
|
1441
|
+
"applied": {
|
|
1442
|
+
"type": "boolean"
|
|
1443
|
+
},
|
|
1444
|
+
"conflict": {
|
|
1445
|
+
"type": "boolean"
|
|
1446
|
+
},
|
|
1447
|
+
"target": {
|
|
1448
|
+
"$ref": "#/$defs/graphTargetRef"
|
|
1449
|
+
},
|
|
1450
|
+
"revisionBefore": {
|
|
1451
|
+
"type": "string",
|
|
1452
|
+
"minLength": 1
|
|
1453
|
+
},
|
|
1454
|
+
"revisionAfter": {
|
|
1455
|
+
"anyOf": [
|
|
1456
|
+
{
|
|
1457
|
+
"type": "string",
|
|
1458
|
+
"minLength": 1
|
|
1459
|
+
},
|
|
1460
|
+
{
|
|
1461
|
+
"type": "null"
|
|
1462
|
+
}
|
|
1463
|
+
]
|
|
1464
|
+
},
|
|
1465
|
+
"historyEntryId": {
|
|
1466
|
+
"anyOf": [
|
|
1467
|
+
{
|
|
1468
|
+
"type": "string",
|
|
1469
|
+
"minLength": 1
|
|
1470
|
+
},
|
|
1471
|
+
{
|
|
1472
|
+
"type": "null"
|
|
1473
|
+
}
|
|
1474
|
+
]
|
|
1475
|
+
},
|
|
1476
|
+
"idRemap": {
|
|
1477
|
+
"$ref": "#/$defs/idRemapResult"
|
|
1478
|
+
},
|
|
1479
|
+
"diagnostics": {
|
|
1480
|
+
"type": "array",
|
|
1481
|
+
"items": {
|
|
1482
|
+
"$ref": "#/$defs/runtimeOperationDiagnostic"
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
},
|
|
1486
|
+
"additionalProperties": false
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
};
|
|
808
1490
|
export const graphPatchV01Schema = {
|
|
809
1491
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
810
1492
|
"$id": "https://skenion.dev/schemas/graph/v0.1/patch.schema.json",
|