@openplanr/protocol 0.6.1 → 0.7.0
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.
- package/README.md +10 -0
- package/lib/dashboard/closed-json-contract.mjs +99 -109
- package/lib/dashboard/operate-experience-audit-display-contract.d.mts +128 -153
- package/lib/dashboard/operate-experience-audit-display-contract.mjs +530 -585
- package/lib/dashboard/operate-experience-display-contract.d.mts +415 -437
- package/lib/dashboard/operate-experience-display-contract.mjs +777 -831
- package/lib/dashboard/operate-experience-surface-contract.d.mts +143 -148
- package/lib/dashboard/operate-experience-surface-contract.mjs +72 -73
- package/lib/dashboard/operate-review-contract.d.mts +7 -14
- package/lib/dashboard/operate-review-contract.mjs +46 -42
- package/lib/dashboard/operate-review-display-workspace-contract.d.mts +2 -5
- package/lib/dashboard/operate-review-display-workspace-contract.mjs +158 -104
- package/lib/dashboard/operate-review-payload-safety.mjs +4 -2
- package/lib/dashboard/operate-review-workspace-projection-v2.d.mts +47 -33
- package/lib/protocol/index.d.ts +2647 -543
- package/package.json +1 -1
- package/registries/artifact-theme.json +64 -0
- package/registries/commands.json +40 -40
- package/registries/skills.json +5 -5
- package/schemas/v1.14.0/artifact-theme.schema.json +316 -0
- package/src/browser-contracts.d.mts +4 -1
- package/src/browser-contracts.mjs +16 -5
- package/src/canonical-json.d.mts +6 -1
- package/src/canonical-json.mjs +100 -22
- package/src/compat/live-evidence-v2.mjs +1611 -485
- package/src/compat/operate-experience-live-patch.mjs +67 -15
- package/src/compat/operating-planning-contracts.mjs +183 -51
- package/src/contracts.d.mts +54 -13
- package/src/contracts.mjs +635 -343
- package/src/design-contracts.mjs +58 -21
- package/src/design-handoff-contracts.d.mts +67 -11
- package/src/design-handoff-contracts.mjs +236 -119
- package/src/design-publication-contracts.mjs +98 -33
- package/src/diagram-authoring-contracts.d.mts +422 -78
- package/src/diagram-authoring-contracts.mjs +1715 -335
- package/src/diagram-contracts.d.mts +4 -1
- package/src/diagram-contracts.mjs +16 -4
- package/src/enterprise-contracts.d.mts +211 -46
- package/src/enterprise-contracts.mjs +738 -184
- package/src/errors.mjs +4 -0
- package/src/generated/canonical-registries.mjs +45 -45
- package/src/index.d.mts +8 -8
- package/src/index.mjs +36 -20
- package/src/json-schema.d.mts +21 -6
- package/src/json-schema.mjs +66 -18
- package/src/planning-contracts.d.mts +8 -2
- package/src/planning-contracts.mjs +33 -7
- package/src/registries.d.mts +11 -3
- package/src/registries.mjs +369 -87
- package/src/review-experience-contracts.d.mts +7 -2
- package/src/review-experience-contracts.mjs +198 -49
- package/src/semver.mjs +5 -1
- package/src/skill-source-contracts.d.mts +36 -16
- package/src/skill-source-contracts.mjs +25 -6
- package/src/task-contracts.d.mts +13 -3
- package/src/task-contracts.mjs +181 -40
- package/src/workspace-contracts.d.mts +38 -10
- package/src/workspace-contracts.mjs +147 -33
|
@@ -15,5 +15,8 @@ export declare const DIAGRAM_GRAMMAR_REGISTRY: Readonly<{
|
|
|
15
15
|
}>;
|
|
16
16
|
export declare const DIAGRAM_SEMANTIC_PATTERN_REGISTRY: Readonly<Record<string, unknown>>;
|
|
17
17
|
export declare function getDiagramGrammar(grammarId: string): DiagramGrammarRegistryEntry | null;
|
|
18
|
-
export declare function diagramContractUrl(
|
|
18
|
+
export declare function diagramContractUrl(
|
|
19
|
+
kind: string,
|
|
20
|
+
options?: { protocolVersion?: '1.6.0' | '1.13.0' },
|
|
21
|
+
): URL;
|
|
19
22
|
export declare function diagramDocumentPath(slug: string): string;
|
|
@@ -1,27 +1,39 @@
|
|
|
1
|
-
|
|
1
|
+
// @ts-check
|
|
2
2
|
import { DIAGRAM_AUTHORING_CONTRACT_FILES } from './diagram-authoring-contracts.mjs';
|
|
3
3
|
import { DIAGRAM_REGISTRIES } from './generated/diagram-registries.mjs';
|
|
4
|
+
import { DIAGRAM_V16_CONTRACT_FILES } from './skill-source-contracts.mjs';
|
|
4
5
|
|
|
6
|
+
/** @type {typeof import('./diagram-contracts.d.mts').DIAGRAM_CONTRACT_FILES} */
|
|
5
7
|
export const DIAGRAM_CONTRACT_FILES = DIAGRAM_V16_CONTRACT_FILES;
|
|
8
|
+
/** @type {typeof import('./diagram-contracts.d.mts').DIAGRAM_GRAMMAR_REGISTRY} */
|
|
6
9
|
export const DIAGRAM_GRAMMAR_REGISTRY = DIAGRAM_REGISTRIES['diagram-grammars.json'];
|
|
7
|
-
|
|
10
|
+
/** @type {typeof import('./diagram-contracts.d.mts').DIAGRAM_SEMANTIC_PATTERN_REGISTRY} */
|
|
11
|
+
export const DIAGRAM_SEMANTIC_PATTERN_REGISTRY =
|
|
12
|
+
DIAGRAM_REGISTRIES['diagram-semantic-patterns.json'];
|
|
8
13
|
|
|
9
14
|
const grammarIndex = new Map(
|
|
10
15
|
DIAGRAM_GRAMMAR_REGISTRY.grammars.map((grammar) => [grammar.grammarId, grammar]),
|
|
11
16
|
);
|
|
12
17
|
|
|
18
|
+
/** @type {typeof import('./diagram-contracts.d.mts').getDiagramGrammar} */
|
|
13
19
|
export function getDiagramGrammar(grammarId) {
|
|
14
20
|
return grammarIndex.get(grammarId) ?? null;
|
|
15
21
|
}
|
|
16
22
|
|
|
23
|
+
/** @type {typeof import('./diagram-contracts.d.mts').diagramContractUrl} */
|
|
17
24
|
export function diagramContractUrl(kind, { protocolVersion = '1.6.0' } = {}) {
|
|
18
|
-
const files =
|
|
19
|
-
|
|
25
|
+
const files =
|
|
26
|
+
protocolVersion === '1.6.0'
|
|
27
|
+
? DIAGRAM_CONTRACT_FILES
|
|
28
|
+
: protocolVersion === '1.13.0'
|
|
29
|
+
? DIAGRAM_AUTHORING_CONTRACT_FILES
|
|
30
|
+
: null;
|
|
20
31
|
const filename = files && Object.hasOwn(files, kind) ? files[kind] : null;
|
|
21
32
|
if (!filename) throw new RangeError(`Unknown diagram contract: ${kind}@${protocolVersion}`);
|
|
22
33
|
return new URL(`../schemas/v${protocolVersion}/${filename}`, import.meta.url);
|
|
23
34
|
}
|
|
24
35
|
|
|
36
|
+
/** @type {typeof import('./diagram-contracts.d.mts').diagramDocumentPath} */
|
|
25
37
|
export function diagramDocumentPath(slug) {
|
|
26
38
|
const value = String(slug);
|
|
27
39
|
if (!/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/u.test(value)) {
|
|
@@ -2,73 +2,191 @@ export type EnterpriseId = string;
|
|
|
2
2
|
export type EnterpriseTimestamp = string;
|
|
3
3
|
export type EnterpriseDigest = string;
|
|
4
4
|
export type EnterpriseSchema = Readonly<Record<string, unknown>>;
|
|
5
|
-
export type EnterpriseAction =
|
|
5
|
+
export type EnterpriseAction =
|
|
6
|
+
| 'organization.manage'
|
|
7
|
+
| 'ownership.transfer'
|
|
8
|
+
| 'billing.manage'
|
|
9
|
+
| 'audit.read'
|
|
10
|
+
| 'project.create'
|
|
11
|
+
| 'project.manage'
|
|
12
|
+
| 'artifact.read'
|
|
13
|
+
| 'artifact.author'
|
|
14
|
+
| 'artifact.export'
|
|
15
|
+
| 'review.write'
|
|
16
|
+
| 'review.resolve';
|
|
6
17
|
export type EnterpriseProjectRole = 'maintainer' | 'author' | 'reviewer' | 'viewer';
|
|
7
|
-
export type EnterpriseJson =
|
|
8
|
-
|
|
18
|
+
export type EnterpriseJson =
|
|
19
|
+
| null
|
|
20
|
+
| boolean
|
|
21
|
+
| number
|
|
22
|
+
| string
|
|
23
|
+
| EnterpriseJson[]
|
|
24
|
+
| { [key: string]: EnterpriseJson };
|
|
25
|
+
export interface EnterpriseScope {
|
|
26
|
+
organizationId: EnterpriseId;
|
|
27
|
+
projectId: EnterpriseId;
|
|
28
|
+
}
|
|
9
29
|
export interface EnterpriseAccessContext {
|
|
10
30
|
actor: { id: EnterpriseId; verified: boolean };
|
|
11
31
|
organization: { id: EnterpriseId; status: 'active' | 'suspended' };
|
|
12
|
-
membership?: {
|
|
13
|
-
|
|
14
|
-
|
|
32
|
+
membership?: {
|
|
33
|
+
organizationId: EnterpriseId;
|
|
34
|
+
actorId: EnterpriseId;
|
|
35
|
+
role: 'owner' | 'admin' | 'member';
|
|
36
|
+
status: 'active' | 'revoked';
|
|
37
|
+
};
|
|
38
|
+
projectMembership?: EnterpriseScope & {
|
|
39
|
+
actorId: EnterpriseId;
|
|
40
|
+
role: EnterpriseProjectRole;
|
|
41
|
+
status: 'active' | 'revoked';
|
|
42
|
+
};
|
|
43
|
+
guestGrant?: EnterpriseScope & {
|
|
44
|
+
artifactId: EnterpriseId;
|
|
45
|
+
actorId: EnterpriseId;
|
|
46
|
+
role: 'reviewer' | 'viewer';
|
|
47
|
+
status: 'active' | 'revoked';
|
|
48
|
+
expiresAt: EnterpriseTimestamp;
|
|
49
|
+
};
|
|
15
50
|
resource: { organizationId: EnterpriseId; projectId?: EnterpriseId; artifactId?: EnterpriseId };
|
|
16
51
|
action: EnterpriseAction;
|
|
17
52
|
now: EnterpriseTimestamp;
|
|
18
53
|
}
|
|
19
|
-
export interface EnterpriseAccessDecision {
|
|
54
|
+
export interface EnterpriseAccessDecision {
|
|
55
|
+
readonly allowed: boolean;
|
|
56
|
+
readonly code: string;
|
|
57
|
+
}
|
|
20
58
|
export interface EnterpriseArtifactRevision extends EnterpriseScope {
|
|
21
|
-
kind: 'openplanr-enterprise-artifact-revision';
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
59
|
+
kind: 'openplanr-enterprise-artifact-revision';
|
|
60
|
+
schemaVersion: '1.0.0';
|
|
61
|
+
id: EnterpriseId;
|
|
62
|
+
artifactId: EnterpriseId;
|
|
63
|
+
parentRevisionId: EnterpriseId | null;
|
|
64
|
+
contentDigest: EnterpriseDigest;
|
|
65
|
+
contentType: 'application/json' | 'text/markdown' | 'image/svg+xml' | 'text/html';
|
|
66
|
+
byteLength: number;
|
|
67
|
+
createdAt: EnterpriseTimestamp;
|
|
68
|
+
actorId: EnterpriseId;
|
|
25
69
|
}
|
|
26
70
|
export interface EnterpriseReviewAnchor {
|
|
27
|
-
revisionId: EnterpriseId;
|
|
71
|
+
revisionId: EnterpriseId;
|
|
72
|
+
elementId?: EnterpriseId;
|
|
73
|
+
screenId?: EnterpriseId;
|
|
74
|
+
frameId?: EnterpriseId;
|
|
75
|
+
x?: number;
|
|
76
|
+
y?: number;
|
|
77
|
+
}
|
|
78
|
+
export interface EnterpriseReviewReply {
|
|
79
|
+
id: EnterpriseId;
|
|
80
|
+
authorId: EnterpriseId;
|
|
81
|
+
body: string;
|
|
82
|
+
createdAt: EnterpriseTimestamp;
|
|
28
83
|
}
|
|
29
|
-
export interface EnterpriseReviewReply { id: EnterpriseId; authorId: EnterpriseId; body: string; createdAt: EnterpriseTimestamp }
|
|
30
84
|
export type EnterpriseReviewCategory = 'question' | 'suggestion' | 'change-request' | 'blocker';
|
|
31
85
|
export interface EnterpriseReviewThread extends EnterpriseScope {
|
|
32
|
-
kind: 'openplanr-enterprise-review-thread';
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
86
|
+
kind: 'openplanr-enterprise-review-thread';
|
|
87
|
+
schemaVersion: '1.0.0';
|
|
88
|
+
id: EnterpriseId;
|
|
89
|
+
artifactId: EnterpriseId;
|
|
90
|
+
anchor: EnterpriseReviewAnchor;
|
|
91
|
+
category: EnterpriseReviewCategory;
|
|
92
|
+
status: 'open' | 'addressed' | 'resolved';
|
|
93
|
+
authorId: EnterpriseId;
|
|
94
|
+
body: string;
|
|
95
|
+
createdAt: EnterpriseTimestamp;
|
|
96
|
+
updatedAt: EnterpriseTimestamp;
|
|
97
|
+
replies: EnterpriseReviewReply[];
|
|
98
|
+
assigneeId?: EnterpriseId | null;
|
|
99
|
+
addressedRevisionId?: EnterpriseId;
|
|
100
|
+
resolvedAt?: EnterpriseTimestamp;
|
|
37
101
|
}
|
|
38
102
|
export type EnterpriseElementCollection = 'nodes' | 'relations' | 'groups' | 'events' | 'items';
|
|
39
103
|
export type EnterpriseChangeOperation =
|
|
40
104
|
| { op: 'replace-document'; content: { [key: string]: EnterpriseJson } }
|
|
41
|
-
| {
|
|
42
|
-
|
|
105
|
+
| {
|
|
106
|
+
op: 'set-field';
|
|
107
|
+
targetId: EnterpriseId;
|
|
108
|
+
field: 'label' | 'description' | 'status' | 'title';
|
|
109
|
+
value: string;
|
|
110
|
+
}
|
|
111
|
+
| {
|
|
112
|
+
op: 'add-element';
|
|
113
|
+
collection: EnterpriseElementCollection;
|
|
114
|
+
element: { id: EnterpriseId; [key: string]: EnterpriseJson };
|
|
115
|
+
}
|
|
43
116
|
| { op: 'remove-element'; collection: EnterpriseElementCollection; targetId: EnterpriseId }
|
|
44
117
|
| { op: 'set-layout'; targetId: EnterpriseId; x: number; y: number };
|
|
45
118
|
export interface EnterpriseChangeProposal extends EnterpriseScope {
|
|
46
|
-
kind: 'openplanr-enterprise-change-proposal';
|
|
47
|
-
|
|
48
|
-
|
|
119
|
+
kind: 'openplanr-enterprise-change-proposal';
|
|
120
|
+
schemaVersion: '1.0.0';
|
|
121
|
+
id: EnterpriseId;
|
|
122
|
+
artifactId: EnterpriseId;
|
|
123
|
+
baseRevisionId: EnterpriseId;
|
|
124
|
+
authorId: EnterpriseId;
|
|
125
|
+
createdAt: EnterpriseTimestamp;
|
|
126
|
+
status: 'draft' | 'proposed' | 'accepted' | 'rejected' | 'applied' | 'conflicted';
|
|
127
|
+
summary: string;
|
|
49
128
|
operations: EnterpriseChangeOperation[];
|
|
50
|
-
validation: {
|
|
51
|
-
|
|
129
|
+
validation: {
|
|
130
|
+
status: 'pending' | 'passed' | 'failed';
|
|
131
|
+
issues: { code: string; message: string; targetId?: EnterpriseId }[];
|
|
132
|
+
};
|
|
133
|
+
application?: {
|
|
134
|
+
revisionId: EnterpriseId;
|
|
135
|
+
appliedAt: EnterpriseTimestamp;
|
|
136
|
+
actorId: EnterpriseId;
|
|
137
|
+
gitCommit?: string;
|
|
138
|
+
};
|
|
52
139
|
}
|
|
53
140
|
export type EnterpriseEvidenceSource =
|
|
54
141
|
| { kind: 'repository'; repositoryId: EnterpriseId; path: string; commit: string; line?: number }
|
|
55
|
-
| {
|
|
142
|
+
| {
|
|
143
|
+
kind: 'artifact';
|
|
144
|
+
artifactId: EnterpriseId;
|
|
145
|
+
revisionId: EnterpriseId;
|
|
146
|
+
elementId?: EnterpriseId;
|
|
147
|
+
}
|
|
56
148
|
| { kind: 'url'; url: string };
|
|
57
149
|
export interface EnterpriseEvidenceReference extends EnterpriseScope {
|
|
58
|
-
kind: 'openplanr-enterprise-evidence-reference';
|
|
59
|
-
|
|
150
|
+
kind: 'openplanr-enterprise-evidence-reference';
|
|
151
|
+
schemaVersion: '1.0.0';
|
|
152
|
+
id: EnterpriseId;
|
|
153
|
+
source: EnterpriseEvidenceSource;
|
|
154
|
+
capturedAt: EnterpriseTimestamp;
|
|
155
|
+
freshness: 'current' | 'stale' | 'unknown';
|
|
156
|
+
label: string;
|
|
157
|
+
contentDigest?: EnterpriseDigest;
|
|
60
158
|
}
|
|
61
159
|
export interface EnterpriseSyncState extends EnterpriseScope {
|
|
62
|
-
kind: 'openplanr-enterprise-sync-state';
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
160
|
+
kind: 'openplanr-enterprise-sync-state';
|
|
161
|
+
schemaVersion: '1.0.0';
|
|
162
|
+
repositoryId: EnterpriseId;
|
|
163
|
+
direction: 'push' | 'pull';
|
|
164
|
+
status: 'preview' | 'pending' | 'synchronized' | 'failed' | 'conflicted';
|
|
165
|
+
scope: EnterpriseId[];
|
|
166
|
+
cursor: string | null;
|
|
167
|
+
operationId: EnterpriseId;
|
|
168
|
+
updatedAt: EnterpriseTimestamp;
|
|
169
|
+
items: {
|
|
170
|
+
artifactId: EnterpriseId;
|
|
171
|
+
baseRevisionId: EnterpriseId | null;
|
|
172
|
+
revisionId: EnterpriseId | null;
|
|
173
|
+
contentDigest: EnterpriseDigest;
|
|
174
|
+
action: 'create' | 'update' | 'unchanged' | 'conflict';
|
|
175
|
+
}[];
|
|
66
176
|
issues: { code: string; artifactId?: EnterpriseId; message: string }[];
|
|
67
177
|
}
|
|
68
178
|
export interface EnterpriseAgentHandoff extends EnterpriseScope {
|
|
69
|
-
kind: 'openplanr-enterprise-agent-handoff';
|
|
70
|
-
|
|
71
|
-
|
|
179
|
+
kind: 'openplanr-enterprise-agent-handoff';
|
|
180
|
+
schemaVersion: '1.0.0';
|
|
181
|
+
artifactId: EnterpriseId;
|
|
182
|
+
revisionId: EnterpriseId;
|
|
183
|
+
generatedAt: EnterpriseTimestamp;
|
|
184
|
+
authority: 'feedback-only';
|
|
185
|
+
contentTrust: 'untrusted';
|
|
186
|
+
threads: EnterpriseReviewThread[];
|
|
187
|
+
evidence: EnterpriseEvidenceReference[];
|
|
188
|
+
unresolvedUncertainties: string[];
|
|
189
|
+
contentDigest: EnterpriseDigest;
|
|
72
190
|
}
|
|
73
191
|
export declare const ENTERPRISE_CONTRACT_VERSION: '1.0.0';
|
|
74
192
|
export declare const ENTERPRISE_PROTOCOL_VERSION: '1.12.0';
|
|
@@ -86,22 +204,69 @@ export declare const ENTERPRISE_EVIDENCE_REFERENCE_SCHEMA: EnterpriseSchema;
|
|
|
86
204
|
export declare const ENTERPRISE_SYNC_STATE_SCHEMA: EnterpriseSchema;
|
|
87
205
|
export declare const ENTERPRISE_AGENT_HANDOFF_SCHEMA: EnterpriseSchema;
|
|
88
206
|
export declare const ENTERPRISE_SCHEMAS: Readonly<Record<string, EnterpriseSchema>>;
|
|
89
|
-
export declare function assertEnterpriseContract<T>(
|
|
207
|
+
export declare function assertEnterpriseContract<T>(
|
|
208
|
+
value: T,
|
|
209
|
+
schemaOrName: EnterpriseSchema | string,
|
|
210
|
+
): T;
|
|
90
211
|
export declare function assertEnterpriseRevision<T extends EnterpriseArtifactRevision>(value: T): T;
|
|
91
|
-
export declare function assertEnterpriseRevisionAppend<T extends EnterpriseArtifactRevision>(
|
|
212
|
+
export declare function assertEnterpriseRevisionAppend<T extends EnterpriseArtifactRevision>(
|
|
213
|
+
revision: T,
|
|
214
|
+
previous: EnterpriseArtifactRevision | null,
|
|
215
|
+
content: string | Uint8Array,
|
|
216
|
+
): T;
|
|
92
217
|
export declare function assertEnterpriseReviewThread<T extends EnterpriseReviewThread>(value: T): T;
|
|
93
218
|
export declare function assertEnterpriseProposal<T extends EnterpriseChangeProposal>(value: T): T;
|
|
94
|
-
export declare function assertEnterpriseEvidence<T extends EnterpriseEvidenceReference>(
|
|
219
|
+
export declare function assertEnterpriseEvidence<T extends EnterpriseEvidenceReference>(
|
|
220
|
+
value: T,
|
|
221
|
+
): T;
|
|
95
222
|
export declare function assertEnterpriseSync<T extends EnterpriseSyncState>(value: T): T;
|
|
96
223
|
export declare function assertEnterpriseHandoff<T extends EnterpriseAgentHandoff>(value: T): T;
|
|
97
224
|
export declare function isEnterpriseRepositoryPath(value: unknown): boolean;
|
|
98
|
-
export declare function authorizeEnterpriseAccess(
|
|
225
|
+
export declare function authorizeEnterpriseAccess(
|
|
226
|
+
context: EnterpriseAccessContext,
|
|
227
|
+
): EnterpriseAccessDecision;
|
|
99
228
|
/** Stable UI projection only; every resource request still requires server authorization. */
|
|
100
|
-
export declare function enterpriseProjectCapabilities(
|
|
101
|
-
|
|
229
|
+
export declare function enterpriseProjectCapabilities(
|
|
230
|
+
role: EnterpriseProjectRole | string,
|
|
231
|
+
): readonly EnterpriseAction[];
|
|
232
|
+
export declare function createEnterpriseHandoff(
|
|
233
|
+
input: EnterpriseScope & {
|
|
234
|
+
artifactId: EnterpriseId;
|
|
235
|
+
revisionId: EnterpriseId;
|
|
236
|
+
generatedAt: EnterpriseTimestamp;
|
|
237
|
+
threads?: EnterpriseReviewThread[];
|
|
238
|
+
evidence?: EnterpriseEvidenceReference[];
|
|
239
|
+
unresolvedUncertainties?: string[];
|
|
240
|
+
},
|
|
241
|
+
): EnterpriseAgentHandoff;
|
|
102
242
|
export declare function renderEnterpriseHandoffMarkdown(value: EnterpriseAgentHandoff): string;
|
|
103
|
-
export interface EnterpriseLayout {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
export
|
|
107
|
-
|
|
243
|
+
export interface EnterpriseLayout {
|
|
244
|
+
[targetId: string]: { x: number; y: number };
|
|
245
|
+
}
|
|
246
|
+
export interface EnterpriseDocumentChange {
|
|
247
|
+
op: 'add' | 'remove' | 'replace';
|
|
248
|
+
plane: 'semantic' | 'layout';
|
|
249
|
+
collection?: string;
|
|
250
|
+
targetId?: string;
|
|
251
|
+
field?: string;
|
|
252
|
+
before?: EnterpriseJson;
|
|
253
|
+
after?: EnterpriseJson;
|
|
254
|
+
}
|
|
255
|
+
export interface EnterpriseDocumentDiff {
|
|
256
|
+
semanticChanged: boolean;
|
|
257
|
+
layoutChanged: boolean;
|
|
258
|
+
changes: EnterpriseDocumentChange[];
|
|
259
|
+
}
|
|
260
|
+
export declare function diffEnterpriseDocuments(
|
|
261
|
+
before: { [key: string]: EnterpriseJson },
|
|
262
|
+
after: { [key: string]: EnterpriseJson },
|
|
263
|
+
options?: { beforeLayout?: EnterpriseLayout; afterLayout?: EnterpriseLayout },
|
|
264
|
+
): EnterpriseDocumentDiff;
|
|
265
|
+
export declare function applyEnterpriseOperations(
|
|
266
|
+
document: { [key: string]: EnterpriseJson },
|
|
267
|
+
proposal: EnterpriseChangeProposal,
|
|
268
|
+
options?: { layout?: EnterpriseLayout },
|
|
269
|
+
): EnterpriseDocumentDiff & {
|
|
270
|
+
document: { [key: string]: EnterpriseJson };
|
|
271
|
+
layout: EnterpriseLayout;
|
|
272
|
+
};
|