@superdoc-dev/sdk 1.8.0-next.1 → 1.8.0-next.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.
@@ -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,21 @@ 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
+ text?: string;
19751
+ };
19668
19752
  export type DocMutationsPreviewResult = {
19669
19753
  evaluatedRevision: string;
19670
19754
  steps: Array<Record<string, unknown>>;
@@ -20658,6 +20742,18 @@ export type DocCapabilitiesGetResult = {
20658
20742
  dryRun: boolean;
20659
20743
  reasons?: Array<"COMMAND_UNAVAILABLE" | "HELPER_UNAVAILABLE" | "OPERATION_UNAVAILABLE" | "TRACKED_MODE_UNAVAILABLE" | "DRY_RUN_UNAVAILABLE" | "NAMESPACE_UNAVAILABLE" | "STYLES_PART_MISSING" | "COLLABORATION_ACTIVE">;
20660
20744
  };
20745
+ "lists.merge": {
20746
+ available: boolean;
20747
+ tracked: boolean;
20748
+ dryRun: boolean;
20749
+ reasons?: Array<"COMMAND_UNAVAILABLE" | "HELPER_UNAVAILABLE" | "OPERATION_UNAVAILABLE" | "TRACKED_MODE_UNAVAILABLE" | "DRY_RUN_UNAVAILABLE" | "NAMESPACE_UNAVAILABLE" | "STYLES_PART_MISSING" | "COLLABORATION_ACTIVE">;
20750
+ };
20751
+ "lists.split": {
20752
+ available: boolean;
20753
+ tracked: boolean;
20754
+ dryRun: boolean;
20755
+ reasons?: Array<"COMMAND_UNAVAILABLE" | "HELPER_UNAVAILABLE" | "OPERATION_UNAVAILABLE" | "TRACKED_MODE_UNAVAILABLE" | "DRY_RUN_UNAVAILABLE" | "NAMESPACE_UNAVAILABLE" | "STYLES_PART_MISSING" | "COLLABORATION_ACTIVE">;
20756
+ };
20661
20757
  "lists.setLevel": {
20662
20758
  available: boolean;
20663
20759
  tracked: boolean;
@@ -20868,6 +20964,12 @@ export type DocCapabilitiesGetResult = {
20868
20964
  dryRun: boolean;
20869
20965
  reasons?: Array<"COMMAND_UNAVAILABLE" | "HELPER_UNAVAILABLE" | "OPERATION_UNAVAILABLE" | "TRACKED_MODE_UNAVAILABLE" | "DRY_RUN_UNAVAILABLE" | "NAMESPACE_UNAVAILABLE" | "STYLES_PART_MISSING" | "COLLABORATION_ACTIVE">;
20870
20966
  };
20967
+ "selection.current": {
20968
+ available: boolean;
20969
+ tracked: boolean;
20970
+ dryRun: boolean;
20971
+ reasons?: Array<"COMMAND_UNAVAILABLE" | "HELPER_UNAVAILABLE" | "OPERATION_UNAVAILABLE" | "TRACKED_MODE_UNAVAILABLE" | "DRY_RUN_UNAVAILABLE" | "NAMESPACE_UNAVAILABLE" | "STYLES_PART_MISSING" | "COLLABORATION_ACTIVE">;
20972
+ };
20871
20973
  "mutations.preview": {
20872
20974
  available: boolean;
20873
20975
  tracked: boolean;
@@ -29732,6 +29834,32 @@ export interface DocListsSeparateBoundParams {
29732
29834
  input?: Record<string, unknown> | unknown[];
29733
29835
  nodeId?: string;
29734
29836
  }
29837
+ export interface DocListsMergeBoundParams {
29838
+ out?: string;
29839
+ force?: boolean;
29840
+ expectedRevision?: number;
29841
+ changeMode?: string;
29842
+ dryRun?: boolean;
29843
+ target: {
29844
+ kind: "block";
29845
+ nodeType: "listItem";
29846
+ nodeId: string;
29847
+ };
29848
+ direction: string;
29849
+ }
29850
+ export interface DocListsSplitBoundParams {
29851
+ out?: string;
29852
+ force?: boolean;
29853
+ expectedRevision?: number;
29854
+ changeMode?: string;
29855
+ dryRun?: boolean;
29856
+ target: {
29857
+ kind: "block";
29858
+ nodeType: "listItem";
29859
+ nodeId: string;
29860
+ };
29861
+ restartNumbering?: boolean;
29862
+ }
29735
29863
  export interface DocListsSetLevelBoundParams {
29736
29864
  out?: string;
29737
29865
  force?: boolean;
@@ -30130,14 +30258,23 @@ export interface DocCommentsCreateBoundParams {
30130
30258
  expectedRevision?: number;
30131
30259
  changeMode?: string;
30132
30260
  text?: string;
30133
- target?: {
30261
+ target?: ({
30134
30262
  kind: "text";
30135
30263
  blockId: string;
30136
30264
  range: {
30137
30265
  start: number;
30138
30266
  end: number;
30139
30267
  };
30140
- };
30268
+ }) | ({
30269
+ kind: "text";
30270
+ segments: Array<{
30271
+ blockId: string;
30272
+ range: {
30273
+ start: number;
30274
+ end: number;
30275
+ };
30276
+ }>;
30277
+ });
30141
30278
  parentId?: string;
30142
30279
  blockId?: string;
30143
30280
  start?: number;
@@ -30378,6 +30515,9 @@ export interface DocRangesResolveBoundParams {
30378
30515
  });
30379
30516
  expectedRevision?: string;
30380
30517
  }
30518
+ export interface DocSelectionCurrentBoundParams {
30519
+ includeText?: boolean;
30520
+ }
30381
30521
  export interface DocMutationsPreviewBoundParams {
30382
30522
  in?: ({
30383
30523
  kind: "story";
@@ -34823,6 +34963,8 @@ export declare function createDocApi(runtime: RuntimeInvoker): {
34823
34963
  join: (params?: DocListsJoinParams, options?: InvokeOptions) => Promise<DocListsJoinResult>;
34824
34964
  canJoin: (params?: DocListsCanJoinParams, options?: InvokeOptions) => Promise<DocListsCanJoinResult>;
34825
34965
  separate: (params?: DocListsSeparateParams, options?: InvokeOptions) => Promise<DocListsSeparateResult>;
34966
+ merge: (params: DocListsMergeParams, options?: InvokeOptions) => Promise<DocListsMergeResult>;
34967
+ split: (params: DocListsSplitParams, options?: InvokeOptions) => Promise<DocListsSplitResult>;
34826
34968
  setLevel: (params?: DocListsSetLevelParams, options?: InvokeOptions) => Promise<DocListsSetLevelResult>;
34827
34969
  setValue: (params?: DocListsSetValueParams, options?: InvokeOptions) => Promise<DocListsSetValueResult>;
34828
34970
  continuePrevious: (params?: DocListsContinuePreviousParams, options?: InvokeOptions) => Promise<DocListsContinuePreviousResult>;
@@ -34867,6 +35009,9 @@ export declare function createDocApi(runtime: RuntimeInvoker): {
34867
35009
  ranges: {
34868
35010
  resolve: (params: DocRangesResolveParams, options?: InvokeOptions) => Promise<DocRangesResolveResult>;
34869
35011
  };
35012
+ selection: {
35013
+ current: (params?: DocSelectionCurrentParams, options?: InvokeOptions) => Promise<DocSelectionCurrentResult>;
35014
+ };
34870
35015
  mutations: {
34871
35016
  preview: (params: DocMutationsPreviewParams, options?: InvokeOptions) => Promise<DocMutationsPreviewResult>;
34872
35017
  apply: (params: DocMutationsApplyParams, options?: InvokeOptions) => Promise<DocMutationsApplyResult>;
@@ -35315,6 +35460,8 @@ export declare function createBoundDocApi(runtime: RuntimeInvoker): {
35315
35460
  join: (params?: DocListsJoinBoundParams, options?: InvokeOptions) => Promise<DocListsJoinResult>;
35316
35461
  canJoin: (params?: DocListsCanJoinBoundParams, options?: InvokeOptions) => Promise<DocListsCanJoinResult>;
35317
35462
  separate: (params?: DocListsSeparateBoundParams, options?: InvokeOptions) => Promise<DocListsSeparateResult>;
35463
+ merge: (params: DocListsMergeBoundParams, options?: InvokeOptions) => Promise<DocListsMergeResult>;
35464
+ split: (params: DocListsSplitBoundParams, options?: InvokeOptions) => Promise<DocListsSplitResult>;
35318
35465
  setLevel: (params?: DocListsSetLevelBoundParams, options?: InvokeOptions) => Promise<DocListsSetLevelResult>;
35319
35466
  setValue: (params?: DocListsSetValueBoundParams, options?: InvokeOptions) => Promise<DocListsSetValueResult>;
35320
35467
  continuePrevious: (params?: DocListsContinuePreviousBoundParams, options?: InvokeOptions) => Promise<DocListsContinuePreviousResult>;
@@ -35359,6 +35506,9 @@ export declare function createBoundDocApi(runtime: RuntimeInvoker): {
35359
35506
  ranges: {
35360
35507
  resolve: (params: DocRangesResolveBoundParams, options?: InvokeOptions) => Promise<DocRangesResolveResult>;
35361
35508
  };
35509
+ selection: {
35510
+ current: (params?: DocSelectionCurrentBoundParams, options?: InvokeOptions) => Promise<DocSelectionCurrentResult>;
35511
+ };
35362
35512
  mutations: {
35363
35513
  preview: (params: DocMutationsPreviewBoundParams, options?: InvokeOptions) => Promise<DocMutationsPreviewResult>;
35364
35514
  apply: (params: DocMutationsApplyBoundParams, options?: InvokeOptions) => Promise<DocMutationsApplyResult>;