@superdoc-dev/sdk 1.15.0-next.9 → 1.16.0-next.1

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.
@@ -36426,6 +36426,886 @@ const CONTRACT = {
36426
36426
  ]
36427
36427
  }
36428
36428
  },
36429
+ "doc.templates.apply": {
36430
+ "operationId": "doc.templates.apply",
36431
+ "sdkSurface": "document",
36432
+ "command": "templates apply",
36433
+ "commandTokens": [
36434
+ "templates",
36435
+ "apply"
36436
+ ],
36437
+ "category": "core",
36438
+ "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.",
36439
+ "requiresDocumentContext": true,
36440
+ "docRequirement": "optional",
36441
+ "responseEnvelopeKey": "receipt",
36442
+ "params": [
36443
+ {
36444
+ "name": "doc",
36445
+ "kind": "doc",
36446
+ "type": "string",
36447
+ "description": "Document path. Optional when a session is already open."
36448
+ },
36449
+ {
36450
+ "name": "sessionId",
36451
+ "kind": "flag",
36452
+ "type": "string",
36453
+ "flag": "session",
36454
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
36455
+ },
36456
+ {
36457
+ "name": "out",
36458
+ "kind": "flag",
36459
+ "type": "string",
36460
+ "agentVisible": false
36461
+ },
36462
+ {
36463
+ "name": "force",
36464
+ "kind": "flag",
36465
+ "type": "boolean",
36466
+ "description": "Bypass confirmation checks."
36467
+ },
36468
+ {
36469
+ "name": "expectedRevision",
36470
+ "kind": "flag",
36471
+ "type": "number",
36472
+ "flag": "expected-revision",
36473
+ "agentVisible": false
36474
+ },
36475
+ {
36476
+ "name": "changeMode",
36477
+ "kind": "flag",
36478
+ "type": "string",
36479
+ "flag": "change-mode",
36480
+ "schema": {
36481
+ "type": "string",
36482
+ "enum": [
36483
+ "direct",
36484
+ "tracked"
36485
+ ]
36486
+ },
36487
+ "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
36488
+ },
36489
+ {
36490
+ "name": "dryRun",
36491
+ "kind": "flag",
36492
+ "type": "boolean",
36493
+ "flag": "dry-run",
36494
+ "description": "Preview the result without applying changes."
36495
+ },
36496
+ {
36497
+ "name": "source",
36498
+ "kind": "jsonFlag",
36499
+ "type": "json",
36500
+ "flag": "source-json",
36501
+ "required": true,
36502
+ "schema": {
36503
+ "oneOf": [
36504
+ {
36505
+ "type": "object",
36506
+ "properties": {
36507
+ "kind": {
36508
+ "const": "path"
36509
+ },
36510
+ "path": {
36511
+ "type": "string"
36512
+ }
36513
+ },
36514
+ "required": [
36515
+ "kind",
36516
+ "path"
36517
+ ]
36518
+ },
36519
+ {
36520
+ "type": "object",
36521
+ "properties": {
36522
+ "kind": {
36523
+ "const": "base64"
36524
+ },
36525
+ "data": {
36526
+ "type": "string"
36527
+ },
36528
+ "filename": {
36529
+ "type": "string"
36530
+ }
36531
+ },
36532
+ "required": [
36533
+ "kind",
36534
+ "data"
36535
+ ]
36536
+ }
36537
+ ]
36538
+ }
36539
+ },
36540
+ {
36541
+ "name": "bodyPolicy",
36542
+ "kind": "jsonFlag",
36543
+ "type": "json",
36544
+ "flag": "body-policy-json",
36545
+ "schema": {
36546
+ "const": "preserve"
36547
+ }
36548
+ }
36549
+ ],
36550
+ "constraints": null,
36551
+ "mutates": true,
36552
+ "idempotency": "conditional",
36553
+ "supportsTrackedMode": false,
36554
+ "supportsDryRun": true,
36555
+ "inputSchema": {
36556
+ "type": "object",
36557
+ "properties": {
36558
+ "source": {
36559
+ "oneOf": [
36560
+ {
36561
+ "type": "object",
36562
+ "properties": {
36563
+ "kind": {
36564
+ "const": "path"
36565
+ },
36566
+ "path": {
36567
+ "type": "string"
36568
+ }
36569
+ },
36570
+ "additionalProperties": false,
36571
+ "required": [
36572
+ "kind",
36573
+ "path"
36574
+ ]
36575
+ },
36576
+ {
36577
+ "type": "object",
36578
+ "properties": {
36579
+ "kind": {
36580
+ "const": "base64"
36581
+ },
36582
+ "data": {
36583
+ "type": "string"
36584
+ },
36585
+ "filename": {
36586
+ "type": "string"
36587
+ }
36588
+ },
36589
+ "additionalProperties": false,
36590
+ "required": [
36591
+ "kind",
36592
+ "data"
36593
+ ]
36594
+ }
36595
+ ]
36596
+ },
36597
+ "bodyPolicy": {
36598
+ "const": "preserve"
36599
+ }
36600
+ },
36601
+ "additionalProperties": false,
36602
+ "required": [
36603
+ "source"
36604
+ ]
36605
+ },
36606
+ "outputSchema": {
36607
+ "oneOf": [
36608
+ {
36609
+ "type": "object",
36610
+ "properties": {
36611
+ "success": {
36612
+ "const": true
36613
+ },
36614
+ "changed": {
36615
+ "type": "boolean"
36616
+ },
36617
+ "dryRun": {
36618
+ "type": "boolean"
36619
+ },
36620
+ "bodyPolicy": {
36621
+ "const": "preserve"
36622
+ },
36623
+ "source": {
36624
+ "type": "object",
36625
+ "properties": {
36626
+ "kind": {
36627
+ "enum": [
36628
+ "path",
36629
+ "base64"
36630
+ ]
36631
+ },
36632
+ "fingerprint": {
36633
+ "type": "string"
36634
+ },
36635
+ "partCount": {
36636
+ "type": "integer"
36637
+ }
36638
+ },
36639
+ "additionalProperties": false,
36640
+ "required": [
36641
+ "kind",
36642
+ "fingerprint",
36643
+ "partCount"
36644
+ ]
36645
+ },
36646
+ "detectedScopes": {
36647
+ "type": "array",
36648
+ "items": {
36649
+ "type": "object",
36650
+ "properties": {
36651
+ "scope": {
36652
+ "enum": [
36653
+ "styles",
36654
+ "numbering",
36655
+ "settings",
36656
+ "theme",
36657
+ "fontTable",
36658
+ "webSettings",
36659
+ "headersFooters",
36660
+ "sectionDefaults"
36661
+ ]
36662
+ },
36663
+ "part": {
36664
+ "type": "string"
36665
+ },
36666
+ "detail": {
36667
+ "type": "string"
36668
+ }
36669
+ },
36670
+ "additionalProperties": false,
36671
+ "required": [
36672
+ "scope",
36673
+ "part"
36674
+ ]
36675
+ }
36676
+ },
36677
+ "appliedScopes": {
36678
+ "type": "array",
36679
+ "items": {
36680
+ "type": "object",
36681
+ "properties": {
36682
+ "scope": {
36683
+ "enum": [
36684
+ "styles",
36685
+ "numbering",
36686
+ "settings",
36687
+ "theme",
36688
+ "fontTable",
36689
+ "webSettings",
36690
+ "headersFooters",
36691
+ "sectionDefaults"
36692
+ ]
36693
+ },
36694
+ "part": {
36695
+ "type": "string"
36696
+ },
36697
+ "detail": {
36698
+ "type": "string"
36699
+ }
36700
+ },
36701
+ "additionalProperties": false,
36702
+ "required": [
36703
+ "scope",
36704
+ "part"
36705
+ ]
36706
+ }
36707
+ },
36708
+ "skippedScopes": {
36709
+ "type": "array",
36710
+ "items": {
36711
+ "type": "object",
36712
+ "properties": {
36713
+ "scope": {
36714
+ "type": "string"
36715
+ },
36716
+ "part": {
36717
+ "type": "string"
36718
+ },
36719
+ "reason": {
36720
+ "enum": [
36721
+ "NOT_PRESENT_IN_SOURCE",
36722
+ "OUT_OF_SCOPE",
36723
+ "NO_CHANGE",
36724
+ "CAPABILITY_UNAVAILABLE"
36725
+ ]
36726
+ },
36727
+ "message": {
36728
+ "type": "string"
36729
+ }
36730
+ },
36731
+ "additionalProperties": false,
36732
+ "required": [
36733
+ "scope",
36734
+ "reason",
36735
+ "message"
36736
+ ]
36737
+ }
36738
+ },
36739
+ "unsupportedItems": {
36740
+ "type": "array",
36741
+ "items": {
36742
+ "type": "object",
36743
+ "properties": {
36744
+ "part": {
36745
+ "type": "string"
36746
+ },
36747
+ "category": {
36748
+ "type": "string"
36749
+ },
36750
+ "reason": {
36751
+ "type": "string"
36752
+ }
36753
+ },
36754
+ "additionalProperties": false,
36755
+ "required": [
36756
+ "part",
36757
+ "category",
36758
+ "reason"
36759
+ ]
36760
+ }
36761
+ },
36762
+ "changedParts": {
36763
+ "type": "array",
36764
+ "items": {
36765
+ "type": "object",
36766
+ "properties": {
36767
+ "part": {
36768
+ "type": "string"
36769
+ },
36770
+ "scope": {
36771
+ "enum": [
36772
+ "styles",
36773
+ "numbering",
36774
+ "settings",
36775
+ "theme",
36776
+ "fontTable",
36777
+ "webSettings",
36778
+ "headersFooters",
36779
+ "sectionDefaults",
36780
+ "package"
36781
+ ]
36782
+ },
36783
+ "change": {
36784
+ "enum": [
36785
+ "created",
36786
+ "replaced",
36787
+ "merged",
36788
+ "imported"
36789
+ ]
36790
+ }
36791
+ },
36792
+ "additionalProperties": false,
36793
+ "required": [
36794
+ "part",
36795
+ "scope",
36796
+ "change"
36797
+ ]
36798
+ }
36799
+ },
36800
+ "idMappings": {
36801
+ "type": "object",
36802
+ "properties": {
36803
+ "styles": {
36804
+ "type": "array",
36805
+ "items": {
36806
+ "type": "object",
36807
+ "properties": {
36808
+ "kind": {
36809
+ "enum": [
36810
+ "style",
36811
+ "numbering",
36812
+ "relationship"
36813
+ ]
36814
+ },
36815
+ "from": {
36816
+ "type": "string"
36817
+ },
36818
+ "to": {
36819
+ "type": "string"
36820
+ }
36821
+ },
36822
+ "additionalProperties": false,
36823
+ "required": [
36824
+ "kind",
36825
+ "from",
36826
+ "to"
36827
+ ]
36828
+ }
36829
+ },
36830
+ "numbering": {
36831
+ "type": "array",
36832
+ "items": {
36833
+ "type": "object",
36834
+ "properties": {
36835
+ "kind": {
36836
+ "enum": [
36837
+ "style",
36838
+ "numbering",
36839
+ "relationship"
36840
+ ]
36841
+ },
36842
+ "from": {
36843
+ "type": "string"
36844
+ },
36845
+ "to": {
36846
+ "type": "string"
36847
+ }
36848
+ },
36849
+ "additionalProperties": false,
36850
+ "required": [
36851
+ "kind",
36852
+ "from",
36853
+ "to"
36854
+ ]
36855
+ }
36856
+ },
36857
+ "relationships": {
36858
+ "type": "array",
36859
+ "items": {
36860
+ "type": "object",
36861
+ "properties": {
36862
+ "kind": {
36863
+ "enum": [
36864
+ "style",
36865
+ "numbering",
36866
+ "relationship"
36867
+ ]
36868
+ },
36869
+ "from": {
36870
+ "type": "string"
36871
+ },
36872
+ "to": {
36873
+ "type": "string"
36874
+ }
36875
+ },
36876
+ "additionalProperties": false,
36877
+ "required": [
36878
+ "kind",
36879
+ "from",
36880
+ "to"
36881
+ ]
36882
+ }
36883
+ }
36884
+ },
36885
+ "additionalProperties": false
36886
+ },
36887
+ "warnings": {
36888
+ "type": "array",
36889
+ "items": {
36890
+ "type": "object",
36891
+ "properties": {
36892
+ "code": {
36893
+ "type": "string"
36894
+ },
36895
+ "message": {
36896
+ "type": "string"
36897
+ }
36898
+ },
36899
+ "additionalProperties": false,
36900
+ "required": [
36901
+ "code",
36902
+ "message"
36903
+ ]
36904
+ }
36905
+ }
36906
+ },
36907
+ "additionalProperties": false,
36908
+ "required": [
36909
+ "success",
36910
+ "changed",
36911
+ "dryRun",
36912
+ "bodyPolicy",
36913
+ "source",
36914
+ "detectedScopes",
36915
+ "appliedScopes",
36916
+ "skippedScopes",
36917
+ "unsupportedItems",
36918
+ "changedParts",
36919
+ "idMappings",
36920
+ "warnings"
36921
+ ]
36922
+ },
36923
+ {
36924
+ "type": "object",
36925
+ "properties": {
36926
+ "success": {
36927
+ "const": false
36928
+ },
36929
+ "failure": {
36930
+ "type": "object",
36931
+ "properties": {
36932
+ "code": {
36933
+ "enum": [
36934
+ "UNSUPPORTED_SOURCE",
36935
+ "INVALID_PACKAGE",
36936
+ "CAPABILITY_UNAVAILABLE",
36937
+ "UNSUPPORTED_TEMPLATE_CONTENT"
36938
+ ]
36939
+ },
36940
+ "message": {
36941
+ "type": "string"
36942
+ }
36943
+ },
36944
+ "additionalProperties": false,
36945
+ "required": [
36946
+ "code",
36947
+ "message"
36948
+ ]
36949
+ }
36950
+ },
36951
+ "additionalProperties": false,
36952
+ "required": [
36953
+ "success",
36954
+ "failure"
36955
+ ]
36956
+ }
36957
+ ]
36958
+ },
36959
+ "successSchema": {
36960
+ "type": "object",
36961
+ "properties": {
36962
+ "success": {
36963
+ "const": true
36964
+ },
36965
+ "changed": {
36966
+ "type": "boolean"
36967
+ },
36968
+ "dryRun": {
36969
+ "type": "boolean"
36970
+ },
36971
+ "bodyPolicy": {
36972
+ "const": "preserve"
36973
+ },
36974
+ "source": {
36975
+ "type": "object",
36976
+ "properties": {
36977
+ "kind": {
36978
+ "enum": [
36979
+ "path",
36980
+ "base64"
36981
+ ]
36982
+ },
36983
+ "fingerprint": {
36984
+ "type": "string"
36985
+ },
36986
+ "partCount": {
36987
+ "type": "integer"
36988
+ }
36989
+ },
36990
+ "additionalProperties": false,
36991
+ "required": [
36992
+ "kind",
36993
+ "fingerprint",
36994
+ "partCount"
36995
+ ]
36996
+ },
36997
+ "detectedScopes": {
36998
+ "type": "array",
36999
+ "items": {
37000
+ "type": "object",
37001
+ "properties": {
37002
+ "scope": {
37003
+ "enum": [
37004
+ "styles",
37005
+ "numbering",
37006
+ "settings",
37007
+ "theme",
37008
+ "fontTable",
37009
+ "webSettings",
37010
+ "headersFooters",
37011
+ "sectionDefaults"
37012
+ ]
37013
+ },
37014
+ "part": {
37015
+ "type": "string"
37016
+ },
37017
+ "detail": {
37018
+ "type": "string"
37019
+ }
37020
+ },
37021
+ "additionalProperties": false,
37022
+ "required": [
37023
+ "scope",
37024
+ "part"
37025
+ ]
37026
+ }
37027
+ },
37028
+ "appliedScopes": {
37029
+ "type": "array",
37030
+ "items": {
37031
+ "type": "object",
37032
+ "properties": {
37033
+ "scope": {
37034
+ "enum": [
37035
+ "styles",
37036
+ "numbering",
37037
+ "settings",
37038
+ "theme",
37039
+ "fontTable",
37040
+ "webSettings",
37041
+ "headersFooters",
37042
+ "sectionDefaults"
37043
+ ]
37044
+ },
37045
+ "part": {
37046
+ "type": "string"
37047
+ },
37048
+ "detail": {
37049
+ "type": "string"
37050
+ }
37051
+ },
37052
+ "additionalProperties": false,
37053
+ "required": [
37054
+ "scope",
37055
+ "part"
37056
+ ]
37057
+ }
37058
+ },
37059
+ "skippedScopes": {
37060
+ "type": "array",
37061
+ "items": {
37062
+ "type": "object",
37063
+ "properties": {
37064
+ "scope": {
37065
+ "type": "string"
37066
+ },
37067
+ "part": {
37068
+ "type": "string"
37069
+ },
37070
+ "reason": {
37071
+ "enum": [
37072
+ "NOT_PRESENT_IN_SOURCE",
37073
+ "OUT_OF_SCOPE",
37074
+ "NO_CHANGE",
37075
+ "CAPABILITY_UNAVAILABLE"
37076
+ ]
37077
+ },
37078
+ "message": {
37079
+ "type": "string"
37080
+ }
37081
+ },
37082
+ "additionalProperties": false,
37083
+ "required": [
37084
+ "scope",
37085
+ "reason",
37086
+ "message"
37087
+ ]
37088
+ }
37089
+ },
37090
+ "unsupportedItems": {
37091
+ "type": "array",
37092
+ "items": {
37093
+ "type": "object",
37094
+ "properties": {
37095
+ "part": {
37096
+ "type": "string"
37097
+ },
37098
+ "category": {
37099
+ "type": "string"
37100
+ },
37101
+ "reason": {
37102
+ "type": "string"
37103
+ }
37104
+ },
37105
+ "additionalProperties": false,
37106
+ "required": [
37107
+ "part",
37108
+ "category",
37109
+ "reason"
37110
+ ]
37111
+ }
37112
+ },
37113
+ "changedParts": {
37114
+ "type": "array",
37115
+ "items": {
37116
+ "type": "object",
37117
+ "properties": {
37118
+ "part": {
37119
+ "type": "string"
37120
+ },
37121
+ "scope": {
37122
+ "enum": [
37123
+ "styles",
37124
+ "numbering",
37125
+ "settings",
37126
+ "theme",
37127
+ "fontTable",
37128
+ "webSettings",
37129
+ "headersFooters",
37130
+ "sectionDefaults",
37131
+ "package"
37132
+ ]
37133
+ },
37134
+ "change": {
37135
+ "enum": [
37136
+ "created",
37137
+ "replaced",
37138
+ "merged",
37139
+ "imported"
37140
+ ]
37141
+ }
37142
+ },
37143
+ "additionalProperties": false,
37144
+ "required": [
37145
+ "part",
37146
+ "scope",
37147
+ "change"
37148
+ ]
37149
+ }
37150
+ },
37151
+ "idMappings": {
37152
+ "type": "object",
37153
+ "properties": {
37154
+ "styles": {
37155
+ "type": "array",
37156
+ "items": {
37157
+ "type": "object",
37158
+ "properties": {
37159
+ "kind": {
37160
+ "enum": [
37161
+ "style",
37162
+ "numbering",
37163
+ "relationship"
37164
+ ]
37165
+ },
37166
+ "from": {
37167
+ "type": "string"
37168
+ },
37169
+ "to": {
37170
+ "type": "string"
37171
+ }
37172
+ },
37173
+ "additionalProperties": false,
37174
+ "required": [
37175
+ "kind",
37176
+ "from",
37177
+ "to"
37178
+ ]
37179
+ }
37180
+ },
37181
+ "numbering": {
37182
+ "type": "array",
37183
+ "items": {
37184
+ "type": "object",
37185
+ "properties": {
37186
+ "kind": {
37187
+ "enum": [
37188
+ "style",
37189
+ "numbering",
37190
+ "relationship"
37191
+ ]
37192
+ },
37193
+ "from": {
37194
+ "type": "string"
37195
+ },
37196
+ "to": {
37197
+ "type": "string"
37198
+ }
37199
+ },
37200
+ "additionalProperties": false,
37201
+ "required": [
37202
+ "kind",
37203
+ "from",
37204
+ "to"
37205
+ ]
37206
+ }
37207
+ },
37208
+ "relationships": {
37209
+ "type": "array",
37210
+ "items": {
37211
+ "type": "object",
37212
+ "properties": {
37213
+ "kind": {
37214
+ "enum": [
37215
+ "style",
37216
+ "numbering",
37217
+ "relationship"
37218
+ ]
37219
+ },
37220
+ "from": {
37221
+ "type": "string"
37222
+ },
37223
+ "to": {
37224
+ "type": "string"
37225
+ }
37226
+ },
37227
+ "additionalProperties": false,
37228
+ "required": [
37229
+ "kind",
37230
+ "from",
37231
+ "to"
37232
+ ]
37233
+ }
37234
+ }
37235
+ },
37236
+ "additionalProperties": false
37237
+ },
37238
+ "warnings": {
37239
+ "type": "array",
37240
+ "items": {
37241
+ "type": "object",
37242
+ "properties": {
37243
+ "code": {
37244
+ "type": "string"
37245
+ },
37246
+ "message": {
37247
+ "type": "string"
37248
+ }
37249
+ },
37250
+ "additionalProperties": false,
37251
+ "required": [
37252
+ "code",
37253
+ "message"
37254
+ ]
37255
+ }
37256
+ }
37257
+ },
37258
+ "additionalProperties": false,
37259
+ "required": [
37260
+ "success",
37261
+ "changed",
37262
+ "dryRun",
37263
+ "bodyPolicy",
37264
+ "source",
37265
+ "detectedScopes",
37266
+ "appliedScopes",
37267
+ "skippedScopes",
37268
+ "unsupportedItems",
37269
+ "changedParts",
37270
+ "idMappings",
37271
+ "warnings"
37272
+ ]
37273
+ },
37274
+ "failureSchema": {
37275
+ "type": "object",
37276
+ "properties": {
37277
+ "success": {
37278
+ "const": false
37279
+ },
37280
+ "failure": {
37281
+ "type": "object",
37282
+ "properties": {
37283
+ "code": {
37284
+ "enum": [
37285
+ "UNSUPPORTED_SOURCE",
37286
+ "INVALID_PACKAGE",
37287
+ "CAPABILITY_UNAVAILABLE",
37288
+ "UNSUPPORTED_TEMPLATE_CONTENT"
37289
+ ]
37290
+ },
37291
+ "message": {
37292
+ "type": "string"
37293
+ }
37294
+ },
37295
+ "additionalProperties": false,
37296
+ "required": [
37297
+ "code",
37298
+ "message"
37299
+ ]
37300
+ }
37301
+ },
37302
+ "additionalProperties": false,
37303
+ "required": [
37304
+ "success",
37305
+ "failure"
37306
+ ]
37307
+ }
37308
+ },
36429
37309
  "doc.create.paragraph": {
36430
37310
  "operationId": "doc.create.paragraph",
36431
37311
  "sdkSurface": "document",
@@ -38421,6 +39301,20 @@ const CONTRACT = {
38421
39301
  "upperRoman",
38422
39302
  "numberInDash"
38423
39303
  ]
39304
+ },
39305
+ "chapterStyle": {
39306
+ "type": "integer",
39307
+ "minimum": 1
39308
+ },
39309
+ "chapterSeparator": {
39310
+ "type": "string",
39311
+ "enum": [
39312
+ "hyphen",
39313
+ "period",
39314
+ "colon",
39315
+ "emDash",
39316
+ "enDash"
39317
+ ]
38424
39318
  }
38425
39319
  },
38426
39320
  "additionalProperties": false
@@ -39023,6 +39917,20 @@ const CONTRACT = {
39023
39917
  "upperRoman",
39024
39918
  "numberInDash"
39025
39919
  ]
39920
+ },
39921
+ "chapterStyle": {
39922
+ "type": "integer",
39923
+ "minimum": 1
39924
+ },
39925
+ "chapterSeparator": {
39926
+ "type": "string",
39927
+ "enum": [
39928
+ "hyphen",
39929
+ "period",
39930
+ "colon",
39931
+ "emDash",
39932
+ "enDash"
39933
+ ]
39026
39934
  }
39027
39935
  },
39028
39936
  "additionalProperties": false
@@ -40792,309 +41700,340 @@ const CONTRACT = {
40792
41700
  ]
40793
41701
  }
40794
41702
  },
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
- },
41703
+ {
41704
+ "name": "enabled",
41705
+ "kind": "flag",
41706
+ "type": "boolean",
41707
+ "required": true
41708
+ },
41709
+ {
41710
+ "name": "countBy",
41711
+ "kind": "flag",
41712
+ "type": "number",
41713
+ "flag": "count-by"
41714
+ },
41715
+ {
41716
+ "name": "start",
41717
+ "kind": "flag",
41718
+ "type": "number"
41719
+ },
41720
+ {
41721
+ "name": "distance",
41722
+ "kind": "flag",
41723
+ "type": "number"
41724
+ },
41725
+ {
41726
+ "name": "restart",
41727
+ "kind": "flag",
41728
+ "type": "string",
41729
+ "schema": {
41730
+ "oneOf": [
41731
+ {
41732
+ "const": "continuous"
41733
+ },
41734
+ {
41735
+ "const": "newPage"
41736
+ },
41737
+ {
41738
+ "const": "newSection"
41739
+ }
41740
+ ]
41741
+ }
41742
+ }
41743
+ ],
41744
+ "constraints": null,
41745
+ "mutates": true,
41746
+ "idempotency": "conditional",
41747
+ "supportsTrackedMode": false,
41748
+ "supportsDryRun": true,
41749
+ "inputSchema": {
41750
+ "type": "object",
41751
+ "properties": {
41752
+ "target": {
41753
+ "$ref": "#/$defs/SectionAddress"
41754
+ },
41755
+ "enabled": {
41756
+ "type": "boolean"
41757
+ },
41758
+ "countBy": {
41759
+ "type": "integer",
41760
+ "minimum": 1
41761
+ },
41762
+ "start": {
41763
+ "type": "integer",
41764
+ "minimum": 1
41765
+ },
41766
+ "distance": {
41767
+ "type": "number",
41768
+ "minimum": 0
41769
+ },
41770
+ "restart": {
41771
+ "enum": [
41772
+ "continuous",
41773
+ "newPage",
41774
+ "newSection"
41775
+ ]
41776
+ }
41777
+ },
41778
+ "additionalProperties": false,
41779
+ "required": [
41780
+ "target",
41781
+ "enabled"
41782
+ ]
41783
+ },
41784
+ "outputSchema": {
41785
+ "oneOf": [
41786
+ {
41787
+ "type": "object",
41788
+ "properties": {
41789
+ "success": {
41790
+ "const": true
41791
+ },
41792
+ "section": {
41793
+ "$ref": "#/$defs/SectionAddress"
41794
+ }
41795
+ },
41796
+ "additionalProperties": false,
41797
+ "required": [
41798
+ "success",
41799
+ "section"
41800
+ ]
41801
+ },
41802
+ {
41803
+ "type": "object",
41804
+ "properties": {
41805
+ "success": {
41806
+ "const": false
41807
+ },
41808
+ "failure": {
41809
+ "type": "object",
41810
+ "properties": {
41811
+ "code": {
41812
+ "enum": [
41813
+ "NO_OP",
41814
+ "INVALID_TARGET",
41815
+ "CAPABILITY_UNAVAILABLE"
41816
+ ]
41817
+ },
41818
+ "message": {
41819
+ "type": "string"
41820
+ },
41821
+ "details": {}
41822
+ },
41823
+ "additionalProperties": false,
41824
+ "required": [
41825
+ "code",
41826
+ "message"
41827
+ ]
41828
+ }
41829
+ },
41830
+ "additionalProperties": false,
41831
+ "required": [
41832
+ "success",
41833
+ "failure"
41834
+ ]
41835
+ }
41836
+ ]
41837
+ },
41838
+ "successSchema": {
41839
+ "type": "object",
41840
+ "properties": {
41841
+ "success": {
41842
+ "const": true
41843
+ },
41844
+ "section": {
41845
+ "$ref": "#/$defs/SectionAddress"
41846
+ }
41847
+ },
41848
+ "additionalProperties": false,
41849
+ "required": [
41850
+ "success",
41851
+ "section"
41852
+ ]
41853
+ },
41854
+ "failureSchema": {
41855
+ "type": "object",
41856
+ "properties": {
41857
+ "success": {
41858
+ "const": false
41859
+ },
41860
+ "failure": {
41861
+ "type": "object",
41862
+ "properties": {
41863
+ "code": {
41864
+ "enum": [
41865
+ "NO_OP",
41866
+ "INVALID_TARGET",
41867
+ "CAPABILITY_UNAVAILABLE"
41868
+ ]
41869
+ },
41870
+ "message": {
41871
+ "type": "string"
41872
+ },
41873
+ "details": {}
41874
+ },
41875
+ "additionalProperties": false,
41876
+ "required": [
41877
+ "code",
41878
+ "message"
41879
+ ]
41880
+ }
41881
+ },
41882
+ "additionalProperties": false,
41883
+ "required": [
41884
+ "success",
41885
+ "failure"
41886
+ ]
41887
+ }
41888
+ },
41889
+ "doc.sections.setPageNumbering": {
41890
+ "operationId": "doc.sections.setPageNumbering",
41891
+ "sdkSurface": "document",
41892
+ "command": "sections set-page-numbering",
41893
+ "commandTokens": [
41894
+ "sections",
41895
+ "set-page-numbering"
41896
+ ],
41897
+ "category": "sections",
41898
+ "description": "Set page numbering format/start and chapter numbering settings for a section.",
41899
+ "requiresDocumentContext": true,
41900
+ "docRequirement": "optional",
41901
+ "responseEnvelopeKey": "result",
41902
+ "params": [
41903
+ {
41904
+ "name": "doc",
41905
+ "kind": "doc",
41906
+ "type": "string",
41907
+ "description": "Document path. Optional when a session is already open."
41908
+ },
41909
+ {
41910
+ "name": "sessionId",
41911
+ "kind": "flag",
41912
+ "type": "string",
41913
+ "flag": "session",
41914
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
41915
+ },
41916
+ {
41917
+ "name": "out",
41918
+ "kind": "flag",
41919
+ "type": "string",
41920
+ "agentVisible": false
41921
+ },
41922
+ {
41923
+ "name": "force",
41924
+ "kind": "flag",
41925
+ "type": "boolean",
41926
+ "description": "Bypass confirmation checks."
41927
+ },
41928
+ {
41929
+ "name": "expectedRevision",
41930
+ "kind": "flag",
41931
+ "type": "number",
41932
+ "flag": "expected-revision",
41933
+ "agentVisible": false
41934
+ },
41935
+ {
41936
+ "name": "changeMode",
41937
+ "kind": "flag",
41938
+ "type": "string",
41939
+ "flag": "change-mode",
41940
+ "schema": {
41941
+ "type": "string",
41942
+ "enum": [
41943
+ "direct",
41944
+ "tracked"
41945
+ ]
41946
+ },
41947
+ "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
41948
+ },
41949
+ {
41950
+ "name": "dryRun",
41951
+ "kind": "flag",
41952
+ "type": "boolean",
41953
+ "flag": "dry-run",
41954
+ "description": "Preview the result without applying changes."
41955
+ },
41956
+ {
41957
+ "name": "target",
41958
+ "kind": "jsonFlag",
41959
+ "type": "json",
41960
+ "flag": "target-json",
41961
+ "required": true,
41962
+ "schema": {
41963
+ "type": "object",
41964
+ "properties": {
41965
+ "kind": {
41966
+ "const": "section"
41967
+ },
41968
+ "sectionId": {
41969
+ "type": "string"
41970
+ }
41971
+ },
41972
+ "required": [
41973
+ "kind",
41974
+ "sectionId"
41975
+ ]
41976
+ }
41977
+ },
40807
41978
  {
40808
41979
  "name": "start",
40809
41980
  "kind": "flag",
40810
41981
  "type": "number"
40811
41982
  },
40812
41983
  {
40813
- "name": "distance",
40814
- "kind": "flag",
40815
- "type": "number"
40816
- },
40817
- {
40818
- "name": "restart",
41984
+ "name": "format",
40819
41985
  "kind": "flag",
40820
41986
  "type": "string",
40821
41987
  "schema": {
40822
41988
  "oneOf": [
40823
41989
  {
40824
- "const": "continuous"
41990
+ "const": "decimal"
40825
41991
  },
40826
41992
  {
40827
- "const": "newPage"
41993
+ "const": "lowerLetter"
40828
41994
  },
40829
41995
  {
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
- ]
41996
+ "const": "upperLetter"
40961
41997
  },
40962
- "message": {
40963
- "type": "string"
41998
+ {
41999
+ "const": "lowerRoman"
40964
42000
  },
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"
42001
+ {
42002
+ "const": "upperRoman"
41059
42003
  },
41060
- "sectionId": {
41061
- "type": "string"
42004
+ {
42005
+ "const": "numberInDash"
41062
42006
  }
41063
- },
41064
- "required": [
41065
- "kind",
41066
- "sectionId"
41067
42007
  ]
41068
42008
  }
41069
42009
  },
41070
42010
  {
41071
- "name": "start",
42011
+ "name": "chapterStyle",
41072
42012
  "kind": "flag",
41073
- "type": "number"
42013
+ "type": "number",
42014
+ "flag": "chapter-style"
41074
42015
  },
41075
42016
  {
41076
- "name": "format",
42017
+ "name": "chapterSeparator",
41077
42018
  "kind": "flag",
41078
42019
  "type": "string",
42020
+ "flag": "chapter-separator",
41079
42021
  "schema": {
41080
42022
  "oneOf": [
41081
42023
  {
41082
- "const": "decimal"
41083
- },
41084
- {
41085
- "const": "lowerLetter"
42024
+ "const": "hyphen"
41086
42025
  },
41087
42026
  {
41088
- "const": "upperLetter"
42027
+ "const": "period"
41089
42028
  },
41090
42029
  {
41091
- "const": "lowerRoman"
42030
+ "const": "colon"
41092
42031
  },
41093
42032
  {
41094
- "const": "upperRoman"
42033
+ "const": "emDash"
41095
42034
  },
41096
42035
  {
41097
- "const": "numberInDash"
42036
+ "const": "enDash"
41098
42037
  }
41099
42038
  ]
41100
42039
  }
@@ -41124,13 +42063,27 @@ const CONTRACT = {
41124
42063
  "upperRoman",
41125
42064
  "numberInDash"
41126
42065
  ]
42066
+ },
42067
+ "chapterStyle": {
42068
+ "type": "integer",
42069
+ "minimum": 1
42070
+ },
42071
+ "chapterSeparator": {
42072
+ "type": "string",
42073
+ "enum": [
42074
+ "hyphen",
42075
+ "period",
42076
+ "colon",
42077
+ "emDash",
42078
+ "enDash"
42079
+ ]
41127
42080
  }
41128
42081
  },
41129
42082
  "additionalProperties": false,
41130
42083
  "required": [
41131
42084
  "target"
41132
42085
  ],
41133
- "oneOf": [
42086
+ "anyOf": [
41134
42087
  {
41135
42088
  "required": [
41136
42089
  "target",
@@ -41142,6 +42095,18 @@ const CONTRACT = {
41142
42095
  "target",
41143
42096
  "format"
41144
42097
  ]
42098
+ },
42099
+ {
42100
+ "required": [
42101
+ "target",
42102
+ "chapterStyle"
42103
+ ]
42104
+ },
42105
+ {
42106
+ "required": [
42107
+ "target",
42108
+ "chapterSeparator"
42109
+ ]
41145
42110
  }
41146
42111
  ]
41147
42112
  },
@@ -66140,6 +67105,11 @@ const CONTRACT = {
66140
67105
  }
66141
67106
  ],
66142
67107
  "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."
67108
+ },
67109
+ "range": {
67110
+ "type": "object",
67111
+ "properties": {},
67112
+ "description": "Partial-range qualifier on an id target. Rejected with INVALID_INPUT for indivisible (e.g. structural) revisions."
66143
67113
  }
66144
67114
  },
66145
67115
  "required": [
@@ -66723,6 +67693,10 @@ const CONTRACT = {
66723
67693
  },
66724
67694
  "story": {
66725
67695
  "$ref": "#/$defs/StoryLocator"
67696
+ },
67697
+ "range": {
67698
+ "type": "object",
67699
+ "description": "Partial-range qualifier on an id target. Rejected with INVALID_INPUT for indivisible (e.g. structural) revisions."
66726
67700
  }
66727
67701
  },
66728
67702
  "additionalProperties": false,
@@ -66804,6 +67778,7 @@ const CONTRACT = {
66804
67778
  "code": {
66805
67779
  "enum": [
66806
67780
  "NO_OP",
67781
+ "INVALID_INPUT",
66807
67782
  "INVALID_TARGET",
66808
67783
  "TARGET_NOT_FOUND",
66809
67784
  "CAPABILITY_UNAVAILABLE",
@@ -66847,6 +67822,7 @@ const CONTRACT = {
66847
67822
  "code": {
66848
67823
  "enum": [
66849
67824
  "NO_OP",
67825
+ "INVALID_INPUT",
66850
67826
  "INVALID_TARGET",
66851
67827
  "TARGET_NOT_FOUND",
66852
67828
  "CAPABILITY_UNAVAILABLE",
@@ -83713,6 +84689,41 @@ const CONTRACT = {
83713
84689
  "dryRun"
83714
84690
  ]
83715
84691
  },
84692
+ "templates.apply": {
84693
+ "type": "object",
84694
+ "properties": {
84695
+ "available": {
84696
+ "type": "boolean"
84697
+ },
84698
+ "tracked": {
84699
+ "type": "boolean"
84700
+ },
84701
+ "dryRun": {
84702
+ "type": "boolean"
84703
+ },
84704
+ "reasons": {
84705
+ "type": "array",
84706
+ "items": {
84707
+ "enum": [
84708
+ "COMMAND_UNAVAILABLE",
84709
+ "HELPER_UNAVAILABLE",
84710
+ "OPERATION_UNAVAILABLE",
84711
+ "TRACKED_MODE_UNAVAILABLE",
84712
+ "DRY_RUN_UNAVAILABLE",
84713
+ "NAMESPACE_UNAVAILABLE",
84714
+ "STYLES_PART_MISSING",
84715
+ "COLLABORATION_ACTIVE"
84716
+ ]
84717
+ }
84718
+ }
84719
+ },
84720
+ "additionalProperties": false,
84721
+ "required": [
84722
+ "available",
84723
+ "tracked",
84724
+ "dryRun"
84725
+ ]
84726
+ },
83716
84727
  "create.paragraph": {
83717
84728
  "type": "object",
83718
84729
  "properties": {
@@ -95714,6 +96725,7 @@ const CONTRACT = {
95714
96725
  "format.stylisticSets",
95715
96726
  "format.contextualAlternates",
95716
96727
  "styles.apply",
96728
+ "templates.apply",
95717
96729
  "create.paragraph",
95718
96730
  "create.heading",
95719
96731
  "create.sectionBreak",