@superdoc/sdk 2.0.0 → 2.1.0

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.
@@ -846,6 +846,12 @@ export const CONTRACT = {
846
846
  "atChar": {
847
847
  "type": "integer"
848
848
  },
849
+ "blockId": {
850
+ "type": "string"
851
+ },
852
+ "atCharInBlock": {
853
+ "type": "integer"
854
+ },
849
855
  "delta": {
850
856
  "type": "integer"
851
857
  }
@@ -138183,7 +138189,7 @@ export const CONTRACT = {
138183
138189
  "create"
138184
138190
  ],
138185
138191
  "category": "comments",
138186
- "description": "Create a new comment thread (or reply when parentCommentId is given). Accepts TextAddress / TextTarget anchors, or a TrackedChangeCommentTarget that names a logical tracked-change id. The tracked-change target accepts both the explicit kind form and the Labs-compatible trackedChangeId-only form; the adapter normalizes it to a Word-compatible content anchor on the requested revision side.",
138192
+ "description": "Create a new comment thread (or reply when parentCommentId is given). Accepts TextAddress / TextTarget anchors, or a TrackedChangeCommentTarget that names a logical tracked-change id. The tracked-change target accepts both the explicit kind form and the Labs-compatible trackedChangeId-only form; the adapter normalizes it to a Word-compatible content anchor on the requested revision side. Callers may supply a durable externalId, or use the v1-compatible caller-supplied commentId alias, plus author fields and arbitrary JSON metadata for integration correlation. The caller-owned id remains distinct from the generated Word-compatible commentId.",
138187
138193
  "requiresDocumentContext": true,
138188
138194
  "docRequirement": "optional",
138189
138195
  "responseEnvelopeKey": "receipt",
@@ -140353,6 +140359,59 @@ export const CONTRACT = {
140353
140359
  "flag": "parent-id",
140354
140360
  "description": "Parent comment ID for creating a threaded reply."
140355
140361
  },
140362
+ {
140363
+ "name": "commentId",
140364
+ "kind": "flag",
140365
+ "type": "string",
140366
+ "flag": "comment-id",
140367
+ "description": "Compatibility alias for externalId, matching the caller-supplied commentId accepted by the v1 editor. V2 still generates a separate Word-compatible commentId."
140368
+ },
140369
+ {
140370
+ "name": "externalId",
140371
+ "kind": "flag",
140372
+ "type": "string",
140373
+ "flag": "external-id",
140374
+ "description": "Caller-owned durable, document-unique integration id. Kept separate from the generated Word-compatible commentId."
140375
+ },
140376
+ {
140377
+ "name": "author",
140378
+ "kind": "flag",
140379
+ "type": "string",
140380
+ "description": "Author display name. Defaults to the configured session author."
140381
+ },
140382
+ {
140383
+ "name": "authorId",
140384
+ "kind": "flag",
140385
+ "type": "string",
140386
+ "flag": "author-id",
140387
+ "description": "Stable caller-owned author id."
140388
+ },
140389
+ {
140390
+ "name": "authorEmail",
140391
+ "kind": "flag",
140392
+ "type": "string",
140393
+ "flag": "author-email",
140394
+ "description": "Caller-owned author email."
140395
+ },
140396
+ {
140397
+ "name": "authorImage",
140398
+ "kind": "flag",
140399
+ "type": "string",
140400
+ "flag": "author-image",
140401
+ "description": "Caller-owned author image URL."
140402
+ },
140403
+ {
140404
+ "name": "metadata",
140405
+ "kind": "jsonFlag",
140406
+ "type": "json",
140407
+ "flag": "metadata-json",
140408
+ "schema": {
140409
+ "type": "object",
140410
+ "properties": {},
140411
+ "description": "Caller-owned JSON metadata persisted with the comment."
140412
+ },
140413
+ "description": "Caller-owned JSON metadata persisted with the comment."
140414
+ },
140356
140415
  {
140357
140416
  "name": "blockId",
140358
140417
  "kind": "flag",
@@ -140445,6 +140504,43 @@ export const CONTRACT = {
140445
140504
  "parentId": {
140446
140505
  "type": "string",
140447
140506
  "description": "Public alias for parentCommentId when creating a threaded reply."
140507
+ },
140508
+ "commentId": {
140509
+ "type": "string",
140510
+ "minLength": 1,
140511
+ "maxLength": 1024,
140512
+ "description": "Compatibility alias for externalId, matching the caller-supplied commentId accepted by the v1 editor. V2 still generates a separate Word-compatible commentId."
140513
+ },
140514
+ "externalId": {
140515
+ "type": "string",
140516
+ "minLength": 1,
140517
+ "maxLength": 1024,
140518
+ "description": "Caller-owned durable, document-unique integration id. Kept separate from the generated Word-compatible commentId."
140519
+ },
140520
+ "author": {
140521
+ "type": "string",
140522
+ "minLength": 1,
140523
+ "description": "Author display name. Defaults to the configured session author."
140524
+ },
140525
+ "authorId": {
140526
+ "type": "string",
140527
+ "minLength": 1,
140528
+ "description": "Stable caller-owned author id."
140529
+ },
140530
+ "authorEmail": {
140531
+ "type": "string",
140532
+ "minLength": 1,
140533
+ "description": "Caller-owned author email."
140534
+ },
140535
+ "authorImage": {
140536
+ "type": "string",
140537
+ "minLength": 1,
140538
+ "description": "Caller-owned author image URL."
140539
+ },
140540
+ "metadata": {
140541
+ "type": "object",
140542
+ "additionalProperties": true,
140543
+ "description": "Caller-owned JSON metadata persisted with the comment."
140448
140544
  }
140449
140545
  },
140450
140546
  "additionalProperties": false,
@@ -142701,6 +142797,15 @@ export const CONTRACT = {
142701
142797
  "commentId": {
142702
142798
  "type": "string"
142703
142799
  },
142800
+ "externalId": {
142801
+ "type": "string",
142802
+ "description": "Caller-owned durable integration id, distinct from the Word-compatible commentId."
142803
+ },
142804
+ "metadata": {
142805
+ "type": "object",
142806
+ "additionalProperties": true,
142807
+ "description": "Caller-owned JSON metadata persisted with the comment."
142808
+ },
142704
142809
  "importedId": {
142705
142810
  "type": "string"
142706
142811
  },
@@ -142756,9 +142861,15 @@ export const CONTRACT = {
142756
142861
  "creatorName": {
142757
142862
  "type": "string"
142758
142863
  },
142864
+ "creatorId": {
142865
+ "type": "string"
142866
+ },
142759
142867
  "creatorEmail": {
142760
142868
  "type": "string"
142761
142869
  },
142870
+ "creatorImage": {
142871
+ "type": "string"
142872
+ },
142762
142873
  "trackedChange": {
142763
142874
  "type": "boolean"
142764
142875
  },
@@ -142930,6 +143041,15 @@ export const CONTRACT = {
142930
143041
  "address": {
142931
143042
  "$ref": "#/$defs/CommentAddress"
142932
143043
  },
143044
+ "externalId": {
143045
+ "type": "string",
143046
+ "description": "Caller-owned durable integration id, distinct from the Word-compatible comment id."
143047
+ },
143048
+ "metadata": {
143049
+ "type": "object",
143050
+ "additionalProperties": true,
143051
+ "description": "Caller-owned JSON metadata persisted with the comment."
143052
+ },
142933
143053
  "importedId": {
142934
143054
  "type": "string"
142935
143055
  },
@@ -142985,9 +143105,15 @@ export const CONTRACT = {
142985
143105
  "creatorName": {
142986
143106
  "type": "string"
142987
143107
  },
143108
+ "creatorId": {
143109
+ "type": "string"
143110
+ },
142988
143111
  "creatorEmail": {
142989
143112
  "type": "string"
142990
143113
  },
143114
+ "creatorImage": {
143115
+ "type": "string"
143116
+ },
142991
143117
  "trackedChange": {
142992
143118
  "type": "boolean"
142993
143119
  },
@@ -222828,6 +222954,9 @@ export const CONTRACT = {
222828
222954
  },
222829
222955
  "text": {
222830
222956
  "type": "string"
222957
+ },
222958
+ "isEmpty": {
222959
+ "type": "boolean"
222831
222960
  }
222832
222961
  },
222833
222962
  "additionalProperties": false,
@@ -223032,6 +223161,9 @@ export const CONTRACT = {
223032
223161
  },
223033
223162
  "text": {
223034
223163
  "type": "string"
223164
+ },
223165
+ "isEmpty": {
223166
+ "type": "boolean"
223035
223167
  }
223036
223168
  },
223037
223169
  "additionalProperties": false,
@@ -223211,184 +223343,190 @@ export const CONTRACT = {
223211
223343
  },
223212
223344
  "text": {
223213
223345
  "type": "string"
223214
- }
223215
- },
223216
- "additionalProperties": false,
223217
- "required": [
223218
- "nodeType",
223219
- "kind",
223220
- "id",
223221
- "controlType",
223222
- "lockMode",
223223
- "properties",
223224
- "target"
223225
- ]
223226
- }
223227
- },
223228
- "total": {
223229
- "type": "integer"
223230
- }
223231
- },
223232
- "additionalProperties": false,
223233
- "required": [
223234
- "items",
223235
- "total"
223236
- ]
223237
- }
223238
- },
223239
- "doc.contentControls.selectByTag": {
223240
- "operationId": "doc.contentControls.selectByTag",
223241
- "sdkSurface": "document",
223242
- "command": "content-controls select-by-tag",
223243
- "commandTokens": [
223244
- "content-controls",
223245
- "select-by-tag"
223246
- ],
223247
- "category": "core",
223248
- "description": "Select content controls matching a specific tag value.",
223249
- "requiresDocumentContext": true,
223250
- "docRequirement": "optional",
223251
- "responseEnvelopeKey": "result",
223252
- "params": [
223253
- {
223254
- "name": "doc",
223255
- "kind": "doc",
223256
- "type": "string",
223257
- "description": "Document path. Optional when a session is already open."
223258
- },
223259
- {
223260
- "name": "sessionId",
223261
- "kind": "flag",
223262
- "type": "string",
223263
- "flag": "session",
223264
- "description": "Session ID for multi-session workflows. Optional when only one session is open."
223265
- },
223266
- {
223267
- "name": "tag",
223268
- "kind": "flag",
223269
- "type": "string",
223270
- "required": true
223271
- },
223272
- {
223273
- "name": "offset",
223274
- "kind": "flag",
223275
- "type": "number"
223276
- },
223277
- {
223278
- "name": "limit",
223279
- "kind": "flag",
223280
- "type": "number"
223281
- }
223282
- ],
223283
- "constraints": null,
223284
- "mutates": false,
223285
- "idempotency": "idempotent",
223286
- "supportsTrackedMode": false,
223287
- "supportsDryRun": false,
223288
- "inputSchema": {
223289
- "type": "object",
223290
- "properties": {
223291
- "tag": {
223292
- "type": "string"
223293
- },
223294
- "offset": {
223295
- "type": "integer"
223296
- },
223297
- "limit": {
223298
- "type": "integer"
223299
- }
223300
- },
223301
- "additionalProperties": false,
223302
- "required": [
223303
- "tag"
223304
- ]
223305
- },
223306
- "outputSchema": {
223307
- "type": "object",
223308
- "properties": {
223309
- "items": {
223310
- "type": "array",
223311
- "items": {
223312
- "type": "object",
223313
- "properties": {
223314
- "nodeType": {
223315
- "const": "sdt"
223316
- },
223317
- "kind": {
223318
- "enum": [
223319
- "block",
223320
- "inline"
223321
- ]
223322
- },
223323
- "id": {
223324
- "type": "string"
223325
- },
223326
- "controlType": {
223327
- "type": "string"
223328
223346
  },
223329
- "lockMode": {
223330
- "type": "string"
223331
- },
223332
- "properties": {
223333
- "type": "object"
223334
- },
223335
- "binding": {
223336
- "type": "object",
223337
- "properties": {
223338
- "storeItemId": {
223339
- "type": "string"
223340
- },
223341
- "xpath": {
223342
- "type": "string"
223343
- },
223344
- "prefixMappings": {
223345
- "type": "string"
223346
- }
223347
- },
223348
- "additionalProperties": false,
223349
- "required": [
223350
- "storeItemId",
223351
- "xpath"
223352
- ]
223353
- },
223354
- "raw": {
223355
- "type": "object"
223356
- },
223357
- "target": {
223358
- "type": "object",
223359
- "properties": {
223360
- "kind": {
223361
- "enum": [
223362
- "block",
223363
- "inline"
223364
- ]
223365
- },
223366
- "nodeType": {
223367
- "const": "sdt"
223368
- },
223369
- "nodeId": {
223370
- "type": "string"
223371
- }
223372
- },
223373
- "additionalProperties": false,
223374
- "required": [
223375
- "kind",
223376
- "nodeType",
223377
- "nodeId"
223378
- ]
223379
- },
223380
- "selectionTarget": {
223381
- "oneOf": [
223382
- {
223383
- "$ref": "#/$defs/SelectionTarget"
223384
- },
223385
- {
223386
- "type": "null"
223387
- }
223388
- ]
223389
- },
223390
- "text": {
223391
- "type": "string"
223347
+ "isEmpty": {
223348
+ "type": "boolean"
223349
+ }
223350
+ },
223351
+ "additionalProperties": false,
223352
+ "required": [
223353
+ "nodeType",
223354
+ "kind",
223355
+ "id",
223356
+ "controlType",
223357
+ "lockMode",
223358
+ "properties",
223359
+ "target"
223360
+ ]
223361
+ }
223362
+ },
223363
+ "total": {
223364
+ "type": "integer"
223365
+ }
223366
+ },
223367
+ "additionalProperties": false,
223368
+ "required": [
223369
+ "items",
223370
+ "total"
223371
+ ]
223372
+ }
223373
+ },
223374
+ "doc.contentControls.selectByTag": {
223375
+ "operationId": "doc.contentControls.selectByTag",
223376
+ "sdkSurface": "document",
223377
+ "command": "content-controls select-by-tag",
223378
+ "commandTokens": [
223379
+ "content-controls",
223380
+ "select-by-tag"
223381
+ ],
223382
+ "category": "core",
223383
+ "description": "Select content controls matching a specific tag value.",
223384
+ "requiresDocumentContext": true,
223385
+ "docRequirement": "optional",
223386
+ "responseEnvelopeKey": "result",
223387
+ "params": [
223388
+ {
223389
+ "name": "doc",
223390
+ "kind": "doc",
223391
+ "type": "string",
223392
+ "description": "Document path. Optional when a session is already open."
223393
+ },
223394
+ {
223395
+ "name": "sessionId",
223396
+ "kind": "flag",
223397
+ "type": "string",
223398
+ "flag": "session",
223399
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
223400
+ },
223401
+ {
223402
+ "name": "tag",
223403
+ "kind": "flag",
223404
+ "type": "string",
223405
+ "required": true
223406
+ },
223407
+ {
223408
+ "name": "offset",
223409
+ "kind": "flag",
223410
+ "type": "number"
223411
+ },
223412
+ {
223413
+ "name": "limit",
223414
+ "kind": "flag",
223415
+ "type": "number"
223416
+ }
223417
+ ],
223418
+ "constraints": null,
223419
+ "mutates": false,
223420
+ "idempotency": "idempotent",
223421
+ "supportsTrackedMode": false,
223422
+ "supportsDryRun": false,
223423
+ "inputSchema": {
223424
+ "type": "object",
223425
+ "properties": {
223426
+ "tag": {
223427
+ "type": "string"
223428
+ },
223429
+ "offset": {
223430
+ "type": "integer"
223431
+ },
223432
+ "limit": {
223433
+ "type": "integer"
223434
+ }
223435
+ },
223436
+ "additionalProperties": false,
223437
+ "required": [
223438
+ "tag"
223439
+ ]
223440
+ },
223441
+ "outputSchema": {
223442
+ "type": "object",
223443
+ "properties": {
223444
+ "items": {
223445
+ "type": "array",
223446
+ "items": {
223447
+ "type": "object",
223448
+ "properties": {
223449
+ "nodeType": {
223450
+ "const": "sdt"
223451
+ },
223452
+ "kind": {
223453
+ "enum": [
223454
+ "block",
223455
+ "inline"
223456
+ ]
223457
+ },
223458
+ "id": {
223459
+ "type": "string"
223460
+ },
223461
+ "controlType": {
223462
+ "type": "string"
223463
+ },
223464
+ "lockMode": {
223465
+ "type": "string"
223466
+ },
223467
+ "properties": {
223468
+ "type": "object"
223469
+ },
223470
+ "binding": {
223471
+ "type": "object",
223472
+ "properties": {
223473
+ "storeItemId": {
223474
+ "type": "string"
223475
+ },
223476
+ "xpath": {
223477
+ "type": "string"
223478
+ },
223479
+ "prefixMappings": {
223480
+ "type": "string"
223481
+ }
223482
+ },
223483
+ "additionalProperties": false,
223484
+ "required": [
223485
+ "storeItemId",
223486
+ "xpath"
223487
+ ]
223488
+ },
223489
+ "raw": {
223490
+ "type": "object"
223491
+ },
223492
+ "target": {
223493
+ "type": "object",
223494
+ "properties": {
223495
+ "kind": {
223496
+ "enum": [
223497
+ "block",
223498
+ "inline"
223499
+ ]
223500
+ },
223501
+ "nodeType": {
223502
+ "const": "sdt"
223503
+ },
223504
+ "nodeId": {
223505
+ "type": "string"
223506
+ }
223507
+ },
223508
+ "additionalProperties": false,
223509
+ "required": [
223510
+ "kind",
223511
+ "nodeType",
223512
+ "nodeId"
223513
+ ]
223514
+ },
223515
+ "selectionTarget": {
223516
+ "oneOf": [
223517
+ {
223518
+ "$ref": "#/$defs/SelectionTarget"
223519
+ },
223520
+ {
223521
+ "type": "null"
223522
+ }
223523
+ ]
223524
+ },
223525
+ "text": {
223526
+ "type": "string"
223527
+ },
223528
+ "isEmpty": {
223529
+ "type": "boolean"
223392
223530
  }
223393
223531
  },
223394
223532
  "additionalProperties": false,
@@ -223567,6 +223705,9 @@ export const CONTRACT = {
223567
223705
  },
223568
223706
  "text": {
223569
223707
  "type": "string"
223708
+ },
223709
+ "isEmpty": {
223710
+ "type": "boolean"
223570
223711
  }
223571
223712
  },
223572
223713
  "additionalProperties": false,
@@ -223792,6 +223933,9 @@ export const CONTRACT = {
223792
223933
  },
223793
223934
  "text": {
223794
223935
  "type": "string"
223936
+ },
223937
+ "isEmpty": {
223938
+ "type": "boolean"
223795
223939
  }
223796
223940
  },
223797
223941
  "additionalProperties": false,
@@ -223998,6 +224142,9 @@ export const CONTRACT = {
223998
224142
  },
223999
224143
  "text": {
224000
224144
  "type": "string"
224145
+ },
224146
+ "isEmpty": {
224147
+ "type": "boolean"
224001
224148
  }
224002
224149
  },
224003
224150
  "additionalProperties": false,
@@ -235574,6 +235721,9 @@ export const CONTRACT = {
235574
235721
  },
235575
235722
  "text": {
235576
235723
  "type": "string"
235724
+ },
235725
+ "isEmpty": {
235726
+ "type": "boolean"
235577
235727
  }
235578
235728
  },
235579
235729
  "additionalProperties": false,
@@ -249249,159 +249399,355 @@ export const CONTRACT = {
249249
249399
  "start",
249250
249400
  "end"
249251
249401
  ]
249252
- }
249253
- },
249254
- "required": [
249255
- "kind",
249256
- "nodeType",
249257
- "anchor"
249258
- ]
249259
- }
249260
- }
249261
- ],
249262
- "constraints": null,
249263
- "mutates": false,
249264
- "idempotency": "idempotent",
249265
- "supportsTrackedMode": false,
249266
- "supportsDryRun": false,
249267
- "inputSchema": {
249268
- "type": "object",
249269
- "properties": {
249270
- "target": {
249271
- "type": "object",
249272
- "properties": {
249273
- "kind": {
249274
- "const": "inline"
249275
- },
249276
- "nodeType": {
249277
- "const": "citation"
249278
- },
249279
- "anchor": {
249280
- "$ref": "#/$defs/InlineAnchor"
249281
- }
249282
- },
249283
- "additionalProperties": false,
249284
- "required": [
249285
- "kind",
249286
- "nodeType",
249287
- "anchor"
249288
- ]
249289
- }
249290
- },
249291
- "additionalProperties": false,
249292
- "required": [
249293
- "target"
249294
- ]
249295
- },
249296
- "outputSchema": {
249297
- "type": "object"
249298
- }
249299
- },
249300
- "doc.citations.insert": {
249301
- "operationId": "doc.citations.insert",
249302
- "sdkSurface": "document",
249303
- "command": "citations insert",
249304
- "commandTokens": [
249305
- "citations",
249306
- "insert"
249307
- ],
249308
- "category": "core",
249309
- "description": "Insert a new citation mark at a target location.",
249310
- "requiresDocumentContext": true,
249311
- "docRequirement": "optional",
249312
- "responseEnvelopeKey": "result",
249313
- "params": [
249314
- {
249315
- "name": "doc",
249316
- "kind": "doc",
249317
- "type": "string",
249318
- "description": "Document path. Optional when a session is already open."
249319
- },
249320
- {
249321
- "name": "sessionId",
249322
- "kind": "flag",
249323
- "type": "string",
249324
- "flag": "session",
249325
- "description": "Session ID for multi-session workflows. Optional when only one session is open."
249326
- },
249327
- {
249328
- "name": "out",
249329
- "kind": "flag",
249330
- "type": "string",
249331
- "agentVisible": false
249332
- },
249333
- {
249334
- "name": "force",
249335
- "kind": "flag",
249336
- "type": "boolean",
249337
- "description": "Bypass confirmation checks."
249338
- },
249339
- {
249340
- "name": "expectedRevision",
249341
- "kind": "flag",
249342
- "type": "number",
249343
- "flag": "expected-revision",
249344
- "agentVisible": false
249345
- },
249346
- {
249347
- "name": "changeMode",
249348
- "kind": "flag",
249349
- "type": "string",
249350
- "flag": "change-mode",
249351
- "schema": {
249352
- "type": "string"
249353
- },
249354
- "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
249355
- },
249356
- {
249357
- "name": "dryRun",
249358
- "kind": "flag",
249359
- "type": "boolean",
249360
- "flag": "dry-run",
249361
- "description": "Preview the result without applying changes."
249362
- },
249363
- {
249364
- "name": "at",
249365
- "kind": "jsonFlag",
249366
- "type": "json",
249367
- "flag": "at-json",
249368
- "required": true,
249369
- "schema": {
249370
- "type": "object",
249371
- "properties": {
249372
- "kind": {
249373
- "const": "text"
249374
- },
249375
- "segments": {
249376
- "type": "array",
249377
- "items": {
249378
- "type": "object",
249379
- "properties": {
249380
- "blockId": {
249381
- "type": "string"
249382
- },
249383
- "range": {
249384
- "type": "object",
249385
- "properties": {
249386
- "start": {
249387
- "type": "number"
249388
- },
249389
- "end": {
249390
- "type": "number"
249391
- }
249392
- },
249393
- "required": [
249394
- "start",
249395
- "end"
249396
- ]
249397
- }
249398
- },
249399
- "required": [
249400
- "blockId",
249401
- "range"
249402
- ]
249403
- },
249404
- "minItems": 1
249402
+ },
249403
+ "story": {
249404
+ "oneOf": [
249405
+ {
249406
+ "type": "object",
249407
+ "properties": {
249408
+ "kind": {
249409
+ "const": "story"
249410
+ },
249411
+ "storyType": {
249412
+ "const": "body"
249413
+ }
249414
+ },
249415
+ "required": [
249416
+ "kind",
249417
+ "storyType"
249418
+ ]
249419
+ },
249420
+ {
249421
+ "type": "object",
249422
+ "properties": {
249423
+ "kind": {
249424
+ "const": "story"
249425
+ },
249426
+ "storyType": {
249427
+ "const": "headerFooterSlot"
249428
+ },
249429
+ "section": {
249430
+ "type": "object",
249431
+ "properties": {
249432
+ "kind": {
249433
+ "const": "section"
249434
+ },
249435
+ "sectionId": {
249436
+ "type": "string"
249437
+ }
249438
+ },
249439
+ "required": [
249440
+ "kind",
249441
+ "sectionId"
249442
+ ]
249443
+ },
249444
+ "headerFooterKind": {
249445
+ "oneOf": [
249446
+ {
249447
+ "const": "header"
249448
+ },
249449
+ {
249450
+ "const": "footer"
249451
+ }
249452
+ ]
249453
+ },
249454
+ "variant": {
249455
+ "oneOf": [
249456
+ {
249457
+ "const": "default"
249458
+ },
249459
+ {
249460
+ "const": "first"
249461
+ },
249462
+ {
249463
+ "const": "even"
249464
+ }
249465
+ ]
249466
+ },
249467
+ "resolution": {
249468
+ "oneOf": [
249469
+ {
249470
+ "const": "effective"
249471
+ },
249472
+ {
249473
+ "const": "explicit"
249474
+ }
249475
+ ]
249476
+ },
249477
+ "onWrite": {
249478
+ "oneOf": [
249479
+ {
249480
+ "const": "materializeIfInherited"
249481
+ },
249482
+ {
249483
+ "const": "editResolvedPart"
249484
+ },
249485
+ {
249486
+ "const": "error"
249487
+ }
249488
+ ]
249489
+ }
249490
+ },
249491
+ "required": [
249492
+ "kind",
249493
+ "storyType",
249494
+ "section",
249495
+ "headerFooterKind",
249496
+ "variant"
249497
+ ]
249498
+ },
249499
+ {
249500
+ "type": "object",
249501
+ "properties": {
249502
+ "kind": {
249503
+ "const": "story"
249504
+ },
249505
+ "storyType": {
249506
+ "const": "headerFooterPart"
249507
+ },
249508
+ "refId": {
249509
+ "type": "string"
249510
+ }
249511
+ },
249512
+ "required": [
249513
+ "kind",
249514
+ "storyType",
249515
+ "refId"
249516
+ ]
249517
+ },
249518
+ {
249519
+ "type": "object",
249520
+ "properties": {
249521
+ "kind": {
249522
+ "const": "story"
249523
+ },
249524
+ "storyType": {
249525
+ "const": "footnote"
249526
+ },
249527
+ "noteId": {
249528
+ "type": "string"
249529
+ }
249530
+ },
249531
+ "required": [
249532
+ "kind",
249533
+ "storyType",
249534
+ "noteId"
249535
+ ]
249536
+ },
249537
+ {
249538
+ "type": "object",
249539
+ "properties": {
249540
+ "kind": {
249541
+ "const": "story"
249542
+ },
249543
+ "storyType": {
249544
+ "const": "endnote"
249545
+ },
249546
+ "noteId": {
249547
+ "type": "string"
249548
+ }
249549
+ },
249550
+ "required": [
249551
+ "kind",
249552
+ "storyType",
249553
+ "noteId"
249554
+ ]
249555
+ },
249556
+ {
249557
+ "type": "object",
249558
+ "properties": {
249559
+ "kind": {
249560
+ "const": "story"
249561
+ },
249562
+ "storyType": {
249563
+ "const": "textbox"
249564
+ },
249565
+ "textboxId": {
249566
+ "type": "string"
249567
+ }
249568
+ },
249569
+ "required": [
249570
+ "kind",
249571
+ "storyType",
249572
+ "textboxId"
249573
+ ]
249574
+ }
249575
+ ],
249576
+ "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."
249577
+ },
249578
+ "storyId": {
249579
+ "type": "string"
249580
+ },
249581
+ "fieldId": {
249582
+ "type": "string"
249583
+ },
249584
+ "occurrenceIndex": {
249585
+ "type": "number"
249586
+ }
249587
+ },
249588
+ "required": [
249589
+ "kind",
249590
+ "nodeType",
249591
+ "anchor"
249592
+ ]
249593
+ }
249594
+ }
249595
+ ],
249596
+ "constraints": null,
249597
+ "mutates": false,
249598
+ "idempotency": "idempotent",
249599
+ "supportsTrackedMode": false,
249600
+ "supportsDryRun": false,
249601
+ "inputSchema": {
249602
+ "type": "object",
249603
+ "properties": {
249604
+ "target": {
249605
+ "type": "object",
249606
+ "properties": {
249607
+ "kind": {
249608
+ "const": "inline"
249609
+ },
249610
+ "nodeType": {
249611
+ "const": "citation"
249612
+ },
249613
+ "anchor": {
249614
+ "$ref": "#/$defs/InlineAnchor"
249615
+ },
249616
+ "story": {
249617
+ "$ref": "#/$defs/StoryLocator"
249618
+ },
249619
+ "storyId": {
249620
+ "type": "string"
249621
+ },
249622
+ "fieldId": {
249623
+ "type": "string"
249624
+ },
249625
+ "occurrenceIndex": {
249626
+ "type": "integer"
249627
+ }
249628
+ },
249629
+ "additionalProperties": false,
249630
+ "required": [
249631
+ "kind",
249632
+ "nodeType",
249633
+ "anchor"
249634
+ ]
249635
+ }
249636
+ },
249637
+ "additionalProperties": false,
249638
+ "required": [
249639
+ "target"
249640
+ ]
249641
+ },
249642
+ "outputSchema": {
249643
+ "type": "object"
249644
+ }
249645
+ },
249646
+ "doc.citations.insert": {
249647
+ "operationId": "doc.citations.insert",
249648
+ "sdkSurface": "document",
249649
+ "command": "citations insert",
249650
+ "commandTokens": [
249651
+ "citations",
249652
+ "insert"
249653
+ ],
249654
+ "category": "core",
249655
+ "description": "Insert a new citation mark at a target location.",
249656
+ "requiresDocumentContext": true,
249657
+ "docRequirement": "optional",
249658
+ "responseEnvelopeKey": "result",
249659
+ "params": [
249660
+ {
249661
+ "name": "doc",
249662
+ "kind": "doc",
249663
+ "type": "string",
249664
+ "description": "Document path. Optional when a session is already open."
249665
+ },
249666
+ {
249667
+ "name": "sessionId",
249668
+ "kind": "flag",
249669
+ "type": "string",
249670
+ "flag": "session",
249671
+ "description": "Session ID for multi-session workflows. Optional when only one session is open."
249672
+ },
249673
+ {
249674
+ "name": "out",
249675
+ "kind": "flag",
249676
+ "type": "string",
249677
+ "agentVisible": false
249678
+ },
249679
+ {
249680
+ "name": "force",
249681
+ "kind": "flag",
249682
+ "type": "boolean",
249683
+ "description": "Bypass confirmation checks."
249684
+ },
249685
+ {
249686
+ "name": "expectedRevision",
249687
+ "kind": "flag",
249688
+ "type": "number",
249689
+ "flag": "expected-revision",
249690
+ "agentVisible": false
249691
+ },
249692
+ {
249693
+ "name": "changeMode",
249694
+ "kind": "flag",
249695
+ "type": "string",
249696
+ "flag": "change-mode",
249697
+ "schema": {
249698
+ "type": "string"
249699
+ },
249700
+ "description": "Edit mode: \"direct\" applies changes immediately, \"tracked\" records as suggestions."
249701
+ },
249702
+ {
249703
+ "name": "dryRun",
249704
+ "kind": "flag",
249705
+ "type": "boolean",
249706
+ "flag": "dry-run",
249707
+ "description": "Preview the result without applying changes."
249708
+ },
249709
+ {
249710
+ "name": "at",
249711
+ "kind": "jsonFlag",
249712
+ "type": "json",
249713
+ "flag": "at-json",
249714
+ "required": true,
249715
+ "schema": {
249716
+ "type": "object",
249717
+ "properties": {
249718
+ "kind": {
249719
+ "const": "text"
249720
+ },
249721
+ "segments": {
249722
+ "type": "array",
249723
+ "items": {
249724
+ "type": "object",
249725
+ "properties": {
249726
+ "blockId": {
249727
+ "type": "string"
249728
+ },
249729
+ "range": {
249730
+ "type": "object",
249731
+ "properties": {
249732
+ "start": {
249733
+ "type": "number"
249734
+ },
249735
+ "end": {
249736
+ "type": "number"
249737
+ }
249738
+ },
249739
+ "required": [
249740
+ "start",
249741
+ "end"
249742
+ ]
249743
+ }
249744
+ },
249745
+ "required": [
249746
+ "blockId",
249747
+ "range"
249748
+ ]
249749
+ },
249750
+ "minItems": 1
249405
249751
  },
249406
249752
  "story": {
249407
249753
  "oneOf": [
@@ -249642,6 +249988,18 @@ export const CONTRACT = {
249642
249988
  },
249643
249989
  "anchor": {
249644
249990
  "$ref": "#/$defs/InlineAnchor"
249991
+ },
249992
+ "story": {
249993
+ "$ref": "#/$defs/StoryLocator"
249994
+ },
249995
+ "storyId": {
249996
+ "type": "string"
249997
+ },
249998
+ "fieldId": {
249999
+ "type": "string"
250000
+ },
250001
+ "occurrenceIndex": {
250002
+ "type": "integer"
249645
250003
  }
249646
250004
  },
249647
250005
  "additionalProperties": false,
@@ -249707,6 +250065,18 @@ export const CONTRACT = {
249707
250065
  },
249708
250066
  "anchor": {
249709
250067
  "$ref": "#/$defs/InlineAnchor"
250068
+ },
250069
+ "story": {
250070
+ "$ref": "#/$defs/StoryLocator"
250071
+ },
250072
+ "storyId": {
250073
+ "type": "string"
250074
+ },
250075
+ "fieldId": {
250076
+ "type": "string"
250077
+ },
250078
+ "occurrenceIndex": {
250079
+ "type": "integer"
249710
250080
  }
249711
250081
  },
249712
250082
  "additionalProperties": false,
@@ -249870,6 +250240,190 @@ export const CONTRACT = {
249870
250240
  "start",
249871
250241
  "end"
249872
250242
  ]
250243
+ },
250244
+ "story": {
250245
+ "oneOf": [
250246
+ {
250247
+ "type": "object",
250248
+ "properties": {
250249
+ "kind": {
250250
+ "const": "story"
250251
+ },
250252
+ "storyType": {
250253
+ "const": "body"
250254
+ }
250255
+ },
250256
+ "required": [
250257
+ "kind",
250258
+ "storyType"
250259
+ ]
250260
+ },
250261
+ {
250262
+ "type": "object",
250263
+ "properties": {
250264
+ "kind": {
250265
+ "const": "story"
250266
+ },
250267
+ "storyType": {
250268
+ "const": "headerFooterSlot"
250269
+ },
250270
+ "section": {
250271
+ "type": "object",
250272
+ "properties": {
250273
+ "kind": {
250274
+ "const": "section"
250275
+ },
250276
+ "sectionId": {
250277
+ "type": "string"
250278
+ }
250279
+ },
250280
+ "required": [
250281
+ "kind",
250282
+ "sectionId"
250283
+ ]
250284
+ },
250285
+ "headerFooterKind": {
250286
+ "oneOf": [
250287
+ {
250288
+ "const": "header"
250289
+ },
250290
+ {
250291
+ "const": "footer"
250292
+ }
250293
+ ]
250294
+ },
250295
+ "variant": {
250296
+ "oneOf": [
250297
+ {
250298
+ "const": "default"
250299
+ },
250300
+ {
250301
+ "const": "first"
250302
+ },
250303
+ {
250304
+ "const": "even"
250305
+ }
250306
+ ]
250307
+ },
250308
+ "resolution": {
250309
+ "oneOf": [
250310
+ {
250311
+ "const": "effective"
250312
+ },
250313
+ {
250314
+ "const": "explicit"
250315
+ }
250316
+ ]
250317
+ },
250318
+ "onWrite": {
250319
+ "oneOf": [
250320
+ {
250321
+ "const": "materializeIfInherited"
250322
+ },
250323
+ {
250324
+ "const": "editResolvedPart"
250325
+ },
250326
+ {
250327
+ "const": "error"
250328
+ }
250329
+ ]
250330
+ }
250331
+ },
250332
+ "required": [
250333
+ "kind",
250334
+ "storyType",
250335
+ "section",
250336
+ "headerFooterKind",
250337
+ "variant"
250338
+ ]
250339
+ },
250340
+ {
250341
+ "type": "object",
250342
+ "properties": {
250343
+ "kind": {
250344
+ "const": "story"
250345
+ },
250346
+ "storyType": {
250347
+ "const": "headerFooterPart"
250348
+ },
250349
+ "refId": {
250350
+ "type": "string"
250351
+ }
250352
+ },
250353
+ "required": [
250354
+ "kind",
250355
+ "storyType",
250356
+ "refId"
250357
+ ]
250358
+ },
250359
+ {
250360
+ "type": "object",
250361
+ "properties": {
250362
+ "kind": {
250363
+ "const": "story"
250364
+ },
250365
+ "storyType": {
250366
+ "const": "footnote"
250367
+ },
250368
+ "noteId": {
250369
+ "type": "string"
250370
+ }
250371
+ },
250372
+ "required": [
250373
+ "kind",
250374
+ "storyType",
250375
+ "noteId"
250376
+ ]
250377
+ },
250378
+ {
250379
+ "type": "object",
250380
+ "properties": {
250381
+ "kind": {
250382
+ "const": "story"
250383
+ },
250384
+ "storyType": {
250385
+ "const": "endnote"
250386
+ },
250387
+ "noteId": {
250388
+ "type": "string"
250389
+ }
250390
+ },
250391
+ "required": [
250392
+ "kind",
250393
+ "storyType",
250394
+ "noteId"
250395
+ ]
250396
+ },
250397
+ {
250398
+ "type": "object",
250399
+ "properties": {
250400
+ "kind": {
250401
+ "const": "story"
250402
+ },
250403
+ "storyType": {
250404
+ "const": "textbox"
250405
+ },
250406
+ "textboxId": {
250407
+ "type": "string"
250408
+ }
250409
+ },
250410
+ "required": [
250411
+ "kind",
250412
+ "storyType",
250413
+ "textboxId"
250414
+ ]
250415
+ }
250416
+ ],
250417
+ "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."
250418
+ },
250419
+ "storyId": {
250420
+ "type": "string"
250421
+ },
250422
+ "fieldId": {
250423
+ "type": "string"
250424
+ },
250425
+ "occurrenceIndex": {
250426
+ "type": "number"
249873
250427
  }
249874
250428
  },
249875
250429
  "required": [
@@ -249917,6 +250471,18 @@ export const CONTRACT = {
249917
250471
  },
249918
250472
  "anchor": {
249919
250473
  "$ref": "#/$defs/InlineAnchor"
250474
+ },
250475
+ "story": {
250476
+ "$ref": "#/$defs/StoryLocator"
250477
+ },
250478
+ "storyId": {
250479
+ "type": "string"
250480
+ },
250481
+ "fieldId": {
250482
+ "type": "string"
250483
+ },
250484
+ "occurrenceIndex": {
250485
+ "type": "integer"
249920
250486
  }
249921
250487
  },
249922
250488
  "additionalProperties": false,
@@ -249964,6 +250530,18 @@ export const CONTRACT = {
249964
250530
  },
249965
250531
  "anchor": {
249966
250532
  "$ref": "#/$defs/InlineAnchor"
250533
+ },
250534
+ "story": {
250535
+ "$ref": "#/$defs/StoryLocator"
250536
+ },
250537
+ "storyId": {
250538
+ "type": "string"
250539
+ },
250540
+ "fieldId": {
250541
+ "type": "string"
250542
+ },
250543
+ "occurrenceIndex": {
250544
+ "type": "integer"
249967
250545
  }
249968
250546
  },
249969
250547
  "additionalProperties": false,
@@ -250029,6 +250607,18 @@ export const CONTRACT = {
250029
250607
  },
250030
250608
  "anchor": {
250031
250609
  "$ref": "#/$defs/InlineAnchor"
250610
+ },
250611
+ "story": {
250612
+ "$ref": "#/$defs/StoryLocator"
250613
+ },
250614
+ "storyId": {
250615
+ "type": "string"
250616
+ },
250617
+ "fieldId": {
250618
+ "type": "string"
250619
+ },
250620
+ "occurrenceIndex": {
250621
+ "type": "integer"
250032
250622
  }
250033
250623
  },
250034
250624
  "additionalProperties": false,
@@ -250192,6 +250782,190 @@ export const CONTRACT = {
250192
250782
  "start",
250193
250783
  "end"
250194
250784
  ]
250785
+ },
250786
+ "story": {
250787
+ "oneOf": [
250788
+ {
250789
+ "type": "object",
250790
+ "properties": {
250791
+ "kind": {
250792
+ "const": "story"
250793
+ },
250794
+ "storyType": {
250795
+ "const": "body"
250796
+ }
250797
+ },
250798
+ "required": [
250799
+ "kind",
250800
+ "storyType"
250801
+ ]
250802
+ },
250803
+ {
250804
+ "type": "object",
250805
+ "properties": {
250806
+ "kind": {
250807
+ "const": "story"
250808
+ },
250809
+ "storyType": {
250810
+ "const": "headerFooterSlot"
250811
+ },
250812
+ "section": {
250813
+ "type": "object",
250814
+ "properties": {
250815
+ "kind": {
250816
+ "const": "section"
250817
+ },
250818
+ "sectionId": {
250819
+ "type": "string"
250820
+ }
250821
+ },
250822
+ "required": [
250823
+ "kind",
250824
+ "sectionId"
250825
+ ]
250826
+ },
250827
+ "headerFooterKind": {
250828
+ "oneOf": [
250829
+ {
250830
+ "const": "header"
250831
+ },
250832
+ {
250833
+ "const": "footer"
250834
+ }
250835
+ ]
250836
+ },
250837
+ "variant": {
250838
+ "oneOf": [
250839
+ {
250840
+ "const": "default"
250841
+ },
250842
+ {
250843
+ "const": "first"
250844
+ },
250845
+ {
250846
+ "const": "even"
250847
+ }
250848
+ ]
250849
+ },
250850
+ "resolution": {
250851
+ "oneOf": [
250852
+ {
250853
+ "const": "effective"
250854
+ },
250855
+ {
250856
+ "const": "explicit"
250857
+ }
250858
+ ]
250859
+ },
250860
+ "onWrite": {
250861
+ "oneOf": [
250862
+ {
250863
+ "const": "materializeIfInherited"
250864
+ },
250865
+ {
250866
+ "const": "editResolvedPart"
250867
+ },
250868
+ {
250869
+ "const": "error"
250870
+ }
250871
+ ]
250872
+ }
250873
+ },
250874
+ "required": [
250875
+ "kind",
250876
+ "storyType",
250877
+ "section",
250878
+ "headerFooterKind",
250879
+ "variant"
250880
+ ]
250881
+ },
250882
+ {
250883
+ "type": "object",
250884
+ "properties": {
250885
+ "kind": {
250886
+ "const": "story"
250887
+ },
250888
+ "storyType": {
250889
+ "const": "headerFooterPart"
250890
+ },
250891
+ "refId": {
250892
+ "type": "string"
250893
+ }
250894
+ },
250895
+ "required": [
250896
+ "kind",
250897
+ "storyType",
250898
+ "refId"
250899
+ ]
250900
+ },
250901
+ {
250902
+ "type": "object",
250903
+ "properties": {
250904
+ "kind": {
250905
+ "const": "story"
250906
+ },
250907
+ "storyType": {
250908
+ "const": "footnote"
250909
+ },
250910
+ "noteId": {
250911
+ "type": "string"
250912
+ }
250913
+ },
250914
+ "required": [
250915
+ "kind",
250916
+ "storyType",
250917
+ "noteId"
250918
+ ]
250919
+ },
250920
+ {
250921
+ "type": "object",
250922
+ "properties": {
250923
+ "kind": {
250924
+ "const": "story"
250925
+ },
250926
+ "storyType": {
250927
+ "const": "endnote"
250928
+ },
250929
+ "noteId": {
250930
+ "type": "string"
250931
+ }
250932
+ },
250933
+ "required": [
250934
+ "kind",
250935
+ "storyType",
250936
+ "noteId"
250937
+ ]
250938
+ },
250939
+ {
250940
+ "type": "object",
250941
+ "properties": {
250942
+ "kind": {
250943
+ "const": "story"
250944
+ },
250945
+ "storyType": {
250946
+ "const": "textbox"
250947
+ },
250948
+ "textboxId": {
250949
+ "type": "string"
250950
+ }
250951
+ },
250952
+ "required": [
250953
+ "kind",
250954
+ "storyType",
250955
+ "textboxId"
250956
+ ]
250957
+ }
250958
+ ],
250959
+ "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."
250960
+ },
250961
+ "storyId": {
250962
+ "type": "string"
250963
+ },
250964
+ "fieldId": {
250965
+ "type": "string"
250966
+ },
250967
+ "occurrenceIndex": {
250968
+ "type": "number"
250195
250969
  }
250196
250970
  },
250197
250971
  "required": [
@@ -250221,6 +250995,18 @@ export const CONTRACT = {
250221
250995
  },
250222
250996
  "anchor": {
250223
250997
  "$ref": "#/$defs/InlineAnchor"
250998
+ },
250999
+ "story": {
251000
+ "$ref": "#/$defs/StoryLocator"
251001
+ },
251002
+ "storyId": {
251003
+ "type": "string"
251004
+ },
251005
+ "fieldId": {
251006
+ "type": "string"
251007
+ },
251008
+ "occurrenceIndex": {
251009
+ "type": "integer"
250224
251010
  }
250225
251011
  },
250226
251012
  "additionalProperties": false,
@@ -250255,6 +251041,18 @@ export const CONTRACT = {
250255
251041
  },
250256
251042
  "anchor": {
250257
251043
  "$ref": "#/$defs/InlineAnchor"
251044
+ },
251045
+ "story": {
251046
+ "$ref": "#/$defs/StoryLocator"
251047
+ },
251048
+ "storyId": {
251049
+ "type": "string"
251050
+ },
251051
+ "fieldId": {
251052
+ "type": "string"
251053
+ },
251054
+ "occurrenceIndex": {
251055
+ "type": "integer"
250258
251056
  }
250259
251057
  },
250260
251058
  "additionalProperties": false,
@@ -250320,6 +251118,18 @@ export const CONTRACT = {
250320
251118
  },
250321
251119
  "anchor": {
250322
251120
  "$ref": "#/$defs/InlineAnchor"
251121
+ },
251122
+ "story": {
251123
+ "$ref": "#/$defs/StoryLocator"
251124
+ },
251125
+ "storyId": {
251126
+ "type": "string"
251127
+ },
251128
+ "fieldId": {
251129
+ "type": "string"
251130
+ },
251131
+ "occurrenceIndex": {
251132
+ "type": "integer"
250323
251133
  }
250324
251134
  },
250325
251135
  "additionalProperties": false,