@superdoc-dev/sdk 1.0.0-alpha.2 → 1.0.0-alpha.3

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.
@@ -1554,6 +1554,63 @@ export const CONTRACT = {
1554
1554
  }
1555
1555
  }
1556
1556
  ],
1557
+ "constraints": {
1558
+ "requiresOneOf": [
1559
+ [
1560
+ "type",
1561
+ "query"
1562
+ ]
1563
+ ],
1564
+ "mutuallyExclusive": [
1565
+ [
1566
+ "query",
1567
+ "type"
1568
+ ],
1569
+ [
1570
+ "query",
1571
+ "nodeType"
1572
+ ],
1573
+ [
1574
+ "query",
1575
+ "kind"
1576
+ ],
1577
+ [
1578
+ "query",
1579
+ "pattern"
1580
+ ],
1581
+ [
1582
+ "query",
1583
+ "mode"
1584
+ ],
1585
+ [
1586
+ "query",
1587
+ "caseSensitive"
1588
+ ],
1589
+ [
1590
+ "query",
1591
+ "limit"
1592
+ ],
1593
+ [
1594
+ "query",
1595
+ "offset"
1596
+ ],
1597
+ [
1598
+ "query",
1599
+ "include"
1600
+ ],
1601
+ [
1602
+ "query",
1603
+ "includeUnknown"
1604
+ ]
1605
+ ],
1606
+ "requiredWhen": [
1607
+ {
1608
+ "param": "pattern",
1609
+ "whenParam": "type",
1610
+ "equals": "text"
1611
+ }
1612
+ ]
1613
+ },
1557
1614
  "response": {
1558
1615
  "type": "object",
1559
1616
  "properties": {
@@ -9875,6 +9932,2505 @@ export const CONTRACT = {
9875
9932
  "superdoc create paragraph"
9876
9933
  ]
9877
9934
  },
9935
+ {
9936
+ "id": "doc.lists.list",
9937
+ "command": [
9938
+ "lists",
9939
+ "list"
9940
+ ],
9941
+ "description": "List list items with optional structural filters.",
9942
+ "mutates": false,
9943
+ "requiresOpenContext": false,
9944
+ "params": [
9945
+ {
9946
+ "name": "doc",
9947
+ "kind": "doc",
9948
+ "type": "string"
9949
+ },
9950
+ {
9951
+ "name": "sessionId",
9952
+ "kind": "flag",
9953
+ "flag": "session",
9954
+ "type": "string"
9955
+ },
9956
+ {
9957
+ "name": "query",
9958
+ "kind": "jsonFlag",
9959
+ "flag": "query-json",
9960
+ "type": "json",
9961
+ "schema": {
9962
+ "type": "object",
9963
+ "properties": {
9964
+ "within": {
9965
+ "type": "object",
9966
+ "properties": {
9967
+ "kind": {
9968
+ "const": "block"
9969
+ },
9970
+ "nodeType": {
9971
+ "oneOf": [
9972
+ {
9973
+ "const": "paragraph"
9974
+ },
9975
+ {
9976
+ "const": "heading"
9977
+ },
9978
+ {
9979
+ "const": "listItem"
9980
+ },
9981
+ {
9982
+ "const": "table"
9983
+ },
9984
+ {
9985
+ "const": "tableRow"
9986
+ },
9987
+ {
9988
+ "const": "tableCell"
9989
+ },
9990
+ {
9991
+ "const": "blockquote"
9992
+ },
9993
+ {
9994
+ "const": "codeBlock"
9995
+ },
9996
+ {
9997
+ "const": "image"
9998
+ },
9999
+ {
10000
+ "const": "sdt"
10001
+ },
10002
+ {
10003
+ "const": "field"
10004
+ }
10005
+ ]
10006
+ },
10007
+ "nodeId": {
10008
+ "type": "string"
10009
+ }
10010
+ },
10011
+ "required": [
10012
+ "kind",
10013
+ "nodeType",
10014
+ "nodeId"
10015
+ ]
10016
+ },
10017
+ "limit": {
10018
+ "type": "number"
10019
+ },
10020
+ "offset": {
10021
+ "type": "number"
10022
+ },
10023
+ "kind": {
10024
+ "oneOf": [
10025
+ {
10026
+ "const": "ordered"
10027
+ },
10028
+ {
10029
+ "const": "bullet"
10030
+ }
10031
+ ]
10032
+ },
10033
+ "level": {
10034
+ "type": "number"
10035
+ },
10036
+ "ordinal": {
10037
+ "type": "number"
10038
+ }
10039
+ }
10040
+ }
10041
+ },
10042
+ {
10043
+ "name": "within",
10044
+ "kind": "jsonFlag",
10045
+ "flag": "within-json",
10046
+ "type": "json",
10047
+ "schema": {
10048
+ "type": "object",
10049
+ "properties": {
10050
+ "kind": {
10051
+ "const": "block"
10052
+ },
10053
+ "nodeType": {
10054
+ "oneOf": [
10055
+ {
10056
+ "const": "paragraph"
10057
+ },
10058
+ {
10059
+ "const": "heading"
10060
+ },
10061
+ {
10062
+ "const": "listItem"
10063
+ },
10064
+ {
10065
+ "const": "table"
10066
+ },
10067
+ {
10068
+ "const": "tableRow"
10069
+ },
10070
+ {
10071
+ "const": "tableCell"
10072
+ },
10073
+ {
10074
+ "const": "blockquote"
10075
+ },
10076
+ {
10077
+ "const": "codeBlock"
10078
+ },
10079
+ {
10080
+ "const": "image"
10081
+ },
10082
+ {
10083
+ "const": "sdt"
10084
+ },
10085
+ {
10086
+ "const": "field"
10087
+ }
10088
+ ]
10089
+ },
10090
+ "nodeId": {
10091
+ "type": "string"
10092
+ }
10093
+ },
10094
+ "required": [
10095
+ "kind",
10096
+ "nodeType",
10097
+ "nodeId"
10098
+ ]
10099
+ }
10100
+ },
10101
+ {
10102
+ "name": "kind",
10103
+ "kind": "flag",
10104
+ "flag": "kind",
10105
+ "type": "string",
10106
+ "schema": {
10107
+ "oneOf": [
10108
+ {
10109
+ "const": "ordered"
10110
+ },
10111
+ {
10112
+ "const": "bullet"
10113
+ }
10114
+ ]
10115
+ }
10116
+ },
10117
+ {
10118
+ "name": "level",
10119
+ "kind": "flag",
10120
+ "flag": "level",
10121
+ "type": "number"
10122
+ },
10123
+ {
10124
+ "name": "ordinal",
10125
+ "kind": "flag",
10126
+ "flag": "ordinal",
10127
+ "type": "number"
10128
+ },
10129
+ {
10130
+ "name": "limit",
10131
+ "kind": "flag",
10132
+ "flag": "limit",
10133
+ "type": "number"
10134
+ },
10135
+ {
10136
+ "name": "offset",
10137
+ "kind": "flag",
10138
+ "flag": "offset",
10139
+ "type": "number"
10140
+ }
10141
+ ],
10142
+ "response": {
10143
+ "type": "object",
10144
+ "properties": {
10145
+ "document": {
10146
+ "type": "object",
10147
+ "properties": {
10148
+ "path": {
10149
+ "type": "string"
10150
+ },
10151
+ "source": {
10152
+ "type": "string"
10153
+ },
10154
+ "byteLength": {
10155
+ "type": "number"
10156
+ },
10157
+ "revision": {
10158
+ "type": "number"
10159
+ }
10160
+ },
10161
+ "required": [
10162
+ "source",
10163
+ "byteLength",
10164
+ "revision"
10165
+ ]
10166
+ },
10167
+ "query": {
10168
+ "type": "object",
10169
+ "properties": {
10170
+ "within": {
10171
+ "type": "object",
10172
+ "properties": {
10173
+ "kind": {
10174
+ "const": "block"
10175
+ },
10176
+ "nodeType": {
10177
+ "oneOf": [
10178
+ {
10179
+ "const": "paragraph"
10180
+ },
10181
+ {
10182
+ "const": "heading"
10183
+ },
10184
+ {
10185
+ "const": "listItem"
10186
+ },
10187
+ {
10188
+ "const": "table"
10189
+ },
10190
+ {
10191
+ "const": "tableRow"
10192
+ },
10193
+ {
10194
+ "const": "tableCell"
10195
+ },
10196
+ {
10197
+ "const": "blockquote"
10198
+ },
10199
+ {
10200
+ "const": "codeBlock"
10201
+ },
10202
+ {
10203
+ "const": "image"
10204
+ },
10205
+ {
10206
+ "const": "sdt"
10207
+ },
10208
+ {
10209
+ "const": "field"
10210
+ }
10211
+ ]
10212
+ },
10213
+ "nodeId": {
10214
+ "type": "string"
10215
+ }
10216
+ },
10217
+ "required": [
10218
+ "kind",
10219
+ "nodeType",
10220
+ "nodeId"
10221
+ ]
10222
+ },
10223
+ "limit": {
10224
+ "type": "number"
10225
+ },
10226
+ "offset": {
10227
+ "type": "number"
10228
+ },
10229
+ "kind": {
10230
+ "oneOf": [
10231
+ {
10232
+ "const": "ordered"
10233
+ },
10234
+ {
10235
+ "const": "bullet"
10236
+ }
10237
+ ]
10238
+ },
10239
+ "level": {
10240
+ "type": "number"
10241
+ },
10242
+ "ordinal": {
10243
+ "type": "number"
10244
+ }
10245
+ }
10246
+ },
10247
+ "result": {
10248
+ "type": "object",
10249
+ "properties": {
10250
+ "matches": {
10251
+ "type": "array",
10252
+ "items": {
10253
+ "type": "object",
10254
+ "properties": {
10255
+ "kind": {
10256
+ "const": "block"
10257
+ },
10258
+ "nodeType": {
10259
+ "const": "listItem"
10260
+ },
10261
+ "nodeId": {
10262
+ "type": "string"
10263
+ }
10264
+ },
10265
+ "required": [
10266
+ "kind",
10267
+ "nodeType",
10268
+ "nodeId"
10269
+ ]
10270
+ }
10271
+ },
10272
+ "total": {
10273
+ "type": "number"
10274
+ },
10275
+ "items": {
10276
+ "type": "array",
10277
+ "items": {
10278
+ "type": "object",
10279
+ "properties": {
10280
+ "address": {
10281
+ "type": "object",
10282
+ "properties": {
10283
+ "kind": {
10284
+ "const": "block"
10285
+ },
10286
+ "nodeType": {
10287
+ "const": "listItem"
10288
+ },
10289
+ "nodeId": {
10290
+ "type": "string"
10291
+ }
10292
+ },
10293
+ "required": [
10294
+ "kind",
10295
+ "nodeType",
10296
+ "nodeId"
10297
+ ]
10298
+ },
10299
+ "marker": {
10300
+ "type": "string"
10301
+ },
10302
+ "ordinal": {
10303
+ "type": "number"
10304
+ },
10305
+ "path": {
10306
+ "type": "array",
10307
+ "items": {
10308
+ "type": "number"
10309
+ }
10310
+ },
10311
+ "level": {
10312
+ "type": "number"
10313
+ },
10314
+ "kind": {
10315
+ "oneOf": [
10316
+ {
10317
+ "const": "ordered"
10318
+ },
10319
+ {
10320
+ "const": "bullet"
10321
+ }
10322
+ ]
10323
+ },
10324
+ "text": {
10325
+ "type": "string"
10326
+ }
10327
+ },
10328
+ "required": [
10329
+ "address"
10330
+ ]
10331
+ }
10332
+ }
10333
+ },
10334
+ "required": [
10335
+ "matches",
10336
+ "total",
10337
+ "items"
10338
+ ]
10339
+ }
10340
+ },
10341
+ "required": [
10342
+ "document",
10343
+ "query",
10344
+ "result"
10345
+ ]
10346
+ },
10347
+ "errors": [
10348
+ "TARGET_NOT_FOUND",
10349
+ "NO_ACTIVE_DOCUMENT",
10350
+ "COLLABORATION_SYNC_TIMEOUT"
10351
+ ],
10352
+ "category": "misc",
10353
+ "stability": "alpha",
10354
+ "capabilities": [
10355
+ "session-targeting",
10356
+ "stateless-doc"
10357
+ ],
10358
+ "aliases": [],
10359
+ "examples": [
10360
+ "superdoc lists list"
10361
+ ]
10362
+ },
10363
+ {
10364
+ "id": "doc.lists.get",
10365
+ "command": [
10366
+ "lists",
10367
+ "get"
10368
+ ],
10369
+ "description": "Get a list item by address.",
10370
+ "mutates": false,
10371
+ "requiresOpenContext": false,
10372
+ "params": [
10373
+ {
10374
+ "name": "doc",
10375
+ "kind": "doc",
10376
+ "type": "string"
10377
+ },
10378
+ {
10379
+ "name": "sessionId",
10380
+ "kind": "flag",
10381
+ "flag": "session",
10382
+ "type": "string"
10383
+ },
10384
+ {
10385
+ "name": "address",
10386
+ "kind": "jsonFlag",
10387
+ "flag": "address-json",
10388
+ "type": "json",
10389
+ "required": true,
10390
+ "schema": {
10391
+ "type": "object",
10392
+ "properties": {
10393
+ "kind": {
10394
+ "const": "block"
10395
+ },
10396
+ "nodeType": {
10397
+ "const": "listItem"
10398
+ },
10399
+ "nodeId": {
10400
+ "type": "string"
10401
+ }
10402
+ },
10403
+ "required": [
10404
+ "kind",
10405
+ "nodeType",
10406
+ "nodeId"
10407
+ ]
10408
+ }
10409
+ }
10410
+ ],
10411
+ "response": {
10412
+ "type": "object",
10413
+ "properties": {
10414
+ "document": {
10415
+ "type": "object",
10416
+ "properties": {
10417
+ "path": {
10418
+ "type": "string"
10419
+ },
10420
+ "source": {
10421
+ "type": "string"
10422
+ },
10423
+ "byteLength": {
10424
+ "type": "number"
10425
+ },
10426
+ "revision": {
10427
+ "type": "number"
10428
+ }
10429
+ },
10430
+ "required": [
10431
+ "source",
10432
+ "byteLength",
10433
+ "revision"
10434
+ ]
10435
+ },
10436
+ "address": {
10437
+ "type": "object",
10438
+ "properties": {
10439
+ "kind": {
10440
+ "const": "block"
10441
+ },
10442
+ "nodeType": {
10443
+ "const": "listItem"
10444
+ },
10445
+ "nodeId": {
10446
+ "type": "string"
10447
+ }
10448
+ },
10449
+ "required": [
10450
+ "kind",
10451
+ "nodeType",
10452
+ "nodeId"
10453
+ ]
10454
+ },
10455
+ "item": {
10456
+ "type": "object",
10457
+ "properties": {
10458
+ "address": {
10459
+ "type": "object",
10460
+ "properties": {
10461
+ "kind": {
10462
+ "const": "block"
10463
+ },
10464
+ "nodeType": {
10465
+ "const": "listItem"
10466
+ },
10467
+ "nodeId": {
10468
+ "type": "string"
10469
+ }
10470
+ },
10471
+ "required": [
10472
+ "kind",
10473
+ "nodeType",
10474
+ "nodeId"
10475
+ ]
10476
+ },
10477
+ "marker": {
10478
+ "type": "string"
10479
+ },
10480
+ "ordinal": {
10481
+ "type": "number"
10482
+ },
10483
+ "path": {
10484
+ "type": "array",
10485
+ "items": {
10486
+ "type": "number"
10487
+ }
10488
+ },
10489
+ "level": {
10490
+ "type": "number"
10491
+ },
10492
+ "kind": {
10493
+ "oneOf": [
10494
+ {
10495
+ "const": "ordered"
10496
+ },
10497
+ {
10498
+ "const": "bullet"
10499
+ }
10500
+ ]
10501
+ },
10502
+ "text": {
10503
+ "type": "string"
10504
+ }
10505
+ },
10506
+ "required": [
10507
+ "address"
10508
+ ]
10509
+ }
10510
+ },
10511
+ "required": [
10512
+ "document",
10513
+ "address",
10514
+ "item"
10515
+ ]
10516
+ },
10517
+ "errors": [
10518
+ "TARGET_NOT_FOUND",
10519
+ "NO_ACTIVE_DOCUMENT",
10520
+ "COLLABORATION_SYNC_TIMEOUT"
10521
+ ],
10522
+ "category": "misc",
10523
+ "stability": "alpha",
10524
+ "capabilities": [
10525
+ "session-targeting",
10526
+ "stateless-doc"
10527
+ ],
10528
+ "aliases": [],
10529
+ "examples": [
10530
+ "superdoc lists get --address-json '{...}'"
10531
+ ]
10532
+ },
10533
+ {
10534
+ "id": "doc.lists.insert",
10535
+ "command": [
10536
+ "lists",
10537
+ "insert"
10538
+ ],
10539
+ "description": "Insert a list item before or after a target list item.",
10540
+ "mutates": true,
10541
+ "requiresOpenContext": false,
10542
+ "params": [
10543
+ {
10544
+ "name": "doc",
10545
+ "kind": "doc",
10546
+ "type": "string"
10547
+ },
10548
+ {
10549
+ "name": "sessionId",
10550
+ "kind": "flag",
10551
+ "flag": "session",
10552
+ "type": "string"
10553
+ },
10554
+ {
10555
+ "name": "input",
10556
+ "kind": "jsonFlag",
10557
+ "flag": "input-json",
10558
+ "type": "json",
10559
+ "schema": {
10560
+ "type": "object",
10561
+ "properties": {
10562
+ "target": {
10563
+ "type": "object",
10564
+ "properties": {
10565
+ "kind": {
10566
+ "const": "block"
10567
+ },
10568
+ "nodeType": {
10569
+ "const": "listItem"
10570
+ },
10571
+ "nodeId": {
10572
+ "type": "string"
10573
+ }
10574
+ },
10575
+ "required": [
10576
+ "kind",
10577
+ "nodeType",
10578
+ "nodeId"
10579
+ ]
10580
+ },
10581
+ "position": {
10582
+ "oneOf": [
10583
+ {
10584
+ "const": "before"
10585
+ },
10586
+ {
10587
+ "const": "after"
10588
+ }
10589
+ ]
10590
+ },
10591
+ "text": {
10592
+ "type": "string"
10593
+ }
10594
+ },
10595
+ "required": [
10596
+ "target",
10597
+ "position"
10598
+ ]
10599
+ }
10600
+ },
10601
+ {
10602
+ "name": "target",
10603
+ "kind": "jsonFlag",
10604
+ "flag": "target-json",
10605
+ "type": "json",
10606
+ "schema": {
10607
+ "type": "object",
10608
+ "properties": {
10609
+ "kind": {
10610
+ "const": "block"
10611
+ },
10612
+ "nodeType": {
10613
+ "const": "listItem"
10614
+ },
10615
+ "nodeId": {
10616
+ "type": "string"
10617
+ }
10618
+ },
10619
+ "required": [
10620
+ "kind",
10621
+ "nodeType",
10622
+ "nodeId"
10623
+ ]
10624
+ }
10625
+ },
10626
+ {
10627
+ "name": "position",
10628
+ "kind": "flag",
10629
+ "flag": "position",
10630
+ "type": "string",
10631
+ "schema": {
10632
+ "oneOf": [
10633
+ {
10634
+ "const": "before"
10635
+ },
10636
+ {
10637
+ "const": "after"
10638
+ }
10639
+ ]
10640
+ }
10641
+ },
10642
+ {
10643
+ "name": "text",
10644
+ "kind": "flag",
10645
+ "flag": "text",
10646
+ "type": "string"
10647
+ },
10648
+ {
10649
+ "name": "changeMode",
10650
+ "kind": "flag",
10651
+ "flag": "change-mode",
10652
+ "type": "string",
10653
+ "schema": {
10654
+ "oneOf": [
10655
+ {
10656
+ "const": "direct"
10657
+ },
10658
+ {
10659
+ "const": "tracked"
10660
+ }
10661
+ ]
10662
+ }
10663
+ },
10664
+ {
10665
+ "name": "out",
10666
+ "kind": "flag",
10667
+ "flag": "out",
10668
+ "type": "string"
10669
+ },
10670
+ {
10671
+ "name": "force",
10672
+ "kind": "flag",
10673
+ "flag": "force",
10674
+ "type": "boolean"
10675
+ },
10676
+ {
10677
+ "name": "expectedRevision",
10678
+ "kind": "flag",
10679
+ "flag": "expected-revision",
10680
+ "type": "number"
10681
+ }
10682
+ ],
10683
+ "constraints": {
10684
+ "requiresOneOf": [
10685
+ [
10686
+ "input",
10687
+ "target"
10688
+ ]
10689
+ ],
10690
+ "requiredWhen": [
10691
+ {
10692
+ "param": "position",
10693
+ "whenParam": "target",
10694
+ "present": true
10695
+ }
10696
+ ]
10697
+ },
10698
+ "response": {
10699
+ "type": "object",
10700
+ "properties": {
10701
+ "document": {
10702
+ "type": "object",
10703
+ "properties": {
10704
+ "path": {
10705
+ "type": "string"
10706
+ },
10707
+ "source": {
10708
+ "type": "string"
10709
+ },
10710
+ "byteLength": {
10711
+ "type": "number"
10712
+ },
10713
+ "revision": {
10714
+ "type": "number"
10715
+ }
10716
+ },
10717
+ "required": [
10718
+ "source",
10719
+ "byteLength",
10720
+ "revision"
10721
+ ]
10722
+ },
10723
+ "input": {
10724
+ "type": "object",
10725
+ "properties": {
10726
+ "target": {
10727
+ "type": "object",
10728
+ "properties": {
10729
+ "kind": {
10730
+ "const": "block"
10731
+ },
10732
+ "nodeType": {
10733
+ "const": "listItem"
10734
+ },
10735
+ "nodeId": {
10736
+ "type": "string"
10737
+ }
10738
+ },
10739
+ "required": [
10740
+ "kind",
10741
+ "nodeType",
10742
+ "nodeId"
10743
+ ]
10744
+ },
10745
+ "position": {
10746
+ "oneOf": [
10747
+ {
10748
+ "const": "before"
10749
+ },
10750
+ {
10751
+ "const": "after"
10752
+ }
10753
+ ]
10754
+ },
10755
+ "text": {
10756
+ "type": "string"
10757
+ }
10758
+ },
10759
+ "required": [
10760
+ "target",
10761
+ "position"
10762
+ ]
10763
+ },
10764
+ "changeMode": {
10765
+ "oneOf": [
10766
+ {
10767
+ "const": "direct"
10768
+ },
10769
+ {
10770
+ "const": "tracked"
10771
+ }
10772
+ ]
10773
+ },
10774
+ "result": {
10775
+ "type": "object",
10776
+ "properties": {
10777
+ "success": {
10778
+ "type": "boolean"
10779
+ },
10780
+ "item": {
10781
+ "type": "object",
10782
+ "properties": {
10783
+ "kind": {
10784
+ "const": "block"
10785
+ },
10786
+ "nodeType": {
10787
+ "const": "listItem"
10788
+ },
10789
+ "nodeId": {
10790
+ "type": "string"
10791
+ }
10792
+ },
10793
+ "required": [
10794
+ "kind",
10795
+ "nodeType",
10796
+ "nodeId"
10797
+ ]
10798
+ },
10799
+ "insertionPoint": {
10800
+ "type": "object",
10801
+ "properties": {
10802
+ "kind": {
10803
+ "const": "text"
10804
+ },
10805
+ "blockId": {
10806
+ "type": "string"
10807
+ },
10808
+ "range": {
10809
+ "type": "object",
10810
+ "properties": {
10811
+ "start": {
10812
+ "type": "number"
10813
+ },
10814
+ "end": {
10815
+ "type": "number"
10816
+ }
10817
+ },
10818
+ "required": [
10819
+ "start",
10820
+ "end"
10821
+ ]
10822
+ }
10823
+ },
10824
+ "required": [
10825
+ "kind",
10826
+ "blockId",
10827
+ "range"
10828
+ ]
10829
+ },
10830
+ "trackedChangeRefs": {
10831
+ "type": "array",
10832
+ "items": {
10833
+ "type": "object",
10834
+ "properties": {
10835
+ "kind": {
10836
+ "type": "string"
10837
+ },
10838
+ "entityType": {
10839
+ "type": "string"
10840
+ },
10841
+ "entityId": {
10842
+ "type": "string"
10843
+ }
10844
+ },
10845
+ "required": [
10846
+ "kind",
10847
+ "entityType",
10848
+ "entityId"
10849
+ ]
10850
+ }
10851
+ },
10852
+ "failure": {
10853
+ "type": "object",
10854
+ "properties": {
10855
+ "code": {
10856
+ "type": "string"
10857
+ },
10858
+ "message": {
10859
+ "type": "string"
10860
+ },
10861
+ "details": {
10862
+ "type": "json"
10863
+ }
10864
+ },
10865
+ "required": [
10866
+ "code",
10867
+ "message"
10868
+ ]
10869
+ }
10870
+ },
10871
+ "required": [
10872
+ "success"
10873
+ ]
10874
+ },
10875
+ "context": {
10876
+ "type": "object",
10877
+ "properties": {
10878
+ "dirty": {
10879
+ "type": "boolean"
10880
+ },
10881
+ "revision": {
10882
+ "type": "number"
10883
+ }
10884
+ },
10885
+ "required": [
10886
+ "dirty",
10887
+ "revision"
10888
+ ]
10889
+ },
10890
+ "output": {
10891
+ "type": "object",
10892
+ "properties": {
10893
+ "path": {
10894
+ "type": "string"
10895
+ },
10896
+ "byteLength": {
10897
+ "type": "number"
10898
+ }
10899
+ },
10900
+ "required": [
10901
+ "path",
10902
+ "byteLength"
10903
+ ]
10904
+ }
10905
+ },
10906
+ "required": [
10907
+ "document",
10908
+ "input",
10909
+ "changeMode",
10910
+ "result"
10911
+ ]
10912
+ },
10913
+ "errors": [
10914
+ "TARGET_NOT_FOUND",
10915
+ "TRACK_CHANGE_COMMAND_UNAVAILABLE",
10916
+ "REVISION_MISMATCH",
10917
+ "NO_ACTIVE_DOCUMENT",
10918
+ "COLLABORATION_SYNC_TIMEOUT"
10919
+ ],
10920
+ "category": "misc",
10921
+ "stability": "alpha",
10922
+ "capabilities": [
10923
+ "optimistic-concurrency",
10924
+ "output-path",
10925
+ "session-targeting",
10926
+ "stateless-doc",
10927
+ "tracked-change-mode"
10928
+ ],
10929
+ "aliases": [],
10930
+ "examples": [
10931
+ "superdoc lists insert"
10932
+ ]
10933
+ },
10934
+ {
10935
+ "id": "doc.lists.setType",
10936
+ "command": [
10937
+ "lists",
10938
+ "set-type"
10939
+ ],
10940
+ "description": "Set a list item to ordered or bullet list style deterministically.",
10941
+ "mutates": true,
10942
+ "requiresOpenContext": false,
10943
+ "params": [
10944
+ {
10945
+ "name": "doc",
10946
+ "kind": "doc",
10947
+ "type": "string"
10948
+ },
10949
+ {
10950
+ "name": "sessionId",
10951
+ "kind": "flag",
10952
+ "flag": "session",
10953
+ "type": "string"
10954
+ },
10955
+ {
10956
+ "name": "input",
10957
+ "kind": "jsonFlag",
10958
+ "flag": "input-json",
10959
+ "type": "json",
10960
+ "schema": {
10961
+ "type": "object",
10962
+ "properties": {
10963
+ "target": {
10964
+ "type": "object",
10965
+ "properties": {
10966
+ "kind": {
10967
+ "const": "block"
10968
+ },
10969
+ "nodeType": {
10970
+ "const": "listItem"
10971
+ },
10972
+ "nodeId": {
10973
+ "type": "string"
10974
+ }
10975
+ },
10976
+ "required": [
10977
+ "kind",
10978
+ "nodeType",
10979
+ "nodeId"
10980
+ ]
10981
+ },
10982
+ "kind": {
10983
+ "oneOf": [
10984
+ {
10985
+ "const": "ordered"
10986
+ },
10987
+ {
10988
+ "const": "bullet"
10989
+ }
10990
+ ]
10991
+ }
10992
+ },
10993
+ "required": [
10994
+ "target",
10995
+ "kind"
10996
+ ]
10997
+ }
10998
+ },
10999
+ {
11000
+ "name": "target",
11001
+ "kind": "jsonFlag",
11002
+ "flag": "target-json",
11003
+ "type": "json",
11004
+ "schema": {
11005
+ "type": "object",
11006
+ "properties": {
11007
+ "kind": {
11008
+ "const": "block"
11009
+ },
11010
+ "nodeType": {
11011
+ "const": "listItem"
11012
+ },
11013
+ "nodeId": {
11014
+ "type": "string"
11015
+ }
11016
+ },
11017
+ "required": [
11018
+ "kind",
11019
+ "nodeType",
11020
+ "nodeId"
11021
+ ]
11022
+ }
11023
+ },
11024
+ {
11025
+ "name": "kind",
11026
+ "kind": "flag",
11027
+ "flag": "kind",
11028
+ "type": "string",
11029
+ "schema": {
11030
+ "oneOf": [
11031
+ {
11032
+ "const": "ordered"
11033
+ },
11034
+ {
11035
+ "const": "bullet"
11036
+ }
11037
+ ]
11038
+ }
11039
+ },
11040
+ {
11041
+ "name": "changeMode",
11042
+ "kind": "flag",
11043
+ "flag": "change-mode",
11044
+ "type": "string",
11045
+ "schema": {
11046
+ "oneOf": [
11047
+ {
11048
+ "const": "direct"
11049
+ },
11050
+ {
11051
+ "const": "tracked"
11052
+ }
11053
+ ]
11054
+ }
11055
+ },
11056
+ {
11057
+ "name": "out",
11058
+ "kind": "flag",
11059
+ "flag": "out",
11060
+ "type": "string"
11061
+ },
11062
+ {
11063
+ "name": "force",
11064
+ "kind": "flag",
11065
+ "flag": "force",
11066
+ "type": "boolean"
11067
+ },
11068
+ {
11069
+ "name": "expectedRevision",
11070
+ "kind": "flag",
11071
+ "flag": "expected-revision",
11072
+ "type": "number"
11073
+ }
11074
+ ],
11075
+ "constraints": {
11076
+ "requiresOneOf": [
11077
+ [
11078
+ "input",
11079
+ "target"
11080
+ ]
11081
+ ],
11082
+ "requiredWhen": [
11083
+ {
11084
+ "param": "kind",
11085
+ "whenParam": "target",
11086
+ "present": true
11087
+ }
11088
+ ]
11089
+ },
11090
+ "response": {
11091
+ "type": "object",
11092
+ "properties": {
11093
+ "document": {
11094
+ "type": "object",
11095
+ "properties": {
11096
+ "path": {
11097
+ "type": "string"
11098
+ },
11099
+ "source": {
11100
+ "type": "string"
11101
+ },
11102
+ "byteLength": {
11103
+ "type": "number"
11104
+ },
11105
+ "revision": {
11106
+ "type": "number"
11107
+ }
11108
+ },
11109
+ "required": [
11110
+ "source",
11111
+ "byteLength",
11112
+ "revision"
11113
+ ]
11114
+ },
11115
+ "input": {
11116
+ "type": "object",
11117
+ "properties": {
11118
+ "target": {
11119
+ "type": "object",
11120
+ "properties": {
11121
+ "kind": {
11122
+ "const": "block"
11123
+ },
11124
+ "nodeType": {
11125
+ "const": "listItem"
11126
+ },
11127
+ "nodeId": {
11128
+ "type": "string"
11129
+ }
11130
+ },
11131
+ "required": [
11132
+ "kind",
11133
+ "nodeType",
11134
+ "nodeId"
11135
+ ]
11136
+ },
11137
+ "kind": {
11138
+ "oneOf": [
11139
+ {
11140
+ "const": "ordered"
11141
+ },
11142
+ {
11143
+ "const": "bullet"
11144
+ }
11145
+ ]
11146
+ }
11147
+ },
11148
+ "required": [
11149
+ "target",
11150
+ "kind"
11151
+ ]
11152
+ },
11153
+ "changeMode": {
11154
+ "oneOf": [
11155
+ {
11156
+ "const": "direct"
11157
+ },
11158
+ {
11159
+ "const": "tracked"
11160
+ }
11161
+ ]
11162
+ },
11163
+ "result": {
11164
+ "type": "object",
11165
+ "properties": {
11166
+ "success": {
11167
+ "type": "boolean"
11168
+ },
11169
+ "item": {
11170
+ "type": "object",
11171
+ "properties": {
11172
+ "kind": {
11173
+ "const": "block"
11174
+ },
11175
+ "nodeType": {
11176
+ "const": "listItem"
11177
+ },
11178
+ "nodeId": {
11179
+ "type": "string"
11180
+ }
11181
+ },
11182
+ "required": [
11183
+ "kind",
11184
+ "nodeType",
11185
+ "nodeId"
11186
+ ]
11187
+ },
11188
+ "failure": {
11189
+ "type": "object",
11190
+ "properties": {
11191
+ "code": {
11192
+ "type": "string"
11193
+ },
11194
+ "message": {
11195
+ "type": "string"
11196
+ },
11197
+ "details": {
11198
+ "type": "json"
11199
+ }
11200
+ },
11201
+ "required": [
11202
+ "code",
11203
+ "message"
11204
+ ]
11205
+ }
11206
+ },
11207
+ "required": [
11208
+ "success"
11209
+ ]
11210
+ },
11211
+ "context": {
11212
+ "type": "object",
11213
+ "properties": {
11214
+ "dirty": {
11215
+ "type": "boolean"
11216
+ },
11217
+ "revision": {
11218
+ "type": "number"
11219
+ }
11220
+ },
11221
+ "required": [
11222
+ "dirty",
11223
+ "revision"
11224
+ ]
11225
+ },
11226
+ "output": {
11227
+ "type": "object",
11228
+ "properties": {
11229
+ "path": {
11230
+ "type": "string"
11231
+ },
11232
+ "byteLength": {
11233
+ "type": "number"
11234
+ }
11235
+ },
11236
+ "required": [
11237
+ "path",
11238
+ "byteLength"
11239
+ ]
11240
+ }
11241
+ },
11242
+ "required": [
11243
+ "document",
11244
+ "input",
11245
+ "changeMode",
11246
+ "result"
11247
+ ]
11248
+ },
11249
+ "errors": [
11250
+ "TARGET_NOT_FOUND",
11251
+ "TRACK_CHANGE_COMMAND_UNAVAILABLE",
11252
+ "REVISION_MISMATCH",
11253
+ "NO_ACTIVE_DOCUMENT",
11254
+ "COLLABORATION_SYNC_TIMEOUT"
11255
+ ],
11256
+ "category": "misc",
11257
+ "stability": "alpha",
11258
+ "capabilities": [
11259
+ "optimistic-concurrency",
11260
+ "output-path",
11261
+ "session-targeting",
11262
+ "stateless-doc",
11263
+ "tracked-change-mode"
11264
+ ],
11265
+ "aliases": [],
11266
+ "examples": [
11267
+ "superdoc lists set-type"
11268
+ ]
11269
+ },
11270
+ {
11271
+ "id": "doc.lists.indent",
11272
+ "command": [
11273
+ "lists",
11274
+ "indent"
11275
+ ],
11276
+ "description": "Indent a list item by one level.",
11277
+ "mutates": true,
11278
+ "requiresOpenContext": false,
11279
+ "params": [
11280
+ {
11281
+ "name": "doc",
11282
+ "kind": "doc",
11283
+ "type": "string"
11284
+ },
11285
+ {
11286
+ "name": "sessionId",
11287
+ "kind": "flag",
11288
+ "flag": "session",
11289
+ "type": "string"
11290
+ },
11291
+ {
11292
+ "name": "input",
11293
+ "kind": "jsonFlag",
11294
+ "flag": "input-json",
11295
+ "type": "json",
11296
+ "schema": {
11297
+ "type": "object",
11298
+ "properties": {
11299
+ "target": {
11300
+ "type": "object",
11301
+ "properties": {
11302
+ "kind": {
11303
+ "const": "block"
11304
+ },
11305
+ "nodeType": {
11306
+ "const": "listItem"
11307
+ },
11308
+ "nodeId": {
11309
+ "type": "string"
11310
+ }
11311
+ },
11312
+ "required": [
11313
+ "kind",
11314
+ "nodeType",
11315
+ "nodeId"
11316
+ ]
11317
+ }
11318
+ },
11319
+ "required": [
11320
+ "target"
11321
+ ]
11322
+ }
11323
+ },
11324
+ {
11325
+ "name": "target",
11326
+ "kind": "jsonFlag",
11327
+ "flag": "target-json",
11328
+ "type": "json",
11329
+ "schema": {
11330
+ "type": "object",
11331
+ "properties": {
11332
+ "kind": {
11333
+ "const": "block"
11334
+ },
11335
+ "nodeType": {
11336
+ "const": "listItem"
11337
+ },
11338
+ "nodeId": {
11339
+ "type": "string"
11340
+ }
11341
+ },
11342
+ "required": [
11343
+ "kind",
11344
+ "nodeType",
11345
+ "nodeId"
11346
+ ]
11347
+ }
11348
+ },
11349
+ {
11350
+ "name": "changeMode",
11351
+ "kind": "flag",
11352
+ "flag": "change-mode",
11353
+ "type": "string",
11354
+ "schema": {
11355
+ "oneOf": [
11356
+ {
11357
+ "const": "direct"
11358
+ },
11359
+ {
11360
+ "const": "tracked"
11361
+ }
11362
+ ]
11363
+ }
11364
+ },
11365
+ {
11366
+ "name": "out",
11367
+ "kind": "flag",
11368
+ "flag": "out",
11369
+ "type": "string"
11370
+ },
11371
+ {
11372
+ "name": "force",
11373
+ "kind": "flag",
11374
+ "flag": "force",
11375
+ "type": "boolean"
11376
+ },
11377
+ {
11378
+ "name": "expectedRevision",
11379
+ "kind": "flag",
11380
+ "flag": "expected-revision",
11381
+ "type": "number"
11382
+ }
11383
+ ],
11384
+ "constraints": {
11385
+ "requiresOneOf": [
11386
+ [
11387
+ "input",
11388
+ "target"
11389
+ ]
11390
+ ]
11391
+ },
11392
+ "response": {
11393
+ "type": "object",
11394
+ "properties": {
11395
+ "document": {
11396
+ "type": "object",
11397
+ "properties": {
11398
+ "path": {
11399
+ "type": "string"
11400
+ },
11401
+ "source": {
11402
+ "type": "string"
11403
+ },
11404
+ "byteLength": {
11405
+ "type": "number"
11406
+ },
11407
+ "revision": {
11408
+ "type": "number"
11409
+ }
11410
+ },
11411
+ "required": [
11412
+ "source",
11413
+ "byteLength",
11414
+ "revision"
11415
+ ]
11416
+ },
11417
+ "input": {
11418
+ "type": "object",
11419
+ "properties": {
11420
+ "target": {
11421
+ "type": "object",
11422
+ "properties": {
11423
+ "kind": {
11424
+ "const": "block"
11425
+ },
11426
+ "nodeType": {
11427
+ "const": "listItem"
11428
+ },
11429
+ "nodeId": {
11430
+ "type": "string"
11431
+ }
11432
+ },
11433
+ "required": [
11434
+ "kind",
11435
+ "nodeType",
11436
+ "nodeId"
11437
+ ]
11438
+ }
11439
+ },
11440
+ "required": [
11441
+ "target"
11442
+ ]
11443
+ },
11444
+ "changeMode": {
11445
+ "oneOf": [
11446
+ {
11447
+ "const": "direct"
11448
+ },
11449
+ {
11450
+ "const": "tracked"
11451
+ }
11452
+ ]
11453
+ },
11454
+ "result": {
11455
+ "type": "object",
11456
+ "properties": {
11457
+ "success": {
11458
+ "type": "boolean"
11459
+ },
11460
+ "item": {
11461
+ "type": "object",
11462
+ "properties": {
11463
+ "kind": {
11464
+ "const": "block"
11465
+ },
11466
+ "nodeType": {
11467
+ "const": "listItem"
11468
+ },
11469
+ "nodeId": {
11470
+ "type": "string"
11471
+ }
11472
+ },
11473
+ "required": [
11474
+ "kind",
11475
+ "nodeType",
11476
+ "nodeId"
11477
+ ]
11478
+ },
11479
+ "failure": {
11480
+ "type": "object",
11481
+ "properties": {
11482
+ "code": {
11483
+ "type": "string"
11484
+ },
11485
+ "message": {
11486
+ "type": "string"
11487
+ },
11488
+ "details": {
11489
+ "type": "json"
11490
+ }
11491
+ },
11492
+ "required": [
11493
+ "code",
11494
+ "message"
11495
+ ]
11496
+ }
11497
+ },
11498
+ "required": [
11499
+ "success"
11500
+ ]
11501
+ },
11502
+ "context": {
11503
+ "type": "object",
11504
+ "properties": {
11505
+ "dirty": {
11506
+ "type": "boolean"
11507
+ },
11508
+ "revision": {
11509
+ "type": "number"
11510
+ }
11511
+ },
11512
+ "required": [
11513
+ "dirty",
11514
+ "revision"
11515
+ ]
11516
+ },
11517
+ "output": {
11518
+ "type": "object",
11519
+ "properties": {
11520
+ "path": {
11521
+ "type": "string"
11522
+ },
11523
+ "byteLength": {
11524
+ "type": "number"
11525
+ }
11526
+ },
11527
+ "required": [
11528
+ "path",
11529
+ "byteLength"
11530
+ ]
11531
+ }
11532
+ },
11533
+ "required": [
11534
+ "document",
11535
+ "input",
11536
+ "changeMode",
11537
+ "result"
11538
+ ]
11539
+ },
11540
+ "errors": [
11541
+ "TARGET_NOT_FOUND",
11542
+ "TRACK_CHANGE_COMMAND_UNAVAILABLE",
11543
+ "REVISION_MISMATCH",
11544
+ "NO_ACTIVE_DOCUMENT",
11545
+ "COLLABORATION_SYNC_TIMEOUT"
11546
+ ],
11547
+ "category": "misc",
11548
+ "stability": "alpha",
11549
+ "capabilities": [
11550
+ "optimistic-concurrency",
11551
+ "output-path",
11552
+ "session-targeting",
11553
+ "stateless-doc",
11554
+ "tracked-change-mode"
11555
+ ],
11556
+ "aliases": [],
11557
+ "examples": [
11558
+ "superdoc lists indent"
11559
+ ]
11560
+ },
11561
+ {
11562
+ "id": "doc.lists.outdent",
11563
+ "command": [
11564
+ "lists",
11565
+ "outdent"
11566
+ ],
11567
+ "description": "Outdent a list item by one level.",
11568
+ "mutates": true,
11569
+ "requiresOpenContext": false,
11570
+ "params": [
11571
+ {
11572
+ "name": "doc",
11573
+ "kind": "doc",
11574
+ "type": "string"
11575
+ },
11576
+ {
11577
+ "name": "sessionId",
11578
+ "kind": "flag",
11579
+ "flag": "session",
11580
+ "type": "string"
11581
+ },
11582
+ {
11583
+ "name": "input",
11584
+ "kind": "jsonFlag",
11585
+ "flag": "input-json",
11586
+ "type": "json",
11587
+ "schema": {
11588
+ "type": "object",
11589
+ "properties": {
11590
+ "target": {
11591
+ "type": "object",
11592
+ "properties": {
11593
+ "kind": {
11594
+ "const": "block"
11595
+ },
11596
+ "nodeType": {
11597
+ "const": "listItem"
11598
+ },
11599
+ "nodeId": {
11600
+ "type": "string"
11601
+ }
11602
+ },
11603
+ "required": [
11604
+ "kind",
11605
+ "nodeType",
11606
+ "nodeId"
11607
+ ]
11608
+ }
11609
+ },
11610
+ "required": [
11611
+ "target"
11612
+ ]
11613
+ }
11614
+ },
11615
+ {
11616
+ "name": "target",
11617
+ "kind": "jsonFlag",
11618
+ "flag": "target-json",
11619
+ "type": "json",
11620
+ "schema": {
11621
+ "type": "object",
11622
+ "properties": {
11623
+ "kind": {
11624
+ "const": "block"
11625
+ },
11626
+ "nodeType": {
11627
+ "const": "listItem"
11628
+ },
11629
+ "nodeId": {
11630
+ "type": "string"
11631
+ }
11632
+ },
11633
+ "required": [
11634
+ "kind",
11635
+ "nodeType",
11636
+ "nodeId"
11637
+ ]
11638
+ }
11639
+ },
11640
+ {
11641
+ "name": "changeMode",
11642
+ "kind": "flag",
11643
+ "flag": "change-mode",
11644
+ "type": "string",
11645
+ "schema": {
11646
+ "oneOf": [
11647
+ {
11648
+ "const": "direct"
11649
+ },
11650
+ {
11651
+ "const": "tracked"
11652
+ }
11653
+ ]
11654
+ }
11655
+ },
11656
+ {
11657
+ "name": "out",
11658
+ "kind": "flag",
11659
+ "flag": "out",
11660
+ "type": "string"
11661
+ },
11662
+ {
11663
+ "name": "force",
11664
+ "kind": "flag",
11665
+ "flag": "force",
11666
+ "type": "boolean"
11667
+ },
11668
+ {
11669
+ "name": "expectedRevision",
11670
+ "kind": "flag",
11671
+ "flag": "expected-revision",
11672
+ "type": "number"
11673
+ }
11674
+ ],
11675
+ "constraints": {
11676
+ "requiresOneOf": [
11677
+ [
11678
+ "input",
11679
+ "target"
11680
+ ]
11681
+ ]
11682
+ },
11683
+ "response": {
11684
+ "type": "object",
11685
+ "properties": {
11686
+ "document": {
11687
+ "type": "object",
11688
+ "properties": {
11689
+ "path": {
11690
+ "type": "string"
11691
+ },
11692
+ "source": {
11693
+ "type": "string"
11694
+ },
11695
+ "byteLength": {
11696
+ "type": "number"
11697
+ },
11698
+ "revision": {
11699
+ "type": "number"
11700
+ }
11701
+ },
11702
+ "required": [
11703
+ "source",
11704
+ "byteLength",
11705
+ "revision"
11706
+ ]
11707
+ },
11708
+ "input": {
11709
+ "type": "object",
11710
+ "properties": {
11711
+ "target": {
11712
+ "type": "object",
11713
+ "properties": {
11714
+ "kind": {
11715
+ "const": "block"
11716
+ },
11717
+ "nodeType": {
11718
+ "const": "listItem"
11719
+ },
11720
+ "nodeId": {
11721
+ "type": "string"
11722
+ }
11723
+ },
11724
+ "required": [
11725
+ "kind",
11726
+ "nodeType",
11727
+ "nodeId"
11728
+ ]
11729
+ }
11730
+ },
11731
+ "required": [
11732
+ "target"
11733
+ ]
11734
+ },
11735
+ "changeMode": {
11736
+ "oneOf": [
11737
+ {
11738
+ "const": "direct"
11739
+ },
11740
+ {
11741
+ "const": "tracked"
11742
+ }
11743
+ ]
11744
+ },
11745
+ "result": {
11746
+ "type": "object",
11747
+ "properties": {
11748
+ "success": {
11749
+ "type": "boolean"
11750
+ },
11751
+ "item": {
11752
+ "type": "object",
11753
+ "properties": {
11754
+ "kind": {
11755
+ "const": "block"
11756
+ },
11757
+ "nodeType": {
11758
+ "const": "listItem"
11759
+ },
11760
+ "nodeId": {
11761
+ "type": "string"
11762
+ }
11763
+ },
11764
+ "required": [
11765
+ "kind",
11766
+ "nodeType",
11767
+ "nodeId"
11768
+ ]
11769
+ },
11770
+ "failure": {
11771
+ "type": "object",
11772
+ "properties": {
11773
+ "code": {
11774
+ "type": "string"
11775
+ },
11776
+ "message": {
11777
+ "type": "string"
11778
+ },
11779
+ "details": {
11780
+ "type": "json"
11781
+ }
11782
+ },
11783
+ "required": [
11784
+ "code",
11785
+ "message"
11786
+ ]
11787
+ }
11788
+ },
11789
+ "required": [
11790
+ "success"
11791
+ ]
11792
+ },
11793
+ "context": {
11794
+ "type": "object",
11795
+ "properties": {
11796
+ "dirty": {
11797
+ "type": "boolean"
11798
+ },
11799
+ "revision": {
11800
+ "type": "number"
11801
+ }
11802
+ },
11803
+ "required": [
11804
+ "dirty",
11805
+ "revision"
11806
+ ]
11807
+ },
11808
+ "output": {
11809
+ "type": "object",
11810
+ "properties": {
11811
+ "path": {
11812
+ "type": "string"
11813
+ },
11814
+ "byteLength": {
11815
+ "type": "number"
11816
+ }
11817
+ },
11818
+ "required": [
11819
+ "path",
11820
+ "byteLength"
11821
+ ]
11822
+ }
11823
+ },
11824
+ "required": [
11825
+ "document",
11826
+ "input",
11827
+ "changeMode",
11828
+ "result"
11829
+ ]
11830
+ },
11831
+ "errors": [
11832
+ "TARGET_NOT_FOUND",
11833
+ "TRACK_CHANGE_COMMAND_UNAVAILABLE",
11834
+ "REVISION_MISMATCH",
11835
+ "NO_ACTIVE_DOCUMENT",
11836
+ "COLLABORATION_SYNC_TIMEOUT"
11837
+ ],
11838
+ "category": "misc",
11839
+ "stability": "alpha",
11840
+ "capabilities": [
11841
+ "optimistic-concurrency",
11842
+ "output-path",
11843
+ "session-targeting",
11844
+ "stateless-doc",
11845
+ "tracked-change-mode"
11846
+ ],
11847
+ "aliases": [],
11848
+ "examples": [
11849
+ "superdoc lists outdent"
11850
+ ]
11851
+ },
11852
+ {
11853
+ "id": "doc.lists.restart",
11854
+ "command": [
11855
+ "lists",
11856
+ "restart"
11857
+ ],
11858
+ "description": "Restart numbering at a target list item.",
11859
+ "mutates": true,
11860
+ "requiresOpenContext": false,
11861
+ "params": [
11862
+ {
11863
+ "name": "doc",
11864
+ "kind": "doc",
11865
+ "type": "string"
11866
+ },
11867
+ {
11868
+ "name": "sessionId",
11869
+ "kind": "flag",
11870
+ "flag": "session",
11871
+ "type": "string"
11872
+ },
11873
+ {
11874
+ "name": "input",
11875
+ "kind": "jsonFlag",
11876
+ "flag": "input-json",
11877
+ "type": "json",
11878
+ "schema": {
11879
+ "type": "object",
11880
+ "properties": {
11881
+ "target": {
11882
+ "type": "object",
11883
+ "properties": {
11884
+ "kind": {
11885
+ "const": "block"
11886
+ },
11887
+ "nodeType": {
11888
+ "const": "listItem"
11889
+ },
11890
+ "nodeId": {
11891
+ "type": "string"
11892
+ }
11893
+ },
11894
+ "required": [
11895
+ "kind",
11896
+ "nodeType",
11897
+ "nodeId"
11898
+ ]
11899
+ }
11900
+ },
11901
+ "required": [
11902
+ "target"
11903
+ ]
11904
+ }
11905
+ },
11906
+ {
11907
+ "name": "target",
11908
+ "kind": "jsonFlag",
11909
+ "flag": "target-json",
11910
+ "type": "json",
11911
+ "schema": {
11912
+ "type": "object",
11913
+ "properties": {
11914
+ "kind": {
11915
+ "const": "block"
11916
+ },
11917
+ "nodeType": {
11918
+ "const": "listItem"
11919
+ },
11920
+ "nodeId": {
11921
+ "type": "string"
11922
+ }
11923
+ },
11924
+ "required": [
11925
+ "kind",
11926
+ "nodeType",
11927
+ "nodeId"
11928
+ ]
11929
+ }
11930
+ },
11931
+ {
11932
+ "name": "changeMode",
11933
+ "kind": "flag",
11934
+ "flag": "change-mode",
11935
+ "type": "string",
11936
+ "schema": {
11937
+ "oneOf": [
11938
+ {
11939
+ "const": "direct"
11940
+ },
11941
+ {
11942
+ "const": "tracked"
11943
+ }
11944
+ ]
11945
+ }
11946
+ },
11947
+ {
11948
+ "name": "out",
11949
+ "kind": "flag",
11950
+ "flag": "out",
11951
+ "type": "string"
11952
+ },
11953
+ {
11954
+ "name": "force",
11955
+ "kind": "flag",
11956
+ "flag": "force",
11957
+ "type": "boolean"
11958
+ },
11959
+ {
11960
+ "name": "expectedRevision",
11961
+ "kind": "flag",
11962
+ "flag": "expected-revision",
11963
+ "type": "number"
11964
+ }
11965
+ ],
11966
+ "constraints": {
11967
+ "requiresOneOf": [
11968
+ [
11969
+ "input",
11970
+ "target"
11971
+ ]
11972
+ ]
11973
+ },
11974
+ "response": {
11975
+ "type": "object",
11976
+ "properties": {
11977
+ "document": {
11978
+ "type": "object",
11979
+ "properties": {
11980
+ "path": {
11981
+ "type": "string"
11982
+ },
11983
+ "source": {
11984
+ "type": "string"
11985
+ },
11986
+ "byteLength": {
11987
+ "type": "number"
11988
+ },
11989
+ "revision": {
11990
+ "type": "number"
11991
+ }
11992
+ },
11993
+ "required": [
11994
+ "source",
11995
+ "byteLength",
11996
+ "revision"
11997
+ ]
11998
+ },
11999
+ "input": {
12000
+ "type": "object",
12001
+ "properties": {
12002
+ "target": {
12003
+ "type": "object",
12004
+ "properties": {
12005
+ "kind": {
12006
+ "const": "block"
12007
+ },
12008
+ "nodeType": {
12009
+ "const": "listItem"
12010
+ },
12011
+ "nodeId": {
12012
+ "type": "string"
12013
+ }
12014
+ },
12015
+ "required": [
12016
+ "kind",
12017
+ "nodeType",
12018
+ "nodeId"
12019
+ ]
12020
+ }
12021
+ },
12022
+ "required": [
12023
+ "target"
12024
+ ]
12025
+ },
12026
+ "changeMode": {
12027
+ "oneOf": [
12028
+ {
12029
+ "const": "direct"
12030
+ },
12031
+ {
12032
+ "const": "tracked"
12033
+ }
12034
+ ]
12035
+ },
12036
+ "result": {
12037
+ "type": "object",
12038
+ "properties": {
12039
+ "success": {
12040
+ "type": "boolean"
12041
+ },
12042
+ "item": {
12043
+ "type": "object",
12044
+ "properties": {
12045
+ "kind": {
12046
+ "const": "block"
12047
+ },
12048
+ "nodeType": {
12049
+ "const": "listItem"
12050
+ },
12051
+ "nodeId": {
12052
+ "type": "string"
12053
+ }
12054
+ },
12055
+ "required": [
12056
+ "kind",
12057
+ "nodeType",
12058
+ "nodeId"
12059
+ ]
12060
+ },
12061
+ "failure": {
12062
+ "type": "object",
12063
+ "properties": {
12064
+ "code": {
12065
+ "type": "string"
12066
+ },
12067
+ "message": {
12068
+ "type": "string"
12069
+ },
12070
+ "details": {
12071
+ "type": "json"
12072
+ }
12073
+ },
12074
+ "required": [
12075
+ "code",
12076
+ "message"
12077
+ ]
12078
+ }
12079
+ },
12080
+ "required": [
12081
+ "success"
12082
+ ]
12083
+ },
12084
+ "context": {
12085
+ "type": "object",
12086
+ "properties": {
12087
+ "dirty": {
12088
+ "type": "boolean"
12089
+ },
12090
+ "revision": {
12091
+ "type": "number"
12092
+ }
12093
+ },
12094
+ "required": [
12095
+ "dirty",
12096
+ "revision"
12097
+ ]
12098
+ },
12099
+ "output": {
12100
+ "type": "object",
12101
+ "properties": {
12102
+ "path": {
12103
+ "type": "string"
12104
+ },
12105
+ "byteLength": {
12106
+ "type": "number"
12107
+ }
12108
+ },
12109
+ "required": [
12110
+ "path",
12111
+ "byteLength"
12112
+ ]
12113
+ }
12114
+ },
12115
+ "required": [
12116
+ "document",
12117
+ "input",
12118
+ "changeMode",
12119
+ "result"
12120
+ ]
12121
+ },
12122
+ "errors": [
12123
+ "TARGET_NOT_FOUND",
12124
+ "TRACK_CHANGE_COMMAND_UNAVAILABLE",
12125
+ "REVISION_MISMATCH",
12126
+ "NO_ACTIVE_DOCUMENT",
12127
+ "COLLABORATION_SYNC_TIMEOUT"
12128
+ ],
12129
+ "category": "misc",
12130
+ "stability": "alpha",
12131
+ "capabilities": [
12132
+ "optimistic-concurrency",
12133
+ "output-path",
12134
+ "session-targeting",
12135
+ "stateless-doc",
12136
+ "tracked-change-mode"
12137
+ ],
12138
+ "aliases": [],
12139
+ "examples": [
12140
+ "superdoc lists restart"
12141
+ ]
12142
+ },
12143
+ {
12144
+ "id": "doc.lists.exit",
12145
+ "command": [
12146
+ "lists",
12147
+ "exit"
12148
+ ],
12149
+ "description": "Exit a list item to a plain paragraph.",
12150
+ "mutates": true,
12151
+ "requiresOpenContext": false,
12152
+ "params": [
12153
+ {
12154
+ "name": "doc",
12155
+ "kind": "doc",
12156
+ "type": "string"
12157
+ },
12158
+ {
12159
+ "name": "sessionId",
12160
+ "kind": "flag",
12161
+ "flag": "session",
12162
+ "type": "string"
12163
+ },
12164
+ {
12165
+ "name": "input",
12166
+ "kind": "jsonFlag",
12167
+ "flag": "input-json",
12168
+ "type": "json",
12169
+ "schema": {
12170
+ "type": "object",
12171
+ "properties": {
12172
+ "target": {
12173
+ "type": "object",
12174
+ "properties": {
12175
+ "kind": {
12176
+ "const": "block"
12177
+ },
12178
+ "nodeType": {
12179
+ "const": "listItem"
12180
+ },
12181
+ "nodeId": {
12182
+ "type": "string"
12183
+ }
12184
+ },
12185
+ "required": [
12186
+ "kind",
12187
+ "nodeType",
12188
+ "nodeId"
12189
+ ]
12190
+ }
12191
+ },
12192
+ "required": [
12193
+ "target"
12194
+ ]
12195
+ }
12196
+ },
12197
+ {
12198
+ "name": "target",
12199
+ "kind": "jsonFlag",
12200
+ "flag": "target-json",
12201
+ "type": "json",
12202
+ "schema": {
12203
+ "type": "object",
12204
+ "properties": {
12205
+ "kind": {
12206
+ "const": "block"
12207
+ },
12208
+ "nodeType": {
12209
+ "const": "listItem"
12210
+ },
12211
+ "nodeId": {
12212
+ "type": "string"
12213
+ }
12214
+ },
12215
+ "required": [
12216
+ "kind",
12217
+ "nodeType",
12218
+ "nodeId"
12219
+ ]
12220
+ }
12221
+ },
12222
+ {
12223
+ "name": "changeMode",
12224
+ "kind": "flag",
12225
+ "flag": "change-mode",
12226
+ "type": "string",
12227
+ "schema": {
12228
+ "oneOf": [
12229
+ {
12230
+ "const": "direct"
12231
+ },
12232
+ {
12233
+ "const": "tracked"
12234
+ }
12235
+ ]
12236
+ }
12237
+ },
12238
+ {
12239
+ "name": "out",
12240
+ "kind": "flag",
12241
+ "flag": "out",
12242
+ "type": "string"
12243
+ },
12244
+ {
12245
+ "name": "force",
12246
+ "kind": "flag",
12247
+ "flag": "force",
12248
+ "type": "boolean"
12249
+ },
12250
+ {
12251
+ "name": "expectedRevision",
12252
+ "kind": "flag",
12253
+ "flag": "expected-revision",
12254
+ "type": "number"
12255
+ }
12256
+ ],
12257
+ "constraints": {
12258
+ "requiresOneOf": [
12259
+ [
12260
+ "input",
12261
+ "target"
12262
+ ]
12263
+ ]
12264
+ },
12265
+ "response": {
12266
+ "type": "object",
12267
+ "properties": {
12268
+ "document": {
12269
+ "type": "object",
12270
+ "properties": {
12271
+ "path": {
12272
+ "type": "string"
12273
+ },
12274
+ "source": {
12275
+ "type": "string"
12276
+ },
12277
+ "byteLength": {
12278
+ "type": "number"
12279
+ },
12280
+ "revision": {
12281
+ "type": "number"
12282
+ }
12283
+ },
12284
+ "required": [
12285
+ "source",
12286
+ "byteLength",
12287
+ "revision"
12288
+ ]
12289
+ },
12290
+ "input": {
12291
+ "type": "object",
12292
+ "properties": {
12293
+ "target": {
12294
+ "type": "object",
12295
+ "properties": {
12296
+ "kind": {
12297
+ "const": "block"
12298
+ },
12299
+ "nodeType": {
12300
+ "const": "listItem"
12301
+ },
12302
+ "nodeId": {
12303
+ "type": "string"
12304
+ }
12305
+ },
12306
+ "required": [
12307
+ "kind",
12308
+ "nodeType",
12309
+ "nodeId"
12310
+ ]
12311
+ }
12312
+ },
12313
+ "required": [
12314
+ "target"
12315
+ ]
12316
+ },
12317
+ "changeMode": {
12318
+ "oneOf": [
12319
+ {
12320
+ "const": "direct"
12321
+ },
12322
+ {
12323
+ "const": "tracked"
12324
+ }
12325
+ ]
12326
+ },
12327
+ "result": {
12328
+ "type": "object",
12329
+ "properties": {
12330
+ "success": {
12331
+ "type": "boolean"
12332
+ },
12333
+ "paragraph": {
12334
+ "type": "object",
12335
+ "properties": {
12336
+ "kind": {
12337
+ "const": "block"
12338
+ },
12339
+ "nodeType": {
12340
+ "const": "paragraph"
12341
+ },
12342
+ "nodeId": {
12343
+ "type": "string"
12344
+ }
12345
+ },
12346
+ "required": [
12347
+ "kind",
12348
+ "nodeType",
12349
+ "nodeId"
12350
+ ]
12351
+ },
12352
+ "failure": {
12353
+ "type": "object",
12354
+ "properties": {
12355
+ "code": {
12356
+ "type": "string"
12357
+ },
12358
+ "message": {
12359
+ "type": "string"
12360
+ },
12361
+ "details": {
12362
+ "type": "json"
12363
+ }
12364
+ },
12365
+ "required": [
12366
+ "code",
12367
+ "message"
12368
+ ]
12369
+ }
12370
+ },
12371
+ "required": [
12372
+ "success"
12373
+ ]
12374
+ },
12375
+ "context": {
12376
+ "type": "object",
12377
+ "properties": {
12378
+ "dirty": {
12379
+ "type": "boolean"
12380
+ },
12381
+ "revision": {
12382
+ "type": "number"
12383
+ }
12384
+ },
12385
+ "required": [
12386
+ "dirty",
12387
+ "revision"
12388
+ ]
12389
+ },
12390
+ "output": {
12391
+ "type": "object",
12392
+ "properties": {
12393
+ "path": {
12394
+ "type": "string"
12395
+ },
12396
+ "byteLength": {
12397
+ "type": "number"
12398
+ }
12399
+ },
12400
+ "required": [
12401
+ "path",
12402
+ "byteLength"
12403
+ ]
12404
+ }
12405
+ },
12406
+ "required": [
12407
+ "document",
12408
+ "input",
12409
+ "changeMode",
12410
+ "result"
12411
+ ]
12412
+ },
12413
+ "errors": [
12414
+ "TARGET_NOT_FOUND",
12415
+ "TRACK_CHANGE_COMMAND_UNAVAILABLE",
12416
+ "REVISION_MISMATCH",
12417
+ "NO_ACTIVE_DOCUMENT",
12418
+ "COLLABORATION_SYNC_TIMEOUT"
12419
+ ],
12420
+ "category": "misc",
12421
+ "stability": "alpha",
12422
+ "capabilities": [
12423
+ "optimistic-concurrency",
12424
+ "output-path",
12425
+ "session-targeting",
12426
+ "stateless-doc",
12427
+ "tracked-change-mode"
12428
+ ],
12429
+ "aliases": [],
12430
+ "examples": [
12431
+ "superdoc lists exit"
12432
+ ]
12433
+ },
9878
12434
  {
9879
12435
  "id": "doc.insert",
9880
12436
  "command": [