@superdoc-dev/sdk 1.15.0-next.3 → 1.15.0-next.31

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.
@@ -258,7 +258,8 @@ export const CONTRACT = {
258
258
  "insert",
259
259
  "delete",
260
260
  "replacement",
261
- "format"
261
+ "format",
262
+ "structural"
262
263
  ]
263
264
  },
264
265
  "trackedChangeDisplayType": {
@@ -3442,7 +3443,8 @@ export const CONTRACT = {
3442
3443
  "insert",
3443
3444
  "delete",
3444
3445
  "replacement",
3445
- "format"
3446
+ "format",
3447
+ "structural"
3446
3448
  ],
3447
3449
  "description": "Entity-level type. In paired replacement mode, a delete+insert pair shares one entity with type 'replacement'; per-half type lives on block.textSpans[].trackedChanges[]."
3448
3450
  },
@@ -37650,6 +37652,886 @@ export const CONTRACT = {
37650
37652
  ]
37651
37653
  }
37652
37654
  },
37655
+ "doc.templates.apply": {
37656
+ "operationId": "doc.templates.apply",
37657
+ "sdkSurface": "document",
37658
+ "command": "templates apply",
37659
+ "commandTokens": [
37660
+ "templates",
37661
+ "apply"
37662
+ ],
37663
+ "category": "core",
37664
+ "description": "Apply detected DOCX template/substrate (styles, numbering, settings, theme, font table, web settings, headers/footers, section defaults) from a source package onto the current document, preserving body content. Scopes are auto-detected from source package evidence.",
37665
+ "requiresDocumentContext": true,
37666
+ "docRequirement": "optional",
37667
+ "responseEnvelopeKey": "receipt",
37668
+ "params": [
37669
+ {
37670
+ "name": "doc",
37671
+ "kind": "doc",
37672
+ "type": "string",
37673
+ "description": "Document path. Optional when a session is already open."
37674
+ },
37675
+ {
37676
+ "name": "sessionId",
37677
+ "kind": "flag",
37678
+ "type": "string",
37679
+ "flag": "session",
37680
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
37681
+ },
37682
+ {
37683
+ "name": "out",
37684
+ "kind": "flag",
37685
+ "type": "string",
37686
+ "agentVisible": false
37687
+ },
37688
+ {
37689
+ "name": "force",
37690
+ "kind": "flag",
37691
+ "type": "boolean",
37692
+ "description": "Bypass confirmation checks."
37693
+ },
37694
+ {
37695
+ "name": "expectedRevision",
37696
+ "kind": "flag",
37697
+ "type": "number",
37698
+ "flag": "expected-revision",
37699
+ "agentVisible": false
37700
+ },
37701
+ {
37702
+ "name": "changeMode",
37703
+ "kind": "flag",
37704
+ "type": "string",
37705
+ "flag": "change-mode",
37706
+ "schema": {
37707
+ "type": "string",
37708
+ "enum": [
37709
+ "direct",
37710
+ "tracked"
37711
+ ]
37712
+ },
37713
+ "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
37714
+ },
37715
+ {
37716
+ "name": "dryRun",
37717
+ "kind": "flag",
37718
+ "type": "boolean",
37719
+ "flag": "dry-run",
37720
+ "description": "Preview the result without applying changes."
37721
+ },
37722
+ {
37723
+ "name": "source",
37724
+ "kind": "jsonFlag",
37725
+ "type": "json",
37726
+ "flag": "source-json",
37727
+ "required": true,
37728
+ "schema": {
37729
+ "oneOf": [
37730
+ {
37731
+ "type": "object",
37732
+ "properties": {
37733
+ "kind": {
37734
+ "const": "path"
37735
+ },
37736
+ "path": {
37737
+ "type": "string"
37738
+ }
37739
+ },
37740
+ "required": [
37741
+ "kind",
37742
+ "path"
37743
+ ]
37744
+ },
37745
+ {
37746
+ "type": "object",
37747
+ "properties": {
37748
+ "kind": {
37749
+ "const": "base64"
37750
+ },
37751
+ "data": {
37752
+ "type": "string"
37753
+ },
37754
+ "filename": {
37755
+ "type": "string"
37756
+ }
37757
+ },
37758
+ "required": [
37759
+ "kind",
37760
+ "data"
37761
+ ]
37762
+ }
37763
+ ]
37764
+ }
37765
+ },
37766
+ {
37767
+ "name": "bodyPolicy",
37768
+ "kind": "jsonFlag",
37769
+ "type": "json",
37770
+ "flag": "body-policy-json",
37771
+ "schema": {
37772
+ "const": "preserve"
37773
+ }
37774
+ }
37775
+ ],
37776
+ "constraints": null,
37777
+ "mutates": true,
37778
+ "idempotency": "conditional",
37779
+ "supportsTrackedMode": false,
37780
+ "supportsDryRun": true,
37781
+ "inputSchema": {
37782
+ "type": "object",
37783
+ "properties": {
37784
+ "source": {
37785
+ "oneOf": [
37786
+ {
37787
+ "type": "object",
37788
+ "properties": {
37789
+ "kind": {
37790
+ "const": "path"
37791
+ },
37792
+ "path": {
37793
+ "type": "string"
37794
+ }
37795
+ },
37796
+ "additionalProperties": false,
37797
+ "required": [
37798
+ "kind",
37799
+ "path"
37800
+ ]
37801
+ },
37802
+ {
37803
+ "type": "object",
37804
+ "properties": {
37805
+ "kind": {
37806
+ "const": "base64"
37807
+ },
37808
+ "data": {
37809
+ "type": "string"
37810
+ },
37811
+ "filename": {
37812
+ "type": "string"
37813
+ }
37814
+ },
37815
+ "additionalProperties": false,
37816
+ "required": [
37817
+ "kind",
37818
+ "data"
37819
+ ]
37820
+ }
37821
+ ]
37822
+ },
37823
+ "bodyPolicy": {
37824
+ "const": "preserve"
37825
+ }
37826
+ },
37827
+ "additionalProperties": false,
37828
+ "required": [
37829
+ "source"
37830
+ ]
37831
+ },
37832
+ "outputSchema": {
37833
+ "oneOf": [
37834
+ {
37835
+ "type": "object",
37836
+ "properties": {
37837
+ "success": {
37838
+ "const": true
37839
+ },
37840
+ "changed": {
37841
+ "type": "boolean"
37842
+ },
37843
+ "dryRun": {
37844
+ "type": "boolean"
37845
+ },
37846
+ "bodyPolicy": {
37847
+ "const": "preserve"
37848
+ },
37849
+ "source": {
37850
+ "type": "object",
37851
+ "properties": {
37852
+ "kind": {
37853
+ "enum": [
37854
+ "path",
37855
+ "base64"
37856
+ ]
37857
+ },
37858
+ "fingerprint": {
37859
+ "type": "string"
37860
+ },
37861
+ "partCount": {
37862
+ "type": "integer"
37863
+ }
37864
+ },
37865
+ "additionalProperties": false,
37866
+ "required": [
37867
+ "kind",
37868
+ "fingerprint",
37869
+ "partCount"
37870
+ ]
37871
+ },
37872
+ "detectedScopes": {
37873
+ "type": "array",
37874
+ "items": {
37875
+ "type": "object",
37876
+ "properties": {
37877
+ "scope": {
37878
+ "enum": [
37879
+ "styles",
37880
+ "numbering",
37881
+ "settings",
37882
+ "theme",
37883
+ "fontTable",
37884
+ "webSettings",
37885
+ "headersFooters",
37886
+ "sectionDefaults"
37887
+ ]
37888
+ },
37889
+ "part": {
37890
+ "type": "string"
37891
+ },
37892
+ "detail": {
37893
+ "type": "string"
37894
+ }
37895
+ },
37896
+ "additionalProperties": false,
37897
+ "required": [
37898
+ "scope",
37899
+ "part"
37900
+ ]
37901
+ }
37902
+ },
37903
+ "appliedScopes": {
37904
+ "type": "array",
37905
+ "items": {
37906
+ "type": "object",
37907
+ "properties": {
37908
+ "scope": {
37909
+ "enum": [
37910
+ "styles",
37911
+ "numbering",
37912
+ "settings",
37913
+ "theme",
37914
+ "fontTable",
37915
+ "webSettings",
37916
+ "headersFooters",
37917
+ "sectionDefaults"
37918
+ ]
37919
+ },
37920
+ "part": {
37921
+ "type": "string"
37922
+ },
37923
+ "detail": {
37924
+ "type": "string"
37925
+ }
37926
+ },
37927
+ "additionalProperties": false,
37928
+ "required": [
37929
+ "scope",
37930
+ "part"
37931
+ ]
37932
+ }
37933
+ },
37934
+ "skippedScopes": {
37935
+ "type": "array",
37936
+ "items": {
37937
+ "type": "object",
37938
+ "properties": {
37939
+ "scope": {
37940
+ "type": "string"
37941
+ },
37942
+ "part": {
37943
+ "type": "string"
37944
+ },
37945
+ "reason": {
37946
+ "enum": [
37947
+ "NOT_PRESENT_IN_SOURCE",
37948
+ "OUT_OF_SCOPE",
37949
+ "NO_CHANGE",
37950
+ "CAPABILITY_UNAVAILABLE"
37951
+ ]
37952
+ },
37953
+ "message": {
37954
+ "type": "string"
37955
+ }
37956
+ },
37957
+ "additionalProperties": false,
37958
+ "required": [
37959
+ "scope",
37960
+ "reason",
37961
+ "message"
37962
+ ]
37963
+ }
37964
+ },
37965
+ "unsupportedItems": {
37966
+ "type": "array",
37967
+ "items": {
37968
+ "type": "object",
37969
+ "properties": {
37970
+ "part": {
37971
+ "type": "string"
37972
+ },
37973
+ "category": {
37974
+ "type": "string"
37975
+ },
37976
+ "reason": {
37977
+ "type": "string"
37978
+ }
37979
+ },
37980
+ "additionalProperties": false,
37981
+ "required": [
37982
+ "part",
37983
+ "category",
37984
+ "reason"
37985
+ ]
37986
+ }
37987
+ },
37988
+ "changedParts": {
37989
+ "type": "array",
37990
+ "items": {
37991
+ "type": "object",
37992
+ "properties": {
37993
+ "part": {
37994
+ "type": "string"
37995
+ },
37996
+ "scope": {
37997
+ "enum": [
37998
+ "styles",
37999
+ "numbering",
38000
+ "settings",
38001
+ "theme",
38002
+ "fontTable",
38003
+ "webSettings",
38004
+ "headersFooters",
38005
+ "sectionDefaults",
38006
+ "package"
38007
+ ]
38008
+ },
38009
+ "change": {
38010
+ "enum": [
38011
+ "created",
38012
+ "replaced",
38013
+ "merged",
38014
+ "imported"
38015
+ ]
38016
+ }
38017
+ },
38018
+ "additionalProperties": false,
38019
+ "required": [
38020
+ "part",
38021
+ "scope",
38022
+ "change"
38023
+ ]
38024
+ }
38025
+ },
38026
+ "idMappings": {
38027
+ "type": "object",
38028
+ "properties": {
38029
+ "styles": {
38030
+ "type": "array",
38031
+ "items": {
38032
+ "type": "object",
38033
+ "properties": {
38034
+ "kind": {
38035
+ "enum": [
38036
+ "style",
38037
+ "numbering",
38038
+ "relationship"
38039
+ ]
38040
+ },
38041
+ "from": {
38042
+ "type": "string"
38043
+ },
38044
+ "to": {
38045
+ "type": "string"
38046
+ }
38047
+ },
38048
+ "additionalProperties": false,
38049
+ "required": [
38050
+ "kind",
38051
+ "from",
38052
+ "to"
38053
+ ]
38054
+ }
38055
+ },
38056
+ "numbering": {
38057
+ "type": "array",
38058
+ "items": {
38059
+ "type": "object",
38060
+ "properties": {
38061
+ "kind": {
38062
+ "enum": [
38063
+ "style",
38064
+ "numbering",
38065
+ "relationship"
38066
+ ]
38067
+ },
38068
+ "from": {
38069
+ "type": "string"
38070
+ },
38071
+ "to": {
38072
+ "type": "string"
38073
+ }
38074
+ },
38075
+ "additionalProperties": false,
38076
+ "required": [
38077
+ "kind",
38078
+ "from",
38079
+ "to"
38080
+ ]
38081
+ }
38082
+ },
38083
+ "relationships": {
38084
+ "type": "array",
38085
+ "items": {
38086
+ "type": "object",
38087
+ "properties": {
38088
+ "kind": {
38089
+ "enum": [
38090
+ "style",
38091
+ "numbering",
38092
+ "relationship"
38093
+ ]
38094
+ },
38095
+ "from": {
38096
+ "type": "string"
38097
+ },
38098
+ "to": {
38099
+ "type": "string"
38100
+ }
38101
+ },
38102
+ "additionalProperties": false,
38103
+ "required": [
38104
+ "kind",
38105
+ "from",
38106
+ "to"
38107
+ ]
38108
+ }
38109
+ }
38110
+ },
38111
+ "additionalProperties": false
38112
+ },
38113
+ "warnings": {
38114
+ "type": "array",
38115
+ "items": {
38116
+ "type": "object",
38117
+ "properties": {
38118
+ "code": {
38119
+ "type": "string"
38120
+ },
38121
+ "message": {
38122
+ "type": "string"
38123
+ }
38124
+ },
38125
+ "additionalProperties": false,
38126
+ "required": [
38127
+ "code",
38128
+ "message"
38129
+ ]
38130
+ }
38131
+ }
38132
+ },
38133
+ "additionalProperties": false,
38134
+ "required": [
38135
+ "success",
38136
+ "changed",
38137
+ "dryRun",
38138
+ "bodyPolicy",
38139
+ "source",
38140
+ "detectedScopes",
38141
+ "appliedScopes",
38142
+ "skippedScopes",
38143
+ "unsupportedItems",
38144
+ "changedParts",
38145
+ "idMappings",
38146
+ "warnings"
38147
+ ]
38148
+ },
38149
+ {
38150
+ "type": "object",
38151
+ "properties": {
38152
+ "success": {
38153
+ "const": false
38154
+ },
38155
+ "failure": {
38156
+ "type": "object",
38157
+ "properties": {
38158
+ "code": {
38159
+ "enum": [
38160
+ "UNSUPPORTED_SOURCE",
38161
+ "INVALID_PACKAGE",
38162
+ "CAPABILITY_UNAVAILABLE",
38163
+ "UNSUPPORTED_TEMPLATE_CONTENT"
38164
+ ]
38165
+ },
38166
+ "message": {
38167
+ "type": "string"
38168
+ }
38169
+ },
38170
+ "additionalProperties": false,
38171
+ "required": [
38172
+ "code",
38173
+ "message"
38174
+ ]
38175
+ }
38176
+ },
38177
+ "additionalProperties": false,
38178
+ "required": [
38179
+ "success",
38180
+ "failure"
38181
+ ]
38182
+ }
38183
+ ]
38184
+ },
38185
+ "successSchema": {
38186
+ "type": "object",
38187
+ "properties": {
38188
+ "success": {
38189
+ "const": true
38190
+ },
38191
+ "changed": {
38192
+ "type": "boolean"
38193
+ },
38194
+ "dryRun": {
38195
+ "type": "boolean"
38196
+ },
38197
+ "bodyPolicy": {
38198
+ "const": "preserve"
38199
+ },
38200
+ "source": {
38201
+ "type": "object",
38202
+ "properties": {
38203
+ "kind": {
38204
+ "enum": [
38205
+ "path",
38206
+ "base64"
38207
+ ]
38208
+ },
38209
+ "fingerprint": {
38210
+ "type": "string"
38211
+ },
38212
+ "partCount": {
38213
+ "type": "integer"
38214
+ }
38215
+ },
38216
+ "additionalProperties": false,
38217
+ "required": [
38218
+ "kind",
38219
+ "fingerprint",
38220
+ "partCount"
38221
+ ]
38222
+ },
38223
+ "detectedScopes": {
38224
+ "type": "array",
38225
+ "items": {
38226
+ "type": "object",
38227
+ "properties": {
38228
+ "scope": {
38229
+ "enum": [
38230
+ "styles",
38231
+ "numbering",
38232
+ "settings",
38233
+ "theme",
38234
+ "fontTable",
38235
+ "webSettings",
38236
+ "headersFooters",
38237
+ "sectionDefaults"
38238
+ ]
38239
+ },
38240
+ "part": {
38241
+ "type": "string"
38242
+ },
38243
+ "detail": {
38244
+ "type": "string"
38245
+ }
38246
+ },
38247
+ "additionalProperties": false,
38248
+ "required": [
38249
+ "scope",
38250
+ "part"
38251
+ ]
38252
+ }
38253
+ },
38254
+ "appliedScopes": {
38255
+ "type": "array",
38256
+ "items": {
38257
+ "type": "object",
38258
+ "properties": {
38259
+ "scope": {
38260
+ "enum": [
38261
+ "styles",
38262
+ "numbering",
38263
+ "settings",
38264
+ "theme",
38265
+ "fontTable",
38266
+ "webSettings",
38267
+ "headersFooters",
38268
+ "sectionDefaults"
38269
+ ]
38270
+ },
38271
+ "part": {
38272
+ "type": "string"
38273
+ },
38274
+ "detail": {
38275
+ "type": "string"
38276
+ }
38277
+ },
38278
+ "additionalProperties": false,
38279
+ "required": [
38280
+ "scope",
38281
+ "part"
38282
+ ]
38283
+ }
38284
+ },
38285
+ "skippedScopes": {
38286
+ "type": "array",
38287
+ "items": {
38288
+ "type": "object",
38289
+ "properties": {
38290
+ "scope": {
38291
+ "type": "string"
38292
+ },
38293
+ "part": {
38294
+ "type": "string"
38295
+ },
38296
+ "reason": {
38297
+ "enum": [
38298
+ "NOT_PRESENT_IN_SOURCE",
38299
+ "OUT_OF_SCOPE",
38300
+ "NO_CHANGE",
38301
+ "CAPABILITY_UNAVAILABLE"
38302
+ ]
38303
+ },
38304
+ "message": {
38305
+ "type": "string"
38306
+ }
38307
+ },
38308
+ "additionalProperties": false,
38309
+ "required": [
38310
+ "scope",
38311
+ "reason",
38312
+ "message"
38313
+ ]
38314
+ }
38315
+ },
38316
+ "unsupportedItems": {
38317
+ "type": "array",
38318
+ "items": {
38319
+ "type": "object",
38320
+ "properties": {
38321
+ "part": {
38322
+ "type": "string"
38323
+ },
38324
+ "category": {
38325
+ "type": "string"
38326
+ },
38327
+ "reason": {
38328
+ "type": "string"
38329
+ }
38330
+ },
38331
+ "additionalProperties": false,
38332
+ "required": [
38333
+ "part",
38334
+ "category",
38335
+ "reason"
38336
+ ]
38337
+ }
38338
+ },
38339
+ "changedParts": {
38340
+ "type": "array",
38341
+ "items": {
38342
+ "type": "object",
38343
+ "properties": {
38344
+ "part": {
38345
+ "type": "string"
38346
+ },
38347
+ "scope": {
38348
+ "enum": [
38349
+ "styles",
38350
+ "numbering",
38351
+ "settings",
38352
+ "theme",
38353
+ "fontTable",
38354
+ "webSettings",
38355
+ "headersFooters",
38356
+ "sectionDefaults",
38357
+ "package"
38358
+ ]
38359
+ },
38360
+ "change": {
38361
+ "enum": [
38362
+ "created",
38363
+ "replaced",
38364
+ "merged",
38365
+ "imported"
38366
+ ]
38367
+ }
38368
+ },
38369
+ "additionalProperties": false,
38370
+ "required": [
38371
+ "part",
38372
+ "scope",
38373
+ "change"
38374
+ ]
38375
+ }
38376
+ },
38377
+ "idMappings": {
38378
+ "type": "object",
38379
+ "properties": {
38380
+ "styles": {
38381
+ "type": "array",
38382
+ "items": {
38383
+ "type": "object",
38384
+ "properties": {
38385
+ "kind": {
38386
+ "enum": [
38387
+ "style",
38388
+ "numbering",
38389
+ "relationship"
38390
+ ]
38391
+ },
38392
+ "from": {
38393
+ "type": "string"
38394
+ },
38395
+ "to": {
38396
+ "type": "string"
38397
+ }
38398
+ },
38399
+ "additionalProperties": false,
38400
+ "required": [
38401
+ "kind",
38402
+ "from",
38403
+ "to"
38404
+ ]
38405
+ }
38406
+ },
38407
+ "numbering": {
38408
+ "type": "array",
38409
+ "items": {
38410
+ "type": "object",
38411
+ "properties": {
38412
+ "kind": {
38413
+ "enum": [
38414
+ "style",
38415
+ "numbering",
38416
+ "relationship"
38417
+ ]
38418
+ },
38419
+ "from": {
38420
+ "type": "string"
38421
+ },
38422
+ "to": {
38423
+ "type": "string"
38424
+ }
38425
+ },
38426
+ "additionalProperties": false,
38427
+ "required": [
38428
+ "kind",
38429
+ "from",
38430
+ "to"
38431
+ ]
38432
+ }
38433
+ },
38434
+ "relationships": {
38435
+ "type": "array",
38436
+ "items": {
38437
+ "type": "object",
38438
+ "properties": {
38439
+ "kind": {
38440
+ "enum": [
38441
+ "style",
38442
+ "numbering",
38443
+ "relationship"
38444
+ ]
38445
+ },
38446
+ "from": {
38447
+ "type": "string"
38448
+ },
38449
+ "to": {
38450
+ "type": "string"
38451
+ }
38452
+ },
38453
+ "additionalProperties": false,
38454
+ "required": [
38455
+ "kind",
38456
+ "from",
38457
+ "to"
38458
+ ]
38459
+ }
38460
+ }
38461
+ },
38462
+ "additionalProperties": false
38463
+ },
38464
+ "warnings": {
38465
+ "type": "array",
38466
+ "items": {
38467
+ "type": "object",
38468
+ "properties": {
38469
+ "code": {
38470
+ "type": "string"
38471
+ },
38472
+ "message": {
38473
+ "type": "string"
38474
+ }
38475
+ },
38476
+ "additionalProperties": false,
38477
+ "required": [
38478
+ "code",
38479
+ "message"
38480
+ ]
38481
+ }
38482
+ }
38483
+ },
38484
+ "additionalProperties": false,
38485
+ "required": [
38486
+ "success",
38487
+ "changed",
38488
+ "dryRun",
38489
+ "bodyPolicy",
38490
+ "source",
38491
+ "detectedScopes",
38492
+ "appliedScopes",
38493
+ "skippedScopes",
38494
+ "unsupportedItems",
38495
+ "changedParts",
38496
+ "idMappings",
38497
+ "warnings"
38498
+ ]
38499
+ },
38500
+ "failureSchema": {
38501
+ "type": "object",
38502
+ "properties": {
38503
+ "success": {
38504
+ "const": false
38505
+ },
38506
+ "failure": {
38507
+ "type": "object",
38508
+ "properties": {
38509
+ "code": {
38510
+ "enum": [
38511
+ "UNSUPPORTED_SOURCE",
38512
+ "INVALID_PACKAGE",
38513
+ "CAPABILITY_UNAVAILABLE",
38514
+ "UNSUPPORTED_TEMPLATE_CONTENT"
38515
+ ]
38516
+ },
38517
+ "message": {
38518
+ "type": "string"
38519
+ }
38520
+ },
38521
+ "additionalProperties": false,
38522
+ "required": [
38523
+ "code",
38524
+ "message"
38525
+ ]
38526
+ }
38527
+ },
38528
+ "additionalProperties": false,
38529
+ "required": [
38530
+ "success",
38531
+ "failure"
38532
+ ]
38533
+ }
38534
+ },
37653
38535
  "doc.create.paragraph": {
37654
38536
  "operationId": "doc.create.paragraph",
37655
38537
  "sdkSurface": "document",
@@ -39645,6 +40527,20 @@ export const CONTRACT = {
39645
40527
  "upperRoman",
39646
40528
  "numberInDash"
39647
40529
  ]
40530
+ },
40531
+ "chapterStyle": {
40532
+ "type": "integer",
40533
+ "minimum": 1
40534
+ },
40535
+ "chapterSeparator": {
40536
+ "type": "string",
40537
+ "enum": [
40538
+ "hyphen",
40539
+ "period",
40540
+ "colon",
40541
+ "emDash",
40542
+ "enDash"
40543
+ ]
39648
40544
  }
39649
40545
  },
39650
40546
  "additionalProperties": false
@@ -40247,6 +41143,20 @@ export const CONTRACT = {
40247
41143
  "upperRoman",
40248
41144
  "numberInDash"
40249
41145
  ]
41146
+ },
41147
+ "chapterStyle": {
41148
+ "type": "integer",
41149
+ "minimum": 1
41150
+ },
41151
+ "chapterSeparator": {
41152
+ "type": "string",
41153
+ "enum": [
41154
+ "hyphen",
41155
+ "period",
41156
+ "colon",
41157
+ "emDash",
41158
+ "enDash"
41159
+ ]
40250
41160
  }
40251
41161
  },
40252
41162
  "additionalProperties": false
@@ -42016,309 +42926,340 @@ export const CONTRACT = {
42016
42926
  ]
42017
42927
  }
42018
42928
  },
42019
- {
42020
- "name": "enabled",
42021
- "kind": "flag",
42022
- "type": "boolean",
42023
- "required": true
42024
- },
42025
- {
42026
- "name": "countBy",
42027
- "kind": "flag",
42028
- "type": "number",
42029
- "flag": "count-by"
42030
- },
42929
+ {
42930
+ "name": "enabled",
42931
+ "kind": "flag",
42932
+ "type": "boolean",
42933
+ "required": true
42934
+ },
42935
+ {
42936
+ "name": "countBy",
42937
+ "kind": "flag",
42938
+ "type": "number",
42939
+ "flag": "count-by"
42940
+ },
42941
+ {
42942
+ "name": "start",
42943
+ "kind": "flag",
42944
+ "type": "number"
42945
+ },
42946
+ {
42947
+ "name": "distance",
42948
+ "kind": "flag",
42949
+ "type": "number"
42950
+ },
42951
+ {
42952
+ "name": "restart",
42953
+ "kind": "flag",
42954
+ "type": "string",
42955
+ "schema": {
42956
+ "oneOf": [
42957
+ {
42958
+ "const": "continuous"
42959
+ },
42960
+ {
42961
+ "const": "newPage"
42962
+ },
42963
+ {
42964
+ "const": "newSection"
42965
+ }
42966
+ ]
42967
+ }
42968
+ }
42969
+ ],
42970
+ "constraints": null,
42971
+ "mutates": true,
42972
+ "idempotency": "conditional",
42973
+ "supportsTrackedMode": false,
42974
+ "supportsDryRun": true,
42975
+ "inputSchema": {
42976
+ "type": "object",
42977
+ "properties": {
42978
+ "target": {
42979
+ "$ref": "#/$defs/SectionAddress"
42980
+ },
42981
+ "enabled": {
42982
+ "type": "boolean"
42983
+ },
42984
+ "countBy": {
42985
+ "type": "integer",
42986
+ "minimum": 1
42987
+ },
42988
+ "start": {
42989
+ "type": "integer",
42990
+ "minimum": 1
42991
+ },
42992
+ "distance": {
42993
+ "type": "number",
42994
+ "minimum": 0
42995
+ },
42996
+ "restart": {
42997
+ "enum": [
42998
+ "continuous",
42999
+ "newPage",
43000
+ "newSection"
43001
+ ]
43002
+ }
43003
+ },
43004
+ "additionalProperties": false,
43005
+ "required": [
43006
+ "target",
43007
+ "enabled"
43008
+ ]
43009
+ },
43010
+ "outputSchema": {
43011
+ "oneOf": [
43012
+ {
43013
+ "type": "object",
43014
+ "properties": {
43015
+ "success": {
43016
+ "const": true
43017
+ },
43018
+ "section": {
43019
+ "$ref": "#/$defs/SectionAddress"
43020
+ }
43021
+ },
43022
+ "additionalProperties": false,
43023
+ "required": [
43024
+ "success",
43025
+ "section"
43026
+ ]
43027
+ },
43028
+ {
43029
+ "type": "object",
43030
+ "properties": {
43031
+ "success": {
43032
+ "const": false
43033
+ },
43034
+ "failure": {
43035
+ "type": "object",
43036
+ "properties": {
43037
+ "code": {
43038
+ "enum": [
43039
+ "NO_OP",
43040
+ "INVALID_TARGET",
43041
+ "CAPABILITY_UNAVAILABLE"
43042
+ ]
43043
+ },
43044
+ "message": {
43045
+ "type": "string"
43046
+ },
43047
+ "details": {}
43048
+ },
43049
+ "additionalProperties": false,
43050
+ "required": [
43051
+ "code",
43052
+ "message"
43053
+ ]
43054
+ }
43055
+ },
43056
+ "additionalProperties": false,
43057
+ "required": [
43058
+ "success",
43059
+ "failure"
43060
+ ]
43061
+ }
43062
+ ]
43063
+ },
43064
+ "successSchema": {
43065
+ "type": "object",
43066
+ "properties": {
43067
+ "success": {
43068
+ "const": true
43069
+ },
43070
+ "section": {
43071
+ "$ref": "#/$defs/SectionAddress"
43072
+ }
43073
+ },
43074
+ "additionalProperties": false,
43075
+ "required": [
43076
+ "success",
43077
+ "section"
43078
+ ]
43079
+ },
43080
+ "failureSchema": {
43081
+ "type": "object",
43082
+ "properties": {
43083
+ "success": {
43084
+ "const": false
43085
+ },
43086
+ "failure": {
43087
+ "type": "object",
43088
+ "properties": {
43089
+ "code": {
43090
+ "enum": [
43091
+ "NO_OP",
43092
+ "INVALID_TARGET",
43093
+ "CAPABILITY_UNAVAILABLE"
43094
+ ]
43095
+ },
43096
+ "message": {
43097
+ "type": "string"
43098
+ },
43099
+ "details": {}
43100
+ },
43101
+ "additionalProperties": false,
43102
+ "required": [
43103
+ "code",
43104
+ "message"
43105
+ ]
43106
+ }
43107
+ },
43108
+ "additionalProperties": false,
43109
+ "required": [
43110
+ "success",
43111
+ "failure"
43112
+ ]
43113
+ }
43114
+ },
43115
+ "doc.sections.setPageNumbering": {
43116
+ "operationId": "doc.sections.setPageNumbering",
43117
+ "sdkSurface": "document",
43118
+ "command": "sections set-page-numbering",
43119
+ "commandTokens": [
43120
+ "sections",
43121
+ "set-page-numbering"
43122
+ ],
43123
+ "category": "sections",
43124
+ "description": "Set page numbering format/start and chapter numbering settings for a section.",
43125
+ "requiresDocumentContext": true,
43126
+ "docRequirement": "optional",
43127
+ "responseEnvelopeKey": "result",
43128
+ "params": [
43129
+ {
43130
+ "name": "doc",
43131
+ "kind": "doc",
43132
+ "type": "string",
43133
+ "description": "Document path. Optional when a session is already open."
43134
+ },
43135
+ {
43136
+ "name": "sessionId",
43137
+ "kind": "flag",
43138
+ "type": "string",
43139
+ "flag": "session",
43140
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
43141
+ },
43142
+ {
43143
+ "name": "out",
43144
+ "kind": "flag",
43145
+ "type": "string",
43146
+ "agentVisible": false
43147
+ },
43148
+ {
43149
+ "name": "force",
43150
+ "kind": "flag",
43151
+ "type": "boolean",
43152
+ "description": "Bypass confirmation checks."
43153
+ },
43154
+ {
43155
+ "name": "expectedRevision",
43156
+ "kind": "flag",
43157
+ "type": "number",
43158
+ "flag": "expected-revision",
43159
+ "agentVisible": false
43160
+ },
43161
+ {
43162
+ "name": "changeMode",
43163
+ "kind": "flag",
43164
+ "type": "string",
43165
+ "flag": "change-mode",
43166
+ "schema": {
43167
+ "type": "string",
43168
+ "enum": [
43169
+ "direct",
43170
+ "tracked"
43171
+ ]
43172
+ },
43173
+ "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
43174
+ },
43175
+ {
43176
+ "name": "dryRun",
43177
+ "kind": "flag",
43178
+ "type": "boolean",
43179
+ "flag": "dry-run",
43180
+ "description": "Preview the result without applying changes."
43181
+ },
43182
+ {
43183
+ "name": "target",
43184
+ "kind": "jsonFlag",
43185
+ "type": "json",
43186
+ "flag": "target-json",
43187
+ "required": true,
43188
+ "schema": {
43189
+ "type": "object",
43190
+ "properties": {
43191
+ "kind": {
43192
+ "const": "section"
43193
+ },
43194
+ "sectionId": {
43195
+ "type": "string"
43196
+ }
43197
+ },
43198
+ "required": [
43199
+ "kind",
43200
+ "sectionId"
43201
+ ]
43202
+ }
43203
+ },
42031
43204
  {
42032
43205
  "name": "start",
42033
43206
  "kind": "flag",
42034
43207
  "type": "number"
42035
43208
  },
42036
43209
  {
42037
- "name": "distance",
42038
- "kind": "flag",
42039
- "type": "number"
42040
- },
42041
- {
42042
- "name": "restart",
43210
+ "name": "format",
42043
43211
  "kind": "flag",
42044
43212
  "type": "string",
42045
43213
  "schema": {
42046
43214
  "oneOf": [
42047
43215
  {
42048
- "const": "continuous"
43216
+ "const": "decimal"
42049
43217
  },
42050
43218
  {
42051
- "const": "newPage"
43219
+ "const": "lowerLetter"
42052
43220
  },
42053
43221
  {
42054
- "const": "newSection"
42055
- }
42056
- ]
42057
- }
42058
- }
42059
- ],
42060
- "constraints": null,
42061
- "mutates": true,
42062
- "idempotency": "conditional",
42063
- "supportsTrackedMode": false,
42064
- "supportsDryRun": true,
42065
- "inputSchema": {
42066
- "type": "object",
42067
- "properties": {
42068
- "target": {
42069
- "$ref": "#/$defs/SectionAddress"
42070
- },
42071
- "enabled": {
42072
- "type": "boolean"
42073
- },
42074
- "countBy": {
42075
- "type": "integer",
42076
- "minimum": 1
42077
- },
42078
- "start": {
42079
- "type": "integer",
42080
- "minimum": 1
42081
- },
42082
- "distance": {
42083
- "type": "number",
42084
- "minimum": 0
42085
- },
42086
- "restart": {
42087
- "enum": [
42088
- "continuous",
42089
- "newPage",
42090
- "newSection"
42091
- ]
42092
- }
42093
- },
42094
- "additionalProperties": false,
42095
- "required": [
42096
- "target",
42097
- "enabled"
42098
- ]
42099
- },
42100
- "outputSchema": {
42101
- "oneOf": [
42102
- {
42103
- "type": "object",
42104
- "properties": {
42105
- "success": {
42106
- "const": true
42107
- },
42108
- "section": {
42109
- "$ref": "#/$defs/SectionAddress"
42110
- }
42111
- },
42112
- "additionalProperties": false,
42113
- "required": [
42114
- "success",
42115
- "section"
42116
- ]
42117
- },
42118
- {
42119
- "type": "object",
42120
- "properties": {
42121
- "success": {
42122
- "const": false
42123
- },
42124
- "failure": {
42125
- "type": "object",
42126
- "properties": {
42127
- "code": {
42128
- "enum": [
42129
- "NO_OP",
42130
- "INVALID_TARGET",
42131
- "CAPABILITY_UNAVAILABLE"
42132
- ]
42133
- },
42134
- "message": {
42135
- "type": "string"
42136
- },
42137
- "details": {}
42138
- },
42139
- "additionalProperties": false,
42140
- "required": [
42141
- "code",
42142
- "message"
42143
- ]
42144
- }
42145
- },
42146
- "additionalProperties": false,
42147
- "required": [
42148
- "success",
42149
- "failure"
42150
- ]
42151
- }
42152
- ]
42153
- },
42154
- "successSchema": {
42155
- "type": "object",
42156
- "properties": {
42157
- "success": {
42158
- "const": true
42159
- },
42160
- "section": {
42161
- "$ref": "#/$defs/SectionAddress"
42162
- }
42163
- },
42164
- "additionalProperties": false,
42165
- "required": [
42166
- "success",
42167
- "section"
42168
- ]
42169
- },
42170
- "failureSchema": {
42171
- "type": "object",
42172
- "properties": {
42173
- "success": {
42174
- "const": false
42175
- },
42176
- "failure": {
42177
- "type": "object",
42178
- "properties": {
42179
- "code": {
42180
- "enum": [
42181
- "NO_OP",
42182
- "INVALID_TARGET",
42183
- "CAPABILITY_UNAVAILABLE"
42184
- ]
43222
+ "const": "upperLetter"
42185
43223
  },
42186
- "message": {
42187
- "type": "string"
43224
+ {
43225
+ "const": "lowerRoman"
42188
43226
  },
42189
- "details": {}
42190
- },
42191
- "additionalProperties": false,
42192
- "required": [
42193
- "code",
42194
- "message"
42195
- ]
42196
- }
42197
- },
42198
- "additionalProperties": false,
42199
- "required": [
42200
- "success",
42201
- "failure"
42202
- ]
42203
- }
42204
- },
42205
- "doc.sections.setPageNumbering": {
42206
- "operationId": "doc.sections.setPageNumbering",
42207
- "sdkSurface": "document",
42208
- "command": "sections set-page-numbering",
42209
- "commandTokens": [
42210
- "sections",
42211
- "set-page-numbering"
42212
- ],
42213
- "category": "sections",
42214
- "description": "Set page numbering format/start for a section.",
42215
- "requiresDocumentContext": true,
42216
- "docRequirement": "optional",
42217
- "responseEnvelopeKey": "result",
42218
- "params": [
42219
- {
42220
- "name": "doc",
42221
- "kind": "doc",
42222
- "type": "string",
42223
- "description": "Document path. Optional when a session is already open."
42224
- },
42225
- {
42226
- "name": "sessionId",
42227
- "kind": "flag",
42228
- "type": "string",
42229
- "flag": "session",
42230
- "description": "Session ID for multi-session workflows. Optional when only one session is open."
42231
- },
42232
- {
42233
- "name": "out",
42234
- "kind": "flag",
42235
- "type": "string",
42236
- "agentVisible": false
42237
- },
42238
- {
42239
- "name": "force",
42240
- "kind": "flag",
42241
- "type": "boolean",
42242
- "description": "Bypass confirmation checks."
42243
- },
42244
- {
42245
- "name": "expectedRevision",
42246
- "kind": "flag",
42247
- "type": "number",
42248
- "flag": "expected-revision",
42249
- "agentVisible": false
42250
- },
42251
- {
42252
- "name": "changeMode",
42253
- "kind": "flag",
42254
- "type": "string",
42255
- "flag": "change-mode",
42256
- "schema": {
42257
- "type": "string",
42258
- "enum": [
42259
- "direct",
42260
- "tracked"
42261
- ]
42262
- },
42263
- "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
42264
- },
42265
- {
42266
- "name": "dryRun",
42267
- "kind": "flag",
42268
- "type": "boolean",
42269
- "flag": "dry-run",
42270
- "description": "Preview the result without applying changes."
42271
- },
42272
- {
42273
- "name": "target",
42274
- "kind": "jsonFlag",
42275
- "type": "json",
42276
- "flag": "target-json",
42277
- "required": true,
42278
- "schema": {
42279
- "type": "object",
42280
- "properties": {
42281
- "kind": {
42282
- "const": "section"
43227
+ {
43228
+ "const": "upperRoman"
42283
43229
  },
42284
- "sectionId": {
42285
- "type": "string"
43230
+ {
43231
+ "const": "numberInDash"
42286
43232
  }
42287
- },
42288
- "required": [
42289
- "kind",
42290
- "sectionId"
42291
43233
  ]
42292
43234
  }
42293
43235
  },
42294
43236
  {
42295
- "name": "start",
43237
+ "name": "chapterStyle",
42296
43238
  "kind": "flag",
42297
- "type": "number"
43239
+ "type": "number",
43240
+ "flag": "chapter-style"
42298
43241
  },
42299
43242
  {
42300
- "name": "format",
43243
+ "name": "chapterSeparator",
42301
43244
  "kind": "flag",
42302
43245
  "type": "string",
43246
+ "flag": "chapter-separator",
42303
43247
  "schema": {
42304
43248
  "oneOf": [
42305
43249
  {
42306
- "const": "decimal"
42307
- },
42308
- {
42309
- "const": "lowerLetter"
43250
+ "const": "hyphen"
42310
43251
  },
42311
43252
  {
42312
- "const": "upperLetter"
43253
+ "const": "period"
42313
43254
  },
42314
43255
  {
42315
- "const": "lowerRoman"
43256
+ "const": "colon"
42316
43257
  },
42317
43258
  {
42318
- "const": "upperRoman"
43259
+ "const": "emDash"
42319
43260
  },
42320
43261
  {
42321
- "const": "numberInDash"
43262
+ "const": "enDash"
42322
43263
  }
42323
43264
  ]
42324
43265
  }
@@ -42348,13 +43289,27 @@ export const CONTRACT = {
42348
43289
  "upperRoman",
42349
43290
  "numberInDash"
42350
43291
  ]
43292
+ },
43293
+ "chapterStyle": {
43294
+ "type": "integer",
43295
+ "minimum": 1
43296
+ },
43297
+ "chapterSeparator": {
43298
+ "type": "string",
43299
+ "enum": [
43300
+ "hyphen",
43301
+ "period",
43302
+ "colon",
43303
+ "emDash",
43304
+ "enDash"
43305
+ ]
42351
43306
  }
42352
43307
  },
42353
43308
  "additionalProperties": false,
42354
43309
  "required": [
42355
43310
  "target"
42356
43311
  ],
42357
- "oneOf": [
43312
+ "anyOf": [
42358
43313
  {
42359
43314
  "required": [
42360
43315
  "target",
@@ -42366,6 +43321,18 @@ export const CONTRACT = {
42366
43321
  "target",
42367
43322
  "format"
42368
43323
  ]
43324
+ },
43325
+ {
43326
+ "required": [
43327
+ "target",
43328
+ "chapterStyle"
43329
+ ]
43330
+ },
43331
+ {
43332
+ "required": [
43333
+ "target",
43334
+ "chapterSeparator"
43335
+ ]
42369
43336
  }
42370
43337
  ]
42371
43338
  },
@@ -66174,7 +67141,8 @@ export const CONTRACT = {
66174
67141
  "insert",
66175
67142
  "delete",
66176
67143
  "replacement",
66177
- "format"
67144
+ "format",
67145
+ "structural"
66178
67146
  ]
66179
67147
  },
66180
67148
  "trackedChangeDisplayType": {
@@ -66367,7 +67335,8 @@ export const CONTRACT = {
66367
67335
  "insert",
66368
67336
  "delete",
66369
67337
  "replacement",
66370
- "format"
67338
+ "format",
67339
+ "structural"
66371
67340
  ]
66372
67341
  },
66373
67342
  "trackedChangeDisplayType": {
@@ -66495,11 +67464,14 @@ export const CONTRACT = {
66495
67464
  },
66496
67465
  {
66497
67466
  "const": "format"
67467
+ },
67468
+ {
67469
+ "const": "structural"
66498
67470
  }
66499
67471
  ],
66500
- "description": "Filter by change type: 'insert', 'delete', 'replacement', or 'format'."
67472
+ "description": "Filter by change type: 'insert', 'delete', 'replacement', 'format', or 'structural'."
66501
67473
  },
66502
- "description": "Filter by change type: 'insert', 'delete', 'replacement', or 'format'."
67474
+ "description": "Filter by change type: 'insert', 'delete', 'replacement', 'format', or 'structural'."
66503
67475
  },
66504
67476
  {
66505
67477
  "name": "in",
@@ -66695,9 +67667,10 @@ export const CONTRACT = {
66695
67667
  "insert",
66696
67668
  "delete",
66697
67669
  "replacement",
66698
- "format"
67670
+ "format",
67671
+ "structural"
66699
67672
  ],
66700
- "description": "Filter by change type: 'insert', 'delete', 'replacement', or 'format'."
67673
+ "description": "Filter by change type: 'insert', 'delete', 'replacement', 'format', or 'structural'."
66701
67674
  },
66702
67675
  "in": {
66703
67676
  "oneOf": [
@@ -66742,9 +67715,17 @@ export const CONTRACT = {
66742
67715
  "insert",
66743
67716
  "delete",
66744
67717
  "replacement",
66745
- "format"
67718
+ "format",
67719
+ "structural"
66746
67720
  ]
66747
67721
  },
67722
+ "subtype": {
67723
+ "enum": [
67724
+ "table-insert",
67725
+ "table-delete"
67726
+ ],
67727
+ "description": "Finer classification for structural changes (type === 'structural')."
67728
+ },
66748
67729
  "grouping": {
66749
67730
  "enum": [
66750
67731
  "standalone",
@@ -67054,9 +68035,17 @@ export const CONTRACT = {
67054
68035
  "insert",
67055
68036
  "delete",
67056
68037
  "replacement",
67057
- "format"
68038
+ "format",
68039
+ "structural"
67058
68040
  ]
67059
68041
  },
68042
+ "subtype": {
68043
+ "enum": [
68044
+ "table-insert",
68045
+ "table-delete"
68046
+ ],
68047
+ "description": "Finer classification for structural changes (type === 'structural')."
68048
+ },
67060
68049
  "grouping": {
67061
68050
  "enum": [
67062
68051
  "standalone",
@@ -67364,6 +68353,11 @@ export const CONTRACT = {
67364
68353
  }
67365
68354
  ],
67366
68355
  "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."
68356
+ },
68357
+ "range": {
68358
+ "type": "object",
68359
+ "properties": {},
68360
+ "description": "Partial-range qualifier on an id target. Rejected with INVALID_INPUT for indivisible (e.g. structural) revisions."
67367
68361
  }
67368
68362
  },
67369
68363
  "required": [
@@ -67947,6 +68941,10 @@ export const CONTRACT = {
67947
68941
  },
67948
68942
  "story": {
67949
68943
  "$ref": "#/$defs/StoryLocator"
68944
+ },
68945
+ "range": {
68946
+ "type": "object",
68947
+ "description": "Partial-range qualifier on an id target. Rejected with INVALID_INPUT for indivisible (e.g. structural) revisions."
67950
68948
  }
67951
68949
  },
67952
68950
  "additionalProperties": false,
@@ -84937,6 +85935,41 @@ export const CONTRACT = {
84937
85935
  "dryRun"
84938
85936
  ]
84939
85937
  },
85938
+ "templates.apply": {
85939
+ "type": "object",
85940
+ "properties": {
85941
+ "available": {
85942
+ "type": "boolean"
85943
+ },
85944
+ "tracked": {
85945
+ "type": "boolean"
85946
+ },
85947
+ "dryRun": {
85948
+ "type": "boolean"
85949
+ },
85950
+ "reasons": {
85951
+ "type": "array",
85952
+ "items": {
85953
+ "enum": [
85954
+ "COMMAND_UNAVAILABLE",
85955
+ "HELPER_UNAVAILABLE",
85956
+ "OPERATION_UNAVAILABLE",
85957
+ "TRACKED_MODE_UNAVAILABLE",
85958
+ "DRY_RUN_UNAVAILABLE",
85959
+ "NAMESPACE_UNAVAILABLE",
85960
+ "STYLES_PART_MISSING",
85961
+ "COLLABORATION_ACTIVE"
85962
+ ]
85963
+ }
85964
+ }
85965
+ },
85966
+ "additionalProperties": false,
85967
+ "required": [
85968
+ "available",
85969
+ "tracked",
85970
+ "dryRun"
85971
+ ]
85972
+ },
84940
85973
  "create.paragraph": {
84941
85974
  "type": "object",
84942
85975
  "properties": {
@@ -96938,6 +97971,7 @@ export const CONTRACT = {
96938
97971
  "format.stylisticSets",
96939
97972
  "format.contextualAlternates",
96940
97973
  "styles.apply",
97974
+ "templates.apply",
96941
97975
  "create.paragraph",
96942
97976
  "create.heading",
96943
97977
  "create.sectionBreak",