@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.
@@ -2218,7 +2218,8 @@ const CONTRACT = {
2218
2218
  "insert",
2219
2219
  "delete",
2220
2220
  "replacement",
2221
- "format"
2221
+ "format",
2222
+ "structural"
2222
2223
  ],
2223
2224
  "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[]."
2224
2225
  },
@@ -36426,6 +36427,886 @@ const CONTRACT = {
36426
36427
  ]
36427
36428
  }
36428
36429
  },
36430
+ "doc.templates.apply": {
36431
+ "operationId": "doc.templates.apply",
36432
+ "sdkSurface": "document",
36433
+ "command": "templates apply",
36434
+ "commandTokens": [
36435
+ "templates",
36436
+ "apply"
36437
+ ],
36438
+ "category": "core",
36439
+ "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.",
36440
+ "requiresDocumentContext": true,
36441
+ "docRequirement": "optional",
36442
+ "responseEnvelopeKey": "receipt",
36443
+ "params": [
36444
+ {
36445
+ "name": "doc",
36446
+ "kind": "doc",
36447
+ "type": "string",
36448
+ "description": "Document path. Optional when a session is already open."
36449
+ },
36450
+ {
36451
+ "name": "sessionId",
36452
+ "kind": "flag",
36453
+ "type": "string",
36454
+ "flag": "session",
36455
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
36456
+ },
36457
+ {
36458
+ "name": "out",
36459
+ "kind": "flag",
36460
+ "type": "string",
36461
+ "agentVisible": false
36462
+ },
36463
+ {
36464
+ "name": "force",
36465
+ "kind": "flag",
36466
+ "type": "boolean",
36467
+ "description": "Bypass confirmation checks."
36468
+ },
36469
+ {
36470
+ "name": "expectedRevision",
36471
+ "kind": "flag",
36472
+ "type": "number",
36473
+ "flag": "expected-revision",
36474
+ "agentVisible": false
36475
+ },
36476
+ {
36477
+ "name": "changeMode",
36478
+ "kind": "flag",
36479
+ "type": "string",
36480
+ "flag": "change-mode",
36481
+ "schema": {
36482
+ "type": "string",
36483
+ "enum": [
36484
+ "direct",
36485
+ "tracked"
36486
+ ]
36487
+ },
36488
+ "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
36489
+ },
36490
+ {
36491
+ "name": "dryRun",
36492
+ "kind": "flag",
36493
+ "type": "boolean",
36494
+ "flag": "dry-run",
36495
+ "description": "Preview the result without applying changes."
36496
+ },
36497
+ {
36498
+ "name": "source",
36499
+ "kind": "jsonFlag",
36500
+ "type": "json",
36501
+ "flag": "source-json",
36502
+ "required": true,
36503
+ "schema": {
36504
+ "oneOf": [
36505
+ {
36506
+ "type": "object",
36507
+ "properties": {
36508
+ "kind": {
36509
+ "const": "path"
36510
+ },
36511
+ "path": {
36512
+ "type": "string"
36513
+ }
36514
+ },
36515
+ "required": [
36516
+ "kind",
36517
+ "path"
36518
+ ]
36519
+ },
36520
+ {
36521
+ "type": "object",
36522
+ "properties": {
36523
+ "kind": {
36524
+ "const": "base64"
36525
+ },
36526
+ "data": {
36527
+ "type": "string"
36528
+ },
36529
+ "filename": {
36530
+ "type": "string"
36531
+ }
36532
+ },
36533
+ "required": [
36534
+ "kind",
36535
+ "data"
36536
+ ]
36537
+ }
36538
+ ]
36539
+ }
36540
+ },
36541
+ {
36542
+ "name": "bodyPolicy",
36543
+ "kind": "jsonFlag",
36544
+ "type": "json",
36545
+ "flag": "body-policy-json",
36546
+ "schema": {
36547
+ "const": "preserve"
36548
+ }
36549
+ }
36550
+ ],
36551
+ "constraints": null,
36552
+ "mutates": true,
36553
+ "idempotency": "conditional",
36554
+ "supportsTrackedMode": false,
36555
+ "supportsDryRun": true,
36556
+ "inputSchema": {
36557
+ "type": "object",
36558
+ "properties": {
36559
+ "source": {
36560
+ "oneOf": [
36561
+ {
36562
+ "type": "object",
36563
+ "properties": {
36564
+ "kind": {
36565
+ "const": "path"
36566
+ },
36567
+ "path": {
36568
+ "type": "string"
36569
+ }
36570
+ },
36571
+ "additionalProperties": false,
36572
+ "required": [
36573
+ "kind",
36574
+ "path"
36575
+ ]
36576
+ },
36577
+ {
36578
+ "type": "object",
36579
+ "properties": {
36580
+ "kind": {
36581
+ "const": "base64"
36582
+ },
36583
+ "data": {
36584
+ "type": "string"
36585
+ },
36586
+ "filename": {
36587
+ "type": "string"
36588
+ }
36589
+ },
36590
+ "additionalProperties": false,
36591
+ "required": [
36592
+ "kind",
36593
+ "data"
36594
+ ]
36595
+ }
36596
+ ]
36597
+ },
36598
+ "bodyPolicy": {
36599
+ "const": "preserve"
36600
+ }
36601
+ },
36602
+ "additionalProperties": false,
36603
+ "required": [
36604
+ "source"
36605
+ ]
36606
+ },
36607
+ "outputSchema": {
36608
+ "oneOf": [
36609
+ {
36610
+ "type": "object",
36611
+ "properties": {
36612
+ "success": {
36613
+ "const": true
36614
+ },
36615
+ "changed": {
36616
+ "type": "boolean"
36617
+ },
36618
+ "dryRun": {
36619
+ "type": "boolean"
36620
+ },
36621
+ "bodyPolicy": {
36622
+ "const": "preserve"
36623
+ },
36624
+ "source": {
36625
+ "type": "object",
36626
+ "properties": {
36627
+ "kind": {
36628
+ "enum": [
36629
+ "path",
36630
+ "base64"
36631
+ ]
36632
+ },
36633
+ "fingerprint": {
36634
+ "type": "string"
36635
+ },
36636
+ "partCount": {
36637
+ "type": "integer"
36638
+ }
36639
+ },
36640
+ "additionalProperties": false,
36641
+ "required": [
36642
+ "kind",
36643
+ "fingerprint",
36644
+ "partCount"
36645
+ ]
36646
+ },
36647
+ "detectedScopes": {
36648
+ "type": "array",
36649
+ "items": {
36650
+ "type": "object",
36651
+ "properties": {
36652
+ "scope": {
36653
+ "enum": [
36654
+ "styles",
36655
+ "numbering",
36656
+ "settings",
36657
+ "theme",
36658
+ "fontTable",
36659
+ "webSettings",
36660
+ "headersFooters",
36661
+ "sectionDefaults"
36662
+ ]
36663
+ },
36664
+ "part": {
36665
+ "type": "string"
36666
+ },
36667
+ "detail": {
36668
+ "type": "string"
36669
+ }
36670
+ },
36671
+ "additionalProperties": false,
36672
+ "required": [
36673
+ "scope",
36674
+ "part"
36675
+ ]
36676
+ }
36677
+ },
36678
+ "appliedScopes": {
36679
+ "type": "array",
36680
+ "items": {
36681
+ "type": "object",
36682
+ "properties": {
36683
+ "scope": {
36684
+ "enum": [
36685
+ "styles",
36686
+ "numbering",
36687
+ "settings",
36688
+ "theme",
36689
+ "fontTable",
36690
+ "webSettings",
36691
+ "headersFooters",
36692
+ "sectionDefaults"
36693
+ ]
36694
+ },
36695
+ "part": {
36696
+ "type": "string"
36697
+ },
36698
+ "detail": {
36699
+ "type": "string"
36700
+ }
36701
+ },
36702
+ "additionalProperties": false,
36703
+ "required": [
36704
+ "scope",
36705
+ "part"
36706
+ ]
36707
+ }
36708
+ },
36709
+ "skippedScopes": {
36710
+ "type": "array",
36711
+ "items": {
36712
+ "type": "object",
36713
+ "properties": {
36714
+ "scope": {
36715
+ "type": "string"
36716
+ },
36717
+ "part": {
36718
+ "type": "string"
36719
+ },
36720
+ "reason": {
36721
+ "enum": [
36722
+ "NOT_PRESENT_IN_SOURCE",
36723
+ "OUT_OF_SCOPE",
36724
+ "NO_CHANGE",
36725
+ "CAPABILITY_UNAVAILABLE"
36726
+ ]
36727
+ },
36728
+ "message": {
36729
+ "type": "string"
36730
+ }
36731
+ },
36732
+ "additionalProperties": false,
36733
+ "required": [
36734
+ "scope",
36735
+ "reason",
36736
+ "message"
36737
+ ]
36738
+ }
36739
+ },
36740
+ "unsupportedItems": {
36741
+ "type": "array",
36742
+ "items": {
36743
+ "type": "object",
36744
+ "properties": {
36745
+ "part": {
36746
+ "type": "string"
36747
+ },
36748
+ "category": {
36749
+ "type": "string"
36750
+ },
36751
+ "reason": {
36752
+ "type": "string"
36753
+ }
36754
+ },
36755
+ "additionalProperties": false,
36756
+ "required": [
36757
+ "part",
36758
+ "category",
36759
+ "reason"
36760
+ ]
36761
+ }
36762
+ },
36763
+ "changedParts": {
36764
+ "type": "array",
36765
+ "items": {
36766
+ "type": "object",
36767
+ "properties": {
36768
+ "part": {
36769
+ "type": "string"
36770
+ },
36771
+ "scope": {
36772
+ "enum": [
36773
+ "styles",
36774
+ "numbering",
36775
+ "settings",
36776
+ "theme",
36777
+ "fontTable",
36778
+ "webSettings",
36779
+ "headersFooters",
36780
+ "sectionDefaults",
36781
+ "package"
36782
+ ]
36783
+ },
36784
+ "change": {
36785
+ "enum": [
36786
+ "created",
36787
+ "replaced",
36788
+ "merged",
36789
+ "imported"
36790
+ ]
36791
+ }
36792
+ },
36793
+ "additionalProperties": false,
36794
+ "required": [
36795
+ "part",
36796
+ "scope",
36797
+ "change"
36798
+ ]
36799
+ }
36800
+ },
36801
+ "idMappings": {
36802
+ "type": "object",
36803
+ "properties": {
36804
+ "styles": {
36805
+ "type": "array",
36806
+ "items": {
36807
+ "type": "object",
36808
+ "properties": {
36809
+ "kind": {
36810
+ "enum": [
36811
+ "style",
36812
+ "numbering",
36813
+ "relationship"
36814
+ ]
36815
+ },
36816
+ "from": {
36817
+ "type": "string"
36818
+ },
36819
+ "to": {
36820
+ "type": "string"
36821
+ }
36822
+ },
36823
+ "additionalProperties": false,
36824
+ "required": [
36825
+ "kind",
36826
+ "from",
36827
+ "to"
36828
+ ]
36829
+ }
36830
+ },
36831
+ "numbering": {
36832
+ "type": "array",
36833
+ "items": {
36834
+ "type": "object",
36835
+ "properties": {
36836
+ "kind": {
36837
+ "enum": [
36838
+ "style",
36839
+ "numbering",
36840
+ "relationship"
36841
+ ]
36842
+ },
36843
+ "from": {
36844
+ "type": "string"
36845
+ },
36846
+ "to": {
36847
+ "type": "string"
36848
+ }
36849
+ },
36850
+ "additionalProperties": false,
36851
+ "required": [
36852
+ "kind",
36853
+ "from",
36854
+ "to"
36855
+ ]
36856
+ }
36857
+ },
36858
+ "relationships": {
36859
+ "type": "array",
36860
+ "items": {
36861
+ "type": "object",
36862
+ "properties": {
36863
+ "kind": {
36864
+ "enum": [
36865
+ "style",
36866
+ "numbering",
36867
+ "relationship"
36868
+ ]
36869
+ },
36870
+ "from": {
36871
+ "type": "string"
36872
+ },
36873
+ "to": {
36874
+ "type": "string"
36875
+ }
36876
+ },
36877
+ "additionalProperties": false,
36878
+ "required": [
36879
+ "kind",
36880
+ "from",
36881
+ "to"
36882
+ ]
36883
+ }
36884
+ }
36885
+ },
36886
+ "additionalProperties": false
36887
+ },
36888
+ "warnings": {
36889
+ "type": "array",
36890
+ "items": {
36891
+ "type": "object",
36892
+ "properties": {
36893
+ "code": {
36894
+ "type": "string"
36895
+ },
36896
+ "message": {
36897
+ "type": "string"
36898
+ }
36899
+ },
36900
+ "additionalProperties": false,
36901
+ "required": [
36902
+ "code",
36903
+ "message"
36904
+ ]
36905
+ }
36906
+ }
36907
+ },
36908
+ "additionalProperties": false,
36909
+ "required": [
36910
+ "success",
36911
+ "changed",
36912
+ "dryRun",
36913
+ "bodyPolicy",
36914
+ "source",
36915
+ "detectedScopes",
36916
+ "appliedScopes",
36917
+ "skippedScopes",
36918
+ "unsupportedItems",
36919
+ "changedParts",
36920
+ "idMappings",
36921
+ "warnings"
36922
+ ]
36923
+ },
36924
+ {
36925
+ "type": "object",
36926
+ "properties": {
36927
+ "success": {
36928
+ "const": false
36929
+ },
36930
+ "failure": {
36931
+ "type": "object",
36932
+ "properties": {
36933
+ "code": {
36934
+ "enum": [
36935
+ "UNSUPPORTED_SOURCE",
36936
+ "INVALID_PACKAGE",
36937
+ "CAPABILITY_UNAVAILABLE",
36938
+ "UNSUPPORTED_TEMPLATE_CONTENT"
36939
+ ]
36940
+ },
36941
+ "message": {
36942
+ "type": "string"
36943
+ }
36944
+ },
36945
+ "additionalProperties": false,
36946
+ "required": [
36947
+ "code",
36948
+ "message"
36949
+ ]
36950
+ }
36951
+ },
36952
+ "additionalProperties": false,
36953
+ "required": [
36954
+ "success",
36955
+ "failure"
36956
+ ]
36957
+ }
36958
+ ]
36959
+ },
36960
+ "successSchema": {
36961
+ "type": "object",
36962
+ "properties": {
36963
+ "success": {
36964
+ "const": true
36965
+ },
36966
+ "changed": {
36967
+ "type": "boolean"
36968
+ },
36969
+ "dryRun": {
36970
+ "type": "boolean"
36971
+ },
36972
+ "bodyPolicy": {
36973
+ "const": "preserve"
36974
+ },
36975
+ "source": {
36976
+ "type": "object",
36977
+ "properties": {
36978
+ "kind": {
36979
+ "enum": [
36980
+ "path",
36981
+ "base64"
36982
+ ]
36983
+ },
36984
+ "fingerprint": {
36985
+ "type": "string"
36986
+ },
36987
+ "partCount": {
36988
+ "type": "integer"
36989
+ }
36990
+ },
36991
+ "additionalProperties": false,
36992
+ "required": [
36993
+ "kind",
36994
+ "fingerprint",
36995
+ "partCount"
36996
+ ]
36997
+ },
36998
+ "detectedScopes": {
36999
+ "type": "array",
37000
+ "items": {
37001
+ "type": "object",
37002
+ "properties": {
37003
+ "scope": {
37004
+ "enum": [
37005
+ "styles",
37006
+ "numbering",
37007
+ "settings",
37008
+ "theme",
37009
+ "fontTable",
37010
+ "webSettings",
37011
+ "headersFooters",
37012
+ "sectionDefaults"
37013
+ ]
37014
+ },
37015
+ "part": {
37016
+ "type": "string"
37017
+ },
37018
+ "detail": {
37019
+ "type": "string"
37020
+ }
37021
+ },
37022
+ "additionalProperties": false,
37023
+ "required": [
37024
+ "scope",
37025
+ "part"
37026
+ ]
37027
+ }
37028
+ },
37029
+ "appliedScopes": {
37030
+ "type": "array",
37031
+ "items": {
37032
+ "type": "object",
37033
+ "properties": {
37034
+ "scope": {
37035
+ "enum": [
37036
+ "styles",
37037
+ "numbering",
37038
+ "settings",
37039
+ "theme",
37040
+ "fontTable",
37041
+ "webSettings",
37042
+ "headersFooters",
37043
+ "sectionDefaults"
37044
+ ]
37045
+ },
37046
+ "part": {
37047
+ "type": "string"
37048
+ },
37049
+ "detail": {
37050
+ "type": "string"
37051
+ }
37052
+ },
37053
+ "additionalProperties": false,
37054
+ "required": [
37055
+ "scope",
37056
+ "part"
37057
+ ]
37058
+ }
37059
+ },
37060
+ "skippedScopes": {
37061
+ "type": "array",
37062
+ "items": {
37063
+ "type": "object",
37064
+ "properties": {
37065
+ "scope": {
37066
+ "type": "string"
37067
+ },
37068
+ "part": {
37069
+ "type": "string"
37070
+ },
37071
+ "reason": {
37072
+ "enum": [
37073
+ "NOT_PRESENT_IN_SOURCE",
37074
+ "OUT_OF_SCOPE",
37075
+ "NO_CHANGE",
37076
+ "CAPABILITY_UNAVAILABLE"
37077
+ ]
37078
+ },
37079
+ "message": {
37080
+ "type": "string"
37081
+ }
37082
+ },
37083
+ "additionalProperties": false,
37084
+ "required": [
37085
+ "scope",
37086
+ "reason",
37087
+ "message"
37088
+ ]
37089
+ }
37090
+ },
37091
+ "unsupportedItems": {
37092
+ "type": "array",
37093
+ "items": {
37094
+ "type": "object",
37095
+ "properties": {
37096
+ "part": {
37097
+ "type": "string"
37098
+ },
37099
+ "category": {
37100
+ "type": "string"
37101
+ },
37102
+ "reason": {
37103
+ "type": "string"
37104
+ }
37105
+ },
37106
+ "additionalProperties": false,
37107
+ "required": [
37108
+ "part",
37109
+ "category",
37110
+ "reason"
37111
+ ]
37112
+ }
37113
+ },
37114
+ "changedParts": {
37115
+ "type": "array",
37116
+ "items": {
37117
+ "type": "object",
37118
+ "properties": {
37119
+ "part": {
37120
+ "type": "string"
37121
+ },
37122
+ "scope": {
37123
+ "enum": [
37124
+ "styles",
37125
+ "numbering",
37126
+ "settings",
37127
+ "theme",
37128
+ "fontTable",
37129
+ "webSettings",
37130
+ "headersFooters",
37131
+ "sectionDefaults",
37132
+ "package"
37133
+ ]
37134
+ },
37135
+ "change": {
37136
+ "enum": [
37137
+ "created",
37138
+ "replaced",
37139
+ "merged",
37140
+ "imported"
37141
+ ]
37142
+ }
37143
+ },
37144
+ "additionalProperties": false,
37145
+ "required": [
37146
+ "part",
37147
+ "scope",
37148
+ "change"
37149
+ ]
37150
+ }
37151
+ },
37152
+ "idMappings": {
37153
+ "type": "object",
37154
+ "properties": {
37155
+ "styles": {
37156
+ "type": "array",
37157
+ "items": {
37158
+ "type": "object",
37159
+ "properties": {
37160
+ "kind": {
37161
+ "enum": [
37162
+ "style",
37163
+ "numbering",
37164
+ "relationship"
37165
+ ]
37166
+ },
37167
+ "from": {
37168
+ "type": "string"
37169
+ },
37170
+ "to": {
37171
+ "type": "string"
37172
+ }
37173
+ },
37174
+ "additionalProperties": false,
37175
+ "required": [
37176
+ "kind",
37177
+ "from",
37178
+ "to"
37179
+ ]
37180
+ }
37181
+ },
37182
+ "numbering": {
37183
+ "type": "array",
37184
+ "items": {
37185
+ "type": "object",
37186
+ "properties": {
37187
+ "kind": {
37188
+ "enum": [
37189
+ "style",
37190
+ "numbering",
37191
+ "relationship"
37192
+ ]
37193
+ },
37194
+ "from": {
37195
+ "type": "string"
37196
+ },
37197
+ "to": {
37198
+ "type": "string"
37199
+ }
37200
+ },
37201
+ "additionalProperties": false,
37202
+ "required": [
37203
+ "kind",
37204
+ "from",
37205
+ "to"
37206
+ ]
37207
+ }
37208
+ },
37209
+ "relationships": {
37210
+ "type": "array",
37211
+ "items": {
37212
+ "type": "object",
37213
+ "properties": {
37214
+ "kind": {
37215
+ "enum": [
37216
+ "style",
37217
+ "numbering",
37218
+ "relationship"
37219
+ ]
37220
+ },
37221
+ "from": {
37222
+ "type": "string"
37223
+ },
37224
+ "to": {
37225
+ "type": "string"
37226
+ }
37227
+ },
37228
+ "additionalProperties": false,
37229
+ "required": [
37230
+ "kind",
37231
+ "from",
37232
+ "to"
37233
+ ]
37234
+ }
37235
+ }
37236
+ },
37237
+ "additionalProperties": false
37238
+ },
37239
+ "warnings": {
37240
+ "type": "array",
37241
+ "items": {
37242
+ "type": "object",
37243
+ "properties": {
37244
+ "code": {
37245
+ "type": "string"
37246
+ },
37247
+ "message": {
37248
+ "type": "string"
37249
+ }
37250
+ },
37251
+ "additionalProperties": false,
37252
+ "required": [
37253
+ "code",
37254
+ "message"
37255
+ ]
37256
+ }
37257
+ }
37258
+ },
37259
+ "additionalProperties": false,
37260
+ "required": [
37261
+ "success",
37262
+ "changed",
37263
+ "dryRun",
37264
+ "bodyPolicy",
37265
+ "source",
37266
+ "detectedScopes",
37267
+ "appliedScopes",
37268
+ "skippedScopes",
37269
+ "unsupportedItems",
37270
+ "changedParts",
37271
+ "idMappings",
37272
+ "warnings"
37273
+ ]
37274
+ },
37275
+ "failureSchema": {
37276
+ "type": "object",
37277
+ "properties": {
37278
+ "success": {
37279
+ "const": false
37280
+ },
37281
+ "failure": {
37282
+ "type": "object",
37283
+ "properties": {
37284
+ "code": {
37285
+ "enum": [
37286
+ "UNSUPPORTED_SOURCE",
37287
+ "INVALID_PACKAGE",
37288
+ "CAPABILITY_UNAVAILABLE",
37289
+ "UNSUPPORTED_TEMPLATE_CONTENT"
37290
+ ]
37291
+ },
37292
+ "message": {
37293
+ "type": "string"
37294
+ }
37295
+ },
37296
+ "additionalProperties": false,
37297
+ "required": [
37298
+ "code",
37299
+ "message"
37300
+ ]
37301
+ }
37302
+ },
37303
+ "additionalProperties": false,
37304
+ "required": [
37305
+ "success",
37306
+ "failure"
37307
+ ]
37308
+ }
37309
+ },
36429
37310
  "doc.create.paragraph": {
36430
37311
  "operationId": "doc.create.paragraph",
36431
37312
  "sdkSurface": "document",
@@ -38421,6 +39302,20 @@ const CONTRACT = {
38421
39302
  "upperRoman",
38422
39303
  "numberInDash"
38423
39304
  ]
39305
+ },
39306
+ "chapterStyle": {
39307
+ "type": "integer",
39308
+ "minimum": 1
39309
+ },
39310
+ "chapterSeparator": {
39311
+ "type": "string",
39312
+ "enum": [
39313
+ "hyphen",
39314
+ "period",
39315
+ "colon",
39316
+ "emDash",
39317
+ "enDash"
39318
+ ]
38424
39319
  }
38425
39320
  },
38426
39321
  "additionalProperties": false
@@ -39023,6 +39918,20 @@ const CONTRACT = {
39023
39918
  "upperRoman",
39024
39919
  "numberInDash"
39025
39920
  ]
39921
+ },
39922
+ "chapterStyle": {
39923
+ "type": "integer",
39924
+ "minimum": 1
39925
+ },
39926
+ "chapterSeparator": {
39927
+ "type": "string",
39928
+ "enum": [
39929
+ "hyphen",
39930
+ "period",
39931
+ "colon",
39932
+ "emDash",
39933
+ "enDash"
39934
+ ]
39026
39935
  }
39027
39936
  },
39028
39937
  "additionalProperties": false
@@ -40792,309 +41701,340 @@ const CONTRACT = {
40792
41701
  ]
40793
41702
  }
40794
41703
  },
40795
- {
40796
- "name": "enabled",
40797
- "kind": "flag",
40798
- "type": "boolean",
40799
- "required": true
40800
- },
40801
- {
40802
- "name": "countBy",
40803
- "kind": "flag",
40804
- "type": "number",
40805
- "flag": "count-by"
40806
- },
41704
+ {
41705
+ "name": "enabled",
41706
+ "kind": "flag",
41707
+ "type": "boolean",
41708
+ "required": true
41709
+ },
41710
+ {
41711
+ "name": "countBy",
41712
+ "kind": "flag",
41713
+ "type": "number",
41714
+ "flag": "count-by"
41715
+ },
41716
+ {
41717
+ "name": "start",
41718
+ "kind": "flag",
41719
+ "type": "number"
41720
+ },
41721
+ {
41722
+ "name": "distance",
41723
+ "kind": "flag",
41724
+ "type": "number"
41725
+ },
41726
+ {
41727
+ "name": "restart",
41728
+ "kind": "flag",
41729
+ "type": "string",
41730
+ "schema": {
41731
+ "oneOf": [
41732
+ {
41733
+ "const": "continuous"
41734
+ },
41735
+ {
41736
+ "const": "newPage"
41737
+ },
41738
+ {
41739
+ "const": "newSection"
41740
+ }
41741
+ ]
41742
+ }
41743
+ }
41744
+ ],
41745
+ "constraints": null,
41746
+ "mutates": true,
41747
+ "idempotency": "conditional",
41748
+ "supportsTrackedMode": false,
41749
+ "supportsDryRun": true,
41750
+ "inputSchema": {
41751
+ "type": "object",
41752
+ "properties": {
41753
+ "target": {
41754
+ "$ref": "#/$defs/SectionAddress"
41755
+ },
41756
+ "enabled": {
41757
+ "type": "boolean"
41758
+ },
41759
+ "countBy": {
41760
+ "type": "integer",
41761
+ "minimum": 1
41762
+ },
41763
+ "start": {
41764
+ "type": "integer",
41765
+ "minimum": 1
41766
+ },
41767
+ "distance": {
41768
+ "type": "number",
41769
+ "minimum": 0
41770
+ },
41771
+ "restart": {
41772
+ "enum": [
41773
+ "continuous",
41774
+ "newPage",
41775
+ "newSection"
41776
+ ]
41777
+ }
41778
+ },
41779
+ "additionalProperties": false,
41780
+ "required": [
41781
+ "target",
41782
+ "enabled"
41783
+ ]
41784
+ },
41785
+ "outputSchema": {
41786
+ "oneOf": [
41787
+ {
41788
+ "type": "object",
41789
+ "properties": {
41790
+ "success": {
41791
+ "const": true
41792
+ },
41793
+ "section": {
41794
+ "$ref": "#/$defs/SectionAddress"
41795
+ }
41796
+ },
41797
+ "additionalProperties": false,
41798
+ "required": [
41799
+ "success",
41800
+ "section"
41801
+ ]
41802
+ },
41803
+ {
41804
+ "type": "object",
41805
+ "properties": {
41806
+ "success": {
41807
+ "const": false
41808
+ },
41809
+ "failure": {
41810
+ "type": "object",
41811
+ "properties": {
41812
+ "code": {
41813
+ "enum": [
41814
+ "NO_OP",
41815
+ "INVALID_TARGET",
41816
+ "CAPABILITY_UNAVAILABLE"
41817
+ ]
41818
+ },
41819
+ "message": {
41820
+ "type": "string"
41821
+ },
41822
+ "details": {}
41823
+ },
41824
+ "additionalProperties": false,
41825
+ "required": [
41826
+ "code",
41827
+ "message"
41828
+ ]
41829
+ }
41830
+ },
41831
+ "additionalProperties": false,
41832
+ "required": [
41833
+ "success",
41834
+ "failure"
41835
+ ]
41836
+ }
41837
+ ]
41838
+ },
41839
+ "successSchema": {
41840
+ "type": "object",
41841
+ "properties": {
41842
+ "success": {
41843
+ "const": true
41844
+ },
41845
+ "section": {
41846
+ "$ref": "#/$defs/SectionAddress"
41847
+ }
41848
+ },
41849
+ "additionalProperties": false,
41850
+ "required": [
41851
+ "success",
41852
+ "section"
41853
+ ]
41854
+ },
41855
+ "failureSchema": {
41856
+ "type": "object",
41857
+ "properties": {
41858
+ "success": {
41859
+ "const": false
41860
+ },
41861
+ "failure": {
41862
+ "type": "object",
41863
+ "properties": {
41864
+ "code": {
41865
+ "enum": [
41866
+ "NO_OP",
41867
+ "INVALID_TARGET",
41868
+ "CAPABILITY_UNAVAILABLE"
41869
+ ]
41870
+ },
41871
+ "message": {
41872
+ "type": "string"
41873
+ },
41874
+ "details": {}
41875
+ },
41876
+ "additionalProperties": false,
41877
+ "required": [
41878
+ "code",
41879
+ "message"
41880
+ ]
41881
+ }
41882
+ },
41883
+ "additionalProperties": false,
41884
+ "required": [
41885
+ "success",
41886
+ "failure"
41887
+ ]
41888
+ }
41889
+ },
41890
+ "doc.sections.setPageNumbering": {
41891
+ "operationId": "doc.sections.setPageNumbering",
41892
+ "sdkSurface": "document",
41893
+ "command": "sections set-page-numbering",
41894
+ "commandTokens": [
41895
+ "sections",
41896
+ "set-page-numbering"
41897
+ ],
41898
+ "category": "sections",
41899
+ "description": "Set page numbering format/start and chapter numbering settings for a section.",
41900
+ "requiresDocumentContext": true,
41901
+ "docRequirement": "optional",
41902
+ "responseEnvelopeKey": "result",
41903
+ "params": [
41904
+ {
41905
+ "name": "doc",
41906
+ "kind": "doc",
41907
+ "type": "string",
41908
+ "description": "Document path. Optional when a session is already open."
41909
+ },
41910
+ {
41911
+ "name": "sessionId",
41912
+ "kind": "flag",
41913
+ "type": "string",
41914
+ "flag": "session",
41915
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
41916
+ },
41917
+ {
41918
+ "name": "out",
41919
+ "kind": "flag",
41920
+ "type": "string",
41921
+ "agentVisible": false
41922
+ },
41923
+ {
41924
+ "name": "force",
41925
+ "kind": "flag",
41926
+ "type": "boolean",
41927
+ "description": "Bypass confirmation checks."
41928
+ },
41929
+ {
41930
+ "name": "expectedRevision",
41931
+ "kind": "flag",
41932
+ "type": "number",
41933
+ "flag": "expected-revision",
41934
+ "agentVisible": false
41935
+ },
41936
+ {
41937
+ "name": "changeMode",
41938
+ "kind": "flag",
41939
+ "type": "string",
41940
+ "flag": "change-mode",
41941
+ "schema": {
41942
+ "type": "string",
41943
+ "enum": [
41944
+ "direct",
41945
+ "tracked"
41946
+ ]
41947
+ },
41948
+ "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
41949
+ },
41950
+ {
41951
+ "name": "dryRun",
41952
+ "kind": "flag",
41953
+ "type": "boolean",
41954
+ "flag": "dry-run",
41955
+ "description": "Preview the result without applying changes."
41956
+ },
41957
+ {
41958
+ "name": "target",
41959
+ "kind": "jsonFlag",
41960
+ "type": "json",
41961
+ "flag": "target-json",
41962
+ "required": true,
41963
+ "schema": {
41964
+ "type": "object",
41965
+ "properties": {
41966
+ "kind": {
41967
+ "const": "section"
41968
+ },
41969
+ "sectionId": {
41970
+ "type": "string"
41971
+ }
41972
+ },
41973
+ "required": [
41974
+ "kind",
41975
+ "sectionId"
41976
+ ]
41977
+ }
41978
+ },
40807
41979
  {
40808
41980
  "name": "start",
40809
41981
  "kind": "flag",
40810
41982
  "type": "number"
40811
41983
  },
40812
41984
  {
40813
- "name": "distance",
40814
- "kind": "flag",
40815
- "type": "number"
40816
- },
40817
- {
40818
- "name": "restart",
41985
+ "name": "format",
40819
41986
  "kind": "flag",
40820
41987
  "type": "string",
40821
41988
  "schema": {
40822
41989
  "oneOf": [
40823
41990
  {
40824
- "const": "continuous"
41991
+ "const": "decimal"
40825
41992
  },
40826
41993
  {
40827
- "const": "newPage"
41994
+ "const": "lowerLetter"
40828
41995
  },
40829
41996
  {
40830
- "const": "newSection"
40831
- }
40832
- ]
40833
- }
40834
- }
40835
- ],
40836
- "constraints": null,
40837
- "mutates": true,
40838
- "idempotency": "conditional",
40839
- "supportsTrackedMode": false,
40840
- "supportsDryRun": true,
40841
- "inputSchema": {
40842
- "type": "object",
40843
- "properties": {
40844
- "target": {
40845
- "$ref": "#/$defs/SectionAddress"
40846
- },
40847
- "enabled": {
40848
- "type": "boolean"
40849
- },
40850
- "countBy": {
40851
- "type": "integer",
40852
- "minimum": 1
40853
- },
40854
- "start": {
40855
- "type": "integer",
40856
- "minimum": 1
40857
- },
40858
- "distance": {
40859
- "type": "number",
40860
- "minimum": 0
40861
- },
40862
- "restart": {
40863
- "enum": [
40864
- "continuous",
40865
- "newPage",
40866
- "newSection"
40867
- ]
40868
- }
40869
- },
40870
- "additionalProperties": false,
40871
- "required": [
40872
- "target",
40873
- "enabled"
40874
- ]
40875
- },
40876
- "outputSchema": {
40877
- "oneOf": [
40878
- {
40879
- "type": "object",
40880
- "properties": {
40881
- "success": {
40882
- "const": true
40883
- },
40884
- "section": {
40885
- "$ref": "#/$defs/SectionAddress"
40886
- }
40887
- },
40888
- "additionalProperties": false,
40889
- "required": [
40890
- "success",
40891
- "section"
40892
- ]
40893
- },
40894
- {
40895
- "type": "object",
40896
- "properties": {
40897
- "success": {
40898
- "const": false
40899
- },
40900
- "failure": {
40901
- "type": "object",
40902
- "properties": {
40903
- "code": {
40904
- "enum": [
40905
- "NO_OP",
40906
- "INVALID_TARGET",
40907
- "CAPABILITY_UNAVAILABLE"
40908
- ]
40909
- },
40910
- "message": {
40911
- "type": "string"
40912
- },
40913
- "details": {}
40914
- },
40915
- "additionalProperties": false,
40916
- "required": [
40917
- "code",
40918
- "message"
40919
- ]
40920
- }
40921
- },
40922
- "additionalProperties": false,
40923
- "required": [
40924
- "success",
40925
- "failure"
40926
- ]
40927
- }
40928
- ]
40929
- },
40930
- "successSchema": {
40931
- "type": "object",
40932
- "properties": {
40933
- "success": {
40934
- "const": true
40935
- },
40936
- "section": {
40937
- "$ref": "#/$defs/SectionAddress"
40938
- }
40939
- },
40940
- "additionalProperties": false,
40941
- "required": [
40942
- "success",
40943
- "section"
40944
- ]
40945
- },
40946
- "failureSchema": {
40947
- "type": "object",
40948
- "properties": {
40949
- "success": {
40950
- "const": false
40951
- },
40952
- "failure": {
40953
- "type": "object",
40954
- "properties": {
40955
- "code": {
40956
- "enum": [
40957
- "NO_OP",
40958
- "INVALID_TARGET",
40959
- "CAPABILITY_UNAVAILABLE"
40960
- ]
41997
+ "const": "upperLetter"
40961
41998
  },
40962
- "message": {
40963
- "type": "string"
41999
+ {
42000
+ "const": "lowerRoman"
40964
42001
  },
40965
- "details": {}
40966
- },
40967
- "additionalProperties": false,
40968
- "required": [
40969
- "code",
40970
- "message"
40971
- ]
40972
- }
40973
- },
40974
- "additionalProperties": false,
40975
- "required": [
40976
- "success",
40977
- "failure"
40978
- ]
40979
- }
40980
- },
40981
- "doc.sections.setPageNumbering": {
40982
- "operationId": "doc.sections.setPageNumbering",
40983
- "sdkSurface": "document",
40984
- "command": "sections set-page-numbering",
40985
- "commandTokens": [
40986
- "sections",
40987
- "set-page-numbering"
40988
- ],
40989
- "category": "sections",
40990
- "description": "Set page numbering format/start for a section.",
40991
- "requiresDocumentContext": true,
40992
- "docRequirement": "optional",
40993
- "responseEnvelopeKey": "result",
40994
- "params": [
40995
- {
40996
- "name": "doc",
40997
- "kind": "doc",
40998
- "type": "string",
40999
- "description": "Document path. Optional when a session is already open."
41000
- },
41001
- {
41002
- "name": "sessionId",
41003
- "kind": "flag",
41004
- "type": "string",
41005
- "flag": "session",
41006
- "description": "Session ID for multi-session workflows. Optional when only one session is open."
41007
- },
41008
- {
41009
- "name": "out",
41010
- "kind": "flag",
41011
- "type": "string",
41012
- "agentVisible": false
41013
- },
41014
- {
41015
- "name": "force",
41016
- "kind": "flag",
41017
- "type": "boolean",
41018
- "description": "Bypass confirmation checks."
41019
- },
41020
- {
41021
- "name": "expectedRevision",
41022
- "kind": "flag",
41023
- "type": "number",
41024
- "flag": "expected-revision",
41025
- "agentVisible": false
41026
- },
41027
- {
41028
- "name": "changeMode",
41029
- "kind": "flag",
41030
- "type": "string",
41031
- "flag": "change-mode",
41032
- "schema": {
41033
- "type": "string",
41034
- "enum": [
41035
- "direct",
41036
- "tracked"
41037
- ]
41038
- },
41039
- "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
41040
- },
41041
- {
41042
- "name": "dryRun",
41043
- "kind": "flag",
41044
- "type": "boolean",
41045
- "flag": "dry-run",
41046
- "description": "Preview the result without applying changes."
41047
- },
41048
- {
41049
- "name": "target",
41050
- "kind": "jsonFlag",
41051
- "type": "json",
41052
- "flag": "target-json",
41053
- "required": true,
41054
- "schema": {
41055
- "type": "object",
41056
- "properties": {
41057
- "kind": {
41058
- "const": "section"
42002
+ {
42003
+ "const": "upperRoman"
41059
42004
  },
41060
- "sectionId": {
41061
- "type": "string"
42005
+ {
42006
+ "const": "numberInDash"
41062
42007
  }
41063
- },
41064
- "required": [
41065
- "kind",
41066
- "sectionId"
41067
42008
  ]
41068
42009
  }
41069
42010
  },
41070
42011
  {
41071
- "name": "start",
42012
+ "name": "chapterStyle",
41072
42013
  "kind": "flag",
41073
- "type": "number"
42014
+ "type": "number",
42015
+ "flag": "chapter-style"
41074
42016
  },
41075
42017
  {
41076
- "name": "format",
42018
+ "name": "chapterSeparator",
41077
42019
  "kind": "flag",
41078
42020
  "type": "string",
42021
+ "flag": "chapter-separator",
41079
42022
  "schema": {
41080
42023
  "oneOf": [
41081
42024
  {
41082
- "const": "decimal"
41083
- },
41084
- {
41085
- "const": "lowerLetter"
42025
+ "const": "hyphen"
41086
42026
  },
41087
42027
  {
41088
- "const": "upperLetter"
42028
+ "const": "period"
41089
42029
  },
41090
42030
  {
41091
- "const": "lowerRoman"
42031
+ "const": "colon"
41092
42032
  },
41093
42033
  {
41094
- "const": "upperRoman"
42034
+ "const": "emDash"
41095
42035
  },
41096
42036
  {
41097
- "const": "numberInDash"
42037
+ "const": "enDash"
41098
42038
  }
41099
42039
  ]
41100
42040
  }
@@ -41124,13 +42064,27 @@ const CONTRACT = {
41124
42064
  "upperRoman",
41125
42065
  "numberInDash"
41126
42066
  ]
42067
+ },
42068
+ "chapterStyle": {
42069
+ "type": "integer",
42070
+ "minimum": 1
42071
+ },
42072
+ "chapterSeparator": {
42073
+ "type": "string",
42074
+ "enum": [
42075
+ "hyphen",
42076
+ "period",
42077
+ "colon",
42078
+ "emDash",
42079
+ "enDash"
42080
+ ]
41127
42081
  }
41128
42082
  },
41129
42083
  "additionalProperties": false,
41130
42084
  "required": [
41131
42085
  "target"
41132
42086
  ],
41133
- "oneOf": [
42087
+ "anyOf": [
41134
42088
  {
41135
42089
  "required": [
41136
42090
  "target",
@@ -41142,6 +42096,18 @@ const CONTRACT = {
41142
42096
  "target",
41143
42097
  "format"
41144
42098
  ]
42099
+ },
42100
+ {
42101
+ "required": [
42102
+ "target",
42103
+ "chapterStyle"
42104
+ ]
42105
+ },
42106
+ {
42107
+ "required": [
42108
+ "target",
42109
+ "chapterSeparator"
42110
+ ]
41145
42111
  }
41146
42112
  ]
41147
42113
  },
@@ -64950,7 +65916,8 @@ const CONTRACT = {
64950
65916
  "insert",
64951
65917
  "delete",
64952
65918
  "replacement",
64953
- "format"
65919
+ "format",
65920
+ "structural"
64954
65921
  ]
64955
65922
  },
64956
65923
  "trackedChangeDisplayType": {
@@ -65143,7 +66110,8 @@ const CONTRACT = {
65143
66110
  "insert",
65144
66111
  "delete",
65145
66112
  "replacement",
65146
- "format"
66113
+ "format",
66114
+ "structural"
65147
66115
  ]
65148
66116
  },
65149
66117
  "trackedChangeDisplayType": {
@@ -65271,11 +66239,14 @@ const CONTRACT = {
65271
66239
  },
65272
66240
  {
65273
66241
  "const": "format"
66242
+ },
66243
+ {
66244
+ "const": "structural"
65274
66245
  }
65275
66246
  ],
65276
- "description": "Filter by change type: 'insert', 'delete', 'replacement', or 'format'."
66247
+ "description": "Filter by change type: 'insert', 'delete', 'replacement', 'format', or 'structural'."
65277
66248
  },
65278
- "description": "Filter by change type: 'insert', 'delete', 'replacement', or 'format'."
66249
+ "description": "Filter by change type: 'insert', 'delete', 'replacement', 'format', or 'structural'."
65279
66250
  },
65280
66251
  {
65281
66252
  "name": "in",
@@ -65471,9 +66442,10 @@ const CONTRACT = {
65471
66442
  "insert",
65472
66443
  "delete",
65473
66444
  "replacement",
65474
- "format"
66445
+ "format",
66446
+ "structural"
65475
66447
  ],
65476
- "description": "Filter by change type: 'insert', 'delete', 'replacement', or 'format'."
66448
+ "description": "Filter by change type: 'insert', 'delete', 'replacement', 'format', or 'structural'."
65477
66449
  },
65478
66450
  "in": {
65479
66451
  "oneOf": [
@@ -65518,9 +66490,17 @@ const CONTRACT = {
65518
66490
  "insert",
65519
66491
  "delete",
65520
66492
  "replacement",
65521
- "format"
66493
+ "format",
66494
+ "structural"
65522
66495
  ]
65523
66496
  },
66497
+ "subtype": {
66498
+ "enum": [
66499
+ "table-insert",
66500
+ "table-delete"
66501
+ ],
66502
+ "description": "Finer classification for structural changes (type === 'structural')."
66503
+ },
65524
66504
  "grouping": {
65525
66505
  "enum": [
65526
66506
  "standalone",
@@ -65830,9 +66810,17 @@ const CONTRACT = {
65830
66810
  "insert",
65831
66811
  "delete",
65832
66812
  "replacement",
65833
- "format"
66813
+ "format",
66814
+ "structural"
65834
66815
  ]
65835
66816
  },
66817
+ "subtype": {
66818
+ "enum": [
66819
+ "table-insert",
66820
+ "table-delete"
66821
+ ],
66822
+ "description": "Finer classification for structural changes (type === 'structural')."
66823
+ },
65836
66824
  "grouping": {
65837
66825
  "enum": [
65838
66826
  "standalone",
@@ -66140,6 +67128,11 @@ const CONTRACT = {
66140
67128
  }
66141
67129
  ],
66142
67130
  "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."
67131
+ },
67132
+ "range": {
67133
+ "type": "object",
67134
+ "properties": {},
67135
+ "description": "Partial-range qualifier on an id target. Rejected with INVALID_INPUT for indivisible (e.g. structural) revisions."
66143
67136
  }
66144
67137
  },
66145
67138
  "required": [
@@ -66723,6 +67716,10 @@ const CONTRACT = {
66723
67716
  },
66724
67717
  "story": {
66725
67718
  "$ref": "#/$defs/StoryLocator"
67719
+ },
67720
+ "range": {
67721
+ "type": "object",
67722
+ "description": "Partial-range qualifier on an id target. Rejected with INVALID_INPUT for indivisible (e.g. structural) revisions."
66726
67723
  }
66727
67724
  },
66728
67725
  "additionalProperties": false,
@@ -83713,6 +84710,41 @@ const CONTRACT = {
83713
84710
  "dryRun"
83714
84711
  ]
83715
84712
  },
84713
+ "templates.apply": {
84714
+ "type": "object",
84715
+ "properties": {
84716
+ "available": {
84717
+ "type": "boolean"
84718
+ },
84719
+ "tracked": {
84720
+ "type": "boolean"
84721
+ },
84722
+ "dryRun": {
84723
+ "type": "boolean"
84724
+ },
84725
+ "reasons": {
84726
+ "type": "array",
84727
+ "items": {
84728
+ "enum": [
84729
+ "COMMAND_UNAVAILABLE",
84730
+ "HELPER_UNAVAILABLE",
84731
+ "OPERATION_UNAVAILABLE",
84732
+ "TRACKED_MODE_UNAVAILABLE",
84733
+ "DRY_RUN_UNAVAILABLE",
84734
+ "NAMESPACE_UNAVAILABLE",
84735
+ "STYLES_PART_MISSING",
84736
+ "COLLABORATION_ACTIVE"
84737
+ ]
84738
+ }
84739
+ }
84740
+ },
84741
+ "additionalProperties": false,
84742
+ "required": [
84743
+ "available",
84744
+ "tracked",
84745
+ "dryRun"
84746
+ ]
84747
+ },
83716
84748
  "create.paragraph": {
83717
84749
  "type": "object",
83718
84750
  "properties": {
@@ -95714,6 +96746,7 @@ const CONTRACT = {
95714
96746
  "format.stylisticSets",
95715
96747
  "format.contextualAlternates",
95716
96748
  "styles.apply",
96749
+ "templates.apply",
95717
96750
  "create.paragraph",
95718
96751
  "create.heading",
95719
96752
  "create.sectionBreak",