@superdoc/cli 0.44.0-next.5 → 0.44.0-next.6

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.
@@ -566,274 +566,770 @@
566
566
  "additionalProperties": false,
567
567
  "description": "Guard returned by capabilities check for this exact HTML or Markdown write. Only for actions 'insert', 'replace'. Omit for other actions."
568
568
  },
569
- "target": {
569
+ "value": {
570
570
  "anyOf": [
571
571
  {
572
572
  "anyOf": [
573
573
  {
574
574
  "anyOf": [
575
575
  {
576
- "$ref": "#/$defs/BlockNodeAddress",
577
- "description": "Block address for structural insertion: {kind:'block', nodeType:'...', nodeId:'...'}."
576
+ "anyOf": [
577
+ {
578
+ "anyOf": [
579
+ {
580
+ "anyOf": [
581
+ {
582
+ "anyOf": [
583
+ {
584
+ "type": "string"
585
+ },
586
+ {
587
+ "type": "string",
588
+ "description": "Text content to insert."
589
+ }
590
+ ]
591
+ },
592
+ {
593
+ "type": "string",
594
+ "description": "Text content to insert."
595
+ }
596
+ ]
597
+ },
598
+ {
599
+ "type": "string",
600
+ "description": "Text content to insert."
601
+ }
602
+ ]
603
+ },
604
+ {
605
+ "type": "string",
606
+ "description": "HTML or Markdown content to convert and insert."
607
+ }
608
+ ]
578
609
  },
579
610
  {
580
- "type": "object",
581
- "properties": {
582
- "kind": {
583
- "const": "story",
611
+ "type": "string",
612
+ "description": "HTML or Markdown content to convert and insert."
613
+ }
614
+ ]
615
+ },
616
+ {
617
+ "type": "string",
618
+ "description": "HTML or Markdown content to convert and insert."
619
+ }
620
+ ]
621
+ },
622
+ {
623
+ "anyOf": [
624
+ {
625
+ "anyOf": [
626
+ {
627
+ "anyOf": [
628
+ {
584
629
  "type": "string"
585
630
  },
586
- "storyType": {
587
- "const": "body",
588
- "type": "string"
631
+ {
632
+ "type": "string",
633
+ "description": "HTML or Markdown replacement content."
589
634
  }
590
- },
591
- "additionalProperties": false,
592
- "required": [
593
- "kind",
594
- "storyType"
595
635
  ]
636
+ },
637
+ {
638
+ "type": "string",
639
+ "description": "HTML or Markdown replacement content."
596
640
  }
597
- ],
598
- "description": "Block address for structural insertion: {kind:'block', nodeType:'...', nodeId:'...'}."
641
+ ]
599
642
  },
600
643
  {
601
- "$ref": "#/$defs/SelectionTarget",
602
- "description": "Selection target: {kind:'selection', start:{kind:'text', blockId, offset}, end:{kind:'text', blockId, offset}}. Use 'ref' instead when you have a search result handle."
644
+ "type": "string",
645
+ "description": "HTML or Markdown that replaces the complete main body."
603
646
  }
604
- ],
605
- "description": "Block address for structural insertion: {kind:'block', nodeType:'...', nodeId:'...'}."
606
- },
607
- {
608
- "$ref": "#/$defs/DeletableBlockNodeAddress"
647
+ ]
609
648
  }
610
649
  ],
611
- "description": "Block address for structural insertion: {kind:'block', nodeType:'...', nodeId:'...'}. Required for action 'delete_block'."
650
+ "description": "Only for actions 'insert', 'replace'. Omit for other actions."
612
651
  },
613
- "in": {
652
+ "type": {
614
653
  "anyOf": [
615
654
  {
616
655
  "anyOf": [
617
656
  {
618
- "$ref": "#/$defs/StoryLocator",
619
- "description": "Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes."
657
+ "anyOf": [
658
+ {
659
+ "anyOf": [
660
+ {
661
+ "anyOf": [
662
+ {
663
+ "anyOf": [
664
+ {
665
+ "anyOf": [
666
+ {
667
+ "const": "ooxml",
668
+ "type": "string"
669
+ },
670
+ {
671
+ "const": "text",
672
+ "description": "Plain-text content format. Omit for the same 'text' default.",
673
+ "type": "string"
674
+ }
675
+ ]
676
+ },
677
+ {
678
+ "const": "text",
679
+ "description": "Plain-text content format. Omit for the same 'text' default.",
680
+ "type": "string"
681
+ }
682
+ ]
683
+ },
684
+ {
685
+ "const": "text",
686
+ "description": "Plain-text content format. Omit for the same 'text' default.",
687
+ "type": "string"
688
+ }
689
+ ]
690
+ },
691
+ {
692
+ "enum": [
693
+ "markdown",
694
+ "html"
695
+ ]
696
+ }
697
+ ]
698
+ },
699
+ {
700
+ "enum": [
701
+ "markdown",
702
+ "html"
703
+ ]
704
+ }
705
+ ]
620
706
  },
621
707
  {
622
- "oneOf": [
708
+ "enum": [
709
+ "markdown",
710
+ "html"
711
+ ]
712
+ }
713
+ ]
714
+ },
715
+ {
716
+ "anyOf": [
717
+ {
718
+ "anyOf": [
623
719
  {
624
- "type": "object",
625
- "properties": {
626
- "kind": {
627
- "const": "story",
720
+ "anyOf": [
721
+ {
722
+ "const": "ooxml",
628
723
  "type": "string"
629
724
  },
630
- "storyType": {
631
- "const": "body",
632
- "type": "string"
725
+ {
726
+ "enum": [
727
+ "html",
728
+ "markdown"
729
+ ]
633
730
  }
634
- },
635
- "required": [
636
- "kind",
637
- "storyType"
638
731
  ]
639
732
  },
640
733
  {
641
- "type": "object",
642
- "properties": {
643
- "kind": {
644
- "const": "story",
645
- "type": "string"
734
+ "enum": [
735
+ "html",
736
+ "markdown"
737
+ ]
738
+ }
739
+ ]
740
+ },
741
+ {
742
+ "enum": [
743
+ "html",
744
+ "markdown"
745
+ ]
746
+ }
747
+ ]
748
+ }
749
+ ],
750
+ "description": "Only for actions 'insert', 'replace'. Omit for other actions."
751
+ },
752
+ "namespaces": {
753
+ "type": "object",
754
+ "additionalProperties": {
755
+ "type": "string"
756
+ },
757
+ "description": "Only for actions 'insert', 'replace'. Omit for other actions."
758
+ },
759
+ "sourcePartUri": {
760
+ "type": "string",
761
+ "description": "Only for actions 'insert', 'replace'. Omit for other actions."
762
+ },
763
+ "dependencies": {
764
+ "type": "array",
765
+ "items": {
766
+ "type": "object",
767
+ "properties": {
768
+ "sourcePartUri": {
769
+ "type": "string"
770
+ },
771
+ "relationshipId": {
772
+ "type": "string"
773
+ },
774
+ "relationshipType": {
775
+ "type": "string"
776
+ },
777
+ "target": {
778
+ "type": "string"
779
+ },
780
+ "targetMode": {
781
+ "enum": [
782
+ "Internal",
783
+ "External"
784
+ ]
785
+ },
786
+ "contentType": {
787
+ "oneOf": [
788
+ {
789
+ "type": "string"
790
+ },
791
+ {
792
+ "type": "null"
793
+ }
794
+ ]
795
+ },
796
+ "dataBase64": {
797
+ "type": "string"
798
+ }
799
+ },
800
+ "additionalProperties": false,
801
+ "required": [
802
+ "sourcePartUri",
803
+ "relationshipId",
804
+ "relationshipType",
805
+ "target",
806
+ "targetMode",
807
+ "contentType"
808
+ ]
809
+ },
810
+ "description": "Only for actions 'insert', 'replace'. Omit for other actions."
811
+ },
812
+ "target": {
813
+ "anyOf": [
814
+ {
815
+ "anyOf": [
816
+ {
817
+ "anyOf": [
818
+ {
819
+ "anyOf": [
820
+ {
821
+ "anyOf": [
822
+ {
823
+ "anyOf": [
824
+ {
825
+ "oneOf": [
826
+ {
827
+ "$ref": "#/$defs/BlockNodeAddress"
828
+ },
829
+ {
830
+ "$ref": "#/$defs/SelectionTarget"
831
+ }
832
+ ]
833
+ },
834
+ {
835
+ "$ref": "#/$defs/BlockNodeAddress",
836
+ "description": "Block address for structural insertion: {kind:'block', nodeType:'...', nodeId:'...'}."
837
+ }
838
+ ]
839
+ },
840
+ {
841
+ "$ref": "#/$defs/SelectionTarget",
842
+ "description": "Selection target: {kind:'selection', start:{kind:'text', blockId, offset}, end:{kind:'text', blockId, offset}}."
843
+ }
844
+ ]
646
845
  },
647
- "storyType": {
648
- "const": "headerFooterSlot",
649
- "type": "string"
846
+ {
847
+ "oneOf": [
848
+ {
849
+ "$ref": "#/$defs/SelectionTarget"
850
+ },
851
+ {
852
+ "$ref": "#/$defs/BlockNodeAddress"
853
+ }
854
+ ]
855
+ }
856
+ ]
857
+ },
858
+ {
859
+ "anyOf": [
860
+ {
861
+ "anyOf": [
862
+ {
863
+ "anyOf": [
864
+ {
865
+ "anyOf": [
866
+ {
867
+ "anyOf": [
868
+ {
869
+ "anyOf": [
870
+ {
871
+ "anyOf": [
872
+ {
873
+ "anyOf": [
874
+ {
875
+ "$ref": "#/$defs/BlockNodeAddress"
876
+ },
877
+ {
878
+ "oneOf": [
879
+ {
880
+ "$ref": "#/$defs/BlockNodeAddress"
881
+ },
882
+ {
883
+ "$ref": "#/$defs/SelectionTarget"
884
+ }
885
+ ]
886
+ }
887
+ ]
888
+ },
889
+ {
890
+ "oneOf": [
891
+ {
892
+ "$ref": "#/$defs/BlockNodeAddress"
893
+ },
894
+ {
895
+ "$ref": "#/$defs/SelectionTarget"
896
+ }
897
+ ]
898
+ }
899
+ ]
900
+ },
901
+ {
902
+ "type": "object",
903
+ "properties": {
904
+ "kind": {
905
+ "const": "story",
906
+ "type": "string"
907
+ },
908
+ "storyType": {
909
+ "const": "body",
910
+ "type": "string"
911
+ }
912
+ },
913
+ "additionalProperties": false,
914
+ "required": [
915
+ "kind",
916
+ "storyType"
917
+ ]
918
+ }
919
+ ]
920
+ },
921
+ {
922
+ "$ref": "#/$defs/SelectionTarget"
923
+ }
924
+ ]
925
+ },
926
+ {
927
+ "oneOf": [
928
+ {
929
+ "$ref": "#/$defs/BlockNodeAddress"
930
+ },
931
+ {
932
+ "$ref": "#/$defs/SelectionTarget"
933
+ }
934
+ ],
935
+ "description": "Target block or selection to replace."
936
+ }
937
+ ]
938
+ },
939
+ {
940
+ "type": "object",
941
+ "properties": {
942
+ "kind": {
943
+ "const": "story",
944
+ "type": "string"
945
+ },
946
+ "storyType": {
947
+ "const": "body",
948
+ "type": "string"
949
+ }
950
+ },
951
+ "additionalProperties": false,
952
+ "required": [
953
+ "kind",
954
+ "storyType"
955
+ ]
956
+ }
957
+ ]
958
+ },
959
+ {
960
+ "oneOf": [
961
+ {
962
+ "$ref": "#/$defs/BlockNodeAddress"
963
+ },
964
+ {
965
+ "$ref": "#/$defs/SelectionTarget"
966
+ }
967
+ ]
968
+ }
969
+ ]
650
970
  },
651
- "section": {
971
+ {
652
972
  "type": "object",
653
973
  "properties": {
654
974
  "kind": {
655
- "const": "section",
975
+ "const": "story",
656
976
  "type": "string"
657
977
  },
658
- "sectionId": {
978
+ "storyType": {
979
+ "const": "body",
659
980
  "type": "string"
660
981
  }
661
982
  },
983
+ "additionalProperties": false,
662
984
  "required": [
663
985
  "kind",
664
- "sectionId"
665
- ]
666
- },
667
- "headerFooterKind": {
668
- "enum": [
669
- "header",
670
- "footer"
671
- ]
672
- },
673
- "variant": {
674
- "enum": [
675
- "default",
676
- "first",
677
- "even"
678
- ]
679
- },
680
- "resolution": {
681
- "enum": [
682
- "effective",
683
- "explicit"
684
- ]
685
- },
686
- "onWrite": {
687
- "enum": [
688
- "materializeIfInherited",
689
- "editResolvedPart",
690
- "error"
986
+ "storyType"
691
987
  ]
692
988
  }
693
- },
694
- "required": [
695
- "kind",
696
- "storyType",
697
- "section",
698
- "headerFooterKind",
699
- "variant"
700
989
  ]
990
+ }
991
+ ]
992
+ },
993
+ {
994
+ "$ref": "#/$defs/SelectionTarget",
995
+ "description": "Selection target: {kind:'selection', start:{kind:'text', blockId, offset}, end:{kind:'text', blockId, offset}}. Use 'ref' instead when you have a search result handle."
996
+ }
997
+ ]
998
+ },
999
+ {
1000
+ "$ref": "#/$defs/DeletableBlockNodeAddress"
1001
+ }
1002
+ ],
1003
+ "description": "Required for action 'delete_block'."
1004
+ },
1005
+ "in": {
1006
+ "$ref": "#/$defs/StoryLocator",
1007
+ "description": "Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes. Only for actions 'insert', 'replace', 'delete'. Omit for other actions."
1008
+ },
1009
+ "placement": {
1010
+ "enum": [
1011
+ "before",
1012
+ "after",
1013
+ "insideStart",
1014
+ "insideEnd"
1015
+ ],
1016
+ "description": "Only for action 'insert'. Omit for other actions."
1017
+ },
1018
+ "capture": {
1019
+ "type": "object",
1020
+ "properties": {
1021
+ "formatVersion": {
1022
+ "const": 1,
1023
+ "type": "number"
1024
+ },
1025
+ "snapshotId": {
1026
+ "type": "string",
1027
+ "minLength": 1
1028
+ },
1029
+ "at": {
1030
+ "oneOf": [
1031
+ {
1032
+ "$ref": "#/$defs/SelectionTarget"
1033
+ },
1034
+ {
1035
+ "type": "object",
1036
+ "properties": {
1037
+ "kind": {
1038
+ "const": "tableCells",
1039
+ "type": "string"
701
1040
  },
702
- {
703
- "type": "object",
704
- "properties": {
705
- "kind": {
706
- "const": "story",
707
- "type": "string"
708
- },
709
- "storyType": {
710
- "const": "headerFooterPart",
711
- "type": "string"
712
- },
713
- "refId": {
714
- "type": "string"
715
- }
716
- },
717
- "required": [
718
- "kind",
719
- "storyType",
720
- "refId"
721
- ]
1041
+ "selectionMode": {
1042
+ "const": "cells",
1043
+ "type": "string"
722
1044
  },
723
- {
724
- "type": "object",
725
- "properties": {
726
- "kind": {
727
- "const": "story",
728
- "type": "string"
729
- },
730
- "storyType": {
731
- "const": "footnote",
732
- "type": "string"
733
- },
734
- "noteId": {
735
- "type": "string"
736
- }
737
- },
738
- "required": [
739
- "kind",
740
- "storyType",
741
- "noteId"
742
- ]
1045
+ "isRectangular": {
1046
+ "const": true,
1047
+ "type": "boolean"
743
1048
  },
744
- {
1049
+ "tableId": {
1050
+ "type": "string"
1051
+ },
1052
+ "start": {
745
1053
  "type": "object",
746
1054
  "properties": {
747
- "kind": {
748
- "const": "story",
749
- "type": "string"
750
- },
751
- "storyType": {
752
- "const": "endnote",
753
- "type": "string"
1055
+ "rowIndex": {
1056
+ "type": "integer"
754
1057
  },
755
- "noteId": {
756
- "type": "string"
1058
+ "columnIndex": {
1059
+ "type": "integer"
757
1060
  }
758
1061
  },
1062
+ "additionalProperties": false,
759
1063
  "required": [
760
- "kind",
761
- "storyType",
762
- "noteId"
1064
+ "rowIndex",
1065
+ "columnIndex"
763
1066
  ]
764
1067
  },
765
- {
1068
+ "end": {
766
1069
  "type": "object",
767
1070
  "properties": {
768
- "kind": {
769
- "const": "story",
770
- "type": "string"
771
- },
772
- "storyType": {
773
- "const": "textbox",
774
- "type": "string"
1071
+ "rowIndex": {
1072
+ "type": "integer"
775
1073
  },
776
- "textboxId": {
777
- "type": "string"
1074
+ "columnIndex": {
1075
+ "type": "integer"
778
1076
  }
779
1077
  },
1078
+ "additionalProperties": false,
780
1079
  "required": [
781
- "kind",
782
- "storyType",
783
- "textboxId"
1080
+ "rowIndex",
1081
+ "columnIndex"
784
1082
  ]
1083
+ },
1084
+ "story": {
1085
+ "$ref": "#/$defs/StoryLocator"
785
1086
  }
786
- ],
787
- "description": "Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes."
1087
+ },
1088
+ "additionalProperties": false,
1089
+ "required": [
1090
+ "kind",
1091
+ "tableId",
1092
+ "start",
1093
+ "end"
1094
+ ]
788
1095
  }
789
- ],
790
- "description": "Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes."
1096
+ ]
791
1097
  },
792
- {
793
- "$ref": "#/$defs/StoryLocator",
794
- "description": "Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes."
795
- }
796
- ],
797
- "description": "Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes. Only for actions 'insert', 'replace', 'delete'. Omit for other actions."
798
- },
799
- "value": {
800
- "anyOf": [
801
- {
802
- "type": "string",
803
- "description": "HTML or Markdown content to convert and insert."
1098
+ "evaluatedRevision": {
1099
+ "type": "string"
804
1100
  },
805
- {
806
- "type": "string",
807
- "description": "HTML or Markdown that replaces the complete main body."
808
- }
809
- ],
810
- "description": "HTML or Markdown content to convert and insert. Only for actions 'insert', 'replace'. Omit for other actions."
811
- },
812
- "type": {
813
- "anyOf": [
814
- {
815
- "type": "string",
816
- "oneOf": [
817
- {
818
- "const": "text",
819
- "description": "Plain-text content format. Omit for the same 'text' default.",
1101
+ "fragment": {
1102
+ "type": "object",
1103
+ "properties": {
1104
+ "placement": {
1105
+ "enum": [
1106
+ "inline",
1107
+ "blocks",
1108
+ "table"
1109
+ ]
1110
+ },
1111
+ "xml": {
1112
+ "type": "string"
1113
+ },
1114
+ "namespaces": {
1115
+ "type": "object",
1116
+ "additionalProperties": {
1117
+ "type": "string"
1118
+ }
1119
+ },
1120
+ "table": {
1121
+ "type": "object",
1122
+ "properties": {
1123
+ "tableId": {
1124
+ "type": "string"
1125
+ },
1126
+ "gridColumnCount": {
1127
+ "type": "integer"
1128
+ },
1129
+ "cells": {
1130
+ "type": "array",
1131
+ "items": {
1132
+ "type": "object",
1133
+ "properties": {
1134
+ "rowIndex": {
1135
+ "type": "integer"
1136
+ },
1137
+ "columnIndex": {
1138
+ "type": "integer"
1139
+ },
1140
+ "gridSpan": {
1141
+ "type": "integer"
1142
+ },
1143
+ "vMerge": {
1144
+ "enum": [
1145
+ "none",
1146
+ "restart",
1147
+ "continue"
1148
+ ]
1149
+ }
1150
+ },
1151
+ "additionalProperties": false,
1152
+ "required": [
1153
+ "rowIndex",
1154
+ "columnIndex",
1155
+ "gridSpan",
1156
+ "vMerge"
1157
+ ]
1158
+ }
1159
+ }
1160
+ },
1161
+ "additionalProperties": false,
1162
+ "required": [
1163
+ "tableId",
1164
+ "gridColumnCount",
1165
+ "cells"
1166
+ ]
1167
+ }
1168
+ },
1169
+ "additionalProperties": false,
1170
+ "required": [
1171
+ "placement",
1172
+ "xml",
1173
+ "namespaces"
1174
+ ]
1175
+ },
1176
+ "source": {
1177
+ "type": "object",
1178
+ "properties": {
1179
+ "story": {
1180
+ "oneOf": [
1181
+ {
1182
+ "$ref": "#/$defs/StoryLocator"
1183
+ },
1184
+ {
1185
+ "type": "null"
1186
+ }
1187
+ ]
1188
+ },
1189
+ "partUri": {
820
1190
  "type": "string"
821
1191
  },
822
- {
823
- "enum": [
824
- "markdown",
825
- "html"
1192
+ "paragraphStyleId": {
1193
+ "oneOf": [
1194
+ {
1195
+ "type": "string"
1196
+ },
1197
+ {
1198
+ "type": "null"
1199
+ }
826
1200
  ]
1201
+ },
1202
+ "packageRevision": {
1203
+ "type": "string"
827
1204
  }
1205
+ },
1206
+ "additionalProperties": false,
1207
+ "required": [
1208
+ "story",
1209
+ "partUri",
1210
+ "paragraphStyleId"
828
1211
  ]
829
1212
  },
830
- {
831
- "type": "string",
832
- "enum": [
833
- "html",
834
- "markdown"
1213
+ "context": {
1214
+ "type": "object",
1215
+ "properties": {
1216
+ "xml": {
1217
+ "type": "array",
1218
+ "items": {
1219
+ "type": "string"
1220
+ }
1221
+ },
1222
+ "tableMerges": {
1223
+ "type": "array",
1224
+ "items": {
1225
+ "type": "object",
1226
+ "properties": {
1227
+ "selectedRowIndex": {
1228
+ "type": "integer"
1229
+ },
1230
+ "columnIndex": {
1231
+ "type": "integer"
1232
+ },
1233
+ "restartRowIndex": {
1234
+ "type": "integer"
1235
+ },
1236
+ "restartCellPropertiesXml": {
1237
+ "type": "string"
1238
+ }
1239
+ },
1240
+ "additionalProperties": false,
1241
+ "required": [
1242
+ "selectedRowIndex",
1243
+ "columnIndex",
1244
+ "restartRowIndex",
1245
+ "restartCellPropertiesXml"
1246
+ ]
1247
+ }
1248
+ }
1249
+ },
1250
+ "additionalProperties": false,
1251
+ "required": [
1252
+ "xml"
835
1253
  ]
1254
+ },
1255
+ "dependencies": {
1256
+ "type": "array",
1257
+ "items": {
1258
+ "type": "object",
1259
+ "properties": {
1260
+ "sourcePartUri": {
1261
+ "type": "string"
1262
+ },
1263
+ "relationshipId": {
1264
+ "type": "string"
1265
+ },
1266
+ "relationshipType": {
1267
+ "type": "string"
1268
+ },
1269
+ "target": {
1270
+ "type": "string"
1271
+ },
1272
+ "targetMode": {
1273
+ "enum": [
1274
+ "Internal",
1275
+ "External"
1276
+ ]
1277
+ },
1278
+ "contentType": {
1279
+ "oneOf": [
1280
+ {
1281
+ "type": "string"
1282
+ },
1283
+ {
1284
+ "type": "null"
1285
+ }
1286
+ ]
1287
+ },
1288
+ "dataBase64": {
1289
+ "type": "string"
1290
+ }
1291
+ },
1292
+ "additionalProperties": false,
1293
+ "required": [
1294
+ "sourcePartUri",
1295
+ "relationshipId",
1296
+ "relationshipType",
1297
+ "target",
1298
+ "targetMode",
1299
+ "contentType"
1300
+ ]
1301
+ }
1302
+ },
1303
+ "diagnostics": {
1304
+ "type": "array",
1305
+ "items": {
1306
+ "type": "object",
1307
+ "properties": {
1308
+ "code": {
1309
+ "type": "string"
1310
+ },
1311
+ "message": {
1312
+ "type": "string"
1313
+ }
1314
+ },
1315
+ "additionalProperties": false,
1316
+ "required": [
1317
+ "code",
1318
+ "message"
1319
+ ]
1320
+ }
836
1321
  }
1322
+ },
1323
+ "additionalProperties": false,
1324
+ "required": [
1325
+ "formatVersion",
1326
+ "at",
1327
+ "evaluatedRevision",
1328
+ "fragment",
1329
+ "source",
1330
+ "context",
1331
+ "dependencies",
1332
+ "diagnostics"
837
1333
  ],
838
1334
  "description": "Only for actions 'insert', 'replace'. Omit for other actions."
839
1335
  },
@@ -842,12 +1338,39 @@
842
1338
  {
843
1339
  "anyOf": [
844
1340
  {
845
- "type": "string",
1341
+ "anyOf": [
1342
+ {
1343
+ "type": "string",
1344
+ "description": "Handle ref from superdoc_search result (pass handle.ref value directly). Preferred over building a target object."
1345
+ },
1346
+ {
1347
+ "type": "string",
1348
+ "minLength": 1
1349
+ }
1350
+ ],
846
1351
  "description": "Handle ref from superdoc_search result (pass handle.ref value directly). Preferred over building a target object."
847
1352
  },
848
1353
  {
849
- "type": "string",
850
- "description": "Reference handle from a previous search result."
1354
+ "anyOf": [
1355
+ {
1356
+ "anyOf": [
1357
+ {
1358
+ "type": "string",
1359
+ "description": "Search result handle."
1360
+ },
1361
+ {
1362
+ "type": "string",
1363
+ "description": "Reference handle from a previous search result."
1364
+ }
1365
+ ],
1366
+ "description": "Search result handle."
1367
+ },
1368
+ {
1369
+ "type": "string",
1370
+ "minLength": 1
1371
+ }
1372
+ ],
1373
+ "description": "Search result handle."
851
1374
  }
852
1375
  ],
853
1376
  "description": "Handle ref from superdoc_search result (pass handle.ref value directly). Preferred over building a target object."
@@ -859,15 +1382,6 @@
859
1382
  ],
860
1383
  "description": "Handle ref from superdoc_search result (pass handle.ref value directly). Preferred over building a target object. Only for actions 'insert', 'replace', 'delete'. Omit for other actions."
861
1384
  },
862
- "placement": {
863
- "enum": [
864
- "before",
865
- "after",
866
- "insideStart",
867
- "insideEnd"
868
- ],
869
- "description": "Where to place content relative to target: 'before', 'after', 'insideStart', or 'insideEnd'. Only for action 'insert'. Omit for other actions."
870
- },
871
1385
  "content": {
872
1386
  "anyOf": [
873
1387
  {
@@ -885,56 +1399,97 @@
885
1399
  "description": "Document fragment to insert (structured content)."
886
1400
  },
887
1401
  {
888
- "oneOf": [
1402
+ "anyOf": [
889
1403
  {
890
- "type": "object",
891
- "properties": {}
1404
+ "oneOf": [
1405
+ {
1406
+ "type": "object"
1407
+ },
1408
+ {
1409
+ "type": "array",
1410
+ "items": {
1411
+ "type": "object"
1412
+ }
1413
+ }
1414
+ ],
1415
+ "description": "Document fragment to replace with (structured content)."
892
1416
  },
893
1417
  {
894
- "type": "array",
895
- "items": {
896
- "type": "object",
897
- "properties": {}
898
- }
1418
+ "oneOf": [
1419
+ {
1420
+ "type": "object"
1421
+ },
1422
+ {
1423
+ "type": "array",
1424
+ "items": {
1425
+ "type": "object"
1426
+ }
1427
+ }
1428
+ ],
1429
+ "description": "Document fragment that replaces the complete main body."
899
1430
  }
900
- ]
1431
+ ],
1432
+ "description": "Document fragment to replace with (structured content)."
901
1433
  }
902
1434
  ],
903
1435
  "description": "Document fragment to insert (structured content). Only for actions 'insert', 'replace'. Omit for other actions."
904
1436
  },
905
1437
  "nestingPolicy": {
1438
+ "type": "object",
1439
+ "properties": {
1440
+ "tables": {
1441
+ "enum": [
1442
+ "forbid",
1443
+ "allow"
1444
+ ]
1445
+ }
1446
+ },
1447
+ "additionalProperties": false,
1448
+ "description": "Controls nesting behavior. tables: 'allow' permits inserting tables inside other tables. Only for actions 'insert', 'replace'. Omit for other actions."
1449
+ },
1450
+ "replaceMode": {
1451
+ "type": "string",
1452
+ "enum": [
1453
+ "contents"
1454
+ ],
1455
+ "description": "Replace supported paragraph contents while preserving its container. Requires direct mode. Only for action 'replace'. Omit for other actions."
1456
+ },
1457
+ "expectedSnapshotId": {
1458
+ "type": "string",
1459
+ "description": "Same-session snapshot of the unchanged paragraph required before contents replacement or restoration. Only for action 'replace'. Omit for other actions."
1460
+ },
1461
+ "text": {
906
1462
  "anyOf": [
907
1463
  {
908
- "type": "object",
909
- "properties": {
910
- "tables": {
911
- "enum": [
912
- "forbid",
913
- "allow"
1464
+ "anyOf": [
1465
+ {
1466
+ "anyOf": [
1467
+ {
1468
+ "type": "string"
1469
+ },
1470
+ {
1471
+ "type": "string",
1472
+ "description": "Complete replacement text for the main body."
1473
+ }
914
1474
  ]
1475
+ },
1476
+ {
1477
+ "type": "string",
1478
+ "description": "Replacement text content."
915
1479
  }
916
- },
917
- "additionalProperties": false,
918
- "description": "Controls nesting behavior. tables: 'allow' permits inserting tables inside other tables."
1480
+ ]
919
1481
  },
920
1482
  {
921
- "type": "object",
922
- "properties": {
923
- "tables": {
924
- "enum": [
925
- "forbid",
926
- "allow"
927
- ]
928
- }
929
- },
930
- "description": "Controls nesting behavior. tables: 'allow' permits inserting tables inside other tables."
1483
+ "type": "string",
1484
+ "description": "Replacement text content."
931
1485
  }
932
1486
  ],
933
- "description": "Controls nesting behavior. tables: 'allow' permits inserting tables inside other tables. Only for actions 'insert', 'replace'. Omit for other actions."
1487
+ "description": "Only for action 'replace'. Omit for other actions."
934
1488
  },
935
- "text": {
1489
+ "snapshotId": {
936
1490
  "type": "string",
937
- "description": "Complete replacement text for the main body. Only for action 'replace'. Omit for other actions."
1491
+ "minLength": 1,
1492
+ "description": "Only for action 'replace'. Omit for other actions."
938
1493
  },
939
1494
  "expectedText": {
940
1495
  "type": "string",
@@ -1231,16 +1786,40 @@
1231
1786
  "description": "Only for action 'check_support'. Omit for other actions."
1232
1787
  },
1233
1788
  "options": {
1234
- "type": "object",
1235
- "properties": {
1236
- "changeMode": {
1237
- "enum": [
1238
- "direct",
1239
- "tracked"
1240
- ]
1789
+ "anyOf": [
1790
+ {
1791
+ "type": "object",
1792
+ "properties": {
1793
+ "changeMode": {
1794
+ "enum": [
1795
+ "direct",
1796
+ "tracked"
1797
+ ]
1798
+ }
1799
+ },
1800
+ "additionalProperties": false
1801
+ },
1802
+ {
1803
+ "type": "object",
1804
+ "properties": {
1805
+ "changeMode": {
1806
+ "enum": [
1807
+ "direct",
1808
+ "tracked"
1809
+ ]
1810
+ },
1811
+ "replaceMode": {
1812
+ "const": "contents",
1813
+ "type": "string"
1814
+ },
1815
+ "expectedSnapshotId": {
1816
+ "type": "string",
1817
+ "minLength": 1
1818
+ }
1819
+ },
1820
+ "additionalProperties": false
1241
1821
  }
1242
- },
1243
- "additionalProperties": false,
1822
+ ],
1244
1823
  "description": "Only for action 'check_support'. Omit for other actions."
1245
1824
  }
1246
1825
  },
@@ -1641,6 +2220,14 @@
1641
2220
  "operationId": "doc.insert",
1642
2221
  "intentAction": "insert",
1643
2222
  "requiredOneOf": [
2223
+ [
2224
+ "value",
2225
+ "type",
2226
+ "namespaces"
2227
+ ],
2228
+ [
2229
+ "capture"
2230
+ ],
1644
2231
  [
1645
2232
  "target",
1646
2233
  "value"
@@ -1675,6 +2262,24 @@
1675
2262
  "operationId": "doc.replace",
1676
2263
  "intentAction": "replace",
1677
2264
  "requiredOneOf": [
2265
+ [
2266
+ "target",
2267
+ "text"
2268
+ ],
2269
+ [
2270
+ "target",
2271
+ "snapshotId"
2272
+ ],
2273
+ [
2274
+ "target",
2275
+ "value",
2276
+ "type",
2277
+ "namespaces"
2278
+ ],
2279
+ [
2280
+ "target",
2281
+ "capture"
2282
+ ],
1678
2283
  [
1679
2284
  "target",
1680
2285
  "text"