@contentful/experience-design-system-types 2.42.1-dev-build-f69db6bf.0 → 2.43.0-alpha.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 +15 -0
- package/dist/package.json +1 -1
- package/dist/src/agent-process-lifecycle.d.ts +26 -0
- package/dist/src/agent-process-lifecycle.js +171 -0
- package/dist/src/agent-prompt-artifact.d.ts +8 -0
- package/dist/src/agent-prompt-artifact.js +37 -0
- package/dist/src/agent-prompt-transport.d.ts +1 -0
- package/dist/src/agent-prompt-transport.js +4 -0
- package/dist/src/cdf/build.d.ts +9 -2
- package/dist/src/cdf/build.js +134 -17
- package/dist/src/cdf/finite-values.d.ts +8 -0
- package/dist/src/cdf/finite-values.js +21 -0
- package/dist/src/cdf/index.d.ts +2 -1
- package/dist/src/cdf/index.js +1 -0
- package/dist/src/cdf/property-validation.d.ts +16 -0
- package/dist/src/cdf/property-validation.js +211 -0
- package/dist/src/cdf/representation-validation.d.ts +6 -0
- package/dist/src/cdf/representation-validation.js +182 -0
- package/dist/src/cdf/schema.d.ts +778 -20
- package/dist/src/cdf/schema.js +362 -5
- package/dist/src/cdf/types.d.ts +57 -59
- package/dist/src/cdf/types.js +72 -15
- package/dist/src/cdf/validate.js +31 -1
- package/dist/src/cdf/vocabularies.d.ts +1 -1
- package/dist/src/cdf/vocabularies.js +9 -1
- package/dist/src/config/index.js +6 -3
- package/dist/src/exploration/constants.d.ts +10 -0
- package/dist/src/exploration/constants.js +18 -0
- package/dist/src/exploration/index.d.ts +3 -0
- package/dist/src/exploration/index.js +3 -0
- package/dist/src/exploration/schemas.d.ts +201 -0
- package/dist/src/exploration/schemas.js +126 -0
- package/dist/src/exploration/types.d.ts +393 -0
- package/dist/src/exploration/types.js +1 -0
- package/dist/src/handoff/index.d.ts +1 -1
- package/dist/src/index.d.ts +15 -1
- package/dist/src/index.js +12 -4
- package/dist/src/property-contract/analysis-representation-candidates.d.ts +19 -0
- package/dist/src/property-contract/analysis-representation-candidates.js +45 -0
- package/dist/src/property-contract/classification.d.ts +38 -0
- package/dist/src/property-contract/classification.js +84 -0
- package/dist/src/property-contract/compact-model-components.d.ts +16 -0
- package/dist/src/property-contract/compact-model-components.js +113 -0
- package/dist/src/property-contract/content-digest.d.ts +2 -0
- package/dist/src/property-contract/content-digest.js +69 -0
- package/dist/src/property-contract/decision-protocol.d.ts +45 -0
- package/dist/src/property-contract/decision-protocol.js +251 -0
- package/dist/src/property-contract/definition-import-rules.d.ts +10 -0
- package/dist/src/property-contract/definition-import-rules.js +105 -0
- package/dist/src/property-contract/definition-import.d.ts +13 -0
- package/dist/src/property-contract/definition-import.js +52 -0
- package/dist/src/property-contract/discriminated-union-source.d.ts +17 -0
- package/dist/src/property-contract/discriminated-union-source.js +180 -0
- package/dist/src/property-contract/import-prerequisites.d.ts +70 -0
- package/dist/src/property-contract/import-prerequisites.js +208 -0
- package/dist/src/property-contract/index.d.ts +18 -1
- package/dist/src/property-contract/index.js +18 -6
- package/dist/src/property-contract/logical-source-graph.d.ts +36 -0
- package/dist/src/property-contract/logical-source-graph.js +240 -0
- package/dist/src/property-contract/mapper-readiness.d.ts +6 -0
- package/dist/src/property-contract/mapper-readiness.js +34 -0
- package/dist/src/property-contract/model-exploration.d.ts +42 -0
- package/dist/src/property-contract/model-exploration.js +94 -0
- package/dist/src/property-contract/native-source-region.d.ts +5 -0
- package/dist/src/property-contract/native-source-region.js +125 -0
- package/dist/src/property-contract/null-handling.d.ts +10 -0
- package/dist/src/property-contract/null-handling.js +45 -0
- package/dist/src/property-contract/physical-property-import.d.ts +6 -0
- package/dist/src/property-contract/physical-property-import.js +55 -0
- package/dist/src/property-contract/property-decision.d.ts +14 -0
- package/dist/src/property-contract/property-decision.js +155 -0
- package/dist/src/property-contract/property-model.d.ts +197 -0
- package/dist/src/property-contract/property-model.js +833 -0
- package/dist/src/property-contract/representation-plan.d.ts +133 -0
- package/dist/src/property-contract/representation-plan.js +756 -0
- package/dist/src/property-contract/representation-proposal.d.ts +65 -0
- package/dist/src/property-contract/representation-proposal.js +204 -0
- package/dist/src/property-contract/resource-link-schema.d.ts +55 -0
- package/dist/src/property-contract/resource-link-schema.js +28 -0
- package/dist/src/property-contract/source-representation.d.ts +9 -0
- package/dist/src/property-contract/source-representation.js +79 -0
- package/dist/src/property-contract/target-definition.d.ts +17 -16
- package/dist/src/property-contract/target-definition.js +4 -26
- package/dist/src/schema-export.d.ts +30 -0
- package/dist/src/schema-export.js +285 -0
- package/dist/src/shared-source.d.ts +105 -0
- package/dist/src/shared-source.js +1 -0
- package/dist/src/source-input-association.d.ts +23 -0
- package/dist/src/source-input-association.js +52 -0
- package/dist/src/sources-api/preview/index.d.ts +37 -3
- package/dist/src/sources-api/preview/index.js +39 -1
- package/dist/src/sources-api/preview/schema.d.ts +2 -0
- package/dist/src/sources-api/preview/schema.js +74 -0
- package/package.json +1 -1
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import type { CDFComponentEntry, CDFPropertyDefinition, CDFSlotDefinition } from '../cdf/types.js';
|
|
2
|
+
import { type RepresentationProposalDraft } from './representation-proposal.js';
|
|
3
|
+
import { type JsonValue, type PropertyIssue } from './json-value.js';
|
|
4
|
+
import { type LogicalBranchCondition, type LogicalSourceGraph } from './logical-source-graph.js';
|
|
5
|
+
import { type ModelComponentExploration } from './model-exploration.js';
|
|
6
|
+
import { type DefaultIntent, type MapperAvailability, type PropertyModel, type SourceGraphNode } from './property-model.js';
|
|
7
|
+
export interface ModelBinding {
|
|
8
|
+
planId: string;
|
|
9
|
+
componentId: string;
|
|
10
|
+
propertyId: string;
|
|
11
|
+
nodeId: string;
|
|
12
|
+
sourceNodeId?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ModelCardinality {
|
|
15
|
+
min: number;
|
|
16
|
+
max: number | null;
|
|
17
|
+
ordered: boolean;
|
|
18
|
+
tuplePosition?: number;
|
|
19
|
+
rest?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export type ModelReconstruction = {
|
|
22
|
+
kind: 'optional-value';
|
|
23
|
+
valueNodeId: string;
|
|
24
|
+
} | {
|
|
25
|
+
kind: 'object-envelope';
|
|
26
|
+
field: string;
|
|
27
|
+
valueNodeId: string;
|
|
28
|
+
} | {
|
|
29
|
+
kind: 'ordered-array';
|
|
30
|
+
itemNodeId: string;
|
|
31
|
+
} | {
|
|
32
|
+
kind: 'fixed-value';
|
|
33
|
+
value: JsonValue;
|
|
34
|
+
} | {
|
|
35
|
+
kind: 'empty-value';
|
|
36
|
+
state: 'null' | 'undefined' | 'never';
|
|
37
|
+
};
|
|
38
|
+
export interface LogicalPhysicalMapping {
|
|
39
|
+
nodeId: string;
|
|
40
|
+
sourceNodeId: string;
|
|
41
|
+
readonly: boolean;
|
|
42
|
+
occurrenceReadonly: boolean;
|
|
43
|
+
intrinsicReadonly: boolean;
|
|
44
|
+
defaultIntent?: DefaultIntent;
|
|
45
|
+
path: NonNullable<SourceGraphNode['path']>;
|
|
46
|
+
required: boolean;
|
|
47
|
+
nullable: boolean | null;
|
|
48
|
+
undefinable: boolean | null;
|
|
49
|
+
disposition: 'native-field' | 'model' | 'slot' | 'reference' | 'reconstruction' | 'held';
|
|
50
|
+
reconstruction?: ModelReconstruction;
|
|
51
|
+
componentKey?: string;
|
|
52
|
+
field?: string;
|
|
53
|
+
slot?: string;
|
|
54
|
+
targetNodeId?: string;
|
|
55
|
+
reason?: string;
|
|
56
|
+
withinValue?: {
|
|
57
|
+
ownerNodeId: string;
|
|
58
|
+
path: NonNullable<SourceGraphNode['path']>;
|
|
59
|
+
};
|
|
60
|
+
branchConditions?: LogicalBranchCondition[];
|
|
61
|
+
variant?: {
|
|
62
|
+
wrapperKey: string;
|
|
63
|
+
slot: string;
|
|
64
|
+
componentKey: string;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export interface ModelBranchSelection {
|
|
68
|
+
unionNodeId: string;
|
|
69
|
+
wrapperKey: string;
|
|
70
|
+
slot: string;
|
|
71
|
+
discriminator: string;
|
|
72
|
+
branches: Array<{
|
|
73
|
+
memberIndex: number;
|
|
74
|
+
nodeId: string;
|
|
75
|
+
sourceNodeId: string;
|
|
76
|
+
tag: string | number | boolean;
|
|
77
|
+
modelKey: string;
|
|
78
|
+
}>;
|
|
79
|
+
}
|
|
80
|
+
export interface RepresentationPlan {
|
|
81
|
+
schemaVersion: 1;
|
|
82
|
+
proposal?: RepresentationProposalDraft;
|
|
83
|
+
id: string;
|
|
84
|
+
kind: 'native' | 'component-model';
|
|
85
|
+
identity: PropertyModel['identity'];
|
|
86
|
+
sourceModel: PropertyModel;
|
|
87
|
+
contextSnapshot?: JsonValue;
|
|
88
|
+
logicalGraph: LogicalSourceGraph;
|
|
89
|
+
sourceDigest: string;
|
|
90
|
+
contextDigest: string;
|
|
91
|
+
category: NonNullable<PropertyModel['category']>;
|
|
92
|
+
defaultIntent: DefaultIntent;
|
|
93
|
+
sourceDefault?: NonNullable<PropertyModel['source']['default']>;
|
|
94
|
+
nativeDefinition?: CDFPropertyDefinition;
|
|
95
|
+
models: Array<{
|
|
96
|
+
key: string;
|
|
97
|
+
originalKey: string;
|
|
98
|
+
nodeId: string;
|
|
99
|
+
entry: CDFComponentEntry;
|
|
100
|
+
}>;
|
|
101
|
+
attachment?: {
|
|
102
|
+
slot: string;
|
|
103
|
+
definition: CDFSlotDefinition;
|
|
104
|
+
};
|
|
105
|
+
mappings: LogicalPhysicalMapping[];
|
|
106
|
+
issues: PropertyIssue[];
|
|
107
|
+
sdkValid: boolean;
|
|
108
|
+
requirements: Array<{
|
|
109
|
+
path: string;
|
|
110
|
+
capability: string;
|
|
111
|
+
}>;
|
|
112
|
+
branchSelections?: ModelBranchSelection[];
|
|
113
|
+
modelExplorations?: ModelComponentExploration[];
|
|
114
|
+
}
|
|
115
|
+
/** Attach a validated model plan without claiming an ordinary source composition slot. */
|
|
116
|
+
export declare function attachComponentModelPlan(entry: CDFComponentEntry, plan: RepresentationPlan): CDFComponentEntry;
|
|
117
|
+
export declare function deriveEditableRepresentationPlans(model: PropertyModel, options?: {
|
|
118
|
+
context?: JsonValue;
|
|
119
|
+
modelEdits?: Readonly<Record<string, CDFComponentEntry>>;
|
|
120
|
+
modelExplorations?: readonly ModelComponentExploration[];
|
|
121
|
+
modelRenames?: Readonly<Record<string, string>>;
|
|
122
|
+
defaultIntent?: DefaultIntent;
|
|
123
|
+
proposal?: RepresentationProposalDraft;
|
|
124
|
+
}): RepresentationPlan[];
|
|
125
|
+
export declare function validateRepresentationPlan(input: unknown, model: PropertyModel, context?: JsonValue): PropertyIssue[];
|
|
126
|
+
export declare function evaluateRepresentationReadiness(plan: RepresentationPlan, capabilities?: Readonly<Record<string, MapperAvailability>>): {
|
|
127
|
+
ready: boolean;
|
|
128
|
+
requirements: ReadonlyArray<{
|
|
129
|
+
path: string;
|
|
130
|
+
capability: string;
|
|
131
|
+
availability: MapperAvailability;
|
|
132
|
+
}>;
|
|
133
|
+
};
|