@codebolt/narrative 1.11.0 → 1.12.4

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.
@@ -1,5 +1,5 @@
1
1
  import { NarrativeTransport } from '../transport';
2
- import { CreateSnapshotParams, CreateSnapshotResult, SnapshotIdParam, CreateArchiveResult, ImportArchiveParams, ImportArchiveResult, ExportBundleParams, ExportBundleResult, AddBundleParams, AddBundleResult, BrowseSnapshotParams, BrowseResult, MergeSnapshotParams, MergeSnapshotResult, AddCommitParams, AddCommitResult, CheckRecoveryParams, RecoveryCheck, CheckoutSnapshotParams, CheckoutResult, DeleteResult, PruneSnapshotsParams, PruneResult } from '../types/snapshot';
2
+ import { CreateSnapshotParams, CreateSnapshotResult, SnapshotIdParam, CreateArchiveResult, ImportArchiveParams, ImportArchiveResult, ExportBundleParams, ExportBundleResult, AddBundleParams, AddBundleResult, BrowseSnapshotParams, BrowseResult, MergeSnapshotParams, MergeSnapshotResult, CheckSnapshotConflictsParams, CheckConflictsResult, AddCommitParams, AddCommitResult, CheckRecoveryParams, RecoveryCheck, CheckoutSnapshotParams, CheckoutResult, DeleteResult, PruneSnapshotsParams, PruneResult } from '../types/snapshot';
3
3
  export declare class SnapshotApi {
4
4
  private readonly transport;
5
5
  constructor(transport: NarrativeTransport);
@@ -10,6 +10,7 @@ export declare class SnapshotApi {
10
10
  addSnapshotBundle(params: AddBundleParams): Promise<AddBundleResult>;
11
11
  browseSnapshot(params: BrowseSnapshotParams): Promise<BrowseResult>;
12
12
  mergeSnapshot(params: MergeSnapshotParams): Promise<MergeSnapshotResult>;
13
+ checkSnapshotConflicts(params: CheckSnapshotConflictsParams): Promise<CheckConflictsResult>;
13
14
  addCommit(params: AddCommitParams): Promise<AddCommitResult>;
14
15
  checkSnapshotRecovery(params: CheckRecoveryParams): Promise<RecoveryCheck>;
15
16
  checkoutSnapshot(params: CheckoutSnapshotParams): Promise<CheckoutResult>;
@@ -26,6 +26,9 @@ class SnapshotApi {
26
26
  async mergeSnapshot(params) {
27
27
  return this.transport.request('mergeSnapshot', params);
28
28
  }
29
+ async checkSnapshotConflicts(params) {
30
+ return this.transport.request('checkSnapshotConflicts', params);
31
+ }
29
32
  async addCommit(params) {
30
33
  return this.transport.request('addCommit', params);
31
34
  }
@@ -79,6 +79,22 @@ export interface MergeSnapshotResult {
79
79
  conflicts: string[];
80
80
  applied_to_workspace: boolean;
81
81
  }
82
+ export interface CheckSnapshotConflictsParams {
83
+ snapshot_id: string;
84
+ strategy: MergeStrategy;
85
+ }
86
+ export interface ConflictDetail {
87
+ path: string;
88
+ conflict_type: string;
89
+ ancestor_content: string | null;
90
+ ours_content: string | null;
91
+ theirs_content: string | null;
92
+ }
93
+ export interface CheckConflictsResult {
94
+ has_conflicts: boolean;
95
+ conflicts: ConflictDetail[];
96
+ merged_tree_hash: string;
97
+ }
82
98
  export interface AddCommitParams {
83
99
  thread_id: string;
84
100
  message: string;
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@codebolt/narrative",
3
- "version": "1.11.0",
3
+ "version": "1.12.4",
4
4
  "description": "TypeScript client for the Codebolt Narrative Engine",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "scripts": {
8
8
  "build": "tsc",
9
- "build:native": "node ../codeboltNarrative/scripts/build-platform-pkg.js",
9
+ "build:all": "tsc && npm run build:native",
10
+ "build:native": "node ../codeboltNarrative/scripts/build.js",
10
11
  "clean": "rm -rf dist"
11
12
  },
12
13
  "engines": {
@@ -16,11 +17,11 @@
16
17
  "dist/**/*"
17
18
  ],
18
19
  "optionalDependencies": {
19
- "@codebolt/narrative-darwin-arm64": "1.11.0",
20
- "@codebolt/narrative-darwin-x64": "1.11.0",
21
- "@codebolt/narrative-linux-x64": "1.11.0",
22
- "@codebolt/narrative-linux-arm64": "1.11.0",
23
- "@codebolt/narrative-win32-x64": "1.11.0"
20
+ "@codebolt/narrative-darwin-arm64": "1.12.4",
21
+ "@codebolt/narrative-darwin-x64": "1.12.4",
22
+ "@codebolt/narrative-linux-x64": "1.12.4",
23
+ "@codebolt/narrative-linux-arm64": "1.12.4",
24
+ "@codebolt/narrative-win32-x64": "1.12.4"
24
25
  },
25
26
  "license": "MIT"
26
27
  }