@superdoc-dev/sdk 1.0.0-alpha.6 → 1.0.0-alpha.8

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.
@@ -2495,7 +2495,6 @@ export const CONTRACT = {
2495
2495
  "kind": "jsonFlag",
2496
2496
  "type": "json",
2497
2497
  "flag": "target-json",
2498
- "required": true,
2499
2498
  "schema": {
2500
2499
  "type": "object",
2501
2500
  "properties": {
@@ -2533,6 +2532,22 @@ export const CONTRACT = {
2533
2532
  "kind": "flag",
2534
2533
  "type": "string",
2535
2534
  "required": true
2535
+ },
2536
+ {
2537
+ "name": "blockId",
2538
+ "kind": "flag",
2539
+ "type": "string",
2540
+ "flag": "block-id"
2541
+ },
2542
+ {
2543
+ "name": "start",
2544
+ "kind": "flag",
2545
+ "type": "number"
2546
+ },
2547
+ {
2548
+ "name": "end",
2549
+ "kind": "flag",
2550
+ "type": "number"
2536
2551
  }
2537
2552
  ],
2538
2553
  "constraints": null,
@@ -2542,7 +2557,100 @@ export const CONTRACT = {
2542
2557
  "supportsDryRun": true,
2543
2558
  "inputSchema": {
2544
2559
  "additionalProperties": false,
2560
+ "allOf": [
2561
+ {
2562
+ "not": {
2563
+ "required": [
2564
+ "target",
2565
+ "blockId"
2566
+ ]
2567
+ }
2568
+ },
2569
+ {
2570
+ "not": {
2571
+ "required": [
2572
+ "target",
2573
+ "start"
2574
+ ]
2575
+ }
2576
+ },
2577
+ {
2578
+ "not": {
2579
+ "required": [
2580
+ "target",
2581
+ "end"
2582
+ ]
2583
+ }
2584
+ },
2585
+ {
2586
+ "if": {
2587
+ "required": [
2588
+ "start"
2589
+ ]
2590
+ },
2591
+ "then": {
2592
+ "required": [
2593
+ "blockId",
2594
+ "end"
2595
+ ]
2596
+ }
2597
+ },
2598
+ {
2599
+ "if": {
2600
+ "required": [
2601
+ "end"
2602
+ ]
2603
+ },
2604
+ "then": {
2605
+ "required": [
2606
+ "blockId",
2607
+ "start"
2608
+ ]
2609
+ }
2610
+ },
2611
+ {
2612
+ "if": {
2613
+ "required": [
2614
+ "blockId"
2615
+ ]
2616
+ },
2617
+ "then": {
2618
+ "required": [
2619
+ "start",
2620
+ "end"
2621
+ ]
2622
+ }
2623
+ }
2624
+ ],
2625
+ "anyOf": [
2626
+ {
2627
+ "required": [
2628
+ "target"
2629
+ ]
2630
+ },
2631
+ {
2632
+ "required": [
2633
+ "blockId",
2634
+ "start",
2635
+ "end"
2636
+ ]
2637
+ }
2638
+ ],
2545
2639
  "properties": {
2640
+ "blockId": {
2641
+ "description": "Block ID for block-relative range targeting.",
2642
+ "type": "string"
2643
+ },
2644
+ "end": {
2645
+ "description": "End offset within the block identified by blockId.",
2646
+ "minimum": 0,
2647
+ "type": "integer"
2648
+ },
2649
+ "start": {
2650
+ "description": "Start offset within the block identified by blockId.",
2651
+ "minimum": 0,
2652
+ "type": "integer"
2653
+ },
2546
2654
  "target": {
2547
2655
  "additionalProperties": false,
2548
2656
  "properties": {
@@ -2581,7 +2689,6 @@ export const CONTRACT = {
2581
2689
  }
2582
2690
  },
2583
2691
  "required": [
2584
- "target",
2585
2692
  "text"
2586
2693
  ],
2587
2694
  "type": "object"
@@ -3421,7 +3528,6 @@ export const CONTRACT = {
3421
3528
  "kind": "jsonFlag",
3422
3529
  "type": "json",
3423
3530
  "flag": "target-json",
3424
- "required": true,
3425
3531
  "schema": {
3426
3532
  "type": "object",
3427
3533
  "properties": {
@@ -3453,6 +3559,22 @@ export const CONTRACT = {
3453
3559
  "range"
3454
3560
  ]
3455
3561
  }
3562
+ },
3563
+ {
3564
+ "name": "blockId",
3565
+ "kind": "flag",
3566
+ "type": "string",
3567
+ "flag": "block-id"
3568
+ },
3569
+ {
3570
+ "name": "start",
3571
+ "kind": "flag",
3572
+ "type": "number"
3573
+ },
3574
+ {
3575
+ "name": "end",
3576
+ "kind": "flag",
3577
+ "type": "number"
3456
3578
  }
3457
3579
  ],
3458
3580
  "constraints": null,
@@ -3462,7 +3584,100 @@ export const CONTRACT = {
3462
3584
  "supportsDryRun": true,
3463
3585
  "inputSchema": {
3464
3586
  "additionalProperties": false,
3587
+ "allOf": [
3588
+ {
3589
+ "not": {
3590
+ "required": [
3591
+ "target",
3592
+ "blockId"
3593
+ ]
3594
+ }
3595
+ },
3596
+ {
3597
+ "not": {
3598
+ "required": [
3599
+ "target",
3600
+ "start"
3601
+ ]
3602
+ }
3603
+ },
3604
+ {
3605
+ "not": {
3606
+ "required": [
3607
+ "target",
3608
+ "end"
3609
+ ]
3610
+ }
3611
+ },
3612
+ {
3613
+ "if": {
3614
+ "required": [
3615
+ "start"
3616
+ ]
3617
+ },
3618
+ "then": {
3619
+ "required": [
3620
+ "blockId",
3621
+ "end"
3622
+ ]
3623
+ }
3624
+ },
3625
+ {
3626
+ "if": {
3627
+ "required": [
3628
+ "end"
3629
+ ]
3630
+ },
3631
+ "then": {
3632
+ "required": [
3633
+ "blockId",
3634
+ "start"
3635
+ ]
3636
+ }
3637
+ },
3638
+ {
3639
+ "if": {
3640
+ "required": [
3641
+ "blockId"
3642
+ ]
3643
+ },
3644
+ "then": {
3645
+ "required": [
3646
+ "start",
3647
+ "end"
3648
+ ]
3649
+ }
3650
+ }
3651
+ ],
3652
+ "anyOf": [
3653
+ {
3654
+ "required": [
3655
+ "target"
3656
+ ]
3657
+ },
3658
+ {
3659
+ "required": [
3660
+ "blockId",
3661
+ "start",
3662
+ "end"
3663
+ ]
3664
+ }
3665
+ ],
3465
3666
  "properties": {
3667
+ "blockId": {
3668
+ "description": "Block ID for block-relative range targeting.",
3669
+ "type": "string"
3670
+ },
3671
+ "end": {
3672
+ "description": "End offset within the block identified by blockId.",
3673
+ "minimum": 0,
3674
+ "type": "integer"
3675
+ },
3676
+ "start": {
3677
+ "description": "Start offset within the block identified by blockId.",
3678
+ "minimum": 0,
3679
+ "type": "integer"
3680
+ },
3466
3681
  "target": {
3467
3682
  "additionalProperties": false,
3468
3683
  "properties": {
@@ -3497,9 +3712,6 @@ export const CONTRACT = {
3497
3712
  "type": "object"
3498
3713
  }
3499
3714
  },
3500
- "required": [
3501
- "target"
3502
- ],
3503
3715
  "type": "object"
3504
3716
  },
3505
3717
  "outputSchema": {
@@ -4336,7 +4548,6 @@ export const CONTRACT = {
4336
4548
  "kind": "jsonFlag",
4337
4549
  "type": "json",
4338
4550
  "flag": "target-json",
4339
- "required": true,
4340
4551
  "schema": {
4341
4552
  "type": "object",
4342
4553
  "properties": {
@@ -4368,6 +4579,22 @@ export const CONTRACT = {
4368
4579
  "range"
4369
4580
  ]
4370
4581
  }
4582
+ },
4583
+ {
4584
+ "name": "blockId",
4585
+ "kind": "flag",
4586
+ "type": "string",
4587
+ "flag": "block-id"
4588
+ },
4589
+ {
4590
+ "name": "start",
4591
+ "kind": "flag",
4592
+ "type": "number"
4593
+ },
4594
+ {
4595
+ "name": "end",
4596
+ "kind": "flag",
4597
+ "type": "number"
4371
4598
  }
4372
4599
  ],
4373
4600
  "constraints": null,
@@ -4377,7 +4604,100 @@ export const CONTRACT = {
4377
4604
  "supportsDryRun": true,
4378
4605
  "inputSchema": {
4379
4606
  "additionalProperties": false,
4607
+ "allOf": [
4608
+ {
4609
+ "not": {
4610
+ "required": [
4611
+ "target",
4612
+ "blockId"
4613
+ ]
4614
+ }
4615
+ },
4616
+ {
4617
+ "not": {
4618
+ "required": [
4619
+ "target",
4620
+ "start"
4621
+ ]
4622
+ }
4623
+ },
4624
+ {
4625
+ "not": {
4626
+ "required": [
4627
+ "target",
4628
+ "end"
4629
+ ]
4630
+ }
4631
+ },
4632
+ {
4633
+ "if": {
4634
+ "required": [
4635
+ "start"
4636
+ ]
4637
+ },
4638
+ "then": {
4639
+ "required": [
4640
+ "blockId",
4641
+ "end"
4642
+ ]
4643
+ }
4644
+ },
4645
+ {
4646
+ "if": {
4647
+ "required": [
4648
+ "end"
4649
+ ]
4650
+ },
4651
+ "then": {
4652
+ "required": [
4653
+ "blockId",
4654
+ "start"
4655
+ ]
4656
+ }
4657
+ },
4658
+ {
4659
+ "if": {
4660
+ "required": [
4661
+ "blockId"
4662
+ ]
4663
+ },
4664
+ "then": {
4665
+ "required": [
4666
+ "start",
4667
+ "end"
4668
+ ]
4669
+ }
4670
+ }
4671
+ ],
4672
+ "anyOf": [
4673
+ {
4674
+ "required": [
4675
+ "target"
4676
+ ]
4677
+ },
4678
+ {
4679
+ "required": [
4680
+ "blockId",
4681
+ "start",
4682
+ "end"
4683
+ ]
4684
+ }
4685
+ ],
4380
4686
  "properties": {
4687
+ "blockId": {
4688
+ "description": "Block ID for block-relative range targeting.",
4689
+ "type": "string"
4690
+ },
4691
+ "end": {
4692
+ "description": "End offset within the block identified by blockId.",
4693
+ "minimum": 0,
4694
+ "type": "integer"
4695
+ },
4696
+ "start": {
4697
+ "description": "Start offset within the block identified by blockId.",
4698
+ "minimum": 0,
4699
+ "type": "integer"
4700
+ },
4381
4701
  "target": {
4382
4702
  "additionalProperties": false,
4383
4703
  "properties": {
@@ -4412,9 +4732,6 @@ export const CONTRACT = {
4412
4732
  "type": "object"
4413
4733
  }
4414
4734
  },
4415
- "required": [
4416
- "target"
4417
- ],
4418
4735
  "type": "object"
4419
4736
  },
4420
4737
  "outputSchema": {
@@ -5251,7 +5568,6 @@ export const CONTRACT = {
5251
5568
  "kind": "jsonFlag",
5252
5569
  "type": "json",
5253
5570
  "flag": "target-json",
5254
- "required": true,
5255
5571
  "schema": {
5256
5572
  "type": "object",
5257
5573
  "properties": {
@@ -5283,6 +5599,22 @@ export const CONTRACT = {
5283
5599
  "range"
5284
5600
  ]
5285
5601
  }
5602
+ },
5603
+ {
5604
+ "name": "blockId",
5605
+ "kind": "flag",
5606
+ "type": "string",
5607
+ "flag": "block-id"
5608
+ },
5609
+ {
5610
+ "name": "start",
5611
+ "kind": "flag",
5612
+ "type": "number"
5613
+ },
5614
+ {
5615
+ "name": "end",
5616
+ "kind": "flag",
5617
+ "type": "number"
5286
5618
  }
5287
5619
  ],
5288
5620
  "constraints": null,
@@ -5292,7 +5624,100 @@ export const CONTRACT = {
5292
5624
  "supportsDryRun": true,
5293
5625
  "inputSchema": {
5294
5626
  "additionalProperties": false,
5627
+ "allOf": [
5628
+ {
5629
+ "not": {
5630
+ "required": [
5631
+ "target",
5632
+ "blockId"
5633
+ ]
5634
+ }
5635
+ },
5636
+ {
5637
+ "not": {
5638
+ "required": [
5639
+ "target",
5640
+ "start"
5641
+ ]
5642
+ }
5643
+ },
5644
+ {
5645
+ "not": {
5646
+ "required": [
5647
+ "target",
5648
+ "end"
5649
+ ]
5650
+ }
5651
+ },
5652
+ {
5653
+ "if": {
5654
+ "required": [
5655
+ "start"
5656
+ ]
5657
+ },
5658
+ "then": {
5659
+ "required": [
5660
+ "blockId",
5661
+ "end"
5662
+ ]
5663
+ }
5664
+ },
5665
+ {
5666
+ "if": {
5667
+ "required": [
5668
+ "end"
5669
+ ]
5670
+ },
5671
+ "then": {
5672
+ "required": [
5673
+ "blockId",
5674
+ "start"
5675
+ ]
5676
+ }
5677
+ },
5678
+ {
5679
+ "if": {
5680
+ "required": [
5681
+ "blockId"
5682
+ ]
5683
+ },
5684
+ "then": {
5685
+ "required": [
5686
+ "start",
5687
+ "end"
5688
+ ]
5689
+ }
5690
+ }
5691
+ ],
5692
+ "anyOf": [
5693
+ {
5694
+ "required": [
5695
+ "target"
5696
+ ]
5697
+ },
5698
+ {
5699
+ "required": [
5700
+ "blockId",
5701
+ "start",
5702
+ "end"
5703
+ ]
5704
+ }
5705
+ ],
5295
5706
  "properties": {
5707
+ "blockId": {
5708
+ "description": "Block ID for block-relative range targeting.",
5709
+ "type": "string"
5710
+ },
5711
+ "end": {
5712
+ "description": "End offset within the block identified by blockId.",
5713
+ "minimum": 0,
5714
+ "type": "integer"
5715
+ },
5716
+ "start": {
5717
+ "description": "Start offset within the block identified by blockId.",
5718
+ "minimum": 0,
5719
+ "type": "integer"
5720
+ },
5296
5721
  "target": {
5297
5722
  "additionalProperties": false,
5298
5723
  "properties": {
@@ -5327,9 +5752,6 @@ export const CONTRACT = {
5327
5752
  "type": "object"
5328
5753
  }
5329
5754
  },
5330
- "required": [
5331
- "target"
5332
- ],
5333
5755
  "type": "object"
5334
5756
  },
5335
5757
  "outputSchema": {
@@ -6166,7 +6588,6 @@ export const CONTRACT = {
6166
6588
  "kind": "jsonFlag",
6167
6589
  "type": "json",
6168
6590
  "flag": "target-json",
6169
- "required": true,
6170
6591
  "schema": {
6171
6592
  "type": "object",
6172
6593
  "properties": {
@@ -6198,16 +6619,125 @@ export const CONTRACT = {
6198
6619
  "range"
6199
6620
  ]
6200
6621
  }
6201
- }
6202
- ],
6203
- "constraints": null,
6204
- "mutates": true,
6205
- "idempotency": "conditional",
6206
- "supportsTrackedMode": true,
6207
- "supportsDryRun": true,
6208
- "inputSchema": {
6209
- "additionalProperties": false,
6622
+ },
6623
+ {
6624
+ "name": "blockId",
6625
+ "kind": "flag",
6626
+ "type": "string",
6627
+ "flag": "block-id"
6628
+ },
6629
+ {
6630
+ "name": "start",
6631
+ "kind": "flag",
6632
+ "type": "number"
6633
+ },
6634
+ {
6635
+ "name": "end",
6636
+ "kind": "flag",
6637
+ "type": "number"
6638
+ }
6639
+ ],
6640
+ "constraints": null,
6641
+ "mutates": true,
6642
+ "idempotency": "conditional",
6643
+ "supportsTrackedMode": true,
6644
+ "supportsDryRun": true,
6645
+ "inputSchema": {
6646
+ "additionalProperties": false,
6647
+ "allOf": [
6648
+ {
6649
+ "not": {
6650
+ "required": [
6651
+ "target",
6652
+ "blockId"
6653
+ ]
6654
+ }
6655
+ },
6656
+ {
6657
+ "not": {
6658
+ "required": [
6659
+ "target",
6660
+ "start"
6661
+ ]
6662
+ }
6663
+ },
6664
+ {
6665
+ "not": {
6666
+ "required": [
6667
+ "target",
6668
+ "end"
6669
+ ]
6670
+ }
6671
+ },
6672
+ {
6673
+ "if": {
6674
+ "required": [
6675
+ "start"
6676
+ ]
6677
+ },
6678
+ "then": {
6679
+ "required": [
6680
+ "blockId",
6681
+ "end"
6682
+ ]
6683
+ }
6684
+ },
6685
+ {
6686
+ "if": {
6687
+ "required": [
6688
+ "end"
6689
+ ]
6690
+ },
6691
+ "then": {
6692
+ "required": [
6693
+ "blockId",
6694
+ "start"
6695
+ ]
6696
+ }
6697
+ },
6698
+ {
6699
+ "if": {
6700
+ "required": [
6701
+ "blockId"
6702
+ ]
6703
+ },
6704
+ "then": {
6705
+ "required": [
6706
+ "start",
6707
+ "end"
6708
+ ]
6709
+ }
6710
+ }
6711
+ ],
6712
+ "anyOf": [
6713
+ {
6714
+ "required": [
6715
+ "target"
6716
+ ]
6717
+ },
6718
+ {
6719
+ "required": [
6720
+ "blockId",
6721
+ "start",
6722
+ "end"
6723
+ ]
6724
+ }
6725
+ ],
6210
6726
  "properties": {
6727
+ "blockId": {
6728
+ "description": "Block ID for block-relative range targeting.",
6729
+ "type": "string"
6730
+ },
6731
+ "end": {
6732
+ "description": "End offset within the block identified by blockId.",
6733
+ "minimum": 0,
6734
+ "type": "integer"
6735
+ },
6736
+ "start": {
6737
+ "description": "Start offset within the block identified by blockId.",
6738
+ "minimum": 0,
6739
+ "type": "integer"
6740
+ },
6211
6741
  "target": {
6212
6742
  "additionalProperties": false,
6213
6743
  "properties": {
@@ -6242,9 +6772,6 @@ export const CONTRACT = {
6242
6772
  "type": "object"
6243
6773
  }
6244
6774
  },
6245
- "required": [
6246
- "target"
6247
- ],
6248
6775
  "type": "object"
6249
6776
  },
6250
6777
  "outputSchema": {
@@ -7081,7 +7608,6 @@ export const CONTRACT = {
7081
7608
  "kind": "jsonFlag",
7082
7609
  "type": "json",
7083
7610
  "flag": "target-json",
7084
- "required": true,
7085
7611
  "schema": {
7086
7612
  "type": "object",
7087
7613
  "properties": {
@@ -7113,6 +7639,22 @@ export const CONTRACT = {
7113
7639
  "range"
7114
7640
  ]
7115
7641
  }
7642
+ },
7643
+ {
7644
+ "name": "blockId",
7645
+ "kind": "flag",
7646
+ "type": "string",
7647
+ "flag": "block-id"
7648
+ },
7649
+ {
7650
+ "name": "start",
7651
+ "kind": "flag",
7652
+ "type": "number"
7653
+ },
7654
+ {
7655
+ "name": "end",
7656
+ "kind": "flag",
7657
+ "type": "number"
7116
7658
  }
7117
7659
  ],
7118
7660
  "constraints": null,
@@ -7122,7 +7664,100 @@ export const CONTRACT = {
7122
7664
  "supportsDryRun": true,
7123
7665
  "inputSchema": {
7124
7666
  "additionalProperties": false,
7667
+ "allOf": [
7668
+ {
7669
+ "not": {
7670
+ "required": [
7671
+ "target",
7672
+ "blockId"
7673
+ ]
7674
+ }
7675
+ },
7676
+ {
7677
+ "not": {
7678
+ "required": [
7679
+ "target",
7680
+ "start"
7681
+ ]
7682
+ }
7683
+ },
7684
+ {
7685
+ "not": {
7686
+ "required": [
7687
+ "target",
7688
+ "end"
7689
+ ]
7690
+ }
7691
+ },
7692
+ {
7693
+ "if": {
7694
+ "required": [
7695
+ "start"
7696
+ ]
7697
+ },
7698
+ "then": {
7699
+ "required": [
7700
+ "blockId",
7701
+ "end"
7702
+ ]
7703
+ }
7704
+ },
7705
+ {
7706
+ "if": {
7707
+ "required": [
7708
+ "end"
7709
+ ]
7710
+ },
7711
+ "then": {
7712
+ "required": [
7713
+ "blockId",
7714
+ "start"
7715
+ ]
7716
+ }
7717
+ },
7718
+ {
7719
+ "if": {
7720
+ "required": [
7721
+ "blockId"
7722
+ ]
7723
+ },
7724
+ "then": {
7725
+ "required": [
7726
+ "start",
7727
+ "end"
7728
+ ]
7729
+ }
7730
+ }
7731
+ ],
7732
+ "anyOf": [
7733
+ {
7734
+ "required": [
7735
+ "target"
7736
+ ]
7737
+ },
7738
+ {
7739
+ "required": [
7740
+ "blockId",
7741
+ "start",
7742
+ "end"
7743
+ ]
7744
+ }
7745
+ ],
7125
7746
  "properties": {
7747
+ "blockId": {
7748
+ "description": "Block ID for block-relative range targeting.",
7749
+ "type": "string"
7750
+ },
7751
+ "end": {
7752
+ "description": "End offset within the block identified by blockId.",
7753
+ "minimum": 0,
7754
+ "type": "integer"
7755
+ },
7756
+ "start": {
7757
+ "description": "Start offset within the block identified by blockId.",
7758
+ "minimum": 0,
7759
+ "type": "integer"
7760
+ },
7126
7761
  "target": {
7127
7762
  "additionalProperties": false,
7128
7763
  "properties": {
@@ -7157,9 +7792,6 @@ export const CONTRACT = {
7157
7792
  "type": "object"
7158
7793
  }
7159
7794
  },
7160
- "required": [
7161
- "target"
7162
- ],
7163
7795
  "type": "object"
7164
7796
  },
7165
7797
  "outputSchema": {
@@ -8021,115 +8653,23 @@ export const CONTRACT = {
8021
8653
  ]
8022
8654
  },
8023
8655
  {
8024
- "type": "object",
8025
- "properties": {
8026
- "kind": {
8027
- "const": "before"
8656
+ "oneOf": [
8657
+ {
8658
+ "type": "json"
8028
8659
  },
8029
- "target": {
8030
- "type": "object",
8031
- "properties": {
8032
- "kind": {
8033
- "const": "block"
8034
- },
8035
- "nodeType": {
8036
- "oneOf": [
8037
- {
8038
- "const": "paragraph"
8039
- },
8040
- {
8041
- "const": "heading"
8042
- },
8043
- {
8044
- "const": "listItem"
8045
- },
8046
- {
8047
- "const": "table"
8048
- },
8049
- {
8050
- "const": "tableRow"
8051
- },
8052
- {
8053
- "const": "tableCell"
8054
- },
8055
- {
8056
- "const": "image"
8057
- },
8058
- {
8059
- "const": "sdt"
8060
- }
8061
- ]
8062
- },
8063
- "nodeId": {
8064
- "type": "string"
8065
- }
8066
- },
8067
- "required": [
8068
- "kind",
8069
- "nodeType",
8070
- "nodeId"
8071
- ]
8660
+ {
8661
+ "type": "json"
8072
8662
  }
8073
- },
8074
- "required": [
8075
- "kind",
8076
- "target"
8077
8663
  ]
8078
8664
  },
8079
8665
  {
8080
- "type": "object",
8081
- "properties": {
8082
- "kind": {
8083
- "const": "after"
8666
+ "oneOf": [
8667
+ {
8668
+ "type": "json"
8084
8669
  },
8085
- "target": {
8086
- "type": "object",
8087
- "properties": {
8088
- "kind": {
8089
- "const": "block"
8090
- },
8091
- "nodeType": {
8092
- "oneOf": [
8093
- {
8094
- "const": "paragraph"
8095
- },
8096
- {
8097
- "const": "heading"
8098
- },
8099
- {
8100
- "const": "listItem"
8101
- },
8102
- {
8103
- "const": "table"
8104
- },
8105
- {
8106
- "const": "tableRow"
8107
- },
8108
- {
8109
- "const": "tableCell"
8110
- },
8111
- {
8112
- "const": "image"
8113
- },
8114
- {
8115
- "const": "sdt"
8116
- }
8117
- ]
8118
- },
8119
- "nodeId": {
8120
- "type": "string"
8121
- }
8122
- },
8123
- "required": [
8124
- "kind",
8125
- "nodeType",
8126
- "nodeId"
8127
- ]
8670
+ {
8671
+ "type": "json"
8128
8672
  }
8129
- },
8130
- "required": [
8131
- "kind",
8132
- "target"
8133
8673
  ]
8134
8674
  }
8135
8675
  ]
@@ -8183,10 +8723,26 @@ export const CONTRACT = {
8183
8723
  },
8184
8724
  {
8185
8725
  "additionalProperties": false,
8726
+ "oneOf": [
8727
+ {
8728
+ "required": [
8729
+ "target"
8730
+ ]
8731
+ },
8732
+ {
8733
+ "required": [
8734
+ "nodeId"
8735
+ ]
8736
+ }
8737
+ ],
8186
8738
  "properties": {
8187
8739
  "kind": {
8188
8740
  "const": "before"
8189
8741
  },
8742
+ "nodeId": {
8743
+ "description": "Node ID shorthand — adapter resolves to a full BlockNodeAddress.",
8744
+ "type": "string"
8745
+ },
8190
8746
  "target": {
8191
8747
  "additionalProperties": false,
8192
8748
  "properties": {
@@ -8218,17 +8774,32 @@ export const CONTRACT = {
8218
8774
  }
8219
8775
  },
8220
8776
  "required": [
8221
- "kind",
8222
- "target"
8777
+ "kind"
8223
8778
  ],
8224
8779
  "type": "object"
8225
8780
  },
8226
8781
  {
8227
8782
  "additionalProperties": false,
8783
+ "oneOf": [
8784
+ {
8785
+ "required": [
8786
+ "target"
8787
+ ]
8788
+ },
8789
+ {
8790
+ "required": [
8791
+ "nodeId"
8792
+ ]
8793
+ }
8794
+ ],
8228
8795
  "properties": {
8229
8796
  "kind": {
8230
8797
  "const": "after"
8231
8798
  },
8799
+ "nodeId": {
8800
+ "description": "Node ID shorthand — adapter resolves to a full BlockNodeAddress.",
8801
+ "type": "string"
8802
+ },
8232
8803
  "target": {
8233
8804
  "additionalProperties": false,
8234
8805
  "properties": {
@@ -8260,8 +8831,7 @@ export const CONTRACT = {
8260
8831
  }
8261
8832
  },
8262
8833
  "required": [
8263
- "kind",
8264
- "target"
8834
+ "kind"
8265
8835
  ],
8266
8836
  "type": "object"
8267
8837
  }
@@ -9047,6 +9617,12 @@ export const CONTRACT = {
9047
9617
  ]
9048
9618
  }
9049
9619
  },
9620
+ {
9621
+ "name": "nodeId",
9622
+ "kind": "flag",
9623
+ "type": "string",
9624
+ "flag": "node-id"
9625
+ },
9050
9626
  {
9051
9627
  "name": "position",
9052
9628
  "kind": "flag",
@@ -9081,7 +9657,23 @@ export const CONTRACT = {
9081
9657
  "supportsDryRun": true,
9082
9658
  "inputSchema": {
9083
9659
  "additionalProperties": false,
9660
+ "oneOf": [
9661
+ {
9662
+ "required": [
9663
+ "target"
9664
+ ]
9665
+ },
9666
+ {
9667
+ "required": [
9668
+ "nodeId"
9669
+ ]
9670
+ }
9671
+ ],
9084
9672
  "properties": {
9673
+ "nodeId": {
9674
+ "description": "Node ID shorthand — adapter resolves to a ListItemAddress.",
9675
+ "type": "string"
9676
+ },
9085
9677
  "position": {
9086
9678
  "enum": [
9087
9679
  "before",
@@ -9113,7 +9705,6 @@ export const CONTRACT = {
9113
9705
  }
9114
9706
  },
9115
9707
  "required": [
9116
- "target",
9117
9708
  "position"
9118
9709
  ],
9119
9710
  "type": "object"
@@ -9458,6 +10049,12 @@ export const CONTRACT = {
9458
10049
  ]
9459
10050
  }
9460
10051
  },
10052
+ {
10053
+ "name": "nodeId",
10054
+ "kind": "flag",
10055
+ "type": "string",
10056
+ "flag": "node-id"
10057
+ },
9461
10058
  {
9462
10059
  "name": "kind",
9463
10060
  "kind": "flag",
@@ -9487,6 +10084,18 @@ export const CONTRACT = {
9487
10084
  "supportsDryRun": true,
9488
10085
  "inputSchema": {
9489
10086
  "additionalProperties": false,
10087
+ "oneOf": [
10088
+ {
10089
+ "required": [
10090
+ "target"
10091
+ ]
10092
+ },
10093
+ {
10094
+ "required": [
10095
+ "nodeId"
10096
+ ]
10097
+ }
10098
+ ],
9490
10099
  "properties": {
9491
10100
  "kind": {
9492
10101
  "enum": [
@@ -9494,6 +10103,10 @@ export const CONTRACT = {
9494
10103
  "bullet"
9495
10104
  ]
9496
10105
  },
10106
+ "nodeId": {
10107
+ "description": "Node ID shorthand — adapter resolves to a ListItemAddress.",
10108
+ "type": "string"
10109
+ },
9497
10110
  "target": {
9498
10111
  "additionalProperties": false,
9499
10112
  "properties": {
@@ -9516,7 +10129,6 @@ export const CONTRACT = {
9516
10129
  }
9517
10130
  },
9518
10131
  "required": [
9519
- "target",
9520
10132
  "kind"
9521
10133
  ],
9522
10134
  "type": "object"
@@ -9749,6 +10361,12 @@ export const CONTRACT = {
9749
10361
  ]
9750
10362
  }
9751
10363
  },
10364
+ {
10365
+ "name": "nodeId",
10366
+ "kind": "flag",
10367
+ "type": "string",
10368
+ "flag": "node-id"
10369
+ },
9752
10370
  {
9753
10371
  "name": "input",
9754
10372
  "kind": "jsonFlag",
@@ -9763,7 +10381,23 @@ export const CONTRACT = {
9763
10381
  "supportsDryRun": true,
9764
10382
  "inputSchema": {
9765
10383
  "additionalProperties": false,
10384
+ "oneOf": [
10385
+ {
10386
+ "required": [
10387
+ "target"
10388
+ ]
10389
+ },
10390
+ {
10391
+ "required": [
10392
+ "nodeId"
10393
+ ]
10394
+ }
10395
+ ],
9766
10396
  "properties": {
10397
+ "nodeId": {
10398
+ "description": "Node ID shorthand — adapter resolves to a ListItemAddress.",
10399
+ "type": "string"
10400
+ },
9767
10401
  "target": {
9768
10402
  "additionalProperties": false,
9769
10403
  "properties": {
@@ -9785,9 +10419,6 @@ export const CONTRACT = {
9785
10419
  "type": "object"
9786
10420
  }
9787
10421
  },
9788
- "required": [
9789
- "target"
9790
- ],
9791
10422
  "type": "object"
9792
10423
  },
9793
10424
  "outputSchema": {
@@ -10018,6 +10649,12 @@ export const CONTRACT = {
10018
10649
  ]
10019
10650
  }
10020
10651
  },
10652
+ {
10653
+ "name": "nodeId",
10654
+ "kind": "flag",
10655
+ "type": "string",
10656
+ "flag": "node-id"
10657
+ },
10021
10658
  {
10022
10659
  "name": "input",
10023
10660
  "kind": "jsonFlag",
@@ -10032,7 +10669,23 @@ export const CONTRACT = {
10032
10669
  "supportsDryRun": true,
10033
10670
  "inputSchema": {
10034
10671
  "additionalProperties": false,
10672
+ "oneOf": [
10673
+ {
10674
+ "required": [
10675
+ "target"
10676
+ ]
10677
+ },
10678
+ {
10679
+ "required": [
10680
+ "nodeId"
10681
+ ]
10682
+ }
10683
+ ],
10035
10684
  "properties": {
10685
+ "nodeId": {
10686
+ "description": "Node ID shorthand — adapter resolves to a ListItemAddress.",
10687
+ "type": "string"
10688
+ },
10036
10689
  "target": {
10037
10690
  "additionalProperties": false,
10038
10691
  "properties": {
@@ -10054,9 +10707,6 @@ export const CONTRACT = {
10054
10707
  "type": "object"
10055
10708
  }
10056
10709
  },
10057
- "required": [
10058
- "target"
10059
- ],
10060
10710
  "type": "object"
10061
10711
  },
10062
10712
  "outputSchema": {
@@ -10287,6 +10937,12 @@ export const CONTRACT = {
10287
10937
  ]
10288
10938
  }
10289
10939
  },
10940
+ {
10941
+ "name": "nodeId",
10942
+ "kind": "flag",
10943
+ "type": "string",
10944
+ "flag": "node-id"
10945
+ },
10290
10946
  {
10291
10947
  "name": "input",
10292
10948
  "kind": "jsonFlag",
@@ -10301,7 +10957,23 @@ export const CONTRACT = {
10301
10957
  "supportsDryRun": true,
10302
10958
  "inputSchema": {
10303
10959
  "additionalProperties": false,
10960
+ "oneOf": [
10961
+ {
10962
+ "required": [
10963
+ "target"
10964
+ ]
10965
+ },
10966
+ {
10967
+ "required": [
10968
+ "nodeId"
10969
+ ]
10970
+ }
10971
+ ],
10304
10972
  "properties": {
10973
+ "nodeId": {
10974
+ "description": "Node ID shorthand — adapter resolves to a ListItemAddress.",
10975
+ "type": "string"
10976
+ },
10305
10977
  "target": {
10306
10978
  "additionalProperties": false,
10307
10979
  "properties": {
@@ -10323,9 +10995,6 @@ export const CONTRACT = {
10323
10995
  "type": "object"
10324
10996
  }
10325
10997
  },
10326
- "required": [
10327
- "target"
10328
- ],
10329
10998
  "type": "object"
10330
10999
  },
10331
11000
  "outputSchema": {
@@ -10556,6 +11225,12 @@ export const CONTRACT = {
10556
11225
  ]
10557
11226
  }
10558
11227
  },
11228
+ {
11229
+ "name": "nodeId",
11230
+ "kind": "flag",
11231
+ "type": "string",
11232
+ "flag": "node-id"
11233
+ },
10559
11234
  {
10560
11235
  "name": "input",
10561
11236
  "kind": "jsonFlag",
@@ -10570,7 +11245,23 @@ export const CONTRACT = {
10570
11245
  "supportsDryRun": true,
10571
11246
  "inputSchema": {
10572
11247
  "additionalProperties": false,
11248
+ "oneOf": [
11249
+ {
11250
+ "required": [
11251
+ "target"
11252
+ ]
11253
+ },
11254
+ {
11255
+ "required": [
11256
+ "nodeId"
11257
+ ]
11258
+ }
11259
+ ],
10573
11260
  "properties": {
11261
+ "nodeId": {
11262
+ "description": "Node ID shorthand — adapter resolves to a ListItemAddress.",
11263
+ "type": "string"
11264
+ },
10574
11265
  "target": {
10575
11266
  "additionalProperties": false,
10576
11267
  "properties": {
@@ -10592,9 +11283,6 @@ export const CONTRACT = {
10592
11283
  "type": "object"
10593
11284
  }
10594
11285
  },
10595
- "required": [
10596
- "target"
10597
- ],
10598
11286
  "type": "object"
10599
11287
  },
10600
11288
  "outputSchema": {
@@ -10796,7 +11484,6 @@ export const CONTRACT = {
10796
11484
  "kind": "jsonFlag",
10797
11485
  "type": "json",
10798
11486
  "flag": "target-json",
10799
- "required": true,
10800
11487
  "schema": {
10801
11488
  "type": "object",
10802
11489
  "properties": {
@@ -10834,6 +11521,22 @@ export const CONTRACT = {
10834
11521
  "kind": "flag",
10835
11522
  "type": "string",
10836
11523
  "required": true
11524
+ },
11525
+ {
11526
+ "name": "blockId",
11527
+ "kind": "flag",
11528
+ "type": "string",
11529
+ "flag": "block-id"
11530
+ },
11531
+ {
11532
+ "name": "start",
11533
+ "kind": "flag",
11534
+ "type": "number"
11535
+ },
11536
+ {
11537
+ "name": "end",
11538
+ "kind": "flag",
11539
+ "type": "number"
10837
11540
  }
10838
11541
  ],
10839
11542
  "constraints": null,
@@ -10843,7 +11546,100 @@ export const CONTRACT = {
10843
11546
  "supportsDryRun": false,
10844
11547
  "inputSchema": {
10845
11548
  "additionalProperties": false,
11549
+ "allOf": [
11550
+ {
11551
+ "not": {
11552
+ "required": [
11553
+ "target",
11554
+ "blockId"
11555
+ ]
11556
+ }
11557
+ },
11558
+ {
11559
+ "not": {
11560
+ "required": [
11561
+ "target",
11562
+ "start"
11563
+ ]
11564
+ }
11565
+ },
11566
+ {
11567
+ "not": {
11568
+ "required": [
11569
+ "target",
11570
+ "end"
11571
+ ]
11572
+ }
11573
+ },
11574
+ {
11575
+ "if": {
11576
+ "required": [
11577
+ "start"
11578
+ ]
11579
+ },
11580
+ "then": {
11581
+ "required": [
11582
+ "blockId",
11583
+ "end"
11584
+ ]
11585
+ }
11586
+ },
11587
+ {
11588
+ "if": {
11589
+ "required": [
11590
+ "end"
11591
+ ]
11592
+ },
11593
+ "then": {
11594
+ "required": [
11595
+ "blockId",
11596
+ "start"
11597
+ ]
11598
+ }
11599
+ },
11600
+ {
11601
+ "if": {
11602
+ "required": [
11603
+ "blockId"
11604
+ ]
11605
+ },
11606
+ "then": {
11607
+ "required": [
11608
+ "start",
11609
+ "end"
11610
+ ]
11611
+ }
11612
+ }
11613
+ ],
11614
+ "anyOf": [
11615
+ {
11616
+ "required": [
11617
+ "target"
11618
+ ]
11619
+ },
11620
+ {
11621
+ "required": [
11622
+ "blockId",
11623
+ "start",
11624
+ "end"
11625
+ ]
11626
+ }
11627
+ ],
10846
11628
  "properties": {
11629
+ "blockId": {
11630
+ "description": "Block ID for block-relative range targeting.",
11631
+ "type": "string"
11632
+ },
11633
+ "end": {
11634
+ "description": "End offset within the block identified by blockId.",
11635
+ "minimum": 0,
11636
+ "type": "integer"
11637
+ },
11638
+ "start": {
11639
+ "description": "Start offset within the block identified by blockId.",
11640
+ "minimum": 0,
11641
+ "type": "integer"
11642
+ },
10847
11643
  "target": {
10848
11644
  "additionalProperties": false,
10849
11645
  "properties": {
@@ -10882,7 +11678,6 @@ export const CONTRACT = {
10882
11678
  }
10883
11679
  },
10884
11680
  "required": [
10885
- "target",
10886
11681
  "text"
10887
11682
  ],
10888
11683
  "type": "object"
@@ -12271,7 +13066,6 @@ export const CONTRACT = {
12271
13066
  "kind": "jsonFlag",
12272
13067
  "type": "json",
12273
13068
  "flag": "target-json",
12274
- "required": true,
12275
13069
  "schema": {
12276
13070
  "type": "object",
12277
13071
  "properties": {
@@ -12303,6 +13097,22 @@ export const CONTRACT = {
12303
13097
  "range"
12304
13098
  ]
12305
13099
  }
13100
+ },
13101
+ {
13102
+ "name": "blockId",
13103
+ "kind": "flag",
13104
+ "type": "string",
13105
+ "flag": "block-id"
13106
+ },
13107
+ {
13108
+ "name": "start",
13109
+ "kind": "flag",
13110
+ "type": "number"
13111
+ },
13112
+ {
13113
+ "name": "end",
13114
+ "kind": "flag",
13115
+ "type": "number"
12306
13116
  }
12307
13117
  ],
12308
13118
  "constraints": null,
@@ -12312,10 +13122,103 @@ export const CONTRACT = {
12312
13122
  "supportsDryRun": false,
12313
13123
  "inputSchema": {
12314
13124
  "additionalProperties": false,
13125
+ "allOf": [
13126
+ {
13127
+ "not": {
13128
+ "required": [
13129
+ "target",
13130
+ "blockId"
13131
+ ]
13132
+ }
13133
+ },
13134
+ {
13135
+ "not": {
13136
+ "required": [
13137
+ "target",
13138
+ "start"
13139
+ ]
13140
+ }
13141
+ },
13142
+ {
13143
+ "not": {
13144
+ "required": [
13145
+ "target",
13146
+ "end"
13147
+ ]
13148
+ }
13149
+ },
13150
+ {
13151
+ "if": {
13152
+ "required": [
13153
+ "start"
13154
+ ]
13155
+ },
13156
+ "then": {
13157
+ "required": [
13158
+ "blockId",
13159
+ "end"
13160
+ ]
13161
+ }
13162
+ },
13163
+ {
13164
+ "if": {
13165
+ "required": [
13166
+ "end"
13167
+ ]
13168
+ },
13169
+ "then": {
13170
+ "required": [
13171
+ "blockId",
13172
+ "start"
13173
+ ]
13174
+ }
13175
+ },
13176
+ {
13177
+ "if": {
13178
+ "required": [
13179
+ "blockId"
13180
+ ]
13181
+ },
13182
+ "then": {
13183
+ "required": [
13184
+ "start",
13185
+ "end"
13186
+ ]
13187
+ }
13188
+ }
13189
+ ],
13190
+ "anyOf": [
13191
+ {
13192
+ "required": [
13193
+ "target"
13194
+ ]
13195
+ },
13196
+ {
13197
+ "required": [
13198
+ "blockId",
13199
+ "start",
13200
+ "end"
13201
+ ]
13202
+ }
13203
+ ],
12315
13204
  "properties": {
13205
+ "blockId": {
13206
+ "description": "Block ID for block-relative range targeting.",
13207
+ "type": "string"
13208
+ },
12316
13209
  "commentId": {
12317
13210
  "type": "string"
12318
13211
  },
13212
+ "end": {
13213
+ "description": "End offset within the block identified by blockId.",
13214
+ "minimum": 0,
13215
+ "type": "integer"
13216
+ },
13217
+ "start": {
13218
+ "description": "Start offset within the block identified by blockId.",
13219
+ "minimum": 0,
13220
+ "type": "integer"
13221
+ },
12319
13222
  "target": {
12320
13223
  "additionalProperties": false,
12321
13224
  "properties": {
@@ -12351,8 +13254,7 @@ export const CONTRACT = {
12351
13254
  }
12352
13255
  },
12353
13256
  "required": [
12354
- "commentId",
12355
- "target"
13257
+ "commentId"
12356
13258
  ],
12357
13259
  "type": "object"
12358
13260
  },