@superdoc-dev/sdk 1.0.0-alpha.1 → 1.0.0-alpha.10

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.
Files changed (52) hide show
  1. package/README.md +116 -0
  2. package/dist/generated/client.d.ts +1808 -0
  3. package/dist/generated/client.d.ts.map +1 -0
  4. package/dist/generated/client.js +66 -0
  5. package/dist/generated/contract.d.ts +14257 -0
  6. package/dist/generated/contract.d.ts.map +1 -0
  7. package/dist/generated/contract.js +18761 -0
  8. package/dist/index.d.ts +23 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +29 -0
  11. package/dist/runtime/embedded-cli.d.ts +5 -0
  12. package/dist/runtime/embedded-cli.d.ts.map +1 -0
  13. package/dist/runtime/embedded-cli.js +94 -0
  14. package/dist/runtime/errors.d.ts +17 -0
  15. package/dist/runtime/errors.d.ts.map +1 -0
  16. package/dist/runtime/errors.js +18 -0
  17. package/dist/runtime/host.d.ts +36 -0
  18. package/dist/runtime/host.d.ts.map +1 -0
  19. package/dist/runtime/host.js +345 -0
  20. package/dist/runtime/process.d.ts +16 -0
  21. package/dist/runtime/process.d.ts.map +1 -0
  22. package/dist/runtime/process.js +27 -0
  23. package/dist/runtime/transport-common.d.ts +44 -0
  24. package/dist/runtime/transport-common.d.ts.map +1 -0
  25. package/dist/runtime/transport-common.js +63 -0
  26. package/dist/skills.d.ts +25 -0
  27. package/dist/skills.d.ts.map +1 -0
  28. package/dist/skills.js +140 -0
  29. package/dist/tools.d.ts +113 -0
  30. package/dist/tools.d.ts.map +1 -0
  31. package/dist/tools.js +360 -0
  32. package/package.json +23 -17
  33. package/tools/catalog.json +17382 -0
  34. package/tools/tool-name-map.json +96 -0
  35. package/tools/tools-policy.json +100 -0
  36. package/tools/tools.anthropic.json +3529 -0
  37. package/tools/tools.generic.json +16827 -0
  38. package/tools/tools.openai.json +3811 -0
  39. package/tools/tools.vercel.json +3811 -0
  40. package/LICENSE +0 -661
  41. package/skills/.gitkeep +0 -0
  42. package/skills/editing-docx.md +0 -113
  43. package/src/generated/client.ts +0 -857
  44. package/src/generated/contract.ts +0 -3467
  45. package/src/index.ts +0 -33
  46. package/src/runtime/embedded-cli.ts +0 -99
  47. package/src/runtime/errors.ts +0 -13
  48. package/src/runtime/host.ts +0 -463
  49. package/src/runtime/process.ts +0 -69
  50. package/src/runtime/spawn.ts +0 -190
  51. package/src/runtime/transport-common.ts +0 -134
  52. package/src/skills.ts +0 -76
@@ -0,0 +1,1808 @@
1
+ import type { SuperDocRuntime, InvokeOptions } from '../runtime/process.js';
2
+ export interface DocFindParams {
3
+ doc?: string;
4
+ sessionId?: string;
5
+ within?: ({
6
+ kind: "block";
7
+ nodeType: "paragraph" | "heading" | "listItem" | "table" | "tableRow" | "tableCell" | "image" | "sdt";
8
+ nodeId: string;
9
+ }) | ({
10
+ kind: "inline";
11
+ nodeType: "run" | "bookmark" | "comment" | "hyperlink" | "sdt" | "image" | "footnoteRef" | "tab" | "lineBreak";
12
+ anchor: {
13
+ start: {
14
+ blockId: string;
15
+ offset: number;
16
+ };
17
+ end: {
18
+ blockId: string;
19
+ offset: number;
20
+ };
21
+ };
22
+ });
23
+ limit?: number;
24
+ offset?: number;
25
+ includeNodes?: boolean;
26
+ includeUnknown?: boolean;
27
+ type?: string;
28
+ nodeType?: string;
29
+ kind?: string;
30
+ pattern?: string;
31
+ mode?: string;
32
+ caseSensitive?: boolean;
33
+ query?: Record<string, unknown> | unknown[];
34
+ }
35
+ export interface DocGetNodeParams {
36
+ doc?: string;
37
+ sessionId?: string;
38
+ address?: Record<string, unknown> | unknown[];
39
+ }
40
+ export interface DocGetNodeByIdParams {
41
+ doc?: string;
42
+ sessionId?: string;
43
+ id: string;
44
+ nodeType?: string;
45
+ }
46
+ export interface DocInfoParams {
47
+ doc?: string;
48
+ sessionId?: string;
49
+ }
50
+ export interface DocInsertParams {
51
+ doc?: string;
52
+ sessionId?: string;
53
+ out?: string;
54
+ force?: boolean;
55
+ expectedRevision?: number;
56
+ changeMode?: string;
57
+ dryRun?: boolean;
58
+ target?: {
59
+ kind: "text";
60
+ blockId: string;
61
+ range: {
62
+ start: number;
63
+ end: number;
64
+ };
65
+ };
66
+ text: string;
67
+ blockId?: string;
68
+ offset?: number;
69
+ }
70
+ export interface DocReplaceParams {
71
+ doc?: string;
72
+ sessionId?: string;
73
+ out?: string;
74
+ force?: boolean;
75
+ expectedRevision?: number;
76
+ changeMode?: string;
77
+ dryRun?: boolean;
78
+ target?: {
79
+ kind: "text";
80
+ blockId: string;
81
+ range: {
82
+ start: number;
83
+ end: number;
84
+ };
85
+ };
86
+ text: string;
87
+ blockId?: string;
88
+ start?: number;
89
+ end?: number;
90
+ }
91
+ export interface DocDeleteParams {
92
+ doc?: string;
93
+ sessionId?: string;
94
+ out?: string;
95
+ force?: boolean;
96
+ expectedRevision?: number;
97
+ changeMode?: string;
98
+ dryRun?: boolean;
99
+ target?: {
100
+ kind: "text";
101
+ blockId: string;
102
+ range: {
103
+ start: number;
104
+ end: number;
105
+ };
106
+ };
107
+ blockId?: string;
108
+ start?: number;
109
+ end?: number;
110
+ }
111
+ export interface DocFormatBoldParams {
112
+ doc?: string;
113
+ sessionId?: string;
114
+ out?: string;
115
+ force?: boolean;
116
+ expectedRevision?: number;
117
+ changeMode?: string;
118
+ dryRun?: boolean;
119
+ target?: {
120
+ kind: "text";
121
+ blockId: string;
122
+ range: {
123
+ start: number;
124
+ end: number;
125
+ };
126
+ };
127
+ blockId?: string;
128
+ start?: number;
129
+ end?: number;
130
+ }
131
+ export interface DocFormatItalicParams {
132
+ doc?: string;
133
+ sessionId?: string;
134
+ out?: string;
135
+ force?: boolean;
136
+ expectedRevision?: number;
137
+ changeMode?: string;
138
+ dryRun?: boolean;
139
+ target?: {
140
+ kind: "text";
141
+ blockId: string;
142
+ range: {
143
+ start: number;
144
+ end: number;
145
+ };
146
+ };
147
+ blockId?: string;
148
+ start?: number;
149
+ end?: number;
150
+ }
151
+ export interface DocFormatUnderlineParams {
152
+ doc?: string;
153
+ sessionId?: string;
154
+ out?: string;
155
+ force?: boolean;
156
+ expectedRevision?: number;
157
+ changeMode?: string;
158
+ dryRun?: boolean;
159
+ target?: {
160
+ kind: "text";
161
+ blockId: string;
162
+ range: {
163
+ start: number;
164
+ end: number;
165
+ };
166
+ };
167
+ blockId?: string;
168
+ start?: number;
169
+ end?: number;
170
+ }
171
+ export interface DocFormatStrikethroughParams {
172
+ doc?: string;
173
+ sessionId?: string;
174
+ out?: string;
175
+ force?: boolean;
176
+ expectedRevision?: number;
177
+ changeMode?: string;
178
+ dryRun?: boolean;
179
+ target?: {
180
+ kind: "text";
181
+ blockId: string;
182
+ range: {
183
+ start: number;
184
+ end: number;
185
+ };
186
+ };
187
+ blockId?: string;
188
+ start?: number;
189
+ end?: number;
190
+ }
191
+ export interface DocCreateParagraphParams {
192
+ doc?: string;
193
+ sessionId?: string;
194
+ out?: string;
195
+ force?: boolean;
196
+ expectedRevision?: number;
197
+ changeMode?: string;
198
+ dryRun?: boolean;
199
+ at?: ({
200
+ kind: "documentStart";
201
+ }) | ({
202
+ kind: "documentEnd";
203
+ }) | unknown | unknown | unknown | unknown;
204
+ text?: string;
205
+ input?: Record<string, unknown> | unknown[];
206
+ }
207
+ export interface DocListsListParams {
208
+ doc?: string;
209
+ sessionId?: string;
210
+ within?: {
211
+ kind: "block";
212
+ nodeType: "paragraph" | "heading" | "listItem" | "table" | "tableRow" | "tableCell" | "image" | "sdt";
213
+ nodeId: string;
214
+ };
215
+ limit?: number;
216
+ offset?: number;
217
+ kind?: string;
218
+ level?: number;
219
+ ordinal?: number;
220
+ query?: Record<string, unknown> | unknown[];
221
+ }
222
+ export interface DocListsGetParams {
223
+ doc?: string;
224
+ sessionId?: string;
225
+ address: {
226
+ kind: "block";
227
+ nodeType: "listItem";
228
+ nodeId: string;
229
+ };
230
+ }
231
+ export interface DocListsInsertParams {
232
+ doc?: string;
233
+ sessionId?: string;
234
+ out?: string;
235
+ force?: boolean;
236
+ expectedRevision?: number;
237
+ changeMode?: string;
238
+ dryRun?: boolean;
239
+ target?: {
240
+ kind: "block";
241
+ nodeType: "listItem";
242
+ nodeId: string;
243
+ };
244
+ nodeId?: string;
245
+ position?: string;
246
+ text?: string;
247
+ input?: Record<string, unknown> | unknown[];
248
+ }
249
+ export interface DocListsSetTypeParams {
250
+ doc?: string;
251
+ sessionId?: string;
252
+ out?: string;
253
+ force?: boolean;
254
+ expectedRevision?: number;
255
+ changeMode?: string;
256
+ dryRun?: boolean;
257
+ target?: {
258
+ kind: "block";
259
+ nodeType: "listItem";
260
+ nodeId: string;
261
+ };
262
+ nodeId?: string;
263
+ kind?: string;
264
+ input?: Record<string, unknown> | unknown[];
265
+ }
266
+ export interface DocListsIndentParams {
267
+ doc?: string;
268
+ sessionId?: string;
269
+ out?: string;
270
+ force?: boolean;
271
+ expectedRevision?: number;
272
+ changeMode?: string;
273
+ dryRun?: boolean;
274
+ target?: {
275
+ kind: "block";
276
+ nodeType: "listItem";
277
+ nodeId: string;
278
+ };
279
+ nodeId?: string;
280
+ input?: Record<string, unknown> | unknown[];
281
+ }
282
+ export interface DocListsOutdentParams {
283
+ doc?: string;
284
+ sessionId?: string;
285
+ out?: string;
286
+ force?: boolean;
287
+ expectedRevision?: number;
288
+ changeMode?: string;
289
+ dryRun?: boolean;
290
+ target?: {
291
+ kind: "block";
292
+ nodeType: "listItem";
293
+ nodeId: string;
294
+ };
295
+ nodeId?: string;
296
+ input?: Record<string, unknown> | unknown[];
297
+ }
298
+ export interface DocListsRestartParams {
299
+ doc?: string;
300
+ sessionId?: string;
301
+ out?: string;
302
+ force?: boolean;
303
+ expectedRevision?: number;
304
+ changeMode?: string;
305
+ dryRun?: boolean;
306
+ target?: {
307
+ kind: "block";
308
+ nodeType: "listItem";
309
+ nodeId: string;
310
+ };
311
+ nodeId?: string;
312
+ input?: Record<string, unknown> | unknown[];
313
+ }
314
+ export interface DocListsExitParams {
315
+ doc?: string;
316
+ sessionId?: string;
317
+ out?: string;
318
+ force?: boolean;
319
+ expectedRevision?: number;
320
+ changeMode?: string;
321
+ dryRun?: boolean;
322
+ target?: {
323
+ kind: "block";
324
+ nodeType: "listItem";
325
+ nodeId: string;
326
+ };
327
+ nodeId?: string;
328
+ input?: Record<string, unknown> | unknown[];
329
+ }
330
+ export interface DocCommentsAddParams {
331
+ doc?: string;
332
+ sessionId?: string;
333
+ out?: string;
334
+ force?: boolean;
335
+ expectedRevision?: number;
336
+ changeMode?: string;
337
+ target?: {
338
+ kind: "text";
339
+ blockId: string;
340
+ range: {
341
+ start: number;
342
+ end: number;
343
+ };
344
+ };
345
+ text: string;
346
+ blockId?: string;
347
+ start?: number;
348
+ end?: number;
349
+ }
350
+ export interface DocCommentsEditParams {
351
+ doc?: string;
352
+ sessionId?: string;
353
+ out?: string;
354
+ force?: boolean;
355
+ expectedRevision?: number;
356
+ changeMode?: string;
357
+ id: string;
358
+ text: string;
359
+ }
360
+ export interface DocCommentsReplyParams {
361
+ doc?: string;
362
+ sessionId?: string;
363
+ out?: string;
364
+ force?: boolean;
365
+ expectedRevision?: number;
366
+ changeMode?: string;
367
+ parentId: string;
368
+ text: string;
369
+ }
370
+ export interface DocCommentsMoveParams {
371
+ doc?: string;
372
+ sessionId?: string;
373
+ out?: string;
374
+ force?: boolean;
375
+ expectedRevision?: number;
376
+ changeMode?: string;
377
+ id: string;
378
+ target?: {
379
+ kind: "text";
380
+ blockId: string;
381
+ range: {
382
+ start: number;
383
+ end: number;
384
+ };
385
+ };
386
+ blockId?: string;
387
+ start?: number;
388
+ end?: number;
389
+ }
390
+ export interface DocCommentsResolveParams {
391
+ doc?: string;
392
+ sessionId?: string;
393
+ out?: string;
394
+ force?: boolean;
395
+ expectedRevision?: number;
396
+ changeMode?: string;
397
+ id: string;
398
+ }
399
+ export interface DocCommentsRemoveParams {
400
+ doc?: string;
401
+ sessionId?: string;
402
+ out?: string;
403
+ force?: boolean;
404
+ expectedRevision?: number;
405
+ changeMode?: string;
406
+ id: string;
407
+ }
408
+ export interface DocCommentsSetInternalParams {
409
+ doc?: string;
410
+ sessionId?: string;
411
+ out?: string;
412
+ force?: boolean;
413
+ expectedRevision?: number;
414
+ changeMode?: string;
415
+ id: string;
416
+ isInternal: boolean;
417
+ }
418
+ export interface DocCommentsSetActiveParams {
419
+ doc?: string;
420
+ sessionId?: string;
421
+ out?: string;
422
+ force?: boolean;
423
+ expectedRevision?: number;
424
+ changeMode?: string;
425
+ commentId?: unknown;
426
+ id?: string;
427
+ clear?: boolean;
428
+ }
429
+ export interface DocCommentsGoToParams {
430
+ doc?: string;
431
+ sessionId?: string;
432
+ id: string;
433
+ }
434
+ export interface DocCommentsGetParams {
435
+ doc?: string;
436
+ sessionId?: string;
437
+ id: string;
438
+ }
439
+ export interface DocCommentsListParams {
440
+ doc?: string;
441
+ sessionId?: string;
442
+ includeResolved?: boolean;
443
+ }
444
+ export interface DocTrackChangesListParams {
445
+ doc?: string;
446
+ sessionId?: string;
447
+ limit?: number;
448
+ offset?: number;
449
+ type?: string;
450
+ }
451
+ export interface DocTrackChangesGetParams {
452
+ doc?: string;
453
+ sessionId?: string;
454
+ id: string;
455
+ }
456
+ export interface DocTrackChangesAcceptParams {
457
+ doc?: string;
458
+ sessionId?: string;
459
+ out?: string;
460
+ force?: boolean;
461
+ expectedRevision?: number;
462
+ changeMode?: string;
463
+ id: string;
464
+ }
465
+ export interface DocTrackChangesRejectParams {
466
+ doc?: string;
467
+ sessionId?: string;
468
+ out?: string;
469
+ force?: boolean;
470
+ expectedRevision?: number;
471
+ changeMode?: string;
472
+ id: string;
473
+ }
474
+ export interface DocTrackChangesAcceptAllParams {
475
+ doc?: string;
476
+ sessionId?: string;
477
+ out?: string;
478
+ force?: boolean;
479
+ expectedRevision?: number;
480
+ changeMode?: string;
481
+ }
482
+ export interface DocTrackChangesRejectAllParams {
483
+ doc?: string;
484
+ sessionId?: string;
485
+ out?: string;
486
+ force?: boolean;
487
+ expectedRevision?: number;
488
+ changeMode?: string;
489
+ }
490
+ export interface DocOpenParams {
491
+ doc: string;
492
+ sessionId?: string;
493
+ collaboration?: Record<string, unknown> | unknown[];
494
+ collabDocumentId?: string;
495
+ collabUrl?: string;
496
+ }
497
+ export interface DocSaveParams {
498
+ sessionId?: string;
499
+ out?: string;
500
+ force?: boolean;
501
+ inPlace?: boolean;
502
+ }
503
+ export interface DocCloseParams {
504
+ sessionId?: string;
505
+ discard?: boolean;
506
+ }
507
+ export interface DocStatusParams {
508
+ sessionId?: string;
509
+ }
510
+ export interface DocDescribeParams {
511
+ }
512
+ export interface DocDescribeCommandParams {
513
+ operationId: string;
514
+ }
515
+ export interface DocSessionListParams {
516
+ }
517
+ export interface DocSessionSaveParams {
518
+ sessionId: string;
519
+ out?: string;
520
+ force?: boolean;
521
+ inPlace?: boolean;
522
+ }
523
+ export interface DocSessionCloseParams {
524
+ sessionId: string;
525
+ discard?: boolean;
526
+ }
527
+ export interface DocSessionSetDefaultParams {
528
+ sessionId: string;
529
+ }
530
+ export type DocFindResult = {
531
+ context?: Array<{
532
+ address: ({
533
+ kind: "block";
534
+ nodeId: string;
535
+ nodeType: "paragraph" | "heading" | "listItem" | "table" | "tableRow" | "tableCell" | "image" | "sdt";
536
+ }) | ({
537
+ anchor: {
538
+ end: {
539
+ blockId: string;
540
+ offset: number;
541
+ };
542
+ start: {
543
+ blockId: string;
544
+ offset: number;
545
+ };
546
+ };
547
+ kind: "inline";
548
+ nodeType: "run" | "bookmark" | "comment" | "hyperlink" | "sdt" | "image" | "footnoteRef" | "tab" | "lineBreak";
549
+ });
550
+ highlightRange: {
551
+ end: number;
552
+ start: number;
553
+ };
554
+ snippet: string;
555
+ textRanges?: Array<{
556
+ blockId: string;
557
+ kind: "text";
558
+ range: {
559
+ end: number;
560
+ start: number;
561
+ };
562
+ }>;
563
+ }>;
564
+ diagnostics?: Array<{
565
+ address?: ({
566
+ kind: "block";
567
+ nodeId: string;
568
+ nodeType: "paragraph" | "heading" | "listItem" | "table" | "tableRow" | "tableCell" | "image" | "sdt";
569
+ }) | ({
570
+ anchor: {
571
+ end: {
572
+ blockId: string;
573
+ offset: number;
574
+ };
575
+ start: {
576
+ blockId: string;
577
+ offset: number;
578
+ };
579
+ };
580
+ kind: "inline";
581
+ nodeType: "run" | "bookmark" | "comment" | "hyperlink" | "sdt" | "image" | "footnoteRef" | "tab" | "lineBreak";
582
+ });
583
+ hint?: string;
584
+ message: string;
585
+ }>;
586
+ matches: Array<({
587
+ kind: "block";
588
+ nodeId: string;
589
+ nodeType: "paragraph" | "heading" | "listItem" | "table" | "tableRow" | "tableCell" | "image" | "sdt";
590
+ }) | ({
591
+ anchor: {
592
+ end: {
593
+ blockId: string;
594
+ offset: number;
595
+ };
596
+ start: {
597
+ blockId: string;
598
+ offset: number;
599
+ };
600
+ };
601
+ kind: "inline";
602
+ nodeType: "run" | "bookmark" | "comment" | "hyperlink" | "sdt" | "image" | "footnoteRef" | "tab" | "lineBreak";
603
+ })>;
604
+ nodes?: Array<{
605
+ bodyNodes?: Array<Record<string, unknown>>;
606
+ bodyText?: string;
607
+ kind: "block" | "inline";
608
+ nodes?: Array<Record<string, unknown>>;
609
+ nodeType: "paragraph" | "heading" | "listItem" | "table" | "tableRow" | "tableCell" | "image" | "sdt" | "run" | "bookmark" | "comment" | "hyperlink" | "footnoteRef" | "tab" | "lineBreak";
610
+ properties?: Record<string, unknown>;
611
+ summary?: {
612
+ label?: string;
613
+ text?: string;
614
+ };
615
+ text?: string;
616
+ }>;
617
+ total: number;
618
+ };
619
+ export type DocGetNodeResult = {
620
+ bodyNodes?: Array<Record<string, unknown>>;
621
+ bodyText?: string;
622
+ kind: "block" | "inline";
623
+ nodes?: Array<Record<string, unknown>>;
624
+ nodeType: "paragraph" | "heading" | "listItem" | "table" | "tableRow" | "tableCell" | "image" | "sdt" | "run" | "bookmark" | "comment" | "hyperlink" | "footnoteRef" | "tab" | "lineBreak";
625
+ properties?: Record<string, unknown>;
626
+ summary?: {
627
+ label?: string;
628
+ text?: string;
629
+ };
630
+ text?: string;
631
+ };
632
+ export type DocGetNodeByIdResult = {
633
+ bodyNodes?: Array<Record<string, unknown>>;
634
+ bodyText?: string;
635
+ kind: "block" | "inline";
636
+ nodes?: Array<Record<string, unknown>>;
637
+ nodeType: "paragraph" | "heading" | "listItem" | "table" | "tableRow" | "tableCell" | "image" | "sdt" | "run" | "bookmark" | "comment" | "hyperlink" | "footnoteRef" | "tab" | "lineBreak";
638
+ properties?: Record<string, unknown>;
639
+ summary?: {
640
+ label?: string;
641
+ text?: string;
642
+ };
643
+ text?: string;
644
+ };
645
+ export type DocInfoResult = {
646
+ capabilities: {
647
+ canComment: boolean;
648
+ canFind: boolean;
649
+ canGetNode: boolean;
650
+ canReplace: boolean;
651
+ };
652
+ counts: {
653
+ comments: number;
654
+ headings: number;
655
+ images: number;
656
+ paragraphs: number;
657
+ tables: number;
658
+ words: number;
659
+ };
660
+ outline: Array<{
661
+ level: number;
662
+ nodeId: string;
663
+ text: string;
664
+ }>;
665
+ };
666
+ export type DocInsertResult = {
667
+ inserted?: Array<({
668
+ entityId: string;
669
+ entityType: "comment";
670
+ kind: "entity";
671
+ }) | ({
672
+ entityId: string;
673
+ entityType: "trackedChange";
674
+ kind: "entity";
675
+ })>;
676
+ removed?: Array<({
677
+ entityId: string;
678
+ entityType: "comment";
679
+ kind: "entity";
680
+ }) | ({
681
+ entityId: string;
682
+ entityType: "trackedChange";
683
+ kind: "entity";
684
+ })>;
685
+ resolution: {
686
+ range: {
687
+ from: number;
688
+ to: number;
689
+ };
690
+ requestedTarget?: {
691
+ blockId: string;
692
+ kind: "text";
693
+ range: {
694
+ end: number;
695
+ start: number;
696
+ };
697
+ };
698
+ target: {
699
+ blockId: string;
700
+ kind: "text";
701
+ range: {
702
+ end: number;
703
+ start: number;
704
+ };
705
+ };
706
+ text: string;
707
+ };
708
+ success: true;
709
+ updated?: Array<({
710
+ entityId: string;
711
+ entityType: "comment";
712
+ kind: "entity";
713
+ }) | ({
714
+ entityId: string;
715
+ entityType: "trackedChange";
716
+ kind: "entity";
717
+ })>;
718
+ };
719
+ export type DocReplaceResult = {
720
+ inserted?: Array<({
721
+ entityId: string;
722
+ entityType: "comment";
723
+ kind: "entity";
724
+ }) | ({
725
+ entityId: string;
726
+ entityType: "trackedChange";
727
+ kind: "entity";
728
+ })>;
729
+ removed?: Array<({
730
+ entityId: string;
731
+ entityType: "comment";
732
+ kind: "entity";
733
+ }) | ({
734
+ entityId: string;
735
+ entityType: "trackedChange";
736
+ kind: "entity";
737
+ })>;
738
+ resolution: {
739
+ range: {
740
+ from: number;
741
+ to: number;
742
+ };
743
+ requestedTarget?: {
744
+ blockId: string;
745
+ kind: "text";
746
+ range: {
747
+ end: number;
748
+ start: number;
749
+ };
750
+ };
751
+ target: {
752
+ blockId: string;
753
+ kind: "text";
754
+ range: {
755
+ end: number;
756
+ start: number;
757
+ };
758
+ };
759
+ text: string;
760
+ };
761
+ success: true;
762
+ updated?: Array<({
763
+ entityId: string;
764
+ entityType: "comment";
765
+ kind: "entity";
766
+ }) | ({
767
+ entityId: string;
768
+ entityType: "trackedChange";
769
+ kind: "entity";
770
+ })>;
771
+ };
772
+ export type DocDeleteResult = {
773
+ inserted?: Array<({
774
+ entityId: string;
775
+ entityType: "comment";
776
+ kind: "entity";
777
+ }) | ({
778
+ entityId: string;
779
+ entityType: "trackedChange";
780
+ kind: "entity";
781
+ })>;
782
+ removed?: Array<({
783
+ entityId: string;
784
+ entityType: "comment";
785
+ kind: "entity";
786
+ }) | ({
787
+ entityId: string;
788
+ entityType: "trackedChange";
789
+ kind: "entity";
790
+ })>;
791
+ resolution: {
792
+ range: {
793
+ from: number;
794
+ to: number;
795
+ };
796
+ requestedTarget?: {
797
+ blockId: string;
798
+ kind: "text";
799
+ range: {
800
+ end: number;
801
+ start: number;
802
+ };
803
+ };
804
+ target: {
805
+ blockId: string;
806
+ kind: "text";
807
+ range: {
808
+ end: number;
809
+ start: number;
810
+ };
811
+ };
812
+ text: string;
813
+ };
814
+ success: true;
815
+ updated?: Array<({
816
+ entityId: string;
817
+ entityType: "comment";
818
+ kind: "entity";
819
+ }) | ({
820
+ entityId: string;
821
+ entityType: "trackedChange";
822
+ kind: "entity";
823
+ })>;
824
+ };
825
+ export type DocFormatBoldResult = {
826
+ inserted?: Array<({
827
+ entityId: string;
828
+ entityType: "comment";
829
+ kind: "entity";
830
+ }) | ({
831
+ entityId: string;
832
+ entityType: "trackedChange";
833
+ kind: "entity";
834
+ })>;
835
+ removed?: Array<({
836
+ entityId: string;
837
+ entityType: "comment";
838
+ kind: "entity";
839
+ }) | ({
840
+ entityId: string;
841
+ entityType: "trackedChange";
842
+ kind: "entity";
843
+ })>;
844
+ resolution: {
845
+ range: {
846
+ from: number;
847
+ to: number;
848
+ };
849
+ requestedTarget?: {
850
+ blockId: string;
851
+ kind: "text";
852
+ range: {
853
+ end: number;
854
+ start: number;
855
+ };
856
+ };
857
+ target: {
858
+ blockId: string;
859
+ kind: "text";
860
+ range: {
861
+ end: number;
862
+ start: number;
863
+ };
864
+ };
865
+ text: string;
866
+ };
867
+ success: true;
868
+ updated?: Array<({
869
+ entityId: string;
870
+ entityType: "comment";
871
+ kind: "entity";
872
+ }) | ({
873
+ entityId: string;
874
+ entityType: "trackedChange";
875
+ kind: "entity";
876
+ })>;
877
+ };
878
+ export type DocFormatItalicResult = {
879
+ inserted?: Array<({
880
+ entityId: string;
881
+ entityType: "comment";
882
+ kind: "entity";
883
+ }) | ({
884
+ entityId: string;
885
+ entityType: "trackedChange";
886
+ kind: "entity";
887
+ })>;
888
+ removed?: Array<({
889
+ entityId: string;
890
+ entityType: "comment";
891
+ kind: "entity";
892
+ }) | ({
893
+ entityId: string;
894
+ entityType: "trackedChange";
895
+ kind: "entity";
896
+ })>;
897
+ resolution: {
898
+ range: {
899
+ from: number;
900
+ to: number;
901
+ };
902
+ requestedTarget?: {
903
+ blockId: string;
904
+ kind: "text";
905
+ range: {
906
+ end: number;
907
+ start: number;
908
+ };
909
+ };
910
+ target: {
911
+ blockId: string;
912
+ kind: "text";
913
+ range: {
914
+ end: number;
915
+ start: number;
916
+ };
917
+ };
918
+ text: string;
919
+ };
920
+ success: true;
921
+ updated?: Array<({
922
+ entityId: string;
923
+ entityType: "comment";
924
+ kind: "entity";
925
+ }) | ({
926
+ entityId: string;
927
+ entityType: "trackedChange";
928
+ kind: "entity";
929
+ })>;
930
+ };
931
+ export type DocFormatUnderlineResult = {
932
+ inserted?: Array<({
933
+ entityId: string;
934
+ entityType: "comment";
935
+ kind: "entity";
936
+ }) | ({
937
+ entityId: string;
938
+ entityType: "trackedChange";
939
+ kind: "entity";
940
+ })>;
941
+ removed?: Array<({
942
+ entityId: string;
943
+ entityType: "comment";
944
+ kind: "entity";
945
+ }) | ({
946
+ entityId: string;
947
+ entityType: "trackedChange";
948
+ kind: "entity";
949
+ })>;
950
+ resolution: {
951
+ range: {
952
+ from: number;
953
+ to: number;
954
+ };
955
+ requestedTarget?: {
956
+ blockId: string;
957
+ kind: "text";
958
+ range: {
959
+ end: number;
960
+ start: number;
961
+ };
962
+ };
963
+ target: {
964
+ blockId: string;
965
+ kind: "text";
966
+ range: {
967
+ end: number;
968
+ start: number;
969
+ };
970
+ };
971
+ text: string;
972
+ };
973
+ success: true;
974
+ updated?: Array<({
975
+ entityId: string;
976
+ entityType: "comment";
977
+ kind: "entity";
978
+ }) | ({
979
+ entityId: string;
980
+ entityType: "trackedChange";
981
+ kind: "entity";
982
+ })>;
983
+ };
984
+ export type DocFormatStrikethroughResult = {
985
+ inserted?: Array<({
986
+ entityId: string;
987
+ entityType: "comment";
988
+ kind: "entity";
989
+ }) | ({
990
+ entityId: string;
991
+ entityType: "trackedChange";
992
+ kind: "entity";
993
+ })>;
994
+ removed?: Array<({
995
+ entityId: string;
996
+ entityType: "comment";
997
+ kind: "entity";
998
+ }) | ({
999
+ entityId: string;
1000
+ entityType: "trackedChange";
1001
+ kind: "entity";
1002
+ })>;
1003
+ resolution: {
1004
+ range: {
1005
+ from: number;
1006
+ to: number;
1007
+ };
1008
+ requestedTarget?: {
1009
+ blockId: string;
1010
+ kind: "text";
1011
+ range: {
1012
+ end: number;
1013
+ start: number;
1014
+ };
1015
+ };
1016
+ target: {
1017
+ blockId: string;
1018
+ kind: "text";
1019
+ range: {
1020
+ end: number;
1021
+ start: number;
1022
+ };
1023
+ };
1024
+ text: string;
1025
+ };
1026
+ success: true;
1027
+ updated?: Array<({
1028
+ entityId: string;
1029
+ entityType: "comment";
1030
+ kind: "entity";
1031
+ }) | ({
1032
+ entityId: string;
1033
+ entityType: "trackedChange";
1034
+ kind: "entity";
1035
+ })>;
1036
+ };
1037
+ export type DocCreateParagraphResult = {
1038
+ insertionPoint: {
1039
+ blockId: string;
1040
+ kind: "text";
1041
+ range: {
1042
+ end: number;
1043
+ start: number;
1044
+ };
1045
+ };
1046
+ paragraph: {
1047
+ kind: "block";
1048
+ nodeId: string;
1049
+ nodeType: "paragraph";
1050
+ };
1051
+ success: true;
1052
+ trackedChangeRefs?: Array<{
1053
+ entityId: string;
1054
+ entityType: "trackedChange";
1055
+ kind: "entity";
1056
+ }>;
1057
+ };
1058
+ export type DocListsListResult = {
1059
+ items: Array<{
1060
+ address: {
1061
+ kind: "block";
1062
+ nodeId: string;
1063
+ nodeType: "listItem";
1064
+ };
1065
+ kind?: "ordered" | "bullet";
1066
+ level?: number;
1067
+ marker?: string;
1068
+ ordinal?: number;
1069
+ path?: Array<number>;
1070
+ text?: string;
1071
+ }>;
1072
+ matches: Array<{
1073
+ kind: "block";
1074
+ nodeId: string;
1075
+ nodeType: "listItem";
1076
+ }>;
1077
+ total: number;
1078
+ };
1079
+ export type DocListsGetResult = {
1080
+ address: {
1081
+ kind: "block";
1082
+ nodeId: string;
1083
+ nodeType: "listItem";
1084
+ };
1085
+ kind?: "ordered" | "bullet";
1086
+ level?: number;
1087
+ marker?: string;
1088
+ ordinal?: number;
1089
+ path?: Array<number>;
1090
+ text?: string;
1091
+ };
1092
+ export type DocListsInsertResult = {
1093
+ insertionPoint: {
1094
+ blockId: string;
1095
+ kind: "text";
1096
+ range: {
1097
+ end: number;
1098
+ start: number;
1099
+ };
1100
+ };
1101
+ item: {
1102
+ kind: "block";
1103
+ nodeId: string;
1104
+ nodeType: "listItem";
1105
+ };
1106
+ success: true;
1107
+ trackedChangeRefs?: Array<{
1108
+ entityId: string;
1109
+ entityType: "trackedChange";
1110
+ kind: "entity";
1111
+ }>;
1112
+ };
1113
+ export type DocListsSetTypeResult = {
1114
+ item: {
1115
+ kind: "block";
1116
+ nodeId: string;
1117
+ nodeType: "listItem";
1118
+ };
1119
+ success: true;
1120
+ };
1121
+ export type DocListsIndentResult = {
1122
+ item: {
1123
+ kind: "block";
1124
+ nodeId: string;
1125
+ nodeType: "listItem";
1126
+ };
1127
+ success: true;
1128
+ };
1129
+ export type DocListsOutdentResult = {
1130
+ item: {
1131
+ kind: "block";
1132
+ nodeId: string;
1133
+ nodeType: "listItem";
1134
+ };
1135
+ success: true;
1136
+ };
1137
+ export type DocListsRestartResult = {
1138
+ item: {
1139
+ kind: "block";
1140
+ nodeId: string;
1141
+ nodeType: "listItem";
1142
+ };
1143
+ success: true;
1144
+ };
1145
+ export type DocListsExitResult = {
1146
+ paragraph: {
1147
+ kind: "block";
1148
+ nodeId: string;
1149
+ nodeType: "paragraph";
1150
+ };
1151
+ success: true;
1152
+ };
1153
+ export type DocCommentsAddResult = {
1154
+ inserted?: Array<({
1155
+ entityId: string;
1156
+ entityType: "comment";
1157
+ kind: "entity";
1158
+ }) | ({
1159
+ entityId: string;
1160
+ entityType: "trackedChange";
1161
+ kind: "entity";
1162
+ })>;
1163
+ removed?: Array<({
1164
+ entityId: string;
1165
+ entityType: "comment";
1166
+ kind: "entity";
1167
+ }) | ({
1168
+ entityId: string;
1169
+ entityType: "trackedChange";
1170
+ kind: "entity";
1171
+ })>;
1172
+ success: true;
1173
+ updated?: Array<({
1174
+ entityId: string;
1175
+ entityType: "comment";
1176
+ kind: "entity";
1177
+ }) | ({
1178
+ entityId: string;
1179
+ entityType: "trackedChange";
1180
+ kind: "entity";
1181
+ })>;
1182
+ };
1183
+ export type DocCommentsEditResult = {
1184
+ inserted?: Array<({
1185
+ entityId: string;
1186
+ entityType: "comment";
1187
+ kind: "entity";
1188
+ }) | ({
1189
+ entityId: string;
1190
+ entityType: "trackedChange";
1191
+ kind: "entity";
1192
+ })>;
1193
+ removed?: Array<({
1194
+ entityId: string;
1195
+ entityType: "comment";
1196
+ kind: "entity";
1197
+ }) | ({
1198
+ entityId: string;
1199
+ entityType: "trackedChange";
1200
+ kind: "entity";
1201
+ })>;
1202
+ success: true;
1203
+ updated?: Array<({
1204
+ entityId: string;
1205
+ entityType: "comment";
1206
+ kind: "entity";
1207
+ }) | ({
1208
+ entityId: string;
1209
+ entityType: "trackedChange";
1210
+ kind: "entity";
1211
+ })>;
1212
+ };
1213
+ export type DocCommentsReplyResult = {
1214
+ inserted?: Array<({
1215
+ entityId: string;
1216
+ entityType: "comment";
1217
+ kind: "entity";
1218
+ }) | ({
1219
+ entityId: string;
1220
+ entityType: "trackedChange";
1221
+ kind: "entity";
1222
+ })>;
1223
+ removed?: Array<({
1224
+ entityId: string;
1225
+ entityType: "comment";
1226
+ kind: "entity";
1227
+ }) | ({
1228
+ entityId: string;
1229
+ entityType: "trackedChange";
1230
+ kind: "entity";
1231
+ })>;
1232
+ success: true;
1233
+ updated?: Array<({
1234
+ entityId: string;
1235
+ entityType: "comment";
1236
+ kind: "entity";
1237
+ }) | ({
1238
+ entityId: string;
1239
+ entityType: "trackedChange";
1240
+ kind: "entity";
1241
+ })>;
1242
+ };
1243
+ export type DocCommentsMoveResult = {
1244
+ inserted?: Array<({
1245
+ entityId: string;
1246
+ entityType: "comment";
1247
+ kind: "entity";
1248
+ }) | ({
1249
+ entityId: string;
1250
+ entityType: "trackedChange";
1251
+ kind: "entity";
1252
+ })>;
1253
+ removed?: Array<({
1254
+ entityId: string;
1255
+ entityType: "comment";
1256
+ kind: "entity";
1257
+ }) | ({
1258
+ entityId: string;
1259
+ entityType: "trackedChange";
1260
+ kind: "entity";
1261
+ })>;
1262
+ success: true;
1263
+ updated?: Array<({
1264
+ entityId: string;
1265
+ entityType: "comment";
1266
+ kind: "entity";
1267
+ }) | ({
1268
+ entityId: string;
1269
+ entityType: "trackedChange";
1270
+ kind: "entity";
1271
+ })>;
1272
+ };
1273
+ export type DocCommentsResolveResult = {
1274
+ inserted?: Array<({
1275
+ entityId: string;
1276
+ entityType: "comment";
1277
+ kind: "entity";
1278
+ }) | ({
1279
+ entityId: string;
1280
+ entityType: "trackedChange";
1281
+ kind: "entity";
1282
+ })>;
1283
+ removed?: Array<({
1284
+ entityId: string;
1285
+ entityType: "comment";
1286
+ kind: "entity";
1287
+ }) | ({
1288
+ entityId: string;
1289
+ entityType: "trackedChange";
1290
+ kind: "entity";
1291
+ })>;
1292
+ success: true;
1293
+ updated?: Array<({
1294
+ entityId: string;
1295
+ entityType: "comment";
1296
+ kind: "entity";
1297
+ }) | ({
1298
+ entityId: string;
1299
+ entityType: "trackedChange";
1300
+ kind: "entity";
1301
+ })>;
1302
+ };
1303
+ export type DocCommentsRemoveResult = {
1304
+ inserted?: Array<({
1305
+ entityId: string;
1306
+ entityType: "comment";
1307
+ kind: "entity";
1308
+ }) | ({
1309
+ entityId: string;
1310
+ entityType: "trackedChange";
1311
+ kind: "entity";
1312
+ })>;
1313
+ removed?: Array<({
1314
+ entityId: string;
1315
+ entityType: "comment";
1316
+ kind: "entity";
1317
+ }) | ({
1318
+ entityId: string;
1319
+ entityType: "trackedChange";
1320
+ kind: "entity";
1321
+ })>;
1322
+ success: true;
1323
+ updated?: Array<({
1324
+ entityId: string;
1325
+ entityType: "comment";
1326
+ kind: "entity";
1327
+ }) | ({
1328
+ entityId: string;
1329
+ entityType: "trackedChange";
1330
+ kind: "entity";
1331
+ })>;
1332
+ };
1333
+ export type DocCommentsSetInternalResult = {
1334
+ inserted?: Array<({
1335
+ entityId: string;
1336
+ entityType: "comment";
1337
+ kind: "entity";
1338
+ }) | ({
1339
+ entityId: string;
1340
+ entityType: "trackedChange";
1341
+ kind: "entity";
1342
+ })>;
1343
+ removed?: Array<({
1344
+ entityId: string;
1345
+ entityType: "comment";
1346
+ kind: "entity";
1347
+ }) | ({
1348
+ entityId: string;
1349
+ entityType: "trackedChange";
1350
+ kind: "entity";
1351
+ })>;
1352
+ success: true;
1353
+ updated?: Array<({
1354
+ entityId: string;
1355
+ entityType: "comment";
1356
+ kind: "entity";
1357
+ }) | ({
1358
+ entityId: string;
1359
+ entityType: "trackedChange";
1360
+ kind: "entity";
1361
+ })>;
1362
+ };
1363
+ export type DocCommentsSetActiveResult = {
1364
+ inserted?: Array<({
1365
+ entityId: string;
1366
+ entityType: "comment";
1367
+ kind: "entity";
1368
+ }) | ({
1369
+ entityId: string;
1370
+ entityType: "trackedChange";
1371
+ kind: "entity";
1372
+ })>;
1373
+ removed?: Array<({
1374
+ entityId: string;
1375
+ entityType: "comment";
1376
+ kind: "entity";
1377
+ }) | ({
1378
+ entityId: string;
1379
+ entityType: "trackedChange";
1380
+ kind: "entity";
1381
+ })>;
1382
+ success: true;
1383
+ updated?: Array<({
1384
+ entityId: string;
1385
+ entityType: "comment";
1386
+ kind: "entity";
1387
+ }) | ({
1388
+ entityId: string;
1389
+ entityType: "trackedChange";
1390
+ kind: "entity";
1391
+ })>;
1392
+ };
1393
+ export type DocCommentsGoToResult = {
1394
+ inserted?: Array<({
1395
+ entityId: string;
1396
+ entityType: "comment";
1397
+ kind: "entity";
1398
+ }) | ({
1399
+ entityId: string;
1400
+ entityType: "trackedChange";
1401
+ kind: "entity";
1402
+ })>;
1403
+ removed?: Array<({
1404
+ entityId: string;
1405
+ entityType: "comment";
1406
+ kind: "entity";
1407
+ }) | ({
1408
+ entityId: string;
1409
+ entityType: "trackedChange";
1410
+ kind: "entity";
1411
+ })>;
1412
+ success: true;
1413
+ updated?: Array<({
1414
+ entityId: string;
1415
+ entityType: "comment";
1416
+ kind: "entity";
1417
+ }) | ({
1418
+ entityId: string;
1419
+ entityType: "trackedChange";
1420
+ kind: "entity";
1421
+ })>;
1422
+ };
1423
+ export type DocCommentsGetResult = {
1424
+ address: {
1425
+ entityId: string;
1426
+ entityType: "comment";
1427
+ kind: "entity";
1428
+ };
1429
+ commentId: string;
1430
+ createdTime?: number;
1431
+ creatorEmail?: string;
1432
+ creatorName?: string;
1433
+ importedId?: string;
1434
+ isInternal?: boolean;
1435
+ parentCommentId?: string;
1436
+ status: "open" | "resolved";
1437
+ target?: {
1438
+ blockId: string;
1439
+ kind: "text";
1440
+ range: {
1441
+ end: number;
1442
+ start: number;
1443
+ };
1444
+ };
1445
+ text?: string;
1446
+ };
1447
+ export type DocCommentsListResult = {
1448
+ matches: Array<{
1449
+ address: {
1450
+ entityId: string;
1451
+ entityType: "comment";
1452
+ kind: "entity";
1453
+ };
1454
+ commentId: string;
1455
+ createdTime?: number;
1456
+ creatorEmail?: string;
1457
+ creatorName?: string;
1458
+ importedId?: string;
1459
+ isInternal?: boolean;
1460
+ parentCommentId?: string;
1461
+ status: "open" | "resolved";
1462
+ target?: {
1463
+ blockId: string;
1464
+ kind: "text";
1465
+ range: {
1466
+ end: number;
1467
+ start: number;
1468
+ };
1469
+ };
1470
+ text?: string;
1471
+ }>;
1472
+ total: number;
1473
+ };
1474
+ export type DocTrackChangesListResult = {
1475
+ changes?: Array<{
1476
+ address: {
1477
+ entityId: string;
1478
+ entityType: "trackedChange";
1479
+ kind: "entity";
1480
+ };
1481
+ author?: string;
1482
+ authorEmail?: string;
1483
+ authorImage?: string;
1484
+ date?: string;
1485
+ excerpt?: string;
1486
+ id: string;
1487
+ type: "insert" | "delete" | "format";
1488
+ }>;
1489
+ matches: Array<{
1490
+ entityId: string;
1491
+ entityType: "trackedChange";
1492
+ kind: "entity";
1493
+ }>;
1494
+ total: number;
1495
+ };
1496
+ export type DocTrackChangesGetResult = {
1497
+ address: {
1498
+ entityId: string;
1499
+ entityType: "trackedChange";
1500
+ kind: "entity";
1501
+ };
1502
+ author?: string;
1503
+ authorEmail?: string;
1504
+ authorImage?: string;
1505
+ date?: string;
1506
+ excerpt?: string;
1507
+ id: string;
1508
+ type: "insert" | "delete" | "format";
1509
+ };
1510
+ export type DocTrackChangesAcceptResult = {
1511
+ inserted?: Array<({
1512
+ entityId: string;
1513
+ entityType: "comment";
1514
+ kind: "entity";
1515
+ }) | ({
1516
+ entityId: string;
1517
+ entityType: "trackedChange";
1518
+ kind: "entity";
1519
+ })>;
1520
+ removed?: Array<({
1521
+ entityId: string;
1522
+ entityType: "comment";
1523
+ kind: "entity";
1524
+ }) | ({
1525
+ entityId: string;
1526
+ entityType: "trackedChange";
1527
+ kind: "entity";
1528
+ })>;
1529
+ success: true;
1530
+ updated?: Array<({
1531
+ entityId: string;
1532
+ entityType: "comment";
1533
+ kind: "entity";
1534
+ }) | ({
1535
+ entityId: string;
1536
+ entityType: "trackedChange";
1537
+ kind: "entity";
1538
+ })>;
1539
+ };
1540
+ export type DocTrackChangesRejectResult = {
1541
+ inserted?: Array<({
1542
+ entityId: string;
1543
+ entityType: "comment";
1544
+ kind: "entity";
1545
+ }) | ({
1546
+ entityId: string;
1547
+ entityType: "trackedChange";
1548
+ kind: "entity";
1549
+ })>;
1550
+ removed?: Array<({
1551
+ entityId: string;
1552
+ entityType: "comment";
1553
+ kind: "entity";
1554
+ }) | ({
1555
+ entityId: string;
1556
+ entityType: "trackedChange";
1557
+ kind: "entity";
1558
+ })>;
1559
+ success: true;
1560
+ updated?: Array<({
1561
+ entityId: string;
1562
+ entityType: "comment";
1563
+ kind: "entity";
1564
+ }) | ({
1565
+ entityId: string;
1566
+ entityType: "trackedChange";
1567
+ kind: "entity";
1568
+ })>;
1569
+ };
1570
+ export type DocTrackChangesAcceptAllResult = {
1571
+ inserted?: Array<({
1572
+ entityId: string;
1573
+ entityType: "comment";
1574
+ kind: "entity";
1575
+ }) | ({
1576
+ entityId: string;
1577
+ entityType: "trackedChange";
1578
+ kind: "entity";
1579
+ })>;
1580
+ removed?: Array<({
1581
+ entityId: string;
1582
+ entityType: "comment";
1583
+ kind: "entity";
1584
+ }) | ({
1585
+ entityId: string;
1586
+ entityType: "trackedChange";
1587
+ kind: "entity";
1588
+ })>;
1589
+ success: true;
1590
+ updated?: Array<({
1591
+ entityId: string;
1592
+ entityType: "comment";
1593
+ kind: "entity";
1594
+ }) | ({
1595
+ entityId: string;
1596
+ entityType: "trackedChange";
1597
+ kind: "entity";
1598
+ })>;
1599
+ };
1600
+ export type DocTrackChangesRejectAllResult = {
1601
+ inserted?: Array<({
1602
+ entityId: string;
1603
+ entityType: "comment";
1604
+ kind: "entity";
1605
+ }) | ({
1606
+ entityId: string;
1607
+ entityType: "trackedChange";
1608
+ kind: "entity";
1609
+ })>;
1610
+ removed?: Array<({
1611
+ entityId: string;
1612
+ entityType: "comment";
1613
+ kind: "entity";
1614
+ }) | ({
1615
+ entityId: string;
1616
+ entityType: "trackedChange";
1617
+ kind: "entity";
1618
+ })>;
1619
+ success: true;
1620
+ updated?: Array<({
1621
+ entityId: string;
1622
+ entityType: "comment";
1623
+ kind: "entity";
1624
+ }) | ({
1625
+ entityId: string;
1626
+ entityType: "trackedChange";
1627
+ kind: "entity";
1628
+ })>;
1629
+ };
1630
+ export type DocOpenResult = {
1631
+ contextId: string;
1632
+ sessionType: string;
1633
+ document?: {
1634
+ path?: string;
1635
+ source?: string;
1636
+ revision?: number;
1637
+ };
1638
+ collaboration?: {
1639
+ documentId?: string;
1640
+ url?: string;
1641
+ };
1642
+ };
1643
+ export type DocSaveResult = {
1644
+ contextId: string;
1645
+ saved: boolean;
1646
+ inPlace?: boolean;
1647
+ document?: {
1648
+ path?: string;
1649
+ source?: string;
1650
+ revision?: number;
1651
+ };
1652
+ context?: {
1653
+ dirty?: boolean;
1654
+ revision?: number;
1655
+ lastSavedAt?: string;
1656
+ };
1657
+ output?: {
1658
+ path?: string;
1659
+ byteLength?: number;
1660
+ };
1661
+ };
1662
+ export type DocCloseResult = {
1663
+ contextId: string;
1664
+ closed: boolean;
1665
+ saved?: boolean;
1666
+ discarded?: boolean;
1667
+ defaultSessionCleared?: boolean;
1668
+ wasDirty?: boolean;
1669
+ document?: {
1670
+ path?: string;
1671
+ source?: string;
1672
+ revision?: number;
1673
+ };
1674
+ };
1675
+ export type DocStatusResult = {
1676
+ contextId: string;
1677
+ sessionType?: string;
1678
+ dirty?: boolean;
1679
+ revision?: number;
1680
+ document?: {
1681
+ path?: string;
1682
+ source?: string;
1683
+ };
1684
+ };
1685
+ export type DocDescribeResult = {
1686
+ contractVersion?: string;
1687
+ operations?: Array<{
1688
+ operationId?: string;
1689
+ command?: string;
1690
+ category?: string;
1691
+ description?: string;
1692
+ mutates?: boolean;
1693
+ }>;
1694
+ };
1695
+ export type DocDescribeCommandResult = {
1696
+ operationId?: string;
1697
+ command?: string;
1698
+ category?: string;
1699
+ description?: string;
1700
+ mutates?: boolean;
1701
+ params?: Array<unknown>;
1702
+ constraints?: unknown;
1703
+ };
1704
+ export type DocSessionListResult = {
1705
+ activeSessionId?: string;
1706
+ sessions?: Array<{
1707
+ sessionId?: string;
1708
+ sessionType?: string;
1709
+ dirty?: boolean;
1710
+ revision?: number;
1711
+ }>;
1712
+ total?: number;
1713
+ };
1714
+ export type DocSessionSaveResult = {
1715
+ sessionId: string;
1716
+ contextId?: string;
1717
+ saved?: boolean;
1718
+ inPlace?: boolean;
1719
+ document?: {
1720
+ path?: string;
1721
+ source?: string;
1722
+ revision?: number;
1723
+ };
1724
+ output?: {
1725
+ path?: string;
1726
+ byteLength?: number;
1727
+ };
1728
+ };
1729
+ export type DocSessionCloseResult = {
1730
+ sessionId: string;
1731
+ contextId?: string;
1732
+ closed?: boolean;
1733
+ saved?: boolean;
1734
+ discarded?: boolean;
1735
+ defaultSessionCleared?: boolean;
1736
+ wasDirty?: boolean;
1737
+ document?: {
1738
+ path?: string;
1739
+ source?: string;
1740
+ revision?: number;
1741
+ };
1742
+ };
1743
+ export type DocSessionSetDefaultResult = {
1744
+ activeSessionId: string;
1745
+ };
1746
+ export declare function createDocApi(runtime: SuperDocRuntime): {
1747
+ find: (params?: DocFindParams, options?: InvokeOptions) => Promise<DocFindResult>;
1748
+ getNode: (params?: DocGetNodeParams, options?: InvokeOptions) => Promise<DocGetNodeResult>;
1749
+ getNodeById: (params: DocGetNodeByIdParams, options?: InvokeOptions) => Promise<DocGetNodeByIdResult>;
1750
+ info: (params?: DocInfoParams, options?: InvokeOptions) => Promise<DocInfoResult>;
1751
+ insert: (params: DocInsertParams, options?: InvokeOptions) => Promise<DocInsertResult>;
1752
+ replace: (params: DocReplaceParams, options?: InvokeOptions) => Promise<DocReplaceResult>;
1753
+ delete: (params?: DocDeleteParams, options?: InvokeOptions) => Promise<DocDeleteResult>;
1754
+ format: {
1755
+ bold: (params?: DocFormatBoldParams, options?: InvokeOptions) => Promise<DocFormatBoldResult>;
1756
+ italic: (params?: DocFormatItalicParams, options?: InvokeOptions) => Promise<DocFormatItalicResult>;
1757
+ underline: (params?: DocFormatUnderlineParams, options?: InvokeOptions) => Promise<DocFormatUnderlineResult>;
1758
+ strikethrough: (params?: DocFormatStrikethroughParams, options?: InvokeOptions) => Promise<DocFormatStrikethroughResult>;
1759
+ };
1760
+ create: {
1761
+ paragraph: (params?: DocCreateParagraphParams, options?: InvokeOptions) => Promise<DocCreateParagraphResult>;
1762
+ };
1763
+ lists: {
1764
+ list: (params?: DocListsListParams, options?: InvokeOptions) => Promise<DocListsListResult>;
1765
+ get: (params: DocListsGetParams, options?: InvokeOptions) => Promise<DocListsGetResult>;
1766
+ insert: (params?: DocListsInsertParams, options?: InvokeOptions) => Promise<DocListsInsertResult>;
1767
+ setType: (params?: DocListsSetTypeParams, options?: InvokeOptions) => Promise<DocListsSetTypeResult>;
1768
+ indent: (params?: DocListsIndentParams, options?: InvokeOptions) => Promise<DocListsIndentResult>;
1769
+ outdent: (params?: DocListsOutdentParams, options?: InvokeOptions) => Promise<DocListsOutdentResult>;
1770
+ restart: (params?: DocListsRestartParams, options?: InvokeOptions) => Promise<DocListsRestartResult>;
1771
+ exit: (params?: DocListsExitParams, options?: InvokeOptions) => Promise<DocListsExitResult>;
1772
+ };
1773
+ comments: {
1774
+ add: (params: DocCommentsAddParams, options?: InvokeOptions) => Promise<DocCommentsAddResult>;
1775
+ edit: (params: DocCommentsEditParams, options?: InvokeOptions) => Promise<DocCommentsEditResult>;
1776
+ reply: (params: DocCommentsReplyParams, options?: InvokeOptions) => Promise<DocCommentsReplyResult>;
1777
+ move: (params: DocCommentsMoveParams, options?: InvokeOptions) => Promise<DocCommentsMoveResult>;
1778
+ resolve: (params: DocCommentsResolveParams, options?: InvokeOptions) => Promise<DocCommentsResolveResult>;
1779
+ remove: (params: DocCommentsRemoveParams, options?: InvokeOptions) => Promise<DocCommentsRemoveResult>;
1780
+ setInternal: (params: DocCommentsSetInternalParams, options?: InvokeOptions) => Promise<DocCommentsSetInternalResult>;
1781
+ setActive: (params?: DocCommentsSetActiveParams, options?: InvokeOptions) => Promise<DocCommentsSetActiveResult>;
1782
+ goTo: (params: DocCommentsGoToParams, options?: InvokeOptions) => Promise<DocCommentsGoToResult>;
1783
+ get: (params: DocCommentsGetParams, options?: InvokeOptions) => Promise<DocCommentsGetResult>;
1784
+ list: (params?: DocCommentsListParams, options?: InvokeOptions) => Promise<DocCommentsListResult>;
1785
+ };
1786
+ trackChanges: {
1787
+ list: (params?: DocTrackChangesListParams, options?: InvokeOptions) => Promise<DocTrackChangesListResult>;
1788
+ get: (params: DocTrackChangesGetParams, options?: InvokeOptions) => Promise<DocTrackChangesGetResult>;
1789
+ accept: (params: DocTrackChangesAcceptParams, options?: InvokeOptions) => Promise<DocTrackChangesAcceptResult>;
1790
+ reject: (params: DocTrackChangesRejectParams, options?: InvokeOptions) => Promise<DocTrackChangesRejectResult>;
1791
+ acceptAll: (params?: DocTrackChangesAcceptAllParams, options?: InvokeOptions) => Promise<DocTrackChangesAcceptAllResult>;
1792
+ rejectAll: (params?: DocTrackChangesRejectAllParams, options?: InvokeOptions) => Promise<DocTrackChangesRejectAllResult>;
1793
+ };
1794
+ open: (params: DocOpenParams, options?: InvokeOptions) => Promise<DocOpenResult>;
1795
+ save: (params?: DocSaveParams, options?: InvokeOptions) => Promise<DocSaveResult>;
1796
+ close: (params?: DocCloseParams, options?: InvokeOptions) => Promise<DocCloseResult>;
1797
+ status: (params?: DocStatusParams, options?: InvokeOptions) => Promise<DocStatusResult>;
1798
+ describe: (params?: DocDescribeParams, options?: InvokeOptions) => Promise<DocDescribeResult>;
1799
+ describeCommand: (params: DocDescribeCommandParams, options?: InvokeOptions) => Promise<DocDescribeCommandResult>;
1800
+ session: {
1801
+ list: (params?: DocSessionListParams, options?: InvokeOptions) => Promise<DocSessionListResult>;
1802
+ save: (params: DocSessionSaveParams, options?: InvokeOptions) => Promise<DocSessionSaveResult>;
1803
+ close: (params: DocSessionCloseParams, options?: InvokeOptions) => Promise<DocSessionCloseResult>;
1804
+ setDefault: (params: DocSessionSetDefaultParams, options?: InvokeOptions) => Promise<DocSessionSetDefaultResult>;
1805
+ };
1806
+ };
1807
+ export type SuperDocDocApi = ReturnType<typeof createDocApi>;
1808
+ //# sourceMappingURL=client.d.ts.map