@osdk/maker 0.11.0-beta.9 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/CHANGELOG.md +168 -0
  2. package/build/browser/api/addDependency.js +20 -4
  3. package/build/browser/api/addDependency.js.map +1 -1
  4. package/build/browser/api/defineAction.js +7 -6
  5. package/build/browser/api/defineAction.js.map +1 -1
  6. package/build/browser/api/defineInterface.js +6 -5
  7. package/build/browser/api/defineInterface.js.map +1 -1
  8. package/build/browser/api/defineObject.js +20 -14
  9. package/build/browser/api/defineObject.js.map +1 -1
  10. package/build/browser/api/defineOntology.js +19 -13
  11. package/build/browser/api/defineOntology.js.map +1 -1
  12. package/build/browser/api/overall.test.js +1342 -718
  13. package/build/browser/api/overall.test.js.map +1 -1
  14. package/build/browser/api/types.js.map +1 -1
  15. package/build/browser/cli/main.js +1 -1
  16. package/build/browser/cli/main.js.map +1 -1
  17. package/build/cjs/index.cjs +81 -62
  18. package/build/cjs/index.cjs.map +1 -1
  19. package/build/cjs/index.d.cts +3 -2
  20. package/build/esm/api/addDependency.js +20 -4
  21. package/build/esm/api/addDependency.js.map +1 -1
  22. package/build/esm/api/defineAction.js +7 -6
  23. package/build/esm/api/defineAction.js.map +1 -1
  24. package/build/esm/api/defineInterface.js +6 -5
  25. package/build/esm/api/defineInterface.js.map +1 -1
  26. package/build/esm/api/defineObject.js +20 -14
  27. package/build/esm/api/defineObject.js.map +1 -1
  28. package/build/esm/api/defineOntology.js +19 -13
  29. package/build/esm/api/defineOntology.js.map +1 -1
  30. package/build/esm/api/overall.test.js +1342 -718
  31. package/build/esm/api/overall.test.js.map +1 -1
  32. package/build/esm/api/types.js.map +1 -1
  33. package/build/esm/cli/main.js +1 -1
  34. package/build/esm/cli/main.js.map +1 -1
  35. package/build/types/api/addDependency.d.ts +1 -1
  36. package/build/types/api/addDependency.d.ts.map +1 -1
  37. package/build/types/api/defineAction.d.ts.map +1 -1
  38. package/build/types/api/defineInterface.d.ts +1 -0
  39. package/build/types/api/defineInterface.d.ts.map +1 -1
  40. package/build/types/api/defineObject.d.ts +2 -1
  41. package/build/types/api/defineObject.d.ts.map +1 -1
  42. package/build/types/api/defineOntology.d.ts +1 -0
  43. package/build/types/api/defineOntology.d.ts.map +1 -1
  44. package/build/types/api/types.d.ts +1 -1
  45. package/build/types/api/types.d.ts.map +1 -1
  46. package/package.json +5 -5
@@ -16,7 +16,9 @@
16
16
 
17
17
  import * as fs from "fs";
18
18
  import path from "path";
19
+ import { fileURLToPath } from "url";
19
20
  import { beforeEach, describe, expect, it } from "vitest";
21
+ import { addDependency } from "./addDependency.js";
20
22
  import { defineAction, defineCreateInterfaceObjectAction, defineCreateObjectAction, defineDeleteObjectAction, defineModifyInterfaceObjectAction, defineModifyObjectAction } from "./defineAction.js";
21
23
  import { importSharedPropertyType } from "./defineImportSpt.js";
22
24
  import { defineInterface } from "./defineInterface.js";
@@ -214,6 +216,7 @@ describe("Ontology Defining", () => {
214
216
  "allLinks": [],
215
217
  "allProperties": [],
216
218
  "allPropertiesV2": {},
219
+ "allPropertiesV3": {},
217
220
  "apiName": "com.palantir.Foo",
218
221
  "displayMetadata": {
219
222
  "description": "Foo",
@@ -262,6 +265,8 @@ describe("Ontology Defining", () => {
262
265
  },
263
266
  },
264
267
  },
268
+ "propertiesV3": {},
269
+ "searchable": true,
265
270
  "status": {
266
271
  "active": {},
267
272
  "type": "active",
@@ -407,6 +412,7 @@ describe("Ontology Defining", () => {
407
412
  "allLinks": [],
408
413
  "allProperties": [],
409
414
  "allPropertiesV2": {},
415
+ "allPropertiesV3": {},
410
416
  "apiName": "com.palantir.childInterface",
411
417
  "displayMetadata": {
412
418
  "description": "childInterface",
@@ -457,6 +463,8 @@ describe("Ontology Defining", () => {
457
463
  },
458
464
  },
459
465
  },
466
+ "propertiesV3": {},
467
+ "searchable": true,
460
468
  "status": {
461
469
  "active": {},
462
470
  "type": "active",
@@ -469,6 +477,7 @@ describe("Ontology Defining", () => {
469
477
  "allLinks": [],
470
478
  "allProperties": [],
471
479
  "allPropertiesV2": {},
480
+ "allPropertiesV3": {},
472
481
  "apiName": "com.palantir.parentInterface",
473
482
  "displayMetadata": {
474
483
  "description": "parentInterface",
@@ -517,6 +526,8 @@ describe("Ontology Defining", () => {
517
526
  },
518
527
  },
519
528
  },
529
+ "propertiesV3": {},
530
+ "searchable": true,
520
531
  "status": {
521
532
  "active": {},
522
533
  "type": "active",
@@ -628,6 +639,7 @@ describe("Ontology Defining", () => {
628
639
  "allLinks": [],
629
640
  "allProperties": [],
630
641
  "allPropertiesV2": {},
642
+ "allPropertiesV3": {},
631
643
  "apiName": "com.palantir.parentInterface",
632
644
  "displayMetadata": {
633
645
  "description": "parentInterface",
@@ -676,6 +688,8 @@ describe("Ontology Defining", () => {
676
688
  },
677
689
  },
678
690
  },
691
+ "propertiesV3": {},
692
+ "searchable": true,
679
693
  "status": {
680
694
  "active": {},
681
695
  "type": "active",
@@ -755,6 +769,7 @@ describe("Ontology Defining", () => {
755
769
  "allLinks": [],
756
770
  "allProperties": [],
757
771
  "allPropertiesV2": {},
772
+ "allPropertiesV3": {},
758
773
  "apiName": "com.palantir.childInterface",
759
774
  "displayMetadata": {
760
775
  "description": "childInterface",
@@ -805,6 +820,8 @@ describe("Ontology Defining", () => {
805
820
  },
806
821
  },
807
822
  },
823
+ "propertiesV3": {},
824
+ "searchable": true,
808
825
  "status": {
809
826
  "active": {},
810
827
  "type": "active",
@@ -817,6 +834,7 @@ describe("Ontology Defining", () => {
817
834
  "allLinks": [],
818
835
  "allProperties": [],
819
836
  "allPropertiesV2": {},
837
+ "allPropertiesV3": {},
820
838
  "apiName": "com.palantir.parentInterface",
821
839
  "displayMetadata": {
822
840
  "description": "parentInterface",
@@ -865,6 +883,8 @@ describe("Ontology Defining", () => {
865
883
  },
866
884
  },
867
885
  },
886
+ "propertiesV3": {},
887
+ "searchable": true,
868
888
  "status": {
869
889
  "active": {},
870
890
  "type": "active",
@@ -951,6 +971,52 @@ describe("Ontology Defining", () => {
951
971
  }
952
972
  `);
953
973
  });
974
+ it("supports specifying searchable", () => {
975
+ defineInterface({
976
+ apiName: "parentInterface",
977
+ searchable: false
978
+ });
979
+ expect(dumpOntologyFullMetadata().blockData).toMatchInlineSnapshot(`
980
+ {
981
+ "actionTypes": {},
982
+ "blockPermissionInformation": {
983
+ "actionTypes": {},
984
+ "linkTypes": {},
985
+ "objectTypes": {},
986
+ },
987
+ "interfaceTypes": {
988
+ "com.palantir.parentInterface": {
989
+ "interfaceType": {
990
+ "allExtendsInterfaces": [],
991
+ "allLinks": [],
992
+ "allProperties": [],
993
+ "allPropertiesV2": {},
994
+ "allPropertiesV3": {},
995
+ "apiName": "com.palantir.parentInterface",
996
+ "displayMetadata": {
997
+ "description": "parentInterface",
998
+ "displayName": "parentInterface",
999
+ "icon": undefined,
1000
+ },
1001
+ "extendsInterfaces": [],
1002
+ "links": [],
1003
+ "properties": [],
1004
+ "propertiesV2": {},
1005
+ "propertiesV3": {},
1006
+ "searchable": false,
1007
+ "status": {
1008
+ "active": {},
1009
+ "type": "active",
1010
+ },
1011
+ },
1012
+ },
1013
+ },
1014
+ "linkTypes": {},
1015
+ "objectTypes": {},
1016
+ "sharedPropertyTypes": {},
1017
+ }
1018
+ `);
1019
+ });
954
1020
  });
955
1021
  describe("ILTs", () => {
956
1022
  let a;
@@ -985,6 +1051,7 @@ describe("Ontology Defining", () => {
985
1051
  "allLinks": [],
986
1052
  "allProperties": [],
987
1053
  "allPropertiesV2": {},
1054
+ "allPropertiesV3": {},
988
1055
  "apiName": "com.palantir.A",
989
1056
  "displayMetadata": {
990
1057
  "description": "A",
@@ -1009,6 +1076,8 @@ describe("Ontology Defining", () => {
1009
1076
  ],
1010
1077
  "properties": [],
1011
1078
  "propertiesV2": {},
1079
+ "propertiesV3": {},
1080
+ "searchable": true,
1012
1081
  "status": {
1013
1082
  "active": {},
1014
1083
  "type": "active",
@@ -1021,6 +1090,7 @@ describe("Ontology Defining", () => {
1021
1090
  "allLinks": [],
1022
1091
  "allProperties": [],
1023
1092
  "allPropertiesV2": {},
1093
+ "allPropertiesV3": {},
1024
1094
  "apiName": "com.palantir.B",
1025
1095
  "displayMetadata": {
1026
1096
  "description": "B",
@@ -1031,6 +1101,8 @@ describe("Ontology Defining", () => {
1031
1101
  "links": [],
1032
1102
  "properties": [],
1033
1103
  "propertiesV2": {},
1104
+ "propertiesV3": {},
1105
+ "searchable": true,
1034
1106
  "status": {
1035
1107
  "active": {},
1036
1108
  "type": "active",
@@ -1065,6 +1137,7 @@ describe("Ontology Defining", () => {
1065
1137
  "allLinks": [],
1066
1138
  "allProperties": [],
1067
1139
  "allPropertiesV2": {},
1140
+ "allPropertiesV3": {},
1068
1141
  "apiName": "com.palantir.A",
1069
1142
  "displayMetadata": {
1070
1143
  "description": "A",
@@ -1089,6 +1162,8 @@ describe("Ontology Defining", () => {
1089
1162
  ],
1090
1163
  "properties": [],
1091
1164
  "propertiesV2": {},
1165
+ "propertiesV3": {},
1166
+ "searchable": true,
1092
1167
  "status": {
1093
1168
  "active": {},
1094
1169
  "type": "active",
@@ -1101,6 +1176,7 @@ describe("Ontology Defining", () => {
1101
1176
  "allLinks": [],
1102
1177
  "allProperties": [],
1103
1178
  "allPropertiesV2": {},
1179
+ "allPropertiesV3": {},
1104
1180
  "apiName": "com.palantir.B",
1105
1181
  "displayMetadata": {
1106
1182
  "description": "B",
@@ -1111,6 +1187,8 @@ describe("Ontology Defining", () => {
1111
1187
  "links": [],
1112
1188
  "properties": [],
1113
1189
  "propertiesV2": {},
1190
+ "propertiesV3": {},
1191
+ "searchable": true,
1114
1192
  "status": {
1115
1193
  "active": {},
1116
1194
  "type": "active",
@@ -1170,6 +1248,7 @@ describe("Ontology Defining", () => {
1170
1248
  "allLinks": [],
1171
1249
  "allProperties": [],
1172
1250
  "allPropertiesV2": {},
1251
+ "allPropertiesV3": {},
1173
1252
  "apiName": "com.palantir.FooInterface",
1174
1253
  "displayMetadata": {
1175
1254
  "description": "Foo Interface",
@@ -1224,6 +1303,8 @@ describe("Ontology Defining", () => {
1224
1303
  },
1225
1304
  },
1226
1305
  },
1306
+ "propertiesV3": {},
1307
+ "searchable": true,
1227
1308
  "status": {
1228
1309
  "active": {},
1229
1310
  "type": "active",
@@ -1388,6 +1469,7 @@ describe("Ontology Defining", () => {
1388
1469
  "allLinks": [],
1389
1470
  "allProperties": [],
1390
1471
  "allPropertiesV2": {},
1472
+ "allPropertiesV3": {},
1391
1473
  "apiName": "com.palantir.interface",
1392
1474
  "displayMetadata": {
1393
1475
  "description": "interface",
@@ -1436,6 +1518,8 @@ describe("Ontology Defining", () => {
1436
1518
  },
1437
1519
  },
1438
1520
  },
1521
+ "propertiesV3": {},
1522
+ "searchable": true,
1439
1523
  "status": {
1440
1524
  "active": {},
1441
1525
  "type": "active",
@@ -1579,7 +1663,7 @@ describe("Ontology Defining", () => {
1579
1663
  implementsInterfaces: [{
1580
1664
  implements: sample,
1581
1665
  propertyMapping: [{
1582
- interfaceProperty: "foo",
1666
+ interfaceProperty: "com.palantir.foo",
1583
1667
  mapsTo: "fizz"
1584
1668
  }]
1585
1669
  }]
@@ -1600,15 +1684,15 @@ describe("Ontology Defining", () => {
1600
1684
  implementsInterfaces: [{
1601
1685
  implements: sample,
1602
1686
  propertyMapping: [{
1603
- interfaceProperty: "fizz",
1687
+ interfaceProperty: "com.palantir.fizz",
1604
1688
  mapsTo: "bar"
1605
1689
  }, {
1606
- interfaceProperty: "foo",
1690
+ interfaceProperty: "com.palantir.foo",
1607
1691
  mapsTo: "bar"
1608
1692
  }]
1609
1693
  }]
1610
1694
  });
1611
- }).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: \nOntology Definition Error: Interface property com.palantir.interface.fizz referenced in foo object does not exist\n]`);
1695
+ }).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: \nOntology Definition Error: Interface property com.palantir.fizz referenced in foo object does not exist\n]`);
1612
1696
  });
1613
1697
  it("Objects properly defined", () => {
1614
1698
  const spt = defineSharedPropertyType({
@@ -1631,6 +1715,11 @@ describe("Ontology Defining", () => {
1631
1715
  apiName: "bar",
1632
1716
  type: "string",
1633
1717
  displayName: "Bar"
1718
+ }, {
1719
+ apiName: "arrayProp",
1720
+ type: "string",
1721
+ array: true,
1722
+ displayName: "Array Property Test"
1634
1723
  }, {
1635
1724
  apiName: "geopoint",
1636
1725
  type: {
@@ -1665,6 +1754,7 @@ describe("Ontology Defining", () => {
1665
1754
  "allLinks": [],
1666
1755
  "allProperties": [],
1667
1756
  "allPropertiesV2": {},
1757
+ "allPropertiesV3": {},
1668
1758
  "apiName": "com.palantir.interface",
1669
1759
  "displayMetadata": {
1670
1760
  "description": "interface",
@@ -1713,6 +1803,8 @@ describe("Ontology Defining", () => {
1713
1803
  },
1714
1804
  },
1715
1805
  },
1806
+ "propertiesV3": {},
1807
+ "searchable": true,
1716
1808
  "status": {
1717
1809
  "active": {},
1718
1810
  "type": "active",
@@ -1729,6 +1821,10 @@ describe("Ontology Defining", () => {
1729
1821
  "datasetV2": {
1730
1822
  "datasetRid": "com.palantir.foo",
1731
1823
  "propertyMapping": {
1824
+ "arrayProp": {
1825
+ "column": "arrayProp",
1826
+ "type": "column",
1827
+ },
1732
1828
  "bar": {
1733
1829
  "column": "bar",
1734
1830
  "type": "column",
@@ -1794,6 +1890,51 @@ describe("Ontology Defining", () => {
1794
1890
  "bar",
1795
1891
  ],
1796
1892
  "propertyTypes": {
1893
+ "arrayProp": {
1894
+ "apiName": "arrayProp",
1895
+ "baseFormatter": undefined,
1896
+ "dataConstraints": undefined,
1897
+ "displayMetadata": {
1898
+ "description": undefined,
1899
+ "displayName": "Array Property Test",
1900
+ "visibility": "NORMAL",
1901
+ },
1902
+ "indexedForSearch": true,
1903
+ "inlineAction": undefined,
1904
+ "ruleSetBinding": undefined,
1905
+ "sharedPropertyTypeApiName": undefined,
1906
+ "sharedPropertyTypeRid": undefined,
1907
+ "status": {
1908
+ "active": {},
1909
+ "type": "active",
1910
+ },
1911
+ "type": {
1912
+ "array": {
1913
+ "subtype": {
1914
+ "string": {
1915
+ "analyzerOverride": undefined,
1916
+ "enableAsciiFolding": undefined,
1917
+ "isLongText": false,
1918
+ "supportsEfficientLeadingWildcard": false,
1919
+ "supportsExactMatching": true,
1920
+ },
1921
+ "type": "string",
1922
+ },
1923
+ },
1924
+ "type": "array",
1925
+ },
1926
+ "typeClasses": [
1927
+ {
1928
+ "kind": "render_hint",
1929
+ "name": "SELECTABLE",
1930
+ },
1931
+ {
1932
+ "kind": "render_hint",
1933
+ "name": "SORTABLE",
1934
+ },
1935
+ ],
1936
+ "valueType": undefined,
1937
+ },
1797
1938
  "bar": {
1798
1939
  "apiName": "bar",
1799
1940
  "baseFormatter": undefined,
@@ -4018,144 +4159,145 @@ describe("Ontology Defining", () => {
4018
4159
  }]
4019
4160
  });
4020
4161
  expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
4021
- {
4022
- "blockData": {
4023
- "actionTypes": {
4024
- "com.palantir.foo": {
4025
- "actionType": {
4026
- "actionTypeLogic": {
4027
- "logic": {
4028
- "rules": [
4029
- {
4030
- "addInterfaceRule": {
4031
- "interfaceApiName": "com.palantir.foo",
4032
- "objectTypeParameter": "param1",
4033
- "sharedPropertyValues": {},
4034
- },
4035
- "type": "addInterfaceRule",
4036
- },
4037
- ],
4038
- },
4039
- "validation": {
4040
- "actionTypeLevelValidation": {
4041
- "rules": {
4042
- "0": {
4043
- "condition": {
4044
- "true": {},
4045
- "type": "true",
4046
- },
4047
- "displayMetadata": {
4048
- "failureMessage": "",
4049
- "typeClasses": [],
4162
+ {
4163
+ "blockData": {
4164
+ "actionTypes": {
4165
+ "com.palantir.foo": {
4166
+ "actionType": {
4167
+ "actionTypeLogic": {
4168
+ "logic": {
4169
+ "rules": [
4170
+ {
4171
+ "addInterfaceRule": {
4172
+ "interfaceApiName": "com.palantir.foo",
4173
+ "objectTypeParameter": "param1",
4174
+ "sharedPropertyValues": {},
4050
4175
  },
4176
+ "type": "addInterfaceRule",
4051
4177
  },
4052
- },
4178
+ ],
4053
4179
  },
4054
- "parameterValidations": {
4055
- "param1": {
4056
- "defaultValidation": {
4057
- "display": {
4058
- "renderHint": {
4059
- "checkbox": {},
4060
- "type": "checkbox",
4180
+ "validation": {
4181
+ "actionTypeLevelValidation": {
4182
+ "rules": {
4183
+ "0": {
4184
+ "condition": {
4185
+ "true": {},
4186
+ "type": "true",
4061
4187
  },
4062
- "visibility": {
4063
- "editable": {},
4064
- "type": "editable",
4188
+ "displayMetadata": {
4189
+ "failureMessage": "",
4190
+ "typeClasses": [],
4065
4191
  },
4066
4192
  },
4067
- "validation": {
4068
- "allowedValues": {
4069
- "boolean": {
4070
- "boolean": {},
4071
- "type": "boolean",
4193
+ },
4194
+ },
4195
+ "parameterValidations": {
4196
+ "param1": {
4197
+ "conditionalOverrides": [],
4198
+ "defaultValidation": {
4199
+ "display": {
4200
+ "renderHint": {
4201
+ "checkbox": {},
4202
+ "type": "checkbox",
4203
+ },
4204
+ "visibility": {
4205
+ "editable": {},
4206
+ "type": "editable",
4072
4207
  },
4073
- "type": "boolean",
4074
4208
  },
4075
- "required": {
4076
- "required": {},
4077
- "type": "required",
4209
+ "validation": {
4210
+ "allowedValues": {
4211
+ "boolean": {
4212
+ "boolean": {},
4213
+ "type": "boolean",
4214
+ },
4215
+ "type": "boolean",
4216
+ },
4217
+ "required": {
4218
+ "required": {},
4219
+ "type": "required",
4220
+ },
4078
4221
  },
4079
4222
  },
4080
4223
  },
4081
4224
  },
4082
4225
  },
4083
4226
  },
4084
- },
4085
- "metadata": {
4086
- "apiName": "com.palantir.foo",
4087
- "displayMetadata": {
4088
- "configuration": {
4089
- "defaultLayout": "FORM",
4090
- "displayAndFormat": {
4091
- "table": {
4092
- "columnWidthByParameterRid": {},
4093
- "enableFileImport": true,
4094
- "fitHorizontally": false,
4095
- "frozenColumnCount": 0,
4096
- "rowHeightInLines": 1,
4227
+ "metadata": {
4228
+ "apiName": "com.palantir.foo",
4229
+ "displayMetadata": {
4230
+ "configuration": {
4231
+ "defaultLayout": "FORM",
4232
+ "displayAndFormat": {
4233
+ "table": {
4234
+ "columnWidthByParameterRid": {},
4235
+ "enableFileImport": true,
4236
+ "fitHorizontally": false,
4237
+ "frozenColumnCount": 0,
4238
+ "rowHeightInLines": 1,
4239
+ },
4097
4240
  },
4241
+ "enableLayoutUserSwitch": false,
4098
4242
  },
4099
- "enableLayoutUserSwitch": false,
4100
- },
4101
- "description": "",
4102
- "displayName": "exampleAction",
4103
- "icon": {
4104
- "blueprint": {
4105
- "color": "#000000",
4106
- "locator": "edit",
4243
+ "description": "",
4244
+ "displayName": "exampleAction",
4245
+ "icon": {
4246
+ "blueprint": {
4247
+ "color": "#000000",
4248
+ "locator": "edit",
4249
+ },
4250
+ "type": "blueprint",
4107
4251
  },
4108
- "type": "blueprint",
4252
+ "successMessage": [],
4253
+ "typeClasses": [],
4109
4254
  },
4110
- "successMessage": [],
4111
- "typeClasses": [],
4112
- },
4113
- "formContentOrdering": [],
4114
- "parameterOrdering": [
4115
- "param1",
4116
- ],
4117
- "parameters": {
4118
- "param1": {
4119
- "displayMetadata": {
4120
- "description": "",
4121
- "displayName": "param1",
4122
- "typeClasses": [],
4123
- },
4124
- "id": "param1",
4125
- "type": {
4126
- "boolean": {},
4127
- "type": "boolean",
4255
+ "formContentOrdering": [],
4256
+ "parameterOrdering": [
4257
+ "param1",
4258
+ ],
4259
+ "parameters": {
4260
+ "param1": {
4261
+ "displayMetadata": {
4262
+ "description": "",
4263
+ "displayName": "param1",
4264
+ "typeClasses": [],
4265
+ },
4266
+ "id": "param1",
4267
+ "type": {
4268
+ "boolean": {},
4269
+ "type": "boolean",
4270
+ },
4128
4271
  },
4129
4272
  },
4130
- },
4131
- "sections": {},
4132
- "status": {
4133
- "active": {},
4134
- "type": "active",
4273
+ "sections": {},
4274
+ "status": {
4275
+ "active": {},
4276
+ "type": "active",
4277
+ },
4135
4278
  },
4136
4279
  },
4137
4280
  },
4138
4281
  },
4139
- },
4140
- "blockPermissionInformation": {
4141
- "actionTypes": {},
4282
+ "blockPermissionInformation": {
4283
+ "actionTypes": {},
4284
+ "linkTypes": {},
4285
+ "objectTypes": {},
4286
+ },
4287
+ "interfaceTypes": {},
4142
4288
  "linkTypes": {},
4143
4289
  "objectTypes": {},
4290
+ "sharedPropertyTypes": {},
4144
4291
  },
4145
- "interfaceTypes": {},
4146
- "linkTypes": {},
4147
- "objectTypes": {},
4148
- "sharedPropertyTypes": {},
4149
- },
4150
- "importedTypes": {
4151
- "actionTypes": [],
4152
- "interfaceTypes": [],
4153
- "linkTypes": [],
4154
- "objectTypes": [],
4155
- "sharedPropertyTypes": [],
4156
- },
4157
- }
4158
- `);
4292
+ "importedTypes": {
4293
+ "actionTypes": [],
4294
+ "interfaceTypes": [],
4295
+ "linkTypes": [],
4296
+ "objectTypes": [],
4297
+ "sharedPropertyTypes": [],
4298
+ },
4299
+ }
4300
+ `);
4159
4301
  });
4160
4302
  it("Simple interface actions (with object types) are properly defined", () => {
4161
4303
  const exampleInterface = defineInterface({
@@ -4193,7 +4335,7 @@ describe("Ontology Defining", () => {
4193
4335
  "objectTypeParameter": "objectTypeParameter",
4194
4336
  "sharedPropertyValues": {
4195
4337
  "com.palantir.property1": {
4196
- "parameterId": "property1",
4338
+ "parameterId": "com.palantir.property1",
4197
4339
  "type": "parameterId",
4198
4340
  },
4199
4341
  },
@@ -4218,7 +4360,36 @@ describe("Ontology Defining", () => {
4218
4360
  },
4219
4361
  },
4220
4362
  "parameterValidations": {
4363
+ "com.palantir.property1": {
4364
+ "conditionalOverrides": [],
4365
+ "defaultValidation": {
4366
+ "display": {
4367
+ "renderHint": {
4368
+ "textInput": {},
4369
+ "type": "textInput",
4370
+ },
4371
+ "visibility": {
4372
+ "editable": {},
4373
+ "type": "editable",
4374
+ },
4375
+ },
4376
+ "validation": {
4377
+ "allowedValues": {
4378
+ "text": {
4379
+ "text": {},
4380
+ "type": "text",
4381
+ },
4382
+ "type": "text",
4383
+ },
4384
+ "required": {
4385
+ "required": {},
4386
+ "type": "required",
4387
+ },
4388
+ },
4389
+ },
4390
+ },
4221
4391
  "objectTypeParameter": {
4392
+ "conditionalOverrides": [],
4222
4393
  "defaultValidation": {
4223
4394
  "display": {
4224
4395
  "renderHint": {
@@ -4260,33 +4431,6 @@ describe("Ontology Defining", () => {
4260
4431
  },
4261
4432
  },
4262
4433
  },
4263
- "property1": {
4264
- "defaultValidation": {
4265
- "display": {
4266
- "renderHint": {
4267
- "textInput": {},
4268
- "type": "textInput",
4269
- },
4270
- "visibility": {
4271
- "editable": {},
4272
- "type": "editable",
4273
- },
4274
- },
4275
- "validation": {
4276
- "allowedValues": {
4277
- "text": {
4278
- "text": {},
4279
- "type": "text",
4280
- },
4281
- "type": "text",
4282
- },
4283
- "required": {
4284
- "required": {},
4285
- "type": "required",
4286
- },
4287
- },
4288
- },
4289
- },
4290
4434
  },
4291
4435
  },
4292
4436
  },
@@ -4321,9 +4465,21 @@ describe("Ontology Defining", () => {
4321
4465
  "formContentOrdering": [],
4322
4466
  "parameterOrdering": [
4323
4467
  "objectTypeParameter",
4324
- "property1",
4468
+ "com.palantir.property1",
4325
4469
  ],
4326
4470
  "parameters": {
4471
+ "com.palantir.property1": {
4472
+ "displayMetadata": {
4473
+ "description": "",
4474
+ "displayName": "property1",
4475
+ "typeClasses": [],
4476
+ },
4477
+ "id": "com.palantir.property1",
4478
+ "type": {
4479
+ "string": {},
4480
+ "type": "string",
4481
+ },
4482
+ },
4327
4483
  "objectTypeParameter": {
4328
4484
  "displayMetadata": {
4329
4485
  "description": "",
@@ -4340,18 +4496,6 @@ describe("Ontology Defining", () => {
4340
4496
  "type": "objectTypeReference",
4341
4497
  },
4342
4498
  },
4343
- "property1": {
4344
- "displayMetadata": {
4345
- "description": "",
4346
- "displayName": "property1",
4347
- "typeClasses": [],
4348
- },
4349
- "id": "property1",
4350
- "type": {
4351
- "string": {},
4352
- "type": "string",
4353
- },
4354
- },
4355
4499
  },
4356
4500
  "sections": {},
4357
4501
  "status": {
@@ -4371,7 +4515,7 @@ describe("Ontology Defining", () => {
4371
4515
  "interfaceObjectToModifyParameter": "interfaceObjectToModifyParameter",
4372
4516
  "sharedPropertyValues": {
4373
4517
  "com.palantir.property1": {
4374
- "parameterId": "property1",
4518
+ "parameterId": "com.palantir.property1",
4375
4519
  "type": "parameterId",
4376
4520
  },
4377
4521
  },
@@ -4396,7 +4540,36 @@ describe("Ontology Defining", () => {
4396
4540
  },
4397
4541
  },
4398
4542
  "parameterValidations": {
4543
+ "com.palantir.property1": {
4544
+ "conditionalOverrides": [],
4545
+ "defaultValidation": {
4546
+ "display": {
4547
+ "renderHint": {
4548
+ "textInput": {},
4549
+ "type": "textInput",
4550
+ },
4551
+ "visibility": {
4552
+ "editable": {},
4553
+ "type": "editable",
4554
+ },
4555
+ },
4556
+ "validation": {
4557
+ "allowedValues": {
4558
+ "text": {
4559
+ "text": {},
4560
+ "type": "text",
4561
+ },
4562
+ "type": "text",
4563
+ },
4564
+ "required": {
4565
+ "required": {},
4566
+ "type": "required",
4567
+ },
4568
+ },
4569
+ },
4570
+ },
4399
4571
  "interfaceObjectToModifyParameter": {
4572
+ "conditionalOverrides": [],
4400
4573
  "defaultValidation": {
4401
4574
  "display": {
4402
4575
  "renderHint": {
@@ -4438,33 +4611,6 @@ describe("Ontology Defining", () => {
4438
4611
  },
4439
4612
  },
4440
4613
  },
4441
- "property1": {
4442
- "defaultValidation": {
4443
- "display": {
4444
- "renderHint": {
4445
- "textInput": {},
4446
- "type": "textInput",
4447
- },
4448
- "visibility": {
4449
- "editable": {},
4450
- "type": "editable",
4451
- },
4452
- },
4453
- "validation": {
4454
- "allowedValues": {
4455
- "text": {
4456
- "text": {},
4457
- "type": "text",
4458
- },
4459
- "type": "text",
4460
- },
4461
- "required": {
4462
- "required": {},
4463
- "type": "required",
4464
- },
4465
- },
4466
- },
4467
- },
4468
4614
  },
4469
4615
  },
4470
4616
  },
@@ -4499,33 +4645,33 @@ describe("Ontology Defining", () => {
4499
4645
  "formContentOrdering": [],
4500
4646
  "parameterOrdering": [
4501
4647
  "interfaceObjectToModifyParameter",
4502
- "property1",
4648
+ "com.palantir.property1",
4503
4649
  ],
4504
4650
  "parameters": {
4505
- "interfaceObjectToModifyParameter": {
4651
+ "com.palantir.property1": {
4506
4652
  "displayMetadata": {
4507
4653
  "description": "",
4508
- "displayName": "Object type to modify",
4654
+ "displayName": "property1",
4509
4655
  "typeClasses": [],
4510
4656
  },
4511
- "id": "interfaceObjectToModifyParameter",
4657
+ "id": "com.palantir.property1",
4512
4658
  "type": {
4513
- "interfaceReference": {
4514
- "interfaceTypeRid": "com.palantir.exampleInterface",
4515
- },
4516
- "type": "interfaceReference",
4659
+ "string": {},
4660
+ "type": "string",
4517
4661
  },
4518
4662
  },
4519
- "property1": {
4663
+ "interfaceObjectToModifyParameter": {
4520
4664
  "displayMetadata": {
4521
4665
  "description": "",
4522
- "displayName": "property1",
4666
+ "displayName": "Object type to modify",
4523
4667
  "typeClasses": [],
4524
4668
  },
4525
- "id": "property1",
4669
+ "id": "interfaceObjectToModifyParameter",
4526
4670
  "type": {
4527
- "string": {},
4528
- "type": "string",
4671
+ "interfaceReference": {
4672
+ "interfaceTypeRid": "com.palantir.exampleInterface",
4673
+ },
4674
+ "type": "interfaceReference",
4529
4675
  },
4530
4676
  },
4531
4677
  },
@@ -4550,6 +4696,7 @@ describe("Ontology Defining", () => {
4550
4696
  "allLinks": [],
4551
4697
  "allProperties": [],
4552
4698
  "allPropertiesV2": {},
4699
+ "allPropertiesV3": {},
4553
4700
  "apiName": "com.palantir.exampleInterface",
4554
4701
  "displayMetadata": {
4555
4702
  "description": "exampleInterface",
@@ -4598,6 +4745,8 @@ describe("Ontology Defining", () => {
4598
4745
  },
4599
4746
  },
4600
4747
  },
4748
+ "propertiesV3": {},
4749
+ "searchable": true,
4601
4750
  "status": {
4602
4751
  "active": {},
4603
4752
  "type": "active",
@@ -4785,148 +4934,149 @@ describe("Ontology Defining", () => {
4785
4934
  });
4786
4935
  expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
4787
4936
  {
4788
- "blockData": {
4789
- "actionTypes": {
4790
- "com.palantir.foo": {
4791
- "actionType": {
4792
- "actionTypeLogic": {
4793
- "logic": {
4794
- "rules": [
4795
- {
4796
- "addOrModifyObjectRuleV2": {
4797
- "objectToModify": "objectToModifyParameter",
4798
- "propertyValues": {
4799
- "bar": {
4800
- "parameterId": "param1",
4801
- "type": "parameterId",
4802
- },
4803
- },
4804
- "structFieldValues": {},
4805
- },
4806
- "type": "addOrModifyObjectRuleV2",
4807
- },
4808
- ],
4809
- },
4810
- "validation": {
4811
- "actionTypeLevelValidation": {
4812
- "rules": {
4813
- "0": {
4814
- "condition": {
4815
- "true": {},
4816
- "type": "true",
4817
- },
4818
- "displayMetadata": {
4819
- "failureMessage": "",
4820
- "typeClasses": [],
4821
- },
4822
- },
4823
- },
4824
- },
4825
- "parameterValidations": {
4826
- "param1": {
4827
- "defaultValidation": {
4828
- "display": {
4829
- "renderHint": {
4830
- "checkbox": {},
4831
- "type": "checkbox",
4832
- },
4833
- "visibility": {
4834
- "editable": {},
4835
- "type": "editable",
4836
- },
4837
- },
4838
- "validation": {
4839
- "allowedValues": {
4840
- "boolean": {
4841
- "boolean": {},
4842
- "type": "boolean",
4843
- },
4844
- "type": "boolean",
4845
- },
4846
- "required": {
4847
- "required": {},
4848
- "type": "required",
4849
- },
4850
- },
4851
- },
4852
- },
4853
- },
4854
- },
4855
- },
4856
- "metadata": {
4857
- "apiName": "com.palantir.foo",
4858
- "displayMetadata": {
4859
- "configuration": {
4860
- "defaultLayout": "FORM",
4861
- "displayAndFormat": {
4862
- "table": {
4863
- "columnWidthByParameterRid": {},
4864
- "enableFileImport": true,
4865
- "fitHorizontally": false,
4866
- "frozenColumnCount": 0,
4867
- "rowHeightInLines": 1,
4868
- },
4869
- },
4870
- "enableLayoutUserSwitch": false,
4871
- },
4872
- "description": "",
4873
- "displayName": "exampleAction",
4874
- "icon": {
4875
- "blueprint": {
4876
- "color": "#000000",
4877
- "locator": "edit",
4878
- },
4879
- "type": "blueprint",
4880
- },
4881
- "successMessage": [],
4882
- "typeClasses": [],
4883
- },
4884
- "formContentOrdering": [],
4885
- "parameterOrdering": [
4886
- "param1",
4887
- ],
4888
- "parameters": {
4889
- "param1": {
4890
- "displayMetadata": {
4891
- "description": "",
4892
- "displayName": "param1",
4893
- "typeClasses": [],
4894
- },
4895
- "id": "param1",
4896
- "type": {
4897
- "boolean": {},
4898
- "type": "boolean",
4899
- },
4900
- },
4901
- },
4902
- "sections": {},
4903
- "status": {
4904
- "active": {},
4905
- "type": "active",
4906
- },
4907
- },
4908
- },
4909
- },
4910
- },
4911
- "blockPermissionInformation": {
4912
- "actionTypes": {},
4913
- "linkTypes": {},
4914
- "objectTypes": {},
4915
- },
4916
- "interfaceTypes": {},
4917
- "linkTypes": {},
4918
- "objectTypes": {},
4919
- "sharedPropertyTypes": {},
4920
- },
4921
- "importedTypes": {
4922
- "actionTypes": [],
4923
- "interfaceTypes": [],
4924
- "linkTypes": [],
4925
- "objectTypes": [],
4926
- "sharedPropertyTypes": [],
4927
- },
4928
- }
4929
- `);
4937
+ "blockData": {
4938
+ "actionTypes": {
4939
+ "com.palantir.foo": {
4940
+ "actionType": {
4941
+ "actionTypeLogic": {
4942
+ "logic": {
4943
+ "rules": [
4944
+ {
4945
+ "addOrModifyObjectRuleV2": {
4946
+ "objectToModify": "objectToModifyParameter",
4947
+ "propertyValues": {
4948
+ "bar": {
4949
+ "parameterId": "param1",
4950
+ "type": "parameterId",
4951
+ },
4952
+ },
4953
+ "structFieldValues": {},
4954
+ },
4955
+ "type": "addOrModifyObjectRuleV2",
4956
+ },
4957
+ ],
4958
+ },
4959
+ "validation": {
4960
+ "actionTypeLevelValidation": {
4961
+ "rules": {
4962
+ "0": {
4963
+ "condition": {
4964
+ "true": {},
4965
+ "type": "true",
4966
+ },
4967
+ "displayMetadata": {
4968
+ "failureMessage": "",
4969
+ "typeClasses": [],
4970
+ },
4971
+ },
4972
+ },
4973
+ },
4974
+ "parameterValidations": {
4975
+ "param1": {
4976
+ "conditionalOverrides": [],
4977
+ "defaultValidation": {
4978
+ "display": {
4979
+ "renderHint": {
4980
+ "checkbox": {},
4981
+ "type": "checkbox",
4982
+ },
4983
+ "visibility": {
4984
+ "editable": {},
4985
+ "type": "editable",
4986
+ },
4987
+ },
4988
+ "validation": {
4989
+ "allowedValues": {
4990
+ "boolean": {
4991
+ "boolean": {},
4992
+ "type": "boolean",
4993
+ },
4994
+ "type": "boolean",
4995
+ },
4996
+ "required": {
4997
+ "required": {},
4998
+ "type": "required",
4999
+ },
5000
+ },
5001
+ },
5002
+ },
5003
+ },
5004
+ },
5005
+ },
5006
+ "metadata": {
5007
+ "apiName": "com.palantir.foo",
5008
+ "displayMetadata": {
5009
+ "configuration": {
5010
+ "defaultLayout": "FORM",
5011
+ "displayAndFormat": {
5012
+ "table": {
5013
+ "columnWidthByParameterRid": {},
5014
+ "enableFileImport": true,
5015
+ "fitHorizontally": false,
5016
+ "frozenColumnCount": 0,
5017
+ "rowHeightInLines": 1,
5018
+ },
5019
+ },
5020
+ "enableLayoutUserSwitch": false,
5021
+ },
5022
+ "description": "",
5023
+ "displayName": "exampleAction",
5024
+ "icon": {
5025
+ "blueprint": {
5026
+ "color": "#000000",
5027
+ "locator": "edit",
5028
+ },
5029
+ "type": "blueprint",
5030
+ },
5031
+ "successMessage": [],
5032
+ "typeClasses": [],
5033
+ },
5034
+ "formContentOrdering": [],
5035
+ "parameterOrdering": [
5036
+ "param1",
5037
+ ],
5038
+ "parameters": {
5039
+ "param1": {
5040
+ "displayMetadata": {
5041
+ "description": "",
5042
+ "displayName": "param1",
5043
+ "typeClasses": [],
5044
+ },
5045
+ "id": "param1",
5046
+ "type": {
5047
+ "boolean": {},
5048
+ "type": "boolean",
5049
+ },
5050
+ },
5051
+ },
5052
+ "sections": {},
5053
+ "status": {
5054
+ "active": {},
5055
+ "type": "active",
5056
+ },
5057
+ },
5058
+ },
5059
+ },
5060
+ },
5061
+ "blockPermissionInformation": {
5062
+ "actionTypes": {},
5063
+ "linkTypes": {},
5064
+ "objectTypes": {},
5065
+ },
5066
+ "interfaceTypes": {},
5067
+ "linkTypes": {},
5068
+ "objectTypes": {},
5069
+ "sharedPropertyTypes": {},
5070
+ },
5071
+ "importedTypes": {
5072
+ "actionTypes": [],
5073
+ "interfaceTypes": [],
5074
+ "linkTypes": [],
5075
+ "objectTypes": [],
5076
+ "sharedPropertyTypes": [],
5077
+ },
5078
+ }
5079
+ `);
4930
5080
  });
4931
5081
  it("Simple concrete actions are properly defined", () => {
4932
5082
  const exampleObjectType = defineObject({
@@ -4985,6 +5135,7 @@ describe("Ontology Defining", () => {
4985
5135
  },
4986
5136
  "parameterValidations": {
4987
5137
  "bar": {
5138
+ "conditionalOverrides": [],
4988
5139
  "defaultValidation": {
4989
5140
  "display": {
4990
5141
  "renderHint": {
@@ -5098,6 +5249,7 @@ describe("Ontology Defining", () => {
5098
5249
  },
5099
5250
  "parameterValidations": {
5100
5251
  "objectToDeleteParameter": {
5252
+ "conditionalOverrides": [],
5101
5253
  "defaultValidation": {
5102
5254
  "display": {
5103
5255
  "renderHint": {
@@ -5220,6 +5372,7 @@ describe("Ontology Defining", () => {
5220
5372
  },
5221
5373
  "parameterValidations": {
5222
5374
  "bar": {
5375
+ "conditionalOverrides": [],
5223
5376
  "defaultValidation": {
5224
5377
  "display": {
5225
5378
  "renderHint": {
@@ -5247,6 +5400,7 @@ describe("Ontology Defining", () => {
5247
5400
  },
5248
5401
  },
5249
5402
  "objectToModifyParameter": {
5403
+ "conditionalOverrides": [],
5250
5404
  "defaultValidation": {
5251
5405
  "display": {
5252
5406
  "renderHint": {
@@ -5523,331 +5677,406 @@ describe("Ontology Defining", () => {
5523
5677
  defineCreateInterfaceObjectAction(exampleInterface);
5524
5678
  defineModifyInterfaceObjectAction(exampleInterface);
5525
5679
  expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
5526
- {
5527
- "blockData": {
5528
- "actionTypes": {
5529
- "com.palantir.create-example-interface": {
5530
- "actionType": {
5531
- "actionTypeLogic": {
5532
- "logic": {
5533
- "rules": [
5534
- {
5535
- "addInterfaceRule": {
5536
- "interfaceApiName": "com.palantir.exampleInterface",
5537
- "objectTypeParameter": "objectTypeParameter",
5538
- "sharedPropertyValues": {
5539
- "com.palantir.property1": {
5540
- "parameterId": "property1",
5541
- "type": "parameterId",
5542
- },
5543
- },
5544
- },
5545
- "type": "addInterfaceRule",
5546
- },
5547
- ],
5548
- },
5549
- "validation": {
5550
- "actionTypeLevelValidation": {
5551
- "rules": {
5552
- "0": {
5553
- "condition": {
5554
- "true": {},
5555
- "type": "true",
5556
- },
5557
- "displayMetadata": {
5558
- "failureMessage": "",
5559
- "typeClasses": [],
5680
+ {
5681
+ "blockData": {
5682
+ "actionTypes": {
5683
+ "com.palantir.create-example-interface": {
5684
+ "actionType": {
5685
+ "actionTypeLogic": {
5686
+ "logic": {
5687
+ "rules": [
5688
+ {
5689
+ "addInterfaceRule": {
5690
+ "interfaceApiName": "com.palantir.exampleInterface",
5691
+ "objectTypeParameter": "objectTypeParameter",
5692
+ "sharedPropertyValues": {
5693
+ "com.palantir.property1": {
5694
+ "parameterId": "com.palantir.property1",
5695
+ "type": "parameterId",
5696
+ },
5697
+ },
5560
5698
  },
5699
+ "type": "addInterfaceRule",
5561
5700
  },
5562
- },
5701
+ ],
5563
5702
  },
5564
- "parameterValidations": {
5565
- "objectTypeParameter": {
5566
- "defaultValidation": {
5567
- "display": {
5568
- "renderHint": {
5569
- "dropdown": {},
5570
- "type": "dropdown",
5571
- },
5572
- "visibility": {
5573
- "editable": {},
5574
- "type": "editable",
5575
- },
5576
- },
5577
- "validation": {
5578
- "allowedValues": {
5579
- "objectTypeReference": {
5580
- "objectTypeReference": {
5581
- "interfaceTypeRids": [
5582
- "com.palantir.exampleInterface",
5583
- ],
5584
- },
5585
- "type": "objectTypeReference",
5586
- },
5587
- "type": "objectTypeReference",
5703
+ "validation": {
5704
+ "actionTypeLevelValidation": {
5705
+ "rules": {
5706
+ "0": {
5707
+ "condition": {
5708
+ "true": {},
5709
+ "type": "true",
5588
5710
  },
5589
- "required": {
5590
- "required": {},
5591
- "type": "required",
5711
+ "displayMetadata": {
5712
+ "failureMessage": "",
5713
+ "typeClasses": [],
5592
5714
  },
5593
5715
  },
5594
5716
  },
5595
5717
  },
5596
- "property1": {
5597
- "defaultValidation": {
5598
- "display": {
5599
- "renderHint": {
5600
- "textInput": {},
5601
- "type": "textInput",
5718
+ "parameterValidations": {
5719
+ "com.palantir.property1": {
5720
+ "conditionalOverrides": [],
5721
+ "defaultValidation": {
5722
+ "display": {
5723
+ "renderHint": {
5724
+ "textInput": {},
5725
+ "type": "textInput",
5726
+ },
5727
+ "visibility": {
5728
+ "editable": {},
5729
+ "type": "editable",
5730
+ },
5602
5731
  },
5603
- "visibility": {
5604
- "editable": {},
5605
- "type": "editable",
5732
+ "validation": {
5733
+ "allowedValues": {
5734
+ "text": {
5735
+ "text": {},
5736
+ "type": "text",
5737
+ },
5738
+ "type": "text",
5739
+ },
5740
+ "required": {
5741
+ "required": {},
5742
+ "type": "required",
5743
+ },
5606
5744
  },
5607
5745
  },
5608
- "validation": {
5609
- "allowedValues": {
5610
- "text": {
5611
- "text": {},
5612
- "type": "text",
5746
+ },
5747
+ "objectTypeParameter": {
5748
+ "conditionalOverrides": [],
5749
+ "defaultValidation": {
5750
+ "display": {
5751
+ "renderHint": {
5752
+ "dropdown": {},
5753
+ "type": "dropdown",
5754
+ },
5755
+ "visibility": {
5756
+ "editable": {},
5757
+ "type": "editable",
5613
5758
  },
5614
- "type": "text",
5615
5759
  },
5616
- "required": {
5617
- "required": {},
5618
- "type": "required",
5760
+ "validation": {
5761
+ "allowedValues": {
5762
+ "objectTypeReference": {
5763
+ "objectTypeReference": {
5764
+ "interfaceTypeRids": [
5765
+ "com.palantir.exampleInterface",
5766
+ ],
5767
+ },
5768
+ "type": "objectTypeReference",
5769
+ },
5770
+ "type": "objectTypeReference",
5771
+ },
5772
+ "required": {
5773
+ "required": {},
5774
+ "type": "required",
5775
+ },
5619
5776
  },
5620
5777
  },
5621
5778
  },
5622
5779
  },
5623
5780
  },
5624
5781
  },
5625
- },
5626
- "metadata": {
5627
- "apiName": "com.palantir.create-example-interface",
5628
- "displayMetadata": {
5629
- "configuration": {
5630
- "defaultLayout": "FORM",
5631
- "displayAndFormat": {
5632
- "table": {
5633
- "columnWidthByParameterRid": {},
5634
- "enableFileImport": true,
5635
- "fitHorizontally": false,
5636
- "frozenColumnCount": 0,
5637
- "rowHeightInLines": 1,
5782
+ "metadata": {
5783
+ "apiName": "com.palantir.create-example-interface",
5784
+ "displayMetadata": {
5785
+ "configuration": {
5786
+ "defaultLayout": "FORM",
5787
+ "displayAndFormat": {
5788
+ "table": {
5789
+ "columnWidthByParameterRid": {},
5790
+ "enableFileImport": true,
5791
+ "fitHorizontally": false,
5792
+ "frozenColumnCount": 0,
5793
+ "rowHeightInLines": 1,
5794
+ },
5638
5795
  },
5796
+ "enableLayoutUserSwitch": false,
5639
5797
  },
5640
- "enableLayoutUserSwitch": false,
5641
- },
5642
- "description": "",
5643
- "displayName": "Create exampleInterface",
5644
- "icon": {
5645
- "blueprint": {
5646
- "color": "#000000",
5647
- "locator": "edit",
5798
+ "description": "",
5799
+ "displayName": "Create exampleInterface",
5800
+ "icon": {
5801
+ "blueprint": {
5802
+ "color": "#000000",
5803
+ "locator": "edit",
5804
+ },
5805
+ "type": "blueprint",
5648
5806
  },
5649
- "type": "blueprint",
5807
+ "successMessage": [],
5808
+ "typeClasses": [],
5650
5809
  },
5651
- "successMessage": [],
5652
- "typeClasses": [],
5653
- },
5654
- "formContentOrdering": [],
5655
- "parameterOrdering": [
5656
- "objectTypeParameter",
5657
- "property1",
5658
- ],
5659
- "parameters": {
5660
- "objectTypeParameter": {
5661
- "displayMetadata": {
5662
- "description": "",
5663
- "displayName": "Object type to create",
5664
- "typeClasses": [],
5810
+ "formContentOrdering": [],
5811
+ "parameterOrdering": [
5812
+ "objectTypeParameter",
5813
+ "com.palantir.property1",
5814
+ ],
5815
+ "parameters": {
5816
+ "com.palantir.property1": {
5817
+ "displayMetadata": {
5818
+ "description": "",
5819
+ "displayName": "property1",
5820
+ "typeClasses": [],
5821
+ },
5822
+ "id": "com.palantir.property1",
5823
+ "type": {
5824
+ "string": {},
5825
+ "type": "string",
5826
+ },
5665
5827
  },
5666
- "id": "objectTypeParameter",
5667
- "type": {
5668
- "objectTypeReference": {
5669
- "interfaceTypeRids": [
5670
- "com.palantir.exampleInterface",
5671
- ],
5828
+ "objectTypeParameter": {
5829
+ "displayMetadata": {
5830
+ "description": "",
5831
+ "displayName": "Object type to create",
5832
+ "typeClasses": [],
5833
+ },
5834
+ "id": "objectTypeParameter",
5835
+ "type": {
5836
+ "objectTypeReference": {
5837
+ "interfaceTypeRids": [
5838
+ "com.palantir.exampleInterface",
5839
+ ],
5840
+ },
5841
+ "type": "objectTypeReference",
5672
5842
  },
5673
- "type": "objectTypeReference",
5674
5843
  },
5675
5844
  },
5676
- "property1": {
5677
- "displayMetadata": {
5678
- "description": "",
5679
- "displayName": "property1",
5680
- "typeClasses": [],
5681
- },
5682
- "id": "property1",
5683
- "type": {
5684
- "string": {},
5685
- "type": "string",
5686
- },
5845
+ "sections": {},
5846
+ "status": {
5847
+ "active": {},
5848
+ "type": "active",
5687
5849
  },
5688
5850
  },
5689
- "sections": {},
5690
- "status": {
5691
- "active": {},
5692
- "type": "active",
5693
- },
5694
5851
  },
5695
5852
  },
5696
- },
5697
- "com.palantir.modify-example-interface": {
5698
- "actionType": {
5699
- "actionTypeLogic": {
5700
- "logic": {
5701
- "rules": [
5702
- {
5703
- "modifyInterfaceRule": {
5704
- "interfaceObjectToModifyParameter": "interfaceObjectToModifyParameter",
5705
- "sharedPropertyValues": {
5706
- "com.palantir.property1": {
5707
- "parameterId": "property1",
5708
- "type": "parameterId",
5853
+ "com.palantir.modify-example-interface": {
5854
+ "actionType": {
5855
+ "actionTypeLogic": {
5856
+ "logic": {
5857
+ "rules": [
5858
+ {
5859
+ "modifyInterfaceRule": {
5860
+ "interfaceObjectToModifyParameter": "interfaceObjectToModifyParameter",
5861
+ "sharedPropertyValues": {
5862
+ "com.palantir.property1": {
5863
+ "parameterId": "com.palantir.property1",
5864
+ "type": "parameterId",
5865
+ },
5709
5866
  },
5710
5867
  },
5868
+ "type": "modifyInterfaceRule",
5711
5869
  },
5712
- "type": "modifyInterfaceRule",
5713
- },
5714
- ],
5715
- },
5716
- "validation": {
5717
- "actionTypeLevelValidation": {
5718
- "rules": {
5719
- "0": {
5720
- "condition": {
5721
- "true": {},
5722
- "type": "true",
5723
- },
5724
- "displayMetadata": {
5725
- "failureMessage": "",
5726
- "typeClasses": [],
5727
- },
5728
- },
5729
- },
5870
+ ],
5730
5871
  },
5731
- "parameterValidations": {
5732
- "interfaceObjectToModifyParameter": {
5733
- "defaultValidation": {
5734
- "display": {
5735
- "renderHint": {
5736
- "dropdown": {},
5737
- "type": "dropdown",
5738
- },
5739
- "visibility": {
5740
- "editable": {},
5741
- "type": "editable",
5742
- },
5743
- },
5744
- "validation": {
5745
- "allowedValues": {
5746
- "interfaceObjectQuery": {
5747
- "interfaceObjectQuery": {},
5748
- "type": "interfaceObjectQuery",
5749
- },
5750
- "type": "interfaceObjectQuery",
5872
+ "validation": {
5873
+ "actionTypeLevelValidation": {
5874
+ "rules": {
5875
+ "0": {
5876
+ "condition": {
5877
+ "true": {},
5878
+ "type": "true",
5751
5879
  },
5752
- "required": {
5753
- "required": {},
5754
- "type": "required",
5880
+ "displayMetadata": {
5881
+ "failureMessage": "",
5882
+ "typeClasses": [],
5755
5883
  },
5756
5884
  },
5757
5885
  },
5758
5886
  },
5759
- "property1": {
5760
- "defaultValidation": {
5761
- "display": {
5762
- "renderHint": {
5763
- "textInput": {},
5764
- "type": "textInput",
5887
+ "parameterValidations": {
5888
+ "com.palantir.property1": {
5889
+ "conditionalOverrides": [],
5890
+ "defaultValidation": {
5891
+ "display": {
5892
+ "renderHint": {
5893
+ "textInput": {},
5894
+ "type": "textInput",
5895
+ },
5896
+ "visibility": {
5897
+ "editable": {},
5898
+ "type": "editable",
5899
+ },
5765
5900
  },
5766
- "visibility": {
5767
- "editable": {},
5768
- "type": "editable",
5901
+ "validation": {
5902
+ "allowedValues": {
5903
+ "text": {
5904
+ "text": {},
5905
+ "type": "text",
5906
+ },
5907
+ "type": "text",
5908
+ },
5909
+ "required": {
5910
+ "required": {},
5911
+ "type": "required",
5912
+ },
5769
5913
  },
5770
5914
  },
5771
- "validation": {
5772
- "allowedValues": {
5773
- "text": {
5774
- "text": {},
5775
- "type": "text",
5915
+ },
5916
+ "interfaceObjectToModifyParameter": {
5917
+ "conditionalOverrides": [],
5918
+ "defaultValidation": {
5919
+ "display": {
5920
+ "renderHint": {
5921
+ "dropdown": {},
5922
+ "type": "dropdown",
5923
+ },
5924
+ "visibility": {
5925
+ "editable": {},
5926
+ "type": "editable",
5776
5927
  },
5777
- "type": "text",
5778
5928
  },
5779
- "required": {
5780
- "required": {},
5781
- "type": "required",
5929
+ "validation": {
5930
+ "allowedValues": {
5931
+ "interfaceObjectQuery": {
5932
+ "interfaceObjectQuery": {},
5933
+ "type": "interfaceObjectQuery",
5934
+ },
5935
+ "type": "interfaceObjectQuery",
5936
+ },
5937
+ "required": {
5938
+ "required": {},
5939
+ "type": "required",
5940
+ },
5782
5941
  },
5783
5942
  },
5784
5943
  },
5785
5944
  },
5786
5945
  },
5787
5946
  },
5788
- },
5789
- "metadata": {
5790
- "apiName": "com.palantir.modify-example-interface",
5791
- "displayMetadata": {
5792
- "configuration": {
5793
- "defaultLayout": "FORM",
5794
- "displayAndFormat": {
5795
- "table": {
5796
- "columnWidthByParameterRid": {},
5797
- "enableFileImport": true,
5798
- "fitHorizontally": false,
5799
- "frozenColumnCount": 0,
5800
- "rowHeightInLines": 1,
5801
- },
5802
- },
5803
- "enableLayoutUserSwitch": false,
5804
- },
5805
- "description": "",
5806
- "displayName": "Modify exampleInterface",
5807
- "icon": {
5808
- "blueprint": {
5809
- "color": "#000000",
5810
- "locator": "edit",
5947
+ "metadata": {
5948
+ "apiName": "com.palantir.modify-example-interface",
5949
+ "displayMetadata": {
5950
+ "configuration": {
5951
+ "defaultLayout": "FORM",
5952
+ "displayAndFormat": {
5953
+ "table": {
5954
+ "columnWidthByParameterRid": {},
5955
+ "enableFileImport": true,
5956
+ "fitHorizontally": false,
5957
+ "frozenColumnCount": 0,
5958
+ "rowHeightInLines": 1,
5959
+ },
5960
+ },
5961
+ "enableLayoutUserSwitch": false,
5811
5962
  },
5812
- "type": "blueprint",
5963
+ "description": "",
5964
+ "displayName": "Modify exampleInterface",
5965
+ "icon": {
5966
+ "blueprint": {
5967
+ "color": "#000000",
5968
+ "locator": "edit",
5969
+ },
5970
+ "type": "blueprint",
5971
+ },
5972
+ "successMessage": [],
5973
+ "typeClasses": [],
5813
5974
  },
5814
- "successMessage": [],
5815
- "typeClasses": [],
5816
- },
5817
- "formContentOrdering": [],
5818
- "parameterOrdering": [
5819
- "interfaceObjectToModifyParameter",
5820
- "property1",
5821
- ],
5822
- "parameters": {
5823
- "interfaceObjectToModifyParameter": {
5824
- "displayMetadata": {
5825
- "description": "",
5826
- "displayName": "Object type to modify",
5827
- "typeClasses": [],
5975
+ "formContentOrdering": [],
5976
+ "parameterOrdering": [
5977
+ "interfaceObjectToModifyParameter",
5978
+ "com.palantir.property1",
5979
+ ],
5980
+ "parameters": {
5981
+ "com.palantir.property1": {
5982
+ "displayMetadata": {
5983
+ "description": "",
5984
+ "displayName": "property1",
5985
+ "typeClasses": [],
5986
+ },
5987
+ "id": "com.palantir.property1",
5988
+ "type": {
5989
+ "string": {},
5990
+ "type": "string",
5991
+ },
5828
5992
  },
5829
- "id": "interfaceObjectToModifyParameter",
5830
- "type": {
5831
- "interfaceReference": {
5832
- "interfaceTypeRid": "com.palantir.exampleInterface",
5993
+ "interfaceObjectToModifyParameter": {
5994
+ "displayMetadata": {
5995
+ "description": "",
5996
+ "displayName": "Object type to modify",
5997
+ "typeClasses": [],
5998
+ },
5999
+ "id": "interfaceObjectToModifyParameter",
6000
+ "type": {
6001
+ "interfaceReference": {
6002
+ "interfaceTypeRid": "com.palantir.exampleInterface",
6003
+ },
6004
+ "type": "interfaceReference",
5833
6005
  },
5834
- "type": "interfaceReference",
5835
6006
  },
5836
6007
  },
5837
- "property1": {
5838
- "displayMetadata": {
5839
- "description": "",
5840
- "displayName": "property1",
5841
- "typeClasses": [],
5842
- },
5843
- "id": "property1",
5844
- "type": {
5845
- "string": {},
5846
- "type": "string",
6008
+ "sections": {},
6009
+ "status": {
6010
+ "active": {},
6011
+ "type": "active",
6012
+ },
6013
+ },
6014
+ },
6015
+ },
6016
+ },
6017
+ "blockPermissionInformation": {
6018
+ "actionTypes": {},
6019
+ "linkTypes": {},
6020
+ "objectTypes": {},
6021
+ },
6022
+ "interfaceTypes": {
6023
+ "com.palantir.exampleInterface": {
6024
+ "interfaceType": {
6025
+ "allExtendsInterfaces": [],
6026
+ "allLinks": [],
6027
+ "allProperties": [],
6028
+ "allPropertiesV2": {},
6029
+ "allPropertiesV3": {},
6030
+ "apiName": "com.palantir.exampleInterface",
6031
+ "displayMetadata": {
6032
+ "description": "exampleInterface",
6033
+ "displayName": "exampleInterface",
6034
+ "icon": undefined,
6035
+ },
6036
+ "extendsInterfaces": [],
6037
+ "links": [],
6038
+ "properties": [],
6039
+ "propertiesV2": {
6040
+ "com.palantir.property1": {
6041
+ "required": true,
6042
+ "sharedPropertyType": {
6043
+ "aliases": [],
6044
+ "apiName": "com.palantir.property1",
6045
+ "baseFormatter": undefined,
6046
+ "dataConstraints": undefined,
6047
+ "displayMetadata": {
6048
+ "description": undefined,
6049
+ "displayName": "property1",
6050
+ "visibility": "NORMAL",
6051
+ },
6052
+ "gothamMapping": undefined,
6053
+ "indexedForSearch": true,
6054
+ "type": {
6055
+ "string": {
6056
+ "analyzerOverride": undefined,
6057
+ "enableAsciiFolding": undefined,
6058
+ "isLongText": false,
6059
+ "supportsEfficientLeadingWildcard": false,
6060
+ "supportsExactMatching": true,
6061
+ },
6062
+ "type": "string",
6063
+ },
6064
+ "typeClasses": [
6065
+ {
6066
+ "kind": "render_hint",
6067
+ "name": "SELECTABLE",
6068
+ },
6069
+ {
6070
+ "kind": "render_hint",
6071
+ "name": "SORTABLE",
6072
+ },
6073
+ ],
6074
+ "valueType": undefined,
5847
6075
  },
5848
6076
  },
5849
6077
  },
5850
- "sections": {},
6078
+ "propertiesV3": {},
6079
+ "searchable": true,
5851
6080
  "status": {
5852
6081
  "active": {},
5853
6082
  "type": "active",
@@ -5855,124 +6084,56 @@ describe("Ontology Defining", () => {
5855
6084
  },
5856
6085
  },
5857
6086
  },
5858
- },
5859
- "blockPermissionInformation": {
5860
- "actionTypes": {},
5861
6087
  "linkTypes": {},
5862
6088
  "objectTypes": {},
5863
- },
5864
- "interfaceTypes": {
5865
- "com.palantir.exampleInterface": {
5866
- "interfaceType": {
5867
- "allExtendsInterfaces": [],
5868
- "allLinks": [],
5869
- "allProperties": [],
5870
- "allPropertiesV2": {},
5871
- "apiName": "com.palantir.exampleInterface",
5872
- "displayMetadata": {
5873
- "description": "exampleInterface",
5874
- "displayName": "exampleInterface",
5875
- "icon": undefined,
5876
- },
5877
- "extendsInterfaces": [],
5878
- "links": [],
5879
- "properties": [],
5880
- "propertiesV2": {
5881
- "com.palantir.property1": {
5882
- "required": true,
5883
- "sharedPropertyType": {
5884
- "aliases": [],
5885
- "apiName": "com.palantir.property1",
5886
- "baseFormatter": undefined,
5887
- "dataConstraints": undefined,
5888
- "displayMetadata": {
5889
- "description": undefined,
5890
- "displayName": "property1",
5891
- "visibility": "NORMAL",
5892
- },
5893
- "gothamMapping": undefined,
5894
- "indexedForSearch": true,
5895
- "type": {
5896
- "string": {
5897
- "analyzerOverride": undefined,
5898
- "enableAsciiFolding": undefined,
5899
- "isLongText": false,
5900
- "supportsEfficientLeadingWildcard": false,
5901
- "supportsExactMatching": true,
5902
- },
5903
- "type": "string",
5904
- },
5905
- "typeClasses": [
5906
- {
5907
- "kind": "render_hint",
5908
- "name": "SELECTABLE",
5909
- },
5910
- {
5911
- "kind": "render_hint",
5912
- "name": "SORTABLE",
5913
- },
5914
- ],
5915
- "valueType": undefined,
6089
+ "sharedPropertyTypes": {
6090
+ "com.palantir.property1": {
6091
+ "sharedPropertyType": {
6092
+ "aliases": [],
6093
+ "apiName": "com.palantir.property1",
6094
+ "baseFormatter": undefined,
6095
+ "dataConstraints": undefined,
6096
+ "displayMetadata": {
6097
+ "description": undefined,
6098
+ "displayName": "property1",
6099
+ "visibility": "NORMAL",
6100
+ },
6101
+ "gothamMapping": undefined,
6102
+ "indexedForSearch": true,
6103
+ "type": {
6104
+ "string": {
6105
+ "analyzerOverride": undefined,
6106
+ "enableAsciiFolding": undefined,
6107
+ "isLongText": false,
6108
+ "supportsEfficientLeadingWildcard": false,
6109
+ "supportsExactMatching": true,
5916
6110
  },
6111
+ "type": "string",
5917
6112
  },
5918
- },
5919
- "status": {
5920
- "active": {},
5921
- "type": "active",
6113
+ "typeClasses": [
6114
+ {
6115
+ "kind": "render_hint",
6116
+ "name": "SELECTABLE",
6117
+ },
6118
+ {
6119
+ "kind": "render_hint",
6120
+ "name": "SORTABLE",
6121
+ },
6122
+ ],
6123
+ "valueType": undefined,
5922
6124
  },
5923
6125
  },
5924
6126
  },
5925
6127
  },
5926
- "linkTypes": {},
5927
- "objectTypes": {},
5928
- "sharedPropertyTypes": {
5929
- "com.palantir.property1": {
5930
- "sharedPropertyType": {
5931
- "aliases": [],
5932
- "apiName": "com.palantir.property1",
5933
- "baseFormatter": undefined,
5934
- "dataConstraints": undefined,
5935
- "displayMetadata": {
5936
- "description": undefined,
5937
- "displayName": "property1",
5938
- "visibility": "NORMAL",
5939
- },
5940
- "gothamMapping": undefined,
5941
- "indexedForSearch": true,
5942
- "type": {
5943
- "string": {
5944
- "analyzerOverride": undefined,
5945
- "enableAsciiFolding": undefined,
5946
- "isLongText": false,
5947
- "supportsEfficientLeadingWildcard": false,
5948
- "supportsExactMatching": true,
5949
- },
5950
- "type": "string",
5951
- },
5952
- "typeClasses": [
5953
- {
5954
- "kind": "render_hint",
5955
- "name": "SELECTABLE",
5956
- },
5957
- {
5958
- "kind": "render_hint",
5959
- "name": "SORTABLE",
5960
- },
5961
- ],
5962
- "valueType": undefined,
5963
- },
5964
- },
6128
+ "importedTypes": {
6129
+ "actionTypes": [],
6130
+ "interfaceTypes": [],
6131
+ "linkTypes": [],
6132
+ "objectTypes": [],
6133
+ "sharedPropertyTypes": [],
5965
6134
  },
5966
- },
5967
- "importedTypes": {
5968
- "actionTypes": [],
5969
- "interfaceTypes": [],
5970
- "linkTypes": [],
5971
- "objectTypes": [],
5972
- "sharedPropertyTypes": [],
5973
- },
5974
- }
5975
- `);
6135
+ }
6136
+ `);
5976
6137
  });
5977
6138
  it("Actions with group permissions are properly defined", () => {
5978
6139
  const sampleObject = defineObject({
@@ -6069,6 +6230,7 @@ describe("Ontology Defining", () => {
6069
6230
  },
6070
6231
  "parameterValidations": {
6071
6232
  "id": {
6233
+ "conditionalOverrides": [],
6072
6234
  "defaultValidation": {
6073
6235
  "display": {
6074
6236
  "renderHint": {
@@ -6096,6 +6258,7 @@ describe("Ontology Defining", () => {
6096
6258
  },
6097
6259
  },
6098
6260
  "name": {
6261
+ "conditionalOverrides": [],
6099
6262
  "defaultValidation": {
6100
6263
  "display": {
6101
6264
  "renderHint": {
@@ -6489,6 +6652,7 @@ describe("Ontology Defining", () => {
6489
6652
  },
6490
6653
  "parameterValidations": {
6491
6654
  "id": {
6655
+ "conditionalOverrides": [],
6492
6656
  "defaultValidation": {
6493
6657
  "display": {
6494
6658
  "renderHint": {
@@ -6516,6 +6680,7 @@ describe("Ontology Defining", () => {
6516
6680
  },
6517
6681
  },
6518
6682
  "name": {
6683
+ "conditionalOverrides": [],
6519
6684
  "defaultValidation": {
6520
6685
  "display": {
6521
6686
  "renderHint": {
@@ -6812,6 +6977,7 @@ describe("Ontology Defining", () => {
6812
6977
  "allLinks": [],
6813
6978
  "allProperties": [],
6814
6979
  "allPropertiesV2": {},
6980
+ "allPropertiesV3": {},
6815
6981
  "apiName": "com.palantir.myInterface",
6816
6982
  "displayMetadata": {
6817
6983
  "description": "myInterface",
@@ -6851,6 +7017,8 @@ describe("Ontology Defining", () => {
6851
7017
  },
6852
7018
  },
6853
7019
  },
7020
+ "propertiesV3": {},
7021
+ "searchable": true,
6854
7022
  "status": {
6855
7023
  "active": {},
6856
7024
  "type": "active",
@@ -6919,6 +7087,7 @@ describe("Ontology Defining", () => {
6919
7087
  "allLinks": [],
6920
7088
  "allProperties": [],
6921
7089
  "allPropertiesV2": {},
7090
+ "allPropertiesV3": {},
6922
7091
  "apiName": "com.palantir.myInterface",
6923
7092
  "displayMetadata": {
6924
7093
  "description": "myInterface",
@@ -6958,6 +7127,8 @@ describe("Ontology Defining", () => {
6958
7127
  },
6959
7128
  },
6960
7129
  },
7130
+ "propertiesV3": {},
7131
+ "searchable": true,
6961
7132
  "status": {
6962
7133
  "active": {},
6963
7134
  "type": "active",
@@ -7022,7 +7193,7 @@ describe("Ontology Defining", () => {
7022
7193
  implementsInterfaces: [{
7023
7194
  implements: myInterface,
7024
7195
  propertyMapping: [{
7025
- interfaceProperty: "mySpt",
7196
+ interfaceProperty: "com.my.package.mySpt",
7026
7197
  mapsTo: "bar"
7027
7198
  }]
7028
7199
  }]
@@ -7046,7 +7217,7 @@ describe("Ontology Defining", () => {
7046
7217
  "active": {}
7047
7218
  },
7048
7219
  "propertiesV2": {
7049
- "mySpt": {
7220
+ "com.my.package.mySpt": {
7050
7221
  "required": true,
7051
7222
  "sharedPropertyType": {
7052
7223
  "apiName": "com.my.package.mySpt",
@@ -7067,6 +7238,7 @@ describe("Ontology Defining", () => {
7067
7238
  }
7068
7239
  }
7069
7240
  },
7241
+ "searchable": true,
7070
7242
  "__type": OntologyEntityTypeEnum.INTERFACE_TYPE
7071
7243
  } as unknown as InterfaceType;
7072
7244
 
@@ -7106,7 +7278,7 @@ describe("Ontology Defining", () => {
7106
7278
  "active": {}
7107
7279
  },
7108
7280
  "propertiesV2": {
7109
- "mySpt": {
7281
+ "com.my.package.mySpt": {
7110
7282
  "required": true,
7111
7283
  "sharedPropertyType": {
7112
7284
  "apiName": "com.my.package.mySpt",
@@ -7127,6 +7299,7 @@ describe("Ontology Defining", () => {
7127
7299
  }
7128
7300
  }
7129
7301
  },
7302
+ "searchable": true,
7130
7303
  "__type": OntologyEntityTypeEnum.INTERFACE_TYPE
7131
7304
  },
7132
7305
  "propertyMapping": [
@@ -7216,7 +7389,7 @@ describe("Ontology Defining", () => {
7216
7389
  "active": {}
7217
7390
  },
7218
7391
  "propertiesV2": {
7219
- "property1": {
7392
+ "com.palantir.property1": {
7220
7393
  "required": true,
7221
7394
  "sharedPropertyType": {
7222
7395
  "apiName": "com.palantir.property1",
@@ -7238,6 +7411,7 @@ describe("Ontology Defining", () => {
7238
7411
  }
7239
7412
  }
7240
7413
  },
7414
+ "searchable": true,
7241
7415
  "__type": OntologyEntityTypeEnum.INTERFACE_TYPE
7242
7416
  }
7243
7417
  ],
@@ -7247,7 +7421,7 @@ describe("Ontology Defining", () => {
7247
7421
  "active": {}
7248
7422
  },
7249
7423
  "propertiesV2": {
7250
- "property2": {
7424
+ "com.palantir.property2": {
7251
7425
  "required": true,
7252
7426
  "sharedPropertyType": {
7253
7427
  "apiName": "com.palantir.property2",
@@ -7269,12 +7443,462 @@ describe("Ontology Defining", () => {
7269
7443
  }
7270
7444
  }
7271
7445
  },
7446
+ "searchable": true,
7272
7447
  "__type": OntologyEntityTypeEnum.INTERFACE_TYPE
7273
7448
  } as unknown as InterfaceType;
7274
7449
 
7275
7450
  export const childInterface: InterfaceType = wrapWithProxy(childInterface_base);
7276
7451
  "
7277
7452
  `);
7453
+ fs.rmSync(path.join(generatedDir, ".."), {
7454
+ recursive: true,
7455
+ force: true
7456
+ });
7457
+ });
7458
+ it("Extended interface properties are checked in object type property mapping", () => {
7459
+ const parentInterface = defineInterface({
7460
+ apiName: "parentInterface",
7461
+ properties: {
7462
+ iProperty1: "string"
7463
+ }
7464
+ });
7465
+ const childInterface = defineInterface({
7466
+ apiName: "childInterface",
7467
+ properties: {
7468
+ iProperty2: "string"
7469
+ },
7470
+ extends: [parentInterface]
7471
+ });
7472
+ defineObject({
7473
+ apiName: "objectDef",
7474
+ primaryKeyPropertyApiName: "property1",
7475
+ titlePropertyApiName: "property1",
7476
+ displayName: "objectDef",
7477
+ pluralDisplayName: "objectDefs",
7478
+ properties: [{
7479
+ apiName: "property1",
7480
+ type: "string",
7481
+ displayName: "property1"
7482
+ }, {
7483
+ apiName: "property2",
7484
+ type: "string",
7485
+ displayName: "property2"
7486
+ }],
7487
+ implementsInterfaces: [{
7488
+ implements: childInterface,
7489
+ propertyMapping: [{
7490
+ interfaceProperty: "com.palantir.iProperty1",
7491
+ mapsTo: "property1"
7492
+ }, {
7493
+ interfaceProperty: "com.palantir.iProperty2",
7494
+ mapsTo: "property2"
7495
+ }]
7496
+ }]
7497
+ });
7498
+ expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
7499
+ {
7500
+ "blockData": {
7501
+ "actionTypes": {},
7502
+ "blockPermissionInformation": {
7503
+ "actionTypes": {},
7504
+ "linkTypes": {},
7505
+ "objectTypes": {},
7506
+ },
7507
+ "interfaceTypes": {
7508
+ "com.palantir.childInterface": {
7509
+ "interfaceType": {
7510
+ "allExtendsInterfaces": [],
7511
+ "allLinks": [],
7512
+ "allProperties": [],
7513
+ "allPropertiesV2": {},
7514
+ "allPropertiesV3": {},
7515
+ "apiName": "com.palantir.childInterface",
7516
+ "displayMetadata": {
7517
+ "description": "childInterface",
7518
+ "displayName": "childInterface",
7519
+ "icon": undefined,
7520
+ },
7521
+ "extendsInterfaces": [
7522
+ "com.palantir.parentInterface",
7523
+ ],
7524
+ "links": [],
7525
+ "properties": [],
7526
+ "propertiesV2": {
7527
+ "com.palantir.iProperty2": {
7528
+ "required": true,
7529
+ "sharedPropertyType": {
7530
+ "aliases": [],
7531
+ "apiName": "com.palantir.iProperty2",
7532
+ "baseFormatter": undefined,
7533
+ "dataConstraints": undefined,
7534
+ "displayMetadata": {
7535
+ "description": undefined,
7536
+ "displayName": "iProperty2",
7537
+ "visibility": "NORMAL",
7538
+ },
7539
+ "gothamMapping": undefined,
7540
+ "indexedForSearch": true,
7541
+ "type": {
7542
+ "string": {
7543
+ "analyzerOverride": undefined,
7544
+ "enableAsciiFolding": undefined,
7545
+ "isLongText": false,
7546
+ "supportsEfficientLeadingWildcard": false,
7547
+ "supportsExactMatching": true,
7548
+ },
7549
+ "type": "string",
7550
+ },
7551
+ "typeClasses": [
7552
+ {
7553
+ "kind": "render_hint",
7554
+ "name": "SELECTABLE",
7555
+ },
7556
+ {
7557
+ "kind": "render_hint",
7558
+ "name": "SORTABLE",
7559
+ },
7560
+ ],
7561
+ "valueType": undefined,
7562
+ },
7563
+ },
7564
+ },
7565
+ "propertiesV3": {},
7566
+ "searchable": true,
7567
+ "status": {
7568
+ "active": {},
7569
+ "type": "active",
7570
+ },
7571
+ },
7572
+ },
7573
+ "com.palantir.parentInterface": {
7574
+ "interfaceType": {
7575
+ "allExtendsInterfaces": [],
7576
+ "allLinks": [],
7577
+ "allProperties": [],
7578
+ "allPropertiesV2": {},
7579
+ "allPropertiesV3": {},
7580
+ "apiName": "com.palantir.parentInterface",
7581
+ "displayMetadata": {
7582
+ "description": "parentInterface",
7583
+ "displayName": "parentInterface",
7584
+ "icon": undefined,
7585
+ },
7586
+ "extendsInterfaces": [],
7587
+ "links": [],
7588
+ "properties": [],
7589
+ "propertiesV2": {
7590
+ "com.palantir.iProperty1": {
7591
+ "required": true,
7592
+ "sharedPropertyType": {
7593
+ "aliases": [],
7594
+ "apiName": "com.palantir.iProperty1",
7595
+ "baseFormatter": undefined,
7596
+ "dataConstraints": undefined,
7597
+ "displayMetadata": {
7598
+ "description": undefined,
7599
+ "displayName": "iProperty1",
7600
+ "visibility": "NORMAL",
7601
+ },
7602
+ "gothamMapping": undefined,
7603
+ "indexedForSearch": true,
7604
+ "type": {
7605
+ "string": {
7606
+ "analyzerOverride": undefined,
7607
+ "enableAsciiFolding": undefined,
7608
+ "isLongText": false,
7609
+ "supportsEfficientLeadingWildcard": false,
7610
+ "supportsExactMatching": true,
7611
+ },
7612
+ "type": "string",
7613
+ },
7614
+ "typeClasses": [
7615
+ {
7616
+ "kind": "render_hint",
7617
+ "name": "SELECTABLE",
7618
+ },
7619
+ {
7620
+ "kind": "render_hint",
7621
+ "name": "SORTABLE",
7622
+ },
7623
+ ],
7624
+ "valueType": undefined,
7625
+ },
7626
+ },
7627
+ },
7628
+ "propertiesV3": {},
7629
+ "searchable": true,
7630
+ "status": {
7631
+ "active": {},
7632
+ "type": "active",
7633
+ },
7634
+ },
7635
+ },
7636
+ },
7637
+ "linkTypes": {},
7638
+ "objectTypes": {
7639
+ "com.palantir.objectDef": {
7640
+ "datasources": [
7641
+ {
7642
+ "datasource": {
7643
+ "datasetV2": {
7644
+ "datasetRid": "com.palantir.objectDef",
7645
+ "propertyMapping": {
7646
+ "property1": {
7647
+ "column": "property1",
7648
+ "type": "column",
7649
+ },
7650
+ "property2": {
7651
+ "column": "property2",
7652
+ "type": "column",
7653
+ },
7654
+ },
7655
+ },
7656
+ "type": "datasetV2",
7657
+ },
7658
+ "editsConfiguration": {
7659
+ "onlyAllowPrivilegedEdits": false,
7660
+ },
7661
+ "redacted": false,
7662
+ "rid": "ri.ontology.main.datasource.com.palantir.objectDef",
7663
+ },
7664
+ ],
7665
+ "entityMetadata": {
7666
+ "arePatchesEnabled": false,
7667
+ },
7668
+ "objectType": {
7669
+ "allImplementsInterfaces": {},
7670
+ "apiName": "com.palantir.objectDef",
7671
+ "displayMetadata": {
7672
+ "description": undefined,
7673
+ "displayName": "objectDef",
7674
+ "groupDisplayName": undefined,
7675
+ "icon": {
7676
+ "blueprint": {
7677
+ "color": "#2D72D2",
7678
+ "locator": "cube",
7679
+ },
7680
+ "type": "blueprint",
7681
+ },
7682
+ "pluralDisplayName": "objectDefs",
7683
+ "visibility": "NORMAL",
7684
+ },
7685
+ "implementsInterfaces2": [
7686
+ {
7687
+ "interfaceTypeApiName": "com.palantir.childInterface",
7688
+ "properties": {
7689
+ "com.palantir.iProperty1": {
7690
+ "propertyTypeRid": "property1",
7691
+ },
7692
+ "com.palantir.iProperty2": {
7693
+ "propertyTypeRid": "property2",
7694
+ },
7695
+ },
7696
+ },
7697
+ ],
7698
+ "primaryKeys": [
7699
+ "property1",
7700
+ ],
7701
+ "propertyTypes": {
7702
+ "property1": {
7703
+ "apiName": "property1",
7704
+ "baseFormatter": undefined,
7705
+ "dataConstraints": undefined,
7706
+ "displayMetadata": {
7707
+ "description": undefined,
7708
+ "displayName": "property1",
7709
+ "visibility": "NORMAL",
7710
+ },
7711
+ "indexedForSearch": true,
7712
+ "inlineAction": undefined,
7713
+ "ruleSetBinding": undefined,
7714
+ "sharedPropertyTypeApiName": undefined,
7715
+ "sharedPropertyTypeRid": undefined,
7716
+ "status": {
7717
+ "active": {},
7718
+ "type": "active",
7719
+ },
7720
+ "type": {
7721
+ "string": {
7722
+ "analyzerOverride": undefined,
7723
+ "enableAsciiFolding": undefined,
7724
+ "isLongText": false,
7725
+ "supportsEfficientLeadingWildcard": false,
7726
+ "supportsExactMatching": true,
7727
+ },
7728
+ "type": "string",
7729
+ },
7730
+ "typeClasses": [
7731
+ {
7732
+ "kind": "render_hint",
7733
+ "name": "SELECTABLE",
7734
+ },
7735
+ {
7736
+ "kind": "render_hint",
7737
+ "name": "SORTABLE",
7738
+ },
7739
+ ],
7740
+ "valueType": undefined,
7741
+ },
7742
+ "property2": {
7743
+ "apiName": "property2",
7744
+ "baseFormatter": undefined,
7745
+ "dataConstraints": undefined,
7746
+ "displayMetadata": {
7747
+ "description": undefined,
7748
+ "displayName": "property2",
7749
+ "visibility": "NORMAL",
7750
+ },
7751
+ "indexedForSearch": true,
7752
+ "inlineAction": undefined,
7753
+ "ruleSetBinding": undefined,
7754
+ "sharedPropertyTypeApiName": undefined,
7755
+ "sharedPropertyTypeRid": undefined,
7756
+ "status": {
7757
+ "active": {},
7758
+ "type": "active",
7759
+ },
7760
+ "type": {
7761
+ "string": {
7762
+ "analyzerOverride": undefined,
7763
+ "enableAsciiFolding": undefined,
7764
+ "isLongText": false,
7765
+ "supportsEfficientLeadingWildcard": false,
7766
+ "supportsExactMatching": true,
7767
+ },
7768
+ "type": "string",
7769
+ },
7770
+ "typeClasses": [
7771
+ {
7772
+ "kind": "render_hint",
7773
+ "name": "SELECTABLE",
7774
+ },
7775
+ {
7776
+ "kind": "render_hint",
7777
+ "name": "SORTABLE",
7778
+ },
7779
+ ],
7780
+ "valueType": undefined,
7781
+ },
7782
+ },
7783
+ "redacted": false,
7784
+ "status": {
7785
+ "active": {},
7786
+ "type": "active",
7787
+ },
7788
+ "titlePropertyTypeRid": "property1",
7789
+ },
7790
+ },
7791
+ },
7792
+ "sharedPropertyTypes": {
7793
+ "com.palantir.iProperty1": {
7794
+ "sharedPropertyType": {
7795
+ "aliases": [],
7796
+ "apiName": "com.palantir.iProperty1",
7797
+ "baseFormatter": undefined,
7798
+ "dataConstraints": undefined,
7799
+ "displayMetadata": {
7800
+ "description": undefined,
7801
+ "displayName": "iProperty1",
7802
+ "visibility": "NORMAL",
7803
+ },
7804
+ "gothamMapping": undefined,
7805
+ "indexedForSearch": true,
7806
+ "type": {
7807
+ "string": {
7808
+ "analyzerOverride": undefined,
7809
+ "enableAsciiFolding": undefined,
7810
+ "isLongText": false,
7811
+ "supportsEfficientLeadingWildcard": false,
7812
+ "supportsExactMatching": true,
7813
+ },
7814
+ "type": "string",
7815
+ },
7816
+ "typeClasses": [
7817
+ {
7818
+ "kind": "render_hint",
7819
+ "name": "SELECTABLE",
7820
+ },
7821
+ {
7822
+ "kind": "render_hint",
7823
+ "name": "SORTABLE",
7824
+ },
7825
+ ],
7826
+ "valueType": undefined,
7827
+ },
7828
+ },
7829
+ "com.palantir.iProperty2": {
7830
+ "sharedPropertyType": {
7831
+ "aliases": [],
7832
+ "apiName": "com.palantir.iProperty2",
7833
+ "baseFormatter": undefined,
7834
+ "dataConstraints": undefined,
7835
+ "displayMetadata": {
7836
+ "description": undefined,
7837
+ "displayName": "iProperty2",
7838
+ "visibility": "NORMAL",
7839
+ },
7840
+ "gothamMapping": undefined,
7841
+ "indexedForSearch": true,
7842
+ "type": {
7843
+ "string": {
7844
+ "analyzerOverride": undefined,
7845
+ "enableAsciiFolding": undefined,
7846
+ "isLongText": false,
7847
+ "supportsEfficientLeadingWildcard": false,
7848
+ "supportsExactMatching": true,
7849
+ },
7850
+ "type": "string",
7851
+ },
7852
+ "typeClasses": [
7853
+ {
7854
+ "kind": "render_hint",
7855
+ "name": "SELECTABLE",
7856
+ },
7857
+ {
7858
+ "kind": "render_hint",
7859
+ "name": "SORTABLE",
7860
+ },
7861
+ ],
7862
+ "valueType": undefined,
7863
+ },
7864
+ },
7865
+ },
7866
+ },
7867
+ "importedTypes": {
7868
+ "actionTypes": [],
7869
+ "interfaceTypes": [],
7870
+ "linkTypes": [],
7871
+ "objectTypes": [],
7872
+ "sharedPropertyTypes": [],
7873
+ },
7874
+ }
7875
+ `);
7876
+ });
7877
+ });
7878
+ describe("Dependencies", () => {
7879
+ it("Correctly adds dependencies", async () => {
7880
+ const generatedDir = path.resolve(path.join(__dirname, "..", "generatedNoCheck", "correctly_adds_dependencies"));
7881
+ await defineOntology("com.palantir.", () => {
7882
+ addDependency("com.palantir", fileURLToPath(import.meta.url));
7883
+ defineInterface({
7884
+ apiName: "myInterface",
7885
+ properties: {
7886
+ property1: "string"
7887
+ }
7888
+ });
7889
+ }, generatedDir, path.join(generatedDir, "dependencies.json"));
7890
+ const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "..", "package.json"), "utf8"));
7891
+ expect(packageJson.version).toBeDefined();
7892
+ expect(fs.readFileSync(path.join(generatedDir, "dependencies.json"), "utf8")).toMatchInlineSnapshot(`
7893
+ "{
7894
+ "com.palantir": "${packageJson.version}"
7895
+ }"
7896
+ `);
7897
+ expect(fs.readFileSync(path.join(generatedDir, "index.ts"), "utf8")).toContain(`addDependency("com.palantir", new URL(import.meta.url).pathname);`);
7898
+ fs.rmSync(path.join(generatedDir, ".."), {
7899
+ recursive: true,
7900
+ force: true
7901
+ });
7278
7902
  });
7279
7903
  });
7280
7904
  });