@osdk/maker 0.9.0-beta.6 → 0.9.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 +13 -0
- package/build/browser/api/defineImportSpt.d.ts +10 -0
- package/build/browser/api/defineImportSpt.d.ts.map +1 -0
- package/build/browser/api/defineImportSpt.js +25 -0
- package/build/browser/api/defineImportSpt.js.map +1 -0
- package/build/browser/api/defineInterface.js +1 -1
- package/build/browser/api/defineInterface.js.map +1 -1
- package/build/browser/api/defineOntology.js +9 -1
- package/build/browser/api/defineOntology.js.map +1 -1
- package/build/browser/api/overall.test.js +158 -0
- package/build/browser/api/overall.test.js.map +1 -1
- package/build/browser/cli/main.js +1 -1
- package/build/browser/index.d.ts +1 -0
- package/build/browser/index.d.ts.map +1 -1
- package/build/browser/index.js +1 -0
- package/build/browser/index.js.map +1 -1
- package/build/esm/api/defineImportSpt.d.ts +10 -0
- package/build/esm/api/defineImportSpt.d.ts.map +1 -0
- package/build/esm/api/defineImportSpt.js +25 -0
- package/build/esm/api/defineImportSpt.js.map +1 -0
- package/build/esm/api/defineInterface.js +1 -1
- package/build/esm/api/defineInterface.js.map +1 -1
- package/build/esm/api/defineOntology.js +9 -1
- package/build/esm/api/defineOntology.js.map +1 -1
- package/build/esm/api/overall.test.js +158 -0
- package/build/esm/api/overall.test.js.map +1 -1
- package/build/esm/cli/main.js +1 -1
- package/build/esm/index.d.ts +1 -0
- package/build/esm/index.d.ts.map +1 -1
- package/build/esm/index.js +1 -0
- package/build/esm/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { beforeEach, describe, expect, it } from "vitest";
|
|
17
|
+
import { importSharedPropertyType } from "./defineImportSpt.js";
|
|
17
18
|
import { defineInterface } from "./defineInterface.js";
|
|
18
19
|
import { defineInterfaceLinkConstraint } from "./defineInterfaceLinkConstraint.js";
|
|
19
20
|
import { defineOntology, dumpOntologyFullMetadata, dumpValueTypeWireType } from "./defineOntology.js";
|
|
@@ -1127,5 +1128,162 @@ describe("Ontology Defining", () => {
|
|
|
1127
1128
|
}
|
|
1128
1129
|
`);
|
|
1129
1130
|
});
|
|
1131
|
+
it("Adds imported SPTs only to the interface definition", () => {
|
|
1132
|
+
const regularSpt = defineSharedPropertyType({
|
|
1133
|
+
apiName: "foo",
|
|
1134
|
+
type: {
|
|
1135
|
+
type: "marking",
|
|
1136
|
+
markingType: "CBAC"
|
|
1137
|
+
}
|
|
1138
|
+
});
|
|
1139
|
+
const importedSpt = importSharedPropertyType({
|
|
1140
|
+
apiName: "bar",
|
|
1141
|
+
typeHint: "string"
|
|
1142
|
+
});
|
|
1143
|
+
defineInterface({
|
|
1144
|
+
apiName: "interface",
|
|
1145
|
+
properties: {
|
|
1146
|
+
foo: regularSpt,
|
|
1147
|
+
bar: importedSpt
|
|
1148
|
+
}
|
|
1149
|
+
});
|
|
1150
|
+
expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
|
|
1151
|
+
{
|
|
1152
|
+
"blockPermissionInformation": {
|
|
1153
|
+
"actionTypes": {},
|
|
1154
|
+
"linkTypes": {},
|
|
1155
|
+
"objectTypes": {},
|
|
1156
|
+
},
|
|
1157
|
+
"interfaceTypes": {
|
|
1158
|
+
"com.palantir.interface": {
|
|
1159
|
+
"interfaceType": {
|
|
1160
|
+
"allExtendsInterfaces": [],
|
|
1161
|
+
"allLinks": [],
|
|
1162
|
+
"allProperties": [],
|
|
1163
|
+
"apiName": "com.palantir.interface",
|
|
1164
|
+
"displayMetadata": {
|
|
1165
|
+
"description": "interface",
|
|
1166
|
+
"displayName": "interface",
|
|
1167
|
+
"icon": undefined,
|
|
1168
|
+
},
|
|
1169
|
+
"extendsInterfaces": [],
|
|
1170
|
+
"links": [],
|
|
1171
|
+
"properties": [
|
|
1172
|
+
{
|
|
1173
|
+
"aliases": [],
|
|
1174
|
+
"apiName": "com.palantir.foo",
|
|
1175
|
+
"baseFormatter": undefined,
|
|
1176
|
+
"dataConstraints": {
|
|
1177
|
+
"nullability": undefined,
|
|
1178
|
+
"nullabilityV2": {
|
|
1179
|
+
"noEmptyCollections": true,
|
|
1180
|
+
"noNulls": true,
|
|
1181
|
+
},
|
|
1182
|
+
"propertyTypeConstraints": [],
|
|
1183
|
+
},
|
|
1184
|
+
"displayMetadata": {
|
|
1185
|
+
"description": undefined,
|
|
1186
|
+
"displayName": "foo",
|
|
1187
|
+
"visibility": "NORMAL",
|
|
1188
|
+
},
|
|
1189
|
+
"gothamMapping": undefined,
|
|
1190
|
+
"indexedForSearch": true,
|
|
1191
|
+
"provenance": undefined,
|
|
1192
|
+
"type": {
|
|
1193
|
+
"marking": {
|
|
1194
|
+
"markingType": "CBAC",
|
|
1195
|
+
},
|
|
1196
|
+
"type": "marking",
|
|
1197
|
+
},
|
|
1198
|
+
"typeClasses": [
|
|
1199
|
+
{
|
|
1200
|
+
"kind": "render_hint",
|
|
1201
|
+
"name": "SELECTABLE",
|
|
1202
|
+
},
|
|
1203
|
+
{
|
|
1204
|
+
"kind": "render_hint",
|
|
1205
|
+
"name": "SORTABLE",
|
|
1206
|
+
},
|
|
1207
|
+
],
|
|
1208
|
+
"valueType": undefined,
|
|
1209
|
+
},
|
|
1210
|
+
{
|
|
1211
|
+
"aliases": [],
|
|
1212
|
+
"apiName": "bar",
|
|
1213
|
+
"baseFormatter": undefined,
|
|
1214
|
+
"dataConstraints": undefined,
|
|
1215
|
+
"displayMetadata": {
|
|
1216
|
+
"description": undefined,
|
|
1217
|
+
"displayName": "bar",
|
|
1218
|
+
"visibility": "NORMAL",
|
|
1219
|
+
},
|
|
1220
|
+
"gothamMapping": undefined,
|
|
1221
|
+
"indexedForSearch": true,
|
|
1222
|
+
"provenance": undefined,
|
|
1223
|
+
"type": {
|
|
1224
|
+
"string": {
|
|
1225
|
+
"analyzerOverride": undefined,
|
|
1226
|
+
"enableAsciiFolding": undefined,
|
|
1227
|
+
"isLongText": false,
|
|
1228
|
+
"supportsExactMatching": true,
|
|
1229
|
+
},
|
|
1230
|
+
"type": "string",
|
|
1231
|
+
},
|
|
1232
|
+
"typeClasses": [],
|
|
1233
|
+
"valueType": undefined,
|
|
1234
|
+
},
|
|
1235
|
+
],
|
|
1236
|
+
"status": {
|
|
1237
|
+
"active": {},
|
|
1238
|
+
"type": "active",
|
|
1239
|
+
},
|
|
1240
|
+
},
|
|
1241
|
+
},
|
|
1242
|
+
},
|
|
1243
|
+
"sharedPropertyTypes": {
|
|
1244
|
+
"com.palantir.foo": {
|
|
1245
|
+
"sharedPropertyType": {
|
|
1246
|
+
"aliases": [],
|
|
1247
|
+
"apiName": "com.palantir.foo",
|
|
1248
|
+
"baseFormatter": undefined,
|
|
1249
|
+
"dataConstraints": {
|
|
1250
|
+
"nullability": undefined,
|
|
1251
|
+
"nullabilityV2": {
|
|
1252
|
+
"noEmptyCollections": true,
|
|
1253
|
+
"noNulls": true,
|
|
1254
|
+
},
|
|
1255
|
+
"propertyTypeConstraints": [],
|
|
1256
|
+
},
|
|
1257
|
+
"displayMetadata": {
|
|
1258
|
+
"description": undefined,
|
|
1259
|
+
"displayName": "foo",
|
|
1260
|
+
"visibility": "NORMAL",
|
|
1261
|
+
},
|
|
1262
|
+
"gothamMapping": undefined,
|
|
1263
|
+
"indexedForSearch": true,
|
|
1264
|
+
"provenance": undefined,
|
|
1265
|
+
"type": {
|
|
1266
|
+
"marking": {
|
|
1267
|
+
"markingType": "CBAC",
|
|
1268
|
+
},
|
|
1269
|
+
"type": "marking",
|
|
1270
|
+
},
|
|
1271
|
+
"typeClasses": [
|
|
1272
|
+
{
|
|
1273
|
+
"kind": "render_hint",
|
|
1274
|
+
"name": "SELECTABLE",
|
|
1275
|
+
},
|
|
1276
|
+
{
|
|
1277
|
+
"kind": "render_hint",
|
|
1278
|
+
"name": "SORTABLE",
|
|
1279
|
+
},
|
|
1280
|
+
],
|
|
1281
|
+
"valueType": undefined,
|
|
1282
|
+
},
|
|
1283
|
+
},
|
|
1284
|
+
},
|
|
1285
|
+
}
|
|
1286
|
+
`);
|
|
1287
|
+
});
|
|
1130
1288
|
});
|
|
1131
1289
|
//# sourceMappingURL=overall.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overall.test.js","names":["beforeEach","describe","expect","it","defineInterface","defineInterfaceLinkConstraint","defineOntology","dumpOntologyFullMetadata","dumpValueTypeWireType","defineSharedPropertyType","defineValueType","apiName","displayName","typeAndConstraints","baseType","boolean","constraints","constraint","allowedValues","version","toThrowErrorMatchingInlineSnapshot","toMatchInlineSnapshot","result","displayMetadata","toBe","description","properties","foo","type","parentInterface","property1","property2","extends","a","b","not","toBeUndefined","from","toOne","toMany","fooSpt","icon","color","locator","structDefinition","fieldType","undefined"],"sources":["overall.test.js"],"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 */\nimport { beforeEach, describe, expect, it } from \"vitest\";\nimport { defineInterface } from \"./defineInterface.js\";\nimport { defineInterfaceLinkConstraint } from \"./defineInterfaceLinkConstraint.js\";\nimport { defineOntology, dumpOntologyFullMetadata, dumpValueTypeWireType, } from \"./defineOntology.js\";\nimport { defineSharedPropertyType } from \"./defineSpt.js\";\nimport { defineValueType } from \"./defineValueType.js\";\ndescribe(\"Ontology Defining\", () => {\n beforeEach(() => {\n defineOntology(\"com.palantir.\", () => { });\n });\n describe(\"ValueTypes\", () => {\n it(\"Fails to define value type with incorrect semver\", () => {\n expect(() => defineValueType({\n apiName: \"apiName\",\n displayName: \"displayName\",\n typeAndConstraints: {\n baseType: { boolean: {} },\n constraints: [{\n constraint: { boolean: { allowedValues: [\"TRUE_VALUE\"] } },\n }],\n },\n version: \"not a version\",\n })).toThrowErrorMatchingInlineSnapshot(\"[Error: Invariant failed: Version is not a valid semver]\");\n });\n it(\"Correctly serializes a value type\", () => {\n defineValueType({\n apiName: \"apiName\",\n displayName: \"displayName\",\n typeAndConstraints: {\n baseType: { boolean: {} },\n constraints: [{\n constraint: { boolean: { allowedValues: [\"TRUE_VALUE\"] } },\n }],\n },\n version: \"0.1.0\",\n });\n expect(dumpValueTypeWireType()).toMatchInlineSnapshot(`\n {\n \"valueTypes\": [\n {\n \"metadata\": {\n \"apiName\": \"apiName\",\n \"displayMetadata\": {\n \"description\": \"\",\n \"displayName\": \"displayName\",\n },\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n \"versions\": [\n {\n \"baseType\": {\n \"boolean\": {},\n },\n \"constraints\": [\n {\n \"constraint\": {\n \"boolean\": \"boolean\",\n \"constraint\": {\n \"boolean\": {\n \"allowedValues\": [\n \"TRUE_VALUE\",\n ],\n },\n },\n },\n },\n ],\n \"exampleValues\": [],\n \"version\": \"0.1.0\",\n },\n ],\n },\n ],\n }\n `);\n });\n defineOntology(\"com.palantir.\", () => { });\n });\n describe(\"Interfaces\", () => {\n it(\"doesn't let you define the same interface twice\", () => {\n defineInterface({ apiName: \"Foo\" });\n expect(() => {\n defineInterface({ apiName: \"Foo\" });\n }).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Interface com.palantir.Foo already exists]`);\n });\n it(\"defaults displayName to apiName\", () => {\n const result = defineInterface({ apiName: \"Foo\" });\n expect(result.displayMetadata.displayName).toBe(\"Foo\");\n });\n it(\"defaults description to displayName\", () => {\n const result = defineInterface({ apiName: \"Foo\", displayName: \"d\" });\n expect(result.displayMetadata.description).toBe(\"d\");\n });\n it(\"defaults description to displayName to apiName\", () => {\n const result = defineInterface({ apiName: \"Foo\" });\n expect(result.displayMetadata.description).toBe(\"Foo\");\n });\n describe(\"auto spts\", () => {\n it(\"auto creates spts\", () => {\n defineInterface({\n apiName: \"Foo\",\n properties: {\n foo: \"string\",\n },\n });\n expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`\n {\n \"blockPermissionInformation\": {\n \"actionTypes\": {},\n \"linkTypes\": {},\n \"objectTypes\": {},\n },\n \"interfaceTypes\": {\n \"com.palantir.Foo\": {\n \"interfaceType\": {\n \"allExtendsInterfaces\": [],\n \"allLinks\": [],\n \"allProperties\": [],\n \"apiName\": \"com.palantir.Foo\",\n \"displayMetadata\": {\n \"description\": \"Foo\",\n \"displayName\": \"Foo\",\n \"icon\": undefined,\n },\n \"extendsInterfaces\": [],\n \"links\": [],\n \"properties\": [\n {\n \"aliases\": [],\n \"apiName\": \"com.palantir.foo\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"foo\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n ],\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n },\n },\n \"sharedPropertyTypes\": {\n \"com.palantir.foo\": {\n \"sharedPropertyType\": {\n \"aliases\": [],\n \"apiName\": \"com.palantir.foo\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"foo\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n },\n },\n }\n `);\n });\n it(\"does not let you conflict spts\", () => {\n defineSharedPropertyType({\n apiName: \"foo\",\n type: \"string\",\n });\n expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`\n {\n \"blockPermissionInformation\": {\n \"actionTypes\": {},\n \"linkTypes\": {},\n \"objectTypes\": {},\n },\n \"interfaceTypes\": {},\n \"sharedPropertyTypes\": {\n \"com.palantir.foo\": {\n \"sharedPropertyType\": {\n \"aliases\": [],\n \"apiName\": \"com.palantir.foo\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"foo\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n },\n },\n }\n `);\n expect(() => {\n defineInterface({\n apiName: \"Foo\",\n properties: {\n foo: \"string\",\n },\n });\n }).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Shared property type com.palantir.foo already exists]`);\n });\n });\n it(\"allows extends interfaces with InterfaceType provided\", () => {\n const parentInterface = defineInterface({\n apiName: \"parentInterface\",\n properties: {\n property1: \"string\",\n },\n });\n const childInterface = defineInterface({\n apiName: \"childInterface\",\n properties: {\n property2: \"string\",\n },\n extends: [parentInterface],\n });\n expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`\n {\n \"blockPermissionInformation\": {\n \"actionTypes\": {},\n \"linkTypes\": {},\n \"objectTypes\": {},\n },\n \"interfaceTypes\": {\n \"com.palantir.childInterface\": {\n \"interfaceType\": {\n \"allExtendsInterfaces\": [],\n \"allLinks\": [],\n \"allProperties\": [],\n \"apiName\": \"com.palantir.childInterface\",\n \"displayMetadata\": {\n \"description\": \"childInterface\",\n \"displayName\": \"childInterface\",\n \"icon\": undefined,\n },\n \"extendsInterfaces\": [\n \"com.palantir.parentInterface\",\n ],\n \"links\": [],\n \"properties\": [\n {\n \"aliases\": [],\n \"apiName\": \"com.palantir.property2\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"property2\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n ],\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n },\n \"com.palantir.parentInterface\": {\n \"interfaceType\": {\n \"allExtendsInterfaces\": [],\n \"allLinks\": [],\n \"allProperties\": [],\n \"apiName\": \"com.palantir.parentInterface\",\n \"displayMetadata\": {\n \"description\": \"parentInterface\",\n \"displayName\": \"parentInterface\",\n \"icon\": undefined,\n },\n \"extendsInterfaces\": [],\n \"links\": [],\n \"properties\": [\n {\n \"aliases\": [],\n \"apiName\": \"com.palantir.property1\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"property1\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n ],\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n },\n },\n \"sharedPropertyTypes\": {\n \"com.palantir.property1\": {\n \"sharedPropertyType\": {\n \"aliases\": [],\n \"apiName\": \"com.palantir.property1\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"property1\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n },\n \"com.palantir.property2\": {\n \"sharedPropertyType\": {\n \"aliases\": [],\n \"apiName\": \"com.palantir.property2\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"property2\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n },\n },\n }\n `);\n });\n it(\"allows extends interfaces with apiName provided\", () => {\n const parentInterface = defineInterface({\n apiName: \"parentInterface\",\n properties: {\n property1: \"string\",\n },\n });\n const childInterface = defineInterface({\n apiName: \"childInterface\",\n properties: {\n property2: \"string\",\n },\n extends: [\"parentInterface\"],\n });\n expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`\n {\n \"blockPermissionInformation\": {\n \"actionTypes\": {},\n \"linkTypes\": {},\n \"objectTypes\": {},\n },\n \"interfaceTypes\": {\n \"com.palantir.childInterface\": {\n \"interfaceType\": {\n \"allExtendsInterfaces\": [],\n \"allLinks\": [],\n \"allProperties\": [],\n \"apiName\": \"com.palantir.childInterface\",\n \"displayMetadata\": {\n \"description\": \"childInterface\",\n \"displayName\": \"childInterface\",\n \"icon\": undefined,\n },\n \"extendsInterfaces\": [\n \"parentInterface\",\n ],\n \"links\": [],\n \"properties\": [\n {\n \"aliases\": [],\n \"apiName\": \"com.palantir.property2\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"property2\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n ],\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n },\n \"com.palantir.parentInterface\": {\n \"interfaceType\": {\n \"allExtendsInterfaces\": [],\n \"allLinks\": [],\n \"allProperties\": [],\n \"apiName\": \"com.palantir.parentInterface\",\n \"displayMetadata\": {\n \"description\": \"parentInterface\",\n \"displayName\": \"parentInterface\",\n \"icon\": undefined,\n },\n \"extendsInterfaces\": [],\n \"links\": [],\n \"properties\": [\n {\n \"aliases\": [],\n \"apiName\": \"com.palantir.property1\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"property1\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n ],\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n },\n },\n \"sharedPropertyTypes\": {\n \"com.palantir.property1\": {\n \"sharedPropertyType\": {\n \"aliases\": [],\n \"apiName\": \"com.palantir.property1\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"property1\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n },\n \"com.palantir.property2\": {\n \"sharedPropertyType\": {\n \"aliases\": [],\n \"apiName\": \"com.palantir.property2\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"property2\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n },\n },\n }\n `);\n });\n });\n describe(\"ILTs\", () => {\n let a;\n let b;\n beforeEach(() => {\n a = defineInterface({ apiName: \"A\" });\n b = defineInterface({ apiName: \"B\" });\n });\n it(\"single link works\", () => {\n expect(a).not.toBeUndefined();\n defineInterfaceLinkConstraint({\n from: a,\n toOne: b,\n apiName: \"singleLink\",\n });\n expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`\n {\n \"blockPermissionInformation\": {\n \"actionTypes\": {},\n \"linkTypes\": {},\n \"objectTypes\": {},\n },\n \"interfaceTypes\": {\n \"com.palantir.A\": {\n \"interfaceType\": {\n \"allExtendsInterfaces\": [],\n \"allLinks\": [],\n \"allProperties\": [],\n \"apiName\": \"com.palantir.A\",\n \"displayMetadata\": {\n \"description\": \"A\",\n \"displayName\": \"A\",\n \"icon\": undefined,\n },\n \"extendsInterfaces\": [],\n \"links\": [\n {\n \"cardinality\": \"SINGLE\",\n \"linkedEntityTypeId\": {\n \"interfaceType\": \"com.palantir.B\",\n \"type\": \"interfaceType\",\n },\n \"metadata\": {\n \"apiName\": \"com.palantir.singleLink\",\n \"description\": \"singleLink\",\n \"displayName\": \"singleLink\",\n },\n \"required\": true,\n },\n ],\n \"properties\": [],\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n },\n \"com.palantir.B\": {\n \"interfaceType\": {\n \"allExtendsInterfaces\": [],\n \"allLinks\": [],\n \"allProperties\": [],\n \"apiName\": \"com.palantir.B\",\n \"displayMetadata\": {\n \"description\": \"B\",\n \"displayName\": \"B\",\n \"icon\": undefined,\n },\n \"extendsInterfaces\": [],\n \"links\": [],\n \"properties\": [],\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n },\n },\n \"sharedPropertyTypes\": {},\n }\n `);\n });\n it(\"many link works\", () => {\n defineInterfaceLinkConstraint({\n from: a,\n toMany: b,\n apiName: \"manyLink\",\n });\n expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`\n {\n \"blockPermissionInformation\": {\n \"actionTypes\": {},\n \"linkTypes\": {},\n \"objectTypes\": {},\n },\n \"interfaceTypes\": {\n \"com.palantir.A\": {\n \"interfaceType\": {\n \"allExtendsInterfaces\": [],\n \"allLinks\": [],\n \"allProperties\": [],\n \"apiName\": \"com.palantir.A\",\n \"displayMetadata\": {\n \"description\": \"A\",\n \"displayName\": \"A\",\n \"icon\": undefined,\n },\n \"extendsInterfaces\": [],\n \"links\": [\n {\n \"cardinality\": \"MANY\",\n \"linkedEntityTypeId\": {\n \"interfaceType\": \"com.palantir.B\",\n \"type\": \"interfaceType\",\n },\n \"metadata\": {\n \"apiName\": \"com.palantir.manyLink\",\n \"description\": \"manyLink\",\n \"displayName\": \"manyLink\",\n },\n \"required\": true,\n },\n ],\n \"properties\": [],\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n },\n \"com.palantir.B\": {\n \"interfaceType\": {\n \"allExtendsInterfaces\": [],\n \"allLinks\": [],\n \"allProperties\": [],\n \"apiName\": \"com.palantir.B\",\n \"displayMetadata\": {\n \"description\": \"B\",\n \"displayName\": \"B\",\n \"icon\": undefined,\n },\n \"extendsInterfaces\": [],\n \"links\": [],\n \"properties\": [],\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n },\n },\n \"sharedPropertyTypes\": {},\n }\n `);\n });\n });\n describe(\"SPTs\", () => {\n it(\"doesn't let you create the same spt twice\", () => {\n defineSharedPropertyType({\n apiName: \"foo\",\n type: \"string\",\n });\n expect(() => {\n defineSharedPropertyType({\n apiName: \"foo\",\n type: \"string\",\n });\n }).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Shared property type com.palantir.foo already exists]`);\n });\n });\n it(\"uses a predefined spt\", () => {\n const fooSpt = defineSharedPropertyType({\n apiName: \"fooSpt\",\n type: \"string\",\n });\n const FooInterface = defineInterface({\n apiName: \"FooInterface\",\n displayName: \"Foo Interface\",\n properties: {\n fooSpt,\n },\n icon: { color: \"#00000\", locator: \"airplane\" },\n });\n expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`\n {\n \"blockPermissionInformation\": {\n \"actionTypes\": {},\n \"linkTypes\": {},\n \"objectTypes\": {},\n },\n \"interfaceTypes\": {\n \"com.palantir.FooInterface\": {\n \"interfaceType\": {\n \"allExtendsInterfaces\": [],\n \"allLinks\": [],\n \"allProperties\": [],\n \"apiName\": \"com.palantir.FooInterface\",\n \"displayMetadata\": {\n \"description\": \"Foo Interface\",\n \"displayName\": \"Foo Interface\",\n \"icon\": {\n \"blueprint\": {\n \"color\": \"#00000\",\n \"locator\": \"airplane\",\n },\n \"type\": \"blueprint\",\n },\n },\n \"extendsInterfaces\": [],\n \"links\": [],\n \"properties\": [\n {\n \"aliases\": [],\n \"apiName\": \"com.palantir.fooSpt\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"fooSpt\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n ],\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n },\n },\n \"sharedPropertyTypes\": {\n \"com.palantir.fooSpt\": {\n \"sharedPropertyType\": {\n \"aliases\": [],\n \"apiName\": \"com.palantir.fooSpt\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"fooSpt\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n },\n },\n }\n `);\n });\n it(\"properly serializes both types of struct SPTs\", () => {\n const fooSpt = defineSharedPropertyType({\n apiName: \"fooSpt\",\n type: {\n type: \"struct\",\n structDefinition: {\n \"simpleProperty\": \"boolean\",\n \"complexProperty\": {\n fieldType: \"date\",\n displayMetadata: {\n displayName: \"complex property\",\n description: undefined,\n },\n },\n },\n },\n });\n expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`\n {\n \"blockPermissionInformation\": {\n \"actionTypes\": {},\n \"linkTypes\": {},\n \"objectTypes\": {},\n },\n \"interfaceTypes\": {},\n \"sharedPropertyTypes\": {\n \"com.palantir.fooSpt\": {\n \"sharedPropertyType\": {\n \"aliases\": [],\n \"apiName\": \"com.palantir.fooSpt\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"fooSpt\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"struct\": {\n \"structFields\": [\n {\n \"aliases\": [],\n \"apiName\": \"simpleProperty\",\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"simpleProperty\",\n },\n \"fieldType\": {\n \"boolean\": {},\n \"type\": \"boolean\",\n },\n \"typeClasses\": [],\n },\n {\n \"aliases\": [],\n \"apiName\": \"complexProperty\",\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"complex property\",\n },\n \"fieldType\": {\n \"date\": {},\n \"type\": \"date\",\n },\n \"typeClasses\": [],\n },\n ],\n },\n \"type\": \"struct\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n },\n },\n }\n `);\n });\n});\n"],"mappings":"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C,eAAe,CAAC;UACZO,OAAO,EAAE,KAAK;UACde,UAAU,EAAE;YACRC,GAAG,EAAE;UACT;QACJ,CAAC,CAAC;QACFzB,MAAM,CAACK,wBAAwB,CAAC,CAAC,CAAC,CAACc,qBAAqB,CAAC;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,CAAC;MACE,CAAC,CAAC;MACFlB,EAAE,CAAC,gCAAgC,EAAE,MAAM;QACvCM,wBAAwB,CAAC;UACrBE,OAAO,EAAE,KAAK;UACdiB,IAAI,EAAE;QACV,CAAC,CAAC;QACF1B,MAAM,CAACK,wBAAwB,CAAC,CAAC,CAAC,CAACc,qBAAqB,CAAC;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,CAAC;QACMnB,MAAM,CAAC,MAAM;UACTE,eAAe,CAAC;YACZO,OAAO,EAAE,KAAK;YACde,UAAU,EAAE;cACRC,GAAG,EAAE;YACT;UACJ,CAAC,CAAC;QACN,CAAC,CAAC,CAACP,kCAAkC,CAAC,iFAAiF,CAAC;MAC5H,CAAC,CAAC;IACN,CAAC,CAAC;IACFjB,EAAE,CAAC,uDAAuD,EAAE,MAAM;MAC9D,MAAM0B,eAAe,GAAGzB,eAAe,CAAC;QACpCO,OAAO,EAAE,iBAAiB;QAC1Be,UAAU,EAAE;UACRI,SAAS,EAAE;QACf;MACJ,CAAC,CAAC;MACqB1B,eAAe,CAAC;QACnCO,OAAO,EAAE,gBAAgB;QACzBe,UAAU,EAAE;UACRK,SAAS,EAAE;QACf,CAAC;QACDC,OAAO,EAAE,CAACH,eAAe;MAC7B,CAAC,CAAC;MACF3B,MAAM,CAACK,wBAAwB,CAAC,CAAC,CAAC,CAACc,qBAAqB,CAAC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,CAAC;IACA,CAAC,CAAC;IACFlB,EAAE,CAAC,iDAAiD,EAAE,MAAM;MAChCC,eAAe,CAAC;QACpCO,OAAO,EAAE,iBAAiB;QAC1Be,UAAU,EAAE;UACRI,SAAS,EAAE;QACf;MACJ,CAAC,CAAC;MACqB1B,eAAe,CAAC;QACnCO,OAAO,EAAE,gBAAgB;QACzBe,UAAU,EAAE;UACRK,SAAS,EAAE;QACf,CAAC;QACDC,OAAO,EAAE,CAAC,iBAAiB;MAC/B,CAAC,CAAC;MACF9B,MAAM,CAACK,wBAAwB,CAAC,CAAC,CAAC,CAACc,qBAAqB,CAAC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,CAAC;IACA,CAAC,CAAC;EACN,CAAC,CAAC;EACFpB,QAAQ,CAAC,MAAM,EAAE,MAAM;IACnB,IAAIgC,CAAC;IACL,IAAIC,CAAC;IACLlC,UAAU,CAAC,MAAM;MACbiC,CAAC,GAAG7B,eAAe,CAAC;QAAEO,OAAO,EAAE;MAAI,CAAC,CAAC;MACrCuB,CAAC,GAAG9B,eAAe,CAAC;QAAEO,OAAO,EAAE;MAAI,CAAC,CAAC;IACzC,CAAC,CAAC;IACFR,EAAE,CAAC,mBAAmB,EAAE,MAAM;MAC1BD,MAAM,CAAC+B,CAAC,CAAC,CAACE,GAAG,CAACC,aAAa,CAAC,CAAC;MAC7B/B,6BAA6B,CAAC;QAC1BgC,IAAI,EAAEJ,CAAC;QACPK,KAAK,EAAEJ,CAAC;QACRvB,OAAO,EAAE;MACb,CAAC,CAAC;MACFT,MAAM,CAACK,wBAAwB,CAAC,CAAC,CAAC,CAACc,qBAAqB,CAAC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,CAAC;IACA,CAAC,CAAC;IACFlB,EAAE,CAAC,iBAAiB,EAAE,MAAM;MACxBE,6BAA6B,CAAC;QAC1BgC,IAAI,EAAEJ,CAAC;QACPM,MAAM,EAAEL,CAAC;QACTvB,OAAO,EAAE;MACb,CAAC,CAAC;MACFT,MAAM,CAACK,wBAAwB,CAAC,CAAC,CAAC,CAACc,qBAAqB,CAAC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,CAAC;IACA,CAAC,CAAC;EACN,CAAC,CAAC;EACFpB,QAAQ,CAAC,MAAM,EAAE,MAAM;IACnBE,EAAE,CAAC,2CAA2C,EAAE,MAAM;MAClDM,wBAAwB,CAAC;QACrBE,OAAO,EAAE,KAAK;QACdiB,IAAI,EAAE;MACV,CAAC,CAAC;MACF1B,MAAM,CAAC,MAAM;QACTO,wBAAwB,CAAC;UACrBE,OAAO,EAAE,KAAK;UACdiB,IAAI,EAAE;QACV,CAAC,CAAC;MACN,CAAC,CAAC,CAACR,kCAAkC,CAAC,iFAAiF,CAAC;IAC5H,CAAC,CAAC;EACN,CAAC,CAAC;EACFjB,EAAE,CAAC,uBAAuB,EAAE,MAAM;IAC9B,MAAMqC,MAAM,GAAG/B,wBAAwB,CAAC;MACpCE,OAAO,EAAE,QAAQ;MACjBiB,IAAI,EAAE;IACV,CAAC,CAAC;IACmBxB,eAAe,CAAC;MACjCO,OAAO,EAAE,cAAc;MACvBC,WAAW,EAAE,eAAe;MAC5Bc,UAAU,EAAE;QACRc;MACJ,CAAC;MACDC,IAAI,EAAE;QAAEC,KAAK,EAAE,QAAQ;QAAEC,OAAO,EAAE;MAAW;IACjD,CAAC,CAAC;IACFzC,MAAM,CAACK,wBAAwB,CAAC,CAAC,CAAC,CAACc,qBAAqB,CAAC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACF,CAAC,CAAC;EACFlB,EAAE,CAAC,+CAA+C,EAAE,MAAM;IACvCM,wBAAwB,CAAC;MACpCE,OAAO,EAAE,QAAQ;MACjBiB,IAAI,EAAE;QACFA,IAAI,EAAE,QAAQ;QACdgB,gBAAgB,EAAE;UACd,gBAAgB,EAAE,SAAS;UAC3B,iBAAiB,EAAE;YACfC,SAAS,EAAE,MAAM;YACjBtB,eAAe,EAAE;cACbX,WAAW,EAAE,kBAAkB;cAC/Ba,WAAW,EAAEqB;YACjB;UACJ;QACJ;MACJ;IACJ,CAAC,CAAC;IACF5C,MAAM,CAACK,wBAAwB,CAAC,CAAC,CAAC,CAACc,qBAAqB,CAAC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,CAAC;EACJ,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"overall.test.js","names":["beforeEach","describe","expect","it","importSharedPropertyType","defineInterface","defineInterfaceLinkConstraint","defineOntology","dumpOntologyFullMetadata","dumpValueTypeWireType","defineSharedPropertyType","defineValueType","apiName","displayName","typeAndConstraints","baseType","boolean","constraints","constraint","allowedValues","version","toThrowErrorMatchingInlineSnapshot","toMatchInlineSnapshot","result","displayMetadata","toBe","description","properties","foo","type","parentInterface","property1","property2","extends","a","b","not","toBeUndefined","from","toOne","toMany","fooSpt","icon","color","locator","structDefinition","fieldType","undefined","regularSpt","markingType","importedSpt","typeHint","bar"],"sources":["overall.test.js"],"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 */\nimport { beforeEach, describe, expect, it } from \"vitest\";\nimport { importSharedPropertyType } from \"./defineImportSpt.js\";\nimport { defineInterface } from \"./defineInterface.js\";\nimport { defineInterfaceLinkConstraint } from \"./defineInterfaceLinkConstraint.js\";\nimport { defineOntology, dumpOntologyFullMetadata, dumpValueTypeWireType, } from \"./defineOntology.js\";\nimport { defineSharedPropertyType } from \"./defineSpt.js\";\nimport { defineValueType } from \"./defineValueType.js\";\ndescribe(\"Ontology Defining\", () => {\n beforeEach(() => {\n defineOntology(\"com.palantir.\", () => { });\n });\n describe(\"ValueTypes\", () => {\n it(\"Fails to define value type with incorrect semver\", () => {\n expect(() => defineValueType({\n apiName: \"apiName\",\n displayName: \"displayName\",\n typeAndConstraints: {\n baseType: { boolean: {} },\n constraints: [{\n constraint: { boolean: { allowedValues: [\"TRUE_VALUE\"] } },\n }],\n },\n version: \"not a version\",\n })).toThrowErrorMatchingInlineSnapshot(\"[Error: Invariant failed: Version is not a valid semver]\");\n });\n it(\"Correctly serializes a value type\", () => {\n defineValueType({\n apiName: \"apiName\",\n displayName: \"displayName\",\n typeAndConstraints: {\n baseType: { boolean: {} },\n constraints: [{\n constraint: { boolean: { allowedValues: [\"TRUE_VALUE\"] } },\n }],\n },\n version: \"0.1.0\",\n });\n expect(dumpValueTypeWireType()).toMatchInlineSnapshot(`\n {\n \"valueTypes\": [\n {\n \"metadata\": {\n \"apiName\": \"apiName\",\n \"displayMetadata\": {\n \"description\": \"\",\n \"displayName\": \"displayName\",\n },\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n \"versions\": [\n {\n \"baseType\": {\n \"boolean\": {},\n },\n \"constraints\": [\n {\n \"constraint\": {\n \"boolean\": \"boolean\",\n \"constraint\": {\n \"boolean\": {\n \"allowedValues\": [\n \"TRUE_VALUE\",\n ],\n },\n },\n },\n },\n ],\n \"exampleValues\": [],\n \"version\": \"0.1.0\",\n },\n ],\n },\n ],\n }\n `);\n });\n defineOntology(\"com.palantir.\", () => { });\n });\n describe(\"Interfaces\", () => {\n it(\"doesn't let you define the same interface twice\", () => {\n defineInterface({ apiName: \"Foo\" });\n expect(() => {\n defineInterface({ apiName: \"Foo\" });\n }).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Interface com.palantir.Foo already exists]`);\n });\n it(\"defaults displayName to apiName\", () => {\n const result = defineInterface({ apiName: \"Foo\" });\n expect(result.displayMetadata.displayName).toBe(\"Foo\");\n });\n it(\"defaults description to displayName\", () => {\n const result = defineInterface({ apiName: \"Foo\", displayName: \"d\" });\n expect(result.displayMetadata.description).toBe(\"d\");\n });\n it(\"defaults description to displayName to apiName\", () => {\n const result = defineInterface({ apiName: \"Foo\" });\n expect(result.displayMetadata.description).toBe(\"Foo\");\n });\n describe(\"auto spts\", () => {\n it(\"auto creates spts\", () => {\n defineInterface({\n apiName: \"Foo\",\n properties: {\n foo: \"string\",\n },\n });\n expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`\n {\n \"blockPermissionInformation\": {\n \"actionTypes\": {},\n \"linkTypes\": {},\n \"objectTypes\": {},\n },\n \"interfaceTypes\": {\n \"com.palantir.Foo\": {\n \"interfaceType\": {\n \"allExtendsInterfaces\": [],\n \"allLinks\": [],\n \"allProperties\": [],\n \"apiName\": \"com.palantir.Foo\",\n \"displayMetadata\": {\n \"description\": \"Foo\",\n \"displayName\": \"Foo\",\n \"icon\": undefined,\n },\n \"extendsInterfaces\": [],\n \"links\": [],\n \"properties\": [\n {\n \"aliases\": [],\n \"apiName\": \"com.palantir.foo\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"foo\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n ],\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n },\n },\n \"sharedPropertyTypes\": {\n \"com.palantir.foo\": {\n \"sharedPropertyType\": {\n \"aliases\": [],\n \"apiName\": \"com.palantir.foo\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"foo\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n },\n },\n }\n `);\n });\n it(\"does not let you conflict spts\", () => {\n defineSharedPropertyType({\n apiName: \"foo\",\n type: \"string\",\n });\n expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`\n {\n \"blockPermissionInformation\": {\n \"actionTypes\": {},\n \"linkTypes\": {},\n \"objectTypes\": {},\n },\n \"interfaceTypes\": {},\n \"sharedPropertyTypes\": {\n \"com.palantir.foo\": {\n \"sharedPropertyType\": {\n \"aliases\": [],\n \"apiName\": \"com.palantir.foo\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"foo\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n },\n },\n }\n `);\n expect(() => {\n defineInterface({\n apiName: \"Foo\",\n properties: {\n foo: \"string\",\n },\n });\n }).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Shared property type com.palantir.foo already exists]`);\n });\n });\n it(\"allows extends interfaces with InterfaceType provided\", () => {\n const parentInterface = defineInterface({\n apiName: \"parentInterface\",\n properties: {\n property1: \"string\",\n },\n });\n const childInterface = defineInterface({\n apiName: \"childInterface\",\n properties: {\n property2: \"string\",\n },\n extends: [parentInterface],\n });\n expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`\n {\n \"blockPermissionInformation\": {\n \"actionTypes\": {},\n \"linkTypes\": {},\n \"objectTypes\": {},\n },\n \"interfaceTypes\": {\n \"com.palantir.childInterface\": {\n \"interfaceType\": {\n \"allExtendsInterfaces\": [],\n \"allLinks\": [],\n \"allProperties\": [],\n \"apiName\": \"com.palantir.childInterface\",\n \"displayMetadata\": {\n \"description\": \"childInterface\",\n \"displayName\": \"childInterface\",\n \"icon\": undefined,\n },\n \"extendsInterfaces\": [\n \"com.palantir.parentInterface\",\n ],\n \"links\": [],\n \"properties\": [\n {\n \"aliases\": [],\n \"apiName\": \"com.palantir.property2\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"property2\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n ],\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n },\n \"com.palantir.parentInterface\": {\n \"interfaceType\": {\n \"allExtendsInterfaces\": [],\n \"allLinks\": [],\n \"allProperties\": [],\n \"apiName\": \"com.palantir.parentInterface\",\n \"displayMetadata\": {\n \"description\": \"parentInterface\",\n \"displayName\": \"parentInterface\",\n \"icon\": undefined,\n },\n \"extendsInterfaces\": [],\n \"links\": [],\n \"properties\": [\n {\n \"aliases\": [],\n \"apiName\": \"com.palantir.property1\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"property1\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n ],\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n },\n },\n \"sharedPropertyTypes\": {\n \"com.palantir.property1\": {\n \"sharedPropertyType\": {\n \"aliases\": [],\n \"apiName\": \"com.palantir.property1\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"property1\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n },\n \"com.palantir.property2\": {\n \"sharedPropertyType\": {\n \"aliases\": [],\n \"apiName\": \"com.palantir.property2\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"property2\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n },\n },\n }\n `);\n });\n it(\"allows extends interfaces with apiName provided\", () => {\n const parentInterface = defineInterface({\n apiName: \"parentInterface\",\n properties: {\n property1: \"string\",\n },\n });\n const childInterface = defineInterface({\n apiName: \"childInterface\",\n properties: {\n property2: \"string\",\n },\n extends: [\"parentInterface\"],\n });\n expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`\n {\n \"blockPermissionInformation\": {\n \"actionTypes\": {},\n \"linkTypes\": {},\n \"objectTypes\": {},\n },\n \"interfaceTypes\": {\n \"com.palantir.childInterface\": {\n \"interfaceType\": {\n \"allExtendsInterfaces\": [],\n \"allLinks\": [],\n \"allProperties\": [],\n \"apiName\": \"com.palantir.childInterface\",\n \"displayMetadata\": {\n \"description\": \"childInterface\",\n \"displayName\": \"childInterface\",\n \"icon\": undefined,\n },\n \"extendsInterfaces\": [\n \"parentInterface\",\n ],\n \"links\": [],\n \"properties\": [\n {\n \"aliases\": [],\n \"apiName\": \"com.palantir.property2\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"property2\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n ],\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n },\n \"com.palantir.parentInterface\": {\n \"interfaceType\": {\n \"allExtendsInterfaces\": [],\n \"allLinks\": [],\n \"allProperties\": [],\n \"apiName\": \"com.palantir.parentInterface\",\n \"displayMetadata\": {\n \"description\": \"parentInterface\",\n \"displayName\": \"parentInterface\",\n \"icon\": undefined,\n },\n \"extendsInterfaces\": [],\n \"links\": [],\n \"properties\": [\n {\n \"aliases\": [],\n \"apiName\": \"com.palantir.property1\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"property1\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n ],\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n },\n },\n \"sharedPropertyTypes\": {\n \"com.palantir.property1\": {\n \"sharedPropertyType\": {\n \"aliases\": [],\n \"apiName\": \"com.palantir.property1\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"property1\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n },\n \"com.palantir.property2\": {\n \"sharedPropertyType\": {\n \"aliases\": [],\n \"apiName\": \"com.palantir.property2\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"property2\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n },\n },\n }\n `);\n });\n });\n describe(\"ILTs\", () => {\n let a;\n let b;\n beforeEach(() => {\n a = defineInterface({ apiName: \"A\" });\n b = defineInterface({ apiName: \"B\" });\n });\n it(\"single link works\", () => {\n expect(a).not.toBeUndefined();\n defineInterfaceLinkConstraint({\n from: a,\n toOne: b,\n apiName: \"singleLink\",\n });\n expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`\n {\n \"blockPermissionInformation\": {\n \"actionTypes\": {},\n \"linkTypes\": {},\n \"objectTypes\": {},\n },\n \"interfaceTypes\": {\n \"com.palantir.A\": {\n \"interfaceType\": {\n \"allExtendsInterfaces\": [],\n \"allLinks\": [],\n \"allProperties\": [],\n \"apiName\": \"com.palantir.A\",\n \"displayMetadata\": {\n \"description\": \"A\",\n \"displayName\": \"A\",\n \"icon\": undefined,\n },\n \"extendsInterfaces\": [],\n \"links\": [\n {\n \"cardinality\": \"SINGLE\",\n \"linkedEntityTypeId\": {\n \"interfaceType\": \"com.palantir.B\",\n \"type\": \"interfaceType\",\n },\n \"metadata\": {\n \"apiName\": \"com.palantir.singleLink\",\n \"description\": \"singleLink\",\n \"displayName\": \"singleLink\",\n },\n \"required\": true,\n },\n ],\n \"properties\": [],\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n },\n \"com.palantir.B\": {\n \"interfaceType\": {\n \"allExtendsInterfaces\": [],\n \"allLinks\": [],\n \"allProperties\": [],\n \"apiName\": \"com.palantir.B\",\n \"displayMetadata\": {\n \"description\": \"B\",\n \"displayName\": \"B\",\n \"icon\": undefined,\n },\n \"extendsInterfaces\": [],\n \"links\": [],\n \"properties\": [],\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n },\n },\n \"sharedPropertyTypes\": {},\n }\n `);\n });\n it(\"many link works\", () => {\n defineInterfaceLinkConstraint({\n from: a,\n toMany: b,\n apiName: \"manyLink\",\n });\n expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`\n {\n \"blockPermissionInformation\": {\n \"actionTypes\": {},\n \"linkTypes\": {},\n \"objectTypes\": {},\n },\n \"interfaceTypes\": {\n \"com.palantir.A\": {\n \"interfaceType\": {\n \"allExtendsInterfaces\": [],\n \"allLinks\": [],\n \"allProperties\": [],\n \"apiName\": \"com.palantir.A\",\n \"displayMetadata\": {\n \"description\": \"A\",\n \"displayName\": \"A\",\n \"icon\": undefined,\n },\n \"extendsInterfaces\": [],\n \"links\": [\n {\n \"cardinality\": \"MANY\",\n \"linkedEntityTypeId\": {\n \"interfaceType\": \"com.palantir.B\",\n \"type\": \"interfaceType\",\n },\n \"metadata\": {\n \"apiName\": \"com.palantir.manyLink\",\n \"description\": \"manyLink\",\n \"displayName\": \"manyLink\",\n },\n \"required\": true,\n },\n ],\n \"properties\": [],\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n },\n \"com.palantir.B\": {\n \"interfaceType\": {\n \"allExtendsInterfaces\": [],\n \"allLinks\": [],\n \"allProperties\": [],\n \"apiName\": \"com.palantir.B\",\n \"displayMetadata\": {\n \"description\": \"B\",\n \"displayName\": \"B\",\n \"icon\": undefined,\n },\n \"extendsInterfaces\": [],\n \"links\": [],\n \"properties\": [],\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n },\n },\n \"sharedPropertyTypes\": {},\n }\n `);\n });\n });\n describe(\"SPTs\", () => {\n it(\"doesn't let you create the same spt twice\", () => {\n defineSharedPropertyType({\n apiName: \"foo\",\n type: \"string\",\n });\n expect(() => {\n defineSharedPropertyType({\n apiName: \"foo\",\n type: \"string\",\n });\n }).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Shared property type com.palantir.foo already exists]`);\n });\n });\n it(\"uses a predefined spt\", () => {\n const fooSpt = defineSharedPropertyType({\n apiName: \"fooSpt\",\n type: \"string\",\n });\n const FooInterface = defineInterface({\n apiName: \"FooInterface\",\n displayName: \"Foo Interface\",\n properties: {\n fooSpt,\n },\n icon: { color: \"#00000\", locator: \"airplane\" },\n });\n expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`\n {\n \"blockPermissionInformation\": {\n \"actionTypes\": {},\n \"linkTypes\": {},\n \"objectTypes\": {},\n },\n \"interfaceTypes\": {\n \"com.palantir.FooInterface\": {\n \"interfaceType\": {\n \"allExtendsInterfaces\": [],\n \"allLinks\": [],\n \"allProperties\": [],\n \"apiName\": \"com.palantir.FooInterface\",\n \"displayMetadata\": {\n \"description\": \"Foo Interface\",\n \"displayName\": \"Foo Interface\",\n \"icon\": {\n \"blueprint\": {\n \"color\": \"#00000\",\n \"locator\": \"airplane\",\n },\n \"type\": \"blueprint\",\n },\n },\n \"extendsInterfaces\": [],\n \"links\": [],\n \"properties\": [\n {\n \"aliases\": [],\n \"apiName\": \"com.palantir.fooSpt\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"fooSpt\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n ],\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n },\n },\n \"sharedPropertyTypes\": {\n \"com.palantir.fooSpt\": {\n \"sharedPropertyType\": {\n \"aliases\": [],\n \"apiName\": \"com.palantir.fooSpt\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"fooSpt\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n },\n },\n }\n `);\n });\n it(\"properly serializes both types of struct SPTs\", () => {\n const fooSpt = defineSharedPropertyType({\n apiName: \"fooSpt\",\n type: {\n type: \"struct\",\n structDefinition: {\n \"simpleProperty\": \"boolean\",\n \"complexProperty\": {\n fieldType: \"date\",\n displayMetadata: {\n displayName: \"complex property\",\n description: undefined,\n },\n },\n },\n },\n });\n expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`\n {\n \"blockPermissionInformation\": {\n \"actionTypes\": {},\n \"linkTypes\": {},\n \"objectTypes\": {},\n },\n \"interfaceTypes\": {},\n \"sharedPropertyTypes\": {\n \"com.palantir.fooSpt\": {\n \"sharedPropertyType\": {\n \"aliases\": [],\n \"apiName\": \"com.palantir.fooSpt\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"fooSpt\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"struct\": {\n \"structFields\": [\n {\n \"aliases\": [],\n \"apiName\": \"simpleProperty\",\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"simpleProperty\",\n },\n \"fieldType\": {\n \"boolean\": {},\n \"type\": \"boolean\",\n },\n \"typeClasses\": [],\n },\n {\n \"aliases\": [],\n \"apiName\": \"complexProperty\",\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"complex property\",\n },\n \"fieldType\": {\n \"date\": {},\n \"type\": \"date\",\n },\n \"typeClasses\": [],\n },\n ],\n },\n \"type\": \"struct\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n },\n },\n }\n `);\n });\n it(\"Adds imported SPTs only to the interface definition\", () => {\n const regularSpt = defineSharedPropertyType({\n apiName: \"foo\",\n type: { type: \"marking\", markingType: \"CBAC\" },\n });\n const importedSpt = importSharedPropertyType({\n apiName: \"bar\",\n typeHint: \"string\",\n });\n defineInterface({\n apiName: \"interface\",\n properties: { foo: regularSpt, bar: importedSpt },\n });\n expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`\n {\n \"blockPermissionInformation\": {\n \"actionTypes\": {},\n \"linkTypes\": {},\n \"objectTypes\": {},\n },\n \"interfaceTypes\": {\n \"com.palantir.interface\": {\n \"interfaceType\": {\n \"allExtendsInterfaces\": [],\n \"allLinks\": [],\n \"allProperties\": [],\n \"apiName\": \"com.palantir.interface\",\n \"displayMetadata\": {\n \"description\": \"interface\",\n \"displayName\": \"interface\",\n \"icon\": undefined,\n },\n \"extendsInterfaces\": [],\n \"links\": [],\n \"properties\": [\n {\n \"aliases\": [],\n \"apiName\": \"com.palantir.foo\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": {\n \"nullability\": undefined,\n \"nullabilityV2\": {\n \"noEmptyCollections\": true,\n \"noNulls\": true,\n },\n \"propertyTypeConstraints\": [],\n },\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"foo\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"marking\": {\n \"markingType\": \"CBAC\",\n },\n \"type\": \"marking\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n {\n \"aliases\": [],\n \"apiName\": \"bar\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": undefined,\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"bar\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"string\": {\n \"analyzerOverride\": undefined,\n \"enableAsciiFolding\": undefined,\n \"isLongText\": false,\n \"supportsExactMatching\": true,\n },\n \"type\": \"string\",\n },\n \"typeClasses\": [],\n \"valueType\": undefined,\n },\n ],\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n },\n },\n \"sharedPropertyTypes\": {\n \"com.palantir.foo\": {\n \"sharedPropertyType\": {\n \"aliases\": [],\n \"apiName\": \"com.palantir.foo\",\n \"baseFormatter\": undefined,\n \"dataConstraints\": {\n \"nullability\": undefined,\n \"nullabilityV2\": {\n \"noEmptyCollections\": true,\n \"noNulls\": true,\n },\n \"propertyTypeConstraints\": [],\n },\n \"displayMetadata\": {\n \"description\": undefined,\n \"displayName\": \"foo\",\n \"visibility\": \"NORMAL\",\n },\n \"gothamMapping\": undefined,\n \"indexedForSearch\": true,\n \"provenance\": undefined,\n \"type\": {\n \"marking\": {\n \"markingType\": \"CBAC\",\n },\n \"type\": \"marking\",\n },\n \"typeClasses\": [\n {\n \"kind\": \"render_hint\",\n \"name\": \"SELECTABLE\",\n },\n {\n \"kind\": \"render_hint\",\n \"name\": \"SORTABLE\",\n },\n ],\n \"valueType\": undefined,\n },\n },\n },\n }\n `);\n });\n});\n"],"mappings":"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AAE,CAAC,mBAAmB,EAAE,MAAM;QAC1BE,eAAe,CAAC;UACZO,OAAO,EAAE,KAAK;UACde,UAAU,EAAE;YACRC,GAAG,EAAE;UACT;QACJ,CAAC,CAAC;QACF1B,MAAM,CAACM,wBAAwB,CAAC,CAAC,CAAC,CAACc,qBAAqB,CAAC;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,CAAC;MACE,CAAC,CAAC;MACFnB,EAAE,CAAC,gCAAgC,EAAE,MAAM;QACvCO,wBAAwB,CAAC;UACrBE,OAAO,EAAE,KAAK;UACdiB,IAAI,EAAE;QACV,CAAC,CAAC;QACF3B,MAAM,CAACM,wBAAwB,CAAC,CAAC,CAAC,CAACc,qBAAqB,CAAC;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,CAAC;QACMpB,MAAM,CAAC,MAAM;UACTG,eAAe,CAAC;YACZO,OAAO,EAAE,KAAK;YACde,UAAU,EAAE;cACRC,GAAG,EAAE;YACT;UACJ,CAAC,CAAC;QACN,CAAC,CAAC,CAACP,kCAAkC,CAAC,iFAAiF,CAAC;MAC5H,CAAC,CAAC;IACN,CAAC,CAAC;IACFlB,EAAE,CAAC,uDAAuD,EAAE,MAAM;MAC9D,MAAM2B,eAAe,GAAGzB,eAAe,CAAC;QACpCO,OAAO,EAAE,iBAAiB;QAC1Be,UAAU,EAAE;UACRI,SAAS,EAAE;QACf;MACJ,CAAC,CAAC;MACqB1B,eAAe,CAAC;QACnCO,OAAO,EAAE,gBAAgB;QACzBe,UAAU,EAAE;UACRK,SAAS,EAAE;QACf,CAAC;QACDC,OAAO,EAAE,CAACH,eAAe;MAC7B,CAAC,CAAC;MACF5B,MAAM,CAACM,wBAAwB,CAAC,CAAC,CAAC,CAACc,qBAAqB,CAAC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,CAAC;IACA,CAAC,CAAC;IACFnB,EAAE,CAAC,iDAAiD,EAAE,MAAM;MAChCE,eAAe,CAAC;QACpCO,OAAO,EAAE,iBAAiB;QAC1Be,UAAU,EAAE;UACRI,SAAS,EAAE;QACf;MACJ,CAAC,CAAC;MACqB1B,eAAe,CAAC;QACnCO,OAAO,EAAE,gBAAgB;QACzBe,UAAU,EAAE;UACRK,SAAS,EAAE;QACf,CAAC;QACDC,OAAO,EAAE,CAAC,iBAAiB;MAC/B,CAAC,CAAC;MACF/B,MAAM,CAACM,wBAAwB,CAAC,CAAC,CAAC,CAACc,qBAAqB,CAAC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,CAAC;IACA,CAAC,CAAC;EACN,CAAC,CAAC;EACFrB,QAAQ,CAAC,MAAM,EAAE,MAAM;IACnB,IAAIiC,CAAC;IACL,IAAIC,CAAC;IACLnC,UAAU,CAAC,MAAM;MACbkC,CAAC,GAAG7B,eAAe,CAAC;QAAEO,OAAO,EAAE;MAAI,CAAC,CAAC;MACrCuB,CAAC,GAAG9B,eAAe,CAAC;QAAEO,OAAO,EAAE;MAAI,CAAC,CAAC;IACzC,CAAC,CAAC;IACFT,EAAE,CAAC,mBAAmB,EAAE,MAAM;MAC1BD,MAAM,CAACgC,CAAC,CAAC,CAACE,GAAG,CAACC,aAAa,CAAC,CAAC;MAC7B/B,6BAA6B,CAAC;QAC1BgC,IAAI,EAAEJ,CAAC;QACPK,KAAK,EAAEJ,CAAC;QACRvB,OAAO,EAAE;MACb,CAAC,CAAC;MACFV,MAAM,CAACM,wBAAwB,CAAC,CAAC,CAAC,CAACc,qBAAqB,CAAC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,CAAC;IACA,CAAC,CAAC;IACFnB,EAAE,CAAC,iBAAiB,EAAE,MAAM;MACxBG,6BAA6B,CAAC;QAC1BgC,IAAI,EAAEJ,CAAC;QACPM,MAAM,EAAEL,CAAC;QACTvB,OAAO,EAAE;MACb,CAAC,CAAC;MACFV,MAAM,CAACM,wBAAwB,CAAC,CAAC,CAAC,CAACc,qBAAqB,CAAC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,CAAC;IACA,CAAC,CAAC;EACN,CAAC,CAAC;EACFrB,QAAQ,CAAC,MAAM,EAAE,MAAM;IACnBE,EAAE,CAAC,2CAA2C,EAAE,MAAM;MAClDO,wBAAwB,CAAC;QACrBE,OAAO,EAAE,KAAK;QACdiB,IAAI,EAAE;MACV,CAAC,CAAC;MACF3B,MAAM,CAAC,MAAM;QACTQ,wBAAwB,CAAC;UACrBE,OAAO,EAAE,KAAK;UACdiB,IAAI,EAAE;QACV,CAAC,CAAC;MACN,CAAC,CAAC,CAACR,kCAAkC,CAAC,iFAAiF,CAAC;IAC5H,CAAC,CAAC;EACN,CAAC,CAAC;EACFlB,EAAE,CAAC,uBAAuB,EAAE,MAAM;IAC9B,MAAMsC,MAAM,GAAG/B,wBAAwB,CAAC;MACpCE,OAAO,EAAE,QAAQ;MACjBiB,IAAI,EAAE;IACV,CAAC,CAAC;IACmBxB,eAAe,CAAC;MACjCO,OAAO,EAAE,cAAc;MACvBC,WAAW,EAAE,eAAe;MAC5Bc,UAAU,EAAE;QACRc;MACJ,CAAC;MACDC,IAAI,EAAE;QAAEC,KAAK,EAAE,QAAQ;QAAEC,OAAO,EAAE;MAAW;IACjD,CAAC,CAAC;IACF1C,MAAM,CAACM,wBAAwB,CAAC,CAAC,CAAC,CAACc,qBAAqB,CAAC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACF,CAAC,CAAC;EACFnB,EAAE,CAAC,+CAA+C,EAAE,MAAM;IACvCO,wBAAwB,CAAC;MACpCE,OAAO,EAAE,QAAQ;MACjBiB,IAAI,EAAE;QACFA,IAAI,EAAE,QAAQ;QACdgB,gBAAgB,EAAE;UACd,gBAAgB,EAAE,SAAS;UAC3B,iBAAiB,EAAE;YACfC,SAAS,EAAE,MAAM;YACjBtB,eAAe,EAAE;cACbX,WAAW,EAAE,kBAAkB;cAC/Ba,WAAW,EAAEqB;YACjB;UACJ;QACJ;MACJ;IACJ,CAAC,CAAC;IACF7C,MAAM,CAACM,wBAAwB,CAAC,CAAC,CAAC,CAACc,qBAAqB,CAAC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,CAAC;EACJ,CAAC,CAAC;EACFnB,EAAE,CAAC,qDAAqD,EAAE,MAAM;IAC5D,MAAM6C,UAAU,GAAGtC,wBAAwB,CAAC;MACxCE,OAAO,EAAE,KAAK;MACdiB,IAAI,EAAE;QAAEA,IAAI,EAAE,SAAS;QAAEoB,WAAW,EAAE;MAAO;IACjD,CAAC,CAAC;IACF,MAAMC,WAAW,GAAG9C,wBAAwB,CAAC;MACzCQ,OAAO,EAAE,KAAK;MACduC,QAAQ,EAAE;IACd,CAAC,CAAC;IACF9C,eAAe,CAAC;MACZO,OAAO,EAAE,WAAW;MACpBe,UAAU,EAAE;QAAEC,GAAG,EAAEoB,UAAU;QAAEI,GAAG,EAAEF;MAAY;IACpD,CAAC,CAAC;IACFhD,MAAM,CAACM,wBAAwB,CAAC,CAAC,CAAC,CAACc,qBAAqB,CAAC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,CAAC;EACJ,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
|
package/build/esm/cli/main.js
CHANGED
|
@@ -26,7 +26,7 @@ import { defineOntology } from "../api/defineOntology.js";
|
|
|
26
26
|
import { defineSharedPropertyType } from "../api/defineSpt.js";
|
|
27
27
|
const apiNamespaceRegex = /^[a-z0-9-]+(\.[a-z0-9-]+)*\.$/;
|
|
28
28
|
export default async function main(args = process.argv) {
|
|
29
|
-
const commandLineOpts = await yargs(hideBin(args)).version("0.9.0-beta.
|
|
29
|
+
const commandLineOpts = await yargs(hideBin(args)).version("0.9.0-beta.7" ?? "").wrap(Math.min(150, yargs().terminalWidth())).strict().help().options({
|
|
30
30
|
input: {
|
|
31
31
|
alias: "i",
|
|
32
32
|
describe: "Input file",
|
package/build/esm/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default as default } from "./cli/main.js";
|
|
2
|
+
export { importSharedPropertyType } from "./api/defineImportSpt.js";
|
|
2
3
|
export { defineInterface } from "./api/defineInterface.js";
|
|
3
4
|
export { defineInterfaceLinkConstraint } from "./api/defineInterfaceLinkConstraint.js";
|
|
4
5
|
export { defineSharedPropertyType } from "./api/defineSpt.js";
|
package/build/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC"}
|
package/build/esm/index.js
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
export { default } from "./cli/main.js";
|
|
17
|
+
export { importSharedPropertyType } from "./api/defineImportSpt.js";
|
|
17
18
|
export { defineInterface } from "./api/defineInterface.js";
|
|
18
19
|
export { defineInterfaceLinkConstraint } from "./api/defineInterfaceLinkConstraint.js";
|
|
19
20
|
export { defineSharedPropertyType } from "./api/defineSpt.js";
|
package/build/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","defineInterface","defineInterfaceLinkConstraint","defineSharedPropertyType","defineValueType"],"sources":["index.js"],"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 */\nexport { default as default } from \"./cli/main.js\";\nexport { defineInterface } from \"./api/defineInterface.js\";\nexport { defineInterfaceLinkConstraint } from \"./api/defineInterfaceLinkConstraint.js\";\nexport { defineSharedPropertyType } from \"./api/defineSpt.js\";\nexport { defineValueType } from \"./api/defineValueType.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,OAAkB,QAAQ,eAAe;AAClD,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,6BAA6B,QAAQ,wCAAwC;AACtF,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,eAAe,QAAQ,0BAA0B","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","importSharedPropertyType","defineInterface","defineInterfaceLinkConstraint","defineSharedPropertyType","defineValueType"],"sources":["index.js"],"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 */\nexport { default as default } from \"./cli/main.js\";\nexport { importSharedPropertyType } from \"./api/defineImportSpt.js\";\nexport { defineInterface } from \"./api/defineInterface.js\";\nexport { defineInterfaceLinkConstraint } from \"./api/defineInterfaceLinkConstraint.js\";\nexport { defineSharedPropertyType } from \"./api/defineSpt.js\";\nexport { defineValueType } from \"./api/defineValueType.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,OAAkB,QAAQ,eAAe;AAClD,SAASC,wBAAwB,QAAQ,0BAA0B;AACnE,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,6BAA6B,QAAQ,wCAAwC;AACtF,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,eAAe,QAAQ,0BAA0B","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/maker",
|
|
3
|
-
"version": "0.9.0-beta.
|
|
3
|
+
"version": "0.9.0-beta.7",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,17 +24,17 @@
|
|
|
24
24
|
"tiny-invariant": "^1.3.3",
|
|
25
25
|
"ts-node": "^10.9.2",
|
|
26
26
|
"yargs": "^17.7.2",
|
|
27
|
-
"@osdk/api": "~2.1.0-beta.
|
|
27
|
+
"@osdk/api": "~2.1.0-beta.7"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@osdk/internal.foundry.core": "2.
|
|
30
|
+
"@osdk/internal.foundry.core": "2.3.0",
|
|
31
31
|
"@types/yargs": "^17.0.32",
|
|
32
32
|
"typescript": "~5.5.4",
|
|
33
33
|
"vitest": "^2.1.2",
|
|
34
|
-
"@osdk/client.unstable": "~2.1.0-beta.6",
|
|
35
34
|
"@osdk/monorepo.api-extractor": "~0.0.0",
|
|
36
35
|
"@osdk/monorepo.tsconfig": "~0.0.0",
|
|
37
|
-
"@osdk/monorepo.tsup": "~0.0.0"
|
|
36
|
+
"@osdk/monorepo.tsup": "~0.0.0",
|
|
37
|
+
"@osdk/client.unstable": "~2.1.0-beta.7"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|