@superdoc-dev/sdk 1.22.1 → 1.23.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.
@@ -88,7 +88,7 @@
88
88
  },
89
89
  {
90
90
  "name": "superdoc_edit",
91
- "description": "The primary tool for inserting content into documents. ALWAYS use action \"insert\" with type \"markdown\" to create headings, paragraphs, or any block content: this is faster and creates proper document structure in one call. Do NOT use superdoc_create for headings or paragraphs. The markdown parser creates headings from # markers (# = Heading1, ## = Heading2), bold from **text**, italic from *text*, and numbered/bullet lists. Position markdown inserts with \"target\" (a BlockNodeAddress like {kind:\"block\", nodeType, nodeId}) and \"placement\" (before, after, insideStart, insideEnd). Without a target, content appends at the end of the document. IMPORTANT: After a markdown insert, analyze the document context (what kind of document, how titles and body text are styled) and follow up with ONE superdoc_mutations call to format inserted blocks so they look like they belong. Each format.apply step accepts \"inline\" (fontFamily, fontSize, bold, underline, color), \"alignment\", and \"scope\" in the same step. Use scope: \"block\" so formatting covers the entire paragraph. Copy the exact property values from the existing get_content blocks (fontFamily, fontSize, color, alignment, bold, underline). Do NOT invent values: use what the blocks show. Also supports replace, delete, and undo/redo. For replace and delete, pass a \"ref\" from superdoc_search or superdoc_get_content blocks. A search ref covers only the matched substring; a block ref covers the entire block text, so use block refs when rewriting or shortening whole paragraphs. For multi-step redlines or whole-clause rewrites, prefer superdoc_mutations with where:{by:\"block\", nodeType, nodeId} from superdoc_get_content action \"blocks\" includeText:true rather than relying on text selectors. Refs expire after any mutation; always re-search before the next edit. For 2+ edits that must succeed or fail atomically, use superdoc_mutations instead. Supports \"dryRun\" to preview changes and \"changeMode: tracked\" to record edits as tracked changes (not supported for markdown/html inserts). Do NOT build \"target\" objects manually when a ref is available; prefer \"ref\" for simpler, more reliable targeting.\n\nEXAMPLES:\n 1. {\"action\":\"insert\",\"type\":\"markdown\",\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"<nodeId>\"},\"placement\":\"before\",\"value\":\"# Executive Summary\\n\\nThis agreement sets forth the principal terms...\"}\n 2. {\"action\":\"insert\",\"type\":\"markdown\",\"value\":\"# Section Title\\n\\nParagraph content here.\\n\\n# Another Section\\n\\nMore content with **bold** and *italic*.\"}\n 3. {\"action\":\"replace\",\"ref\":\"<handle.ref>\",\"text\":\"new text here\"}\n 4. {\"action\":\"delete\",\"ref\":\"<handle.ref>\"}\n 5. {\"action\":\"undo\"}",
91
+ "description": "The primary tool for inserting content into documents. ALWAYS use action \"insert\" with type \"markdown\" to create headings, paragraphs, or any block content: this is faster and creates proper document structure in one call. Do NOT use superdoc_create for headings or paragraphs. The markdown parser creates headings from # markers (# = Heading1, ## = Heading2), bold from **text**, italic from *text*, and numbered/bullet lists. Position markdown inserts with \"target\" (a BlockNodeAddress like {kind:\"block\", nodeType, nodeId}) and \"placement\" (before, after, insideStart, insideEnd). Without a target, content appends at the end of the document. IMPORTANT: After a markdown insert, analyze the document context (what kind of document, how titles and body text are styled) and follow up with ONE superdoc_mutations call to format inserted blocks so they look like they belong. Each format.apply step accepts \"inline\" (fontFamily, fontSize, bold, underline, color), \"alignment\", and \"scope\" in the same step. Use scope: \"block\" so formatting covers the entire paragraph. Copy the exact property values from the existing get_content blocks (fontFamily, fontSize, color, alignment, bold, underline). Do NOT invent values: use what the blocks show. Also supports replace, delete, and undo/redo. For replace and delete, pass a \"ref\" from superdoc_search or superdoc_get_content blocks. `delete` removes a text range and leaves the block container; `delete_block` removes the entire block node by its `{kind:'block',nodeType,nodeId}` address; `delete_block_range` removes a contiguous span of top-level blocks. A search ref covers only the matched substring; a block ref covers the entire block text, so use block refs when rewriting or shortening whole paragraphs. For multi-step redlines or whole-clause rewrites, prefer superdoc_mutations with where:{by:\"block\", nodeType, nodeId} from superdoc_get_content action \"blocks\" includeText:true rather than relying on text selectors. Refs expire after any mutation; always re-search before the next edit. For 2+ edits that must succeed or fail atomically, use superdoc_mutations instead. Supports \"dryRun\" to preview changes and \"changeMode: tracked\" to record edits as tracked changes (not supported for markdown/html inserts). Do NOT build \"target\" objects manually when a ref is available; prefer \"ref\" for simpler, more reliable targeting.\n\nEXAMPLES:\n 1. {\"action\":\"insert\",\"type\":\"markdown\",\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"<nodeId>\"},\"placement\":\"before\",\"value\":\"# Executive Summary\\n\\nThis agreement sets forth the principal terms...\"}\n 2. {\"action\":\"insert\",\"type\":\"markdown\",\"value\":\"# Section Title\\n\\nParagraph content here.\\n\\n# Another Section\\n\\nMore content with **bold** and *italic*.\"}\n 3. {\"action\":\"replace\",\"ref\":\"<handle.ref>\",\"text\":\"new text here\"}\n 4. {\"action\":\"delete\",\"ref\":\"<handle.ref>\"}\n 5. {\"action\":\"delete_block\",\"target\":{\"kind\":\"block\",\"nodeType\":\"heading\",\"nodeId\":\"<nodeId>\"}}\n 6. {\"action\":\"undo\"}",
92
92
  "parameters": {
93
93
  "type": "object",
94
94
  "properties": {
@@ -96,12 +96,14 @@
96
96
  "type": "string",
97
97
  "enum": [
98
98
  "delete",
99
+ "delete_block",
100
+ "delete_block_range",
99
101
  "insert",
100
102
  "redo",
101
103
  "replace",
102
104
  "undo"
103
105
  ],
104
- "description": "The action to perform. One of: delete, insert, redo, replace, undo."
106
+ "description": "The action to perform. One of: delete, delete_block, delete_block_range, insert, redo, replace, undo."
105
107
  },
106
108
  "force": {
107
109
  "type": "boolean",
@@ -123,236 +125,36 @@
123
125
  "oneOf": [
124
126
  {
125
127
  "oneOf": [
126
- {
127
- "$ref": "#/$defs/BlockNodeAddress",
128
- "description": "Block address for structural insertion: {kind:'block', nodeType:'...', nodeId:'...'}."
129
- },
130
128
  {
131
129
  "oneOf": [
132
130
  {
133
- "type": "object",
134
- "properties": {
135
- "kind": {
136
- "const": "selection",
137
- "type": "string"
138
- },
139
- "start": {
140
- "oneOf": [
141
- {
142
- "type": "object",
143
- "properties": {
144
- "kind": {
145
- "const": "text",
146
- "type": "string"
147
- },
148
- "blockId": {
149
- "type": "string"
150
- },
151
- "offset": {
152
- "type": "number"
153
- },
154
- "story": {
155
- "oneOf": [
156
- {
157
- "type": "object",
158
- "properties": {
159
- "kind": {
160
- "const": "story",
161
- "type": "string"
162
- },
163
- "storyType": {
164
- "const": "body",
165
- "type": "string"
166
- }
167
- },
168
- "required": [
169
- "kind",
170
- "storyType"
171
- ]
172
- },
173
- {
174
- "type": "object",
175
- "properties": {
176
- "kind": {
177
- "const": "story",
178
- "type": "string"
179
- },
180
- "storyType": {
181
- "const": "headerFooterSlot",
182
- "type": "string"
183
- },
184
- "section": {
185
- "type": "object",
186
- "properties": {
187
- "kind": {
188
- "const": "section",
189
- "type": "string"
190
- },
191
- "sectionId": {
192
- "type": "string"
193
- }
194
- },
195
- "required": [
196
- "kind",
197
- "sectionId"
198
- ]
199
- },
200
- "headerFooterKind": {
201
- "enum": [
202
- "header",
203
- "footer"
204
- ]
205
- },
206
- "variant": {
207
- "enum": [
208
- "default",
209
- "first",
210
- "even"
211
- ]
212
- },
213
- "resolution": {
214
- "enum": [
215
- "effective",
216
- "explicit"
217
- ]
218
- },
219
- "onWrite": {
220
- "enum": [
221
- "materializeIfInherited",
222
- "editResolvedPart",
223
- "error"
224
- ]
225
- }
226
- },
227
- "required": [
228
- "kind",
229
- "storyType",
230
- "section",
231
- "headerFooterKind",
232
- "variant"
233
- ]
234
- },
235
- {
236
- "type": "object",
237
- "properties": {
238
- "kind": {
239
- "const": "story",
240
- "type": "string"
241
- },
242
- "storyType": {
243
- "const": "headerFooterPart",
244
- "type": "string"
245
- },
246
- "refId": {
247
- "type": "string"
248
- }
249
- },
250
- "required": [
251
- "kind",
252
- "storyType",
253
- "refId"
254
- ]
255
- },
256
- {
257
- "type": "object",
258
- "properties": {
259
- "kind": {
260
- "const": "story",
261
- "type": "string"
262
- },
263
- "storyType": {
264
- "const": "footnote",
265
- "type": "string"
266
- },
267
- "noteId": {
268
- "type": "string"
269
- }
270
- },
271
- "required": [
272
- "kind",
273
- "storyType",
274
- "noteId"
275
- ]
276
- },
277
- {
278
- "type": "object",
279
- "properties": {
280
- "kind": {
281
- "const": "story",
282
- "type": "string"
283
- },
284
- "storyType": {
285
- "const": "endnote",
286
- "type": "string"
287
- },
288
- "noteId": {
289
- "type": "string"
290
- }
291
- },
292
- "required": [
293
- "kind",
294
- "storyType",
295
- "noteId"
296
- ]
297
- },
298
- {
299
- "type": "object",
300
- "properties": {
301
- "kind": {
302
- "const": "story",
303
- "type": "string"
304
- },
305
- "storyType": {
306
- "const": "textbox",
307
- "type": "string"
308
- },
309
- "textboxId": {
310
- "type": "string"
311
- }
312
- },
313
- "required": [
314
- "kind",
315
- "storyType",
316
- "textboxId"
317
- ]
318
- }
319
- ],
320
- "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."
321
- }
322
- },
323
- "required": [
324
- "kind",
325
- "blockId",
326
- "offset"
327
- ]
131
+ "$ref": "#/$defs/BlockNodeAddress",
132
+ "description": "Block address for structural insertion: {kind:'block', nodeType:'...', nodeId:'...'}."
133
+ },
134
+ {
135
+ "oneOf": [
136
+ {
137
+ "type": "object",
138
+ "properties": {
139
+ "kind": {
140
+ "const": "selection",
141
+ "type": "string"
328
142
  },
329
- {
330
- "type": "object",
331
- "properties": {
332
- "kind": {
333
- "const": "nodeEdge",
334
- "type": "string"
335
- },
336
- "node": {
143
+ "start": {
144
+ "oneOf": [
145
+ {
337
146
  "type": "object",
338
147
  "properties": {
339
148
  "kind": {
340
- "const": "block",
149
+ "const": "text",
341
150
  "type": "string"
342
151
  },
343
- "nodeType": {
344
- "enum": [
345
- "paragraph",
346
- "heading",
347
- "table",
348
- "tableOfContents",
349
- "sdt",
350
- "image"
351
- ]
352
- },
353
- "nodeId": {
152
+ "blockId": {
354
153
  "type": "string"
355
154
  },
155
+ "offset": {
156
+ "type": "number"
157
+ },
356
158
  "story": {
357
159
  "oneOf": [
358
160
  {
@@ -524,243 +326,243 @@
524
326
  },
525
327
  "required": [
526
328
  "kind",
527
- "nodeType",
528
- "nodeId"
529
- ]
530
- },
531
- "edge": {
532
- "enum": [
533
- "before",
534
- "after"
329
+ "blockId",
330
+ "offset"
535
331
  ]
536
- }
537
- },
538
- "required": [
539
- "kind",
540
- "node",
541
- "edge"
542
- ]
543
- }
544
- ],
545
- "description": "A point in the document. Use {kind:'text', blockId, offset} for character positions or {kind:'nodeEdge', node:{kind:'block', nodeType, nodeId}, edge:'before'|'after'} for block boundaries."
546
- },
547
- "end": {
548
- "oneOf": [
549
- {
550
- "type": "object",
551
- "properties": {
552
- "kind": {
553
- "const": "text",
554
- "type": "string"
555
- },
556
- "blockId": {
557
- "type": "string"
558
332
  },
559
- "offset": {
560
- "type": "number"
561
- },
562
- "story": {
563
- "oneOf": [
564
- {
565
- "type": "object",
566
- "properties": {
567
- "kind": {
568
- "const": "story",
569
- "type": "string"
570
- },
571
- "storyType": {
572
- "const": "body",
573
- "type": "string"
574
- }
575
- },
576
- "required": [
577
- "kind",
578
- "storyType"
579
- ]
333
+ {
334
+ "type": "object",
335
+ "properties": {
336
+ "kind": {
337
+ "const": "nodeEdge",
338
+ "type": "string"
580
339
  },
581
- {
340
+ "node": {
582
341
  "type": "object",
583
342
  "properties": {
584
343
  "kind": {
585
- "const": "story",
344
+ "const": "block",
586
345
  "type": "string"
587
346
  },
588
- "storyType": {
589
- "const": "headerFooterSlot",
590
- "type": "string"
591
- },
592
- "section": {
593
- "type": "object",
594
- "properties": {
595
- "kind": {
596
- "const": "section",
597
- "type": "string"
598
- },
599
- "sectionId": {
600
- "type": "string"
601
- }
602
- },
603
- "required": [
604
- "kind",
605
- "sectionId"
606
- ]
607
- },
608
- "headerFooterKind": {
609
- "enum": [
610
- "header",
611
- "footer"
612
- ]
613
- },
614
- "variant": {
615
- "enum": [
616
- "default",
617
- "first",
618
- "even"
619
- ]
620
- },
621
- "resolution": {
347
+ "nodeType": {
622
348
  "enum": [
623
- "effective",
624
- "explicit"
349
+ "paragraph",
350
+ "heading",
351
+ "table",
352
+ "tableOfContents",
353
+ "sdt",
354
+ "image"
625
355
  ]
626
356
  },
627
- "onWrite": {
628
- "enum": [
629
- "materializeIfInherited",
630
- "editResolvedPart",
631
- "error"
632
- ]
633
- }
634
- },
635
- "required": [
636
- "kind",
637
- "storyType",
638
- "section",
639
- "headerFooterKind",
640
- "variant"
641
- ]
642
- },
643
- {
644
- "type": "object",
645
- "properties": {
646
- "kind": {
647
- "const": "story",
648
- "type": "string"
649
- },
650
- "storyType": {
651
- "const": "headerFooterPart",
652
- "type": "string"
653
- },
654
- "refId": {
655
- "type": "string"
656
- }
657
- },
658
- "required": [
659
- "kind",
660
- "storyType",
661
- "refId"
662
- ]
663
- },
664
- {
665
- "type": "object",
666
- "properties": {
667
- "kind": {
668
- "const": "story",
669
- "type": "string"
670
- },
671
- "storyType": {
672
- "const": "footnote",
673
- "type": "string"
674
- },
675
- "noteId": {
676
- "type": "string"
677
- }
678
- },
679
- "required": [
680
- "kind",
681
- "storyType",
682
- "noteId"
683
- ]
684
- },
685
- {
686
- "type": "object",
687
- "properties": {
688
- "kind": {
689
- "const": "story",
690
- "type": "string"
691
- },
692
- "storyType": {
693
- "const": "endnote",
357
+ "nodeId": {
694
358
  "type": "string"
695
359
  },
696
- "noteId": {
697
- "type": "string"
698
- }
699
- },
700
- "required": [
701
- "kind",
702
- "storyType",
703
- "noteId"
704
- ]
705
- },
706
- {
707
- "type": "object",
708
- "properties": {
709
- "kind": {
710
- "const": "story",
711
- "type": "string"
712
- },
713
- "storyType": {
714
- "const": "textbox",
715
- "type": "string"
716
- },
717
- "textboxId": {
718
- "type": "string"
360
+ "story": {
361
+ "oneOf": [
362
+ {
363
+ "type": "object",
364
+ "properties": {
365
+ "kind": {
366
+ "const": "story",
367
+ "type": "string"
368
+ },
369
+ "storyType": {
370
+ "const": "body",
371
+ "type": "string"
372
+ }
373
+ },
374
+ "required": [
375
+ "kind",
376
+ "storyType"
377
+ ]
378
+ },
379
+ {
380
+ "type": "object",
381
+ "properties": {
382
+ "kind": {
383
+ "const": "story",
384
+ "type": "string"
385
+ },
386
+ "storyType": {
387
+ "const": "headerFooterSlot",
388
+ "type": "string"
389
+ },
390
+ "section": {
391
+ "type": "object",
392
+ "properties": {
393
+ "kind": {
394
+ "const": "section",
395
+ "type": "string"
396
+ },
397
+ "sectionId": {
398
+ "type": "string"
399
+ }
400
+ },
401
+ "required": [
402
+ "kind",
403
+ "sectionId"
404
+ ]
405
+ },
406
+ "headerFooterKind": {
407
+ "enum": [
408
+ "header",
409
+ "footer"
410
+ ]
411
+ },
412
+ "variant": {
413
+ "enum": [
414
+ "default",
415
+ "first",
416
+ "even"
417
+ ]
418
+ },
419
+ "resolution": {
420
+ "enum": [
421
+ "effective",
422
+ "explicit"
423
+ ]
424
+ },
425
+ "onWrite": {
426
+ "enum": [
427
+ "materializeIfInherited",
428
+ "editResolvedPart",
429
+ "error"
430
+ ]
431
+ }
432
+ },
433
+ "required": [
434
+ "kind",
435
+ "storyType",
436
+ "section",
437
+ "headerFooterKind",
438
+ "variant"
439
+ ]
440
+ },
441
+ {
442
+ "type": "object",
443
+ "properties": {
444
+ "kind": {
445
+ "const": "story",
446
+ "type": "string"
447
+ },
448
+ "storyType": {
449
+ "const": "headerFooterPart",
450
+ "type": "string"
451
+ },
452
+ "refId": {
453
+ "type": "string"
454
+ }
455
+ },
456
+ "required": [
457
+ "kind",
458
+ "storyType",
459
+ "refId"
460
+ ]
461
+ },
462
+ {
463
+ "type": "object",
464
+ "properties": {
465
+ "kind": {
466
+ "const": "story",
467
+ "type": "string"
468
+ },
469
+ "storyType": {
470
+ "const": "footnote",
471
+ "type": "string"
472
+ },
473
+ "noteId": {
474
+ "type": "string"
475
+ }
476
+ },
477
+ "required": [
478
+ "kind",
479
+ "storyType",
480
+ "noteId"
481
+ ]
482
+ },
483
+ {
484
+ "type": "object",
485
+ "properties": {
486
+ "kind": {
487
+ "const": "story",
488
+ "type": "string"
489
+ },
490
+ "storyType": {
491
+ "const": "endnote",
492
+ "type": "string"
493
+ },
494
+ "noteId": {
495
+ "type": "string"
496
+ }
497
+ },
498
+ "required": [
499
+ "kind",
500
+ "storyType",
501
+ "noteId"
502
+ ]
503
+ },
504
+ {
505
+ "type": "object",
506
+ "properties": {
507
+ "kind": {
508
+ "const": "story",
509
+ "type": "string"
510
+ },
511
+ "storyType": {
512
+ "const": "textbox",
513
+ "type": "string"
514
+ },
515
+ "textboxId": {
516
+ "type": "string"
517
+ }
518
+ },
519
+ "required": [
520
+ "kind",
521
+ "storyType",
522
+ "textboxId"
523
+ ]
524
+ }
525
+ ],
526
+ "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."
719
527
  }
720
528
  },
721
529
  "required": [
722
530
  "kind",
723
- "storyType",
724
- "textboxId"
531
+ "nodeType",
532
+ "nodeId"
533
+ ]
534
+ },
535
+ "edge": {
536
+ "enum": [
537
+ "before",
538
+ "after"
725
539
  ]
726
540
  }
727
- ],
728
- "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."
541
+ },
542
+ "required": [
543
+ "kind",
544
+ "node",
545
+ "edge"
546
+ ]
729
547
  }
730
- },
731
- "required": [
732
- "kind",
733
- "blockId",
734
- "offset"
735
- ]
548
+ ],
549
+ "description": "A point in the document. Use {kind:'text', blockId, offset} for character positions or {kind:'nodeEdge', node:{kind:'block', nodeType, nodeId}, edge:'before'|'after'} for block boundaries."
736
550
  },
737
- {
738
- "type": "object",
739
- "properties": {
740
- "kind": {
741
- "const": "nodeEdge",
742
- "type": "string"
743
- },
744
- "node": {
551
+ "end": {
552
+ "oneOf": [
553
+ {
745
554
  "type": "object",
746
555
  "properties": {
747
556
  "kind": {
748
- "const": "block",
557
+ "const": "text",
749
558
  "type": "string"
750
559
  },
751
- "nodeType": {
752
- "enum": [
753
- "paragraph",
754
- "heading",
755
- "table",
756
- "tableOfContents",
757
- "sdt",
758
- "image"
759
- ]
760
- },
761
- "nodeId": {
560
+ "blockId": {
762
561
  "type": "string"
763
562
  },
563
+ "offset": {
564
+ "type": "number"
565
+ },
764
566
  "story": {
765
567
  "oneOf": [
766
568
  {
@@ -932,623 +734,623 @@
932
734
  },
933
735
  "required": [
934
736
  "kind",
935
- "nodeType",
936
- "nodeId"
937
- ]
938
- },
939
- "edge": {
940
- "enum": [
941
- "before",
942
- "after"
943
- ]
944
- }
945
- },
946
- "required": [
947
- "kind",
948
- "node",
949
- "edge"
950
- ]
951
- }
952
- ],
953
- "description": "A point in the document. Use {kind:'text', blockId, offset} for character positions or {kind:'nodeEdge', node:{kind:'block', nodeType, nodeId}, edge:'before'|'after'} for block boundaries."
954
- },
955
- "story": {
956
- "oneOf": [
957
- {
958
- "type": "object",
959
- "properties": {
960
- "kind": {
961
- "const": "story",
962
- "type": "string"
963
- },
964
- "storyType": {
965
- "const": "body",
966
- "type": "string"
967
- }
968
- },
969
- "required": [
970
- "kind",
971
- "storyType"
972
- ]
973
- },
974
- {
975
- "type": "object",
976
- "properties": {
977
- "kind": {
978
- "const": "story",
979
- "type": "string"
980
- },
981
- "storyType": {
982
- "const": "headerFooterSlot",
983
- "type": "string"
984
- },
985
- "section": {
986
- "type": "object",
987
- "properties": {
988
- "kind": {
989
- "const": "section",
990
- "type": "string"
991
- },
992
- "sectionId": {
993
- "type": "string"
994
- }
995
- },
996
- "required": [
997
- "kind",
998
- "sectionId"
999
- ]
1000
- },
1001
- "headerFooterKind": {
1002
- "enum": [
1003
- "header",
1004
- "footer"
1005
- ]
1006
- },
1007
- "variant": {
1008
- "enum": [
1009
- "default",
1010
- "first",
1011
- "even"
1012
- ]
1013
- },
1014
- "resolution": {
1015
- "enum": [
1016
- "effective",
1017
- "explicit"
1018
- ]
1019
- },
1020
- "onWrite": {
1021
- "enum": [
1022
- "materializeIfInherited",
1023
- "editResolvedPart",
1024
- "error"
737
+ "blockId",
738
+ "offset"
1025
739
  ]
1026
- }
1027
- },
1028
- "required": [
1029
- "kind",
1030
- "storyType",
1031
- "section",
1032
- "headerFooterKind",
1033
- "variant"
1034
- ]
1035
- },
1036
- {
1037
- "type": "object",
1038
- "properties": {
1039
- "kind": {
1040
- "const": "story",
1041
- "type": "string"
1042
- },
1043
- "storyType": {
1044
- "const": "headerFooterPart",
1045
- "type": "string"
1046
- },
1047
- "refId": {
1048
- "type": "string"
1049
- }
1050
- },
1051
- "required": [
1052
- "kind",
1053
- "storyType",
1054
- "refId"
1055
- ]
1056
- },
1057
- {
1058
- "type": "object",
1059
- "properties": {
1060
- "kind": {
1061
- "const": "story",
1062
- "type": "string"
1063
- },
1064
- "storyType": {
1065
- "const": "footnote",
1066
- "type": "string"
1067
- },
1068
- "noteId": {
1069
- "type": "string"
1070
- }
1071
- },
1072
- "required": [
1073
- "kind",
1074
- "storyType",
1075
- "noteId"
1076
- ]
1077
- },
1078
- {
1079
- "type": "object",
1080
- "properties": {
1081
- "kind": {
1082
- "const": "story",
1083
- "type": "string"
1084
- },
1085
- "storyType": {
1086
- "const": "endnote",
1087
- "type": "string"
1088
- },
1089
- "noteId": {
1090
- "type": "string"
1091
- }
1092
- },
1093
- "required": [
1094
- "kind",
1095
- "storyType",
1096
- "noteId"
1097
- ]
1098
- },
1099
- {
1100
- "type": "object",
1101
- "properties": {
1102
- "kind": {
1103
- "const": "story",
1104
- "type": "string"
1105
- },
1106
- "storyType": {
1107
- "const": "textbox",
1108
- "type": "string"
1109
- },
1110
- "textboxId": {
1111
- "type": "string"
1112
- }
1113
- },
1114
- "required": [
1115
- "kind",
1116
- "storyType",
1117
- "textboxId"
1118
- ]
1119
- }
1120
- ],
1121
- "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."
1122
- }
1123
- },
1124
- "required": [
1125
- "kind",
1126
- "start",
1127
- "end"
1128
- ]
1129
- },
1130
- {
1131
- "type": "object",
1132
- "properties": {
1133
- "kind": {
1134
- "const": "block",
1135
- "type": "string"
1136
- },
1137
- "nodeType": {
1138
- "enum": [
1139
- "paragraph",
1140
- "heading",
1141
- "listItem",
1142
- "table",
1143
- "tableRow",
1144
- "tableCell",
1145
- "tableOfContents",
1146
- "image",
1147
- "sdt"
1148
- ]
1149
- },
1150
- "nodeId": {
1151
- "type": "string"
1152
- },
1153
- "story": {
1154
- "oneOf": [
1155
- {
1156
- "type": "object",
1157
- "properties": {
1158
- "kind": {
1159
- "const": "story",
1160
- "type": "string"
1161
- },
1162
- "storyType": {
1163
- "const": "body",
1164
- "type": "string"
1165
- }
1166
- },
1167
- "required": [
1168
- "kind",
1169
- "storyType"
1170
- ]
1171
- },
1172
- {
1173
- "type": "object",
1174
- "properties": {
1175
- "kind": {
1176
- "const": "story",
1177
- "type": "string"
1178
- },
1179
- "storyType": {
1180
- "const": "headerFooterSlot",
1181
- "type": "string"
1182
740
  },
1183
- "section": {
741
+ {
1184
742
  "type": "object",
1185
743
  "properties": {
1186
744
  "kind": {
1187
- "const": "section",
745
+ "const": "nodeEdge",
1188
746
  "type": "string"
1189
747
  },
1190
- "sectionId": {
1191
- "type": "string"
1192
- }
1193
- },
1194
- "required": [
1195
- "kind",
1196
- "sectionId"
1197
- ]
1198
- },
1199
- "headerFooterKind": {
1200
- "enum": [
1201
- "header",
1202
- "footer"
1203
- ]
1204
- },
1205
- "variant": {
1206
- "enum": [
1207
- "default",
1208
- "first",
1209
- "even"
1210
- ]
1211
- },
1212
- "resolution": {
1213
- "enum": [
1214
- "effective",
1215
- "explicit"
1216
- ]
1217
- },
1218
- "onWrite": {
1219
- "enum": [
1220
- "materializeIfInherited",
1221
- "editResolvedPart",
1222
- "error"
1223
- ]
1224
- }
1225
- },
1226
- "required": [
1227
- "kind",
1228
- "storyType",
1229
- "section",
1230
- "headerFooterKind",
1231
- "variant"
1232
- ]
1233
- },
1234
- {
1235
- "type": "object",
1236
- "properties": {
1237
- "kind": {
1238
- "const": "story",
1239
- "type": "string"
1240
- },
1241
- "storyType": {
1242
- "const": "headerFooterPart",
1243
- "type": "string"
1244
- },
1245
- "refId": {
1246
- "type": "string"
1247
- }
1248
- },
1249
- "required": [
1250
- "kind",
1251
- "storyType",
1252
- "refId"
1253
- ]
1254
- },
1255
- {
1256
- "type": "object",
1257
- "properties": {
1258
- "kind": {
1259
- "const": "story",
1260
- "type": "string"
1261
- },
1262
- "storyType": {
1263
- "const": "footnote",
1264
- "type": "string"
1265
- },
1266
- "noteId": {
1267
- "type": "string"
1268
- }
1269
- },
1270
- "required": [
1271
- "kind",
1272
- "storyType",
1273
- "noteId"
1274
- ]
1275
- },
1276
- {
1277
- "type": "object",
1278
- "properties": {
1279
- "kind": {
1280
- "const": "story",
1281
- "type": "string"
1282
- },
1283
- "storyType": {
1284
- "const": "endnote",
1285
- "type": "string"
1286
- },
1287
- "noteId": {
1288
- "type": "string"
1289
- }
1290
- },
1291
- "required": [
1292
- "kind",
1293
- "storyType",
1294
- "noteId"
1295
- ]
1296
- },
1297
- {
1298
- "type": "object",
1299
- "properties": {
1300
- "kind": {
1301
- "const": "story",
1302
- "type": "string"
1303
- },
1304
- "storyType": {
1305
- "const": "textbox",
1306
- "type": "string"
1307
- },
1308
- "textboxId": {
1309
- "type": "string"
1310
- }
1311
- },
1312
- "required": [
1313
- "kind",
1314
- "storyType",
1315
- "textboxId"
1316
- ]
1317
- }
1318
- ],
1319
- "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."
1320
- }
1321
- },
1322
- "required": [
1323
- "kind",
1324
- "nodeType",
1325
- "nodeId"
1326
- ]
1327
- },
1328
- {
1329
- "type": "object",
1330
- "properties": {
1331
- "kind": {
1332
- "const": "selection",
1333
- "type": "string"
1334
- },
1335
- "start": {
1336
- "oneOf": [
1337
- {
1338
- "type": "object",
1339
- "properties": {
1340
- "kind": {
1341
- "const": "text",
1342
- "type": "string"
1343
- },
1344
- "blockId": {
1345
- "type": "string"
1346
- },
1347
- "offset": {
1348
- "type": "number"
1349
- },
1350
- "story": {
1351
- "oneOf": [
1352
- {
748
+ "node": {
1353
749
  "type": "object",
1354
750
  "properties": {
1355
751
  "kind": {
1356
- "const": "story",
752
+ "const": "block",
1357
753
  "type": "string"
1358
754
  },
1359
- "storyType": {
1360
- "const": "body",
755
+ "nodeType": {
756
+ "enum": [
757
+ "paragraph",
758
+ "heading",
759
+ "table",
760
+ "tableOfContents",
761
+ "sdt",
762
+ "image"
763
+ ]
764
+ },
765
+ "nodeId": {
1361
766
  "type": "string"
767
+ },
768
+ "story": {
769
+ "oneOf": [
770
+ {
771
+ "type": "object",
772
+ "properties": {
773
+ "kind": {
774
+ "const": "story",
775
+ "type": "string"
776
+ },
777
+ "storyType": {
778
+ "const": "body",
779
+ "type": "string"
780
+ }
781
+ },
782
+ "required": [
783
+ "kind",
784
+ "storyType"
785
+ ]
786
+ },
787
+ {
788
+ "type": "object",
789
+ "properties": {
790
+ "kind": {
791
+ "const": "story",
792
+ "type": "string"
793
+ },
794
+ "storyType": {
795
+ "const": "headerFooterSlot",
796
+ "type": "string"
797
+ },
798
+ "section": {
799
+ "type": "object",
800
+ "properties": {
801
+ "kind": {
802
+ "const": "section",
803
+ "type": "string"
804
+ },
805
+ "sectionId": {
806
+ "type": "string"
807
+ }
808
+ },
809
+ "required": [
810
+ "kind",
811
+ "sectionId"
812
+ ]
813
+ },
814
+ "headerFooterKind": {
815
+ "enum": [
816
+ "header",
817
+ "footer"
818
+ ]
819
+ },
820
+ "variant": {
821
+ "enum": [
822
+ "default",
823
+ "first",
824
+ "even"
825
+ ]
826
+ },
827
+ "resolution": {
828
+ "enum": [
829
+ "effective",
830
+ "explicit"
831
+ ]
832
+ },
833
+ "onWrite": {
834
+ "enum": [
835
+ "materializeIfInherited",
836
+ "editResolvedPart",
837
+ "error"
838
+ ]
839
+ }
840
+ },
841
+ "required": [
842
+ "kind",
843
+ "storyType",
844
+ "section",
845
+ "headerFooterKind",
846
+ "variant"
847
+ ]
848
+ },
849
+ {
850
+ "type": "object",
851
+ "properties": {
852
+ "kind": {
853
+ "const": "story",
854
+ "type": "string"
855
+ },
856
+ "storyType": {
857
+ "const": "headerFooterPart",
858
+ "type": "string"
859
+ },
860
+ "refId": {
861
+ "type": "string"
862
+ }
863
+ },
864
+ "required": [
865
+ "kind",
866
+ "storyType",
867
+ "refId"
868
+ ]
869
+ },
870
+ {
871
+ "type": "object",
872
+ "properties": {
873
+ "kind": {
874
+ "const": "story",
875
+ "type": "string"
876
+ },
877
+ "storyType": {
878
+ "const": "footnote",
879
+ "type": "string"
880
+ },
881
+ "noteId": {
882
+ "type": "string"
883
+ }
884
+ },
885
+ "required": [
886
+ "kind",
887
+ "storyType",
888
+ "noteId"
889
+ ]
890
+ },
891
+ {
892
+ "type": "object",
893
+ "properties": {
894
+ "kind": {
895
+ "const": "story",
896
+ "type": "string"
897
+ },
898
+ "storyType": {
899
+ "const": "endnote",
900
+ "type": "string"
901
+ },
902
+ "noteId": {
903
+ "type": "string"
904
+ }
905
+ },
906
+ "required": [
907
+ "kind",
908
+ "storyType",
909
+ "noteId"
910
+ ]
911
+ },
912
+ {
913
+ "type": "object",
914
+ "properties": {
915
+ "kind": {
916
+ "const": "story",
917
+ "type": "string"
918
+ },
919
+ "storyType": {
920
+ "const": "textbox",
921
+ "type": "string"
922
+ },
923
+ "textboxId": {
924
+ "type": "string"
925
+ }
926
+ },
927
+ "required": [
928
+ "kind",
929
+ "storyType",
930
+ "textboxId"
931
+ ]
932
+ }
933
+ ],
934
+ "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."
1362
935
  }
1363
936
  },
1364
937
  "required": [
1365
938
  "kind",
1366
- "storyType"
939
+ "nodeType",
940
+ "nodeId"
1367
941
  ]
1368
942
  },
1369
- {
943
+ "edge": {
944
+ "enum": [
945
+ "before",
946
+ "after"
947
+ ]
948
+ }
949
+ },
950
+ "required": [
951
+ "kind",
952
+ "node",
953
+ "edge"
954
+ ]
955
+ }
956
+ ],
957
+ "description": "A point in the document. Use {kind:'text', blockId, offset} for character positions or {kind:'nodeEdge', node:{kind:'block', nodeType, nodeId}, edge:'before'|'after'} for block boundaries."
958
+ },
959
+ "story": {
960
+ "oneOf": [
961
+ {
962
+ "type": "object",
963
+ "properties": {
964
+ "kind": {
965
+ "const": "story",
966
+ "type": "string"
967
+ },
968
+ "storyType": {
969
+ "const": "body",
970
+ "type": "string"
971
+ }
972
+ },
973
+ "required": [
974
+ "kind",
975
+ "storyType"
976
+ ]
977
+ },
978
+ {
979
+ "type": "object",
980
+ "properties": {
981
+ "kind": {
982
+ "const": "story",
983
+ "type": "string"
984
+ },
985
+ "storyType": {
986
+ "const": "headerFooterSlot",
987
+ "type": "string"
988
+ },
989
+ "section": {
1370
990
  "type": "object",
1371
991
  "properties": {
1372
992
  "kind": {
1373
- "const": "story",
993
+ "const": "section",
1374
994
  "type": "string"
1375
995
  },
1376
- "storyType": {
1377
- "const": "headerFooterSlot",
996
+ "sectionId": {
1378
997
  "type": "string"
1379
- },
1380
- "section": {
1381
- "type": "object",
1382
- "properties": {
1383
- "kind": {
1384
- "const": "section",
1385
- "type": "string"
1386
- },
1387
- "sectionId": {
1388
- "type": "string"
1389
- }
1390
- },
1391
- "required": [
1392
- "kind",
1393
- "sectionId"
1394
- ]
1395
- },
1396
- "headerFooterKind": {
1397
- "enum": [
1398
- "header",
1399
- "footer"
1400
- ]
1401
- },
1402
- "variant": {
1403
- "enum": [
1404
- "default",
1405
- "first",
1406
- "even"
1407
- ]
1408
- },
1409
- "resolution": {
1410
- "enum": [
1411
- "effective",
1412
- "explicit"
1413
- ]
1414
- },
1415
- "onWrite": {
1416
- "enum": [
1417
- "materializeIfInherited",
1418
- "editResolvedPart",
1419
- "error"
1420
- ]
1421
998
  }
1422
999
  },
1423
1000
  "required": [
1424
1001
  "kind",
1425
- "storyType",
1426
- "section",
1427
- "headerFooterKind",
1428
- "variant"
1002
+ "sectionId"
1003
+ ]
1004
+ },
1005
+ "headerFooterKind": {
1006
+ "enum": [
1007
+ "header",
1008
+ "footer"
1009
+ ]
1010
+ },
1011
+ "variant": {
1012
+ "enum": [
1013
+ "default",
1014
+ "first",
1015
+ "even"
1016
+ ]
1017
+ },
1018
+ "resolution": {
1019
+ "enum": [
1020
+ "effective",
1021
+ "explicit"
1429
1022
  ]
1430
1023
  },
1431
- {
1024
+ "onWrite": {
1025
+ "enum": [
1026
+ "materializeIfInherited",
1027
+ "editResolvedPart",
1028
+ "error"
1029
+ ]
1030
+ }
1031
+ },
1032
+ "required": [
1033
+ "kind",
1034
+ "storyType",
1035
+ "section",
1036
+ "headerFooterKind",
1037
+ "variant"
1038
+ ]
1039
+ },
1040
+ {
1041
+ "type": "object",
1042
+ "properties": {
1043
+ "kind": {
1044
+ "const": "story",
1045
+ "type": "string"
1046
+ },
1047
+ "storyType": {
1048
+ "const": "headerFooterPart",
1049
+ "type": "string"
1050
+ },
1051
+ "refId": {
1052
+ "type": "string"
1053
+ }
1054
+ },
1055
+ "required": [
1056
+ "kind",
1057
+ "storyType",
1058
+ "refId"
1059
+ ]
1060
+ },
1061
+ {
1062
+ "type": "object",
1063
+ "properties": {
1064
+ "kind": {
1065
+ "const": "story",
1066
+ "type": "string"
1067
+ },
1068
+ "storyType": {
1069
+ "const": "footnote",
1070
+ "type": "string"
1071
+ },
1072
+ "noteId": {
1073
+ "type": "string"
1074
+ }
1075
+ },
1076
+ "required": [
1077
+ "kind",
1078
+ "storyType",
1079
+ "noteId"
1080
+ ]
1081
+ },
1082
+ {
1083
+ "type": "object",
1084
+ "properties": {
1085
+ "kind": {
1086
+ "const": "story",
1087
+ "type": "string"
1088
+ },
1089
+ "storyType": {
1090
+ "const": "endnote",
1091
+ "type": "string"
1092
+ },
1093
+ "noteId": {
1094
+ "type": "string"
1095
+ }
1096
+ },
1097
+ "required": [
1098
+ "kind",
1099
+ "storyType",
1100
+ "noteId"
1101
+ ]
1102
+ },
1103
+ {
1104
+ "type": "object",
1105
+ "properties": {
1106
+ "kind": {
1107
+ "const": "story",
1108
+ "type": "string"
1109
+ },
1110
+ "storyType": {
1111
+ "const": "textbox",
1112
+ "type": "string"
1113
+ },
1114
+ "textboxId": {
1115
+ "type": "string"
1116
+ }
1117
+ },
1118
+ "required": [
1119
+ "kind",
1120
+ "storyType",
1121
+ "textboxId"
1122
+ ]
1123
+ }
1124
+ ],
1125
+ "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."
1126
+ }
1127
+ },
1128
+ "required": [
1129
+ "kind",
1130
+ "start",
1131
+ "end"
1132
+ ]
1133
+ },
1134
+ {
1135
+ "type": "object",
1136
+ "properties": {
1137
+ "kind": {
1138
+ "const": "block",
1139
+ "type": "string"
1140
+ },
1141
+ "nodeType": {
1142
+ "enum": [
1143
+ "paragraph",
1144
+ "heading",
1145
+ "listItem",
1146
+ "table",
1147
+ "tableRow",
1148
+ "tableCell",
1149
+ "tableOfContents",
1150
+ "image",
1151
+ "sdt"
1152
+ ]
1153
+ },
1154
+ "nodeId": {
1155
+ "type": "string"
1156
+ },
1157
+ "story": {
1158
+ "oneOf": [
1159
+ {
1160
+ "type": "object",
1161
+ "properties": {
1162
+ "kind": {
1163
+ "const": "story",
1164
+ "type": "string"
1165
+ },
1166
+ "storyType": {
1167
+ "const": "body",
1168
+ "type": "string"
1169
+ }
1170
+ },
1171
+ "required": [
1172
+ "kind",
1173
+ "storyType"
1174
+ ]
1175
+ },
1176
+ {
1177
+ "type": "object",
1178
+ "properties": {
1179
+ "kind": {
1180
+ "const": "story",
1181
+ "type": "string"
1182
+ },
1183
+ "storyType": {
1184
+ "const": "headerFooterSlot",
1185
+ "type": "string"
1186
+ },
1187
+ "section": {
1432
1188
  "type": "object",
1433
1189
  "properties": {
1434
1190
  "kind": {
1435
- "const": "story",
1191
+ "const": "section",
1436
1192
  "type": "string"
1437
1193
  },
1438
- "storyType": {
1439
- "const": "headerFooterPart",
1440
- "type": "string"
1441
- },
1442
- "refId": {
1194
+ "sectionId": {
1443
1195
  "type": "string"
1444
1196
  }
1445
1197
  },
1446
1198
  "required": [
1447
1199
  "kind",
1448
- "storyType",
1449
- "refId"
1200
+ "sectionId"
1450
1201
  ]
1451
1202
  },
1452
- {
1453
- "type": "object",
1454
- "properties": {
1455
- "kind": {
1456
- "const": "story",
1457
- "type": "string"
1458
- },
1459
- "storyType": {
1460
- "const": "footnote",
1461
- "type": "string"
1462
- },
1463
- "noteId": {
1464
- "type": "string"
1465
- }
1466
- },
1467
- "required": [
1468
- "kind",
1469
- "storyType",
1470
- "noteId"
1203
+ "headerFooterKind": {
1204
+ "enum": [
1205
+ "header",
1206
+ "footer"
1471
1207
  ]
1472
1208
  },
1473
- {
1474
- "type": "object",
1475
- "properties": {
1476
- "kind": {
1477
- "const": "story",
1478
- "type": "string"
1479
- },
1480
- "storyType": {
1481
- "const": "endnote",
1482
- "type": "string"
1483
- },
1484
- "noteId": {
1485
- "type": "string"
1486
- }
1487
- },
1488
- "required": [
1489
- "kind",
1490
- "storyType",
1491
- "noteId"
1209
+ "variant": {
1210
+ "enum": [
1211
+ "default",
1212
+ "first",
1213
+ "even"
1492
1214
  ]
1493
1215
  },
1494
- {
1495
- "type": "object",
1496
- "properties": {
1497
- "kind": {
1498
- "const": "story",
1499
- "type": "string"
1500
- },
1501
- "storyType": {
1502
- "const": "textbox",
1503
- "type": "string"
1504
- },
1505
- "textboxId": {
1506
- "type": "string"
1507
- }
1508
- },
1509
- "required": [
1510
- "kind",
1511
- "storyType",
1512
- "textboxId"
1216
+ "resolution": {
1217
+ "enum": [
1218
+ "effective",
1219
+ "explicit"
1220
+ ]
1221
+ },
1222
+ "onWrite": {
1223
+ "enum": [
1224
+ "materializeIfInherited",
1225
+ "editResolvedPart",
1226
+ "error"
1513
1227
  ]
1514
1228
  }
1515
- ],
1516
- "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."
1517
- }
1518
- },
1519
- "required": [
1520
- "kind",
1521
- "blockId",
1522
- "offset"
1523
- ]
1524
- },
1525
- {
1526
- "type": "object",
1527
- "properties": {
1528
- "kind": {
1529
- "const": "nodeEdge",
1530
- "type": "string"
1229
+ },
1230
+ "required": [
1231
+ "kind",
1232
+ "storyType",
1233
+ "section",
1234
+ "headerFooterKind",
1235
+ "variant"
1236
+ ]
1531
1237
  },
1532
- "node": {
1238
+ {
1533
1239
  "type": "object",
1534
1240
  "properties": {
1535
1241
  "kind": {
1536
- "const": "block",
1242
+ "const": "story",
1537
1243
  "type": "string"
1538
1244
  },
1539
- "nodeType": {
1540
- "enum": [
1541
- "paragraph",
1542
- "heading",
1543
- "table",
1544
- "tableOfContents",
1545
- "sdt",
1546
- "image"
1547
- ]
1245
+ "storyType": {
1246
+ "const": "headerFooterPart",
1247
+ "type": "string"
1248
+ },
1249
+ "refId": {
1250
+ "type": "string"
1251
+ }
1252
+ },
1253
+ "required": [
1254
+ "kind",
1255
+ "storyType",
1256
+ "refId"
1257
+ ]
1258
+ },
1259
+ {
1260
+ "type": "object",
1261
+ "properties": {
1262
+ "kind": {
1263
+ "const": "story",
1264
+ "type": "string"
1265
+ },
1266
+ "storyType": {
1267
+ "const": "footnote",
1268
+ "type": "string"
1269
+ },
1270
+ "noteId": {
1271
+ "type": "string"
1272
+ }
1273
+ },
1274
+ "required": [
1275
+ "kind",
1276
+ "storyType",
1277
+ "noteId"
1278
+ ]
1279
+ },
1280
+ {
1281
+ "type": "object",
1282
+ "properties": {
1283
+ "kind": {
1284
+ "const": "story",
1285
+ "type": "string"
1286
+ },
1287
+ "storyType": {
1288
+ "const": "endnote",
1289
+ "type": "string"
1290
+ },
1291
+ "noteId": {
1292
+ "type": "string"
1293
+ }
1294
+ },
1295
+ "required": [
1296
+ "kind",
1297
+ "storyType",
1298
+ "noteId"
1299
+ ]
1300
+ },
1301
+ {
1302
+ "type": "object",
1303
+ "properties": {
1304
+ "kind": {
1305
+ "const": "story",
1306
+ "type": "string"
1307
+ },
1308
+ "storyType": {
1309
+ "const": "textbox",
1310
+ "type": "string"
1311
+ },
1312
+ "textboxId": {
1313
+ "type": "string"
1314
+ }
1315
+ },
1316
+ "required": [
1317
+ "kind",
1318
+ "storyType",
1319
+ "textboxId"
1320
+ ]
1321
+ }
1322
+ ],
1323
+ "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."
1324
+ }
1325
+ },
1326
+ "required": [
1327
+ "kind",
1328
+ "nodeType",
1329
+ "nodeId"
1330
+ ]
1331
+ },
1332
+ {
1333
+ "type": "object",
1334
+ "properties": {
1335
+ "kind": {
1336
+ "const": "selection",
1337
+ "type": "string"
1338
+ },
1339
+ "start": {
1340
+ "oneOf": [
1341
+ {
1342
+ "type": "object",
1343
+ "properties": {
1344
+ "kind": {
1345
+ "const": "text",
1346
+ "type": "string"
1548
1347
  },
1549
- "nodeId": {
1348
+ "blockId": {
1550
1349
  "type": "string"
1551
1350
  },
1351
+ "offset": {
1352
+ "type": "number"
1353
+ },
1552
1354
  "story": {
1553
1355
  "oneOf": [
1554
1356
  {
@@ -1708,255 +1510,255 @@
1708
1510
  "type": "string"
1709
1511
  }
1710
1512
  },
1711
- "required": [
1712
- "kind",
1713
- "storyType",
1714
- "textboxId"
1715
- ]
1716
- }
1717
- ],
1718
- "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."
1719
- }
1720
- },
1721
- "required": [
1722
- "kind",
1723
- "nodeType",
1724
- "nodeId"
1725
- ]
1726
- },
1727
- "edge": {
1728
- "enum": [
1729
- "before",
1730
- "after"
1731
- ]
1732
- }
1733
- },
1734
- "required": [
1735
- "kind",
1736
- "node",
1737
- "edge"
1738
- ]
1739
- }
1740
- ],
1741
- "description": "A point in the document. Use {kind:'text', blockId, offset} for character positions or {kind:'nodeEdge', node:{kind:'block', nodeType, nodeId}, edge:'before'|'after'} for block boundaries."
1742
- },
1743
- "end": {
1744
- "oneOf": [
1745
- {
1746
- "type": "object",
1747
- "properties": {
1748
- "kind": {
1749
- "const": "text",
1750
- "type": "string"
1751
- },
1752
- "blockId": {
1753
- "type": "string"
1754
- },
1755
- "offset": {
1756
- "type": "number"
1757
- },
1758
- "story": {
1759
- "oneOf": [
1760
- {
1761
- "type": "object",
1762
- "properties": {
1763
- "kind": {
1764
- "const": "story",
1765
- "type": "string"
1766
- },
1767
- "storyType": {
1768
- "const": "body",
1769
- "type": "string"
1770
- }
1771
- },
1772
- "required": [
1773
- "kind",
1774
- "storyType"
1775
- ]
1776
- },
1777
- {
1778
- "type": "object",
1779
- "properties": {
1780
- "kind": {
1781
- "const": "story",
1782
- "type": "string"
1783
- },
1784
- "storyType": {
1785
- "const": "headerFooterSlot",
1786
- "type": "string"
1787
- },
1788
- "section": {
1789
- "type": "object",
1790
- "properties": {
1791
- "kind": {
1792
- "const": "section",
1793
- "type": "string"
1794
- },
1795
- "sectionId": {
1796
- "type": "string"
1797
- }
1798
- },
1799
- "required": [
1800
- "kind",
1801
- "sectionId"
1802
- ]
1803
- },
1804
- "headerFooterKind": {
1805
- "enum": [
1806
- "header",
1807
- "footer"
1808
- ]
1809
- },
1810
- "variant": {
1811
- "enum": [
1812
- "default",
1813
- "first",
1814
- "even"
1815
- ]
1816
- },
1817
- "resolution": {
1818
- "enum": [
1819
- "effective",
1820
- "explicit"
1821
- ]
1822
- },
1823
- "onWrite": {
1824
- "enum": [
1825
- "materializeIfInherited",
1826
- "editResolvedPart",
1827
- "error"
1828
- ]
1829
- }
1830
- },
1831
- "required": [
1832
- "kind",
1833
- "storyType",
1834
- "section",
1835
- "headerFooterKind",
1836
- "variant"
1837
- ]
1838
- },
1839
- {
1840
- "type": "object",
1841
- "properties": {
1842
- "kind": {
1843
- "const": "story",
1844
- "type": "string"
1845
- },
1846
- "storyType": {
1847
- "const": "headerFooterPart",
1848
- "type": "string"
1849
- },
1850
- "refId": {
1851
- "type": "string"
1852
- }
1853
- },
1854
- "required": [
1855
- "kind",
1856
- "storyType",
1857
- "refId"
1858
- ]
1859
- },
1860
- {
1861
- "type": "object",
1862
- "properties": {
1863
- "kind": {
1864
- "const": "story",
1865
- "type": "string"
1866
- },
1867
- "storyType": {
1868
- "const": "footnote",
1869
- "type": "string"
1870
- },
1871
- "noteId": {
1872
- "type": "string"
1513
+ "required": [
1514
+ "kind",
1515
+ "storyType",
1516
+ "textboxId"
1517
+ ]
1873
1518
  }
1874
- },
1875
- "required": [
1876
- "kind",
1877
- "storyType",
1878
- "noteId"
1879
- ]
1519
+ ],
1520
+ "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."
1521
+ }
1522
+ },
1523
+ "required": [
1524
+ "kind",
1525
+ "blockId",
1526
+ "offset"
1527
+ ]
1528
+ },
1529
+ {
1530
+ "type": "object",
1531
+ "properties": {
1532
+ "kind": {
1533
+ "const": "nodeEdge",
1534
+ "type": "string"
1880
1535
  },
1881
- {
1536
+ "node": {
1882
1537
  "type": "object",
1883
1538
  "properties": {
1884
1539
  "kind": {
1885
- "const": "story",
1540
+ "const": "block",
1886
1541
  "type": "string"
1887
1542
  },
1888
- "storyType": {
1889
- "const": "endnote",
1890
- "type": "string"
1543
+ "nodeType": {
1544
+ "enum": [
1545
+ "paragraph",
1546
+ "heading",
1547
+ "table",
1548
+ "tableOfContents",
1549
+ "sdt",
1550
+ "image"
1551
+ ]
1891
1552
  },
1892
- "noteId": {
1553
+ "nodeId": {
1893
1554
  "type": "string"
1555
+ },
1556
+ "story": {
1557
+ "oneOf": [
1558
+ {
1559
+ "type": "object",
1560
+ "properties": {
1561
+ "kind": {
1562
+ "const": "story",
1563
+ "type": "string"
1564
+ },
1565
+ "storyType": {
1566
+ "const": "body",
1567
+ "type": "string"
1568
+ }
1569
+ },
1570
+ "required": [
1571
+ "kind",
1572
+ "storyType"
1573
+ ]
1574
+ },
1575
+ {
1576
+ "type": "object",
1577
+ "properties": {
1578
+ "kind": {
1579
+ "const": "story",
1580
+ "type": "string"
1581
+ },
1582
+ "storyType": {
1583
+ "const": "headerFooterSlot",
1584
+ "type": "string"
1585
+ },
1586
+ "section": {
1587
+ "type": "object",
1588
+ "properties": {
1589
+ "kind": {
1590
+ "const": "section",
1591
+ "type": "string"
1592
+ },
1593
+ "sectionId": {
1594
+ "type": "string"
1595
+ }
1596
+ },
1597
+ "required": [
1598
+ "kind",
1599
+ "sectionId"
1600
+ ]
1601
+ },
1602
+ "headerFooterKind": {
1603
+ "enum": [
1604
+ "header",
1605
+ "footer"
1606
+ ]
1607
+ },
1608
+ "variant": {
1609
+ "enum": [
1610
+ "default",
1611
+ "first",
1612
+ "even"
1613
+ ]
1614
+ },
1615
+ "resolution": {
1616
+ "enum": [
1617
+ "effective",
1618
+ "explicit"
1619
+ ]
1620
+ },
1621
+ "onWrite": {
1622
+ "enum": [
1623
+ "materializeIfInherited",
1624
+ "editResolvedPart",
1625
+ "error"
1626
+ ]
1627
+ }
1628
+ },
1629
+ "required": [
1630
+ "kind",
1631
+ "storyType",
1632
+ "section",
1633
+ "headerFooterKind",
1634
+ "variant"
1635
+ ]
1636
+ },
1637
+ {
1638
+ "type": "object",
1639
+ "properties": {
1640
+ "kind": {
1641
+ "const": "story",
1642
+ "type": "string"
1643
+ },
1644
+ "storyType": {
1645
+ "const": "headerFooterPart",
1646
+ "type": "string"
1647
+ },
1648
+ "refId": {
1649
+ "type": "string"
1650
+ }
1651
+ },
1652
+ "required": [
1653
+ "kind",
1654
+ "storyType",
1655
+ "refId"
1656
+ ]
1657
+ },
1658
+ {
1659
+ "type": "object",
1660
+ "properties": {
1661
+ "kind": {
1662
+ "const": "story",
1663
+ "type": "string"
1664
+ },
1665
+ "storyType": {
1666
+ "const": "footnote",
1667
+ "type": "string"
1668
+ },
1669
+ "noteId": {
1670
+ "type": "string"
1671
+ }
1672
+ },
1673
+ "required": [
1674
+ "kind",
1675
+ "storyType",
1676
+ "noteId"
1677
+ ]
1678
+ },
1679
+ {
1680
+ "type": "object",
1681
+ "properties": {
1682
+ "kind": {
1683
+ "const": "story",
1684
+ "type": "string"
1685
+ },
1686
+ "storyType": {
1687
+ "const": "endnote",
1688
+ "type": "string"
1689
+ },
1690
+ "noteId": {
1691
+ "type": "string"
1692
+ }
1693
+ },
1694
+ "required": [
1695
+ "kind",
1696
+ "storyType",
1697
+ "noteId"
1698
+ ]
1699
+ },
1700
+ {
1701
+ "type": "object",
1702
+ "properties": {
1703
+ "kind": {
1704
+ "const": "story",
1705
+ "type": "string"
1706
+ },
1707
+ "storyType": {
1708
+ "const": "textbox",
1709
+ "type": "string"
1710
+ },
1711
+ "textboxId": {
1712
+ "type": "string"
1713
+ }
1714
+ },
1715
+ "required": [
1716
+ "kind",
1717
+ "storyType",
1718
+ "textboxId"
1719
+ ]
1720
+ }
1721
+ ],
1722
+ "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."
1894
1723
  }
1895
1724
  },
1896
1725
  "required": [
1897
1726
  "kind",
1898
- "storyType",
1899
- "noteId"
1727
+ "nodeType",
1728
+ "nodeId"
1900
1729
  ]
1901
1730
  },
1902
- {
1903
- "type": "object",
1904
- "properties": {
1905
- "kind": {
1906
- "const": "story",
1907
- "type": "string"
1908
- },
1909
- "storyType": {
1910
- "const": "textbox",
1911
- "type": "string"
1912
- },
1913
- "textboxId": {
1914
- "type": "string"
1915
- }
1916
- },
1917
- "required": [
1918
- "kind",
1919
- "storyType",
1920
- "textboxId"
1731
+ "edge": {
1732
+ "enum": [
1733
+ "before",
1734
+ "after"
1921
1735
  ]
1922
1736
  }
1923
- ],
1924
- "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."
1737
+ },
1738
+ "required": [
1739
+ "kind",
1740
+ "node",
1741
+ "edge"
1742
+ ]
1925
1743
  }
1926
- },
1927
- "required": [
1928
- "kind",
1929
- "blockId",
1930
- "offset"
1931
- ]
1744
+ ],
1745
+ "description": "A point in the document. Use {kind:'text', blockId, offset} for character positions or {kind:'nodeEdge', node:{kind:'block', nodeType, nodeId}, edge:'before'|'after'} for block boundaries."
1932
1746
  },
1933
- {
1934
- "type": "object",
1935
- "properties": {
1936
- "kind": {
1937
- "const": "nodeEdge",
1938
- "type": "string"
1939
- },
1940
- "node": {
1747
+ "end": {
1748
+ "oneOf": [
1749
+ {
1941
1750
  "type": "object",
1942
1751
  "properties": {
1943
1752
  "kind": {
1944
- "const": "block",
1753
+ "const": "text",
1945
1754
  "type": "string"
1946
1755
  },
1947
- "nodeType": {
1948
- "enum": [
1949
- "paragraph",
1950
- "heading",
1951
- "table",
1952
- "tableOfContents",
1953
- "sdt",
1954
- "image"
1955
- ]
1956
- },
1957
- "nodeId": {
1756
+ "blockId": {
1958
1757
  "type": "string"
1959
1758
  },
1759
+ "offset": {
1760
+ "type": "number"
1761
+ },
1960
1762
  "story": {
1961
1763
  "oneOf": [
1962
1764
  {
@@ -2091,249 +1893,457 @@
2091
1893
  "const": "endnote",
2092
1894
  "type": "string"
2093
1895
  },
2094
- "noteId": {
2095
- "type": "string"
2096
- }
2097
- },
2098
- "required": [
2099
- "kind",
2100
- "storyType",
2101
- "noteId"
2102
- ]
2103
- },
2104
- {
2105
- "type": "object",
2106
- "properties": {
2107
- "kind": {
2108
- "const": "story",
2109
- "type": "string"
1896
+ "noteId": {
1897
+ "type": "string"
1898
+ }
1899
+ },
1900
+ "required": [
1901
+ "kind",
1902
+ "storyType",
1903
+ "noteId"
1904
+ ]
1905
+ },
1906
+ {
1907
+ "type": "object",
1908
+ "properties": {
1909
+ "kind": {
1910
+ "const": "story",
1911
+ "type": "string"
1912
+ },
1913
+ "storyType": {
1914
+ "const": "textbox",
1915
+ "type": "string"
1916
+ },
1917
+ "textboxId": {
1918
+ "type": "string"
1919
+ }
1920
+ },
1921
+ "required": [
1922
+ "kind",
1923
+ "storyType",
1924
+ "textboxId"
1925
+ ]
1926
+ }
1927
+ ],
1928
+ "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."
1929
+ }
1930
+ },
1931
+ "required": [
1932
+ "kind",
1933
+ "blockId",
1934
+ "offset"
1935
+ ]
1936
+ },
1937
+ {
1938
+ "type": "object",
1939
+ "properties": {
1940
+ "kind": {
1941
+ "const": "nodeEdge",
1942
+ "type": "string"
1943
+ },
1944
+ "node": {
1945
+ "type": "object",
1946
+ "properties": {
1947
+ "kind": {
1948
+ "const": "block",
1949
+ "type": "string"
1950
+ },
1951
+ "nodeType": {
1952
+ "enum": [
1953
+ "paragraph",
1954
+ "heading",
1955
+ "table",
1956
+ "tableOfContents",
1957
+ "sdt",
1958
+ "image"
1959
+ ]
1960
+ },
1961
+ "nodeId": {
1962
+ "type": "string"
1963
+ },
1964
+ "story": {
1965
+ "oneOf": [
1966
+ {
1967
+ "type": "object",
1968
+ "properties": {
1969
+ "kind": {
1970
+ "const": "story",
1971
+ "type": "string"
1972
+ },
1973
+ "storyType": {
1974
+ "const": "body",
1975
+ "type": "string"
1976
+ }
1977
+ },
1978
+ "required": [
1979
+ "kind",
1980
+ "storyType"
1981
+ ]
1982
+ },
1983
+ {
1984
+ "type": "object",
1985
+ "properties": {
1986
+ "kind": {
1987
+ "const": "story",
1988
+ "type": "string"
1989
+ },
1990
+ "storyType": {
1991
+ "const": "headerFooterSlot",
1992
+ "type": "string"
1993
+ },
1994
+ "section": {
1995
+ "type": "object",
1996
+ "properties": {
1997
+ "kind": {
1998
+ "const": "section",
1999
+ "type": "string"
2000
+ },
2001
+ "sectionId": {
2002
+ "type": "string"
2003
+ }
2004
+ },
2005
+ "required": [
2006
+ "kind",
2007
+ "sectionId"
2008
+ ]
2009
+ },
2010
+ "headerFooterKind": {
2011
+ "enum": [
2012
+ "header",
2013
+ "footer"
2014
+ ]
2015
+ },
2016
+ "variant": {
2017
+ "enum": [
2018
+ "default",
2019
+ "first",
2020
+ "even"
2021
+ ]
2022
+ },
2023
+ "resolution": {
2024
+ "enum": [
2025
+ "effective",
2026
+ "explicit"
2027
+ ]
2028
+ },
2029
+ "onWrite": {
2030
+ "enum": [
2031
+ "materializeIfInherited",
2032
+ "editResolvedPart",
2033
+ "error"
2034
+ ]
2035
+ }
2036
+ },
2037
+ "required": [
2038
+ "kind",
2039
+ "storyType",
2040
+ "section",
2041
+ "headerFooterKind",
2042
+ "variant"
2043
+ ]
2044
+ },
2045
+ {
2046
+ "type": "object",
2047
+ "properties": {
2048
+ "kind": {
2049
+ "const": "story",
2050
+ "type": "string"
2051
+ },
2052
+ "storyType": {
2053
+ "const": "headerFooterPart",
2054
+ "type": "string"
2055
+ },
2056
+ "refId": {
2057
+ "type": "string"
2058
+ }
2059
+ },
2060
+ "required": [
2061
+ "kind",
2062
+ "storyType",
2063
+ "refId"
2064
+ ]
2065
+ },
2066
+ {
2067
+ "type": "object",
2068
+ "properties": {
2069
+ "kind": {
2070
+ "const": "story",
2071
+ "type": "string"
2072
+ },
2073
+ "storyType": {
2074
+ "const": "footnote",
2075
+ "type": "string"
2076
+ },
2077
+ "noteId": {
2078
+ "type": "string"
2079
+ }
2080
+ },
2081
+ "required": [
2082
+ "kind",
2083
+ "storyType",
2084
+ "noteId"
2085
+ ]
2110
2086
  },
2111
- "storyType": {
2112
- "const": "textbox",
2113
- "type": "string"
2087
+ {
2088
+ "type": "object",
2089
+ "properties": {
2090
+ "kind": {
2091
+ "const": "story",
2092
+ "type": "string"
2093
+ },
2094
+ "storyType": {
2095
+ "const": "endnote",
2096
+ "type": "string"
2097
+ },
2098
+ "noteId": {
2099
+ "type": "string"
2100
+ }
2101
+ },
2102
+ "required": [
2103
+ "kind",
2104
+ "storyType",
2105
+ "noteId"
2106
+ ]
2114
2107
  },
2115
- "textboxId": {
2116
- "type": "string"
2108
+ {
2109
+ "type": "object",
2110
+ "properties": {
2111
+ "kind": {
2112
+ "const": "story",
2113
+ "type": "string"
2114
+ },
2115
+ "storyType": {
2116
+ "const": "textbox",
2117
+ "type": "string"
2118
+ },
2119
+ "textboxId": {
2120
+ "type": "string"
2121
+ }
2122
+ },
2123
+ "required": [
2124
+ "kind",
2125
+ "storyType",
2126
+ "textboxId"
2127
+ ]
2117
2128
  }
2118
- },
2119
- "required": [
2120
- "kind",
2121
- "storyType",
2122
- "textboxId"
2123
- ]
2129
+ ],
2130
+ "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."
2124
2131
  }
2125
- ],
2126
- "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."
2132
+ },
2133
+ "required": [
2134
+ "kind",
2135
+ "nodeType",
2136
+ "nodeId"
2137
+ ]
2138
+ },
2139
+ "edge": {
2140
+ "enum": [
2141
+ "before",
2142
+ "after"
2143
+ ]
2127
2144
  }
2128
2145
  },
2129
2146
  "required": [
2130
2147
  "kind",
2131
- "nodeType",
2132
- "nodeId"
2133
- ]
2134
- },
2135
- "edge": {
2136
- "enum": [
2137
- "before",
2138
- "after"
2148
+ "node",
2149
+ "edge"
2139
2150
  ]
2140
2151
  }
2141
- },
2142
- "required": [
2143
- "kind",
2144
- "node",
2145
- "edge"
2146
- ]
2147
- }
2148
- ],
2149
- "description": "A point in the document. Use {kind:'text', blockId, offset} for character positions or {kind:'nodeEdge', node:{kind:'block', nodeType, nodeId}, edge:'before'|'after'} for block boundaries."
2150
- },
2151
- "story": {
2152
- "oneOf": [
2153
- {
2154
- "type": "object",
2155
- "properties": {
2156
- "kind": {
2157
- "const": "story",
2158
- "type": "string"
2159
- },
2160
- "storyType": {
2161
- "const": "body",
2162
- "type": "string"
2163
- }
2164
- },
2165
- "required": [
2166
- "kind",
2167
- "storyType"
2168
- ]
2152
+ ],
2153
+ "description": "A point in the document. Use {kind:'text', blockId, offset} for character positions or {kind:'nodeEdge', node:{kind:'block', nodeType, nodeId}, edge:'before'|'after'} for block boundaries."
2169
2154
  },
2170
- {
2171
- "type": "object",
2172
- "properties": {
2173
- "kind": {
2174
- "const": "story",
2175
- "type": "string"
2176
- },
2177
- "storyType": {
2178
- "const": "headerFooterSlot",
2179
- "type": "string"
2180
- },
2181
- "section": {
2155
+ "story": {
2156
+ "oneOf": [
2157
+ {
2182
2158
  "type": "object",
2183
2159
  "properties": {
2184
2160
  "kind": {
2185
- "const": "section",
2161
+ "const": "story",
2186
2162
  "type": "string"
2187
2163
  },
2188
- "sectionId": {
2164
+ "storyType": {
2165
+ "const": "body",
2189
2166
  "type": "string"
2190
2167
  }
2191
2168
  },
2192
2169
  "required": [
2193
2170
  "kind",
2194
- "sectionId"
2171
+ "storyType"
2195
2172
  ]
2196
2173
  },
2197
- "headerFooterKind": {
2198
- "enum": [
2199
- "header",
2200
- "footer"
2174
+ {
2175
+ "type": "object",
2176
+ "properties": {
2177
+ "kind": {
2178
+ "const": "story",
2179
+ "type": "string"
2180
+ },
2181
+ "storyType": {
2182
+ "const": "headerFooterSlot",
2183
+ "type": "string"
2184
+ },
2185
+ "section": {
2186
+ "type": "object",
2187
+ "properties": {
2188
+ "kind": {
2189
+ "const": "section",
2190
+ "type": "string"
2191
+ },
2192
+ "sectionId": {
2193
+ "type": "string"
2194
+ }
2195
+ },
2196
+ "required": [
2197
+ "kind",
2198
+ "sectionId"
2199
+ ]
2200
+ },
2201
+ "headerFooterKind": {
2202
+ "enum": [
2203
+ "header",
2204
+ "footer"
2205
+ ]
2206
+ },
2207
+ "variant": {
2208
+ "enum": [
2209
+ "default",
2210
+ "first",
2211
+ "even"
2212
+ ]
2213
+ },
2214
+ "resolution": {
2215
+ "enum": [
2216
+ "effective",
2217
+ "explicit"
2218
+ ]
2219
+ },
2220
+ "onWrite": {
2221
+ "enum": [
2222
+ "materializeIfInherited",
2223
+ "editResolvedPart",
2224
+ "error"
2225
+ ]
2226
+ }
2227
+ },
2228
+ "required": [
2229
+ "kind",
2230
+ "storyType",
2231
+ "section",
2232
+ "headerFooterKind",
2233
+ "variant"
2201
2234
  ]
2202
2235
  },
2203
- "variant": {
2204
- "enum": [
2205
- "default",
2206
- "first",
2207
- "even"
2236
+ {
2237
+ "type": "object",
2238
+ "properties": {
2239
+ "kind": {
2240
+ "const": "story",
2241
+ "type": "string"
2242
+ },
2243
+ "storyType": {
2244
+ "const": "headerFooterPart",
2245
+ "type": "string"
2246
+ },
2247
+ "refId": {
2248
+ "type": "string"
2249
+ }
2250
+ },
2251
+ "required": [
2252
+ "kind",
2253
+ "storyType",
2254
+ "refId"
2208
2255
  ]
2209
2256
  },
2210
- "resolution": {
2211
- "enum": [
2212
- "effective",
2213
- "explicit"
2257
+ {
2258
+ "type": "object",
2259
+ "properties": {
2260
+ "kind": {
2261
+ "const": "story",
2262
+ "type": "string"
2263
+ },
2264
+ "storyType": {
2265
+ "const": "footnote",
2266
+ "type": "string"
2267
+ },
2268
+ "noteId": {
2269
+ "type": "string"
2270
+ }
2271
+ },
2272
+ "required": [
2273
+ "kind",
2274
+ "storyType",
2275
+ "noteId"
2214
2276
  ]
2215
2277
  },
2216
- "onWrite": {
2217
- "enum": [
2218
- "materializeIfInherited",
2219
- "editResolvedPart",
2220
- "error"
2278
+ {
2279
+ "type": "object",
2280
+ "properties": {
2281
+ "kind": {
2282
+ "const": "story",
2283
+ "type": "string"
2284
+ },
2285
+ "storyType": {
2286
+ "const": "endnote",
2287
+ "type": "string"
2288
+ },
2289
+ "noteId": {
2290
+ "type": "string"
2291
+ }
2292
+ },
2293
+ "required": [
2294
+ "kind",
2295
+ "storyType",
2296
+ "noteId"
2221
2297
  ]
2222
- }
2223
- },
2224
- "required": [
2225
- "kind",
2226
- "storyType",
2227
- "section",
2228
- "headerFooterKind",
2229
- "variant"
2230
- ]
2231
- },
2232
- {
2233
- "type": "object",
2234
- "properties": {
2235
- "kind": {
2236
- "const": "story",
2237
- "type": "string"
2238
- },
2239
- "storyType": {
2240
- "const": "headerFooterPart",
2241
- "type": "string"
2242
- },
2243
- "refId": {
2244
- "type": "string"
2245
- }
2246
- },
2247
- "required": [
2248
- "kind",
2249
- "storyType",
2250
- "refId"
2251
- ]
2252
- },
2253
- {
2254
- "type": "object",
2255
- "properties": {
2256
- "kind": {
2257
- "const": "story",
2258
- "type": "string"
2259
- },
2260
- "storyType": {
2261
- "const": "footnote",
2262
- "type": "string"
2263
- },
2264
- "noteId": {
2265
- "type": "string"
2266
- }
2267
- },
2268
- "required": [
2269
- "kind",
2270
- "storyType",
2271
- "noteId"
2272
- ]
2273
- },
2274
- {
2275
- "type": "object",
2276
- "properties": {
2277
- "kind": {
2278
- "const": "story",
2279
- "type": "string"
2280
- },
2281
- "storyType": {
2282
- "const": "endnote",
2283
- "type": "string"
2284
- },
2285
- "noteId": {
2286
- "type": "string"
2287
- }
2288
- },
2289
- "required": [
2290
- "kind",
2291
- "storyType",
2292
- "noteId"
2293
- ]
2294
- },
2295
- {
2296
- "type": "object",
2297
- "properties": {
2298
- "kind": {
2299
- "const": "story",
2300
- "type": "string"
2301
- },
2302
- "storyType": {
2303
- "const": "textbox",
2304
- "type": "string"
2305
2298
  },
2306
- "textboxId": {
2307
- "type": "string"
2299
+ {
2300
+ "type": "object",
2301
+ "properties": {
2302
+ "kind": {
2303
+ "const": "story",
2304
+ "type": "string"
2305
+ },
2306
+ "storyType": {
2307
+ "const": "textbox",
2308
+ "type": "string"
2309
+ },
2310
+ "textboxId": {
2311
+ "type": "string"
2312
+ }
2313
+ },
2314
+ "required": [
2315
+ "kind",
2316
+ "storyType",
2317
+ "textboxId"
2318
+ ]
2308
2319
  }
2309
- },
2310
- "required": [
2311
- "kind",
2312
- "storyType",
2313
- "textboxId"
2314
- ]
2320
+ ],
2321
+ "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."
2315
2322
  }
2316
- ],
2317
- "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."
2323
+ },
2324
+ "required": [
2325
+ "kind",
2326
+ "start",
2327
+ "end"
2328
+ ]
2318
2329
  }
2319
- },
2320
- "required": [
2321
- "kind",
2322
- "start",
2323
- "end"
2324
2330
  ]
2325
2331
  }
2326
- ]
2332
+ ],
2333
+ "description": "Block address for structural insertion: {kind:'block', nodeType:'...', nodeId:'...'}."
2334
+ },
2335
+ {
2336
+ "$ref": "#/$defs/SelectionTarget",
2337
+ "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."
2327
2338
  }
2328
2339
  ],
2329
2340
  "description": "Block address for structural insertion: {kind:'block', nodeType:'...', nodeId:'...'}."
2330
2341
  },
2331
2342
  {
2332
- "$ref": "#/$defs/SelectionTarget",
2333
- "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."
2343
+ "$ref": "#/$defs/DeletableBlockNodeAddress"
2334
2344
  }
2335
2345
  ],
2336
- "description": "Block address for structural insertion: {kind:'block', nodeType:'...', nodeId:'...'}."
2346
+ "description": "Block address for structural insertion: {kind:'block', nodeType:'...', nodeId:'...'}. Required for action 'delete_block'."
2337
2347
  },
2338
2348
  "in": {
2339
2349
  "oneOf": [
@@ -2519,7 +2529,7 @@
2519
2529
  "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."
2520
2530
  }
2521
2531
  ],
2522
- "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."
2532
+ "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."
2523
2533
  },
2524
2534
  "value": {
2525
2535
  "type": "string",
@@ -2554,7 +2564,7 @@
2554
2564
  "description": "Handle ref string from a superdoc_search result. Pass the handle.ref value directly (e.g. 'text:eyJ...'). Preferred over 'target' for inline formatting."
2555
2565
  }
2556
2566
  ],
2557
- "description": "Handle ref from superdoc_search result (pass handle.ref value directly). Preferred over building a target object."
2567
+ "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."
2558
2568
  },
2559
2569
  "content": {
2560
2570
  "oneOf": [
@@ -2637,6 +2647,22 @@
2637
2647
  "behavior": {
2638
2648
  "$ref": "#/$defs/DeleteBehavior",
2639
2649
  "description": "Delete behavior: 'selection' (default) or 'exact'. Only for action 'delete'. Omit for other actions."
2650
+ },
2651
+ "nodeType": {
2652
+ "type": "string",
2653
+ "description": "Block type of the node to delete. Only for action 'delete_block'. Omit for other actions."
2654
+ },
2655
+ "nodeId": {
2656
+ "type": "string",
2657
+ "description": "Node ID of the block to delete. Only for action 'delete_block'. Omit for other actions."
2658
+ },
2659
+ "start": {
2660
+ "$ref": "#/$defs/BlockNodeAddress",
2661
+ "description": "Required for action 'delete_block_range'."
2662
+ },
2663
+ "end": {
2664
+ "$ref": "#/$defs/BlockNodeAddress",
2665
+ "description": "Required for action 'delete_block_range'."
2640
2666
  }
2641
2667
  },
2642
2668
  "required": [
@@ -2646,11 +2672,13 @@
2646
2672
  },
2647
2673
  "metadata": {
2648
2674
  "mutates": true,
2649
- "operationCount": 5,
2675
+ "operationCount": 7,
2650
2676
  "operations": [
2651
2677
  "doc.insert",
2652
2678
  "doc.replace",
2653
2679
  "doc.delete",
2680
+ "doc.blocks.delete",
2681
+ "doc.blocks.deleteRange",
2654
2682
  "doc.history.undo",
2655
2683
  "doc.history.redo"
2656
2684
  ]