@osdk/maker 0.13.0 → 0.14.0-beta.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.
- package/CHANGELOG.md +102 -36
- package/README.md +86 -22
- package/build/browser/api/action/DefaultFormat.js +2 -0
- package/build/browser/api/action/DefaultFormat.js.map +1 -0
- package/build/browser/api/action/TableConfiguration.js +2 -0
- package/build/browser/api/action/TableConfiguration.js.map +1 -0
- package/build/browser/api/code-snippets/createCodeSnippets.js +91 -0
- package/build/browser/api/code-snippets/createCodeSnippets.js.map +1 -0
- package/build/browser/api/code-snippets/snippetTypes.js +60 -0
- package/build/browser/api/code-snippets/snippetTypes.js.map +1 -0
- package/build/browser/api/defineAction.js +131 -414
- package/build/browser/api/defineAction.js.map +1 -1
- package/build/browser/api/defineCreateInterfaceObjectAction.js +85 -0
- package/build/browser/api/defineCreateInterfaceObjectAction.js.map +1 -0
- package/build/browser/api/defineCreateObjectAction.js +80 -0
- package/build/browser/api/defineCreateObjectAction.js.map +1 -0
- package/build/browser/api/defineCreateOrModifyObjectAction.js +95 -0
- package/build/browser/api/defineCreateOrModifyObjectAction.js.map +1 -0
- package/build/browser/api/defineDeleteInterfaceObjectAction.js +53 -0
- package/build/browser/api/defineDeleteInterfaceObjectAction.js.map +1 -0
- package/build/browser/api/defineDeleteObjectAction.js +56 -0
- package/build/browser/api/defineDeleteObjectAction.js.map +1 -0
- package/build/browser/api/defineLink.js +5 -13
- package/build/browser/api/defineLink.js.map +1 -1
- package/build/browser/api/defineModifyInterfaceObjectAction.js +84 -0
- package/build/browser/api/defineModifyInterfaceObjectAction.js.map +1 -0
- package/build/browser/api/defineModifyObjectAction.js +93 -0
- package/build/browser/api/defineModifyObjectAction.js.map +1 -0
- package/build/browser/api/defineObject.js +94 -3
- package/build/browser/api/defineObject.js.map +1 -1
- package/build/browser/api/defineOntology.js +6 -1
- package/build/browser/api/defineOntology.js.map +1 -1
- package/build/browser/api/links/LinkType.js.map +1 -1
- package/build/browser/api/object/ObjectType.js.map +1 -1
- package/build/browser/api/object/ObjectTypeDatasourceDefinition.js.map +1 -1
- package/build/browser/api/object/ObjectTypeDefinition.js.map +1 -1
- package/build/browser/api/test/actions.test.js +12034 -0
- package/build/browser/api/test/actions.test.js.map +1 -0
- package/build/browser/api/test/interfaces.test.js +924 -0
- package/build/browser/api/test/interfaces.test.js.map +1 -0
- package/build/browser/api/test/links.test.js +1974 -0
- package/build/browser/api/test/links.test.js.map +1 -0
- package/build/browser/api/{markingconstraint.test.js → test/markingconstraint.test.js} +28 -2
- package/build/browser/api/test/markingconstraint.test.js.map +1 -0
- package/build/browser/api/test/misc.test.js +1058 -0
- package/build/browser/api/test/misc.test.js.map +1 -0
- package/build/browser/api/{objectStatus.test.js → test/objectStatus.test.js} +2 -2
- package/build/browser/api/test/objectStatus.test.js.map +1 -0
- package/build/browser/api/test/objects.test.js +2591 -0
- package/build/browser/api/test/objects.test.js.map +1 -0
- package/build/browser/api/test/spt.test.js +387 -0
- package/build/browser/api/test/spt.test.js.map +1 -0
- package/build/browser/api/test/valueTypes.test.js +156 -0
- package/build/browser/api/test/valueTypes.test.js.map +1 -0
- package/build/browser/cli/main.js +25 -6
- package/build/browser/cli/main.js.map +1 -1
- package/build/browser/conversion/toMarketplace/convertActionParameterConditionalOverride.js +2 -2
- package/build/browser/conversion/toMarketplace/convertActionParameterConditionalOverride.js.map +1 -1
- package/build/browser/conversion/toMarketplace/convertActionValidation.js +2 -2
- package/build/browser/conversion/toMarketplace/convertActionValidation.js.map +1 -1
- package/build/browser/conversion/toMarketplace/convertConditionDefinition.js +5 -3
- package/build/browser/conversion/toMarketplace/convertConditionDefinition.js.map +1 -1
- package/build/browser/conversion/toMarketplace/convertDatasourceDefinition.js +3 -2
- package/build/browser/conversion/toMarketplace/convertDatasourceDefinition.js.map +1 -1
- package/build/browser/conversion/toMarketplace/convertLink.js +109 -24
- package/build/browser/conversion/toMarketplace/convertLink.js.map +1 -1
- package/build/browser/conversion/toMarketplace/convertObject.js +81 -4
- package/build/browser/conversion/toMarketplace/convertObject.js.map +1 -1
- package/build/browser/conversion/toMarketplace/convertSectionConditionalOverride.js +2 -2
- package/build/browser/conversion/toMarketplace/convertSectionConditionalOverride.js.map +1 -1
- package/build/browser/index.js +8 -1
- package/build/browser/index.js.map +1 -1
- package/build/cjs/index.cjs +1716 -797
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +184 -115
- package/build/esm/api/action/DefaultFormat.js +2 -0
- package/build/esm/api/action/DefaultFormat.js.map +1 -0
- package/build/esm/api/action/TableConfiguration.js +2 -0
- package/build/esm/api/action/TableConfiguration.js.map +1 -0
- package/build/esm/api/code-snippets/createCodeSnippets.js +91 -0
- package/build/esm/api/code-snippets/createCodeSnippets.js.map +1 -0
- package/build/esm/api/code-snippets/snippetTypes.js +60 -0
- package/build/esm/api/code-snippets/snippetTypes.js.map +1 -0
- package/build/esm/api/defineAction.js +131 -414
- package/build/esm/api/defineAction.js.map +1 -1
- package/build/esm/api/defineCreateInterfaceObjectAction.js +85 -0
- package/build/esm/api/defineCreateInterfaceObjectAction.js.map +1 -0
- package/build/esm/api/defineCreateObjectAction.js +80 -0
- package/build/esm/api/defineCreateObjectAction.js.map +1 -0
- package/build/esm/api/defineCreateOrModifyObjectAction.js +95 -0
- package/build/esm/api/defineCreateOrModifyObjectAction.js.map +1 -0
- package/build/esm/api/defineDeleteInterfaceObjectAction.js +53 -0
- package/build/esm/api/defineDeleteInterfaceObjectAction.js.map +1 -0
- package/build/esm/api/defineDeleteObjectAction.js +56 -0
- package/build/esm/api/defineDeleteObjectAction.js.map +1 -0
- package/build/esm/api/defineLink.js +5 -13
- package/build/esm/api/defineLink.js.map +1 -1
- package/build/esm/api/defineModifyInterfaceObjectAction.js +84 -0
- package/build/esm/api/defineModifyInterfaceObjectAction.js.map +1 -0
- package/build/esm/api/defineModifyObjectAction.js +93 -0
- package/build/esm/api/defineModifyObjectAction.js.map +1 -0
- package/build/esm/api/defineObject.js +94 -3
- package/build/esm/api/defineObject.js.map +1 -1
- package/build/esm/api/defineOntology.js +6 -1
- package/build/esm/api/defineOntology.js.map +1 -1
- package/build/esm/api/links/LinkType.js.map +1 -1
- package/build/esm/api/object/ObjectType.js.map +1 -1
- package/build/esm/api/object/ObjectTypeDatasourceDefinition.js.map +1 -1
- package/build/esm/api/object/ObjectTypeDefinition.js.map +1 -1
- package/build/esm/api/test/actions.test.js +12034 -0
- package/build/esm/api/test/actions.test.js.map +1 -0
- package/build/esm/api/test/interfaces.test.js +924 -0
- package/build/esm/api/test/interfaces.test.js.map +1 -0
- package/build/esm/api/test/links.test.js +1974 -0
- package/build/esm/api/test/links.test.js.map +1 -0
- package/build/esm/api/{markingconstraint.test.js → test/markingconstraint.test.js} +28 -2
- package/build/esm/api/test/markingconstraint.test.js.map +1 -0
- package/build/esm/api/test/misc.test.js +1058 -0
- package/build/esm/api/test/misc.test.js.map +1 -0
- package/build/esm/api/{objectStatus.test.js → test/objectStatus.test.js} +2 -2
- package/build/esm/api/test/objectStatus.test.js.map +1 -0
- package/build/esm/api/test/objects.test.js +2591 -0
- package/build/esm/api/test/objects.test.js.map +1 -0
- package/build/esm/api/test/spt.test.js +387 -0
- package/build/esm/api/test/spt.test.js.map +1 -0
- package/build/esm/api/test/valueTypes.test.js +156 -0
- package/build/esm/api/test/valueTypes.test.js.map +1 -0
- package/build/esm/cli/main.js +25 -6
- package/build/esm/cli/main.js.map +1 -1
- package/build/esm/conversion/toMarketplace/convertActionParameterConditionalOverride.js +2 -2
- package/build/esm/conversion/toMarketplace/convertActionParameterConditionalOverride.js.map +1 -1
- package/build/esm/conversion/toMarketplace/convertActionValidation.js +2 -2
- package/build/esm/conversion/toMarketplace/convertActionValidation.js.map +1 -1
- package/build/esm/conversion/toMarketplace/convertConditionDefinition.js +5 -3
- package/build/esm/conversion/toMarketplace/convertConditionDefinition.js.map +1 -1
- package/build/esm/conversion/toMarketplace/convertDatasourceDefinition.js +3 -2
- package/build/esm/conversion/toMarketplace/convertDatasourceDefinition.js.map +1 -1
- package/build/esm/conversion/toMarketplace/convertLink.js +109 -24
- package/build/esm/conversion/toMarketplace/convertLink.js.map +1 -1
- package/build/esm/conversion/toMarketplace/convertObject.js +81 -4
- package/build/esm/conversion/toMarketplace/convertObject.js.map +1 -1
- package/build/esm/conversion/toMarketplace/convertSectionConditionalOverride.js +2 -2
- package/build/esm/conversion/toMarketplace/convertSectionConditionalOverride.js.map +1 -1
- package/build/esm/index.js +8 -1
- package/build/esm/index.js.map +1 -1
- package/build/types/api/action/DefaultFormat.d.ts +1 -0
- package/build/types/api/action/DefaultFormat.d.ts.map +1 -0
- package/build/types/api/action/TableConfiguration.d.ts +8 -0
- package/build/types/api/action/TableConfiguration.d.ts.map +1 -0
- package/build/types/api/code-snippets/createCodeSnippets.d.ts +2 -0
- package/build/types/api/code-snippets/createCodeSnippets.d.ts.map +1 -0
- package/build/types/api/code-snippets/snippetTypes.d.ts +23 -0
- package/build/types/api/code-snippets/snippetTypes.d.ts.map +1 -0
- package/build/types/api/defineAction.d.ts +34 -10
- package/build/types/api/defineAction.d.ts.map +1 -1
- package/build/types/api/defineCreateInterfaceObjectAction.d.ts +3 -0
- package/build/types/api/defineCreateInterfaceObjectAction.d.ts.map +1 -0
- package/build/types/api/defineCreateObjectAction.d.ts +3 -0
- package/build/types/api/defineCreateObjectAction.d.ts.map +1 -0
- package/build/types/api/defineCreateOrModifyObjectAction.d.ts +3 -0
- package/build/types/api/defineCreateOrModifyObjectAction.d.ts.map +1 -0
- package/build/types/api/defineDeleteInterfaceObjectAction.d.ts +3 -0
- package/build/types/api/defineDeleteInterfaceObjectAction.d.ts.map +1 -0
- package/build/types/api/defineDeleteObjectAction.d.ts +3 -0
- package/build/types/api/defineDeleteObjectAction.d.ts.map +1 -0
- package/build/types/api/defineLink.d.ts.map +1 -1
- package/build/types/api/defineModifyInterfaceObjectAction.d.ts +3 -0
- package/build/types/api/defineModifyInterfaceObjectAction.d.ts.map +1 -0
- package/build/types/api/defineModifyObjectAction.d.ts +3 -0
- package/build/types/api/defineModifyObjectAction.d.ts.map +1 -0
- package/build/types/api/defineObject.d.ts.map +1 -1
- package/build/types/api/defineOntology.d.ts +1 -1
- package/build/types/api/defineOntology.d.ts.map +1 -1
- package/build/types/api/links/LinkType.d.ts +7 -7
- package/build/types/api/object/ObjectType.d.ts +1 -1
- package/build/types/api/object/ObjectType.d.ts.map +1 -1
- package/build/types/api/object/ObjectTypeDatasourceDefinition.d.ts +41 -1
- package/build/types/api/object/ObjectTypeDatasourceDefinition.d.ts.map +1 -1
- package/build/types/api/object/ObjectTypeDefinition.d.ts +1 -1
- package/build/types/api/object/ObjectTypeDefinition.d.ts.map +1 -1
- package/build/types/api/test/actions.test.d.ts.map +1 -0
- package/build/types/api/test/interfaces.test.d.ts.map +1 -0
- package/build/types/api/test/links.test.d.ts.map +1 -0
- package/build/types/api/test/markingconstraint.test.d.ts +1 -0
- package/build/types/api/test/markingconstraint.test.d.ts.map +1 -0
- package/build/types/api/test/misc.test.d.ts +1 -0
- package/build/types/api/test/misc.test.d.ts.map +1 -0
- package/build/types/api/test/objectStatus.test.d.ts +1 -0
- package/build/types/api/test/objectStatus.test.d.ts.map +1 -0
- package/build/types/api/test/objects.test.d.ts +1 -0
- package/build/types/api/test/objects.test.d.ts.map +1 -0
- package/build/types/api/test/spt.test.d.ts +1 -0
- package/build/types/api/test/spt.test.d.ts.map +1 -0
- package/build/types/api/test/valueTypes.test.d.ts +1 -0
- package/build/types/api/test/valueTypes.test.d.ts.map +1 -0
- package/build/types/cli/main.d.ts.map +1 -1
- package/build/types/conversion/toMarketplace/convertActionParameterConditionalOverride.d.ts +2 -2
- package/build/types/conversion/toMarketplace/convertActionParameterConditionalOverride.d.ts.map +1 -1
- package/build/types/conversion/toMarketplace/convertConditionDefinition.d.ts +2 -1
- package/build/types/conversion/toMarketplace/convertConditionDefinition.d.ts.map +1 -1
- package/build/types/conversion/toMarketplace/convertLink.d.ts +6 -0
- package/build/types/conversion/toMarketplace/convertLink.d.ts.map +1 -1
- package/build/types/conversion/toMarketplace/convertObject.d.ts.map +1 -1
- package/build/types/conversion/toMarketplace/convertSectionConditionalOverride.d.ts +2 -1
- package/build/types/conversion/toMarketplace/convertSectionConditionalOverride.d.ts.map +1 -1
- package/build/types/index.d.ts +8 -1
- package/build/types/index.d.ts.map +1 -1
- package/package.json +6 -6
- package/build/browser/api/markingconstraint.test.js.map +0 -1
- package/build/browser/api/objectStatus.test.js.map +0 -1
- package/build/browser/api/overall.test.js +0 -13998
- package/build/browser/api/overall.test.js.map +0 -1
- package/build/esm/api/markingconstraint.test.js.map +0 -1
- package/build/esm/api/objectStatus.test.js.map +0 -1
- package/build/esm/api/overall.test.js +0 -13998
- package/build/esm/api/overall.test.js.map +0 -1
- package/build/types/api/markingconstraint.test.d.ts.map +0 -1
- package/build/types/api/objectStatus.test.d.ts.map +0 -1
- package/build/types/api/overall.test.d.ts.map +0 -1
- /package/build/types/api/{markingconstraint.test.d.ts → test/actions.test.d.ts} +0 -0
- /package/build/types/api/{objectStatus.test.d.ts → test/interfaces.test.d.ts} +0 -0
- /package/build/types/api/{overall.test.d.ts → test/links.test.d.ts} +0 -0
|
@@ -14,17 +14,21 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { addNamespaceIfNone, buildDatasource, convertObjectStatus } from "../../api/defineOntology.js";
|
|
17
|
+
import { addNamespaceIfNone, buildDatasource, cleanAndValidateLinkTypeId, convertObjectStatus } from "../../api/defineOntology.js";
|
|
18
18
|
import { isExotic } from "../../api/properties/PropertyTypeType.js";
|
|
19
19
|
import { convertDatasourceDefinition } from "./convertDatasourceDefinition.js";
|
|
20
20
|
import { convertObjectPropertyType } from "./convertObjectPropertyType.js";
|
|
21
21
|
export function convertObject(objectType) {
|
|
22
|
-
const
|
|
22
|
+
const {
|
|
23
|
+
derivedDatasources,
|
|
24
|
+
derivedPropertyNames
|
|
25
|
+
} = extractDerivedDatasources(objectType);
|
|
26
|
+
const propertyDatasources = (objectType.properties ?? []).filter(prop => !derivedPropertyNames.includes(prop.apiName)).flatMap(prop => extractPropertyDatasource(prop, objectType.apiName));
|
|
23
27
|
const classificationGroupMarkingNames = extractMarkingGroups(objectType.properties ?? [], "CBAC");
|
|
24
28
|
const mandatoryMarkingNames = extractMarkingGroups(objectType.properties ?? [], "MANDATORY");
|
|
25
29
|
const classificationInputGroup = classificationGroupMarkingNames.length > 0 ? classificationGroupMarkingNames.reduce((l, r) => l + "/" + r) : undefined;
|
|
26
30
|
const mandatoryInputGroup = mandatoryMarkingNames.length > 0 ? mandatoryMarkingNames.reduce((l, r) => l + "/" + r) : undefined;
|
|
27
|
-
const objectDatasource = buildDatasource(objectType.apiName, convertDatasourceDefinition(objectType, objectType.properties ?? []), classificationInputGroup, mandatoryInputGroup);
|
|
31
|
+
const objectDatasource = buildDatasource(objectType.apiName, convertDatasourceDefinition(objectType, (objectType.properties ?? []).filter(prop => !derivedPropertyNames.includes(prop.apiName))), classificationInputGroup, mandatoryInputGroup);
|
|
28
32
|
const implementations = objectType.implementsInterfaces ?? [];
|
|
29
33
|
return {
|
|
30
34
|
objectType: {
|
|
@@ -58,7 +62,7 @@ export function convertObject(objectType) {
|
|
|
58
62
|
})),
|
|
59
63
|
allImplementsInterfaces: {}
|
|
60
64
|
},
|
|
61
|
-
datasources: [...propertyDatasources, objectDatasource],
|
|
65
|
+
datasources: [...propertyDatasources, ...derivedDatasources, objectDatasource],
|
|
62
66
|
entityMetadata: {
|
|
63
67
|
arePatchesEnabled: objectType.editsEnabled ?? false
|
|
64
68
|
}
|
|
@@ -105,4 +109,77 @@ export function extractPropertyDatasource(property, objectTypeApiName) {
|
|
|
105
109
|
return [];
|
|
106
110
|
}
|
|
107
111
|
}
|
|
112
|
+
function extractDerivedDatasources(objectType) {
|
|
113
|
+
const inputDerivedDatasources = (objectType.datasources ?? []).filter(ds => ds.type === "derived");
|
|
114
|
+
const derivedDatasources = inputDerivedDatasources.map((ds, i) => buildDerivedDatasource(ds, i, objectType.apiName));
|
|
115
|
+
const derivedPropertyNames = inputDerivedDatasources.flatMap(ds => Object.keys(ds.propertyMapping));
|
|
116
|
+
return {
|
|
117
|
+
derivedDatasources,
|
|
118
|
+
derivedPropertyNames
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
function buildDerivedDatasource(datasource, index, objectTypeApiName) {
|
|
122
|
+
const linkDefinition = {
|
|
123
|
+
type: "multiHopLink",
|
|
124
|
+
multiHopLink: {
|
|
125
|
+
steps: datasource.linkDefinition.map(step => ({
|
|
126
|
+
type: "searchAround",
|
|
127
|
+
searchAround: {
|
|
128
|
+
linkTypeIdentifier: {
|
|
129
|
+
type: "linkType",
|
|
130
|
+
linkType: cleanAndValidateLinkTypeId(step.linkType.apiName)
|
|
131
|
+
},
|
|
132
|
+
linkTypeSide: step.side ?? "SOURCE"
|
|
133
|
+
}
|
|
134
|
+
}))
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
const isLinkedProperties = typeof Object.values(datasource.propertyMapping)[0] === "string";
|
|
138
|
+
const derivedDefinition = isLinkedProperties ? {
|
|
139
|
+
type: "linkedProperties",
|
|
140
|
+
linkedProperties: {
|
|
141
|
+
linkDefinition,
|
|
142
|
+
propertyTypeMapping: Object.fromEntries(Object.entries(datasource.propertyMapping).map(([sourceProp, targetProp]) => [sourceProp, {
|
|
143
|
+
type: "propertyType",
|
|
144
|
+
propertyType: targetProp
|
|
145
|
+
}]))
|
|
146
|
+
}
|
|
147
|
+
} : {
|
|
148
|
+
type: "aggregatedProperties",
|
|
149
|
+
aggregatedProperties: {
|
|
150
|
+
linkDefinition,
|
|
151
|
+
propertyTypeMapping: Object.fromEntries(Object.entries(datasource.propertyMapping).map(([sourceProp, agg]) => [sourceProp, buildAggregation(agg)]))
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
return buildDatasource(objectTypeApiName + ".derived." + index.toString(), {
|
|
155
|
+
type: "derived",
|
|
156
|
+
derived: {
|
|
157
|
+
definition: derivedDefinition
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
function buildAggregation(agg) {
|
|
162
|
+
const type = agg.type;
|
|
163
|
+
const limit = "limit" in agg ? agg.limit : undefined;
|
|
164
|
+
const foreignProperty = "property" in agg ? agg.property : undefined;
|
|
165
|
+
const innerDef = {};
|
|
166
|
+
if (type !== "count") {
|
|
167
|
+
if (["collectList", "collectSet"].includes(type)) {
|
|
168
|
+
innerDef["linkedProperty"] = {
|
|
169
|
+
type: "propertyType",
|
|
170
|
+
propertyType: foreignProperty
|
|
171
|
+
};
|
|
172
|
+
innerDef["limit"] = limit;
|
|
173
|
+
} else {
|
|
174
|
+
innerDef["property"] = {
|
|
175
|
+
type: "propertyType",
|
|
176
|
+
propertyType: foreignProperty
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return {
|
|
181
|
+
type,
|
|
182
|
+
[type]: innerDef
|
|
183
|
+
};
|
|
184
|
+
}
|
|
108
185
|
//# sourceMappingURL=convertObject.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertObject.js","names":["addNamespaceIfNone","buildDatasource","convertObjectStatus","isExotic","convertDatasourceDefinition","convertObjectPropertyType","convertObject","objectType","propertyDatasources","properties","flatMap","prop","extractPropertyDatasource","apiName","classificationGroupMarkingNames","extractMarkingGroups","mandatoryMarkingNames","classificationInputGroup","length","reduce","l","r","undefined","mandatoryInputGroup","objectDatasource","implementations","implementsInterfaces","displayMetadata","description","displayName","groupDisplayName","icon","type","blueprint","locator","color","pluralDisplayName","visibility","primaryKeys","primaryKeyPropertyApiName","propertyTypes","Object","fromEntries","map","val","titlePropertyTypeRid","titlePropertyApiName","status","redacted","implementsInterfaces2","impl","interfaceTypeApiName","implements","linksV2","propertiesV2","propertyMapping","mapping","interfaceProperty","propertyTypeRid","mapsTo","allImplementsInterfaces","datasources","entityMetadata","arePatchesEnabled","editsEnabled","markingType","markingInputGroupName","filter","property","objectTypeApiName","identifier","geotimeDefinition","geotimeSeries","geotimeSeriesIntegrationRid","mediaSetDefinition","mediaSetView","assumedMarkings","mediaSetViewLocator"],"sources":["convertObject.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n OntologyIrObjectTypeBlockDataV2,\n OntologyIrObjectTypeDatasource,\n OntologyIrObjectTypeDatasourceDefinition,\n OntologyIrPropertyType,\n} from \"@osdk/client.unstable\";\nimport {\n addNamespaceIfNone,\n buildDatasource,\n convertObjectStatus,\n} from \"../../api/defineOntology.js\";\nimport type { ObjectPropertyType } from \"../../api/object/ObjectPropertyType.js\";\nimport type { ObjectType } from \"../../api/object/ObjectType.js\";\nimport { isExotic } from \"../../api/properties/PropertyTypeType.js\";\nimport { convertDatasourceDefinition } from \"./convertDatasourceDefinition.js\";\nimport { convertObjectPropertyType } from \"./convertObjectPropertyType.js\";\n\nexport function convertObject(\n objectType: ObjectType,\n): OntologyIrObjectTypeBlockDataV2 {\n const propertyDatasources: OntologyIrObjectTypeDatasource[] =\n (objectType.properties ?? [])\n .flatMap(prop => extractPropertyDatasource(prop, objectType.apiName));\n\n const classificationGroupMarkingNames = extractMarkingGroups(\n objectType.properties ?? [],\n \"CBAC\",\n );\n\n const mandatoryMarkingNames = extractMarkingGroups(\n objectType.properties ?? [],\n \"MANDATORY\",\n );\n\n const classificationInputGroup = classificationGroupMarkingNames.length > 0\n ? classificationGroupMarkingNames.reduce((l, r) => l + \"/\" + r)\n : undefined;\n\n const mandatoryInputGroup = mandatoryMarkingNames.length > 0\n ? mandatoryMarkingNames.reduce((l, r) => l + \"/\" + r)\n : undefined;\n\n const objectDatasource = buildDatasource(\n objectType.apiName,\n convertDatasourceDefinition(\n objectType,\n objectType.properties ?? [],\n ),\n classificationInputGroup,\n mandatoryInputGroup,\n );\n\n const implementations = objectType.implementsInterfaces ?? [];\n\n return {\n objectType: {\n displayMetadata: {\n description: objectType.description,\n displayName: objectType.displayName,\n groupDisplayName: undefined,\n icon: {\n type: \"blueprint\",\n blueprint: objectType.icon ?? { locator: \"cube\", color: \"#2D72D2\" },\n },\n pluralDisplayName: objectType.pluralDisplayName,\n visibility: objectType.visibility ?? \"NORMAL\",\n },\n primaryKeys: [objectType.primaryKeyPropertyApiName],\n propertyTypes: Object.fromEntries(\n objectType.properties?.map<[string, OntologyIrPropertyType]>(\n val => [val.apiName, convertObjectPropertyType(val)],\n ) ?? [],\n ),\n titlePropertyTypeRid: objectType.titlePropertyApiName,\n apiName: objectType.apiName,\n status: convertObjectStatus(objectType.status),\n redacted: false,\n implementsInterfaces2: implementations.map(impl => ({\n interfaceTypeApiName: impl.implements.apiName,\n linksV2: {},\n propertiesV2: {},\n properties: Object.fromEntries(\n impl.propertyMapping.map(\n mapping => [addNamespaceIfNone(mapping.interfaceProperty), {\n propertyTypeRid: mapping.mapsTo,\n }],\n ),\n ),\n })),\n allImplementsInterfaces: {},\n },\n datasources: [...propertyDatasources, objectDatasource],\n entityMetadata: { arePatchesEnabled: objectType.editsEnabled ?? false },\n };\n}\n\n/**\n * Extracts marking group names of a specific type from object properties\n */\nexport function extractMarkingGroups(\n properties: ObjectPropertyType[],\n markingType: \"CBAC\" | \"MANDATORY\",\n): string[] {\n return properties\n .map(prop => {\n if (\n typeof prop.type === \"object\"\n && prop.type.type === \"marking\"\n && prop.type.markingType === markingType\n ) {\n return prop.type.markingInputGroupName;\n }\n return undefined;\n })\n .filter((val): val is string => val !== undefined);\n}\nexport function extractPropertyDatasource(\n property: ObjectPropertyType,\n objectTypeApiName: string,\n): OntologyIrObjectTypeDatasource[] {\n if (!isExotic(property.type)) {\n return [];\n }\n const identifier = objectTypeApiName + \".\" + property.apiName;\n switch (property.type as string) {\n case \"geotimeSeries\":\n const geotimeDefinition: OntologyIrObjectTypeDatasourceDefinition = {\n type: \"geotimeSeries\",\n geotimeSeries: {\n geotimeSeriesIntegrationRid: identifier,\n properties: [property.apiName],\n },\n };\n return [buildDatasource(property.apiName, geotimeDefinition)];\n case \"mediaReference\":\n const mediaSetDefinition: OntologyIrObjectTypeDatasourceDefinition = {\n type: \"mediaSetView\",\n mediaSetView: {\n assumedMarkings: [],\n mediaSetViewLocator: identifier,\n properties: [property.apiName],\n },\n };\n return [buildDatasource(property.apiName, mediaSetDefinition)];\n default:\n return [];\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,SACEA,kBAAkB,EAClBC,eAAe,EACfC,mBAAmB,QACd,6BAA6B;AAGpC,SAASC,QAAQ,QAAQ,0CAA0C;AACnE,SAASC,2BAA2B,QAAQ,kCAAkC;AAC9E,SAASC,yBAAyB,QAAQ,gCAAgC;AAE1E,OAAO,SAASC,aAAaA,CAC3BC,UAAsB,EACW;EACjC,MAAMC,mBAAqD,GACzD,CAACD,UAAU,CAACE,UAAU,IAAI,EAAE,EACzBC,OAAO,CAACC,IAAI,IAAIC,yBAAyB,CAACD,IAAI,EAAEJ,UAAU,CAACM,OAAO,CAAC,CAAC;EAEzE,MAAMC,+BAA+B,GAAGC,oBAAoB,CAC1DR,UAAU,CAACE,UAAU,IAAI,EAAE,EAC3B,MACF,CAAC;EAED,MAAMO,qBAAqB,GAAGD,oBAAoB,CAChDR,UAAU,CAACE,UAAU,IAAI,EAAE,EAC3B,WACF,CAAC;EAED,MAAMQ,wBAAwB,GAAGH,+BAA+B,CAACI,MAAM,GAAG,CAAC,GACvEJ,+BAA+B,CAACK,M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AClC,IAAI,CAAClE,QAAQ,CAACiE,QAAQ,CAACpC,IAAI,CAAC,EAAE;IAC5B,OAAO,EAAE;EACX;EACA,MAAMsC,UAAU,GAAGD,iBAAiB,GAAG,GAAG,GAAGD,QAAQ,CAACvD,OAAO;EAC7D,QAAQuD,QAAQ,CAACpC,IAAI;IACnB,KAAK,eAAe;MAClB,MAAMuC,iBAA2D,GAAG;QAClEvC,IAAI,EAAE,eAAe;QACrBwC,aAAa,EAAE;UACbC,2BAA2B,EAAEH,UAAU;UACvC7D,UAAU,EAAE,CAAC2D,QAAQ,CAACvD,OAAO;QAC/B;MACF,CAAC;MACD,OAAO,CAACZ,eAAe,CAACmE,QAAQ,CAACvD,OAAO,EAAE0D,iBAAiB,CAAC,CAAC;IAC/D,KAAK,gBAAgB;MACnB,MAAMG,kBAA4D,GAAG;QACnE1C,IAAI,EAAE,cAAc;QACpB2C,YAAY,EAAE;UACZC,eAAe,EAAE,EAAE;UACnBC,mBAAmB,EAAEP,UAAU;UAC/B7D,UAAU,EAAE,CAAC2D,QAAQ,CAACvD,OAAO;QAC/B;MACF,CAAC;MACD,OAAO,CAACZ,eAAe,CAACmE,QAAQ,CAACvD,OAAO,EAAE6D,kBAAkB,CAAC,CAAC;IAChE;MACE,OAAO,EAAE;EACb;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"convertObject.js","names":["addNamespaceIfNone","buildDatasource","cleanAndValidateLinkTypeId","convertObjectStatus","isExotic","convertDatasourceDefinition","convertObjectPropertyType","convertObject","objectType","derivedDatasources","derivedPropertyNames","extractDerivedDatasources","propertyDatasources","properties","filter","prop","includes","apiName","flatMap","extractPropertyDatasource","classificationGroupMarkingNames","extractMarkingGroups","mandatoryMarkingNames","classificationInputGroup","length","reduce","l","r","undefined","mandatoryInputGroup","objectDatasource","implementations","implementsInterfaces","displayMetadata","description","displayName","groupDisplayName","icon","type","blueprint","locator","color","pluralDisplayName","visibility","primaryKeys","primaryKeyPropertyApiName","propertyTypes","Object","fromEntries","map","val","titlePropertyTypeRid","titlePropertyApiName","status","redacted","implementsInterfaces2","impl","interfaceTypeApiName","implements","linksV2","propertiesV2","propertyMapping","mapping","interfaceProperty","propertyTypeRid","mapsTo","allImplementsInterfaces","datasources","entityMetadata","arePatchesEnabled","editsEnabled","markingType","markingInputGroupName","property","objectTypeApiName","identifier","geotimeDefinition","geotimeSeries","geotimeSeriesIntegrationRid","mediaSetDefinition","mediaSetView","assumedMarkings","mediaSetViewLocator","inputDerivedDatasources","ds","i","buildDerivedDatasource","keys","datasource","index","linkDefinition","multiHopLink","steps","step","searchAround","linkTypeIdentifier","linkType","linkTypeSide","side","isLinkedProperties","values","derivedDefinition","linkedProperties","propertyTypeMapping","entries","sourceProp","targetProp","propertyType","aggregatedProperties","agg","buildAggregation","toString","derived","definition","limit","foreignProperty","innerDef"],"sources":["convertObject.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n OntologyIrDerivedPropertiesDefinition,\n OntologyIrDerivedPropertyAggregation,\n OntologyIrObjectTypeBlockDataV2,\n OntologyIrObjectTypeDatasource,\n OntologyIrObjectTypeDatasourceDefinition,\n OntologyIrPropertyType,\n} from \"@osdk/client.unstable\";\nimport {\n addNamespaceIfNone,\n buildDatasource,\n cleanAndValidateLinkTypeId,\n convertObjectStatus,\n} from \"../../api/defineOntology.js\";\nimport type { ObjectPropertyType } from \"../../api/object/ObjectPropertyType.js\";\nimport type { ObjectType } from \"../../api/object/ObjectType.js\";\nimport type {\n DerivedPropertyAggregation,\n ObjectTypeDatasourceDefinition_derived,\n} from \"../../api/object/ObjectTypeDatasourceDefinition.js\";\nimport { isExotic } from \"../../api/properties/PropertyTypeType.js\";\nimport { convertDatasourceDefinition } from \"./convertDatasourceDefinition.js\";\nimport { convertObjectPropertyType } from \"./convertObjectPropertyType.js\";\n\nexport function convertObject(\n objectType: ObjectType,\n): OntologyIrObjectTypeBlockDataV2 {\n const { derivedDatasources, derivedPropertyNames } =\n extractDerivedDatasources(objectType);\n\n const propertyDatasources: OntologyIrObjectTypeDatasource[] =\n (objectType.properties ?? [])\n .filter(prop => !derivedPropertyNames.includes(prop.apiName))\n .flatMap(prop => extractPropertyDatasource(prop, objectType.apiName));\n\n const classificationGroupMarkingNames = extractMarkingGroups(\n objectType.properties ?? [],\n \"CBAC\",\n );\n\n const mandatoryMarkingNames = extractMarkingGroups(\n objectType.properties ?? [],\n \"MANDATORY\",\n );\n\n const classificationInputGroup = classificationGroupMarkingNames.length > 0\n ? classificationGroupMarkingNames.reduce((l, r) => l + \"/\" + r)\n : undefined;\n\n const mandatoryInputGroup = mandatoryMarkingNames.length > 0\n ? mandatoryMarkingNames.reduce((l, r) => l + \"/\" + r)\n : undefined;\n\n const objectDatasource = buildDatasource(\n objectType.apiName,\n convertDatasourceDefinition(\n objectType,\n (objectType.properties ?? []).filter(prop =>\n !derivedPropertyNames.includes(prop.apiName)\n ),\n ),\n classificationInputGroup,\n mandatoryInputGroup,\n );\n\n const implementations = objectType.implementsInterfaces ?? [];\n\n return {\n objectType: {\n displayMetadata: {\n description: objectType.description,\n displayName: objectType.displayName,\n groupDisplayName: undefined,\n icon: {\n type: \"blueprint\",\n blueprint: objectType.icon ?? { locator: \"cube\", color: \"#2D72D2\" },\n },\n pluralDisplayName: objectType.pluralDisplayName,\n visibility: objectType.visibility ?? \"NORMAL\",\n },\n primaryKeys: [objectType.primaryKeyPropertyApiName],\n propertyTypes: Object.fromEntries(\n objectType.properties?.map<[string, OntologyIrPropertyType]>(\n val => [val.apiName, convertObjectPropertyType(val)],\n ) ?? [],\n ),\n titlePropertyTypeRid: objectType.titlePropertyApiName,\n apiName: objectType.apiName,\n status: convertObjectStatus(objectType.status),\n redacted: false,\n implementsInterfaces2: implementations.map(impl => ({\n interfaceTypeApiName: impl.implements.apiName,\n linksV2: {},\n propertiesV2: {},\n properties: Object.fromEntries(\n impl.propertyMapping.map(\n mapping => [addNamespaceIfNone(mapping.interfaceProperty), {\n propertyTypeRid: mapping.mapsTo,\n }],\n ),\n ),\n })),\n allImplementsInterfaces: {},\n },\n datasources: [\n ...propertyDatasources,\n ...derivedDatasources,\n objectDatasource,\n ],\n entityMetadata: { arePatchesEnabled: objectType.editsEnabled ?? false },\n };\n}\n\n/**\n * Extracts marking group names of a specific type from object properties\n */\nexport function extractMarkingGroups(\n properties: ObjectPropertyType[],\n markingType: \"CBAC\" | \"MANDATORY\",\n): string[] {\n return properties\n .map(prop => {\n if (\n typeof prop.type === \"object\"\n && prop.type.type === \"marking\"\n && prop.type.markingType === markingType\n ) {\n return prop.type.markingInputGroupName;\n }\n return undefined;\n })\n .filter((val): val is string => val !== undefined);\n}\nexport function extractPropertyDatasource(\n property: ObjectPropertyType,\n objectTypeApiName: string,\n): OntologyIrObjectTypeDatasource[] {\n if (!isExotic(property.type)) {\n return [];\n }\n const identifier = objectTypeApiName + \".\" + property.apiName;\n switch (property.type as string) {\n case \"geotimeSeries\":\n const geotimeDefinition: OntologyIrObjectTypeDatasourceDefinition = {\n type: \"geotimeSeries\",\n geotimeSeries: {\n geotimeSeriesIntegrationRid: identifier,\n properties: [property.apiName],\n },\n };\n return [buildDatasource(property.apiName, geotimeDefinition)];\n case \"mediaReference\":\n const mediaSetDefinition: OntologyIrObjectTypeDatasourceDefinition = {\n type: \"mediaSetView\",\n mediaSetView: {\n assumedMarkings: [],\n mediaSetViewLocator: identifier,\n properties: [property.apiName],\n },\n };\n return [buildDatasource(property.apiName, mediaSetDefinition)];\n default:\n return [];\n }\n}\n\nfunction extractDerivedDatasources(\n objectType: ObjectType,\n): {\n derivedDatasources: OntologyIrObjectTypeDatasource[];\n derivedPropertyNames: string[];\n} {\n const inputDerivedDatasources = (objectType.datasources ?? []).filter(ds =>\n ds.type === \"derived\"\n );\n const derivedDatasources = inputDerivedDatasources.map((ds, i) =>\n buildDerivedDatasource(ds, i, objectType.apiName)\n );\n const derivedPropertyNames = inputDerivedDatasources.flatMap(ds =>\n Object.keys(ds.propertyMapping)\n );\n return { derivedDatasources, derivedPropertyNames };\n}\n\nfunction buildDerivedDatasource(\n datasource: ObjectTypeDatasourceDefinition_derived,\n index: number,\n objectTypeApiName: string,\n): OntologyIrObjectTypeDatasource {\n const linkDefinition = {\n type: \"multiHopLink\",\n multiHopLink: {\n steps: datasource.linkDefinition.map(step => ({\n type: \"searchAround\",\n searchAround: {\n linkTypeIdentifier: {\n type: \"linkType\",\n linkType: cleanAndValidateLinkTypeId(step.linkType.apiName),\n },\n linkTypeSide: step.side ?? \"SOURCE\",\n },\n })),\n },\n };\n\n const isLinkedProperties =\n typeof Object.values(datasource.propertyMapping)[0] === \"string\";\n const derivedDefinition = isLinkedProperties\n ? {\n type: \"linkedProperties\",\n linkedProperties: {\n linkDefinition,\n propertyTypeMapping: Object.fromEntries(\n Object.entries(datasource.propertyMapping).map((\n [sourceProp, targetProp],\n ) => [sourceProp, {\n type: \"propertyType\",\n propertyType: targetProp,\n }]),\n ),\n },\n }\n : {\n type: \"aggregatedProperties\",\n aggregatedProperties: {\n linkDefinition,\n propertyTypeMapping: Object.fromEntries(\n Object.entries(datasource.propertyMapping).map((\n [sourceProp, agg],\n ) => [sourceProp, buildAggregation(agg)]),\n ),\n },\n };\n const fullDefinition: OntologyIrObjectTypeDatasourceDefinition = {\n type: \"derived\",\n derived: {\n definition: derivedDefinition as OntologyIrDerivedPropertiesDefinition,\n },\n };\n return buildDatasource(\n objectTypeApiName + \".derived.\" + index.toString(),\n fullDefinition,\n );\n}\n\nfunction buildAggregation(\n agg: DerivedPropertyAggregation,\n): OntologyIrDerivedPropertyAggregation {\n const type = agg.type;\n const limit = \"limit\" in agg ? agg.limit : undefined;\n const foreignProperty = \"property\" in agg ? agg.property : undefined;\n const innerDef: any = {};\n if (type !== \"count\") {\n if ([\"collectList\", \"collectSet\"].includes(type)) {\n innerDef[\"linkedProperty\"] = {\n type: \"propertyType\",\n propertyType: foreignProperty,\n };\n innerDef[\"limit\"] = limit;\n } else {\n innerDef[\"property\"] = {\n type: \"propertyType\",\n propertyType: foreignProperty,\n };\n }\n }\n return {\n type,\n [type]: innerDef,\n } as unknown as OntologyIrDerivedPropertyAggregation;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,SACEA,kBAAkB,EAClBC,eAAe,EACfC,0BAA0B,EAC1BC,mBAAmB,QACd,6BAA6B;AAOpC,SAASC,QAAQ,QAAQ,0CAA0C;AACnE,SAASC,2BAA2B,QAAQ,kCAAkC;AAC9E,SAASC,yBAAyB,QAAQ,gCAAgC;AAE1E,OAAO,SAASC,aAAaA,CAC3BC,UAAsB,EACW;EACjC,MAAM;IAAEC,kBAAkB;IAAEC;EAAqB,CAAC,GAChDC,yBAAyB,CAACH,UAAU,CAAC;EAEvC,MAAMI,mBAAqD,GACzD,CAACJ,UAAU,CAACK,UAAU,IAAI,EAAE,EACzBC,MAAM,CAACC,IAAI,IAAI,CAACL,oBAAoB,CAACM,QAAQ,CAACD,IAAI,CAACE,OAAO,CAAC,CAAC,CAC5DC,OAAO,CAACH,IAAI,IAAII,yBAAyB,CAACJ,IAAI,EAAEP,UAAU,CAACS,OAAO,CAAC,CAAC;EAEzE,MAAMG,+BAA+B,GAAGC,oBAAoB,CAC1Db,UAAU,CAACK,UAAU,IAAI,EAAE,EAC3B,MACF,CAAC;EAED,MAAMS,qBAAqB,GAAGD,oBAAoB,CAChDb,UAAU,CAACK,UAAU,IAAI,EAAE,EAC3B,WACF,CAAC;EAED,MAAMU,wBAAwB,GAAGH,+BAA+B,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E,IAAI;IACJ,CAACA,IAAI,GAAG8E;EACV,CAAC;AACH","ignoreList":[]}
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { convertConditionDefinition } from "./convertConditionDefinition.js";
|
|
18
|
-
export function convertSectionConditionalOverride(override, defaultVisibility) {
|
|
18
|
+
export function convertSectionConditionalOverride(override, defaultVisibility, actionParameters) {
|
|
19
19
|
return {
|
|
20
|
-
condition: convertConditionDefinition(override.condition),
|
|
20
|
+
condition: convertConditionDefinition(override.condition, actionParameters),
|
|
21
21
|
sectionBlockOverrides: [{
|
|
22
22
|
type: "visibility",
|
|
23
23
|
visibility: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertSectionConditionalOverride.js","names":["convertConditionDefinition","convertSectionConditionalOverride","override","defaultVisibility","condition","sectionBlockOverrides","type","visibility","hidden","visible"],"sources":["convertSectionConditionalOverride.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OntologyIrSectionConditionalOverride } from \"@osdk/client.unstable\";\nimport type { SectionConditionalOverride } from \"../../api/action/SectionConditionalOverride.js\";\nimport { convertConditionDefinition } from \"./convertConditionDefinition.js\";\n\nexport function convertSectionConditionalOverride(\n override: SectionConditionalOverride,\n defaultVisibility: \"visible\" | \"hidden\",\n): OntologyIrSectionConditionalOverride {\n return {\n condition: convertConditionDefinition(override.condition),\n sectionBlockOverrides: [\n {\n type: \"visibility\",\n visibility: {\n visibility: defaultVisibility === \"visible\"\n ? {\n type: \"hidden\",\n hidden: {},\n }\n : {\n type: \"visible\",\n visible: {},\n },\n },\n },\n ],\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;
|
|
1
|
+
{"version":3,"file":"convertSectionConditionalOverride.js","names":["convertConditionDefinition","convertSectionConditionalOverride","override","defaultVisibility","actionParameters","condition","sectionBlockOverrides","type","visibility","hidden","visible"],"sources":["convertSectionConditionalOverride.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OntologyIrSectionConditionalOverride } from \"@osdk/client.unstable\";\nimport type { ActionParameter } from \"../../api/action/ActionParameter.js\";\nimport type { SectionConditionalOverride } from \"../../api/action/SectionConditionalOverride.js\";\nimport { convertConditionDefinition } from \"./convertConditionDefinition.js\";\n\nexport function convertSectionConditionalOverride(\n override: SectionConditionalOverride,\n defaultVisibility: \"visible\" | \"hidden\",\n actionParameters?: ActionParameter[],\n): OntologyIrSectionConditionalOverride {\n return {\n condition: convertConditionDefinition(override.condition, actionParameters),\n sectionBlockOverrides: [\n {\n type: \"visibility\",\n visibility: {\n visibility: defaultVisibility === \"visible\"\n ? {\n type: \"hidden\",\n hidden: {},\n }\n : {\n type: \"visible\",\n visible: {},\n },\n },\n },\n ],\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,SAASA,0BAA0B,QAAQ,iCAAiC;AAE5E,OAAO,SAASC,iCAAiCA,CAC/CC,QAAoC,EACpCC,iBAAuC,EACvCC,gBAAoC,EACE;EACtC,OAAO;IACLC,SAAS,EAAEL,0BAA0B,CAACE,QAAQ,CAACG,SAAS,EAAED,gBAAgB,CAAC;IAC3EE,qBAAqB,EAAE,CACrB;MACEC,IAAI,EAAE,YAAY;MAClBC,UAAU,EAAE;QACVA,UAAU,EAAEL,iBAAiB,KAAK,SAAS,GACvC;UACAI,IAAI,EAAE,QAAQ;UACdE,MAAM,EAAE,CAAC;QACX,CAAC,GACC;UACAF,IAAI,EAAE,SAAS;UACfG,OAAO,EAAE,CAAC;QACZ;MACJ;IACF,CAAC;EAEL,CAAC;AACH","ignoreList":[]}
|
package/build/esm/index.js
CHANGED
|
@@ -17,10 +17,17 @@
|
|
|
17
17
|
export { default } from "./cli/main.js";
|
|
18
18
|
export { addDependency } from "./api/addDependency.js";
|
|
19
19
|
export { OntologyEntityTypeEnum } from "./api/common/OntologyEntityTypeEnum.js";
|
|
20
|
-
export { CREATE_OR_MODIFY_OBJECT_PARAMETER, defineAction,
|
|
20
|
+
export { CREATE_INTERFACE_OBJECT_PARAMETER, CREATE_OR_MODIFY_OBJECT_PARAMETER, defineAction, MODIFY_INTERFACE_OBJECT_PARAMETER, MODIFY_OBJECT_PARAMETER } from "./api/defineAction.js";
|
|
21
|
+
export { defineCreateInterfaceObjectAction } from "./api/defineCreateInterfaceObjectAction.js";
|
|
22
|
+
export { defineCreateObjectAction } from "./api/defineCreateObjectAction.js";
|
|
23
|
+
export { defineCreateOrModifyObjectAction } from "./api/defineCreateOrModifyObjectAction.js";
|
|
24
|
+
export { defineDeleteInterfaceObjectAction } from "./api/defineDeleteInterfaceObjectAction.js";
|
|
25
|
+
export { defineDeleteObjectAction } from "./api/defineDeleteObjectAction.js";
|
|
21
26
|
export { defineInterface } from "./api/defineInterface.js";
|
|
22
27
|
export { defineInterfaceLinkConstraint } from "./api/defineInterfaceLinkConstraint.js";
|
|
23
28
|
export { defineLink } from "./api/defineLink.js";
|
|
29
|
+
export { defineModifyInterfaceObjectAction } from "./api/defineModifyInterfaceObjectAction.js";
|
|
30
|
+
export { defineModifyObjectAction } from "./api/defineModifyObjectAction.js";
|
|
24
31
|
export { convertToPluralDisplayName, defineObject, uppercaseFirstLetter as convertToDisplayName } from "./api/defineObject.js";
|
|
25
32
|
export { addNamespaceIfNone, defineOntology, dumpOntologyFullMetadata } from "./api/defineOntology.js";
|
|
26
33
|
export { defineSharedPropertyType } from "./api/defineSpt.js";
|
package/build/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","addDependency","OntologyEntityTypeEnum","CREATE_OR_MODIFY_OBJECT_PARAMETER","defineAction","
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","addDependency","OntologyEntityTypeEnum","CREATE_INTERFACE_OBJECT_PARAMETER","CREATE_OR_MODIFY_OBJECT_PARAMETER","defineAction","MODIFY_INTERFACE_OBJECT_PARAMETER","MODIFY_OBJECT_PARAMETER","defineCreateInterfaceObjectAction","defineCreateObjectAction","defineCreateOrModifyObjectAction","defineDeleteInterfaceObjectAction","defineDeleteObjectAction","defineInterface","defineInterfaceLinkConstraint","defineLink","defineModifyInterfaceObjectAction","defineModifyObjectAction","convertToPluralDisplayName","defineObject","uppercaseFirstLetter","convertToDisplayName","addNamespaceIfNone","defineOntology","dumpOntologyFullMetadata","defineSharedPropertyType","defineValueType","importOntologyEntity","importSharedPropertyType","wrapWithProxy","propertyTypeTypeToOntologyIrType","convertType"],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { default as default } from \"./cli/main.js\";\n\nexport type { ActionParameterValidation } from \"./api/action/ActionParameter.js\";\nexport type {\n ActionParameterAllowedValues,\n} from \"./api/action/ActionParameterAllowedValues.js\";\nexport type { ActionParameterConditionalOverride } from \"./api/action/ActionParameterConditionalOverride.js\";\nexport type { ActionParameterConfiguration } from \"./api/action/ActionParameterConfiguration.js\";\nexport type { ActionSection } from \"./api/action/ActionSection.js\";\nexport type { ActionType } from \"./api/action/ActionType.js\";\nexport type { ConditionDefinition } from \"./api/action/ConditionDefinition.js\";\nexport type {\n CurrentTimeMappingValue,\n CurrentUserMappingValue,\n CustomMapping,\n MappingValue,\n UuidMappingValue,\n} from \"./api/action/MappingValue.js\";\nexport type { SectionConditionalOverride } from \"./api/action/SectionConditionalOverride.js\";\nexport type { SubmissionMetadata } from \"./api/action/SubmissionMetadata.js\";\nexport { addDependency } from \"./api/addDependency.js\";\nexport { OntologyEntityTypeEnum } from \"./api/common/OntologyEntityTypeEnum.js\";\nexport {\n CREATE_INTERFACE_OBJECT_PARAMETER,\n CREATE_OR_MODIFY_OBJECT_PARAMETER,\n defineAction,\n MODIFY_INTERFACE_OBJECT_PARAMETER,\n MODIFY_OBJECT_PARAMETER,\n} from \"./api/defineAction.js\";\nexport { defineCreateInterfaceObjectAction } from \"./api/defineCreateInterfaceObjectAction.js\";\nexport { defineCreateObjectAction } from \"./api/defineCreateObjectAction.js\";\nexport { defineCreateOrModifyObjectAction } from \"./api/defineCreateOrModifyObjectAction.js\";\nexport { defineDeleteInterfaceObjectAction } from \"./api/defineDeleteInterfaceObjectAction.js\";\nexport { defineDeleteObjectAction } from \"./api/defineDeleteObjectAction.js\";\nexport { defineInterface } from \"./api/defineInterface.js\";\nexport { defineInterfaceLinkConstraint } from \"./api/defineInterfaceLinkConstraint.js\";\nexport { defineLink } from \"./api/defineLink.js\";\nexport { defineModifyInterfaceObjectAction } from \"./api/defineModifyInterfaceObjectAction.js\";\nexport { defineModifyObjectAction } from \"./api/defineModifyObjectAction.js\";\nexport {\n convertToPluralDisplayName,\n defineObject,\n uppercaseFirstLetter as convertToDisplayName,\n} from \"./api/defineObject.js\";\nexport {\n addNamespaceIfNone,\n defineOntology,\n dumpOntologyFullMetadata,\n} from \"./api/defineOntology.js\";\nexport { defineSharedPropertyType } from \"./api/defineSpt.js\";\nexport { defineValueType } from \"./api/defineValueType.js\";\nexport { importOntologyEntity } from \"./api/importOntologyEntity.js\";\nexport { importSharedPropertyType } from \"./api/importSharedPropertyType.js\";\nexport type { InterfaceType } from \"./api/interface/InterfaceType.js\";\nexport type { LinkType } from \"./api/links/LinkType.js\";\nexport type { ObjectPropertyType } from \"./api/object/ObjectPropertyType.js\";\nexport type { ObjectType } from \"./api/object/ObjectType.js\";\nexport type { PropertyTypeType } from \"./api/properties/PropertyTypeType.js\";\nexport type { SharedPropertyType } from \"./api/properties/SharedPropertyType.js\";\nexport type { ValueTypeDefinitionVersion } from \"./api/values/ValueTypeDefinitionVersion.js\";\nexport { wrapWithProxy } from \"./api/wrapWithProxy.js\";\nexport { propertyTypeTypeToOntologyIrType as convertType } from \"./conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAkB,QAAQ,eAAe;AAoBlD,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,sBAAsB,QAAQ,wCAAwC;AAC/E,SACEC,iCAAiC,EACjCC,iCAAiC,EACjCC,YAAY,EACZC,iCAAiC,EACjCC,uBAAuB,QAClB,uBAAuB;AAC9B,SAASC,iCAAiC,QAAQ,4CAA4C;AAC9F,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SAASC,gCAAgC,QAAQ,2CAA2C;AAC5F,SAASC,iCAAiC,QAAQ,4CAA4C;AAC9F,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,6BAA6B,QAAQ,wCAAwC;AACtF,SAASC,UAAU,QAAQ,qBAAqB;AAChD,SAASC,iCAAiC,QAAQ,4CAA4C;AAC9F,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SACEC,0BAA0B,EAC1BC,YAAY,EACZC,oBAAoB,IAAIC,oBAAoB,QACvC,uBAAuB;AAC9B,SACEC,kBAAkB,EAClBC,cAAc,EACdC,wBAAwB,QACnB,yBAAyB;AAChC,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,oBAAoB,QAAQ,+BAA+B;AACpE,SAASC,wBAAwB,QAAQ,mCAAmC;AAQ5E,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,gCAAgC,IAAIC,WAAW,QAAQ,gEAAgE","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type DefaultFormat = "FORM" | "TABLE";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,YAAY,gBAAgB,SAAS","names":[],"sources":["../../../../src/api/action/DefaultFormat.ts"],"version":3,"file":"DefaultFormat.d.ts"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ParameterRid } from "@osdk/client.unstable";
|
|
2
|
+
export type TableConfiguration = {
|
|
3
|
+
columnWidthByParameterRid: Record<ParameterRid, number>
|
|
4
|
+
enableFileImport: boolean
|
|
5
|
+
fitHorizontally: boolean
|
|
6
|
+
frozenColumnCount: number
|
|
7
|
+
rowHeightInLines: number
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,cAAc,oBAAoB,uBAAwB;AAC1D,YAAY,qBAAqB;CAC/B,2BAA2B,OAAO;CAClC;CACA;CACA;CACA;AACD","names":[],"sources":["../../../../src/api/action/TableConfiguration.ts"],"version":3,"file":"TableConfiguration.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAsBA,cAAc,0BAA0B,iCAAkC;AAU1E,OAAO,iBAAS,mBACdA,UAAU,oBACVC,iCACAC","names":["ontology: OntologyDefinition","packageName: string | undefined","outputDir: string | undefined"],"sources":["../../../../src/api/code-snippets/createCodeSnippets.ts"],"version":3,"file":"createCodeSnippets.d.ts"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare enum interfaceSnippets {
|
|
2
|
+
loadInterfacesReference = 0,
|
|
3
|
+
loadAllInterfacesReference = 1,
|
|
4
|
+
loadOrderedInterfacesReference = 2,
|
|
5
|
+
searchInterfacesReference = 3,
|
|
6
|
+
loadInterfaceMetadataSnippet = 4,
|
|
7
|
+
subscribeToObjectSetInstructions = 5
|
|
8
|
+
}
|
|
9
|
+
export declare enum actionSnippets {
|
|
10
|
+
applyAction = 0,
|
|
11
|
+
batchApplyAction = 1
|
|
12
|
+
}
|
|
13
|
+
export declare enum objectSnippets {
|
|
14
|
+
loadSingleObjectGuide = 0,
|
|
15
|
+
loadObjectsReference = 1,
|
|
16
|
+
loadAllObjectsReference = 2,
|
|
17
|
+
loadOrderedInterfacesReference = 3,
|
|
18
|
+
searchObjectsGuide = 4,
|
|
19
|
+
aggregationTemplate = 5,
|
|
20
|
+
objectSetOperationsGuide = 6,
|
|
21
|
+
loadObjectMetadataSnippet = 7,
|
|
22
|
+
subscribeToObjectSetInstructions = 8
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,oBAAY,kBAAkB;CAC5B;CACA;CACA;CACA;CACA;CACA;AACD;AAED,oBAAY,eAAe;CACzB;CACA;AACD;AAED,oBAAY,eAAe;CACzB;CACA;CACA;CACA;CACA;CACA;CAWA;CAMA;CACA;AACD","names":[],"sources":["../../../../src/api/code-snippets/snippetTypes.ts"],"version":3,"file":"snippetTypes.d.ts"}
|
|
@@ -1,15 +1,24 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ParameterId } from "@osdk/client.unstable";
|
|
2
2
|
import type { ActionLevelValidationDefinition } from "./action/ActionLevelValidationDefinition.js";
|
|
3
|
+
import { type ActionParameter } from "./action/ActionParameter.js";
|
|
3
4
|
import type { ActionParameterConfiguration } from "./action/ActionParameterConfiguration.js";
|
|
4
5
|
import type { ActionSection } from "./action/ActionSection.js";
|
|
5
6
|
import type { ActionStatus } from "./action/ActionStatus.js";
|
|
6
7
|
import { type ActionType } from "./action/ActionType.js";
|
|
8
|
+
import type { ActionValidationRule } from "./action/ActionValidationRule.js";
|
|
9
|
+
import type { DefaultFormat } from "./action/DefaultFormat.js";
|
|
7
10
|
import type { MappingValue } from "./action/MappingValue.js";
|
|
8
11
|
import type { SubmissionMetadata } from "./action/SubmissionMetadata.js";
|
|
12
|
+
import type { TableConfiguration } from "./action/TableConfiguration.js";
|
|
9
13
|
import type { InterfaceType } from "./interface/InterfaceType.js";
|
|
14
|
+
import type { ObjectPropertyTypeUserDefinition } from "./object/ObjectPropertyTypeUserDefinition.js";
|
|
10
15
|
import type { ObjectTypeDefinition } from "./object/ObjectTypeDefinition.js";
|
|
16
|
+
import { type PropertyTypeType } from "./properties/PropertyTypeType.js";
|
|
17
|
+
import type { SharedPropertyType } from "./properties/SharedPropertyType.js";
|
|
11
18
|
export declare const MODIFY_OBJECT_PARAMETER: string;
|
|
12
19
|
export declare const CREATE_OR_MODIFY_OBJECT_PARAMETER: string;
|
|
20
|
+
export declare const CREATE_INTERFACE_OBJECT_PARAMETER: string;
|
|
21
|
+
export declare const MODIFY_INTERFACE_OBJECT_PARAMETER: string;
|
|
13
22
|
export type ActionTypeDefinition = Omit<ActionType, "__type">;
|
|
14
23
|
export type ActionTypeUserDefinition = {
|
|
15
24
|
objectType: ObjectTypeDefinition
|
|
@@ -21,9 +30,9 @@ export type ActionTypeUserDefinition = {
|
|
|
21
30
|
actionLevelValidation?: ActionLevelValidationDefinition
|
|
22
31
|
excludedProperties?: Array<ParameterId>
|
|
23
32
|
sections?: Array<ActionSection>
|
|
24
|
-
defaultFormat?:
|
|
33
|
+
defaultFormat?: DefaultFormat
|
|
25
34
|
enableLayoutSwitch?: boolean
|
|
26
|
-
|
|
35
|
+
tableConfiguration?: TableConfiguration
|
|
27
36
|
parameterOrdering?: Array<string>
|
|
28
37
|
submissionMetadata?: SubmissionMetadata
|
|
29
38
|
primaryKeyOption?: "autoGenerated" | "userInput"
|
|
@@ -31,13 +40,28 @@ export type ActionTypeUserDefinition = {
|
|
|
31
40
|
export type InterfaceActionTypeUserDefinition = {
|
|
32
41
|
interfaceType: InterfaceType
|
|
33
42
|
objectType?: ObjectTypeDefinition
|
|
34
|
-
|
|
43
|
+
apiName?: string
|
|
44
|
+
displayName?: string
|
|
45
|
+
status?: ActionStatus
|
|
46
|
+
parameterConfiguration?: Record<string, ActionParameterConfiguration>
|
|
47
|
+
nonParameterMappings?: Record<string, MappingValue>
|
|
48
|
+
actionLevelValidation?: ActionLevelValidationDefinition
|
|
35
49
|
excludedProperties?: Array<string>
|
|
50
|
+
sections?: Array<ActionSection>
|
|
51
|
+
defaultFormat?: DefaultFormat
|
|
52
|
+
enableLayoutSwitch?: boolean
|
|
53
|
+
tableConfiguration?: TableConfiguration
|
|
54
|
+
parameterOrdering?: Array<string>
|
|
55
|
+
submissionMetadata?: SubmissionMetadata
|
|
36
56
|
};
|
|
37
|
-
export declare function defineCreateInterfaceObjectAction(def: InterfaceActionTypeUserDefinition): ActionType;
|
|
38
|
-
export declare function defineCreateObjectAction(def: ActionTypeUserDefinition): ActionType;
|
|
39
|
-
export declare function defineModifyInterfaceObjectAction(def: InterfaceActionTypeUserDefinition): ActionType;
|
|
40
|
-
export declare function defineModifyObjectAction(def: ActionTypeUserDefinition): ActionType;
|
|
41
|
-
export declare function defineDeleteObjectAction(def: ActionTypeUserDefinition): ActionType;
|
|
42
|
-
export declare function defineCreateOrModifyObjectAction(def: ActionTypeUserDefinition): ActionType;
|
|
43
57
|
export declare function defineAction(actionDef: ActionTypeDefinition): ActionType;
|
|
58
|
+
export declare function isPropertyParameter(def: ActionTypeUserDefinition | InterfaceActionTypeUserDefinition, name: string, type: PropertyTypeType): boolean;
|
|
59
|
+
export declare function createParameters(def: ActionTypeUserDefinition | InterfaceActionTypeUserDefinition, propertyMap: Record<string, ObjectPropertyTypeUserDefinition> | Record<string, SharedPropertyType>, parameterSet: Set<string>, requiredMap?: Record<string, boolean>): Array<ActionParameter>;
|
|
60
|
+
export declare function kebab(s: string): string;
|
|
61
|
+
export declare function convertValidationRule(actionValidation: ActionLevelValidationDefinition, actionParameters?: ActionParameter[]): Array<ActionValidationRule>;
|
|
62
|
+
export declare function validateActionParameters(def: ActionTypeUserDefinition | InterfaceActionTypeUserDefinition, properties: Array<string>, name: string): void;
|
|
63
|
+
export declare function createDefaultParameterOrdering(def: ActionTypeUserDefinition | InterfaceActionTypeUserDefinition, properties: Array<string>, parameters: ActionParameter[], priorityId?: string): string[];
|
|
64
|
+
export declare function validateParameterOrdering(parameterOrdering: string[], parameterSet: Set<string>, actionApiName: string): void;
|
|
65
|
+
export declare function isTargetParameter(parameterId: string): boolean;
|
|
66
|
+
export declare function addNamespaceToActionDefinition(def: InterfaceActionTypeUserDefinition): void;
|
|
67
|
+
export declare function getInterfaceParameterName(def: InterfaceActionTypeUserDefinition, parameter: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,
|
|
1
|
+
{"mappings":"AAgBA,cAEE,mBACK,uBAAwB;AAG/B,cAAc,uCAAuC,6CAA8C;AACnG,cAAc,uBAAuB,6BAA8B;AAEnE,cAAc,oCAAoC,0CAA2C;AAM7F,cAAc,qBAAqB,2BAA4B;AAC/D,cAAc,oBAAoB,0BAA2B;AAC7D,cAAc,kBAAkB,wBAAyB;AACzD,cAAc,4BAA4B,kCAAmC;AAE7E,cAAc,qBAAqB,2BAA4B;AAC/D,cAAc,oBAAoB,0BAA2B;AAC7D,cAAc,0BAA0B,gCAAiC;AACzE,cAAc,0BAA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iBAAS,kBAAkBC;AAOlC,OAAO,iBAAS,+BACdC,KAAK;AAqBP,OAAO,iBAAS,0BACdA,KAAK,mCACLC","names":["MODIFY_OBJECT_PARAMETER: string","CREATE_OR_MODIFY_OBJECT_PARAMETER: string","CREATE_INTERFACE_OBJECT_PARAMETER: string","MODIFY_INTERFACE_OBJECT_PARAMETER: string","actionDef: ActionTypeDefinition","def: ActionTypeUserDefinition | InterfaceActionTypeUserDefinition","name: string","type: PropertyTypeType","propertyMap:\n | Record<string, ObjectPropertyTypeUserDefinition>\n | Record<string, SharedPropertyType>","parameterSet: Set<string>","requiredMap?: Record<string, boolean>","s: string","actionValidation: ActionLevelValidationDefinition","actionParameters?: ActionParameter[]","properties: Array<string>","parameters: ActionParameter[]","priorityId?: string","parameterOrdering: string[]","actionApiName: string","parameterId: string","def: InterfaceActionTypeUserDefinition","parameter: string"],"sources":["../../../src/api/defineAction.ts"],"version":3,"file":"defineAction.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAiBA,cAAc,kBAAkB,wBAAyB;AACzD,cAAc,yCAAyC,mBAAoB;AAgB3E,OAAO,iBAAS,kCACdA,KAAK,oCACJ","names":["def: InterfaceActionTypeUserDefinition"],"sources":["../../../src/api/defineCreateInterfaceObjectAction.ts"],"version":3,"file":"defineCreateInterfaceObjectAction.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAiBA,cAAc,kBAAkB,wBAAyB;AACzD,cAAc,gCAAgC,mBAAoB;AAalE,OAAO,iBAAS,yBACdA,KAAK,2BACJ","names":["def: ActionTypeUserDefinition"],"sources":["../../../src/api/defineCreateObjectAction.ts"],"version":3,"file":"defineCreateObjectAction.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAiBA,cAAc,kBAAkB,wBAAyB;AACzD,cAAc,gCAAgC,mBAAoB;AAalE,OAAO,iBAAS,iCACdA,KAAK,2BACJ","names":["def: ActionTypeUserDefinition"],"sources":["../../../src/api/defineCreateOrModifyObjectAction.ts"],"version":3,"file":"defineCreateOrModifyObjectAction.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,cAAc,kBAAkB,wBAAyB;AACzD,cAAc,yCAAyC,mBAAoB;AAG3E,OAAO,iBAAS,kCACdA,KAAK,oCACJ","names":["def: InterfaceActionTypeUserDefinition"],"sources":["../../../src/api/defineDeleteInterfaceObjectAction.ts"],"version":3,"file":"defineDeleteInterfaceObjectAction.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,cAAc,kBAAkB,wBAAyB;AACzD,cAAc,gCAAgC,mBAAoB;AAGlE,OAAO,iBAAS,yBACdA,KAAK,2BACJ","names":["def: ActionTypeUserDefinition"],"sources":["../../../src/api/defineDeleteObjectAction.ts"],"version":3,"file":"defineDeleteObjectAction.d.ts"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":"AAuBA,cAGE,UACA,0BAMK,qBAAsB;AAE7B,OAAO,iBAAS,WACdA,gBAAgB,qBACf","names":["linkDefinition: LinkTypeDefinition"],"sources":["../../../src/api/defineLink.ts"],"version":3,"file":"defineLink.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAiBA,cAAc,kBAAkB,wBAAyB;AACzD,cAAc,yCAAyC,mBAAoB;AAgB3E,OAAO,iBAAS,kCACdA,KAAK,oCACJ","names":["def: InterfaceActionTypeUserDefinition"],"sources":["../../../src/api/defineModifyInterfaceObjectAction.ts"],"version":3,"file":"defineModifyInterfaceObjectAction.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAiBA,cAAc,kBAAkB,wBAAyB;AACzD,cAAc,gCAAgC,mBAAoB;AAalE,OAAO,iBAAS,yBACdA,KAAK,2BACJ","names":["def: ActionTypeUserDefinition"],"sources":["../../../src/api/defineModifyObjectAction.ts"],"version":3,"file":"defineModifyObjectAction.d.ts"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":"AAoCA,cAAc,4BAA4B,kCAAmC;AAe7E,OAAO,iBAAS,aACdA,WAAW,uBACV;AA2MH,OAAO,iBAAS,qBAAqBC;AAOrC,OAAO,iBAAS,2BACdA","names":["objectDef: ObjectTypeDefinition","s: string | undefined | null"],"sources":["../../../src/api/defineObject.ts"],"version":3,"file":"defineObject.d.ts"}
|
|
@@ -4,7 +4,7 @@ import type { ActionParameterAllowedValues } from "./action/ActionParameterAllow
|
|
|
4
4
|
import type { ActionType } from "./action/ActionType.js";
|
|
5
5
|
import type { OntologyEntityType } from "./common/OntologyEntityTypeMapping.js";
|
|
6
6
|
export declare function updateOntology<T extends OntologyEntityType>(entity: T): void;
|
|
7
|
-
export declare function defineOntology(ns: string, body: () => void | Promise<void>, outputDir: string | undefined, dependencyFile?: string, randomnessKey?: string): Promise<OntologyIr>;
|
|
7
|
+
export declare function defineOntology(ns: string, body: () => void | Promise<void>, outputDir: string | undefined, dependencyFile?: string, codeSnippetFiles?: boolean, snippetPackageName?: string, snippetFileOutputDir?: string, randomnessKey?: string): Promise<OntologyIr>;
|
|
8
8
|
export declare function writeStaticObjects(outputDir: string): void;
|
|
9
9
|
export declare function buildDatasource(apiName: string, definition: OntologyIrObjectTypeDatasourceDefinition, classificationMarkingGroupName?: string, mandatoryMarkingGroupName?: string): OntologyIrObjectTypeDatasource;
|
|
10
10
|
export declare function cleanAndValidateLinkTypeId(apiName: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAEE,YACA,iCACA,kCACA,gCACA,0CAGA,8BAEA,2BAEK,uBAAwB;AAS/B,cAAc,uBAAuB,6BAA8B;AACnE,cAAc,oCAAoC,0CAA2C;AAC7F,cAAc,kBAAkB,wBAAyB;
|
|
1
|
+
{"mappings":"AAgBA,cAEE,YACA,iCACA,kCACA,gCACA,0CAGA,8BAEA,2BAEK,uBAAwB;AAS/B,cAAc,uBAAuB,6BAA8B;AACnE,cAAc,oCAAoC,0CAA2C;AAC7F,cAAc,kBAAkB,wBAAyB;AAIzD,cAAc,0BAA0B,uCAAwC;AAiBhF,OAAO,iBAAS,eACd,UAAU,oBAEVA,QAAQ;AAiBV,OAAO,iBAAe,eACpBC,YACAC,mBAAmB,eACnBC,+BACAC,yBACAC,4BACAC,6BACAC,+BACAC,yBACC,QAAQ;AA8CX,OAAO,iBAAS,mBAAmBC;AAgFnC,OAAO,iBAAS,gBACdC,iBACAC,YAAY,0CACZC,yCACAC,qCACC;AA6BH,OAAO,iBAAS,2BAA2BH;AAkB3C,OAAO,iBAAS,4BAA4B;AAI5C,OAAO,iBAAS,yBAAyB;AAIzC,OAAO,iBAAS,oBAAoBI;AAoCpC,OAAO,iBAAS,cACdC,QAAQ,aACP;AAwEH,OAAO,iBAAS,qBACdC,eAAe,+BACd;AAoGH,OAAO,iBAAS,uBACdC,WAAW,kBACV;AAgEH,OAAO,iBAAS,iBAAiBP;AAIjC,OAAO,iBAAS,iBAAiBA;AA8CjC,OAAO,iBAAS,mBAAmBA","names":["entity: T","ns: string","body: () => void | Promise<void>","outputDir: string | undefined","dependencyFile?: string","codeSnippetFiles?: boolean","snippetPackageName?: string","snippetFileOutputDir?: string","randomnessKey?: string","outputDir: string","apiName: string","definition: OntologyIrObjectTypeDatasourceDefinition","classificationMarkingGroupName?: string","mandatoryMarkingGroupName?: string","status: any","action: ActionType","allowedValues: ActionParameterAllowedValues","parameter: ActionParameter"],"sources":["../../../src/api/defineOntology.ts"],"version":3,"file":"defineOntology.d.ts"}
|
|
@@ -30,7 +30,7 @@ export interface OneToManyLinkTypeDefinition {
|
|
|
30
30
|
redacted?: boolean;
|
|
31
31
|
}
|
|
32
32
|
export interface OneToManyObjectLinkReference {
|
|
33
|
-
object: ObjectTypeDefinition;
|
|
33
|
+
object: ObjectTypeDefinition | string;
|
|
34
34
|
metadata: LinkTypeMetadata;
|
|
35
35
|
}
|
|
36
36
|
export interface OneToManyLinkTypeUserDefinition {
|
|
@@ -41,7 +41,7 @@ export interface OneToManyLinkTypeUserDefinition {
|
|
|
41
41
|
cardinality?: "OneToMany" | "OneToOne" | undefined;
|
|
42
42
|
}
|
|
43
43
|
export interface OneToManyObjectLinkReferenceUserDefinition {
|
|
44
|
-
object: ObjectTypeDefinition;
|
|
44
|
+
object: ObjectTypeDefinition | string;
|
|
45
45
|
metadata: LinkTypeMetadataUserDefinition;
|
|
46
46
|
}
|
|
47
47
|
export interface ManyToManyLinkTypeDefinition {
|
|
@@ -53,7 +53,7 @@ export interface ManyToManyLinkTypeDefinition {
|
|
|
53
53
|
redacted?: boolean;
|
|
54
54
|
}
|
|
55
55
|
export interface ManyToManyObjectLinkReference {
|
|
56
|
-
object: ObjectTypeDefinition;
|
|
56
|
+
object: ObjectTypeDefinition | string;
|
|
57
57
|
metadata: LinkTypeMetadata;
|
|
58
58
|
}
|
|
59
59
|
export interface ManyToManyLinkTypeUserDefinition {
|
|
@@ -62,7 +62,7 @@ export interface ManyToManyLinkTypeUserDefinition {
|
|
|
62
62
|
toMany: ManyToManyObjectLinkReferenceUserDefinition;
|
|
63
63
|
}
|
|
64
64
|
export interface ManyToManyObjectLinkReferenceUserDefinition {
|
|
65
|
-
object: ObjectTypeDefinition;
|
|
65
|
+
object: ObjectTypeDefinition | string;
|
|
66
66
|
metadata: LinkTypeMetadataUserDefinition;
|
|
67
67
|
}
|
|
68
68
|
export interface IntermediaryLinkTypeDefinition {
|
|
@@ -75,7 +75,7 @@ export interface IntermediaryLinkTypeDefinition {
|
|
|
75
75
|
redacted?: boolean;
|
|
76
76
|
}
|
|
77
77
|
export interface IntermediaryObjectLinkReference {
|
|
78
|
-
object: ObjectTypeDefinition;
|
|
78
|
+
object: ObjectTypeDefinition | string;
|
|
79
79
|
metadata: LinkTypeMetadata;
|
|
80
80
|
linkToIntermediary: LinkType;
|
|
81
81
|
}
|
|
@@ -83,10 +83,10 @@ export interface IntermediaryLinkTypeUserDefinition {
|
|
|
83
83
|
apiName: string;
|
|
84
84
|
many: IntermediaryObjectLinkReferenceUserDefinition;
|
|
85
85
|
toMany: IntermediaryObjectLinkReferenceUserDefinition;
|
|
86
|
-
intermediaryObjectType: ObjectTypeDefinition;
|
|
86
|
+
intermediaryObjectType: ObjectTypeDefinition | string;
|
|
87
87
|
}
|
|
88
88
|
export interface IntermediaryObjectLinkReferenceUserDefinition {
|
|
89
|
-
object: ObjectTypeDefinition;
|
|
89
|
+
object: ObjectTypeDefinition | string;
|
|
90
90
|
metadata: LinkTypeMetadataUserDefinition;
|
|
91
91
|
linkToIntermediary: LinkType;
|
|
92
92
|
}
|
|
@@ -8,7 +8,7 @@ import type { ObjectPropertyType } from "./ObjectPropertyType.js";
|
|
|
8
8
|
import type { ObjectTypeDatasourceDefinition } from "./ObjectTypeDatasourceDefinition.js";
|
|
9
9
|
import type { ObjectTypeStatus } from "./ObjectTypeStatus.js";
|
|
10
10
|
export type ObjectType = OntologyEntityBase & RequiredFields<Partial<ObjectTypeInner>, "apiName" | "primaryKeyPropertyApiName" | "displayName" | "pluralDisplayName" | "titlePropertyApiName"> & {
|
|
11
|
-
|
|
11
|
+
datasources?: Array<ObjectTypeDatasourceDefinition>
|
|
12
12
|
__type: OntologyEntityTypeEnum.OBJECT_TYPE
|
|
13
13
|
};
|
|
14
14
|
export interface ObjectTypeInner extends Omit<OntologyIrObjectType, "titlePropertyTypeRid" | "propertyTypes" | "allImplementsInterfaces" | "implementsInterfaces2" | "displayMetadata" | "primaryKeys" | "status"> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,sBAAsB,kBAAkB,uBAAwB;AAC9E,cAAc,sBAAsB,8BAA+B;AACnE,cAAc,qBAAqB,6BAA8B;AACjE,cAAc,0BAA0B,iCAAkC;AAC1E,cAAc,8BAA8B,qCAAsC;AAClF,cAAc,+BAA+B,8BAA+B;AAC5E,cAAc,0BAA0B,yBAA0B;AAClE,cAAc,sCAAsC,qCAAsC;AAC1F,cAAc,wBAAwB,uBAAwB;AAE9D,YAAY,aACR,qBACA,eACA,QAAQ,kBACN,YACA,8BACA,gBACA,sBACA,0BAEF;CACA,
|
|
1
|
+
{"mappings":"AAgBA,cAAc,sBAAsB,kBAAkB,uBAAwB;AAC9E,cAAc,sBAAsB,8BAA+B;AACnE,cAAc,qBAAqB,6BAA8B;AACjE,cAAc,0BAA0B,iCAAkC;AAC1E,cAAc,8BAA8B,qCAAsC;AAClF,cAAc,+BAA+B,8BAA+B;AAC5E,cAAc,0BAA0B,yBAA0B;AAClE,cAAc,sCAAsC,qCAAsC;AAC1F,cAAc,wBAAwB,uBAAwB;AAE9D,YAAY,aACR,qBACA,eACA,QAAQ,kBACN,YACA,8BACA,gBACA,sBACA,0BAEF;CACA,cAAc,MAAM;CACpB,QAAQ,uBAAuB;AAChC;AAEH,iBAAiB,wBACf,KACE,sBACE,yBACA,kBACA,4BACA,0BACA,oBACA,gBACA,UAEN;CACE;CACA,YAAY,MAAM;CAClB;CACA,sBAAsB,MAAM;CAC5B;CACA,MAAM;EAAE,SAAS;EAAe;CAAe;CAC/C;CACA;CACA,YAAY;CACZ;CACA,SAAS;AACV","names":[],"sources":["../../../../src/api/object/ObjectType.ts"],"version":3,"file":"ObjectType.d.ts"}
|