@superdoc-dev/sdk 1.0.0-alpha.45 → 1.0.0-alpha.46

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.
@@ -466,6 +466,11 @@ function createDocApi(runtime) {
466
466
  remove: (params, options) => runtime.invoke(contract.CONTRACT.operations["doc.authorities.entries.remove"], params, options),
467
467
  },
468
468
  },
469
+ diff: {
470
+ capture: (params = {}, options) => runtime.invoke(contract.CONTRACT.operations["doc.diff.capture"], params, options),
471
+ compare: (params, options) => runtime.invoke(contract.CONTRACT.operations["doc.diff.compare"], params, options),
472
+ apply: (params, options) => runtime.invoke(contract.CONTRACT.operations["doc.diff.apply"], params, options),
473
+ },
469
474
  open: (params = {}, options) => runtime.invoke(contract.CONTRACT.operations["doc.open"], params, options),
470
475
  save: (params = {}, options) => runtime.invoke(contract.CONTRACT.operations["doc.save"], params, options),
471
476
  close: (params = {}, options) => runtime.invoke(contract.CONTRACT.operations["doc.close"], params, options),
@@ -8274,6 +8274,65 @@ export interface DocAuthoritiesEntriesRemoveParams {
8274
8274
  };
8275
8275
  };
8276
8276
  }
8277
+ export interface DocDiffCaptureParams {
8278
+ doc?: string;
8279
+ sessionId?: string;
8280
+ }
8281
+ export interface DocDiffCompareParams {
8282
+ doc?: string;
8283
+ sessionId?: string;
8284
+ targetSnapshot: {
8285
+ version: "sd-diff-snapshot/v1";
8286
+ engine: "super-editor";
8287
+ fingerprint: string;
8288
+ coverage: {
8289
+ body: true;
8290
+ comments: boolean;
8291
+ styles: boolean;
8292
+ numbering: boolean;
8293
+ headerFooters: false;
8294
+ };
8295
+ payload: Record<string, unknown>;
8296
+ };
8297
+ }
8298
+ export interface DocDiffApplyParams {
8299
+ doc?: string;
8300
+ sessionId?: string;
8301
+ out?: string;
8302
+ force?: boolean;
8303
+ expectedRevision?: number;
8304
+ changeMode?: string;
8305
+ diff: {
8306
+ version: "sd-diff-payload/v1";
8307
+ engine: "super-editor";
8308
+ baseFingerprint: string;
8309
+ targetFingerprint: string;
8310
+ coverage: {
8311
+ body: true;
8312
+ comments: boolean;
8313
+ styles: boolean;
8314
+ numbering: boolean;
8315
+ headerFooters: false;
8316
+ };
8317
+ summary: {
8318
+ hasChanges: boolean;
8319
+ changedComponents: Array<"body" | "comments" | "styles" | "numbering">;
8320
+ body: {
8321
+ hasChanges: boolean;
8322
+ };
8323
+ comments: {
8324
+ hasChanges: boolean;
8325
+ };
8326
+ styles: {
8327
+ hasChanges: boolean;
8328
+ };
8329
+ numbering: {
8330
+ hasChanges: boolean;
8331
+ };
8332
+ };
8333
+ payload: Record<string, unknown>;
8334
+ };
8335
+ }
8277
8336
  export interface DocOpenParams {
8278
8337
  doc?: string;
8279
8338
  sessionId?: string;
@@ -10206,6 +10265,24 @@ export type DocCapabilitiesGetResult = {
10206
10265
  reasons?: Array<"COMMAND_UNAVAILABLE" | "HELPER_UNAVAILABLE" | "OPERATION_UNAVAILABLE" | "TRACKED_MODE_UNAVAILABLE" | "DRY_RUN_UNAVAILABLE" | "NAMESPACE_UNAVAILABLE" | "STYLES_PART_MISSING" | "COLLABORATION_ACTIVE">;
10207
10266
  tracked: boolean;
10208
10267
  };
10268
+ "diff.apply": {
10269
+ available: boolean;
10270
+ dryRun: boolean;
10271
+ reasons?: Array<"COMMAND_UNAVAILABLE" | "HELPER_UNAVAILABLE" | "OPERATION_UNAVAILABLE" | "TRACKED_MODE_UNAVAILABLE" | "DRY_RUN_UNAVAILABLE" | "NAMESPACE_UNAVAILABLE" | "STYLES_PART_MISSING" | "COLLABORATION_ACTIVE">;
10272
+ tracked: boolean;
10273
+ };
10274
+ "diff.capture": {
10275
+ available: boolean;
10276
+ dryRun: boolean;
10277
+ reasons?: Array<"COMMAND_UNAVAILABLE" | "HELPER_UNAVAILABLE" | "OPERATION_UNAVAILABLE" | "TRACKED_MODE_UNAVAILABLE" | "DRY_RUN_UNAVAILABLE" | "NAMESPACE_UNAVAILABLE" | "STYLES_PART_MISSING" | "COLLABORATION_ACTIVE">;
10278
+ tracked: boolean;
10279
+ };
10280
+ "diff.compare": {
10281
+ available: boolean;
10282
+ dryRun: boolean;
10283
+ reasons?: Array<"COMMAND_UNAVAILABLE" | "HELPER_UNAVAILABLE" | "OPERATION_UNAVAILABLE" | "TRACKED_MODE_UNAVAILABLE" | "DRY_RUN_UNAVAILABLE" | "NAMESPACE_UNAVAILABLE" | "STYLES_PART_MISSING" | "COLLABORATION_ACTIVE">;
10284
+ tracked: boolean;
10285
+ };
10209
10286
  "fields.get": {
10210
10287
  available: boolean;
10211
10288
  dryRun: boolean;
@@ -13254,6 +13331,78 @@ export type DocAuthoritiesEntriesRemoveResult = {
13254
13331
  };
13255
13332
  success: true;
13256
13333
  };
13334
+ export type DocDiffCaptureResult = {
13335
+ coverage: {
13336
+ body: true;
13337
+ comments: boolean;
13338
+ headerFooters: false;
13339
+ numbering: boolean;
13340
+ styles: boolean;
13341
+ };
13342
+ engine: "super-editor";
13343
+ fingerprint: string;
13344
+ payload: Record<string, unknown>;
13345
+ version: "sd-diff-snapshot/v1";
13346
+ };
13347
+ export type DocDiffCompareResult = {
13348
+ baseFingerprint: string;
13349
+ coverage: {
13350
+ body: true;
13351
+ comments: boolean;
13352
+ headerFooters: false;
13353
+ numbering: boolean;
13354
+ styles: boolean;
13355
+ };
13356
+ engine: "super-editor";
13357
+ payload: Record<string, unknown>;
13358
+ summary: {
13359
+ body: {
13360
+ hasChanges: boolean;
13361
+ };
13362
+ changedComponents: Array<"body" | "comments" | "styles" | "numbering">;
13363
+ comments: {
13364
+ hasChanges: boolean;
13365
+ };
13366
+ hasChanges: boolean;
13367
+ numbering: {
13368
+ hasChanges: boolean;
13369
+ };
13370
+ styles: {
13371
+ hasChanges: boolean;
13372
+ };
13373
+ };
13374
+ targetFingerprint: string;
13375
+ version: "sd-diff-payload/v1";
13376
+ };
13377
+ export type DocDiffApplyResult = {
13378
+ appliedOperations: number;
13379
+ baseFingerprint: string;
13380
+ coverage: {
13381
+ body: true;
13382
+ comments: boolean;
13383
+ headerFooters: false;
13384
+ numbering: boolean;
13385
+ styles: boolean;
13386
+ };
13387
+ diagnostics: Array<string>;
13388
+ summary: {
13389
+ body: {
13390
+ hasChanges: boolean;
13391
+ };
13392
+ changedComponents: Array<"body" | "comments" | "styles" | "numbering">;
13393
+ comments: {
13394
+ hasChanges: boolean;
13395
+ };
13396
+ hasChanges: boolean;
13397
+ numbering: {
13398
+ hasChanges: boolean;
13399
+ };
13400
+ styles: {
13401
+ hasChanges: boolean;
13402
+ };
13403
+ };
13404
+ targetFingerprint: string;
13405
+ };
13257
13406
  export type DocOpenResult = {
13258
13407
  active: boolean;
13259
13408
  contextId: string;
@@ -13838,6 +13987,11 @@ export declare function createDocApi(runtime: SuperDocRuntime): {
13838
13987
  remove: (params: DocAuthoritiesEntriesRemoveParams, options?: InvokeOptions) => Promise<DocAuthoritiesEntriesRemoveResult>;
13839
13988
  };
13840
13989
  };
13990
+ diff: {
13991
+ capture: (params?: DocDiffCaptureParams, options?: InvokeOptions) => Promise<DocDiffCaptureResult>;
13992
+ compare: (params: DocDiffCompareParams, options?: InvokeOptions) => Promise<DocDiffCompareResult>;
13993
+ apply: (params: DocDiffApplyParams, options?: InvokeOptions) => Promise<DocDiffApplyResult>;
13994
+ };
13841
13995
  open: (params?: DocOpenParams, options?: InvokeOptions) => Promise<DocOpenResult>;
13842
13996
  save: (params?: DocSaveParams, options?: InvokeOptions) => Promise<DocSaveResult>;
13843
13997
  close: (params?: DocCloseParams, options?: InvokeOptions) => Promise<DocCloseResult>;