@osdk/maker 0.14.0-beta.12 → 0.14.0-beta.14

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 (38) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/build/browser/api/code-snippets/createCodeSnippets.js +7 -4
  3. package/build/browser/api/code-snippets/createCodeSnippets.js.map +1 -1
  4. package/build/browser/api/code-snippets/snippetTypes.js +1 -0
  5. package/build/browser/api/code-snippets/snippetTypes.js.map +1 -1
  6. package/build/browser/api/defineAction.js +6 -0
  7. package/build/browser/api/defineAction.js.map +1 -1
  8. package/build/browser/api/defineCreateInterfaceObjectAction.js +8 -7
  9. package/build/browser/api/defineCreateInterfaceObjectAction.js.map +1 -1
  10. package/build/browser/api/defineModifyInterfaceObjectAction.js +8 -7
  11. package/build/browser/api/defineModifyInterfaceObjectAction.js.map +1 -1
  12. package/build/browser/api/test/actions.test.js +1243 -1
  13. package/build/browser/api/test/actions.test.js.map +1 -1
  14. package/build/browser/cli/main.js +1 -1
  15. package/build/cjs/index.cjs +28 -16
  16. package/build/cjs/index.cjs.map +1 -1
  17. package/build/cjs/index.d.cts +2 -0
  18. package/build/esm/api/code-snippets/createCodeSnippets.js +7 -4
  19. package/build/esm/api/code-snippets/createCodeSnippets.js.map +1 -1
  20. package/build/esm/api/code-snippets/snippetTypes.js +1 -0
  21. package/build/esm/api/code-snippets/snippetTypes.js.map +1 -1
  22. package/build/esm/api/defineAction.js +6 -0
  23. package/build/esm/api/defineAction.js.map +1 -1
  24. package/build/esm/api/defineCreateInterfaceObjectAction.js +8 -7
  25. package/build/esm/api/defineCreateInterfaceObjectAction.js.map +1 -1
  26. package/build/esm/api/defineModifyInterfaceObjectAction.js +8 -7
  27. package/build/esm/api/defineModifyInterfaceObjectAction.js.map +1 -1
  28. package/build/esm/api/test/actions.test.js +1243 -1
  29. package/build/esm/api/test/actions.test.js.map +1 -1
  30. package/build/esm/cli/main.js +1 -1
  31. package/build/types/api/code-snippets/createCodeSnippets.d.ts.map +1 -1
  32. package/build/types/api/code-snippets/snippetTypes.d.ts +1 -0
  33. package/build/types/api/code-snippets/snippetTypes.d.ts.map +1 -1
  34. package/build/types/api/defineAction.d.ts +3 -0
  35. package/build/types/api/defineAction.d.ts.map +1 -1
  36. package/build/types/api/defineCreateInterfaceObjectAction.d.ts.map +1 -1
  37. package/build/types/api/defineModifyInterfaceObjectAction.d.ts.map +1 -1
  38. package/package.json +3 -3
@@ -1341,7 +1341,1249 @@
1341
1341
  "valueTypes": [],
1342
1342
  },
1343
1343
  }
1344
- `);});it("Simple interface actions (without object types) are properly defined",()=>{const exampleInterface=defineInterface({apiName:"exampleInterface",properties:{property1:"string"}});defineCreateInterfaceObjectAction({interfaceType:exampleInterface});defineModifyInterfaceObjectAction({interfaceType:exampleInterface});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
1344
+ `);});it("Interface actions with non-namespaced parameter overrides are properly defined",()=>{const spt1=defineSharedPropertyType({apiName:"spt1",displayName:"spt",type:"string"});const spt2=defineSharedPropertyType({apiName:"spt2",displayName:"spt",type:"string"});const exampleInterface=defineInterface({apiName:"exampleInterface",properties:{spt1,spt2}});defineCreateInterfaceObjectAction({interfaceType:exampleInterface,useNonNamespacedParameters:true});defineCreateInterfaceObjectAction({interfaceType:exampleInterface,apiName:"create-with-overrides",useNonNamespacedParameters:true,conflictingParameterOverrides:{[spt2.apiName]:"overridden"},parameterConfiguration:{[spt1.nonNameSpacedApiName]:{required:false,conditionalOverrides:[{type:"required",condition:{type:"and",conditions:[{type:"group",name:"parameterLevelGroup"},{type:"parameter",parameterId:"overridden",matches:{type:"staticValue",staticValue:{type:"string",string:"bar"}}}]}}],defaultValue:{type:"staticValue",staticValue:{type:"string",string:"default_fizz"}},displayName:"fizz_display",description:"fizz_description"}},parameterOrdering:["overridden",spt1.nonNameSpacedApiName]});defineModifyInterfaceObjectAction({interfaceType:exampleInterface,useNonNamespacedParameters:true});defineModifyInterfaceObjectAction({interfaceType:exampleInterface,apiName:"modify-with-overrides",useNonNamespacedParameters:true,conflictingParameterOverrides:{[spt2.apiName]:"overridden"},parameterConfiguration:{[spt1.nonNameSpacedApiName]:{required:false,conditionalOverrides:[{type:"required",condition:{type:"and",conditions:[{type:"group",name:"parameterLevelGroup"},{type:"parameter",parameterId:"overridden",matches:{type:"staticValue",staticValue:{type:"string",string:"bar"}}}]}}],defaultValue:{type:"staticValue",staticValue:{type:"string",string:"default_fizz"}},displayName:"fizz_display",description:"fizz_description"}},parameterOrdering:["overridden",spt1.nonNameSpacedApiName]});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
1345
+ {
1346
+ "importedOntology": {
1347
+ "actionTypes": {},
1348
+ "blockPermissionInformation": {
1349
+ "actionTypes": {},
1350
+ "linkTypes": {},
1351
+ "objectTypes": {},
1352
+ },
1353
+ "interfaceTypes": {},
1354
+ "linkTypes": {},
1355
+ "objectTypes": {},
1356
+ "sharedPropertyTypes": {},
1357
+ },
1358
+ "importedValueTypes": {
1359
+ "valueTypes": [],
1360
+ },
1361
+ "ontology": {
1362
+ "actionTypes": {
1363
+ "com.palantir.create-example-interface": {
1364
+ "actionType": {
1365
+ "actionTypeLogic": {
1366
+ "logic": {
1367
+ "rules": [
1368
+ {
1369
+ "addInterfaceRule": {
1370
+ "interfaceApiName": "com.palantir.exampleInterface",
1371
+ "objectTypeParameter": "objectTypeParameter",
1372
+ "sharedPropertyValues": {
1373
+ "com.palantir.spt1": {
1374
+ "parameterId": "spt1",
1375
+ "type": "parameterId",
1376
+ },
1377
+ "com.palantir.spt2": {
1378
+ "parameterId": "spt2",
1379
+ "type": "parameterId",
1380
+ },
1381
+ },
1382
+ },
1383
+ "type": "addInterfaceRule",
1384
+ },
1385
+ ],
1386
+ },
1387
+ "validation": {
1388
+ "actionTypeLevelValidation": {
1389
+ "rules": {
1390
+ "0": {
1391
+ "condition": {
1392
+ "true": {},
1393
+ "type": "true",
1394
+ },
1395
+ "displayMetadata": {
1396
+ "failureMessage": "",
1397
+ "typeClasses": [],
1398
+ },
1399
+ },
1400
+ },
1401
+ },
1402
+ "parameterValidations": {
1403
+ "objectTypeParameter": {
1404
+ "conditionalOverrides": [],
1405
+ "defaultValidation": {
1406
+ "display": {
1407
+ "renderHint": {
1408
+ "dropdown": {},
1409
+ "type": "dropdown",
1410
+ },
1411
+ "visibility": {
1412
+ "editable": {},
1413
+ "type": "editable",
1414
+ },
1415
+ },
1416
+ "validation": {
1417
+ "allowedValues": {
1418
+ "objectTypeReference": {
1419
+ "objectTypeReference": {
1420
+ "interfaceTypeRids": [
1421
+ "com.palantir.exampleInterface",
1422
+ ],
1423
+ },
1424
+ "type": "objectTypeReference",
1425
+ },
1426
+ "type": "objectTypeReference",
1427
+ },
1428
+ "required": {
1429
+ "required": {},
1430
+ "type": "required",
1431
+ },
1432
+ },
1433
+ },
1434
+ },
1435
+ "spt1": {
1436
+ "conditionalOverrides": [],
1437
+ "defaultValidation": {
1438
+ "display": {
1439
+ "renderHint": {
1440
+ "textInput": {},
1441
+ "type": "textInput",
1442
+ },
1443
+ "visibility": {
1444
+ "editable": {},
1445
+ "type": "editable",
1446
+ },
1447
+ },
1448
+ "validation": {
1449
+ "allowedValues": {
1450
+ "text": {
1451
+ "text": {},
1452
+ "type": "text",
1453
+ },
1454
+ "type": "text",
1455
+ },
1456
+ "required": {
1457
+ "notRequired": {},
1458
+ "type": "notRequired",
1459
+ },
1460
+ },
1461
+ },
1462
+ },
1463
+ "spt2": {
1464
+ "conditionalOverrides": [],
1465
+ "defaultValidation": {
1466
+ "display": {
1467
+ "renderHint": {
1468
+ "textInput": {},
1469
+ "type": "textInput",
1470
+ },
1471
+ "visibility": {
1472
+ "editable": {},
1473
+ "type": "editable",
1474
+ },
1475
+ },
1476
+ "validation": {
1477
+ "allowedValues": {
1478
+ "text": {
1479
+ "text": {},
1480
+ "type": "text",
1481
+ },
1482
+ "type": "text",
1483
+ },
1484
+ "required": {
1485
+ "notRequired": {},
1486
+ "type": "notRequired",
1487
+ },
1488
+ },
1489
+ },
1490
+ },
1491
+ },
1492
+ "sectionValidations": {},
1493
+ },
1494
+ },
1495
+ "metadata": {
1496
+ "apiName": "com.palantir.create-example-interface",
1497
+ "displayMetadata": {
1498
+ "configuration": {
1499
+ "defaultLayout": "FORM",
1500
+ "displayAndFormat": {
1501
+ "table": {
1502
+ "columnWidthByParameterRid": {},
1503
+ "enableFileImport": true,
1504
+ "fitHorizontally": false,
1505
+ "frozenColumnCount": 0,
1506
+ "rowHeightInLines": 1,
1507
+ },
1508
+ },
1509
+ "enableLayoutUserSwitch": false,
1510
+ },
1511
+ "description": "",
1512
+ "displayName": "Create exampleInterface",
1513
+ "icon": {
1514
+ "blueprint": {
1515
+ "color": "#000000",
1516
+ "locator": "edit",
1517
+ },
1518
+ "type": "blueprint",
1519
+ },
1520
+ "successMessage": [],
1521
+ "typeClasses": [],
1522
+ },
1523
+ "entities": {
1524
+ "affectedInterfaceTypes": [
1525
+ "com.palantir.exampleInterface",
1526
+ ],
1527
+ "affectedLinkTypes": [],
1528
+ "affectedObjectTypes": [],
1529
+ "typeGroups": [],
1530
+ },
1531
+ "formContentOrdering": [],
1532
+ "parameterOrdering": [
1533
+ "objectTypeParameter",
1534
+ "spt1",
1535
+ "spt2",
1536
+ ],
1537
+ "parameters": {
1538
+ "objectTypeParameter": {
1539
+ "displayMetadata": {
1540
+ "description": "",
1541
+ "displayName": "Object type to create",
1542
+ "typeClasses": [],
1543
+ },
1544
+ "id": "objectTypeParameter",
1545
+ "type": {
1546
+ "objectTypeReference": {
1547
+ "interfaceTypeRids": [
1548
+ "com.palantir.exampleInterface",
1549
+ ],
1550
+ },
1551
+ "type": "objectTypeReference",
1552
+ },
1553
+ },
1554
+ "spt1": {
1555
+ "displayMetadata": {
1556
+ "description": "",
1557
+ "displayName": "spt",
1558
+ "typeClasses": [],
1559
+ },
1560
+ "id": "spt1",
1561
+ "type": {
1562
+ "string": {},
1563
+ "type": "string",
1564
+ },
1565
+ },
1566
+ "spt2": {
1567
+ "displayMetadata": {
1568
+ "description": "",
1569
+ "displayName": "spt",
1570
+ "typeClasses": [],
1571
+ },
1572
+ "id": "spt2",
1573
+ "type": {
1574
+ "string": {},
1575
+ "type": "string",
1576
+ },
1577
+ },
1578
+ },
1579
+ "sections": {},
1580
+ "status": {
1581
+ "active": {},
1582
+ "type": "active",
1583
+ },
1584
+ },
1585
+ },
1586
+ },
1587
+ "com.palantir.create-with-overrides": {
1588
+ "actionType": {
1589
+ "actionTypeLogic": {
1590
+ "logic": {
1591
+ "rules": [
1592
+ {
1593
+ "addInterfaceRule": {
1594
+ "interfaceApiName": "com.palantir.exampleInterface",
1595
+ "objectTypeParameter": "objectTypeParameter",
1596
+ "sharedPropertyValues": {
1597
+ "com.palantir.spt1": {
1598
+ "parameterId": "spt1",
1599
+ "type": "parameterId",
1600
+ },
1601
+ "com.palantir.spt2": {
1602
+ "parameterId": "overridden",
1603
+ "type": "parameterId",
1604
+ },
1605
+ },
1606
+ },
1607
+ "type": "addInterfaceRule",
1608
+ },
1609
+ ],
1610
+ },
1611
+ "validation": {
1612
+ "actionTypeLevelValidation": {
1613
+ "rules": {
1614
+ "0": {
1615
+ "condition": {
1616
+ "true": {},
1617
+ "type": "true",
1618
+ },
1619
+ "displayMetadata": {
1620
+ "failureMessage": "",
1621
+ "typeClasses": [],
1622
+ },
1623
+ },
1624
+ },
1625
+ },
1626
+ "parameterValidations": {
1627
+ "objectTypeParameter": {
1628
+ "conditionalOverrides": [],
1629
+ "defaultValidation": {
1630
+ "display": {
1631
+ "renderHint": {
1632
+ "dropdown": {},
1633
+ "type": "dropdown",
1634
+ },
1635
+ "visibility": {
1636
+ "editable": {},
1637
+ "type": "editable",
1638
+ },
1639
+ },
1640
+ "validation": {
1641
+ "allowedValues": {
1642
+ "objectTypeReference": {
1643
+ "objectTypeReference": {
1644
+ "interfaceTypeRids": [
1645
+ "com.palantir.exampleInterface",
1646
+ ],
1647
+ },
1648
+ "type": "objectTypeReference",
1649
+ },
1650
+ "type": "objectTypeReference",
1651
+ },
1652
+ "required": {
1653
+ "required": {},
1654
+ "type": "required",
1655
+ },
1656
+ },
1657
+ },
1658
+ },
1659
+ "overridden": {
1660
+ "conditionalOverrides": [],
1661
+ "defaultValidation": {
1662
+ "display": {
1663
+ "renderHint": {
1664
+ "textInput": {},
1665
+ "type": "textInput",
1666
+ },
1667
+ "visibility": {
1668
+ "editable": {},
1669
+ "type": "editable",
1670
+ },
1671
+ },
1672
+ "validation": {
1673
+ "allowedValues": {
1674
+ "text": {
1675
+ "text": {},
1676
+ "type": "text",
1677
+ },
1678
+ "type": "text",
1679
+ },
1680
+ "required": {
1681
+ "notRequired": {},
1682
+ "type": "notRequired",
1683
+ },
1684
+ },
1685
+ },
1686
+ },
1687
+ "spt1": {
1688
+ "conditionalOverrides": [
1689
+ {
1690
+ "condition": {
1691
+ "and": {
1692
+ "conditions": [
1693
+ {
1694
+ "comparison": {
1695
+ "left": {
1696
+ "type": "userProperty",
1697
+ "userProperty": {
1698
+ "propertyValue": {
1699
+ "groupIds": {},
1700
+ "type": "groupIds",
1701
+ },
1702
+ "userId": {
1703
+ "currentUser": {},
1704
+ "type": "currentUser",
1705
+ },
1706
+ },
1707
+ },
1708
+ "operator": "INTERSECTS",
1709
+ "right": {
1710
+ "staticValue": {
1711
+ "stringList": {
1712
+ "strings": [
1713
+ "parameterLevelGroup",
1714
+ ],
1715
+ },
1716
+ "type": "stringList",
1717
+ },
1718
+ "type": "staticValue",
1719
+ },
1720
+ },
1721
+ "type": "comparison",
1722
+ },
1723
+ {
1724
+ "comparison": {
1725
+ "left": {
1726
+ "parameterId": "overridden",
1727
+ "type": "parameterId",
1728
+ },
1729
+ "operator": "EQUALS",
1730
+ "right": {
1731
+ "staticValue": {
1732
+ "string": "bar",
1733
+ "type": "string",
1734
+ },
1735
+ "type": "staticValue",
1736
+ },
1737
+ },
1738
+ "type": "comparison",
1739
+ },
1740
+ ],
1741
+ },
1742
+ "type": "and",
1743
+ },
1744
+ "parameterBlockOverrides": [
1745
+ {
1746
+ "parameterRequired": {
1747
+ "required": {
1748
+ "required": {},
1749
+ "type": "required",
1750
+ },
1751
+ },
1752
+ "type": "parameterRequired",
1753
+ },
1754
+ ],
1755
+ },
1756
+ ],
1757
+ "defaultValidation": {
1758
+ "display": {
1759
+ "prefill": {
1760
+ "staticValue": {
1761
+ "string": "default_fizz",
1762
+ "type": "string",
1763
+ },
1764
+ "type": "staticValue",
1765
+ },
1766
+ "renderHint": {
1767
+ "textInput": {},
1768
+ "type": "textInput",
1769
+ },
1770
+ "visibility": {
1771
+ "editable": {},
1772
+ "type": "editable",
1773
+ },
1774
+ },
1775
+ "validation": {
1776
+ "allowedValues": {
1777
+ "text": {
1778
+ "text": {},
1779
+ "type": "text",
1780
+ },
1781
+ "type": "text",
1782
+ },
1783
+ "required": {
1784
+ "notRequired": {},
1785
+ "type": "notRequired",
1786
+ },
1787
+ },
1788
+ },
1789
+ },
1790
+ },
1791
+ "sectionValidations": {},
1792
+ },
1793
+ },
1794
+ "metadata": {
1795
+ "apiName": "com.palantir.create-with-overrides",
1796
+ "displayMetadata": {
1797
+ "configuration": {
1798
+ "defaultLayout": "FORM",
1799
+ "displayAndFormat": {
1800
+ "table": {
1801
+ "columnWidthByParameterRid": {},
1802
+ "enableFileImport": true,
1803
+ "fitHorizontally": false,
1804
+ "frozenColumnCount": 0,
1805
+ "rowHeightInLines": 1,
1806
+ },
1807
+ },
1808
+ "enableLayoutUserSwitch": false,
1809
+ },
1810
+ "description": "",
1811
+ "displayName": "Create exampleInterface",
1812
+ "icon": {
1813
+ "blueprint": {
1814
+ "color": "#000000",
1815
+ "locator": "edit",
1816
+ },
1817
+ "type": "blueprint",
1818
+ },
1819
+ "successMessage": [],
1820
+ "typeClasses": [],
1821
+ },
1822
+ "entities": {
1823
+ "affectedInterfaceTypes": [
1824
+ "com.palantir.exampleInterface",
1825
+ ],
1826
+ "affectedLinkTypes": [],
1827
+ "affectedObjectTypes": [],
1828
+ "typeGroups": [],
1829
+ },
1830
+ "formContentOrdering": [],
1831
+ "parameterOrdering": [
1832
+ "objectTypeParameter",
1833
+ "overridden",
1834
+ "spt1",
1835
+ ],
1836
+ "parameters": {
1837
+ "objectTypeParameter": {
1838
+ "displayMetadata": {
1839
+ "description": "",
1840
+ "displayName": "Object type to create",
1841
+ "typeClasses": [],
1842
+ },
1843
+ "id": "objectTypeParameter",
1844
+ "type": {
1845
+ "objectTypeReference": {
1846
+ "interfaceTypeRids": [
1847
+ "com.palantir.exampleInterface",
1848
+ ],
1849
+ },
1850
+ "type": "objectTypeReference",
1851
+ },
1852
+ },
1853
+ "overridden": {
1854
+ "displayMetadata": {
1855
+ "description": "",
1856
+ "displayName": "spt",
1857
+ "typeClasses": [],
1858
+ },
1859
+ "id": "overridden",
1860
+ "type": {
1861
+ "string": {},
1862
+ "type": "string",
1863
+ },
1864
+ },
1865
+ "spt1": {
1866
+ "displayMetadata": {
1867
+ "description": "fizz_description",
1868
+ "displayName": "fizz_display",
1869
+ "typeClasses": [],
1870
+ },
1871
+ "id": "spt1",
1872
+ "type": {
1873
+ "string": {},
1874
+ "type": "string",
1875
+ },
1876
+ },
1877
+ },
1878
+ "sections": {},
1879
+ "status": {
1880
+ "active": {},
1881
+ "type": "active",
1882
+ },
1883
+ },
1884
+ },
1885
+ },
1886
+ "com.palantir.modify-example-interface": {
1887
+ "actionType": {
1888
+ "actionTypeLogic": {
1889
+ "logic": {
1890
+ "rules": [
1891
+ {
1892
+ "modifyInterfaceRule": {
1893
+ "interfaceObjectToModifyParameter": "interfaceObjectToModifyParameter",
1894
+ "sharedPropertyValues": {
1895
+ "com.palantir.spt1": {
1896
+ "parameterId": "spt1",
1897
+ "type": "parameterId",
1898
+ },
1899
+ "com.palantir.spt2": {
1900
+ "parameterId": "spt2",
1901
+ "type": "parameterId",
1902
+ },
1903
+ },
1904
+ },
1905
+ "type": "modifyInterfaceRule",
1906
+ },
1907
+ ],
1908
+ },
1909
+ "validation": {
1910
+ "actionTypeLevelValidation": {
1911
+ "rules": {
1912
+ "0": {
1913
+ "condition": {
1914
+ "true": {},
1915
+ "type": "true",
1916
+ },
1917
+ "displayMetadata": {
1918
+ "failureMessage": "",
1919
+ "typeClasses": [],
1920
+ },
1921
+ },
1922
+ },
1923
+ },
1924
+ "parameterValidations": {
1925
+ "interfaceObjectToModifyParameter": {
1926
+ "conditionalOverrides": [],
1927
+ "defaultValidation": {
1928
+ "display": {
1929
+ "renderHint": {
1930
+ "dropdown": {},
1931
+ "type": "dropdown",
1932
+ },
1933
+ "visibility": {
1934
+ "editable": {},
1935
+ "type": "editable",
1936
+ },
1937
+ },
1938
+ "validation": {
1939
+ "allowedValues": {
1940
+ "interfaceObjectQuery": {
1941
+ "interfaceObjectQuery": {},
1942
+ "type": "interfaceObjectQuery",
1943
+ },
1944
+ "type": "interfaceObjectQuery",
1945
+ },
1946
+ "required": {
1947
+ "required": {},
1948
+ "type": "required",
1949
+ },
1950
+ },
1951
+ },
1952
+ },
1953
+ "spt1": {
1954
+ "conditionalOverrides": [],
1955
+ "defaultValidation": {
1956
+ "display": {
1957
+ "renderHint": {
1958
+ "textInput": {},
1959
+ "type": "textInput",
1960
+ },
1961
+ "visibility": {
1962
+ "editable": {},
1963
+ "type": "editable",
1964
+ },
1965
+ },
1966
+ "validation": {
1967
+ "allowedValues": {
1968
+ "text": {
1969
+ "text": {},
1970
+ "type": "text",
1971
+ },
1972
+ "type": "text",
1973
+ },
1974
+ "required": {
1975
+ "notRequired": {},
1976
+ "type": "notRequired",
1977
+ },
1978
+ },
1979
+ },
1980
+ },
1981
+ "spt2": {
1982
+ "conditionalOverrides": [],
1983
+ "defaultValidation": {
1984
+ "display": {
1985
+ "renderHint": {
1986
+ "textInput": {},
1987
+ "type": "textInput",
1988
+ },
1989
+ "visibility": {
1990
+ "editable": {},
1991
+ "type": "editable",
1992
+ },
1993
+ },
1994
+ "validation": {
1995
+ "allowedValues": {
1996
+ "text": {
1997
+ "text": {},
1998
+ "type": "text",
1999
+ },
2000
+ "type": "text",
2001
+ },
2002
+ "required": {
2003
+ "notRequired": {},
2004
+ "type": "notRequired",
2005
+ },
2006
+ },
2007
+ },
2008
+ },
2009
+ },
2010
+ "sectionValidations": {},
2011
+ },
2012
+ },
2013
+ "metadata": {
2014
+ "apiName": "com.palantir.modify-example-interface",
2015
+ "displayMetadata": {
2016
+ "configuration": {
2017
+ "defaultLayout": "FORM",
2018
+ "displayAndFormat": {
2019
+ "table": {
2020
+ "columnWidthByParameterRid": {},
2021
+ "enableFileImport": true,
2022
+ "fitHorizontally": false,
2023
+ "frozenColumnCount": 0,
2024
+ "rowHeightInLines": 1,
2025
+ },
2026
+ },
2027
+ "enableLayoutUserSwitch": false,
2028
+ },
2029
+ "description": "",
2030
+ "displayName": "Modify exampleInterface",
2031
+ "icon": {
2032
+ "blueprint": {
2033
+ "color": "#000000",
2034
+ "locator": "edit",
2035
+ },
2036
+ "type": "blueprint",
2037
+ },
2038
+ "successMessage": [],
2039
+ "typeClasses": [],
2040
+ },
2041
+ "entities": {
2042
+ "affectedInterfaceTypes": [
2043
+ "com.palantir.exampleInterface",
2044
+ ],
2045
+ "affectedLinkTypes": [],
2046
+ "affectedObjectTypes": [],
2047
+ "typeGroups": [],
2048
+ },
2049
+ "formContentOrdering": [],
2050
+ "parameterOrdering": [
2051
+ "interfaceObjectToModifyParameter",
2052
+ "spt1",
2053
+ "spt2",
2054
+ ],
2055
+ "parameters": {
2056
+ "interfaceObjectToModifyParameter": {
2057
+ "displayMetadata": {
2058
+ "description": "",
2059
+ "displayName": "Object type to modify",
2060
+ "typeClasses": [],
2061
+ },
2062
+ "id": "interfaceObjectToModifyParameter",
2063
+ "type": {
2064
+ "interfaceReference": {
2065
+ "interfaceTypeRid": "com.palantir.exampleInterface",
2066
+ },
2067
+ "type": "interfaceReference",
2068
+ },
2069
+ },
2070
+ "spt1": {
2071
+ "displayMetadata": {
2072
+ "description": "",
2073
+ "displayName": "spt",
2074
+ "typeClasses": [],
2075
+ },
2076
+ "id": "spt1",
2077
+ "type": {
2078
+ "string": {},
2079
+ "type": "string",
2080
+ },
2081
+ },
2082
+ "spt2": {
2083
+ "displayMetadata": {
2084
+ "description": "",
2085
+ "displayName": "spt",
2086
+ "typeClasses": [],
2087
+ },
2088
+ "id": "spt2",
2089
+ "type": {
2090
+ "string": {},
2091
+ "type": "string",
2092
+ },
2093
+ },
2094
+ },
2095
+ "sections": {},
2096
+ "status": {
2097
+ "active": {},
2098
+ "type": "active",
2099
+ },
2100
+ },
2101
+ },
2102
+ },
2103
+ "com.palantir.modify-with-overrides": {
2104
+ "actionType": {
2105
+ "actionTypeLogic": {
2106
+ "logic": {
2107
+ "rules": [
2108
+ {
2109
+ "modifyInterfaceRule": {
2110
+ "interfaceObjectToModifyParameter": "interfaceObjectToModifyParameter",
2111
+ "sharedPropertyValues": {
2112
+ "com.palantir.spt1": {
2113
+ "parameterId": "spt1",
2114
+ "type": "parameterId",
2115
+ },
2116
+ "com.palantir.spt2": {
2117
+ "parameterId": "overridden",
2118
+ "type": "parameterId",
2119
+ },
2120
+ },
2121
+ },
2122
+ "type": "modifyInterfaceRule",
2123
+ },
2124
+ ],
2125
+ },
2126
+ "validation": {
2127
+ "actionTypeLevelValidation": {
2128
+ "rules": {
2129
+ "0": {
2130
+ "condition": {
2131
+ "true": {},
2132
+ "type": "true",
2133
+ },
2134
+ "displayMetadata": {
2135
+ "failureMessage": "",
2136
+ "typeClasses": [],
2137
+ },
2138
+ },
2139
+ },
2140
+ },
2141
+ "parameterValidations": {
2142
+ "interfaceObjectToModifyParameter": {
2143
+ "conditionalOverrides": [],
2144
+ "defaultValidation": {
2145
+ "display": {
2146
+ "renderHint": {
2147
+ "dropdown": {},
2148
+ "type": "dropdown",
2149
+ },
2150
+ "visibility": {
2151
+ "editable": {},
2152
+ "type": "editable",
2153
+ },
2154
+ },
2155
+ "validation": {
2156
+ "allowedValues": {
2157
+ "interfaceObjectQuery": {
2158
+ "interfaceObjectQuery": {},
2159
+ "type": "interfaceObjectQuery",
2160
+ },
2161
+ "type": "interfaceObjectQuery",
2162
+ },
2163
+ "required": {
2164
+ "required": {},
2165
+ "type": "required",
2166
+ },
2167
+ },
2168
+ },
2169
+ },
2170
+ "overridden": {
2171
+ "conditionalOverrides": [],
2172
+ "defaultValidation": {
2173
+ "display": {
2174
+ "renderHint": {
2175
+ "textInput": {},
2176
+ "type": "textInput",
2177
+ },
2178
+ "visibility": {
2179
+ "editable": {},
2180
+ "type": "editable",
2181
+ },
2182
+ },
2183
+ "validation": {
2184
+ "allowedValues": {
2185
+ "text": {
2186
+ "text": {},
2187
+ "type": "text",
2188
+ },
2189
+ "type": "text",
2190
+ },
2191
+ "required": {
2192
+ "notRequired": {},
2193
+ "type": "notRequired",
2194
+ },
2195
+ },
2196
+ },
2197
+ },
2198
+ "spt1": {
2199
+ "conditionalOverrides": [
2200
+ {
2201
+ "condition": {
2202
+ "and": {
2203
+ "conditions": [
2204
+ {
2205
+ "comparison": {
2206
+ "left": {
2207
+ "type": "userProperty",
2208
+ "userProperty": {
2209
+ "propertyValue": {
2210
+ "groupIds": {},
2211
+ "type": "groupIds",
2212
+ },
2213
+ "userId": {
2214
+ "currentUser": {},
2215
+ "type": "currentUser",
2216
+ },
2217
+ },
2218
+ },
2219
+ "operator": "INTERSECTS",
2220
+ "right": {
2221
+ "staticValue": {
2222
+ "stringList": {
2223
+ "strings": [
2224
+ "parameterLevelGroup",
2225
+ ],
2226
+ },
2227
+ "type": "stringList",
2228
+ },
2229
+ "type": "staticValue",
2230
+ },
2231
+ },
2232
+ "type": "comparison",
2233
+ },
2234
+ {
2235
+ "comparison": {
2236
+ "left": {
2237
+ "parameterId": "overridden",
2238
+ "type": "parameterId",
2239
+ },
2240
+ "operator": "EQUALS",
2241
+ "right": {
2242
+ "staticValue": {
2243
+ "string": "bar",
2244
+ "type": "string",
2245
+ },
2246
+ "type": "staticValue",
2247
+ },
2248
+ },
2249
+ "type": "comparison",
2250
+ },
2251
+ ],
2252
+ },
2253
+ "type": "and",
2254
+ },
2255
+ "parameterBlockOverrides": [
2256
+ {
2257
+ "parameterRequired": {
2258
+ "required": {
2259
+ "required": {},
2260
+ "type": "required",
2261
+ },
2262
+ },
2263
+ "type": "parameterRequired",
2264
+ },
2265
+ ],
2266
+ },
2267
+ ],
2268
+ "defaultValidation": {
2269
+ "display": {
2270
+ "prefill": {
2271
+ "staticValue": {
2272
+ "string": "default_fizz",
2273
+ "type": "string",
2274
+ },
2275
+ "type": "staticValue",
2276
+ },
2277
+ "renderHint": {
2278
+ "textInput": {},
2279
+ "type": "textInput",
2280
+ },
2281
+ "visibility": {
2282
+ "editable": {},
2283
+ "type": "editable",
2284
+ },
2285
+ },
2286
+ "validation": {
2287
+ "allowedValues": {
2288
+ "text": {
2289
+ "text": {},
2290
+ "type": "text",
2291
+ },
2292
+ "type": "text",
2293
+ },
2294
+ "required": {
2295
+ "notRequired": {},
2296
+ "type": "notRequired",
2297
+ },
2298
+ },
2299
+ },
2300
+ },
2301
+ },
2302
+ "sectionValidations": {},
2303
+ },
2304
+ },
2305
+ "metadata": {
2306
+ "apiName": "com.palantir.modify-with-overrides",
2307
+ "displayMetadata": {
2308
+ "configuration": {
2309
+ "defaultLayout": "FORM",
2310
+ "displayAndFormat": {
2311
+ "table": {
2312
+ "columnWidthByParameterRid": {},
2313
+ "enableFileImport": true,
2314
+ "fitHorizontally": false,
2315
+ "frozenColumnCount": 0,
2316
+ "rowHeightInLines": 1,
2317
+ },
2318
+ },
2319
+ "enableLayoutUserSwitch": false,
2320
+ },
2321
+ "description": "",
2322
+ "displayName": "Modify exampleInterface",
2323
+ "icon": {
2324
+ "blueprint": {
2325
+ "color": "#000000",
2326
+ "locator": "edit",
2327
+ },
2328
+ "type": "blueprint",
2329
+ },
2330
+ "successMessage": [],
2331
+ "typeClasses": [],
2332
+ },
2333
+ "entities": {
2334
+ "affectedInterfaceTypes": [
2335
+ "com.palantir.exampleInterface",
2336
+ ],
2337
+ "affectedLinkTypes": [],
2338
+ "affectedObjectTypes": [],
2339
+ "typeGroups": [],
2340
+ },
2341
+ "formContentOrdering": [],
2342
+ "parameterOrdering": [
2343
+ "interfaceObjectToModifyParameter",
2344
+ "overridden",
2345
+ "spt1",
2346
+ ],
2347
+ "parameters": {
2348
+ "interfaceObjectToModifyParameter": {
2349
+ "displayMetadata": {
2350
+ "description": "",
2351
+ "displayName": "Object type to modify",
2352
+ "typeClasses": [],
2353
+ },
2354
+ "id": "interfaceObjectToModifyParameter",
2355
+ "type": {
2356
+ "interfaceReference": {
2357
+ "interfaceTypeRid": "com.palantir.exampleInterface",
2358
+ },
2359
+ "type": "interfaceReference",
2360
+ },
2361
+ },
2362
+ "overridden": {
2363
+ "displayMetadata": {
2364
+ "description": "",
2365
+ "displayName": "spt",
2366
+ "typeClasses": [],
2367
+ },
2368
+ "id": "overridden",
2369
+ "type": {
2370
+ "string": {},
2371
+ "type": "string",
2372
+ },
2373
+ },
2374
+ "spt1": {
2375
+ "displayMetadata": {
2376
+ "description": "fizz_description",
2377
+ "displayName": "fizz_display",
2378
+ "typeClasses": [],
2379
+ },
2380
+ "id": "spt1",
2381
+ "type": {
2382
+ "string": {},
2383
+ "type": "string",
2384
+ },
2385
+ },
2386
+ },
2387
+ "sections": {},
2388
+ "status": {
2389
+ "active": {},
2390
+ "type": "active",
2391
+ },
2392
+ },
2393
+ },
2394
+ },
2395
+ },
2396
+ "blockPermissionInformation": {
2397
+ "actionTypes": {},
2398
+ "linkTypes": {},
2399
+ "objectTypes": {},
2400
+ },
2401
+ "interfaceTypes": {
2402
+ "com.palantir.exampleInterface": {
2403
+ "interfaceType": {
2404
+ "apiName": "com.palantir.exampleInterface",
2405
+ "displayMetadata": {
2406
+ "description": "exampleInterface",
2407
+ "displayName": "exampleInterface",
2408
+ "icon": {
2409
+ "blueprint": {
2410
+ "color": "#4C90F0",
2411
+ "locator": "layout-hierarchy",
2412
+ },
2413
+ "type": "blueprint",
2414
+ },
2415
+ },
2416
+ "extendsInterfaces": [],
2417
+ "links": [],
2418
+ "properties": [],
2419
+ "propertiesV2": {
2420
+ "com.palantir.spt1": {
2421
+ "required": true,
2422
+ "sharedPropertyType": {
2423
+ "aliases": [],
2424
+ "apiName": "com.palantir.spt1",
2425
+ "baseFormatter": undefined,
2426
+ "dataConstraints": undefined,
2427
+ "displayMetadata": {
2428
+ "description": undefined,
2429
+ "displayName": "spt",
2430
+ "visibility": "NORMAL",
2431
+ },
2432
+ "gothamMapping": undefined,
2433
+ "indexedForSearch": true,
2434
+ "type": {
2435
+ "string": {
2436
+ "analyzerOverride": undefined,
2437
+ "enableAsciiFolding": undefined,
2438
+ "isLongText": false,
2439
+ "supportsEfficientLeadingWildcard": false,
2440
+ "supportsExactMatching": true,
2441
+ },
2442
+ "type": "string",
2443
+ },
2444
+ "typeClasses": [
2445
+ {
2446
+ "kind": "render_hint",
2447
+ "name": "SELECTABLE",
2448
+ },
2449
+ {
2450
+ "kind": "render_hint",
2451
+ "name": "SORTABLE",
2452
+ },
2453
+ ],
2454
+ "valueType": undefined,
2455
+ },
2456
+ },
2457
+ "com.palantir.spt2": {
2458
+ "required": true,
2459
+ "sharedPropertyType": {
2460
+ "aliases": [],
2461
+ "apiName": "com.palantir.spt2",
2462
+ "baseFormatter": undefined,
2463
+ "dataConstraints": undefined,
2464
+ "displayMetadata": {
2465
+ "description": undefined,
2466
+ "displayName": "spt",
2467
+ "visibility": "NORMAL",
2468
+ },
2469
+ "gothamMapping": undefined,
2470
+ "indexedForSearch": true,
2471
+ "type": {
2472
+ "string": {
2473
+ "analyzerOverride": undefined,
2474
+ "enableAsciiFolding": undefined,
2475
+ "isLongText": false,
2476
+ "supportsEfficientLeadingWildcard": false,
2477
+ "supportsExactMatching": true,
2478
+ },
2479
+ "type": "string",
2480
+ },
2481
+ "typeClasses": [
2482
+ {
2483
+ "kind": "render_hint",
2484
+ "name": "SELECTABLE",
2485
+ },
2486
+ {
2487
+ "kind": "render_hint",
2488
+ "name": "SORTABLE",
2489
+ },
2490
+ ],
2491
+ "valueType": undefined,
2492
+ },
2493
+ },
2494
+ },
2495
+ "propertiesV3": {},
2496
+ "searchable": true,
2497
+ "status": {
2498
+ "active": {},
2499
+ "type": "active",
2500
+ },
2501
+ },
2502
+ },
2503
+ },
2504
+ "linkTypes": {},
2505
+ "objectTypes": {},
2506
+ "sharedPropertyTypes": {
2507
+ "com.palantir.spt1": {
2508
+ "sharedPropertyType": {
2509
+ "aliases": [],
2510
+ "apiName": "com.palantir.spt1",
2511
+ "baseFormatter": undefined,
2512
+ "dataConstraints": undefined,
2513
+ "displayMetadata": {
2514
+ "description": undefined,
2515
+ "displayName": "spt",
2516
+ "visibility": "NORMAL",
2517
+ },
2518
+ "gothamMapping": undefined,
2519
+ "indexedForSearch": true,
2520
+ "type": {
2521
+ "string": {
2522
+ "analyzerOverride": undefined,
2523
+ "enableAsciiFolding": undefined,
2524
+ "isLongText": false,
2525
+ "supportsEfficientLeadingWildcard": false,
2526
+ "supportsExactMatching": true,
2527
+ },
2528
+ "type": "string",
2529
+ },
2530
+ "typeClasses": [
2531
+ {
2532
+ "kind": "render_hint",
2533
+ "name": "SELECTABLE",
2534
+ },
2535
+ {
2536
+ "kind": "render_hint",
2537
+ "name": "SORTABLE",
2538
+ },
2539
+ ],
2540
+ "valueType": undefined,
2541
+ },
2542
+ },
2543
+ "com.palantir.spt2": {
2544
+ "sharedPropertyType": {
2545
+ "aliases": [],
2546
+ "apiName": "com.palantir.spt2",
2547
+ "baseFormatter": undefined,
2548
+ "dataConstraints": undefined,
2549
+ "displayMetadata": {
2550
+ "description": undefined,
2551
+ "displayName": "spt",
2552
+ "visibility": "NORMAL",
2553
+ },
2554
+ "gothamMapping": undefined,
2555
+ "indexedForSearch": true,
2556
+ "type": {
2557
+ "string": {
2558
+ "analyzerOverride": undefined,
2559
+ "enableAsciiFolding": undefined,
2560
+ "isLongText": false,
2561
+ "supportsEfficientLeadingWildcard": false,
2562
+ "supportsExactMatching": true,
2563
+ },
2564
+ "type": "string",
2565
+ },
2566
+ "typeClasses": [
2567
+ {
2568
+ "kind": "render_hint",
2569
+ "name": "SELECTABLE",
2570
+ },
2571
+ {
2572
+ "kind": "render_hint",
2573
+ "name": "SORTABLE",
2574
+ },
2575
+ ],
2576
+ "valueType": undefined,
2577
+ },
2578
+ },
2579
+ },
2580
+ },
2581
+ "randomnessKey": undefined,
2582
+ "valueTypes": {
2583
+ "valueTypes": [],
2584
+ },
2585
+ }
2586
+ `);});it("Simple interface actions (without object types) are properly defined",()=>{const exampleInterface=defineInterface({apiName:"exampleInterface",properties:{property1:"string"}});defineCreateInterfaceObjectAction({interfaceType:exampleInterface});defineModifyInterfaceObjectAction({interfaceType:exampleInterface});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
1345
2587
  {
1346
2588
  "importedOntology": {
1347
2589
  "actionTypes": {},