@superdoc-dev/sdk 1.8.0-next.2 → 1.8.0-next.21

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.
@@ -160,6 +160,8 @@ function createDocApi(runtime) {
160
160
  join: async (params = {}, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.lists.join"], params, options), "result"),
161
161
  canJoin: async (params = {}, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.lists.canJoin"], params, options), "result"),
162
162
  separate: async (params = {}, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.lists.separate"], params, options), "result"),
163
+ merge: (params, options) => runtime.invoke(contract.CONTRACT.operations["doc.lists.merge"], params, options),
164
+ split: (params, options) => runtime.invoke(contract.CONTRACT.operations["doc.lists.split"], params, options),
163
165
  setLevel: async (params = {}, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.lists.setLevel"], params, options), "result"),
164
166
  setValue: async (params = {}, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.lists.setValue"], params, options), "result"),
165
167
  continuePrevious: async (params = {}, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.lists.continuePrevious"], params, options), "result"),
@@ -204,6 +206,9 @@ function createDocApi(runtime) {
204
206
  ranges: {
205
207
  resolve: (params, options) => runtime.invoke(contract.CONTRACT.operations["doc.ranges.resolve"], params, options),
206
208
  },
209
+ selection: {
210
+ current: (params = {}, options) => runtime.invoke(contract.CONTRACT.operations["doc.selection.current"], params, options),
211
+ },
207
212
  mutations: {
208
213
  preview: async (params, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.mutations.preview"], params, options), "result"),
209
214
  apply: async (params, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.mutations.apply"], params, options), "result"),
@@ -656,6 +661,8 @@ function createBoundDocApi(runtime) {
656
661
  join: async (params = {}, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.lists.join"], params, options), "result"),
657
662
  canJoin: async (params = {}, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.lists.canJoin"], params, options), "result"),
658
663
  separate: async (params = {}, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.lists.separate"], params, options), "result"),
664
+ merge: (params, options) => runtime.invoke(contract.CONTRACT.operations["doc.lists.merge"], params, options),
665
+ split: (params, options) => runtime.invoke(contract.CONTRACT.operations["doc.lists.split"], params, options),
659
666
  setLevel: async (params = {}, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.lists.setLevel"], params, options), "result"),
660
667
  setValue: async (params = {}, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.lists.setValue"], params, options), "result"),
661
668
  continuePrevious: async (params = {}, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.lists.continuePrevious"], params, options), "result"),
@@ -700,6 +707,9 @@ function createBoundDocApi(runtime) {
700
707
  ranges: {
701
708
  resolve: (params, options) => runtime.invoke(contract.CONTRACT.operations["doc.ranges.resolve"], params, options),
702
709
  },
710
+ selection: {
711
+ current: (params = {}, options) => runtime.invoke(contract.CONTRACT.operations["doc.selection.current"], params, options),
712
+ },
703
713
  mutations: {
704
714
  preview: async (params, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.mutations.preview"], params, options), "result"),
705
715
  apply: async (params, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.mutations.apply"], params, options), "result"),
@@ -3997,6 +3997,36 @@ export interface DocListsSeparateParams {
3997
3997
  input?: Record<string, unknown> | unknown[];
3998
3998
  nodeId?: string;
3999
3999
  }
4000
+ export interface DocListsMergeParams {
4001
+ doc?: string;
4002
+ sessionId?: string;
4003
+ out?: string;
4004
+ force?: boolean;
4005
+ expectedRevision?: number;
4006
+ changeMode?: string;
4007
+ dryRun?: boolean;
4008
+ target: {
4009
+ kind: "block";
4010
+ nodeType: "listItem";
4011
+ nodeId: string;
4012
+ };
4013
+ direction: string;
4014
+ }
4015
+ export interface DocListsSplitParams {
4016
+ doc?: string;
4017
+ sessionId?: string;
4018
+ out?: string;
4019
+ force?: boolean;
4020
+ expectedRevision?: number;
4021
+ changeMode?: string;
4022
+ dryRun?: boolean;
4023
+ target: {
4024
+ kind: "block";
4025
+ nodeType: "listItem";
4026
+ nodeId: string;
4027
+ };
4028
+ restartNumbering?: boolean;
4029
+ }
4000
4030
  export interface DocListsSetLevelParams {
4001
4031
  doc?: string;
4002
4032
  sessionId?: string;
@@ -4447,14 +4477,23 @@ export interface DocCommentsCreateParams {
4447
4477
  expectedRevision?: number;
4448
4478
  changeMode?: string;
4449
4479
  text?: string;
4450
- target?: {
4480
+ target?: ({
4451
4481
  kind: "text";
4452
4482
  blockId: string;
4453
4483
  range: {
4454
4484
  start: number;
4455
4485
  end: number;
4456
4486
  };
4457
- };
4487
+ }) | ({
4488
+ kind: "text";
4489
+ segments: Array<{
4490
+ blockId: string;
4491
+ range: {
4492
+ start: number;
4493
+ end: number;
4494
+ };
4495
+ }>;
4496
+ });
4458
4497
  parentId?: string;
4459
4498
  blockId?: string;
4460
4499
  start?: number;
@@ -4713,6 +4752,11 @@ export interface DocRangesResolveParams {
4713
4752
  });
4714
4753
  expectedRevision?: string;
4715
4754
  }
4755
+ export interface DocSelectionCurrentParams {
4756
+ doc?: string;
4757
+ sessionId?: string;
4758
+ includeText?: boolean;
4759
+ }
4716
4760
  export interface DocMutationsPreviewParams {
4717
4761
  doc?: string;
4718
4762
  sessionId?: string;
@@ -9693,6 +9737,13 @@ export type DocExtractResult = {
9693
9737
  nodeId: string;
9694
9738
  type: string;
9695
9739
  text: string;
9740
+ textSpans?: Array<{
9741
+ text: string;
9742
+ trackedChanges?: Array<{
9743
+ entityId: string;
9744
+ type: "insert" | "delete" | "format";
9745
+ }>;
9746
+ }>;
9696
9747
  headingLevel?: number;
9697
9748
  tableContext?: {
9698
9749
  tableOrdinal: number;
@@ -9716,6 +9767,12 @@ export type DocExtractResult = {
9716
9767
  trackedChanges: Array<{
9717
9768
  entityId: string;
9718
9769
  type: "insert" | "delete" | "format";
9770
+ blockIds?: Array<string>;
9771
+ wordRevisionIds?: {
9772
+ insert?: string;
9773
+ delete?: string;
9774
+ format?: string;
9775
+ };
9719
9776
  excerpt?: string;
9720
9777
  author?: string;
9721
9778
  date?: string;
@@ -18607,6 +18664,18 @@ export type DocListsSeparateResult = {
18607
18664
  listId: string;
18608
18665
  numId: number;
18609
18666
  };
18667
+ export type DocListsMergeResult = {
18668
+ success: true;
18669
+ listId: string;
18670
+ absorbedCount: number;
18671
+ removedEmptyBlocks: number;
18672
+ };
18673
+ export type DocListsSplitResult = {
18674
+ success: true;
18675
+ listId: string;
18676
+ numId: number;
18677
+ restartedAt: unknown;
18678
+ };
18610
18679
  export type DocListsSetLevelResult = {
18611
18680
  success: true;
18612
18681
  item: {
@@ -19665,6 +19734,23 @@ export type DocRangesResolveResult = {
19665
19734
  }>;
19666
19735
  };
19667
19736
  };
19737
+ export type DocSelectionCurrentResult = {
19738
+ empty: boolean;
19739
+ target: ({
19740
+ kind: "text";
19741
+ segments: Array<{
19742
+ blockId: string;
19743
+ range: {
19744
+ start: number;
19745
+ end: number;
19746
+ };
19747
+ }>;
19748
+ }) | null;
19749
+ activeMarks: Array<string>;
19750
+ activeCommentIds: Array<string>;
19751
+ activeChangeIds: Array<string>;
19752
+ text?: string;
19753
+ };
19668
19754
  export type DocMutationsPreviewResult = {
19669
19755
  evaluatedRevision: string;
19670
19756
  steps: Array<Record<string, unknown>>;
@@ -20658,6 +20744,18 @@ export type DocCapabilitiesGetResult = {
20658
20744
  dryRun: boolean;
20659
20745
  reasons?: Array<"COMMAND_UNAVAILABLE" | "HELPER_UNAVAILABLE" | "OPERATION_UNAVAILABLE" | "TRACKED_MODE_UNAVAILABLE" | "DRY_RUN_UNAVAILABLE" | "NAMESPACE_UNAVAILABLE" | "STYLES_PART_MISSING" | "COLLABORATION_ACTIVE">;
20660
20746
  };
20747
+ "lists.merge": {
20748
+ available: boolean;
20749
+ tracked: boolean;
20750
+ dryRun: boolean;
20751
+ reasons?: Array<"COMMAND_UNAVAILABLE" | "HELPER_UNAVAILABLE" | "OPERATION_UNAVAILABLE" | "TRACKED_MODE_UNAVAILABLE" | "DRY_RUN_UNAVAILABLE" | "NAMESPACE_UNAVAILABLE" | "STYLES_PART_MISSING" | "COLLABORATION_ACTIVE">;
20752
+ };
20753
+ "lists.split": {
20754
+ available: boolean;
20755
+ tracked: boolean;
20756
+ dryRun: boolean;
20757
+ reasons?: Array<"COMMAND_UNAVAILABLE" | "HELPER_UNAVAILABLE" | "OPERATION_UNAVAILABLE" | "TRACKED_MODE_UNAVAILABLE" | "DRY_RUN_UNAVAILABLE" | "NAMESPACE_UNAVAILABLE" | "STYLES_PART_MISSING" | "COLLABORATION_ACTIVE">;
20758
+ };
20661
20759
  "lists.setLevel": {
20662
20760
  available: boolean;
20663
20761
  tracked: boolean;
@@ -20868,6 +20966,12 @@ export type DocCapabilitiesGetResult = {
20868
20966
  dryRun: boolean;
20869
20967
  reasons?: Array<"COMMAND_UNAVAILABLE" | "HELPER_UNAVAILABLE" | "OPERATION_UNAVAILABLE" | "TRACKED_MODE_UNAVAILABLE" | "DRY_RUN_UNAVAILABLE" | "NAMESPACE_UNAVAILABLE" | "STYLES_PART_MISSING" | "COLLABORATION_ACTIVE">;
20870
20968
  };
20969
+ "selection.current": {
20970
+ available: boolean;
20971
+ tracked: boolean;
20972
+ dryRun: boolean;
20973
+ reasons?: Array<"COMMAND_UNAVAILABLE" | "HELPER_UNAVAILABLE" | "OPERATION_UNAVAILABLE" | "TRACKED_MODE_UNAVAILABLE" | "DRY_RUN_UNAVAILABLE" | "NAMESPACE_UNAVAILABLE" | "STYLES_PART_MISSING" | "COLLABORATION_ACTIVE">;
20974
+ };
20871
20975
  "mutations.preview": {
20872
20976
  available: boolean;
20873
20977
  tracked: boolean;
@@ -29732,6 +29836,32 @@ export interface DocListsSeparateBoundParams {
29732
29836
  input?: Record<string, unknown> | unknown[];
29733
29837
  nodeId?: string;
29734
29838
  }
29839
+ export interface DocListsMergeBoundParams {
29840
+ out?: string;
29841
+ force?: boolean;
29842
+ expectedRevision?: number;
29843
+ changeMode?: string;
29844
+ dryRun?: boolean;
29845
+ target: {
29846
+ kind: "block";
29847
+ nodeType: "listItem";
29848
+ nodeId: string;
29849
+ };
29850
+ direction: string;
29851
+ }
29852
+ export interface DocListsSplitBoundParams {
29853
+ out?: string;
29854
+ force?: boolean;
29855
+ expectedRevision?: number;
29856
+ changeMode?: string;
29857
+ dryRun?: boolean;
29858
+ target: {
29859
+ kind: "block";
29860
+ nodeType: "listItem";
29861
+ nodeId: string;
29862
+ };
29863
+ restartNumbering?: boolean;
29864
+ }
29735
29865
  export interface DocListsSetLevelBoundParams {
29736
29866
  out?: string;
29737
29867
  force?: boolean;
@@ -30130,14 +30260,23 @@ export interface DocCommentsCreateBoundParams {
30130
30260
  expectedRevision?: number;
30131
30261
  changeMode?: string;
30132
30262
  text?: string;
30133
- target?: {
30263
+ target?: ({
30134
30264
  kind: "text";
30135
30265
  blockId: string;
30136
30266
  range: {
30137
30267
  start: number;
30138
30268
  end: number;
30139
30269
  };
30140
- };
30270
+ }) | ({
30271
+ kind: "text";
30272
+ segments: Array<{
30273
+ blockId: string;
30274
+ range: {
30275
+ start: number;
30276
+ end: number;
30277
+ };
30278
+ }>;
30279
+ });
30141
30280
  parentId?: string;
30142
30281
  blockId?: string;
30143
30282
  start?: number;
@@ -30378,6 +30517,9 @@ export interface DocRangesResolveBoundParams {
30378
30517
  });
30379
30518
  expectedRevision?: string;
30380
30519
  }
30520
+ export interface DocSelectionCurrentBoundParams {
30521
+ includeText?: boolean;
30522
+ }
30381
30523
  export interface DocMutationsPreviewBoundParams {
30382
30524
  in?: ({
30383
30525
  kind: "story";
@@ -34823,6 +34965,8 @@ export declare function createDocApi(runtime: RuntimeInvoker): {
34823
34965
  join: (params?: DocListsJoinParams, options?: InvokeOptions) => Promise<DocListsJoinResult>;
34824
34966
  canJoin: (params?: DocListsCanJoinParams, options?: InvokeOptions) => Promise<DocListsCanJoinResult>;
34825
34967
  separate: (params?: DocListsSeparateParams, options?: InvokeOptions) => Promise<DocListsSeparateResult>;
34968
+ merge: (params: DocListsMergeParams, options?: InvokeOptions) => Promise<DocListsMergeResult>;
34969
+ split: (params: DocListsSplitParams, options?: InvokeOptions) => Promise<DocListsSplitResult>;
34826
34970
  setLevel: (params?: DocListsSetLevelParams, options?: InvokeOptions) => Promise<DocListsSetLevelResult>;
34827
34971
  setValue: (params?: DocListsSetValueParams, options?: InvokeOptions) => Promise<DocListsSetValueResult>;
34828
34972
  continuePrevious: (params?: DocListsContinuePreviousParams, options?: InvokeOptions) => Promise<DocListsContinuePreviousResult>;
@@ -34867,6 +35011,9 @@ export declare function createDocApi(runtime: RuntimeInvoker): {
34867
35011
  ranges: {
34868
35012
  resolve: (params: DocRangesResolveParams, options?: InvokeOptions) => Promise<DocRangesResolveResult>;
34869
35013
  };
35014
+ selection: {
35015
+ current: (params?: DocSelectionCurrentParams, options?: InvokeOptions) => Promise<DocSelectionCurrentResult>;
35016
+ };
34870
35017
  mutations: {
34871
35018
  preview: (params: DocMutationsPreviewParams, options?: InvokeOptions) => Promise<DocMutationsPreviewResult>;
34872
35019
  apply: (params: DocMutationsApplyParams, options?: InvokeOptions) => Promise<DocMutationsApplyResult>;
@@ -35315,6 +35462,8 @@ export declare function createBoundDocApi(runtime: RuntimeInvoker): {
35315
35462
  join: (params?: DocListsJoinBoundParams, options?: InvokeOptions) => Promise<DocListsJoinResult>;
35316
35463
  canJoin: (params?: DocListsCanJoinBoundParams, options?: InvokeOptions) => Promise<DocListsCanJoinResult>;
35317
35464
  separate: (params?: DocListsSeparateBoundParams, options?: InvokeOptions) => Promise<DocListsSeparateResult>;
35465
+ merge: (params: DocListsMergeBoundParams, options?: InvokeOptions) => Promise<DocListsMergeResult>;
35466
+ split: (params: DocListsSplitBoundParams, options?: InvokeOptions) => Promise<DocListsSplitResult>;
35318
35467
  setLevel: (params?: DocListsSetLevelBoundParams, options?: InvokeOptions) => Promise<DocListsSetLevelResult>;
35319
35468
  setValue: (params?: DocListsSetValueBoundParams, options?: InvokeOptions) => Promise<DocListsSetValueResult>;
35320
35469
  continuePrevious: (params?: DocListsContinuePreviousBoundParams, options?: InvokeOptions) => Promise<DocListsContinuePreviousResult>;
@@ -35359,6 +35508,9 @@ export declare function createBoundDocApi(runtime: RuntimeInvoker): {
35359
35508
  ranges: {
35360
35509
  resolve: (params: DocRangesResolveBoundParams, options?: InvokeOptions) => Promise<DocRangesResolveResult>;
35361
35510
  };
35511
+ selection: {
35512
+ current: (params?: DocSelectionCurrentBoundParams, options?: InvokeOptions) => Promise<DocSelectionCurrentResult>;
35513
+ };
35362
35514
  mutations: {
35363
35515
  preview: (params: DocMutationsPreviewBoundParams, options?: InvokeOptions) => Promise<DocMutationsPreviewResult>;
35364
35516
  apply: (params: DocMutationsApplyBoundParams, options?: InvokeOptions) => Promise<DocMutationsApplyResult>;