@osdk/maker 0.14.0-beta.6 → 0.14.0-beta.7
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 +11 -0
- package/README.md +86 -22
- package/build/browser/api/defineCreateObjectAction.js +3 -1
- package/build/browser/api/defineCreateObjectAction.js.map +1 -1
- package/build/browser/api/defineCreateOrModifyObjectAction.js +2 -1
- package/build/browser/api/defineCreateOrModifyObjectAction.js.map +1 -1
- package/build/browser/api/defineDeleteInterfaceObjectAction.js +53 -0
- package/build/browser/api/defineDeleteInterfaceObjectAction.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/defineObject.js +94 -3
- package/build/browser/api/defineObject.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 +788 -2
- package/build/browser/api/test/actions.test.js.map +1 -1
- package/build/browser/api/test/objects.test.js +1109 -12
- package/build/browser/api/test/objects.test.js.map +1 -1
- package/build/browser/cli/main.js +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/index.js +1 -0
- package/build/browser/index.js.map +1 -1
- package/build/cjs/index.cjs +442 -194
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +139 -99
- package/build/esm/api/defineCreateObjectAction.js +3 -1
- package/build/esm/api/defineCreateObjectAction.js.map +1 -1
- package/build/esm/api/defineCreateOrModifyObjectAction.js +2 -1
- package/build/esm/api/defineCreateOrModifyObjectAction.js.map +1 -1
- package/build/esm/api/defineDeleteInterfaceObjectAction.js +53 -0
- package/build/esm/api/defineDeleteInterfaceObjectAction.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/defineObject.js +94 -3
- package/build/esm/api/defineObject.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 +788 -2
- package/build/esm/api/test/actions.test.js.map +1 -1
- package/build/esm/api/test/objects.test.js +1109 -12
- package/build/esm/api/test/objects.test.js.map +1 -1
- package/build/esm/cli/main.js +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/index.js +1 -0
- package/build/esm/index.js.map +1 -1
- package/build/types/api/defineCreateObjectAction.d.ts.map +1 -1
- package/build/types/api/defineDeleteInterfaceObjectAction.d.ts +3 -0
- package/build/types/api/defineDeleteInterfaceObjectAction.d.ts.map +1 -0
- package/build/types/api/defineLink.d.ts.map +1 -1
- package/build/types/api/defineObject.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/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/index.d.ts +1 -0
- package/build/types/index.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -14,72 +14,99 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import
|
|
17
|
+
import invariant from "tiny-invariant";
|
|
18
|
+
import { OntologyEntityTypeEnum } from "../../api/common/OntologyEntityTypeEnum.js";
|
|
19
|
+
import { cleanAndValidateLinkTypeId, ontologyDefinition } from "../../api/defineOntology.js";
|
|
18
20
|
import { convertCardinality } from "./convertCardinality.js";
|
|
19
21
|
export function convertLink(linkType) {
|
|
22
|
+
validateLink(linkType);
|
|
20
23
|
let definition;
|
|
21
24
|
let datasource = undefined;
|
|
22
25
|
if ("one" in linkType) {
|
|
26
|
+
const {
|
|
27
|
+
apiName: oneObjectApiName,
|
|
28
|
+
object: oneObject
|
|
29
|
+
} = getObject(linkType.one.object);
|
|
30
|
+
const {
|
|
31
|
+
apiName: toManyObjectApiName,
|
|
32
|
+
object: toManyObject
|
|
33
|
+
} = getObject(linkType.toMany.object);
|
|
23
34
|
definition = {
|
|
24
35
|
type: "oneToMany",
|
|
25
36
|
oneToMany: {
|
|
26
37
|
cardinalityHint: convertCardinality(linkType.cardinality),
|
|
27
38
|
manyToOneLinkMetadata: linkType.toMany.metadata,
|
|
28
|
-
objectTypeRidManySide:
|
|
29
|
-
objectTypeRidOneSide:
|
|
39
|
+
objectTypeRidManySide: toManyObjectApiName,
|
|
40
|
+
objectTypeRidOneSide: oneObjectApiName,
|
|
30
41
|
oneToManyLinkMetadata: linkType.one.metadata,
|
|
31
42
|
oneSidePrimaryKeyToManySidePropertyMapping: [{
|
|
32
43
|
from: {
|
|
33
|
-
apiName:
|
|
34
|
-
object:
|
|
44
|
+
apiName: oneObject.primaryKeyPropertyApiName,
|
|
45
|
+
object: oneObjectApiName
|
|
35
46
|
},
|
|
36
47
|
to: {
|
|
37
48
|
apiName: linkType.manyForeignKeyProperty,
|
|
38
|
-
object:
|
|
49
|
+
object: toManyObjectApiName
|
|
39
50
|
}
|
|
40
51
|
}]
|
|
41
52
|
}
|
|
42
53
|
};
|
|
43
54
|
} else if ("intermediaryObjectType" in linkType) {
|
|
55
|
+
const {
|
|
56
|
+
apiName: manyObjectApiName,
|
|
57
|
+
object: manyObject
|
|
58
|
+
} = getObject(linkType.many.object);
|
|
59
|
+
const {
|
|
60
|
+
apiName: toManyObjectApiName,
|
|
61
|
+
object: toManyObject
|
|
62
|
+
} = getObject(linkType.toMany.object);
|
|
44
63
|
definition = {
|
|
45
64
|
type: "intermediary",
|
|
46
65
|
intermediary: {
|
|
47
66
|
objectTypeAToBLinkMetadata: linkType.many.metadata,
|
|
48
67
|
objectTypeBToALinkMetadata: linkType.toMany.metadata,
|
|
49
|
-
objectTypeRidA:
|
|
50
|
-
objectTypeRidB:
|
|
68
|
+
objectTypeRidA: manyObjectApiName,
|
|
69
|
+
objectTypeRidB: toManyObjectApiName,
|
|
51
70
|
intermediaryObjectTypeRid: linkType.intermediaryObjectType.apiName,
|
|
52
71
|
aToIntermediaryLinkTypeRid: cleanAndValidateLinkTypeId(linkType.many.linkToIntermediary.apiName),
|
|
53
72
|
intermediaryToBLinkTypeRid: cleanAndValidateLinkTypeId(linkType.toMany.linkToIntermediary.apiName)
|
|
54
73
|
}
|
|
55
74
|
};
|
|
56
75
|
} else {
|
|
76
|
+
const {
|
|
77
|
+
apiName: manyObjectApiName,
|
|
78
|
+
object: manyObject
|
|
79
|
+
} = getObject(linkType.many.object);
|
|
80
|
+
const {
|
|
81
|
+
apiName: toManyObjectApiName,
|
|
82
|
+
object: toManyObject
|
|
83
|
+
} = getObject(linkType.toMany.object);
|
|
57
84
|
definition = {
|
|
58
85
|
type: "manyToMany",
|
|
59
86
|
manyToMany: {
|
|
60
87
|
objectTypeAToBLinkMetadata: linkType.many.metadata,
|
|
61
88
|
objectTypeBToALinkMetadata: linkType.toMany.metadata,
|
|
62
|
-
objectTypeRidA:
|
|
63
|
-
objectTypeRidB:
|
|
89
|
+
objectTypeRidA: manyObjectApiName,
|
|
90
|
+
objectTypeRidB: toManyObjectApiName,
|
|
64
91
|
peeringMetadata: undefined,
|
|
65
92
|
objectTypeAPrimaryKeyPropertyMapping: [{
|
|
66
93
|
from: {
|
|
67
|
-
apiName:
|
|
68
|
-
object:
|
|
94
|
+
apiName: manyObject.primaryKeyPropertyApiName,
|
|
95
|
+
object: manyObjectApiName
|
|
69
96
|
},
|
|
70
97
|
to: {
|
|
71
|
-
apiName:
|
|
72
|
-
object:
|
|
98
|
+
apiName: manyObject.primaryKeyPropertyApiName,
|
|
99
|
+
object: manyObjectApiName
|
|
73
100
|
}
|
|
74
101
|
}],
|
|
75
102
|
objectTypeBPrimaryKeyPropertyMapping: [{
|
|
76
103
|
from: {
|
|
77
|
-
apiName:
|
|
78
|
-
object:
|
|
104
|
+
apiName: toManyObject.primaryKeyPropertyApiName,
|
|
105
|
+
object: toManyObjectApiName
|
|
79
106
|
},
|
|
80
107
|
to: {
|
|
81
|
-
apiName:
|
|
82
|
-
object:
|
|
108
|
+
apiName: toManyObject.primaryKeyPropertyApiName,
|
|
109
|
+
object: toManyObjectApiName
|
|
83
110
|
}
|
|
84
111
|
}]
|
|
85
112
|
}
|
|
@@ -93,17 +120,17 @@ export function convertLink(linkType) {
|
|
|
93
120
|
writebackDatasetRid: undefined,
|
|
94
121
|
objectTypeAPrimaryKeyMapping: [{
|
|
95
122
|
property: {
|
|
96
|
-
apiName:
|
|
97
|
-
object:
|
|
123
|
+
apiName: manyObject.primaryKeyPropertyApiName,
|
|
124
|
+
object: manyObjectApiName
|
|
98
125
|
},
|
|
99
|
-
column:
|
|
126
|
+
column: manyObject.primaryKeyPropertyApiName
|
|
100
127
|
}],
|
|
101
128
|
objectTypeBPrimaryKeyMapping: [{
|
|
102
129
|
property: {
|
|
103
|
-
apiName:
|
|
104
|
-
object:
|
|
130
|
+
apiName: toManyObject.primaryKeyPropertyApiName,
|
|
131
|
+
object: toManyObjectApiName
|
|
105
132
|
},
|
|
106
|
-
column:
|
|
133
|
+
column: toManyObject.primaryKeyPropertyApiName
|
|
107
134
|
}]
|
|
108
135
|
}
|
|
109
136
|
},
|
|
@@ -129,4 +156,62 @@ export function convertLink(linkType) {
|
|
|
129
156
|
}
|
|
130
157
|
};
|
|
131
158
|
}
|
|
159
|
+
function validateLink(linkDefinition) {
|
|
160
|
+
if ("one" in linkDefinition) {
|
|
161
|
+
const {
|
|
162
|
+
apiName: oneObjectApiName,
|
|
163
|
+
object: oneObject
|
|
164
|
+
} = getObject(linkDefinition.one.object);
|
|
165
|
+
const {
|
|
166
|
+
apiName: toManyObjectApiName,
|
|
167
|
+
object: toManyObject
|
|
168
|
+
} = getObject(linkDefinition.toMany.object);
|
|
169
|
+
const foreignKey = toManyObject.properties?.find(p => p.apiName === linkDefinition.manyForeignKeyProperty);
|
|
170
|
+
!(foreignKey !== undefined) ? process.env.NODE_ENV !== "production" ? invariant(false, `Foreign key ${linkDefinition.manyForeignKeyProperty} on link ${linkDefinition.apiName} does not exist on object ${toManyObjectApiName}`) : invariant(false) : void 0;
|
|
171
|
+
!/([a-z][a-z0-9\\-]*)/.test(linkDefinition.apiName) ? process.env.NODE_ENV !== "production" ? invariant(false, `Top level link api names are expected to match the regex pattern ([a-z][a-z0-9\\-]*) ${linkDefinition.apiName} does not match`) : invariant(false) : void 0;
|
|
172
|
+
const typesMatch = foreignKey.type === oneObject.properties?.find(p => p.apiName === oneObject.primaryKeyPropertyApiName)?.type;
|
|
173
|
+
!typesMatch ? process.env.NODE_ENV !== "production" ? invariant(false, `Link ${linkDefinition.apiName} has type mismatch between the one side's primary key and the foreign key on the many side`) : invariant(false) : void 0;
|
|
174
|
+
}
|
|
175
|
+
if ("intermediaryObjectType" in linkDefinition) {
|
|
176
|
+
const {
|
|
177
|
+
apiName: intermediaryObjectTypeApiName,
|
|
178
|
+
object: intermediaryObjectType
|
|
179
|
+
} = getObject(linkDefinition.intermediaryObjectType);
|
|
180
|
+
const {
|
|
181
|
+
apiName: manyObjectApiName,
|
|
182
|
+
object: manyObject
|
|
183
|
+
} = getObject(linkDefinition.many.object);
|
|
184
|
+
const {
|
|
185
|
+
apiName: toManyObjectApiName,
|
|
186
|
+
object: toManyObject
|
|
187
|
+
} = getObject(linkDefinition.toMany.object);
|
|
188
|
+
const {
|
|
189
|
+
apiName: manyIntermediaryOneObjectApiName,
|
|
190
|
+
object: manyIntermediaryOneObject
|
|
191
|
+
} = getObject(linkDefinition.many.linkToIntermediary.one.object);
|
|
192
|
+
const {
|
|
193
|
+
apiName: manyIntermediaryToManyObjectApiName,
|
|
194
|
+
object: manyIntermediaryToManyObject
|
|
195
|
+
} = getObject(linkDefinition.many.linkToIntermediary.toMany.object);
|
|
196
|
+
!("one" in linkDefinition.many.linkToIntermediary && manyIntermediaryOneObjectApiName === manyObject.apiName && manyIntermediaryToManyObjectApiName === intermediaryObjectTypeApiName) ? process.env.NODE_ENV !== "production" ? invariant(false, `LinkTypeA ${linkDefinition.many.linkToIntermediary.apiName} must be a many to one link from intermediary object ${intermediaryObjectTypeApiName} to objectA ${manyObjectApiName}`) : invariant(false) : void 0;
|
|
197
|
+
const {
|
|
198
|
+
apiName: toManyIntermediaryOneObjectApiName,
|
|
199
|
+
object: toManyIntermediaryOneObject
|
|
200
|
+
} = getObject(linkDefinition.toMany.linkToIntermediary.one.object);
|
|
201
|
+
const {
|
|
202
|
+
apiName: toManyIntermediaryToManyObjectApiName,
|
|
203
|
+
object: toManyIntermediaryToManyObject
|
|
204
|
+
} = getObject(linkDefinition.toMany.linkToIntermediary.toMany.object);
|
|
205
|
+
!("one" in linkDefinition.toMany.linkToIntermediary && toManyIntermediaryOneObjectApiName === toManyObjectApiName && toManyIntermediaryToManyObjectApiName === intermediaryObjectTypeApiName) ? process.env.NODE_ENV !== "production" ? invariant(false, `LinkTypeB ${linkDefinition.toMany.linkToIntermediary.apiName} must be a many to one link from intermediary object ${intermediaryObjectTypeApiName} to objectB ${toManyObjectApiName}`) : invariant(false) : void 0;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
export function getObject(object) {
|
|
209
|
+
const objectApiName = typeof object === "string" ? object : object.apiName;
|
|
210
|
+
const fullObject = ontologyDefinition[OntologyEntityTypeEnum.OBJECT_TYPE][objectApiName];
|
|
211
|
+
!(fullObject !== undefined) ? process.env.NODE_ENV !== "production" ? invariant(false, `Object ${objectApiName} is not defined`) : invariant(false) : void 0;
|
|
212
|
+
return {
|
|
213
|
+
apiName: objectApiName,
|
|
214
|
+
object: fullObject
|
|
215
|
+
};
|
|
216
|
+
}
|
|
132
217
|
//# sourceMappingURL=convertLink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertLink.js","names":["cleanAndValidateLinkTypeId","convertCardinality","convertLink","linkType","definition","datasource","undefined","type","oneToMany","cardinalityHint","cardinality","manyToOneLinkMetadata","toMany","metadata","objectTypeRidManySide","object","apiName","objectTypeRidOneSide","one","oneToManyLinkMetadata","oneSidePrimaryKeyToManySidePropertyMapping","from","primaryKeyPropertyApiName","to","manyForeignKeyProperty","intermediary","objectTypeAToBLinkMetadata","many","objectTypeBToALinkMetadata","objectTypeRidA","objectTypeRidB","intermediaryObjectTypeRid","intermediaryObjectType","aToIntermediaryLinkTypeRid","linkToIntermediary","intermediaryToBLinkTypeRid","manyToMany","peeringMetadata","objectTypeAPrimaryKeyPropertyMapping","objectTypeBPrimaryKeyPropertyMapping","datasourceName","dataset","datasetRid","concat","writebackDatasetRid","objectTypeAPrimaryKeyMapping","property","column","objectTypeBPrimaryKeyMapping","editsConfiguration","onlyAllowPrivilegedEdits","redacted","id","status","active","datasources","entityMetadata","arePatchesEnabled","editsEnabled"],"sources":["convertLink.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 OntologyIrLinkDefinition,\n OntologyIrLinkTypeBlockDataV2,\n OntologyIrManyToManyLinkTypeDatasource,\n} from \"@osdk/client.unstable\";\nimport { cleanAndValidateLinkTypeId } from \"../../api/defineOntology.js\";\nimport type { LinkType } from \"../../api/links/LinkType.js\";\nimport { convertCardinality } from \"./convertCardinality.js\";\n\nexport function convertLink(\n linkType: LinkType,\n): OntologyIrLinkTypeBlockDataV2 {\n let definition: OntologyIrLinkDefinition;\n let datasource: OntologyIrManyToManyLinkTypeDatasource | undefined =\n undefined;\n if (\"one\" in linkType) {\n definition = {\n type: \"oneToMany\",\n oneToMany: {\n cardinalityHint: convertCardinality(linkType.cardinality),\n manyToOneLinkMetadata: linkType.toMany.metadata,\n objectTypeRidManySide: linkType.toMany.object.apiName,\n objectTypeRidOneSide: linkType.one.object.apiName,\n oneToManyLinkMetadata: linkType.one.metadata,\n oneSidePrimaryKeyToManySidePropertyMapping: [{\n from: {\n apiName: linkType.one.object.primaryKeyPropertyApiName,\n object: linkType.one.object.apiName,\n },\n to: {\n apiName: linkType.manyForeignKeyProperty,\n object: linkType.toMany.object.apiName,\n },\n }],\n },\n };\n } else if (\"intermediaryObjectType\" in linkType) {\n definition = {\n type: \"intermediary\",\n intermediary: {\n objectTypeAToBLinkMetadata: linkType.many.metadata,\n objectTypeBToALinkMetadata: linkType.toMany.metadata,\n objectTypeRidA: linkType.many.object.apiName,\n objectTypeRidB: linkType.toMany.object.apiName,\n intermediaryObjectTypeRid: linkType.intermediaryObjectType.apiName,\n aToIntermediaryLinkTypeRid: cleanAndValidateLinkTypeId(\n linkType.many.linkToIntermediary.apiName,\n ),\n intermediaryToBLinkTypeRid: cleanAndValidateLinkTypeId(\n linkType.toMany.linkToIntermediary.apiName,\n ),\n },\n };\n } else {\n definition = {\n type: \"manyToMany\",\n manyToMany: {\n objectTypeAToBLinkMetadata: linkType.many.metadata,\n objectTypeBToALinkMetadata: linkType.toMany.metadata,\n objectTypeRidA: linkType.many.object.apiName,\n objectTypeRidB: linkType.toMany.object.apiName,\n peeringMetadata: undefined,\n objectTypeAPrimaryKeyPropertyMapping: [{\n from: {\n apiName: linkType.many.object.primaryKeyPropertyApiName,\n object: linkType.many.object.apiName,\n },\n to: {\n apiName: linkType.many.object.primaryKeyPropertyApiName,\n object: linkType.many.object.apiName,\n },\n }],\n objectTypeBPrimaryKeyPropertyMapping: [{\n from: {\n apiName: linkType.toMany.object.primaryKeyPropertyApiName,\n object: linkType.toMany.object.apiName,\n },\n to: {\n apiName: linkType.toMany.object.primaryKeyPropertyApiName,\n object: linkType.toMany.object.apiName,\n },\n }],\n },\n };\n\n datasource = {\n datasourceName: linkType.apiName,\n datasource: {\n type: \"dataset\",\n dataset: {\n datasetRid: \"link-\".concat(linkType.apiName),\n writebackDatasetRid: undefined,\n objectTypeAPrimaryKeyMapping: [{\n property: {\n apiName: linkType.many.object.primaryKeyPropertyApiName,\n object: linkType.many.object.apiName,\n },\n column: linkType.many.object.primaryKeyPropertyApiName,\n }],\n objectTypeBPrimaryKeyMapping: [{\n property: {\n apiName: linkType.toMany.object.primaryKeyPropertyApiName,\n object: linkType.toMany.object.apiName,\n },\n column: linkType.toMany.object.primaryKeyPropertyApiName,\n }],\n },\n },\n editsConfiguration: {\n onlyAllowPrivilegedEdits: false,\n },\n redacted: linkType.redacted,\n };\n }\n\n return {\n linkType: {\n definition: definition,\n id: cleanAndValidateLinkTypeId(linkType.apiName),\n status: linkType.status ?? { type: \"active\", active: {} },\n redacted: linkType.redacted ?? false,\n },\n datasources: datasource !== undefined ? [datasource] : [],\n entityMetadata: {\n arePatchesEnabled: linkType.editsEnabled ?? false,\n },\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,SAASA,0BAA0B,QAAQ,6BAA6B;AAExE,SAASC,kBAAkB,QAAQ,yBAAyB;AAE5D,OAAO,SAASC,WAAWA,CACzBC,QAAkB,EACa;EAC/B,IAAIC,UAAoC;EACxC,IAAIC,UAA8D,GAChEC,SAAS;EACX,IAAI,KAAK,IAAIH,QAAQ,EAAE;IACrBC,UAAU,GAAG;MACXG,IAAI,EAAE,WAAW;MACjBC,SAAS,EAAE;QACTC,eAAe,EAAER,kBAAkB,CAACE,QAAQ,CAACO,WAAW,CAAC;QACzDC,qBAAqB,EAAER,QAAQ,CAACS,MAAM,CAACC,QAAQ;QAC/CC,qBAAqB,EAAEX,QAAQ,CAACS,MAAM,CAACG,MAAM,CAACC,OAAO;QACrDC,oBAAoB,EAAEd,QAAQ,CAACe,GAAG,CAACH,MAAM,CAACC,OAAO;QACjDG,qBAAqB,EAAEhB,QAAQ,CAACe,GAAG,CAACL,QAAQ;QAC5CO,0CAA0C,EAAE,CAAC;UAC3CC,IAAI,EAAE;YACJL,OAAO,EAAEb,QAAQ,CAACe,GAAG,CAACH,MAAM,CAACO,yBAAyB;YACtDP,MAAM,EAAEZ,QAAQ,CAACe,GAAG,CAACH,MAAM,CAACC;UAC9B,CAAC;UACDO,EAAE,EAAE;YACFP,OAAO,EAAEb,QAAQ,CAACqB,sBAAsB;YACxCT,MAAM,EAAEZ,QAAQ,CAACS,MAAM,CAACG,MAAM,CAACC;UACjC;QACF,CAAC;MACH;IACF,CAAC;EACH,CAAC,MAAM,IAAI,wBAAwB,IAAIb,QAAQ,EAAE;IAC/CC,UAAU,GAAG;MACXG,I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AAQ,EAAEhD,QAAQ,CAACgD;IACrB,CAAC;EACH;EAEA,OAAO;IACLhD,QAAQ,EAAE;MACRC,UAAU,EAAEA,UAAU;MACtBgD,EAAE,EAAEpD,0BAA0B,CAACG,QAAQ,CAACa,OAAO,CAAC;MAChDqC,MAAM,EAAElD,QAAQ,CAACkD,MAAM,IAAI;QAAE9C,IAAI,EAAE,QAAQ;QAAE+C,MAAM,EAAE,CAAC;MAAE,CAAC;MACzDH,QAAQ,EAAEhD,QAAQ,CAACgD,QAAQ,IAAI;IACjC,CAAC;IACDI,WAAW,EAAElD,UAAU,KAAKC,SAAS,GAAG,CAACD,UAAU,CAAC,GAAG,EAAE;IACzDmD,cAAc,EAAE;MACdC,iBAAiB,EAAEtD,QAAQ,CAACuD,YAAY,IAAI;IAC9C;EACF,CAAC;AACH","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"convertLink.js","names":["invariant","OntologyEntityTypeEnum","cleanAndValidateLinkTypeId","ontologyDefinition","convertCardinality","convertLink","linkType","validateLink","definition","datasource","undefined","apiName","oneObjectApiName","object","oneObject","getObject","one","toManyObjectApiName","toManyObject","toMany","type","oneToMany","cardinalityHint","cardinality","manyToOneLinkMetadata","metadata","objectTypeRidManySide","objectTypeRidOneSide","oneToManyLinkMetadata","oneSidePrimaryKeyToManySidePropertyMapping","from","primaryKeyPropertyApiName","to","manyForeignKeyProperty","manyObjectApiName","manyObject","many","intermediary","objectTypeAToBLinkMetadata","objectTypeBToALinkMetadata","objectTypeRidA","objectTypeRidB","intermediaryObjectTypeRid","intermediaryObjectType","aToIntermediaryLinkTypeRid","linkToIntermediary","intermediaryToBLinkTypeRid","manyToMany","peeringMetadata","objectTypeAPrimaryKeyPropertyMapping","objectTypeBPrimaryKeyPropertyMapping","datasourceName","dataset","datasetRid","concat","writebackDatasetRid","objectTypeAPrimaryKeyMapping","property","column","objectTypeBPrimaryKeyMapping","editsConfiguration","onlyAllowPrivilegedEdits","redacted","id","status","active","datasources","entityMetadata","arePatchesEnabled","editsEnabled","linkDefinition","foreignKey","properties","find","p","process","env","NODE_ENV","test","typesMatch","intermediaryObjectTypeApiName","manyIntermediaryOneObjectApiName","manyIntermediaryOneObject","manyIntermediaryToManyObjectApiName","manyIntermediaryToManyObject","toManyIntermediaryOneObjectApiName","toManyIntermediaryOneObject","toManyIntermediaryToManyObjectApiName","toManyIntermediaryToManyObject","objectApiName","fullObject","OBJECT_TYPE"],"sources":["convertLink.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 OntologyIrLinkDefinition,\n OntologyIrLinkTypeBlockDataV2,\n OntologyIrManyToManyLinkTypeDatasource,\n} from \"@osdk/client.unstable\";\nimport invariant from \"tiny-invariant\";\nimport { OntologyEntityTypeEnum } from \"../../api/common/OntologyEntityTypeEnum.js\";\nimport {\n cleanAndValidateLinkTypeId,\n ontologyDefinition,\n} from \"../../api/defineOntology.js\";\nimport type { LinkType } from \"../../api/links/LinkType.js\";\nimport type { ObjectType } from \"../../api/object/ObjectType.js\";\nimport type { ObjectTypeDefinition } from \"../../api/object/ObjectTypeDefinition.js\";\nimport { convertCardinality } from \"./convertCardinality.js\";\n\nexport function convertLink(\n linkType: LinkType,\n): OntologyIrLinkTypeBlockDataV2 {\n validateLink(linkType);\n let definition: OntologyIrLinkDefinition;\n let datasource: OntologyIrManyToManyLinkTypeDatasource | undefined =\n undefined;\n if (\"one\" in linkType) {\n const { apiName: oneObjectApiName, object: oneObject } = getObject(\n linkType.one.object,\n );\n const { apiName: toManyObjectApiName, object: toManyObject } = getObject(\n linkType.toMany.object,\n );\n definition = {\n type: \"oneToMany\",\n oneToMany: {\n cardinalityHint: convertCardinality(linkType.cardinality),\n manyToOneLinkMetadata: linkType.toMany.metadata,\n objectTypeRidManySide: toManyObjectApiName,\n objectTypeRidOneSide: oneObjectApiName,\n oneToManyLinkMetadata: linkType.one.metadata,\n oneSidePrimaryKeyToManySidePropertyMapping: [{\n from: {\n apiName: oneObject.primaryKeyPropertyApiName,\n object: oneObjectApiName,\n },\n to: {\n apiName: linkType.manyForeignKeyProperty,\n object: toManyObjectApiName,\n },\n }],\n },\n };\n } else if (\"intermediaryObjectType\" in linkType) {\n const { apiName: manyObjectApiName, object: manyObject } = getObject(\n linkType.many.object,\n );\n const { apiName: toManyObjectApiName, object: toManyObject } = getObject(\n linkType.toMany.object,\n );\n definition = {\n type: \"intermediary\",\n intermediary: {\n objectTypeAToBLinkMetadata: linkType.many.metadata,\n objectTypeBToALinkMetadata: linkType.toMany.metadata,\n objectTypeRidA: manyObjectApiName,\n objectTypeRidB: toManyObjectApiName,\n intermediaryObjectTypeRid: linkType.intermediaryObjectType.apiName,\n aToIntermediaryLinkTypeRid: cleanAndValidateLinkTypeId(\n linkType.many.linkToIntermediary.apiName,\n ),\n intermediaryToBLinkTypeRid: cleanAndValidateLinkTypeId(\n linkType.toMany.linkToIntermediary.apiName,\n ),\n },\n };\n } else {\n const { apiName: manyObjectApiName, object: manyObject } = getObject(\n linkType.many.object,\n );\n const { apiName: toManyObjectApiName, object: toManyObject } = getObject(\n linkType.toMany.object,\n );\n definition = {\n type: \"manyToMany\",\n manyToMany: {\n objectTypeAToBLinkMetadata: linkType.many.metadata,\n objectTypeBToALinkMetadata: linkType.toMany.metadata,\n objectTypeRidA: manyObjectApiName,\n objectTypeRidB: toManyObjectApiName,\n peeringMetadata: undefined,\n objectTypeAPrimaryKeyPropertyMapping: [{\n from: {\n apiName: manyObject.primaryKeyPropertyApiName,\n object: manyObjectApiName,\n },\n to: {\n apiName: manyObject.primaryKeyPropertyApiName,\n object: manyObjectApiName,\n },\n }],\n objectTypeBPrimaryKeyPropertyMapping: [{\n from: {\n apiName: toManyObject.primaryKeyPropertyApiName,\n object: toManyObjectApiName,\n },\n to: {\n apiName: toManyObject.primaryKeyPropertyApiName,\n object: toManyObjectApiName,\n },\n }],\n },\n };\n\n datasource = {\n datasourceName: linkType.apiName,\n datasource: {\n type: \"dataset\",\n dataset: {\n datasetRid: \"link-\".concat(linkType.apiName),\n writebackDatasetRid: undefined,\n objectTypeAPrimaryKeyMapping: [{\n property: {\n apiName: manyObject.primaryKeyPropertyApiName,\n object: manyObjectApiName,\n },\n column: manyObject.primaryKeyPropertyApiName,\n }],\n objectTypeBPrimaryKeyMapping: [{\n property: {\n apiName: toManyObject.primaryKeyPropertyApiName,\n object: toManyObjectApiName,\n },\n column: toManyObject.primaryKeyPropertyApiName,\n }],\n },\n },\n editsConfiguration: {\n onlyAllowPrivilegedEdits: false,\n },\n redacted: linkType.redacted,\n };\n }\n\n return {\n linkType: {\n definition: definition,\n id: cleanAndValidateLinkTypeId(linkType.apiName),\n status: linkType.status ?? { type: \"active\", active: {} },\n redacted: linkType.redacted ?? false,\n },\n datasources: datasource !== undefined ? [datasource] : [],\n entityMetadata: {\n arePatchesEnabled: linkType.editsEnabled ?? false,\n },\n };\n}\nfunction validateLink(linkDefinition: LinkType) {\n if (\"one\" in linkDefinition) {\n const { apiName: oneObjectApiName, object: oneObject } = getObject(\n linkDefinition.one.object,\n );\n const { apiName: toManyObjectApiName, object: toManyObject } = getObject(\n linkDefinition.toMany.object,\n );\n const foreignKey = toManyObject.properties?.find(p =>\n p.apiName === linkDefinition.manyForeignKeyProperty\n );\n invariant(\n foreignKey !== undefined,\n `Foreign key ${linkDefinition.manyForeignKeyProperty} on link ${linkDefinition.apiName} does not exist on object ${toManyObjectApiName}`,\n );\n\n invariant(\n /([a-z][a-z0-9\\\\-]*)/.test(linkDefinition.apiName),\n `Top level link api names are expected to match the regex pattern ([a-z][a-z0-9\\\\-]*) ${linkDefinition.apiName} does not match`,\n );\n\n const typesMatch = foreignKey.type\n === oneObject.properties?.find(p =>\n p.apiName === oneObject.primaryKeyPropertyApiName\n )?.type;\n invariant(\n typesMatch,\n `Link ${linkDefinition.apiName} has type mismatch between the one side's primary key and the foreign key on the many side`,\n );\n }\n if (\"intermediaryObjectType\" in linkDefinition) {\n const {\n apiName: intermediaryObjectTypeApiName,\n object: intermediaryObjectType,\n } = getObject(linkDefinition.intermediaryObjectType);\n const { apiName: manyObjectApiName, object: manyObject } = getObject(\n linkDefinition.many.object,\n );\n const { apiName: toManyObjectApiName, object: toManyObject } = getObject(\n linkDefinition.toMany.object,\n );\n\n const {\n apiName: manyIntermediaryOneObjectApiName,\n object: manyIntermediaryOneObject,\n } = getObject((linkDefinition.many.linkToIntermediary as any).one.object);\n const {\n apiName: manyIntermediaryToManyObjectApiName,\n object: manyIntermediaryToManyObject,\n } = getObject(linkDefinition.many.linkToIntermediary.toMany.object);\n invariant(\n \"one\" in linkDefinition.many.linkToIntermediary\n && manyIntermediaryOneObjectApiName\n === manyObject.apiName\n && manyIntermediaryToManyObjectApiName\n === intermediaryObjectTypeApiName,\n `LinkTypeA ${linkDefinition.many.linkToIntermediary.apiName} must be a many to one link from intermediary object ${intermediaryObjectTypeApiName} to objectA ${manyObjectApiName}`,\n );\n\n const {\n apiName: toManyIntermediaryOneObjectApiName,\n object: toManyIntermediaryOneObject,\n } = getObject((linkDefinition.toMany.linkToIntermediary as any).one.object);\n const {\n apiName: toManyIntermediaryToManyObjectApiName,\n object: toManyIntermediaryToManyObject,\n } = getObject(linkDefinition.toMany.linkToIntermediary.toMany.object);\n invariant(\n \"one\" in linkDefinition.toMany.linkToIntermediary\n && toManyIntermediaryOneObjectApiName\n === toManyObjectApiName\n && toManyIntermediaryToManyObjectApiName\n === intermediaryObjectTypeApiName,\n `LinkTypeB ${linkDefinition.toMany.linkToIntermediary.apiName} must be a many to one link from intermediary object ${intermediaryObjectTypeApiName} to objectB ${toManyObjectApiName}`,\n );\n }\n}\n\nexport function getObject(\n object: string | ObjectTypeDefinition,\n): { apiName: string; object: ObjectType } {\n const objectApiName = typeof object === \"string\" ? object : object.apiName;\n const fullObject =\n ontologyDefinition[OntologyEntityTypeEnum.OBJECT_TYPE][objectApiName];\n invariant(\n fullObject !== undefined,\n `Object ${objectApiName} is not defined`,\n );\n return { apiName: objectApiName, object: fullObject };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,OAAOA,SAAS,MAAM,gBAAgB;AACtC,SAASC,sBAAsB,QAAQ,4CAA4C;AACnF,SACEC,0BAA0B,EAC1BC,kBAAkB,QACb,6BAA6B;AAIpC,SAASC,kBAAkB,QAAQ,yBAAyB;AAE5D,OAAO,SAASC,WAAWA,CACzBC,QAAkB,EACa;EAC/BC,YAAY,CAACD,QAAQ,CAAC;EACtB,IAAIE,UAAoC;EACxC,IAAIC,UAA8D,GAChEC,SAAS;EACX,IAAI,KAAK,IAAIJ,QAAQ,EAAE;IACrB,MAAM;MAAEK,OAAO,EAAEC,gBAAgB;MAAEC,MAAM,EAAEC;IAAU,CAAC,GAAGC,SAAS,CAChET,QAAQ,CAACU,GAAG,CAACH,MACf,CAAC;IACD,MAAM;MAAEF,OAAO,EAAEM,mBAAmB;MAAEJ,MAAM,EAAEK;IAAa,CAAC,GAAGH,SAAS,CACtET,QAAQ,CAACa,MAAM,CAACN,MAClB,CAAC;IACDL,UAAU,GAAG;MACXY,IAAI,EAAE,WAAW;MACjBC,SAAS,EAAE;QACTC,eAAe,EAAElB,kBAAkB,CAACE,QAAQ,CAACiB,WAAW,CAAC;QACzDC,qBAAqB,EAAElB,QAAQ,CAACa,MAAM,CAACM,QAAQ;QAC/CC,qBAAqB,EAAET,mBAAmB;QAC1CU,oBAAoB,EAAEf,gBAAgB;QACtCgB,qBAAqB,EAAEtB,QAAQ,CAACU,GAAG,CAACS,QAAQ;QAC5CI,0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vBF,MAAqC,EACI;EACzC,MAAM4E,aAAa,GAAG,OAAO5E,MAAM,KAAK,QAAQ,GAAGA,MAAM,GAAGA,MAAM,CAACF,OAAO;EAC1E,MAAM+E,UAAU,GACdvF,kBAAkB,CAACF,sBAAsB,CAAC0F,WAAW,CAAC,CAACF,aAAa,CAAC;EACvE,EACEC,UAAU,KAAKhF,SAAS,IAAAiE,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAD1B7E,SAAS,QAEP,UAAUyF,aAAa,iBAAiB,IAF1CzF,SAAS;EAIT,OAAO;IAAEW,OAAO,EAAE8E,aAAa;IAAE5E,MAAM,EAAE6E;EAAW,CAAC;AACvD","ignoreList":[]}
|
|
@@ -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,MAAM,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAG,GAAG,GAAGC,CAAC,CAAC,GAC7DC,SAAS;EAEb,MAAMC,mBAAmB,GAAGP,qBAAqB,CAACE,MAAM,GAAG,CAAC,GACxDF,qBAAqB,CAACG,MAAM,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAG,GAAG,GAAGC,CAAC,CAAC,GACnDC,SAAS;EAEb,MAAME,gBAAgB,GAAGvB,eAAe,CACtCM,U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AAU;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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ACF;EACF,CAAC;EAOH,OAAO5G,eAAe,CACpByE,iBAAiB,GAAG,WAAW,GAAGe,KAAK,CAACsB,QAAQ,CAAC,CAAC,EAPa;IAC/DzE,IAAI,EAAE,SAAS;IACf0E,OAAO,EAAE;MACPC,UAAU,EAAEZ;IACd;EACF,CAIA,CAAC;AACH;AAEA,SAASS,gBAAgBA,CACvBD,GAA+B,EACO;EACtC,MAAMvE,IAAI,GAAGuE,GAAG,CAACvE,IAAI;EACrB,MAAM4E,KAAK,GAAG,OAAO,IAAIL,GAAG,GAAGA,GAAG,CAACK,KAAK,GAAGtF,SAAS;EACpD,MAAMuF,eAAe,GAAG,UAAU,IAAIN,GAAG,GAAGA,GAAG,CAACpC,QAAQ,GAAG7C,SAAS;EACpE,MAAMwF,QAAa,GAAG,CAAC,CAAC;EACxB,IAAI9E,IAAI,KAAK,OAAO,EAAE;IACpB,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,CAACtB,QAAQ,CAACsB,IAAI,CAAC,EAAE;MAChD8E,QAAQ,CAAC,gBAAgB,CAAC,GAAG;QAC3B9E,IAAI,EAAE,cAAc;QACpBqE,YAAY,EAAEQ;MAChB,CAAC;MACDC,QAAQ,CAAC,OAAO,CAAC,GAAGF,KAAK;IAC3B,CAAC,MAAM;MACLE,QAAQ,CAAC,UAAU,CAAC,GAAG;QACrB9E,IAAI,EAAE,cAAc;QACpBqE,YAAY,EAAEQ;MAChB,CAAC;IACH;EACF;EACA,OAAO;IACL7E,IAAI;IACJ,CAACA,IAAI,GAAG8E;EACV,CAAC;AACH","ignoreList":[]}
|
package/build/browser/index.js
CHANGED
|
@@ -21,6 +21,7 @@ export { CREATE_INTERFACE_OBJECT_PARAMETER, CREATE_OR_MODIFY_OBJECT_PARAMETER, d
|
|
|
21
21
|
export { defineCreateInterfaceObjectAction } from "./api/defineCreateInterfaceObjectAction.js";
|
|
22
22
|
export { defineCreateObjectAction } from "./api/defineCreateObjectAction.js";
|
|
23
23
|
export { defineCreateOrModifyObjectAction } from "./api/defineCreateOrModifyObjectAction.js";
|
|
24
|
+
export { defineDeleteInterfaceObjectAction } from "./api/defineDeleteInterfaceObjectAction.js";
|
|
24
25
|
export { defineDeleteObjectAction } from "./api/defineDeleteObjectAction.js";
|
|
25
26
|
export { defineInterface } from "./api/defineInterface.js";
|
|
26
27
|
export { defineInterfaceLinkConstraint } from "./api/defineInterfaceLinkConstraint.js";
|
|
@@ -1 +1 @@
|
|
|
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","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 { 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,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":[]}
|
|
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":[]}
|