@osdk/maker 0.13.0-beta.9 → 0.13.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 (514) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/README.md +55 -13
  3. package/build/browser/api/action/ActionLevelValidationDefinition.js +2 -0
  4. package/build/browser/api/action/ActionLevelValidationDefinition.js.map +1 -0
  5. package/build/browser/api/action/ActionParameter.js +2 -0
  6. package/build/browser/api/action/ActionParameter.js.map +1 -0
  7. package/build/browser/api/action/ActionParameterAllowedValues.js +2 -0
  8. package/build/browser/api/action/ActionParameterAllowedValues.js.map +1 -0
  9. package/build/browser/api/action/ActionParameterConditionalOverride.js +2 -0
  10. package/build/browser/api/action/ActionParameterConditionalOverride.js.map +1 -0
  11. package/build/browser/api/action/ActionParameterConfiguration.js +2 -0
  12. package/build/browser/api/action/ActionParameterConfiguration.js.map +1 -0
  13. package/build/browser/api/action/ActionParameterType.js +22 -0
  14. package/build/browser/api/action/ActionParameterType.js.map +1 -0
  15. package/build/browser/api/action/ActionSection.js +2 -0
  16. package/build/browser/api/action/ActionSection.js.map +1 -0
  17. package/build/browser/api/action/ActionStatus.js +2 -0
  18. package/build/browser/api/action/ActionStatus.js.map +1 -0
  19. package/build/browser/api/action/ActionType.js +2 -0
  20. package/build/browser/api/action/ActionType.js.map +1 -0
  21. package/build/browser/api/action/ActionValidationRule.js +2 -0
  22. package/build/browser/api/action/ActionValidationRule.js.map +1 -0
  23. package/build/browser/api/action/ConditionDefinition.js +2 -0
  24. package/build/browser/api/action/ConditionDefinition.js.map +1 -0
  25. package/build/browser/api/action/MappingValue.js +2 -0
  26. package/build/browser/api/action/MappingValue.js.map +1 -0
  27. package/build/browser/api/action/SectionConditionalOverride.js +2 -0
  28. package/build/browser/api/action/SectionConditionalOverride.js.map +1 -0
  29. package/build/browser/api/action/SubmissionMetadata.js +2 -0
  30. package/build/browser/api/action/SubmissionMetadata.js.map +1 -0
  31. package/build/browser/api/common/BlueprintIcons.js +2 -0
  32. package/build/browser/api/common/BlueprintIcons.js.map +1 -0
  33. package/build/browser/api/common/OntologyDefinition.js +2 -0
  34. package/build/browser/api/common/OntologyDefinition.js.map +1 -0
  35. package/build/browser/api/common/OntologyEntityBase.js +2 -0
  36. package/build/browser/api/common/OntologyEntityBase.js.map +1 -0
  37. package/build/browser/api/{types.js → common/OntologyEntityTypeEnum.js} +2 -8
  38. package/build/browser/api/common/OntologyEntityTypeEnum.js.map +1 -0
  39. package/build/browser/api/common/OntologyEntityTypeMapping.js +2 -0
  40. package/build/browser/api/common/OntologyEntityTypeMapping.js.map +1 -0
  41. package/build/browser/api/common/TypeClass.js +2 -0
  42. package/build/browser/api/common/TypeClass.js.map +1 -0
  43. package/build/browser/api/defineAction.js +64 -41
  44. package/build/browser/api/defineAction.js.map +1 -1
  45. package/build/browser/api/defineInterface.js +14 -34
  46. package/build/browser/api/defineInterface.js.map +1 -1
  47. package/build/browser/api/defineInterfaceLinkConstraint.js +3 -2
  48. package/build/browser/api/defineInterfaceLinkConstraint.js.map +1 -1
  49. package/build/browser/api/defineLink.js +33 -12
  50. package/build/browser/api/defineLink.js.map +1 -1
  51. package/build/browser/api/defineObject.js +9 -29
  52. package/build/browser/api/defineObject.js.map +1 -1
  53. package/build/browser/api/defineOntology.js +16 -552
  54. package/build/browser/api/defineOntology.js.map +1 -1
  55. package/build/browser/api/defineSpt.js +1 -1
  56. package/build/browser/api/defineSpt.js.map +1 -1
  57. package/build/browser/api/defineValueType.js +1 -1
  58. package/build/browser/api/defineValueType.js.map +1 -1
  59. package/build/browser/api/importOntologyEntity.js +1 -1
  60. package/build/browser/api/importOntologyEntity.js.map +1 -1
  61. package/build/browser/api/{defineImportSpt.js → importSharedPropertyType.js} +2 -3
  62. package/build/browser/api/importSharedPropertyType.js.map +1 -0
  63. package/build/browser/api/interface/InterfacePropertyType.js +2 -0
  64. package/build/browser/api/interface/InterfacePropertyType.js.map +1 -0
  65. package/build/browser/api/interface/InterfaceType.js +2 -0
  66. package/build/browser/api/interface/InterfaceType.js.map +1 -0
  67. package/build/browser/api/interface/getFlattenedInterfaceProperties.js +27 -0
  68. package/build/browser/api/interface/getFlattenedInterfaceProperties.js.map +1 -0
  69. package/build/browser/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.js +42 -0
  70. package/build/browser/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.js.map +1 -0
  71. package/build/browser/api/links/LinkType.js +2 -0
  72. package/build/browser/api/links/LinkType.js.map +1 -0
  73. package/build/browser/api/namespace/combineApiNamespaceIfMissing.js +20 -0
  74. package/build/browser/api/namespace/combineApiNamespaceIfMissing.js.map +1 -0
  75. package/build/browser/api/object/InterfaceImplementation.js +2 -0
  76. package/build/browser/api/object/InterfaceImplementation.js.map +1 -0
  77. package/build/browser/api/object/ObjectPropertyType.js +2 -0
  78. package/build/browser/api/object/ObjectPropertyType.js.map +1 -0
  79. package/build/browser/api/object/ObjectPropertyTypeUserDefinition.js +2 -0
  80. package/build/browser/api/object/ObjectPropertyTypeUserDefinition.js.map +1 -0
  81. package/build/browser/api/object/ObjectType.js +2 -0
  82. package/build/browser/api/object/ObjectType.js.map +1 -0
  83. package/build/browser/api/object/ObjectTypeDatasourceDefinition.js +2 -0
  84. package/build/browser/api/object/ObjectTypeDatasourceDefinition.js.map +1 -0
  85. package/build/browser/api/object/ObjectTypeDefinition.js +2 -0
  86. package/build/browser/api/object/ObjectTypeDefinition.js.map +1 -0
  87. package/build/browser/api/object/ObjectTypeStatus.js +2 -0
  88. package/build/browser/api/object/ObjectTypeStatus.js.map +1 -0
  89. package/build/browser/api/objectStatus.test.js.map +1 -1
  90. package/build/browser/api/overall.test.js +1981 -689
  91. package/build/browser/api/overall.test.js.map +1 -1
  92. package/build/browser/api/properties/Nullability.js +2 -0
  93. package/build/browser/api/properties/Nullability.js.map +1 -0
  94. package/build/browser/api/properties/PropertyTypeType.js +34 -0
  95. package/build/browser/api/properties/PropertyTypeType.js.map +1 -0
  96. package/build/browser/api/properties/SharedPropertyType.js +2 -0
  97. package/build/browser/api/properties/SharedPropertyType.js.map +1 -0
  98. package/build/browser/api/propertyConversionUtils.js +0 -238
  99. package/build/browser/api/propertyConversionUtils.js.map +1 -1
  100. package/build/browser/api/values/ValueTypeDefinitionVersion.js +2 -0
  101. package/build/browser/api/values/ValueTypeDefinitionVersion.js.map +1 -0
  102. package/build/browser/api/values/ValueTypeType.js +2 -0
  103. package/build/browser/api/values/ValueTypeType.js.map +1 -0
  104. package/build/browser/api/wrapWithProxy.js +1 -0
  105. package/build/browser/api/wrapWithProxy.js.map +1 -1
  106. package/build/browser/cli/main.js +10 -1
  107. package/build/browser/cli/main.js.map +1 -1
  108. package/build/browser/conversion/toConjure/distributeTypeHelper.js +23 -0
  109. package/build/browser/conversion/toConjure/distributeTypeHelper.js.map +1 -0
  110. package/build/browser/conversion/toMarketplace/convertActionParameterConditionalOverride.js +88 -0
  111. package/build/browser/conversion/toMarketplace/convertActionParameterConditionalOverride.js.map +1 -0
  112. package/build/browser/conversion/toMarketplace/convertActionParameters.js +31 -0
  113. package/build/browser/conversion/toMarketplace/convertActionParameters.js.map +1 -0
  114. package/build/browser/conversion/toMarketplace/convertActionSections.js +43 -0
  115. package/build/browser/conversion/toMarketplace/convertActionSections.js.map +1 -0
  116. package/build/browser/conversion/toMarketplace/convertActionValidation.js +93 -0
  117. package/build/browser/conversion/toMarketplace/convertActionValidation.js.map +1 -0
  118. package/build/browser/conversion/toMarketplace/convertActionVisibility.js +41 -0
  119. package/build/browser/conversion/toMarketplace/convertActionVisibility.js.map +1 -0
  120. package/build/browser/conversion/toMarketplace/convertCardinality.js +23 -0
  121. package/build/browser/conversion/toMarketplace/convertCardinality.js.map +1 -0
  122. package/build/browser/conversion/toMarketplace/convertConditionDefinition.js +86 -0
  123. package/build/browser/conversion/toMarketplace/convertConditionDefinition.js.map +1 -0
  124. package/build/browser/conversion/toMarketplace/convertDataConstraintToDataConstraints.js +26 -0
  125. package/build/browser/conversion/toMarketplace/convertDataConstraintToDataConstraints.js.map +1 -0
  126. package/build/browser/conversion/toMarketplace/convertDatasourceDefinition.js +89 -0
  127. package/build/browser/conversion/toMarketplace/convertDatasourceDefinition.js.map +1 -0
  128. package/build/browser/conversion/toMarketplace/convertInterface.js +47 -0
  129. package/build/browser/conversion/toMarketplace/convertInterface.js.map +1 -0
  130. package/build/browser/conversion/toMarketplace/convertLink.js +132 -0
  131. package/build/browser/conversion/toMarketplace/convertLink.js.map +1 -0
  132. package/build/browser/conversion/toMarketplace/convertMappingValue.js +41 -0
  133. package/build/browser/conversion/toMarketplace/convertMappingValue.js.map +1 -0
  134. package/build/browser/conversion/toMarketplace/convertNullabilityToDataConstraint.js +43 -0
  135. package/build/browser/conversion/toMarketplace/convertNullabilityToDataConstraint.js.map +1 -0
  136. package/build/browser/conversion/toMarketplace/convertObject.js +108 -0
  137. package/build/browser/conversion/toMarketplace/convertObject.js.map +1 -0
  138. package/build/browser/conversion/toMarketplace/convertObjectPropertyType.js +53 -0
  139. package/build/browser/conversion/toMarketplace/convertObjectPropertyType.js.map +1 -0
  140. package/build/browser/conversion/toMarketplace/convertOntologyDefinition.js +29 -0
  141. package/build/browser/conversion/toMarketplace/convertOntologyDefinition.js.map +1 -0
  142. package/build/browser/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js +57 -0
  143. package/build/browser/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js.map +1 -0
  144. package/build/browser/conversion/toMarketplace/convertOntologyToValueTypeIr.js +24 -0
  145. package/build/browser/conversion/toMarketplace/convertOntologyToValueTypeIr.js.map +1 -0
  146. package/build/browser/conversion/toMarketplace/convertSectionConditionalOverride.js +35 -0
  147. package/build/browser/conversion/toMarketplace/convertSectionConditionalOverride.js.map +1 -0
  148. package/build/browser/conversion/toMarketplace/convertSpt.js +62 -0
  149. package/build/browser/conversion/toMarketplace/convertSpt.js.map +1 -0
  150. package/build/browser/conversion/toMarketplace/convertValueType.js +25 -0
  151. package/build/browser/conversion/toMarketplace/convertValueType.js.map +1 -0
  152. package/build/browser/conversion/toMarketplace/convertValueTypeDataConstraints.js +30 -0
  153. package/build/browser/conversion/toMarketplace/convertValueTypeDataConstraints.js.map +1 -0
  154. package/build/browser/conversion/toMarketplace/convertValueTypesToIr.js +34 -0
  155. package/build/browser/conversion/toMarketplace/convertValueTypesToIr.js.map +1 -0
  156. package/build/browser/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.js +83 -0
  157. package/build/browser/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.js.map +1 -0
  158. package/build/browser/conversion/toMarketplace/getFormContentOrdering.js +39 -0
  159. package/build/browser/conversion/toMarketplace/getFormContentOrdering.js.map +1 -0
  160. package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js +124 -0
  161. package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js.map +1 -0
  162. package/build/browser/index.js +5 -5
  163. package/build/browser/index.js.map +1 -1
  164. package/build/browser/util/OptionalFields.js +2 -0
  165. package/build/browser/util/OptionalFields.js.map +1 -0
  166. package/build/browser/util/RequiredFields.js +2 -0
  167. package/build/browser/util/RequiredFields.js.map +1 -0
  168. package/build/cjs/index.cjs +1114 -982
  169. package/build/cjs/index.cjs.map +1 -1
  170. package/build/cjs/index.d.cts +417 -346
  171. package/build/esm/api/action/ActionLevelValidationDefinition.js +2 -0
  172. package/build/esm/api/action/ActionLevelValidationDefinition.js.map +1 -0
  173. package/build/esm/api/action/ActionParameter.js +2 -0
  174. package/build/esm/api/action/ActionParameter.js.map +1 -0
  175. package/build/esm/api/action/ActionParameterAllowedValues.js +2 -0
  176. package/build/esm/api/action/ActionParameterAllowedValues.js.map +1 -0
  177. package/build/esm/api/action/ActionParameterConditionalOverride.js +2 -0
  178. package/build/esm/api/action/ActionParameterConditionalOverride.js.map +1 -0
  179. package/build/esm/api/action/ActionParameterConfiguration.js +2 -0
  180. package/build/esm/api/action/ActionParameterConfiguration.js.map +1 -0
  181. package/build/esm/api/action/ActionParameterType.js +22 -0
  182. package/build/esm/api/action/ActionParameterType.js.map +1 -0
  183. package/build/esm/api/action/ActionSection.js +2 -0
  184. package/build/esm/api/action/ActionSection.js.map +1 -0
  185. package/build/esm/api/action/ActionStatus.js +2 -0
  186. package/build/esm/api/action/ActionStatus.js.map +1 -0
  187. package/build/esm/api/action/ActionType.js +2 -0
  188. package/build/esm/api/action/ActionType.js.map +1 -0
  189. package/build/esm/api/action/ActionValidationRule.js +2 -0
  190. package/build/esm/api/action/ActionValidationRule.js.map +1 -0
  191. package/build/esm/api/action/ConditionDefinition.js +2 -0
  192. package/build/esm/api/action/ConditionDefinition.js.map +1 -0
  193. package/build/esm/api/action/MappingValue.js +2 -0
  194. package/build/esm/api/action/MappingValue.js.map +1 -0
  195. package/build/esm/api/action/SectionConditionalOverride.js +2 -0
  196. package/build/esm/api/action/SectionConditionalOverride.js.map +1 -0
  197. package/build/esm/api/action/SubmissionMetadata.js +2 -0
  198. package/build/esm/api/action/SubmissionMetadata.js.map +1 -0
  199. package/build/esm/api/common/BlueprintIcons.js +2 -0
  200. package/build/esm/api/common/BlueprintIcons.js.map +1 -0
  201. package/build/esm/api/common/OntologyDefinition.js +2 -0
  202. package/build/esm/api/common/OntologyDefinition.js.map +1 -0
  203. package/build/esm/api/common/OntologyEntityBase.js +2 -0
  204. package/build/esm/api/common/OntologyEntityBase.js.map +1 -0
  205. package/build/esm/api/{types.js → common/OntologyEntityTypeEnum.js} +2 -8
  206. package/build/esm/api/common/OntologyEntityTypeEnum.js.map +1 -0
  207. package/build/esm/api/common/OntologyEntityTypeMapping.js +2 -0
  208. package/build/esm/api/common/OntologyEntityTypeMapping.js.map +1 -0
  209. package/build/esm/api/common/TypeClass.js +2 -0
  210. package/build/esm/api/common/TypeClass.js.map +1 -0
  211. package/build/esm/api/defineAction.js +64 -41
  212. package/build/esm/api/defineAction.js.map +1 -1
  213. package/build/esm/api/defineInterface.js +14 -34
  214. package/build/esm/api/defineInterface.js.map +1 -1
  215. package/build/esm/api/defineInterfaceLinkConstraint.js +3 -2
  216. package/build/esm/api/defineInterfaceLinkConstraint.js.map +1 -1
  217. package/build/esm/api/defineLink.js +33 -12
  218. package/build/esm/api/defineLink.js.map +1 -1
  219. package/build/esm/api/defineObject.js +9 -29
  220. package/build/esm/api/defineObject.js.map +1 -1
  221. package/build/esm/api/defineOntology.js +16 -552
  222. package/build/esm/api/defineOntology.js.map +1 -1
  223. package/build/esm/api/defineSpt.js +1 -1
  224. package/build/esm/api/defineSpt.js.map +1 -1
  225. package/build/esm/api/defineValueType.js +1 -1
  226. package/build/esm/api/defineValueType.js.map +1 -1
  227. package/build/esm/api/importOntologyEntity.js +1 -1
  228. package/build/esm/api/importOntologyEntity.js.map +1 -1
  229. package/build/esm/api/{defineImportSpt.js → importSharedPropertyType.js} +2 -3
  230. package/build/esm/api/importSharedPropertyType.js.map +1 -0
  231. package/build/esm/api/interface/InterfacePropertyType.js +2 -0
  232. package/build/esm/api/interface/InterfacePropertyType.js.map +1 -0
  233. package/build/esm/api/interface/InterfaceType.js +2 -0
  234. package/build/esm/api/interface/InterfaceType.js.map +1 -0
  235. package/build/esm/api/interface/getFlattenedInterfaceProperties.js +27 -0
  236. package/build/esm/api/interface/getFlattenedInterfaceProperties.js.map +1 -0
  237. package/build/esm/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.js +42 -0
  238. package/build/esm/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.js.map +1 -0
  239. package/build/esm/api/links/LinkType.js +2 -0
  240. package/build/esm/api/links/LinkType.js.map +1 -0
  241. package/build/esm/api/namespace/combineApiNamespaceIfMissing.js +20 -0
  242. package/build/esm/api/namespace/combineApiNamespaceIfMissing.js.map +1 -0
  243. package/build/esm/api/object/InterfaceImplementation.js +2 -0
  244. package/build/esm/api/object/InterfaceImplementation.js.map +1 -0
  245. package/build/esm/api/object/ObjectPropertyType.js +2 -0
  246. package/build/esm/api/object/ObjectPropertyType.js.map +1 -0
  247. package/build/esm/api/object/ObjectPropertyTypeUserDefinition.js +2 -0
  248. package/build/esm/api/object/ObjectPropertyTypeUserDefinition.js.map +1 -0
  249. package/build/esm/api/object/ObjectType.js +2 -0
  250. package/build/esm/api/object/ObjectType.js.map +1 -0
  251. package/build/esm/api/object/ObjectTypeDatasourceDefinition.js +2 -0
  252. package/build/esm/api/object/ObjectTypeDatasourceDefinition.js.map +1 -0
  253. package/build/esm/api/object/ObjectTypeDefinition.js +2 -0
  254. package/build/esm/api/object/ObjectTypeDefinition.js.map +1 -0
  255. package/build/esm/api/object/ObjectTypeStatus.js +2 -0
  256. package/build/esm/api/object/ObjectTypeStatus.js.map +1 -0
  257. package/build/esm/api/objectStatus.test.js.map +1 -1
  258. package/build/esm/api/overall.test.js +1981 -689
  259. package/build/esm/api/overall.test.js.map +1 -1
  260. package/build/esm/api/properties/Nullability.js +2 -0
  261. package/build/esm/api/properties/Nullability.js.map +1 -0
  262. package/build/esm/api/properties/PropertyTypeType.js +34 -0
  263. package/build/esm/api/properties/PropertyTypeType.js.map +1 -0
  264. package/build/esm/api/properties/SharedPropertyType.js +2 -0
  265. package/build/esm/api/properties/SharedPropertyType.js.map +1 -0
  266. package/build/esm/api/propertyConversionUtils.js +0 -238
  267. package/build/esm/api/propertyConversionUtils.js.map +1 -1
  268. package/build/esm/api/values/ValueTypeDefinitionVersion.js +2 -0
  269. package/build/esm/api/values/ValueTypeDefinitionVersion.js.map +1 -0
  270. package/build/esm/api/values/ValueTypeType.js +2 -0
  271. package/build/esm/api/values/ValueTypeType.js.map +1 -0
  272. package/build/esm/api/wrapWithProxy.js +1 -0
  273. package/build/esm/api/wrapWithProxy.js.map +1 -1
  274. package/build/esm/cli/main.js +10 -1
  275. package/build/esm/cli/main.js.map +1 -1
  276. package/build/esm/conversion/toConjure/distributeTypeHelper.js +23 -0
  277. package/build/esm/conversion/toConjure/distributeTypeHelper.js.map +1 -0
  278. package/build/esm/conversion/toMarketplace/convertActionParameterConditionalOverride.js +88 -0
  279. package/build/esm/conversion/toMarketplace/convertActionParameterConditionalOverride.js.map +1 -0
  280. package/build/esm/conversion/toMarketplace/convertActionParameters.js +31 -0
  281. package/build/esm/conversion/toMarketplace/convertActionParameters.js.map +1 -0
  282. package/build/esm/conversion/toMarketplace/convertActionSections.js +43 -0
  283. package/build/esm/conversion/toMarketplace/convertActionSections.js.map +1 -0
  284. package/build/esm/conversion/toMarketplace/convertActionValidation.js +93 -0
  285. package/build/esm/conversion/toMarketplace/convertActionValidation.js.map +1 -0
  286. package/build/esm/conversion/toMarketplace/convertActionVisibility.js +41 -0
  287. package/build/esm/conversion/toMarketplace/convertActionVisibility.js.map +1 -0
  288. package/build/esm/conversion/toMarketplace/convertCardinality.js +23 -0
  289. package/build/esm/conversion/toMarketplace/convertCardinality.js.map +1 -0
  290. package/build/esm/conversion/toMarketplace/convertConditionDefinition.js +86 -0
  291. package/build/esm/conversion/toMarketplace/convertConditionDefinition.js.map +1 -0
  292. package/build/esm/conversion/toMarketplace/convertDataConstraintToDataConstraints.js +26 -0
  293. package/build/esm/conversion/toMarketplace/convertDataConstraintToDataConstraints.js.map +1 -0
  294. package/build/esm/conversion/toMarketplace/convertDatasourceDefinition.js +89 -0
  295. package/build/esm/conversion/toMarketplace/convertDatasourceDefinition.js.map +1 -0
  296. package/build/esm/conversion/toMarketplace/convertInterface.js +47 -0
  297. package/build/esm/conversion/toMarketplace/convertInterface.js.map +1 -0
  298. package/build/esm/conversion/toMarketplace/convertLink.js +132 -0
  299. package/build/esm/conversion/toMarketplace/convertLink.js.map +1 -0
  300. package/build/esm/conversion/toMarketplace/convertMappingValue.js +41 -0
  301. package/build/esm/conversion/toMarketplace/convertMappingValue.js.map +1 -0
  302. package/build/esm/conversion/toMarketplace/convertNullabilityToDataConstraint.js +43 -0
  303. package/build/esm/conversion/toMarketplace/convertNullabilityToDataConstraint.js.map +1 -0
  304. package/build/esm/conversion/toMarketplace/convertObject.js +108 -0
  305. package/build/esm/conversion/toMarketplace/convertObject.js.map +1 -0
  306. package/build/esm/conversion/toMarketplace/convertObjectPropertyType.js +53 -0
  307. package/build/esm/conversion/toMarketplace/convertObjectPropertyType.js.map +1 -0
  308. package/build/esm/conversion/toMarketplace/convertOntologyDefinition.js +29 -0
  309. package/build/esm/conversion/toMarketplace/convertOntologyDefinition.js.map +1 -0
  310. package/build/esm/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js +57 -0
  311. package/build/esm/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js.map +1 -0
  312. package/build/esm/conversion/toMarketplace/convertOntologyToValueTypeIr.js +24 -0
  313. package/build/esm/conversion/toMarketplace/convertOntologyToValueTypeIr.js.map +1 -0
  314. package/build/esm/conversion/toMarketplace/convertSectionConditionalOverride.js +35 -0
  315. package/build/esm/conversion/toMarketplace/convertSectionConditionalOverride.js.map +1 -0
  316. package/build/esm/conversion/toMarketplace/convertSpt.js +62 -0
  317. package/build/esm/conversion/toMarketplace/convertSpt.js.map +1 -0
  318. package/build/esm/conversion/toMarketplace/convertValueType.js +25 -0
  319. package/build/esm/conversion/toMarketplace/convertValueType.js.map +1 -0
  320. package/build/esm/conversion/toMarketplace/convertValueTypeDataConstraints.js +30 -0
  321. package/build/esm/conversion/toMarketplace/convertValueTypeDataConstraints.js.map +1 -0
  322. package/build/esm/conversion/toMarketplace/convertValueTypesToIr.js +34 -0
  323. package/build/esm/conversion/toMarketplace/convertValueTypesToIr.js.map +1 -0
  324. package/build/esm/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.js +83 -0
  325. package/build/esm/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.js.map +1 -0
  326. package/build/esm/conversion/toMarketplace/getFormContentOrdering.js +39 -0
  327. package/build/esm/conversion/toMarketplace/getFormContentOrdering.js.map +1 -0
  328. package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js +124 -0
  329. package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js.map +1 -0
  330. package/build/esm/index.js +5 -5
  331. package/build/esm/index.js.map +1 -1
  332. package/build/esm/util/OptionalFields.js +2 -0
  333. package/build/esm/util/OptionalFields.js.map +1 -0
  334. package/build/esm/util/RequiredFields.js +2 -0
  335. package/build/esm/util/RequiredFields.js.map +1 -0
  336. package/build/types/api/action/ActionLevelValidationDefinition.d.ts +7 -0
  337. package/build/types/api/action/ActionLevelValidationDefinition.d.ts.map +1 -0
  338. package/build/types/api/action/ActionParameter.d.ts +14 -0
  339. package/build/types/api/action/ActionParameter.d.ts.map +1 -0
  340. package/build/types/api/action/ActionParameterAllowedValues.d.ts +50 -0
  341. package/build/types/api/action/ActionParameterAllowedValues.d.ts.map +1 -0
  342. package/build/types/api/action/ActionParameterConditionalOverride.d.ts +26 -0
  343. package/build/types/api/action/ActionParameterConditionalOverride.d.ts.map +1 -0
  344. package/build/types/api/action/ActionParameterConfiguration.d.ts +20 -0
  345. package/build/types/api/action/ActionParameterConfiguration.d.ts.map +1 -0
  346. package/build/types/api/action/ActionParameterType.d.ts +6 -0
  347. package/build/types/api/action/ActionParameterType.d.ts.map +1 -0
  348. package/build/types/api/action/ActionSection.d.ts +13 -0
  349. package/build/types/api/action/ActionSection.d.ts.map +1 -0
  350. package/build/types/api/action/ActionStatus.d.ts +2 -0
  351. package/build/types/api/action/ActionStatus.d.ts.map +1 -0
  352. package/build/types/api/action/ActionType.d.ts +36 -0
  353. package/build/types/api/action/ActionType.d.ts.map +1 -0
  354. package/build/types/api/action/ActionValidationRule.d.ts +2 -0
  355. package/build/types/api/action/ActionValidationRule.d.ts.map +1 -0
  356. package/build/types/api/action/ConditionDefinition.d.ts +15 -0
  357. package/build/types/api/action/ConditionDefinition.d.ts.map +1 -0
  358. package/build/types/api/action/MappingValue.d.ts +13 -0
  359. package/build/types/api/action/MappingValue.d.ts.map +1 -0
  360. package/build/types/api/action/SectionConditionalOverride.d.ts +2 -0
  361. package/build/types/api/action/SectionConditionalOverride.d.ts.map +1 -0
  362. package/build/types/api/action/SubmissionMetadata.d.ts +6 -0
  363. package/build/types/api/action/SubmissionMetadata.d.ts.map +1 -0
  364. package/build/types/api/{iconNames.d.ts.map → common/BlueprintIcons.d.ts.map} +1 -1
  365. package/build/types/api/common/OntologyDefinition.d.ts +6 -0
  366. package/build/types/api/common/OntologyDefinition.d.ts.map +1 -0
  367. package/build/types/api/common/OntologyEntityBase.d.ts +5 -0
  368. package/build/types/api/common/OntologyEntityBase.d.ts.map +1 -0
  369. package/build/types/api/common/OntologyEntityTypeEnum.d.ts +8 -0
  370. package/build/types/api/common/OntologyEntityTypeEnum.d.ts.map +1 -0
  371. package/build/types/api/common/OntologyEntityTypeMapping.d.ts +16 -0
  372. package/build/types/api/common/OntologyEntityTypeMapping.d.ts.map +1 -0
  373. package/build/types/api/common/TypeClass.d.ts +4 -0
  374. package/build/types/api/common/TypeClass.d.ts.map +1 -0
  375. package/build/types/api/defineAction.d.ts +38 -3
  376. package/build/types/api/defineAction.d.ts.map +1 -1
  377. package/build/types/api/defineInterface.d.ts +5 -3
  378. package/build/types/api/defineInterface.d.ts.map +1 -1
  379. package/build/types/api/defineInterfaceLinkConstraint.d.ts +1 -1
  380. package/build/types/api/defineInterfaceLinkConstraint.d.ts.map +1 -1
  381. package/build/types/api/defineLink.d.ts +1 -1
  382. package/build/types/api/defineLink.d.ts.map +1 -1
  383. package/build/types/api/defineObject.d.ts +2 -4
  384. package/build/types/api/defineObject.d.ts.map +1 -1
  385. package/build/types/api/defineOntology.d.ts +11 -4
  386. package/build/types/api/defineOntology.d.ts.map +1 -1
  387. package/build/types/api/defineSpt.d.ts +2 -1
  388. package/build/types/api/defineSpt.d.ts.map +1 -1
  389. package/build/types/api/defineValueType.d.ts +2 -1
  390. package/build/types/api/defineValueType.d.ts.map +1 -1
  391. package/build/types/api/importOntologyEntity.d.ts +1 -1
  392. package/build/types/api/importOntologyEntity.d.ts.map +1 -1
  393. package/build/types/api/{defineImportSpt.d.ts → importSharedPropertyType.d.ts} +2 -1
  394. package/build/types/api/importSharedPropertyType.d.ts.map +1 -0
  395. package/build/types/api/interface/InterfacePropertyType.d.ts +5 -0
  396. package/build/types/api/interface/InterfacePropertyType.d.ts.map +1 -0
  397. package/build/types/api/interface/InterfaceType.d.ts +10 -0
  398. package/build/types/api/interface/InterfaceType.d.ts.map +1 -0
  399. package/build/types/api/interface/getFlattenedInterfaceProperties.d.ts +3 -0
  400. package/build/types/api/interface/getFlattenedInterfaceProperties.d.ts.map +1 -0
  401. package/build/types/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.d.ts +3 -0
  402. package/build/types/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.d.ts.map +1 -0
  403. package/build/types/api/links/LinkType.d.ts +100 -0
  404. package/build/types/api/links/LinkType.d.ts.map +1 -0
  405. package/build/types/api/namespace/combineApiNamespaceIfMissing.d.ts +1 -0
  406. package/build/types/api/namespace/combineApiNamespaceIfMissing.d.ts.map +1 -0
  407. package/build/types/api/object/InterfaceImplementation.d.ts +8 -0
  408. package/build/types/api/object/InterfaceImplementation.d.ts.map +1 -0
  409. package/build/types/api/object/ObjectPropertyType.d.ts +27 -0
  410. package/build/types/api/object/ObjectPropertyType.d.ts.map +1 -0
  411. package/build/types/api/object/ObjectPropertyTypeUserDefinition.d.ts +3 -0
  412. package/build/types/api/object/ObjectPropertyTypeUserDefinition.d.ts.map +1 -0
  413. package/build/types/api/object/ObjectType.d.ts +29 -0
  414. package/build/types/api/object/ObjectType.d.ts.map +1 -0
  415. package/build/types/api/object/ObjectTypeDatasourceDefinition.d.ts +11 -0
  416. package/build/types/api/object/ObjectTypeDatasourceDefinition.d.ts.map +1 -0
  417. package/build/types/api/object/ObjectTypeDefinition.d.ts +26 -0
  418. package/build/types/api/object/ObjectTypeDefinition.d.ts.map +1 -0
  419. package/build/types/api/object/ObjectTypeStatus.d.ts +5 -0
  420. package/build/types/api/object/ObjectTypeStatus.d.ts.map +1 -0
  421. package/build/types/api/properties/Nullability.d.ts +4 -0
  422. package/build/types/api/properties/Nullability.d.ts.map +1 -0
  423. package/build/types/api/properties/PropertyTypeType.d.ts +33 -0
  424. package/build/types/api/properties/PropertyTypeType.d.ts.map +1 -0
  425. package/build/types/api/properties/SharedPropertyType.d.ts +22 -0
  426. package/build/types/api/properties/SharedPropertyType.d.ts.map +1 -0
  427. package/build/types/api/propertyConversionUtils.d.ts +2 -20
  428. package/build/types/api/propertyConversionUtils.d.ts.map +1 -1
  429. package/build/types/api/values/ValueTypeDefinitionVersion.d.ts +14 -0
  430. package/build/types/api/values/ValueTypeDefinitionVersion.d.ts.map +1 -0
  431. package/build/types/api/values/ValueTypeType.d.ts +178 -0
  432. package/build/types/api/values/ValueTypeType.d.ts.map +1 -0
  433. package/build/types/api/wrapWithProxy.d.ts +1 -1
  434. package/build/types/api/wrapWithProxy.d.ts.map +1 -1
  435. package/build/types/cli/main.d.ts.map +1 -1
  436. package/build/types/conversion/toConjure/distributeTypeHelper.d.ts +3 -0
  437. package/build/types/conversion/toConjure/distributeTypeHelper.d.ts.map +1 -0
  438. package/build/types/conversion/toMarketplace/convertActionParameterConditionalOverride.d.ts +4 -0
  439. package/build/types/conversion/toMarketplace/convertActionParameterConditionalOverride.d.ts.map +1 -0
  440. package/build/types/conversion/toMarketplace/convertActionParameters.d.ts +3 -0
  441. package/build/types/conversion/toMarketplace/convertActionParameters.d.ts.map +1 -0
  442. package/build/types/conversion/toMarketplace/convertActionSections.d.ts +3 -0
  443. package/build/types/conversion/toMarketplace/convertActionSections.d.ts.map +1 -0
  444. package/build/types/conversion/toMarketplace/convertActionValidation.d.ts +3 -0
  445. package/build/types/conversion/toMarketplace/convertActionValidation.d.ts.map +1 -0
  446. package/build/types/conversion/toMarketplace/convertActionVisibility.d.ts +2 -0
  447. package/build/types/conversion/toMarketplace/convertActionVisibility.d.ts.map +1 -0
  448. package/build/types/conversion/toMarketplace/convertCardinality.d.ts +3 -0
  449. package/build/types/conversion/toMarketplace/convertCardinality.d.ts.map +1 -0
  450. package/build/types/conversion/toMarketplace/convertConditionDefinition.d.ts +3 -0
  451. package/build/types/conversion/toMarketplace/convertConditionDefinition.d.ts.map +1 -0
  452. package/build/types/conversion/toMarketplace/convertDataConstraintToDataConstraints.d.ts +2 -0
  453. package/build/types/conversion/toMarketplace/convertDataConstraintToDataConstraints.d.ts.map +1 -0
  454. package/build/types/conversion/toMarketplace/convertDatasourceDefinition.d.ts +4 -0
  455. package/build/types/conversion/toMarketplace/convertDatasourceDefinition.d.ts.map +1 -0
  456. package/build/types/conversion/toMarketplace/convertInterface.d.ts +3 -0
  457. package/build/types/conversion/toMarketplace/convertInterface.d.ts.map +1 -0
  458. package/build/types/conversion/toMarketplace/convertLink.d.ts +3 -0
  459. package/build/types/conversion/toMarketplace/convertLink.d.ts.map +1 -0
  460. package/build/types/conversion/toMarketplace/convertMappingValue.d.ts +3 -0
  461. package/build/types/conversion/toMarketplace/convertMappingValue.d.ts.map +1 -0
  462. package/build/types/conversion/toMarketplace/convertNullabilityToDataConstraint.d.ts +7 -0
  463. package/build/types/conversion/toMarketplace/convertNullabilityToDataConstraint.d.ts.map +1 -0
  464. package/build/types/conversion/toMarketplace/convertObject.d.ts +9 -0
  465. package/build/types/conversion/toMarketplace/convertObject.d.ts.map +1 -0
  466. package/build/types/conversion/toMarketplace/convertObjectPropertyType.d.ts +3 -0
  467. package/build/types/conversion/toMarketplace/convertObjectPropertyType.d.ts.map +1 -0
  468. package/build/types/conversion/toMarketplace/convertOntologyDefinition.d.ts +3 -0
  469. package/build/types/conversion/toMarketplace/convertOntologyDefinition.d.ts.map +1 -0
  470. package/build/types/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.d.ts +3 -0
  471. package/build/types/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.d.ts.map +1 -0
  472. package/build/types/conversion/toMarketplace/convertOntologyToValueTypeIr.d.ts +3 -0
  473. package/build/types/conversion/toMarketplace/convertOntologyToValueTypeIr.d.ts.map +1 -0
  474. package/build/types/conversion/toMarketplace/convertSectionConditionalOverride.d.ts +3 -0
  475. package/build/types/conversion/toMarketplace/convertSectionConditionalOverride.d.ts.map +1 -0
  476. package/build/types/conversion/toMarketplace/convertSpt.d.ts +3 -0
  477. package/build/types/conversion/toMarketplace/convertSpt.d.ts.map +1 -0
  478. package/build/types/conversion/toMarketplace/convertValueType.d.ts +3 -0
  479. package/build/types/conversion/toMarketplace/convertValueType.d.ts.map +1 -0
  480. package/build/types/conversion/toMarketplace/convertValueTypeDataConstraints.d.ts +2 -0
  481. package/build/types/conversion/toMarketplace/convertValueTypeDataConstraints.d.ts.map +1 -0
  482. package/build/types/conversion/toMarketplace/convertValueTypesToIr.d.ts +3 -0
  483. package/build/types/conversion/toMarketplace/convertValueTypesToIr.d.ts.map +1 -0
  484. package/build/types/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.d.ts +2 -0
  485. package/build/types/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.d.ts.map +1 -0
  486. package/build/types/conversion/toMarketplace/getFormContentOrdering.d.ts +3 -0
  487. package/build/types/conversion/toMarketplace/getFormContentOrdering.d.ts.map +1 -0
  488. package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.d.ts +3 -0
  489. package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.d.ts.map +1 -0
  490. package/build/types/index.d.ts +22 -6
  491. package/build/types/index.d.ts.map +1 -1
  492. package/build/types/util/OptionalFields.d.ts +4 -0
  493. package/build/types/util/OptionalFields.d.ts.map +1 -0
  494. package/build/types/util/RequiredFields.d.ts +4 -0
  495. package/build/types/util/RequiredFields.d.ts.map +1 -0
  496. package/package.json +6 -5
  497. package/build/browser/api/defineImportSpt.js.map +0 -1
  498. package/build/browser/api/iconNames.js +0 -2
  499. package/build/browser/api/iconNames.js.map +0 -1
  500. package/build/browser/api/ontologyUtils.js +0 -243
  501. package/build/browser/api/ontologyUtils.js.map +0 -1
  502. package/build/browser/api/types.js.map +0 -1
  503. package/build/esm/api/defineImportSpt.js.map +0 -1
  504. package/build/esm/api/iconNames.js +0 -2
  505. package/build/esm/api/iconNames.js.map +0 -1
  506. package/build/esm/api/ontologyUtils.js +0 -243
  507. package/build/esm/api/ontologyUtils.js.map +0 -1
  508. package/build/esm/api/types.js.map +0 -1
  509. package/build/types/api/defineImportSpt.d.ts.map +0 -1
  510. package/build/types/api/ontologyUtils.d.ts +0 -8
  511. package/build/types/api/ontologyUtils.d.ts.map +0 -1
  512. package/build/types/api/types.d.ts +0 -625
  513. package/build/types/api/types.d.ts.map +0 -1
  514. /package/build/types/api/{iconNames.d.ts → common/BlueprintIcons.d.ts} +0 -0
@@ -12,7 +12,7 @@
12
12
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
- */import*as fs from"fs";import path from"path";import{fileURLToPath}from"url";import{beforeEach,describe,expect,it}from"vitest";import{addDependency}from"./addDependency.js";import{defineAction,defineCreateInterfaceObjectAction,defineCreateObjectAction,defineCreateOrModifyObjectAction,defineDeleteObjectAction,defineModifyInterfaceObjectAction,defineModifyObjectAction}from"./defineAction.js";import{importSharedPropertyType}from"./defineImportSpt.js";import{defineInterface}from"./defineInterface.js";import{defineInterfaceLinkConstraint}from"./defineInterfaceLinkConstraint.js";import{defineLink}from"./defineLink.js";import{defineObject}from"./defineObject.js";import{defineOntology,dumpOntologyFullMetadata,dumpValueTypeWireType}from"./defineOntology.js";import{defineSharedPropertyType}from"./defineSpt.js";import{defineValueType}from"./defineValueType.js";import{importOntologyEntity}from"./importOntologyEntity.js";import{CREATE_OR_MODIFY_OBJECT_PARAMETER,MODIFY_OBJECT_PARAMETER,OntologyEntityTypeEnum}from"./types.js";describe("Ontology Defining",()=>{beforeEach(async()=>{await defineOntology("com.palantir.",()=>{},"/tmp/");});describe("ValueTypes",()=>{it("Fails to define value type with incorrect semver",()=>{expect(()=>defineValueType({apiName:"apiName",displayName:"displayName",type:{"type":"boolean",constraints:[{constraint:{"allowedValues":["TRUE_VALUE"]}}]},version:"not a version"})).toThrowErrorMatchingInlineSnapshot("[Error: Invariant failed: Version is not a valid semver]");});it("Tests convertProperty function with valueType constraints for string",()=>{const testStringValueType=defineValueType({apiName:"stringWithConstraints",displayName:"String With Constraints",description:"A string type with additional constraints",type:{"type":"string",constraints:[{constraint:{type:"length",length:{minSize:5,maxSize:20}},failureMessage:{message:"String must be between 5 and 20 characters"}}]},version:"1.0.0"});defineObject({titlePropertyApiName:"constrainedString",displayName:"Test Object",pluralDisplayName:"Test Objects",apiName:"testObject",primaryKeyPropertyApiName:"constrainedString",properties:{"constrainedString":{type:"string",displayName:"Constrained String",valueType:testStringValueType}}});const ontology=dumpOntologyFullMetadata();const objectPropertyType=ontology.ontology.objectTypes["com.palantir.testObject"].objectType.propertyTypes["constrainedString"];expect(objectPropertyType.valueType).toEqual({apiName:"stringWithConstraints",version:"1.0.0",packageNamespace:"com.palantir",displayMetadata:{displayName:"String With Constraints",description:"A string type with additional constraints"}});expect(objectPropertyType.dataConstraints).toBeDefined();expect(objectPropertyType.dataConstraints?.propertyTypeConstraints).toHaveLength(1);const constraintWrapper=objectPropertyType.dataConstraints?.propertyTypeConstraints[0];expect(constraintWrapper?.constraints?.type).toBe("string");expect((constraintWrapper?.constraints).string.length.minSize).toBe(5);expect((constraintWrapper?.constraints).string.length.maxSize).toBe(20);expect(constraintWrapper?.failureMessage?.message).toBe("String must be between 5 and 20 characters");});it("Correctly serializes a value type",()=>{defineValueType({apiName:"apiName",displayName:"displayName",type:{"type":"boolean",constraints:[{constraint:{"allowedValues":["TRUE_VALUE"]}}]},version:"0.1.0"});expect(dumpValueTypeWireType()).toMatchInlineSnapshot(`
15
+ */import*as fs from"fs";import path from"path";import{fileURLToPath}from"url";import{beforeEach,describe,expect,it}from"vitest";import{addDependency}from"./addDependency.js";import{OntologyEntityTypeEnum}from"./common/OntologyEntityTypeEnum.js";import{CREATE_OR_MODIFY_OBJECT_PARAMETER,defineAction,defineCreateInterfaceObjectAction,defineCreateObjectAction,defineCreateOrModifyObjectAction,defineDeleteObjectAction,defineModifyInterfaceObjectAction,defineModifyObjectAction,MODIFY_OBJECT_PARAMETER}from"./defineAction.js";import{defineInterface}from"./defineInterface.js";import{defineInterfaceLinkConstraint}from"./defineInterfaceLinkConstraint.js";import{defineLink}from"./defineLink.js";import{defineObject}from"./defineObject.js";import{defineOntology,dumpOntologyFullMetadata,dumpValueTypeWireType}from"./defineOntology.js";import{defineSharedPropertyType}from"./defineSpt.js";import{defineValueType}from"./defineValueType.js";import{importOntologyEntity}from"./importOntologyEntity.js";import{importSharedPropertyType}from"./importSharedPropertyType.js";describe("Ontology Defining",()=>{beforeEach(async()=>{await defineOntology("com.palantir.",()=>{},"/tmp/");});describe("ValueTypes",()=>{it("Fails to define value type with incorrect semver",()=>{expect(()=>defineValueType({apiName:"apiName",displayName:"displayName",type:{"type":"boolean",constraints:[{constraint:{"allowedValues":["TRUE_VALUE"]}}]},version:"not a version"})).toThrowErrorMatchingInlineSnapshot("[Error: Invariant failed: Version is not a valid semver]");});it("Tests convertProperty function with valueType constraints for string",()=>{const testStringValueType=defineValueType({apiName:"stringWithConstraints",displayName:"String With Constraints",description:"A string type with additional constraints",type:{"type":"string",constraints:[{constraint:{type:"length",length:{minSize:5,maxSize:20}},failureMessage:{message:"String must be between 5 and 20 characters"}}]},version:"1.0.0"});defineObject({titlePropertyApiName:"constrainedString",displayName:"Test Object",pluralDisplayName:"Test Objects",apiName:"testObject",primaryKeyPropertyApiName:"constrainedString",properties:{"constrainedString":{type:"string",displayName:"Constrained String",valueType:testStringValueType}}});const ontology=dumpOntologyFullMetadata();const objectPropertyType=ontology.ontology.objectTypes["com.palantir.testObject"].objectType.propertyTypes["constrainedString"];expect(objectPropertyType.valueType).toEqual({apiName:"stringWithConstraints",version:"1.0.0",packageNamespace:"com.palantir",displayMetadata:{displayName:"String With Constraints",description:"A string type with additional constraints"}});expect(objectPropertyType.dataConstraints).toBeDefined();expect(objectPropertyType.dataConstraints?.propertyTypeConstraints).toHaveLength(1);const constraintWrapper=objectPropertyType.dataConstraints?.propertyTypeConstraints[0];expect(constraintWrapper?.constraints?.type).toBe("string");expect((constraintWrapper?.constraints).string.length.minSize).toBe(5);expect((constraintWrapper?.constraints).string.length.maxSize).toBe(20);expect(constraintWrapper?.failureMessage?.message).toBe("String must be between 5 and 20 characters");});it("Correctly serializes a value type",()=>{defineValueType({apiName:"apiName",displayName:"displayName",type:{"type":"boolean",constraints:[{constraint:{"allowedValues":["TRUE_VALUE"]}}]},version:"0.1.0"});expect(dumpValueTypeWireType()).toMatchInlineSnapshot(`
16
16
  {
17
17
  "valueTypes": [
18
18
  {
@@ -73,6 +73,13 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
73
73
  "displayMetadata": {
74
74
  "description": "Foo",
75
75
  "displayName": "Foo",
76
+ "icon": {
77
+ "blueprint": {
78
+ "color": "#4C90F0",
79
+ "locator": "layout-hierarchy",
80
+ },
81
+ "type": "blueprint",
82
+ },
76
83
  },
77
84
  "extendsInterfaces": [],
78
85
  "links": [],
@@ -231,6 +238,13 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
231
238
  "displayMetadata": {
232
239
  "description": "childInterface",
233
240
  "displayName": "childInterface",
241
+ "icon": {
242
+ "blueprint": {
243
+ "color": "#4C90F0",
244
+ "locator": "layout-hierarchy",
245
+ },
246
+ "type": "blueprint",
247
+ },
234
248
  },
235
249
  "extendsInterfaces": [
236
250
  "com.palantir.parentInterface",
@@ -290,6 +304,13 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
290
304
  "displayMetadata": {
291
305
  "description": "parentInterface",
292
306
  "displayName": "parentInterface",
307
+ "icon": {
308
+ "blueprint": {
309
+ "color": "#4C90F0",
310
+ "locator": "layout-hierarchy",
311
+ },
312
+ "type": "blueprint",
313
+ },
293
314
  },
294
315
  "extendsInterfaces": [],
295
316
  "links": [],
@@ -434,6 +455,13 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
434
455
  "displayMetadata": {
435
456
  "description": "parentInterface",
436
457
  "displayName": "parentInterface",
458
+ "icon": {
459
+ "blueprint": {
460
+ "color": "#4C90F0",
461
+ "locator": "layout-hierarchy",
462
+ },
463
+ "type": "blueprint",
464
+ },
437
465
  },
438
466
  "extendsInterfaces": [],
439
467
  "links": [],
@@ -542,6 +570,13 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
542
570
  "displayMetadata": {
543
571
  "description": "childInterface",
544
572
  "displayName": "childInterface",
573
+ "icon": {
574
+ "blueprint": {
575
+ "color": "#4C90F0",
576
+ "locator": "layout-hierarchy",
577
+ },
578
+ "type": "blueprint",
579
+ },
545
580
  },
546
581
  "extendsInterfaces": [
547
582
  "com.palantir.parentInterface",
@@ -601,6 +636,13 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
601
636
  "displayMetadata": {
602
637
  "description": "parentInterface",
603
638
  "displayName": "parentInterface",
639
+ "icon": {
640
+ "blueprint": {
641
+ "color": "#4C90F0",
642
+ "locator": "layout-hierarchy",
643
+ },
644
+ "type": "blueprint",
645
+ },
604
646
  },
605
647
  "extendsInterfaces": [],
606
648
  "links": [],
@@ -745,6 +787,13 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
745
787
  "displayMetadata": {
746
788
  "description": "parentInterface",
747
789
  "displayName": "parentInterface",
790
+ "icon": {
791
+ "blueprint": {
792
+ "color": "#4C90F0",
793
+ "locator": "layout-hierarchy",
794
+ },
795
+ "type": "blueprint",
796
+ },
748
797
  },
749
798
  "extendsInterfaces": [],
750
799
  "links": [],
@@ -778,6 +827,13 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
778
827
  "displayMetadata": {
779
828
  "description": "A",
780
829
  "displayName": "A",
830
+ "icon": {
831
+ "blueprint": {
832
+ "color": "#4C90F0",
833
+ "locator": "layout-hierarchy",
834
+ },
835
+ "type": "blueprint",
836
+ },
781
837
  },
782
838
  "extendsInterfaces": [],
783
839
  "links": [
@@ -811,6 +867,13 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
811
867
  "displayMetadata": {
812
868
  "description": "B",
813
869
  "displayName": "B",
870
+ "icon": {
871
+ "blueprint": {
872
+ "color": "#4C90F0",
873
+ "locator": "layout-hierarchy",
874
+ },
875
+ "type": "blueprint",
876
+ },
814
877
  },
815
878
  "extendsInterfaces": [],
816
879
  "links": [],
@@ -844,6 +907,13 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
844
907
  "displayMetadata": {
845
908
  "description": "A",
846
909
  "displayName": "A",
910
+ "icon": {
911
+ "blueprint": {
912
+ "color": "#4C90F0",
913
+ "locator": "layout-hierarchy",
914
+ },
915
+ "type": "blueprint",
916
+ },
847
917
  },
848
918
  "extendsInterfaces": [],
849
919
  "links": [
@@ -877,6 +947,13 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
877
947
  "displayMetadata": {
878
948
  "description": "B",
879
949
  "displayName": "B",
950
+ "icon": {
951
+ "blueprint": {
952
+ "color": "#4C90F0",
953
+ "locator": "layout-hierarchy",
954
+ },
955
+ "type": "blueprint",
956
+ },
880
957
  },
881
958
  "extendsInterfaces": [],
882
959
  "links": [],
@@ -910,6 +987,13 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
910
987
  "displayMetadata": {
911
988
  "description": "Foo Interface",
912
989
  "displayName": "Foo Interface",
990
+ "icon": {
991
+ "blueprint": {
992
+ "color": "#00000",
993
+ "locator": "airplane",
994
+ },
995
+ "type": "blueprint",
996
+ },
913
997
  },
914
998
  "extendsInterfaces": [],
915
999
  "links": [],
@@ -1082,6 +1166,13 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
1082
1166
  "displayMetadata": {
1083
1167
  "description": "interface",
1084
1168
  "displayName": "interface",
1169
+ "icon": {
1170
+ "blueprint": {
1171
+ "color": "#4C90F0",
1172
+ "locator": "layout-hierarchy",
1173
+ },
1174
+ "type": "blueprint",
1175
+ },
1085
1176
  },
1086
1177
  "extendsInterfaces": [],
1087
1178
  "links": [],
@@ -1190,6 +1281,13 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
1190
1281
  "displayMetadata": {
1191
1282
  "description": "interface",
1192
1283
  "displayName": "interface",
1284
+ "icon": {
1285
+ "blueprint": {
1286
+ "color": "#4C90F0",
1287
+ "locator": "layout-hierarchy",
1288
+ },
1289
+ "type": "blueprint",
1290
+ },
1193
1291
  },
1194
1292
  "extendsInterfaces": [],
1195
1293
  "links": [],
@@ -1279,11 +1377,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
1279
1377
  },
1280
1378
  "type": "datasetV2",
1281
1379
  },
1380
+ "datasourceName": "com.palantir.foo",
1282
1381
  "editsConfiguration": {
1283
1382
  "onlyAllowPrivilegedEdits": false,
1284
1383
  },
1285
1384
  "redacted": false,
1286
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
1287
1385
  },
1288
1386
  ],
1289
1387
  "entityMetadata": {
@@ -1520,7 +1618,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
1520
1618
  },
1521
1619
  "interfaceTypes": {},
1522
1620
  "linkTypes": {
1523
- "fizzToFoo": {
1621
+ "fizz-to-foo": {
1524
1622
  "datasources": [],
1525
1623
  "entityMetadata": {
1526
1624
  "arePatchesEnabled": false,
@@ -1595,11 +1693,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
1595
1693
  },
1596
1694
  "type": "datasetV2",
1597
1695
  },
1696
+ "datasourceName": "com.palantir.fizz",
1598
1697
  "editsConfiguration": {
1599
1698
  "onlyAllowPrivilegedEdits": false,
1600
1699
  },
1601
1700
  "redacted": false,
1602
- "rid": "ri.ontology.main.datasource.com.palantir.fizz",
1603
1701
  },
1604
1702
  ],
1605
1703
  "entityMetadata": {
@@ -1731,11 +1829,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
1731
1829
  },
1732
1830
  "type": "datasetV2",
1733
1831
  },
1832
+ "datasourceName": "com.palantir.foo",
1734
1833
  "editsConfiguration": {
1735
1834
  "onlyAllowPrivilegedEdits": false,
1736
1835
  },
1737
1836
  "redacted": false,
1738
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
1739
1837
  },
1740
1838
  ],
1741
1839
  "entityMetadata": {
@@ -1825,7 +1923,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
1825
1923
  },
1826
1924
  "interfaceTypes": {},
1827
1925
  "linkTypes": {
1828
- "fizzToFoo": {
1926
+ "fizz-to-foo": {
1829
1927
  "datasources": [
1830
1928
  {
1831
1929
  "datasource": {
@@ -1853,11 +1951,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
1853
1951
  },
1854
1952
  "type": "dataset",
1855
1953
  },
1954
+ "datasourceName": "fizzToFoo",
1856
1955
  "editsConfiguration": {
1857
1956
  "onlyAllowPrivilegedEdits": false,
1858
1957
  },
1859
1958
  "redacted": undefined,
1860
- "rid": "ri.ontology.main.datasource.link-fizzToFoo",
1861
1959
  },
1862
1960
  ],
1863
1961
  "entityMetadata": {
@@ -1945,11 +2043,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
1945
2043
  },
1946
2044
  "type": "datasetV2",
1947
2045
  },
2046
+ "datasourceName": "com.palantir.fizz",
1948
2047
  "editsConfiguration": {
1949
2048
  "onlyAllowPrivilegedEdits": false,
1950
2049
  },
1951
2050
  "redacted": false,
1952
- "rid": "ri.ontology.main.datasource.com.palantir.fizz",
1953
2051
  },
1954
2052
  ],
1955
2053
  "entityMetadata": {
@@ -2081,11 +2179,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2081
2179
  },
2082
2180
  "type": "datasetV2",
2083
2181
  },
2182
+ "datasourceName": "com.palantir.foo",
2084
2183
  "editsConfiguration": {
2085
2184
  "onlyAllowPrivilegedEdits": false,
2086
2185
  },
2087
2186
  "redacted": false,
2088
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
2089
2187
  },
2090
2188
  ],
2091
2189
  "entityMetadata": {
@@ -2165,7 +2263,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2165
2263
  },
2166
2264
  "sharedPropertyTypes": {},
2167
2265
  }
2168
- `);});it("Minimal link definitions are properly defined",()=>{const object=defineObject({titlePropertyApiName:"bar",displayName:"Foo",pluralDisplayName:"Foo",apiName:"foo",primaryKeyPropertyApiName:"bar",properties:{"bar":{type:"string"}}});const otherObject=defineObject({titlePropertyApiName:"fizz",displayName:"Fizz",pluralDisplayName:"Fizz",apiName:"fizz",primaryKeyPropertyApiName:"fizz",properties:{"fizz":{type:"string"},"bar":{type:"string"}}});defineLink({apiName:"fizzToFoo",one:{object:object,metadata:{apiName:"fizzes"}},toMany:{object:otherObject,metadata:{apiName:"foos"}},manyForeignKeyProperty:"bar"});expect(dumpOntologyFullMetadata().ontology).toMatchInlineSnapshot(`
2266
+ `);});it("Intermediary link types are properly defined",()=>{const bar=defineObject({titlePropertyApiName:"bar",displayName:"Bar",pluralDisplayName:"Bar",apiName:"barObject",primaryKeyPropertyApiName:"bar",properties:{"bar":{type:"string"}}});const fizz=defineObject({titlePropertyApiName:"fizz",displayName:"Fizz",pluralDisplayName:"Fizz",apiName:"fizzObject",primaryKeyPropertyApiName:"fizz",properties:{"fizz":{type:"string"}}});const intermediaryObject=defineObject({titlePropertyApiName:"buzz",displayName:"Buzz",pluralDisplayName:"Buzz",apiName:"buzzObject",primaryKeyPropertyApiName:"buzz",properties:{"buzz":{type:"string"},"barBuzz":{type:"string"},"fizzBuzz":{type:"string"}}});const barToBuzz=defineLink({apiName:"barToBuzz",manyForeignKeyProperty:"barBuzz",one:{object:bar,metadata:{displayName:"Buzz",pluralDisplayName:"Buzz",apiName:"buzz1"}},toMany:{object:intermediaryObject,metadata:{displayName:"Bar",pluralDisplayName:"Bars",apiName:"bars"}}});const fizzToBuzz=defineLink({apiName:"fizzToBuzz",manyForeignKeyProperty:"fizzBuzz",one:{object:fizz,metadata:{displayName:"Buzz",pluralDisplayName:"Buzz",apiName:"buzz2"}},toMany:{object:intermediaryObject,metadata:{displayName:"Fizz",pluralDisplayName:"Fizzes",apiName:"fizzes"}}});defineLink({apiName:"fizzToBar",many:{object:bar,metadata:{displayName:"Fizz",pluralDisplayName:"Fizzes",apiName:"fizzes1"},linkToIntermediary:barToBuzz},toMany:{object:fizz,metadata:{displayName:"Bar",pluralDisplayName:"Bars",apiName:"bars1"},linkToIntermediary:fizzToBuzz},intermediaryObjectType:intermediaryObject});expect(dumpOntologyFullMetadata().ontology).toMatchInlineSnapshot(`
2169
2267
  {
2170
2268
  "actionTypes": {},
2171
2269
  "blockPermissionInformation": {
@@ -2175,7 +2273,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2175
2273
  },
2176
2274
  "interfaceTypes": {},
2177
2275
  "linkTypes": {
2178
- "fizzToFoo": {
2276
+ "bar-to-buzz": {
2179
2277
  "datasources": [],
2180
2278
  "entityMetadata": {
2181
2279
  "arePatchesEnabled": false,
@@ -2185,43 +2283,141 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2185
2283
  "oneToMany": {
2186
2284
  "cardinalityHint": "ONE_TO_MANY",
2187
2285
  "manyToOneLinkMetadata": {
2188
- "apiName": "foos",
2286
+ "apiName": "bars",
2189
2287
  "displayMetadata": {
2190
- "displayName": "Foos",
2288
+ "displayName": "Bar",
2191
2289
  "groupDisplayName": "",
2192
- "pluralDisplayName": "Foos",
2290
+ "pluralDisplayName": "Bars",
2193
2291
  "visibility": "NORMAL",
2194
2292
  },
2195
2293
  "typeClasses": [],
2196
2294
  },
2197
- "objectTypeRidManySide": "com.palantir.fizz",
2198
- "objectTypeRidOneSide": "com.palantir.foo",
2295
+ "objectTypeRidManySide": "com.palantir.buzzObject",
2296
+ "objectTypeRidOneSide": "com.palantir.barObject",
2199
2297
  "oneSidePrimaryKeyToManySidePropertyMapping": [
2200
2298
  {
2201
2299
  "from": {
2202
2300
  "apiName": "bar",
2203
- "object": "com.palantir.foo",
2301
+ "object": "com.palantir.barObject",
2204
2302
  },
2205
2303
  "to": {
2206
- "apiName": "bar",
2207
- "object": "com.palantir.fizz",
2304
+ "apiName": "barBuzz",
2305
+ "object": "com.palantir.buzzObject",
2208
2306
  },
2209
2307
  },
2210
2308
  ],
2211
2309
  "oneToManyLinkMetadata": {
2310
+ "apiName": "buzz1",
2311
+ "displayMetadata": {
2312
+ "displayName": "Buzz",
2313
+ "groupDisplayName": "",
2314
+ "pluralDisplayName": "Buzz",
2315
+ "visibility": "NORMAL",
2316
+ },
2317
+ "typeClasses": [],
2318
+ },
2319
+ },
2320
+ "type": "oneToMany",
2321
+ },
2322
+ "id": "bar-to-buzz",
2323
+ "redacted": false,
2324
+ "status": {
2325
+ "active": {},
2326
+ "type": "active",
2327
+ },
2328
+ },
2329
+ },
2330
+ "fizz-to-bar": {
2331
+ "datasources": [],
2332
+ "entityMetadata": {
2333
+ "arePatchesEnabled": false,
2334
+ },
2335
+ "linkType": {
2336
+ "definition": {
2337
+ "intermediary": {
2338
+ "aToIntermediaryLinkTypeRid": "bar-to-buzz",
2339
+ "intermediaryObjectTypeRid": "com.palantir.buzzObject",
2340
+ "intermediaryToBLinkTypeRid": "fizz-to-buzz",
2341
+ "objectTypeAToBLinkMetadata": {
2342
+ "apiName": "fizzes1",
2343
+ "displayMetadata": {
2344
+ "displayName": "Fizz",
2345
+ "groupDisplayName": "",
2346
+ "pluralDisplayName": "Fizzes",
2347
+ "visibility": "NORMAL",
2348
+ },
2349
+ "typeClasses": [],
2350
+ },
2351
+ "objectTypeBToALinkMetadata": {
2352
+ "apiName": "bars1",
2353
+ "displayMetadata": {
2354
+ "displayName": "Bar",
2355
+ "groupDisplayName": "",
2356
+ "pluralDisplayName": "Bars",
2357
+ "visibility": "NORMAL",
2358
+ },
2359
+ "typeClasses": [],
2360
+ },
2361
+ "objectTypeRidA": "com.palantir.barObject",
2362
+ "objectTypeRidB": "com.palantir.fizzObject",
2363
+ },
2364
+ "type": "intermediary",
2365
+ },
2366
+ "id": "fizz-to-bar",
2367
+ "redacted": false,
2368
+ "status": {
2369
+ "active": {},
2370
+ "type": "active",
2371
+ },
2372
+ },
2373
+ },
2374
+ "fizz-to-buzz": {
2375
+ "datasources": [],
2376
+ "entityMetadata": {
2377
+ "arePatchesEnabled": false,
2378
+ },
2379
+ "linkType": {
2380
+ "definition": {
2381
+ "oneToMany": {
2382
+ "cardinalityHint": "ONE_TO_MANY",
2383
+ "manyToOneLinkMetadata": {
2212
2384
  "apiName": "fizzes",
2213
2385
  "displayMetadata": {
2214
- "displayName": "Fizzes",
2386
+ "displayName": "Fizz",
2215
2387
  "groupDisplayName": "",
2216
2388
  "pluralDisplayName": "Fizzes",
2217
2389
  "visibility": "NORMAL",
2218
2390
  },
2219
2391
  "typeClasses": [],
2220
2392
  },
2393
+ "objectTypeRidManySide": "com.palantir.buzzObject",
2394
+ "objectTypeRidOneSide": "com.palantir.fizzObject",
2395
+ "oneSidePrimaryKeyToManySidePropertyMapping": [
2396
+ {
2397
+ "from": {
2398
+ "apiName": "fizz",
2399
+ "object": "com.palantir.fizzObject",
2400
+ },
2401
+ "to": {
2402
+ "apiName": "fizzBuzz",
2403
+ "object": "com.palantir.buzzObject",
2404
+ },
2405
+ },
2406
+ ],
2407
+ "oneToManyLinkMetadata": {
2408
+ "apiName": "buzz2",
2409
+ "displayMetadata": {
2410
+ "displayName": "Buzz",
2411
+ "groupDisplayName": "",
2412
+ "pluralDisplayName": "Buzz",
2413
+ "visibility": "NORMAL",
2414
+ },
2415
+ "typeClasses": [],
2416
+ },
2221
2417
  },
2222
2418
  "type": "oneToMany",
2223
2419
  },
2224
- "id": "fizz-to-foo",
2420
+ "id": "fizz-to-buzz",
2225
2421
  "redacted": false,
2226
2422
  "status": {
2227
2423
  "active": {},
@@ -2231,30 +2427,26 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2231
2427
  },
2232
2428
  },
2233
2429
  "objectTypes": {
2234
- "com.palantir.fizz": {
2430
+ "com.palantir.barObject": {
2235
2431
  "datasources": [
2236
2432
  {
2237
2433
  "datasource": {
2238
2434
  "datasetV2": {
2239
- "datasetRid": "com.palantir.fizz",
2435
+ "datasetRid": "com.palantir.barObject",
2240
2436
  "propertyMapping": {
2241
2437
  "bar": {
2242
2438
  "column": "bar",
2243
2439
  "type": "column",
2244
2440
  },
2245
- "fizz": {
2246
- "column": "fizz",
2247
- "type": "column",
2248
- },
2249
2441
  },
2250
2442
  },
2251
2443
  "type": "datasetV2",
2252
2444
  },
2445
+ "datasourceName": "com.palantir.barObject",
2253
2446
  "editsConfiguration": {
2254
2447
  "onlyAllowPrivilegedEdits": false,
2255
2448
  },
2256
2449
  "redacted": false,
2257
- "rid": "ri.ontology.main.datasource.com.palantir.fizz",
2258
2450
  },
2259
2451
  ],
2260
2452
  "entityMetadata": {
@@ -2262,10 +2454,10 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2262
2454
  },
2263
2455
  "objectType": {
2264
2456
  "allImplementsInterfaces": {},
2265
- "apiName": "com.palantir.fizz",
2457
+ "apiName": "com.palantir.barObject",
2266
2458
  "displayMetadata": {
2267
2459
  "description": undefined,
2268
- "displayName": "Fizz",
2460
+ "displayName": "Bar",
2269
2461
  "groupDisplayName": undefined,
2270
2462
  "icon": {
2271
2463
  "blueprint": {
@@ -2274,12 +2466,12 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2274
2466
  },
2275
2467
  "type": "blueprint",
2276
2468
  },
2277
- "pluralDisplayName": "Fizz",
2469
+ "pluralDisplayName": "Bar",
2278
2470
  "visibility": "NORMAL",
2279
2471
  },
2280
2472
  "implementsInterfaces2": [],
2281
2473
  "primaryKeys": [
2282
- "fizz",
2474
+ "bar",
2283
2475
  ],
2284
2476
  "propertyTypes": {
2285
2477
  "bar": {
@@ -2322,75 +2514,43 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2322
2514
  ],
2323
2515
  "valueType": undefined,
2324
2516
  },
2325
- "fizz": {
2326
- "apiName": "fizz",
2327
- "baseFormatter": undefined,
2328
- "dataConstraints": undefined,
2329
- "displayMetadata": {
2330
- "description": undefined,
2331
- "displayName": "Fizz",
2332
- "visibility": "NORMAL",
2333
- },
2334
- "indexedForSearch": true,
2335
- "inlineAction": undefined,
2336
- "ruleSetBinding": undefined,
2337
- "sharedPropertyTypeApiName": undefined,
2338
- "sharedPropertyTypeRid": undefined,
2339
- "status": {
2340
- "active": {},
2341
- "type": "active",
2342
- },
2343
- "type": {
2344
- "string": {
2345
- "analyzerOverride": undefined,
2346
- "enableAsciiFolding": undefined,
2347
- "isLongText": false,
2348
- "supportsEfficientLeadingWildcard": false,
2349
- "supportsExactMatching": true,
2350
- },
2351
- "type": "string",
2352
- },
2353
- "typeClasses": [
2354
- {
2355
- "kind": "render_hint",
2356
- "name": "SELECTABLE",
2357
- },
2358
- {
2359
- "kind": "render_hint",
2360
- "name": "SORTABLE",
2361
- },
2362
- ],
2363
- "valueType": undefined,
2364
- },
2365
2517
  },
2366
2518
  "redacted": false,
2367
2519
  "status": {
2368
2520
  "active": {},
2369
2521
  "type": "active",
2370
2522
  },
2371
- "titlePropertyTypeRid": "fizz",
2523
+ "titlePropertyTypeRid": "bar",
2372
2524
  },
2373
2525
  },
2374
- "com.palantir.foo": {
2526
+ "com.palantir.buzzObject": {
2375
2527
  "datasources": [
2376
2528
  {
2377
2529
  "datasource": {
2378
2530
  "datasetV2": {
2379
- "datasetRid": "com.palantir.foo",
2531
+ "datasetRid": "com.palantir.buzzObject",
2380
2532
  "propertyMapping": {
2381
- "bar": {
2382
- "column": "bar",
2533
+ "barBuzz": {
2534
+ "column": "barBuzz",
2535
+ "type": "column",
2536
+ },
2537
+ "buzz": {
2538
+ "column": "buzz",
2539
+ "type": "column",
2540
+ },
2541
+ "fizzBuzz": {
2542
+ "column": "fizzBuzz",
2383
2543
  "type": "column",
2384
2544
  },
2385
2545
  },
2386
2546
  },
2387
2547
  "type": "datasetV2",
2388
2548
  },
2549
+ "datasourceName": "com.palantir.buzzObject",
2389
2550
  "editsConfiguration": {
2390
2551
  "onlyAllowPrivilegedEdits": false,
2391
2552
  },
2392
2553
  "redacted": false,
2393
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
2394
2554
  },
2395
2555
  ],
2396
2556
  "entityMetadata": {
@@ -2398,10 +2558,10 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2398
2558
  },
2399
2559
  "objectType": {
2400
2560
  "allImplementsInterfaces": {},
2401
- "apiName": "com.palantir.foo",
2561
+ "apiName": "com.palantir.buzzObject",
2402
2562
  "displayMetadata": {
2403
2563
  "description": undefined,
2404
- "displayName": "Foo",
2564
+ "displayName": "Buzz",
2405
2565
  "groupDisplayName": undefined,
2406
2566
  "icon": {
2407
2567
  "blueprint": {
@@ -2410,21 +2570,21 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2410
2570
  },
2411
2571
  "type": "blueprint",
2412
2572
  },
2413
- "pluralDisplayName": "Foo",
2573
+ "pluralDisplayName": "Buzz",
2414
2574
  "visibility": "NORMAL",
2415
2575
  },
2416
2576
  "implementsInterfaces2": [],
2417
2577
  "primaryKeys": [
2418
- "bar",
2578
+ "buzz",
2419
2579
  ],
2420
2580
  "propertyTypes": {
2421
- "bar": {
2422
- "apiName": "bar",
2581
+ "barBuzz": {
2582
+ "apiName": "barBuzz",
2423
2583
  "baseFormatter": undefined,
2424
2584
  "dataConstraints": undefined,
2425
2585
  "displayMetadata": {
2426
2586
  "description": undefined,
2427
- "displayName": "Bar",
2587
+ "displayName": "BarBuzz",
2428
2588
  "visibility": "NORMAL",
2429
2589
  },
2430
2590
  "indexedForSearch": true,
@@ -2458,53 +2618,115 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2458
2618
  ],
2459
2619
  "valueType": undefined,
2460
2620
  },
2461
- },
2462
- "redacted": false,
2463
- "status": {
2464
- "active": {},
2465
- "type": "active",
2466
- },
2467
- "titlePropertyTypeRid": "bar",
2468
- },
2469
- },
2470
- },
2471
- "sharedPropertyTypes": {},
2472
- }
2473
- `);});it("Explicit datasource definitions are properly defined",()=>{defineObject({titlePropertyApiName:"bar",displayName:"datasetBackedObject",pluralDisplayName:"datasetBackedObject",apiName:"foo",primaryKeyPropertyApiName:"bar",properties:{"bar":{type:"string"}},datasource:{type:"dataset"}});defineObject({titlePropertyApiName:"fizz",displayName:"streamBackedObjectNoRetention",pluralDisplayName:"streamBackedObjectNoRetention",apiName:"fizz",primaryKeyPropertyApiName:"fizz",properties:{"fizz":{type:"string"},"bar":{type:"string"}},datasource:{type:"stream"}});defineObject({titlePropertyApiName:"buzz",displayName:"streamBackedObjectWithRetention",pluralDisplayName:"streamBackedObjectWithRetention",apiName:"buzz",primaryKeyPropertyApiName:"buzz",properties:{"buzz":{type:"string"}},datasource:{type:"stream",retentionPeriod:"PT1H"}});expect(dumpOntologyFullMetadata().ontology).toMatchInlineSnapshot(`
2474
- {
2475
- "actionTypes": {},
2476
- "blockPermissionInformation": {
2477
- "actionTypes": {},
2478
- "linkTypes": {},
2479
- "objectTypes": {},
2480
- },
2481
- "interfaceTypes": {},
2482
- "linkTypes": {},
2483
- "objectTypes": {
2484
- "com.palantir.buzz": {
2485
- "datasources": [
2486
- {
2487
- "datasource": {
2488
- "streamV2": {
2489
- "propertyMapping": {
2490
- "buzz": "buzz",
2491
- },
2492
- "propertySecurityGroups": undefined,
2493
- "retentionPolicy": {
2494
- "time": {
2495
- "window": "PT1H",
2621
+ "buzz": {
2622
+ "apiName": "buzz",
2623
+ "baseFormatter": undefined,
2624
+ "dataConstraints": undefined,
2625
+ "displayMetadata": {
2626
+ "description": undefined,
2627
+ "displayName": "Buzz",
2628
+ "visibility": "NORMAL",
2629
+ },
2630
+ "indexedForSearch": true,
2631
+ "inlineAction": undefined,
2632
+ "ruleSetBinding": undefined,
2633
+ "sharedPropertyTypeApiName": undefined,
2634
+ "sharedPropertyTypeRid": undefined,
2635
+ "status": {
2636
+ "active": {},
2637
+ "type": "active",
2638
+ },
2639
+ "type": {
2640
+ "string": {
2641
+ "analyzerOverride": undefined,
2642
+ "enableAsciiFolding": undefined,
2643
+ "isLongText": false,
2644
+ "supportsEfficientLeadingWildcard": false,
2645
+ "supportsExactMatching": true,
2646
+ },
2647
+ "type": "string",
2648
+ },
2649
+ "typeClasses": [
2650
+ {
2651
+ "kind": "render_hint",
2652
+ "name": "SELECTABLE",
2653
+ },
2654
+ {
2655
+ "kind": "render_hint",
2656
+ "name": "SORTABLE",
2657
+ },
2658
+ ],
2659
+ "valueType": undefined,
2660
+ },
2661
+ "fizzBuzz": {
2662
+ "apiName": "fizzBuzz",
2663
+ "baseFormatter": undefined,
2664
+ "dataConstraints": undefined,
2665
+ "displayMetadata": {
2666
+ "description": undefined,
2667
+ "displayName": "FizzBuzz",
2668
+ "visibility": "NORMAL",
2669
+ },
2670
+ "indexedForSearch": true,
2671
+ "inlineAction": undefined,
2672
+ "ruleSetBinding": undefined,
2673
+ "sharedPropertyTypeApiName": undefined,
2674
+ "sharedPropertyTypeRid": undefined,
2675
+ "status": {
2676
+ "active": {},
2677
+ "type": "active",
2678
+ },
2679
+ "type": {
2680
+ "string": {
2681
+ "analyzerOverride": undefined,
2682
+ "enableAsciiFolding": undefined,
2683
+ "isLongText": false,
2684
+ "supportsEfficientLeadingWildcard": false,
2685
+ "supportsExactMatching": true,
2686
+ },
2687
+ "type": "string",
2688
+ },
2689
+ "typeClasses": [
2690
+ {
2691
+ "kind": "render_hint",
2692
+ "name": "SELECTABLE",
2693
+ },
2694
+ {
2695
+ "kind": "render_hint",
2696
+ "name": "SORTABLE",
2697
+ },
2698
+ ],
2699
+ "valueType": undefined,
2700
+ },
2701
+ },
2702
+ "redacted": false,
2703
+ "status": {
2704
+ "active": {},
2705
+ "type": "active",
2706
+ },
2707
+ "titlePropertyTypeRid": "buzz",
2708
+ },
2709
+ },
2710
+ "com.palantir.fizzObject": {
2711
+ "datasources": [
2712
+ {
2713
+ "datasource": {
2714
+ "datasetV2": {
2715
+ "datasetRid": "com.palantir.fizzObject",
2716
+ "propertyMapping": {
2717
+ "fizz": {
2718
+ "column": "fizz",
2719
+ "type": "column",
2496
2720
  },
2497
- "type": "time",
2498
2721
  },
2499
- "streamLocator": "com.palantir.buzz",
2500
2722
  },
2501
- "type": "streamV2",
2723
+ "type": "datasetV2",
2502
2724
  },
2725
+ "datasourceName": "com.palantir.fizzObject",
2503
2726
  "editsConfiguration": {
2504
2727
  "onlyAllowPrivilegedEdits": false,
2505
2728
  },
2506
2729
  "redacted": false,
2507
- "rid": "ri.ontology.main.datasource.com.palantir.buzz",
2508
2730
  },
2509
2731
  ],
2510
2732
  "entityMetadata": {
@@ -2512,10 +2734,10 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2512
2734
  },
2513
2735
  "objectType": {
2514
2736
  "allImplementsInterfaces": {},
2515
- "apiName": "com.palantir.buzz",
2737
+ "apiName": "com.palantir.fizzObject",
2516
2738
  "displayMetadata": {
2517
2739
  "description": undefined,
2518
- "displayName": "streamBackedObjectWithRetention",
2740
+ "displayName": "Fizz",
2519
2741
  "groupDisplayName": undefined,
2520
2742
  "icon": {
2521
2743
  "blueprint": {
@@ -2524,21 +2746,21 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2524
2746
  },
2525
2747
  "type": "blueprint",
2526
2748
  },
2527
- "pluralDisplayName": "streamBackedObjectWithRetention",
2749
+ "pluralDisplayName": "Fizz",
2528
2750
  "visibility": "NORMAL",
2529
2751
  },
2530
2752
  "implementsInterfaces2": [],
2531
2753
  "primaryKeys": [
2532
- "buzz",
2754
+ "fizz",
2533
2755
  ],
2534
2756
  "propertyTypes": {
2535
- "buzz": {
2536
- "apiName": "buzz",
2757
+ "fizz": {
2758
+ "apiName": "fizz",
2537
2759
  "baseFormatter": undefined,
2538
2760
  "dataConstraints": undefined,
2539
2761
  "displayMetadata": {
2540
2762
  "description": undefined,
2541
- "displayName": "Buzz",
2763
+ "displayName": "Fizz",
2542
2764
  "visibility": "NORMAL",
2543
2765
  },
2544
2766
  "indexedForSearch": true,
@@ -2578,32 +2800,102 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2578
2800
  "active": {},
2579
2801
  "type": "active",
2580
2802
  },
2581
- "titlePropertyTypeRid": "buzz",
2803
+ "titlePropertyTypeRid": "fizz",
2804
+ },
2805
+ },
2806
+ },
2807
+ "sharedPropertyTypes": {},
2808
+ }
2809
+ `);});it("Minimal link definitions are properly defined",()=>{const object=defineObject({titlePropertyApiName:"bar",displayName:"Foo",pluralDisplayName:"Foo",apiName:"foo",primaryKeyPropertyApiName:"bar",properties:{"bar":{type:"string"}}});const otherObject=defineObject({titlePropertyApiName:"fizz",displayName:"Fizz",pluralDisplayName:"Fizz",apiName:"fizz",primaryKeyPropertyApiName:"fizz",properties:{"fizz":{type:"string"},"bar":{type:"string"}}});defineLink({apiName:"fizzToFoo",one:{object:object,metadata:{apiName:"fizzes"}},toMany:{object:otherObject,metadata:{apiName:"foos"}},manyForeignKeyProperty:"bar"});expect(dumpOntologyFullMetadata().ontology).toMatchInlineSnapshot(`
2810
+ {
2811
+ "actionTypes": {},
2812
+ "blockPermissionInformation": {
2813
+ "actionTypes": {},
2814
+ "linkTypes": {},
2815
+ "objectTypes": {},
2816
+ },
2817
+ "interfaceTypes": {},
2818
+ "linkTypes": {
2819
+ "fizz-to-foo": {
2820
+ "datasources": [],
2821
+ "entityMetadata": {
2822
+ "arePatchesEnabled": false,
2823
+ },
2824
+ "linkType": {
2825
+ "definition": {
2826
+ "oneToMany": {
2827
+ "cardinalityHint": "ONE_TO_MANY",
2828
+ "manyToOneLinkMetadata": {
2829
+ "apiName": "foos",
2830
+ "displayMetadata": {
2831
+ "displayName": "Foos",
2832
+ "groupDisplayName": "",
2833
+ "pluralDisplayName": "Foos",
2834
+ "visibility": "NORMAL",
2835
+ },
2836
+ "typeClasses": [],
2837
+ },
2838
+ "objectTypeRidManySide": "com.palantir.fizz",
2839
+ "objectTypeRidOneSide": "com.palantir.foo",
2840
+ "oneSidePrimaryKeyToManySidePropertyMapping": [
2841
+ {
2842
+ "from": {
2843
+ "apiName": "bar",
2844
+ "object": "com.palantir.foo",
2845
+ },
2846
+ "to": {
2847
+ "apiName": "bar",
2848
+ "object": "com.palantir.fizz",
2849
+ },
2850
+ },
2851
+ ],
2852
+ "oneToManyLinkMetadata": {
2853
+ "apiName": "fizzes",
2854
+ "displayMetadata": {
2855
+ "displayName": "Fizzes",
2856
+ "groupDisplayName": "",
2857
+ "pluralDisplayName": "Fizzes",
2858
+ "visibility": "NORMAL",
2859
+ },
2860
+ "typeClasses": [],
2861
+ },
2862
+ },
2863
+ "type": "oneToMany",
2864
+ },
2865
+ "id": "fizz-to-foo",
2866
+ "redacted": false,
2867
+ "status": {
2868
+ "active": {},
2869
+ "type": "active",
2870
+ },
2582
2871
  },
2583
2872
  },
2873
+ },
2874
+ "objectTypes": {
2584
2875
  "com.palantir.fizz": {
2585
2876
  "datasources": [
2586
2877
  {
2587
2878
  "datasource": {
2588
- "streamV2": {
2879
+ "datasetV2": {
2880
+ "datasetRid": "com.palantir.fizz",
2589
2881
  "propertyMapping": {
2590
- "bar": "bar",
2591
- "fizz": "fizz",
2592
- },
2593
- "propertySecurityGroups": undefined,
2594
- "retentionPolicy": {
2595
- "none": {},
2596
- "type": "none",
2882
+ "bar": {
2883
+ "column": "bar",
2884
+ "type": "column",
2885
+ },
2886
+ "fizz": {
2887
+ "column": "fizz",
2888
+ "type": "column",
2889
+ },
2597
2890
  },
2598
- "streamLocator": "com.palantir.fizz",
2599
2891
  },
2600
- "type": "streamV2",
2892
+ "type": "datasetV2",
2601
2893
  },
2894
+ "datasourceName": "com.palantir.fizz",
2602
2895
  "editsConfiguration": {
2603
2896
  "onlyAllowPrivilegedEdits": false,
2604
2897
  },
2605
2898
  "redacted": false,
2606
- "rid": "ri.ontology.main.datasource.com.palantir.fizz",
2607
2899
  },
2608
2900
  ],
2609
2901
  "entityMetadata": {
@@ -2614,7 +2906,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2614
2906
  "apiName": "com.palantir.fizz",
2615
2907
  "displayMetadata": {
2616
2908
  "description": undefined,
2617
- "displayName": "streamBackedObjectNoRetention",
2909
+ "displayName": "Fizz",
2618
2910
  "groupDisplayName": undefined,
2619
2911
  "icon": {
2620
2912
  "blueprint": {
@@ -2623,7 +2915,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2623
2915
  },
2624
2916
  "type": "blueprint",
2625
2917
  },
2626
- "pluralDisplayName": "streamBackedObjectNoRetention",
2918
+ "pluralDisplayName": "Fizz",
2627
2919
  "visibility": "NORMAL",
2628
2920
  },
2629
2921
  "implementsInterfaces2": [],
@@ -2735,11 +3027,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2735
3027
  },
2736
3028
  "type": "datasetV2",
2737
3029
  },
3030
+ "datasourceName": "com.palantir.foo",
2738
3031
  "editsConfiguration": {
2739
3032
  "onlyAllowPrivilegedEdits": false,
2740
3033
  },
2741
3034
  "redacted": false,
2742
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
2743
3035
  },
2744
3036
  ],
2745
3037
  "entityMetadata": {
@@ -2750,7 +3042,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2750
3042
  "apiName": "com.palantir.foo",
2751
3043
  "displayMetadata": {
2752
3044
  "description": undefined,
2753
- "displayName": "datasetBackedObject",
3045
+ "displayName": "Foo",
2754
3046
  "groupDisplayName": undefined,
2755
3047
  "icon": {
2756
3048
  "blueprint": {
@@ -2759,7 +3051,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2759
3051
  },
2760
3052
  "type": "blueprint",
2761
3053
  },
2762
- "pluralDisplayName": "datasetBackedObject",
3054
+ "pluralDisplayName": "Foo",
2763
3055
  "visibility": "NORMAL",
2764
3056
  },
2765
3057
  "implementsInterfaces2": [],
@@ -2819,55 +3111,404 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2819
3111
  },
2820
3112
  "sharedPropertyTypes": {},
2821
3113
  }
2822
- `);});it("Restricted view datasources are properly defined",()=>{defineObject({titlePropertyApiName:"bar",displayName:"Foo",pluralDisplayName:"Foo",apiName:"foo",primaryKeyPropertyApiName:"bar",properties:{"bar":{type:"string"}},datasource:{type:"restrictedView"}});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
3114
+ `);});it("Explicit datasource definitions are properly defined",()=>{defineObject({titlePropertyApiName:"bar",displayName:"datasetBackedObject",pluralDisplayName:"datasetBackedObject",apiName:"foo",primaryKeyPropertyApiName:"bar",properties:{"bar":{type:"string"}},datasource:{type:"dataset"}});defineObject({titlePropertyApiName:"fizz",displayName:"streamBackedObjectNoRetention",pluralDisplayName:"streamBackedObjectNoRetention",apiName:"fizz",primaryKeyPropertyApiName:"fizz",properties:{"fizz":{type:"string"},"bar":{type:"string"}},datasource:{type:"stream"}});defineObject({titlePropertyApiName:"buzz",displayName:"streamBackedObjectWithRetention",pluralDisplayName:"streamBackedObjectWithRetention",apiName:"buzz",primaryKeyPropertyApiName:"buzz",properties:{"buzz":{type:"string"}},datasource:{type:"stream",retentionPeriod:"PT1H"}});expect(dumpOntologyFullMetadata().ontology).toMatchInlineSnapshot(`
2823
3115
  {
2824
- "importedOntology": {
3116
+ "actionTypes": {},
3117
+ "blockPermissionInformation": {
2825
3118
  "actionTypes": {},
2826
- "blockPermissionInformation": {
2827
- "actionTypes": {},
2828
- "linkTypes": {},
2829
- "objectTypes": {},
2830
- },
2831
- "interfaceTypes": {},
2832
3119
  "linkTypes": {},
2833
3120
  "objectTypes": {},
2834
- "sharedPropertyTypes": {},
2835
- },
2836
- "importedValueTypes": {
2837
- "valueTypes": [],
2838
3121
  },
2839
- "ontology": {
2840
- "actionTypes": {},
2841
- "blockPermissionInformation": {
2842
- "actionTypes": {},
2843
- "linkTypes": {},
2844
- "objectTypes": {},
2845
- },
2846
- "interfaceTypes": {},
2847
- "linkTypes": {},
2848
- "objectTypes": {
2849
- "com.palantir.foo": {
2850
- "datasources": [
2851
- {
2852
- "datasource": {
2853
- "restrictedViewV2": {
2854
- "propertyMapping": {
2855
- "bar": {
2856
- "column": "bar",
2857
- "type": "column",
2858
- },
2859
- },
2860
- "restrictedViewRid": "com.palantir.foo",
2861
- },
2862
- "type": "restrictedViewV2",
2863
- },
2864
- "editsConfiguration": {
2865
- "onlyAllowPrivilegedEdits": false,
2866
- },
2867
- "redacted": false,
2868
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
2869
- },
2870
- ],
3122
+ "interfaceTypes": {},
3123
+ "linkTypes": {},
3124
+ "objectTypes": {
3125
+ "com.palantir.buzz": {
3126
+ "datasources": [
3127
+ {
3128
+ "datasource": {
3129
+ "streamV2": {
3130
+ "propertyMapping": {
3131
+ "buzz": "buzz",
3132
+ },
3133
+ "propertySecurityGroups": undefined,
3134
+ "retentionPolicy": {
3135
+ "time": {
3136
+ "window": "PT1H",
3137
+ },
3138
+ "type": "time",
3139
+ },
3140
+ "streamLocator": "com.palantir.buzz",
3141
+ },
3142
+ "type": "streamV2",
3143
+ },
3144
+ "datasourceName": "com.palantir.buzz",
3145
+ "editsConfiguration": {
3146
+ "onlyAllowPrivilegedEdits": false,
3147
+ },
3148
+ "redacted": false,
3149
+ },
3150
+ ],
3151
+ "entityMetadata": {
3152
+ "arePatchesEnabled": false,
3153
+ },
3154
+ "objectType": {
3155
+ "allImplementsInterfaces": {},
3156
+ "apiName": "com.palantir.buzz",
3157
+ "displayMetadata": {
3158
+ "description": undefined,
3159
+ "displayName": "streamBackedObjectWithRetention",
3160
+ "groupDisplayName": undefined,
3161
+ "icon": {
3162
+ "blueprint": {
3163
+ "color": "#2D72D2",
3164
+ "locator": "cube",
3165
+ },
3166
+ "type": "blueprint",
3167
+ },
3168
+ "pluralDisplayName": "streamBackedObjectWithRetention",
3169
+ "visibility": "NORMAL",
3170
+ },
3171
+ "implementsInterfaces2": [],
3172
+ "primaryKeys": [
3173
+ "buzz",
3174
+ ],
3175
+ "propertyTypes": {
3176
+ "buzz": {
3177
+ "apiName": "buzz",
3178
+ "baseFormatter": undefined,
3179
+ "dataConstraints": undefined,
3180
+ "displayMetadata": {
3181
+ "description": undefined,
3182
+ "displayName": "Buzz",
3183
+ "visibility": "NORMAL",
3184
+ },
3185
+ "indexedForSearch": true,
3186
+ "inlineAction": undefined,
3187
+ "ruleSetBinding": undefined,
3188
+ "sharedPropertyTypeApiName": undefined,
3189
+ "sharedPropertyTypeRid": undefined,
3190
+ "status": {
3191
+ "active": {},
3192
+ "type": "active",
3193
+ },
3194
+ "type": {
3195
+ "string": {
3196
+ "analyzerOverride": undefined,
3197
+ "enableAsciiFolding": undefined,
3198
+ "isLongText": false,
3199
+ "supportsEfficientLeadingWildcard": false,
3200
+ "supportsExactMatching": true,
3201
+ },
3202
+ "type": "string",
3203
+ },
3204
+ "typeClasses": [
3205
+ {
3206
+ "kind": "render_hint",
3207
+ "name": "SELECTABLE",
3208
+ },
3209
+ {
3210
+ "kind": "render_hint",
3211
+ "name": "SORTABLE",
3212
+ },
3213
+ ],
3214
+ "valueType": undefined,
3215
+ },
3216
+ },
3217
+ "redacted": false,
3218
+ "status": {
3219
+ "active": {},
3220
+ "type": "active",
3221
+ },
3222
+ "titlePropertyTypeRid": "buzz",
3223
+ },
3224
+ },
3225
+ "com.palantir.fizz": {
3226
+ "datasources": [
3227
+ {
3228
+ "datasource": {
3229
+ "streamV2": {
3230
+ "propertyMapping": {
3231
+ "bar": "bar",
3232
+ "fizz": "fizz",
3233
+ },
3234
+ "propertySecurityGroups": undefined,
3235
+ "retentionPolicy": {
3236
+ "none": {},
3237
+ "type": "none",
3238
+ },
3239
+ "streamLocator": "com.palantir.fizz",
3240
+ },
3241
+ "type": "streamV2",
3242
+ },
3243
+ "datasourceName": "com.palantir.fizz",
3244
+ "editsConfiguration": {
3245
+ "onlyAllowPrivilegedEdits": false,
3246
+ },
3247
+ "redacted": false,
3248
+ },
3249
+ ],
3250
+ "entityMetadata": {
3251
+ "arePatchesEnabled": false,
3252
+ },
3253
+ "objectType": {
3254
+ "allImplementsInterfaces": {},
3255
+ "apiName": "com.palantir.fizz",
3256
+ "displayMetadata": {
3257
+ "description": undefined,
3258
+ "displayName": "streamBackedObjectNoRetention",
3259
+ "groupDisplayName": undefined,
3260
+ "icon": {
3261
+ "blueprint": {
3262
+ "color": "#2D72D2",
3263
+ "locator": "cube",
3264
+ },
3265
+ "type": "blueprint",
3266
+ },
3267
+ "pluralDisplayName": "streamBackedObjectNoRetention",
3268
+ "visibility": "NORMAL",
3269
+ },
3270
+ "implementsInterfaces2": [],
3271
+ "primaryKeys": [
3272
+ "fizz",
3273
+ ],
3274
+ "propertyTypes": {
3275
+ "bar": {
3276
+ "apiName": "bar",
3277
+ "baseFormatter": undefined,
3278
+ "dataConstraints": undefined,
3279
+ "displayMetadata": {
3280
+ "description": undefined,
3281
+ "displayName": "Bar",
3282
+ "visibility": "NORMAL",
3283
+ },
3284
+ "indexedForSearch": true,
3285
+ "inlineAction": undefined,
3286
+ "ruleSetBinding": undefined,
3287
+ "sharedPropertyTypeApiName": undefined,
3288
+ "sharedPropertyTypeRid": undefined,
3289
+ "status": {
3290
+ "active": {},
3291
+ "type": "active",
3292
+ },
3293
+ "type": {
3294
+ "string": {
3295
+ "analyzerOverride": undefined,
3296
+ "enableAsciiFolding": undefined,
3297
+ "isLongText": false,
3298
+ "supportsEfficientLeadingWildcard": false,
3299
+ "supportsExactMatching": true,
3300
+ },
3301
+ "type": "string",
3302
+ },
3303
+ "typeClasses": [
3304
+ {
3305
+ "kind": "render_hint",
3306
+ "name": "SELECTABLE",
3307
+ },
3308
+ {
3309
+ "kind": "render_hint",
3310
+ "name": "SORTABLE",
3311
+ },
3312
+ ],
3313
+ "valueType": undefined,
3314
+ },
3315
+ "fizz": {
3316
+ "apiName": "fizz",
3317
+ "baseFormatter": undefined,
3318
+ "dataConstraints": undefined,
3319
+ "displayMetadata": {
3320
+ "description": undefined,
3321
+ "displayName": "Fizz",
3322
+ "visibility": "NORMAL",
3323
+ },
3324
+ "indexedForSearch": true,
3325
+ "inlineAction": undefined,
3326
+ "ruleSetBinding": undefined,
3327
+ "sharedPropertyTypeApiName": undefined,
3328
+ "sharedPropertyTypeRid": undefined,
3329
+ "status": {
3330
+ "active": {},
3331
+ "type": "active",
3332
+ },
3333
+ "type": {
3334
+ "string": {
3335
+ "analyzerOverride": undefined,
3336
+ "enableAsciiFolding": undefined,
3337
+ "isLongText": false,
3338
+ "supportsEfficientLeadingWildcard": false,
3339
+ "supportsExactMatching": true,
3340
+ },
3341
+ "type": "string",
3342
+ },
3343
+ "typeClasses": [
3344
+ {
3345
+ "kind": "render_hint",
3346
+ "name": "SELECTABLE",
3347
+ },
3348
+ {
3349
+ "kind": "render_hint",
3350
+ "name": "SORTABLE",
3351
+ },
3352
+ ],
3353
+ "valueType": undefined,
3354
+ },
3355
+ },
3356
+ "redacted": false,
3357
+ "status": {
3358
+ "active": {},
3359
+ "type": "active",
3360
+ },
3361
+ "titlePropertyTypeRid": "fizz",
3362
+ },
3363
+ },
3364
+ "com.palantir.foo": {
3365
+ "datasources": [
3366
+ {
3367
+ "datasource": {
3368
+ "datasetV2": {
3369
+ "datasetRid": "com.palantir.foo",
3370
+ "propertyMapping": {
3371
+ "bar": {
3372
+ "column": "bar",
3373
+ "type": "column",
3374
+ },
3375
+ },
3376
+ },
3377
+ "type": "datasetV2",
3378
+ },
3379
+ "datasourceName": "com.palantir.foo",
3380
+ "editsConfiguration": {
3381
+ "onlyAllowPrivilegedEdits": false,
3382
+ },
3383
+ "redacted": false,
3384
+ },
3385
+ ],
3386
+ "entityMetadata": {
3387
+ "arePatchesEnabled": false,
3388
+ },
3389
+ "objectType": {
3390
+ "allImplementsInterfaces": {},
3391
+ "apiName": "com.palantir.foo",
3392
+ "displayMetadata": {
3393
+ "description": undefined,
3394
+ "displayName": "datasetBackedObject",
3395
+ "groupDisplayName": undefined,
3396
+ "icon": {
3397
+ "blueprint": {
3398
+ "color": "#2D72D2",
3399
+ "locator": "cube",
3400
+ },
3401
+ "type": "blueprint",
3402
+ },
3403
+ "pluralDisplayName": "datasetBackedObject",
3404
+ "visibility": "NORMAL",
3405
+ },
3406
+ "implementsInterfaces2": [],
3407
+ "primaryKeys": [
3408
+ "bar",
3409
+ ],
3410
+ "propertyTypes": {
3411
+ "bar": {
3412
+ "apiName": "bar",
3413
+ "baseFormatter": undefined,
3414
+ "dataConstraints": undefined,
3415
+ "displayMetadata": {
3416
+ "description": undefined,
3417
+ "displayName": "Bar",
3418
+ "visibility": "NORMAL",
3419
+ },
3420
+ "indexedForSearch": true,
3421
+ "inlineAction": undefined,
3422
+ "ruleSetBinding": undefined,
3423
+ "sharedPropertyTypeApiName": undefined,
3424
+ "sharedPropertyTypeRid": undefined,
3425
+ "status": {
3426
+ "active": {},
3427
+ "type": "active",
3428
+ },
3429
+ "type": {
3430
+ "string": {
3431
+ "analyzerOverride": undefined,
3432
+ "enableAsciiFolding": undefined,
3433
+ "isLongText": false,
3434
+ "supportsEfficientLeadingWildcard": false,
3435
+ "supportsExactMatching": true,
3436
+ },
3437
+ "type": "string",
3438
+ },
3439
+ "typeClasses": [
3440
+ {
3441
+ "kind": "render_hint",
3442
+ "name": "SELECTABLE",
3443
+ },
3444
+ {
3445
+ "kind": "render_hint",
3446
+ "name": "SORTABLE",
3447
+ },
3448
+ ],
3449
+ "valueType": undefined,
3450
+ },
3451
+ },
3452
+ "redacted": false,
3453
+ "status": {
3454
+ "active": {},
3455
+ "type": "active",
3456
+ },
3457
+ "titlePropertyTypeRid": "bar",
3458
+ },
3459
+ },
3460
+ },
3461
+ "sharedPropertyTypes": {},
3462
+ }
3463
+ `);});it("Restricted view datasources are properly defined",()=>{defineObject({titlePropertyApiName:"bar",displayName:"Foo",pluralDisplayName:"Foo",apiName:"foo",primaryKeyPropertyApiName:"bar",properties:{"bar":{type:"string"}},datasource:{type:"restrictedView"}});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
3464
+ {
3465
+ "importedOntology": {
3466
+ "actionTypes": {},
3467
+ "blockPermissionInformation": {
3468
+ "actionTypes": {},
3469
+ "linkTypes": {},
3470
+ "objectTypes": {},
3471
+ },
3472
+ "interfaceTypes": {},
3473
+ "linkTypes": {},
3474
+ "objectTypes": {},
3475
+ "sharedPropertyTypes": {},
3476
+ },
3477
+ "importedValueTypes": {
3478
+ "valueTypes": [],
3479
+ },
3480
+ "ontology": {
3481
+ "actionTypes": {},
3482
+ "blockPermissionInformation": {
3483
+ "actionTypes": {},
3484
+ "linkTypes": {},
3485
+ "objectTypes": {},
3486
+ },
3487
+ "interfaceTypes": {},
3488
+ "linkTypes": {},
3489
+ "objectTypes": {
3490
+ "com.palantir.foo": {
3491
+ "datasources": [
3492
+ {
3493
+ "datasource": {
3494
+ "restrictedViewV2": {
3495
+ "propertyMapping": {
3496
+ "bar": {
3497
+ "column": "bar",
3498
+ "type": "column",
3499
+ },
3500
+ },
3501
+ "restrictedViewRid": "com.palantir.foo",
3502
+ },
3503
+ "type": "restrictedViewV2",
3504
+ },
3505
+ "datasourceName": "com.palantir.foo",
3506
+ "editsConfiguration": {
3507
+ "onlyAllowPrivilegedEdits": false,
3508
+ },
3509
+ "redacted": false,
3510
+ },
3511
+ ],
2871
3512
  "entityMetadata": {
2872
3513
  "arePatchesEnabled": false,
2873
3514
  },
@@ -2945,6 +3586,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2945
3586
  },
2946
3587
  "sharedPropertyTypes": {},
2947
3588
  },
3589
+ "randomnessKey": undefined,
2948
3590
  "valueTypes": {
2949
3591
  "valueTypes": [],
2950
3592
  },
@@ -2995,11 +3637,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2995
3637
  },
2996
3638
  "type": "datasetV2",
2997
3639
  },
3640
+ "datasourceName": "com.palantir.foo",
2998
3641
  "editsConfiguration": {
2999
3642
  "onlyAllowPrivilegedEdits": false,
3000
3643
  },
3001
3644
  "redacted": false,
3002
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
3003
3645
  },
3004
3646
  ],
3005
3647
  "entityMetadata": {
@@ -3119,6 +3761,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
3119
3761
  },
3120
3762
  "sharedPropertyTypes": {},
3121
3763
  },
3764
+ "randomnessKey": undefined,
3122
3765
  "valueTypes": {
3123
3766
  "valueTypes": [],
3124
3767
  },
@@ -3163,11 +3806,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
3163
3806
  },
3164
3807
  "type": "mediaSetView",
3165
3808
  },
3809
+ "datasourceName": "fizz",
3166
3810
  "editsConfiguration": {
3167
3811
  "onlyAllowPrivilegedEdits": false,
3168
3812
  },
3169
3813
  "redacted": false,
3170
- "rid": "ri.ontology.main.datasource.fizz",
3171
3814
  },
3172
3815
  {
3173
3816
  "datasource": {
@@ -3185,11 +3828,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
3185
3828
  },
3186
3829
  "type": "streamV2",
3187
3830
  },
3831
+ "datasourceName": "com.palantir.fizz",
3188
3832
  "editsConfiguration": {
3189
3833
  "onlyAllowPrivilegedEdits": false,
3190
3834
  },
3191
3835
  "redacted": false,
3192
- "rid": "ri.ontology.main.datasource.com.palantir.fizz",
3193
3836
  },
3194
3837
  ],
3195
3838
  "entityMetadata": {
@@ -3294,11 +3937,12 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
3294
3937
  },
3295
3938
  "sharedPropertyTypes": {},
3296
3939
  },
3940
+ "randomnessKey": undefined,
3297
3941
  "valueTypes": {
3298
3942
  "valueTypes": [],
3299
3943
  },
3300
3944
  }
3301
- `);});});describe("Marking Constraints",()=>{it("supports marking constraints with CBAC type and markingInputGroupName",()=>{defineObject({titlePropertyApiName:"title",displayName:"Document",pluralDisplayName:"Documents",apiName:"document",primaryKeyPropertyApiName:"title",properties:{"title":{type:"string",displayName:"Title"},"classification":{type:{type:"marking",markingType:"CBAC",markingInputGroupName:"classificationGroup"},displayName:"Classification"}}});const ontology=dumpOntologyFullMetadata();const classificationConstraint=ontology.ontology.objectTypes["com.palantir.document"].datasources[0].dataSecurity?.classificationConstraint;expect(classificationConstraint.markingGroupName).toEqual("classificationGroup");});});describe("Actions",()=>{it("Interface actions are properly defined",()=>{defineAction({apiName:"foo",displayName:"exampleAction",status:"active",rules:[{type:"addInterfaceRule",addInterfaceRule:{interfaceApiName:"foo",objectTypeParameter:"param1",sharedPropertyValues:{}}}],parameters:[{id:"param1",displayName:"param1",type:"boolean",validation:{required:true,allowedValues:{type:"boolean"}}}]});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
3945
+ `);});});describe("Marking Constraints",()=>{it("supports marking constraints with CBAC type and markingInputGroupName",()=>{defineObject({titlePropertyApiName:"title",displayName:"Document",pluralDisplayName:"Documents",apiName:"document",primaryKeyPropertyApiName:"title",properties:{"title":{type:"string",displayName:"Title"},"classification":{type:{type:"marking",markingType:"CBAC",markingInputGroupName:"classificationGroup"},displayName:"Classification"}}});const ontology=dumpOntologyFullMetadata();const classificationConstraint=ontology.ontology.objectTypes["com.palantir.document"].datasources[0].dataSecurity?.classificationConstraint;expect(classificationConstraint.markingGroupName).toEqual("classificationGroup");});});describe("Actions",()=>{it("Interface actions are properly defined",()=>{defineInterface({apiName:"foo",displayName:"foo",properties:{}});defineAction({apiName:"foo",displayName:"exampleAction",status:"active",rules:[{type:"addInterfaceRule",addInterfaceRule:{interfaceApiName:"foo",objectTypeParameter:"param1",sharedPropertyValues:{}}}],parameters:[{id:"param1",displayName:"param1",type:"boolean",validation:{required:true,allowedValues:{type:"boolean"}}}]});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
3302
3946
  {
3303
3947
  "importedOntology": {
3304
3948
  "actionTypes": {},
@@ -3446,16 +4090,44 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
3446
4090
  "linkTypes": {},
3447
4091
  "objectTypes": {},
3448
4092
  },
3449
- "interfaceTypes": {},
4093
+ "interfaceTypes": {
4094
+ "com.palantir.foo": {
4095
+ "interfaceType": {
4096
+ "apiName": "com.palantir.foo",
4097
+ "displayMetadata": {
4098
+ "description": "foo",
4099
+ "displayName": "foo",
4100
+ "icon": {
4101
+ "blueprint": {
4102
+ "color": "#4C90F0",
4103
+ "locator": "layout-hierarchy",
4104
+ },
4105
+ "type": "blueprint",
4106
+ },
4107
+ },
4108
+ "extendsInterfaces": [],
4109
+ "links": [],
4110
+ "properties": [],
4111
+ "propertiesV2": {},
4112
+ "propertiesV3": {},
4113
+ "searchable": true,
4114
+ "status": {
4115
+ "active": {},
4116
+ "type": "active",
4117
+ },
4118
+ },
4119
+ },
4120
+ },
3450
4121
  "linkTypes": {},
3451
4122
  "objectTypes": {},
3452
4123
  "sharedPropertyTypes": {},
3453
4124
  },
4125
+ "randomnessKey": undefined,
3454
4126
  "valueTypes": {
3455
4127
  "valueTypes": [],
3456
4128
  },
3457
4129
  }
3458
- `);});it("Simple interface actions (with object types) are properly defined",()=>{const exampleStructPropertyType=defineSharedPropertyType({apiName:"property2",type:{type:"struct",structDefinition:{simpleProperty:"string"}}});const mySpt=defineSharedPropertyType({apiName:"mySpt",type:"string"});const exampleInterface=defineInterface({apiName:"exampleInterface",properties:{mySpt,property1:"string",property2:exampleStructPropertyType}});const exampleObjectType=defineObject({titlePropertyApiName:"bar",displayName:"exampleObjectType",pluralDisplayName:"exampleObjectTypes",apiName:"foo",primaryKeyPropertyApiName:"bar",properties:{"bar":{type:"string"},"property1":{type:"string"},"property2":{type:{type:"struct",structDefinition:{simpleProperty:"string"}}}},implementsInterfaces:[{implements:exampleInterface,propertyMapping:[{interfaceProperty:"com.palantir.mySpt",mapsTo:"bar"},{interfaceProperty:"com.palantir.property1",mapsTo:"property1"},{interfaceProperty:"com.palantir.property2",mapsTo:"property2"}]}]});defineCreateInterfaceObjectAction(exampleInterface,exampleObjectType);defineModifyInterfaceObjectAction(exampleInterface,exampleObjectType);expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
4130
+ `);});it("Simple interface actions (with object types) are properly defined",()=>{const exampleStructPropertyType=defineSharedPropertyType({apiName:"property2",type:{type:"struct",structDefinition:{simpleProperty:"string"}}});const mySpt=defineSharedPropertyType({apiName:"mySpt",type:"string"});const exampleInterface=defineInterface({apiName:"exampleInterface",icon:{color:"#c7cdd6ff",locator:"globe"},properties:{mySpt,property1:"string",property2:exampleStructPropertyType}});const exampleObjectType=defineObject({titlePropertyApiName:"bar",displayName:"exampleObjectType",pluralDisplayName:"exampleObjectTypes",apiName:"foo",primaryKeyPropertyApiName:"bar",properties:{"bar":{type:"string"},"property1":{type:"string"},"property2":{type:{type:"struct",structDefinition:{simpleProperty:"string"}}}},implementsInterfaces:[{implements:exampleInterface,propertyMapping:[{interfaceProperty:"com.palantir.mySpt",mapsTo:"bar"},{interfaceProperty:"com.palantir.property1",mapsTo:"property1"},{interfaceProperty:"com.palantir.property2",mapsTo:"property2"}]}]});defineCreateInterfaceObjectAction({interfaceType:exampleInterface,objectType:exampleObjectType});defineModifyInterfaceObjectAction({interfaceType:exampleInterface,objectType:exampleObjectType});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
3459
4131
  {
3460
4132
  "importedOntology": {
3461
4133
  "actionTypes": {},
@@ -3954,6 +4626,13 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
3954
4626
  "displayMetadata": {
3955
4627
  "description": "exampleInterface",
3956
4628
  "displayName": "exampleInterface",
4629
+ "icon": {
4630
+ "blueprint": {
4631
+ "color": "#c7cdd6ff",
4632
+ "locator": "globe",
4633
+ },
4634
+ "type": "blueprint",
4635
+ },
3957
4636
  },
3958
4637
  "extendsInterfaces": [],
3959
4638
  "links": [],
@@ -4120,11 +4799,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
4120
4799
  },
4121
4800
  "type": "datasetV2",
4122
4801
  },
4802
+ "datasourceName": "com.palantir.foo",
4123
4803
  "editsConfiguration": {
4124
4804
  "onlyAllowPrivilegedEdits": false,
4125
4805
  },
4126
4806
  "redacted": false,
4127
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
4128
4807
  },
4129
4808
  ],
4130
4809
  "entityMetadata": {
@@ -4424,6 +5103,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
4424
5103
  },
4425
5104
  },
4426
5105
  },
5106
+ "randomnessKey": undefined,
4427
5107
  "valueTypes": {
4428
5108
  "valueTypes": [],
4429
5109
  },
@@ -4586,6 +5266,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
4586
5266
  "objectTypes": {},
4587
5267
  "sharedPropertyTypes": {},
4588
5268
  },
5269
+ "randomnessKey": undefined,
4589
5270
  "valueTypes": {
4590
5271
  "valueTypes": [],
4591
5272
  },
@@ -4835,6 +5516,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
4835
5516
  "objectTypes": {},
4836
5517
  "sharedPropertyTypes": {},
4837
5518
  },
5519
+ "randomnessKey": undefined,
4838
5520
  "valueTypes": {
4839
5521
  "valueTypes": [],
4840
5522
  },
@@ -5562,11 +6244,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
5562
6244
  },
5563
6245
  "type": "datasetV2",
5564
6246
  },
6247
+ "datasourceName": "com.palantir.foo",
5565
6248
  "editsConfiguration": {
5566
6249
  "onlyAllowPrivilegedEdits": false,
5567
6250
  },
5568
6251
  "redacted": false,
5569
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
5570
6252
  },
5571
6253
  ],
5572
6254
  "entityMetadata": {
@@ -5733,6 +6415,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
5733
6415
  },
5734
6416
  "sharedPropertyTypes": {},
5735
6417
  },
6418
+ "randomnessKey": undefined,
5736
6419
  "valueTypes": {
5737
6420
  "valueTypes": [],
5738
6421
  },
@@ -6929,11 +7612,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
6929
7612
  },
6930
7613
  "type": "datasetV2",
6931
7614
  },
7615
+ "datasourceName": "com.palantir.foo",
6932
7616
  "editsConfiguration": {
6933
7617
  "onlyAllowPrivilegedEdits": false,
6934
7618
  },
6935
7619
  "redacted": false,
6936
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
6937
7620
  },
6938
7621
  ],
6939
7622
  "entityMetadata": {
@@ -7133,6 +7816,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
7133
7816
  },
7134
7817
  "sharedPropertyTypes": {},
7135
7818
  },
7819
+ "randomnessKey": undefined,
7136
7820
  "valueTypes": {
7137
7821
  "valueTypes": [],
7138
7822
  },
@@ -7602,11 +8286,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
7602
8286
  },
7603
8287
  "type": "datasetV2",
7604
8288
  },
8289
+ "datasourceName": "com.palantir.foo",
7605
8290
  "editsConfiguration": {
7606
8291
  "onlyAllowPrivilegedEdits": false,
7607
8292
  },
7608
8293
  "redacted": false,
7609
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
7610
8294
  },
7611
8295
  ],
7612
8296
  "entityMetadata": {
@@ -7749,48 +8433,278 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
7749
8433
  "valueType": undefined,
7750
8434
  },
7751
8435
  },
7752
- "redacted": false,
7753
- "status": {
7754
- "active": {},
7755
- "type": "active",
7756
- },
7757
- "titlePropertyTypeRid": "bar",
8436
+ "redacted": false,
8437
+ "status": {
8438
+ "active": {},
8439
+ "type": "active",
8440
+ },
8441
+ "titlePropertyTypeRid": "bar",
8442
+ },
8443
+ },
8444
+ },
8445
+ "sharedPropertyTypes": {},
8446
+ },
8447
+ "randomnessKey": undefined,
8448
+ "valueTypes": {
8449
+ "valueTypes": [],
8450
+ },
8451
+ }
8452
+ `);});it("Parameter configuration, property mapping, and excluded property validations work",()=>{const sampleObject=defineObject({apiName:"sampleObject",displayName:"Test Object",description:"Sample object description",primaryKeyPropertyApiName:"id",pluralDisplayName:"tests",titlePropertyApiName:"name",properties:{"name":{type:"string"},"id":{type:"string"}}});expect(()=>{defineCreateObjectAction({objectType:sampleObject,parameterConfiguration:{"name":{displayName:"Name"},"custom_parameter":{displayName:"My Custom Param"}}});}).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Parameter custom_parameter does not exist as a property on com.palantir.sampleObject and its type is not explicitly defined]`);expect(()=>{defineCreateObjectAction({objectType:sampleObject,nonParameterMappings:{"custom_parameter":{type:"staticValue",staticValue:{type:"string",string:"custom_value"}}}});}).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Property custom_parameter does not exist as a property on com.palantir.sampleObject]`);expect(()=>{defineCreateObjectAction({objectType:sampleObject,excludedProperties:["custom_parameter"]});}).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Property custom_parameter does not exist as a property on com.palantir.sampleObject]`);});it("Static default action parameters must match type",()=>{const exampleObjectType=defineObject({titlePropertyApiName:"bar",displayName:"exampleObjectType",pluralDisplayName:"exampleObjectTypes",apiName:"foo",primaryKeyPropertyApiName:"primary",properties:{"bar":{type:"string"},"fizz":{type:"string"},"buzz":{type:"string"},"primary":{type:"string"}}});expect(()=>defineCreateObjectAction({objectType:exampleObjectType,parameterConfiguration:{"buzz":{defaultValue:{type:"staticValue",staticValue:{type:"boolean",boolean:true}}}}})).toThrowError("Invariant failed: Default static value for parameter buzz does not match type");});it("ModifyObjectRule requires objectToModify parameter",()=>{defineObject({apiName:"sampleObject",displayName:"Test Object",description:"Sample object description",primaryKeyPropertyApiName:"id",pluralDisplayName:"tests",titlePropertyApiName:"name",properties:{"name":{type:"string",description:"The name of the test object"},"id":{type:"string",description:"The ID of the test object"}}});expect(()=>defineAction({apiName:"foo",displayName:"exampleAction",status:"active",rules:[{type:"modifyObjectRule",modifyObjectRule:{objectToModify:"sampleObject",propertyValues:{"name":{type:"parameterId",parameterId:"name"}},structFieldValues:{}}}],parameters:[{id:"name",displayName:"Name",type:"string",validation:{required:true,allowedValues:{type:"text"}}}]})).toThrowError("Invariant failed: Object to modify parameter must be defined in parameters");});it("Target object parameters are configurable",()=>{const employeeObject=defineObject({apiName:"employee",displayName:"Employee",pluralDisplayName:"Employees",titlePropertyApiName:"id",primaryKeyPropertyApiName:"id",properties:{"id":{type:"string",displayName:"ID",description:"dummy"},"managedBy":{type:"string"}}});defineModifyObjectAction({objectType:employeeObject,parameterConfiguration:{[MODIFY_OBJECT_PARAMETER]:{displayName:"Chose a manager to modify",description:"Description",conditionalOverrides:[{type:"visibility",condition:{type:"group",name:"supervisors"}}]}}});defineCreateOrModifyObjectAction({objectType:employeeObject,parameterConfiguration:{[CREATE_OR_MODIFY_OBJECT_PARAMETER]:{displayName:"Chose a manager to modify or create a new one",description:"Description",conditionalOverrides:[{type:"visibility",condition:{type:"group",name:"supervisors"}}]}}});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
8453
+ {
8454
+ "importedOntology": {
8455
+ "actionTypes": {},
8456
+ "blockPermissionInformation": {
8457
+ "actionTypes": {},
8458
+ "linkTypes": {},
8459
+ "objectTypes": {},
8460
+ },
8461
+ "interfaceTypes": {},
8462
+ "linkTypes": {},
8463
+ "objectTypes": {},
8464
+ "sharedPropertyTypes": {},
8465
+ },
8466
+ "importedValueTypes": {
8467
+ "valueTypes": [],
8468
+ },
8469
+ "ontology": {
8470
+ "actionTypes": {
8471
+ "com.palantir.create-or-modify-employee": {
8472
+ "actionType": {
8473
+ "actionTypeLogic": {
8474
+ "logic": {
8475
+ "rules": [
8476
+ {
8477
+ "addOrModifyObjectRuleV2": {
8478
+ "objectToModify": "objectToCreateOrModifyParameter",
8479
+ "propertyValues": {
8480
+ "managedBy": {
8481
+ "parameterId": "managedBy",
8482
+ "type": "parameterId",
8483
+ },
8484
+ },
8485
+ "structFieldValues": {},
8486
+ },
8487
+ "type": "addOrModifyObjectRuleV2",
8488
+ },
8489
+ ],
8490
+ },
8491
+ "validation": {
8492
+ "actionTypeLevelValidation": {
8493
+ "rules": {
8494
+ "0": {
8495
+ "condition": {
8496
+ "true": {},
8497
+ "type": "true",
8498
+ },
8499
+ "displayMetadata": {
8500
+ "failureMessage": "",
8501
+ "typeClasses": [],
8502
+ },
8503
+ },
8504
+ },
8505
+ },
8506
+ "parameterValidations": {
8507
+ "managedBy": {
8508
+ "conditionalOverrides": [],
8509
+ "defaultValidation": {
8510
+ "display": {
8511
+ "prefill": {
8512
+ "objectParameterPropertyValue": {
8513
+ "parameterId": "objectToCreateOrModifyParameter",
8514
+ "propertyTypeId": "managedBy",
8515
+ },
8516
+ "type": "objectParameterPropertyValue",
8517
+ },
8518
+ "renderHint": {
8519
+ "textInput": {},
8520
+ "type": "textInput",
8521
+ },
8522
+ "visibility": {
8523
+ "editable": {},
8524
+ "type": "editable",
8525
+ },
8526
+ },
8527
+ "validation": {
8528
+ "allowedValues": {
8529
+ "text": {
8530
+ "text": {},
8531
+ "type": "text",
8532
+ },
8533
+ "type": "text",
8534
+ },
8535
+ "required": {
8536
+ "notRequired": {},
8537
+ "type": "notRequired",
8538
+ },
8539
+ },
8540
+ },
8541
+ },
8542
+ "objectToCreateOrModifyParameter": {
8543
+ "conditionalOverrides": [
8544
+ {
8545
+ "condition": {
8546
+ "comparison": {
8547
+ "left": {
8548
+ "type": "userProperty",
8549
+ "userProperty": {
8550
+ "propertyValue": {
8551
+ "groupIds": {},
8552
+ "type": "groupIds",
8553
+ },
8554
+ "userId": {
8555
+ "currentUser": {},
8556
+ "type": "currentUser",
8557
+ },
8558
+ },
8559
+ },
8560
+ "operator": "INTERSECTS",
8561
+ "right": {
8562
+ "staticValue": {
8563
+ "stringList": {
8564
+ "strings": [
8565
+ "supervisors",
8566
+ ],
8567
+ },
8568
+ "type": "stringList",
8569
+ },
8570
+ "type": "staticValue",
8571
+ },
8572
+ },
8573
+ "type": "comparison",
8574
+ },
8575
+ "parameterBlockOverrides": [
8576
+ {
8577
+ "type": "visibility",
8578
+ "visibility": {
8579
+ "visibility": {
8580
+ "editable": {},
8581
+ "type": "editable",
8582
+ },
8583
+ },
8584
+ },
8585
+ ],
8586
+ },
8587
+ ],
8588
+ "defaultValidation": {
8589
+ "display": {
8590
+ "renderHint": {
8591
+ "dropdown": {},
8592
+ "type": "dropdown",
8593
+ },
8594
+ "visibility": {
8595
+ "editable": {},
8596
+ "type": "editable",
8597
+ },
8598
+ },
8599
+ "validation": {
8600
+ "allowedValues": {
8601
+ "objectQuery": {
8602
+ "objectQuery": {},
8603
+ "type": "objectQuery",
8604
+ },
8605
+ "type": "objectQuery",
8606
+ },
8607
+ "required": {
8608
+ "required": {},
8609
+ "type": "required",
8610
+ },
8611
+ },
8612
+ },
8613
+ },
8614
+ },
8615
+ "sectionValidations": {},
8616
+ },
8617
+ },
8618
+ "metadata": {
8619
+ "apiName": "com.palantir.create-or-modify-employee",
8620
+ "displayMetadata": {
8621
+ "configuration": {
8622
+ "defaultLayout": "FORM",
8623
+ "displayAndFormat": {
8624
+ "table": {
8625
+ "columnWidthByParameterRid": {},
8626
+ "enableFileImport": true,
8627
+ "fitHorizontally": false,
8628
+ "frozenColumnCount": 0,
8629
+ "rowHeightInLines": 1,
8630
+ },
8631
+ },
8632
+ "enableLayoutUserSwitch": false,
8633
+ },
8634
+ "description": "",
8635
+ "displayName": "Create or Modify Employee",
8636
+ "icon": {
8637
+ "blueprint": {
8638
+ "color": "#000000",
8639
+ "locator": "edit",
8640
+ },
8641
+ "type": "blueprint",
8642
+ },
8643
+ "successMessage": [],
8644
+ "typeClasses": [],
8645
+ },
8646
+ "entities": {
8647
+ "affectedInterfaceTypes": [],
8648
+ "affectedLinkTypes": [],
8649
+ "affectedObjectTypes": [
8650
+ "com.palantir.employee",
8651
+ ],
8652
+ "typeGroups": [],
8653
+ },
8654
+ "formContentOrdering": [],
8655
+ "parameterOrdering": [
8656
+ "objectToCreateOrModifyParameter",
8657
+ "objectToCreateOrModifyParameter",
8658
+ "managedBy",
8659
+ ],
8660
+ "parameters": {
8661
+ "managedBy": {
8662
+ "displayMetadata": {
8663
+ "description": "",
8664
+ "displayName": "ManagedBy",
8665
+ "typeClasses": [],
8666
+ },
8667
+ "id": "managedBy",
8668
+ "type": {
8669
+ "string": {},
8670
+ "type": "string",
8671
+ },
8672
+ },
8673
+ "objectToCreateOrModifyParameter": {
8674
+ "displayMetadata": {
8675
+ "description": "Description",
8676
+ "displayName": "Chose a manager to modify or create a new one",
8677
+ "typeClasses": [],
8678
+ },
8679
+ "id": "objectToCreateOrModifyParameter",
8680
+ "type": {
8681
+ "objectReference": {
8682
+ "maybeCreateObjectOption": {
8683
+ "autoGenerated": {},
8684
+ "type": "autoGenerated",
8685
+ },
8686
+ "objectTypeId": "com.palantir.employee",
8687
+ },
8688
+ "type": "objectReference",
8689
+ },
8690
+ },
8691
+ },
8692
+ "sections": {},
8693
+ "status": {
8694
+ "active": {},
8695
+ "type": "active",
8696
+ },
8697
+ },
7758
8698
  },
7759
8699
  },
7760
- },
7761
- "sharedPropertyTypes": {},
7762
- },
7763
- "valueTypes": {
7764
- "valueTypes": [],
7765
- },
7766
- }
7767
- `);});it("Parameter configuration, property mapping, and excluded property validations work",()=>{const sampleObject=defineObject({apiName:"sampleObject",displayName:"Test Object",description:"Sample object description",primaryKeyPropertyApiName:"id",pluralDisplayName:"tests",titlePropertyApiName:"name",properties:{"name":{type:"string"},"id":{type:"string"}}});expect(()=>{defineCreateObjectAction({objectType:sampleObject,parameterConfiguration:{"name":{displayName:"Name"},"custom_parameter":{displayName:"My Custom Param"}}});}).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Parameter custom_parameter does not exist as a property on com.palantir.sampleObject and its type is not explicitly defined]`);expect(()=>{defineCreateObjectAction({objectType:sampleObject,nonParameterMappings:{"custom_parameter":{type:"staticValue",staticValue:{type:"string",string:"custom_value"}}}});}).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Property custom_parameter does not exist as a property on com.palantir.sampleObject]`);expect(()=>{defineCreateObjectAction({objectType:sampleObject,excludedProperties:["custom_parameter"]});}).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Property custom_parameter does not exist as a property on com.palantir.sampleObject]`);});it("Static default action parameters must match type",()=>{const exampleObjectType=defineObject({titlePropertyApiName:"bar",displayName:"exampleObjectType",pluralDisplayName:"exampleObjectTypes",apiName:"foo",primaryKeyPropertyApiName:"primary",properties:{"bar":{type:"string"},"fizz":{type:"string"},"buzz":{type:"string"},"primary":{type:"string"}}});expect(()=>defineCreateObjectAction({objectType:exampleObjectType,parameterConfiguration:{"buzz":{defaultValue:{type:"staticValue",staticValue:{type:"boolean",boolean:true}}}}})).toThrowError("Invariant failed: Default static value for parameter buzz does not match type");});it("ModifyObjectRule requires objectToModify parameter",()=>{defineObject({apiName:"sampleObject",displayName:"Test Object",description:"Sample object description",primaryKeyPropertyApiName:"id",pluralDisplayName:"tests",titlePropertyApiName:"name",properties:{"name":{type:"string",description:"The name of the test object"},"id":{type:"string",description:"The ID of the test object"}}});expect(()=>defineAction({apiName:"foo",displayName:"exampleAction",status:"active",rules:[{type:"modifyObjectRule",modifyObjectRule:{objectToModify:"sampleObject",propertyValues:{"name":{type:"parameterId",parameterId:"name"}},structFieldValues:{}}}],parameters:[{id:"name",displayName:"Name",type:"string",validation:{required:true,allowedValues:{type:"text"}}}]})).toThrowError("Invariant failed: Object to modify parameter must be defined in parameters");});it("Target object parameters are configurable",()=>{const employeeObject=defineObject({apiName:"employee",displayName:"Employee",pluralDisplayName:"Employees",titlePropertyApiName:"id",primaryKeyPropertyApiName:"id",properties:{"id":{type:"string",displayName:"ID",description:"dummy"},"managedBy":{type:"string"}}});defineModifyObjectAction({objectType:employeeObject,parameterConfiguration:{[MODIFY_OBJECT_PARAMETER]:{displayName:"Chose a manager to modify",description:"Description",conditionalOverrides:[{type:"visibility",condition:{type:"group",name:"supervisors"}}]}}});defineCreateOrModifyObjectAction({objectType:employeeObject,parameterConfiguration:{[CREATE_OR_MODIFY_OBJECT_PARAMETER]:{displayName:"Chose a manager to modify or create a new one",description:"Description",conditionalOverrides:[{type:"visibility",condition:{type:"group",name:"supervisors"}}]}}});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
7768
- {
7769
- "importedOntology": {
7770
- "actionTypes": {},
7771
- "blockPermissionInformation": {
7772
- "actionTypes": {},
7773
- "linkTypes": {},
7774
- "objectTypes": {},
7775
- },
7776
- "interfaceTypes": {},
7777
- "linkTypes": {},
7778
- "objectTypes": {},
7779
- "sharedPropertyTypes": {},
7780
- },
7781
- "importedValueTypes": {
7782
- "valueTypes": [],
7783
- },
7784
- "ontology": {
7785
- "actionTypes": {
7786
- "com.palantir.create-or-modify-employee": {
8700
+ "com.palantir.modify-object-employee": {
7787
8701
  "actionType": {
7788
8702
  "actionTypeLogic": {
7789
8703
  "logic": {
7790
8704
  "rules": [
7791
8705
  {
7792
- "addOrModifyObjectRuleV2": {
7793
- "objectToModify": "objectToCreateOrModifyParameter",
8706
+ "modifyObjectRule": {
8707
+ "objectToModify": "objectToModifyParameter",
7794
8708
  "propertyValues": {
7795
8709
  "managedBy": {
7796
8710
  "parameterId": "managedBy",
@@ -7799,7 +8713,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
7799
8713
  },
7800
8714
  "structFieldValues": {},
7801
8715
  },
7802
- "type": "addOrModifyObjectRuleV2",
8716
+ "type": "modifyObjectRule",
7803
8717
  },
7804
8718
  ],
7805
8719
  },
@@ -7825,7 +8739,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
7825
8739
  "display": {
7826
8740
  "prefill": {
7827
8741
  "objectParameterPropertyValue": {
7828
- "parameterId": "objectToCreateOrModifyParameter",
8742
+ "parameterId": "objectToModifyParameter",
7829
8743
  "propertyTypeId": "managedBy",
7830
8744
  },
7831
8745
  "type": "objectParameterPropertyValue",
@@ -7854,7 +8768,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
7854
8768
  },
7855
8769
  },
7856
8770
  },
7857
- "objectToCreateOrModifyParameter": {
8771
+ "objectToModifyParameter": {
7858
8772
  "conditionalOverrides": [
7859
8773
  {
7860
8774
  "condition": {
@@ -7931,7 +8845,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
7931
8845
  },
7932
8846
  },
7933
8847
  "metadata": {
7934
- "apiName": "com.palantir.create-or-modify-employee",
8848
+ "apiName": "com.palantir.modify-object-employee",
7935
8849
  "displayMetadata": {
7936
8850
  "configuration": {
7937
8851
  "defaultLayout": "FORM",
@@ -7947,7 +8861,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
7947
8861
  "enableLayoutUserSwitch": false,
7948
8862
  },
7949
8863
  "description": "",
7950
- "displayName": "Create or Modify Employee",
8864
+ "displayName": "Modify Employee",
7951
8865
  "icon": {
7952
8866
  "blueprint": {
7953
8867
  "color": "#000000",
@@ -7968,8 +8882,8 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
7968
8882
  },
7969
8883
  "formContentOrdering": [],
7970
8884
  "parameterOrdering": [
7971
- "objectToCreateOrModifyParameter",
7972
- "objectToCreateOrModifyParameter",
8885
+ "objectToModifyParameter",
8886
+ "objectToModifyParameter",
7973
8887
  "managedBy",
7974
8888
  ],
7975
8889
  "parameters": {
@@ -7985,19 +8899,15 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
7985
8899
  "type": "string",
7986
8900
  },
7987
8901
  },
7988
- "objectToCreateOrModifyParameter": {
8902
+ "objectToModifyParameter": {
7989
8903
  "displayMetadata": {
7990
8904
  "description": "Description",
7991
- "displayName": "Chose a manager to modify or create a new one",
8905
+ "displayName": "Chose a manager to modify",
7992
8906
  "typeClasses": [],
7993
8907
  },
7994
- "id": "objectToCreateOrModifyParameter",
8908
+ "id": "objectToModifyParameter",
7995
8909
  "type": {
7996
8910
  "objectReference": {
7997
- "maybeCreateObjectOption": {
7998
- "autoGenerated": {},
7999
- "type": "autoGenerated",
8000
- },
8001
8911
  "objectTypeId": "com.palantir.employee",
8002
8912
  },
8003
8913
  "type": "objectReference",
@@ -8012,15 +8922,199 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8012
8922
  },
8013
8923
  },
8014
8924
  },
8015
- "com.palantir.modify-object-employee": {
8925
+ },
8926
+ "blockPermissionInformation": {
8927
+ "actionTypes": {},
8928
+ "linkTypes": {},
8929
+ "objectTypes": {},
8930
+ },
8931
+ "interfaceTypes": {},
8932
+ "linkTypes": {},
8933
+ "objectTypes": {
8934
+ "com.palantir.employee": {
8935
+ "datasources": [
8936
+ {
8937
+ "datasource": {
8938
+ "datasetV2": {
8939
+ "datasetRid": "com.palantir.employee",
8940
+ "propertyMapping": {
8941
+ "id": {
8942
+ "column": "id",
8943
+ "type": "column",
8944
+ },
8945
+ "managedBy": {
8946
+ "column": "managedBy",
8947
+ "type": "column",
8948
+ },
8949
+ },
8950
+ },
8951
+ "type": "datasetV2",
8952
+ },
8953
+ "datasourceName": "com.palantir.employee",
8954
+ "editsConfiguration": {
8955
+ "onlyAllowPrivilegedEdits": false,
8956
+ },
8957
+ "redacted": false,
8958
+ },
8959
+ ],
8960
+ "entityMetadata": {
8961
+ "arePatchesEnabled": false,
8962
+ },
8963
+ "objectType": {
8964
+ "allImplementsInterfaces": {},
8965
+ "apiName": "com.palantir.employee",
8966
+ "displayMetadata": {
8967
+ "description": undefined,
8968
+ "displayName": "Employee",
8969
+ "groupDisplayName": undefined,
8970
+ "icon": {
8971
+ "blueprint": {
8972
+ "color": "#2D72D2",
8973
+ "locator": "cube",
8974
+ },
8975
+ "type": "blueprint",
8976
+ },
8977
+ "pluralDisplayName": "Employees",
8978
+ "visibility": "NORMAL",
8979
+ },
8980
+ "implementsInterfaces2": [],
8981
+ "primaryKeys": [
8982
+ "id",
8983
+ ],
8984
+ "propertyTypes": {
8985
+ "id": {
8986
+ "apiName": "id",
8987
+ "baseFormatter": undefined,
8988
+ "dataConstraints": undefined,
8989
+ "displayMetadata": {
8990
+ "description": "dummy",
8991
+ "displayName": "ID",
8992
+ "visibility": "NORMAL",
8993
+ },
8994
+ "indexedForSearch": true,
8995
+ "inlineAction": undefined,
8996
+ "ruleSetBinding": undefined,
8997
+ "sharedPropertyTypeApiName": undefined,
8998
+ "sharedPropertyTypeRid": undefined,
8999
+ "status": {
9000
+ "active": {},
9001
+ "type": "active",
9002
+ },
9003
+ "type": {
9004
+ "string": {
9005
+ "analyzerOverride": undefined,
9006
+ "enableAsciiFolding": undefined,
9007
+ "isLongText": false,
9008
+ "supportsEfficientLeadingWildcard": false,
9009
+ "supportsExactMatching": true,
9010
+ },
9011
+ "type": "string",
9012
+ },
9013
+ "typeClasses": [
9014
+ {
9015
+ "kind": "render_hint",
9016
+ "name": "SELECTABLE",
9017
+ },
9018
+ {
9019
+ "kind": "render_hint",
9020
+ "name": "SORTABLE",
9021
+ },
9022
+ ],
9023
+ "valueType": undefined,
9024
+ },
9025
+ "managedBy": {
9026
+ "apiName": "managedBy",
9027
+ "baseFormatter": undefined,
9028
+ "dataConstraints": undefined,
9029
+ "displayMetadata": {
9030
+ "description": undefined,
9031
+ "displayName": "ManagedBy",
9032
+ "visibility": "NORMAL",
9033
+ },
9034
+ "indexedForSearch": true,
9035
+ "inlineAction": undefined,
9036
+ "ruleSetBinding": undefined,
9037
+ "sharedPropertyTypeApiName": undefined,
9038
+ "sharedPropertyTypeRid": undefined,
9039
+ "status": {
9040
+ "active": {},
9041
+ "type": "active",
9042
+ },
9043
+ "type": {
9044
+ "string": {
9045
+ "analyzerOverride": undefined,
9046
+ "enableAsciiFolding": undefined,
9047
+ "isLongText": false,
9048
+ "supportsEfficientLeadingWildcard": false,
9049
+ "supportsExactMatching": true,
9050
+ },
9051
+ "type": "string",
9052
+ },
9053
+ "typeClasses": [
9054
+ {
9055
+ "kind": "render_hint",
9056
+ "name": "SELECTABLE",
9057
+ },
9058
+ {
9059
+ "kind": "render_hint",
9060
+ "name": "SORTABLE",
9061
+ },
9062
+ ],
9063
+ "valueType": undefined,
9064
+ },
9065
+ },
9066
+ "redacted": false,
9067
+ "status": {
9068
+ "active": {},
9069
+ "type": "active",
9070
+ },
9071
+ "titlePropertyTypeRid": "id",
9072
+ },
9073
+ },
9074
+ },
9075
+ "sharedPropertyTypes": {},
9076
+ },
9077
+ "randomnessKey": undefined,
9078
+ "valueTypes": {
9079
+ "valueTypes": [],
9080
+ },
9081
+ }
9082
+ `);});it("OAC defined object references as parameters are properly defined",()=>{// This test defines an action that creates an OAC-defined employee object type and also adds an additional parameter
9083
+ // for an objectReference to a manager object type that is also defined in OAC. The action shows how you can use this
9084
+ // objectReference parameter elsewhere in the action - in this case we are prefilling the managedBy property to be the
9085
+ // id of the selected manager object type.
9086
+ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",pluralDisplayName:"Employees",titlePropertyApiName:"id",primaryKeyPropertyApiName:"id",properties:{"id":{type:"string",displayName:"ID",description:"dummy"},"managedBy":{type:"string"}}});const managerObject=defineObject({apiName:"manager",displayName:"Manager",pluralDisplayName:"Managers",titlePropertyApiName:"id",primaryKeyPropertyApiName:"id",properties:{"id":{type:"string",displayName:"ID",description:"dummy"}},editsEnabled:true});defineCreateObjectAction({objectType:employeeObject,parameterOrdering:["myManager","id","managedBy"],parameterConfiguration:{"myManager":{customParameterType:{type:"objectReference",objectReference:{objectTypeId:managerObject.apiName}}},"managedBy":{defaultValue:{type:"objectParameterPropertyValue",objectParameterPropertyValue:{parameterId:"myManager",propertyTypeId:"id"}}}}});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
9087
+ {
9088
+ "importedOntology": {
9089
+ "actionTypes": {},
9090
+ "blockPermissionInformation": {
9091
+ "actionTypes": {},
9092
+ "linkTypes": {},
9093
+ "objectTypes": {},
9094
+ },
9095
+ "interfaceTypes": {},
9096
+ "linkTypes": {},
9097
+ "objectTypes": {},
9098
+ "sharedPropertyTypes": {},
9099
+ },
9100
+ "importedValueTypes": {
9101
+ "valueTypes": [],
9102
+ },
9103
+ "ontology": {
9104
+ "actionTypes": {
9105
+ "com.palantir.create-object-employee": {
8016
9106
  "actionType": {
8017
9107
  "actionTypeLogic": {
8018
9108
  "logic": {
8019
9109
  "rules": [
8020
9110
  {
8021
- "modifyObjectRule": {
8022
- "objectToModify": "objectToModifyParameter",
9111
+ "addObjectRule": {
9112
+ "objectTypeId": "com.palantir.employee",
8023
9113
  "propertyValues": {
9114
+ "id": {
9115
+ "parameterId": "id",
9116
+ "type": "parameterId",
9117
+ },
8024
9118
  "managedBy": {
8025
9119
  "parameterId": "managedBy",
8026
9120
  "type": "parameterId",
@@ -8028,7 +9122,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8028
9122
  },
8029
9123
  "structFieldValues": {},
8030
9124
  },
8031
- "type": "modifyObjectRule",
9125
+ "type": "addObjectRule",
8032
9126
  },
8033
9127
  ],
8034
9128
  },
@@ -8048,14 +9142,42 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8048
9142
  },
8049
9143
  },
8050
9144
  "parameterValidations": {
9145
+ "id": {
9146
+ "conditionalOverrides": [],
9147
+ "defaultValidation": {
9148
+ "display": {
9149
+ "renderHint": {
9150
+ "textInput": {},
9151
+ "type": "textInput",
9152
+ },
9153
+ "visibility": {
9154
+ "editable": {},
9155
+ "type": "editable",
9156
+ },
9157
+ },
9158
+ "validation": {
9159
+ "allowedValues": {
9160
+ "text": {
9161
+ "text": {},
9162
+ "type": "text",
9163
+ },
9164
+ "type": "text",
9165
+ },
9166
+ "required": {
9167
+ "notRequired": {},
9168
+ "type": "notRequired",
9169
+ },
9170
+ },
9171
+ },
9172
+ },
8051
9173
  "managedBy": {
8052
9174
  "conditionalOverrides": [],
8053
9175
  "defaultValidation": {
8054
9176
  "display": {
8055
9177
  "prefill": {
8056
9178
  "objectParameterPropertyValue": {
8057
- "parameterId": "objectToModifyParameter",
8058
- "propertyTypeId": "managedBy",
9179
+ "parameterId": "myManager",
9180
+ "propertyTypeId": "id",
8059
9181
  },
8060
9182
  "type": "objectParameterPropertyValue",
8061
9183
  },
@@ -8083,52 +9205,8 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8083
9205
  },
8084
9206
  },
8085
9207
  },
8086
- "objectToModifyParameter": {
8087
- "conditionalOverrides": [
8088
- {
8089
- "condition": {
8090
- "comparison": {
8091
- "left": {
8092
- "type": "userProperty",
8093
- "userProperty": {
8094
- "propertyValue": {
8095
- "groupIds": {},
8096
- "type": "groupIds",
8097
- },
8098
- "userId": {
8099
- "currentUser": {},
8100
- "type": "currentUser",
8101
- },
8102
- },
8103
- },
8104
- "operator": "INTERSECTS",
8105
- "right": {
8106
- "staticValue": {
8107
- "stringList": {
8108
- "strings": [
8109
- "supervisors",
8110
- ],
8111
- },
8112
- "type": "stringList",
8113
- },
8114
- "type": "staticValue",
8115
- },
8116
- },
8117
- "type": "comparison",
8118
- },
8119
- "parameterBlockOverrides": [
8120
- {
8121
- "type": "visibility",
8122
- "visibility": {
8123
- "visibility": {
8124
- "editable": {},
8125
- "type": "editable",
8126
- },
8127
- },
8128
- },
8129
- ],
8130
- },
8131
- ],
9208
+ "myManager": {
9209
+ "conditionalOverrides": [],
8132
9210
  "defaultValidation": {
8133
9211
  "display": {
8134
9212
  "renderHint": {
@@ -8149,8 +9227,8 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8149
9227
  "type": "objectQuery",
8150
9228
  },
8151
9229
  "required": {
8152
- "required": {},
8153
- "type": "required",
9230
+ "notRequired": {},
9231
+ "type": "notRequired",
8154
9232
  },
8155
9233
  },
8156
9234
  },
@@ -8160,7 +9238,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8160
9238
  },
8161
9239
  },
8162
9240
  "metadata": {
8163
- "apiName": "com.palantir.modify-object-employee",
9241
+ "apiName": "com.palantir.create-object-employee",
8164
9242
  "displayMetadata": {
8165
9243
  "configuration": {
8166
9244
  "defaultLayout": "FORM",
@@ -8176,7 +9254,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8176
9254
  "enableLayoutUserSwitch": false,
8177
9255
  },
8178
9256
  "description": "",
8179
- "displayName": "Modify Employee",
9257
+ "displayName": "Create Employee",
8180
9258
  "icon": {
8181
9259
  "blueprint": {
8182
9260
  "color": "#000000",
@@ -8197,11 +9275,23 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8197
9275
  },
8198
9276
  "formContentOrdering": [],
8199
9277
  "parameterOrdering": [
8200
- "objectToModifyParameter",
8201
- "objectToModifyParameter",
9278
+ "myManager",
9279
+ "id",
8202
9280
  "managedBy",
8203
9281
  ],
8204
9282
  "parameters": {
9283
+ "id": {
9284
+ "displayMetadata": {
9285
+ "description": "",
9286
+ "displayName": "ID",
9287
+ "typeClasses": [],
9288
+ },
9289
+ "id": "id",
9290
+ "type": {
9291
+ "string": {},
9292
+ "type": "string",
9293
+ },
9294
+ },
8205
9295
  "managedBy": {
8206
9296
  "displayMetadata": {
8207
9297
  "description": "",
@@ -8214,73 +9304,209 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8214
9304
  "type": "string",
8215
9305
  },
8216
9306
  },
8217
- "objectToModifyParameter": {
9307
+ "myManager": {
8218
9308
  "displayMetadata": {
8219
- "description": "Description",
8220
- "displayName": "Chose a manager to modify",
9309
+ "description": "",
9310
+ "displayName": "MyManager",
8221
9311
  "typeClasses": [],
8222
9312
  },
8223
- "id": "objectToModifyParameter",
9313
+ "id": "myManager",
8224
9314
  "type": {
8225
9315
  "objectReference": {
8226
- "objectTypeId": "com.palantir.employee",
9316
+ "objectTypeId": "com.palantir.manager",
8227
9317
  },
8228
9318
  "type": "objectReference",
8229
9319
  },
8230
- },
8231
- },
8232
- "sections": {},
8233
- "status": {
8234
- "active": {},
8235
- "type": "active",
9320
+ },
9321
+ },
9322
+ "sections": {},
9323
+ "status": {
9324
+ "active": {},
9325
+ "type": "active",
9326
+ },
9327
+ },
9328
+ },
9329
+ },
9330
+ },
9331
+ "blockPermissionInformation": {
9332
+ "actionTypes": {},
9333
+ "linkTypes": {},
9334
+ "objectTypes": {},
9335
+ },
9336
+ "interfaceTypes": {},
9337
+ "linkTypes": {},
9338
+ "objectTypes": {
9339
+ "com.palantir.employee": {
9340
+ "datasources": [
9341
+ {
9342
+ "datasource": {
9343
+ "datasetV2": {
9344
+ "datasetRid": "com.palantir.employee",
9345
+ "propertyMapping": {
9346
+ "id": {
9347
+ "column": "id",
9348
+ "type": "column",
9349
+ },
9350
+ "managedBy": {
9351
+ "column": "managedBy",
9352
+ "type": "column",
9353
+ },
9354
+ },
9355
+ },
9356
+ "type": "datasetV2",
9357
+ },
9358
+ "datasourceName": "com.palantir.employee",
9359
+ "editsConfiguration": {
9360
+ "onlyAllowPrivilegedEdits": false,
9361
+ },
9362
+ "redacted": false,
9363
+ },
9364
+ ],
9365
+ "entityMetadata": {
9366
+ "arePatchesEnabled": false,
9367
+ },
9368
+ "objectType": {
9369
+ "allImplementsInterfaces": {},
9370
+ "apiName": "com.palantir.employee",
9371
+ "displayMetadata": {
9372
+ "description": undefined,
9373
+ "displayName": "Employee",
9374
+ "groupDisplayName": undefined,
9375
+ "icon": {
9376
+ "blueprint": {
9377
+ "color": "#2D72D2",
9378
+ "locator": "cube",
9379
+ },
9380
+ "type": "blueprint",
9381
+ },
9382
+ "pluralDisplayName": "Employees",
9383
+ "visibility": "NORMAL",
9384
+ },
9385
+ "implementsInterfaces2": [],
9386
+ "primaryKeys": [
9387
+ "id",
9388
+ ],
9389
+ "propertyTypes": {
9390
+ "id": {
9391
+ "apiName": "id",
9392
+ "baseFormatter": undefined,
9393
+ "dataConstraints": undefined,
9394
+ "displayMetadata": {
9395
+ "description": "dummy",
9396
+ "displayName": "ID",
9397
+ "visibility": "NORMAL",
9398
+ },
9399
+ "indexedForSearch": true,
9400
+ "inlineAction": undefined,
9401
+ "ruleSetBinding": undefined,
9402
+ "sharedPropertyTypeApiName": undefined,
9403
+ "sharedPropertyTypeRid": undefined,
9404
+ "status": {
9405
+ "active": {},
9406
+ "type": "active",
9407
+ },
9408
+ "type": {
9409
+ "string": {
9410
+ "analyzerOverride": undefined,
9411
+ "enableAsciiFolding": undefined,
9412
+ "isLongText": false,
9413
+ "supportsEfficientLeadingWildcard": false,
9414
+ "supportsExactMatching": true,
9415
+ },
9416
+ "type": "string",
9417
+ },
9418
+ "typeClasses": [
9419
+ {
9420
+ "kind": "render_hint",
9421
+ "name": "SELECTABLE",
9422
+ },
9423
+ {
9424
+ "kind": "render_hint",
9425
+ "name": "SORTABLE",
9426
+ },
9427
+ ],
9428
+ "valueType": undefined,
9429
+ },
9430
+ "managedBy": {
9431
+ "apiName": "managedBy",
9432
+ "baseFormatter": undefined,
9433
+ "dataConstraints": undefined,
9434
+ "displayMetadata": {
9435
+ "description": undefined,
9436
+ "displayName": "ManagedBy",
9437
+ "visibility": "NORMAL",
9438
+ },
9439
+ "indexedForSearch": true,
9440
+ "inlineAction": undefined,
9441
+ "ruleSetBinding": undefined,
9442
+ "sharedPropertyTypeApiName": undefined,
9443
+ "sharedPropertyTypeRid": undefined,
9444
+ "status": {
9445
+ "active": {},
9446
+ "type": "active",
9447
+ },
9448
+ "type": {
9449
+ "string": {
9450
+ "analyzerOverride": undefined,
9451
+ "enableAsciiFolding": undefined,
9452
+ "isLongText": false,
9453
+ "supportsEfficientLeadingWildcard": false,
9454
+ "supportsExactMatching": true,
9455
+ },
9456
+ "type": "string",
9457
+ },
9458
+ "typeClasses": [
9459
+ {
9460
+ "kind": "render_hint",
9461
+ "name": "SELECTABLE",
9462
+ },
9463
+ {
9464
+ "kind": "render_hint",
9465
+ "name": "SORTABLE",
9466
+ },
9467
+ ],
9468
+ "valueType": undefined,
8236
9469
  },
8237
9470
  },
9471
+ "redacted": false,
9472
+ "status": {
9473
+ "active": {},
9474
+ "type": "active",
9475
+ },
9476
+ "titlePropertyTypeRid": "id",
8238
9477
  },
8239
9478
  },
8240
- },
8241
- "blockPermissionInformation": {
8242
- "actionTypes": {},
8243
- "linkTypes": {},
8244
- "objectTypes": {},
8245
- },
8246
- "interfaceTypes": {},
8247
- "linkTypes": {},
8248
- "objectTypes": {
8249
- "com.palantir.employee": {
9479
+ "com.palantir.manager": {
8250
9480
  "datasources": [
8251
9481
  {
8252
9482
  "datasource": {
8253
9483
  "datasetV2": {
8254
- "datasetRid": "com.palantir.employee",
9484
+ "datasetRid": "com.palantir.manager",
8255
9485
  "propertyMapping": {
8256
9486
  "id": {
8257
9487
  "column": "id",
8258
9488
  "type": "column",
8259
9489
  },
8260
- "managedBy": {
8261
- "column": "managedBy",
8262
- "type": "column",
8263
- },
8264
9490
  },
8265
9491
  },
8266
9492
  "type": "datasetV2",
8267
9493
  },
9494
+ "datasourceName": "com.palantir.manager",
8268
9495
  "editsConfiguration": {
8269
9496
  "onlyAllowPrivilegedEdits": false,
8270
9497
  },
8271
9498
  "redacted": false,
8272
- "rid": "ri.ontology.main.datasource.com.palantir.employee",
8273
9499
  },
8274
9500
  ],
8275
9501
  "entityMetadata": {
8276
- "arePatchesEnabled": false,
9502
+ "arePatchesEnabled": true,
8277
9503
  },
8278
9504
  "objectType": {
8279
9505
  "allImplementsInterfaces": {},
8280
- "apiName": "com.palantir.employee",
9506
+ "apiName": "com.palantir.manager",
8281
9507
  "displayMetadata": {
8282
9508
  "description": undefined,
8283
- "displayName": "Employee",
9509
+ "displayName": "Manager",
8284
9510
  "groupDisplayName": undefined,
8285
9511
  "icon": {
8286
9512
  "blueprint": {
@@ -8289,7 +9515,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8289
9515
  },
8290
9516
  "type": "blueprint",
8291
9517
  },
8292
- "pluralDisplayName": "Employees",
9518
+ "pluralDisplayName": "Managers",
8293
9519
  "visibility": "NORMAL",
8294
9520
  },
8295
9521
  "implementsInterfaces2": [],
@@ -8337,46 +9563,6 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8337
9563
  ],
8338
9564
  "valueType": undefined,
8339
9565
  },
8340
- "managedBy": {
8341
- "apiName": "managedBy",
8342
- "baseFormatter": undefined,
8343
- "dataConstraints": undefined,
8344
- "displayMetadata": {
8345
- "description": undefined,
8346
- "displayName": "ManagedBy",
8347
- "visibility": "NORMAL",
8348
- },
8349
- "indexedForSearch": true,
8350
- "inlineAction": undefined,
8351
- "ruleSetBinding": undefined,
8352
- "sharedPropertyTypeApiName": undefined,
8353
- "sharedPropertyTypeRid": undefined,
8354
- "status": {
8355
- "active": {},
8356
- "type": "active",
8357
- },
8358
- "type": {
8359
- "string": {
8360
- "analyzerOverride": undefined,
8361
- "enableAsciiFolding": undefined,
8362
- "isLongText": false,
8363
- "supportsEfficientLeadingWildcard": false,
8364
- "supportsExactMatching": true,
8365
- },
8366
- "type": "string",
8367
- },
8368
- "typeClasses": [
8369
- {
8370
- "kind": "render_hint",
8371
- "name": "SELECTABLE",
8372
- },
8373
- {
8374
- "kind": "render_hint",
8375
- "name": "SORTABLE",
8376
- },
8377
- ],
8378
- "valueType": undefined,
8379
- },
8380
9566
  },
8381
9567
  "redacted": false,
8382
9568
  "status": {
@@ -8389,15 +9575,12 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8389
9575
  },
8390
9576
  "sharedPropertyTypes": {},
8391
9577
  },
9578
+ "randomnessKey": undefined,
8392
9579
  "valueTypes": {
8393
9580
  "valueTypes": [],
8394
9581
  },
8395
9582
  }
8396
- `);});it("OAC defined object references as parameters are properly defined",()=>{// This test defines an action that creates an OAC-defined employee object type and also adds an additional parameter
8397
- // for an objectReference to a manager object type that is also defined in OAC. The action shows how you can use this
8398
- // objectReference parameter elsewhere in the action - in this case we are prefilling the managedBy property to be the
8399
- // id of the selected manager object type.
8400
- const employeeObject=defineObject({apiName:"employee",displayName:"Employee",pluralDisplayName:"Employees",titlePropertyApiName:"id",primaryKeyPropertyApiName:"id",properties:{"id":{type:"string",displayName:"ID",description:"dummy"},"managedBy":{type:"string"}}});const managerObject=defineObject({apiName:"manager",displayName:"Manager",pluralDisplayName:"Managers",titlePropertyApiName:"id",primaryKeyPropertyApiName:"id",properties:{"id":{type:"string",displayName:"ID",description:"dummy"}},editsEnabled:true});defineCreateObjectAction({objectType:employeeObject,parameterOrdering:["myManager","id","managedBy"],parameterConfiguration:{"myManager":{customParameterType:{type:"objectReference",objectReference:{objectTypeId:managerObject.apiName}}},"managedBy":{defaultValue:{type:"objectParameterPropertyValue",objectParameterPropertyValue:{parameterId:"myManager",propertyTypeId:"id"}}}}});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
9583
+ `);});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(`
8401
9584
  {
8402
9585
  "importedOntology": {
8403
9586
  "actionTypes": {},
@@ -8416,27 +9599,23 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
8416
9599
  },
8417
9600
  "ontology": {
8418
9601
  "actionTypes": {
8419
- "com.palantir.create-object-employee": {
9602
+ "com.palantir.create-example-interface": {
8420
9603
  "actionType": {
8421
9604
  "actionTypeLogic": {
8422
9605
  "logic": {
8423
9606
  "rules": [
8424
9607
  {
8425
- "addObjectRule": {
8426
- "objectTypeId": "com.palantir.employee",
8427
- "propertyValues": {
8428
- "id": {
8429
- "parameterId": "id",
8430
- "type": "parameterId",
8431
- },
8432
- "managedBy": {
8433
- "parameterId": "managedBy",
9608
+ "addInterfaceRule": {
9609
+ "interfaceApiName": "com.palantir.exampleInterface",
9610
+ "objectTypeParameter": "objectTypeParameter",
9611
+ "sharedPropertyValues": {
9612
+ "com.palantir.property1": {
9613
+ "parameterId": "com.palantir.property1",
8434
9614
  "type": "parameterId",
8435
9615
  },
8436
9616
  },
8437
- "structFieldValues": {},
8438
9617
  },
8439
- "type": "addObjectRule",
9618
+ "type": "addInterfaceRule",
8440
9619
  },
8441
9620
  ],
8442
9621
  },
@@ -8456,7 +9635,7 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
8456
9635
  },
8457
9636
  },
8458
9637
  "parameterValidations": {
8459
- "id": {
9638
+ "com.palantir.property1": {
8460
9639
  "conditionalOverrides": [],
8461
9640
  "defaultValidation": {
8462
9641
  "display": {
@@ -8478,23 +9657,166 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
8478
9657
  "type": "text",
8479
9658
  },
8480
9659
  "required": {
8481
- "notRequired": {},
8482
- "type": "notRequired",
9660
+ "required": {},
9661
+ "type": "required",
9662
+ },
9663
+ },
9664
+ },
9665
+ },
9666
+ "objectTypeParameter": {
9667
+ "conditionalOverrides": [],
9668
+ "defaultValidation": {
9669
+ "display": {
9670
+ "renderHint": {
9671
+ "dropdown": {},
9672
+ "type": "dropdown",
8483
9673
  },
9674
+ "visibility": {
9675
+ "editable": {},
9676
+ "type": "editable",
9677
+ },
9678
+ },
9679
+ "validation": {
9680
+ "allowedValues": {
9681
+ "objectTypeReference": {
9682
+ "objectTypeReference": {
9683
+ "interfaceTypeRids": [
9684
+ "com.palantir.exampleInterface",
9685
+ ],
9686
+ },
9687
+ "type": "objectTypeReference",
9688
+ },
9689
+ "type": "objectTypeReference",
9690
+ },
9691
+ "required": {
9692
+ "required": {},
9693
+ "type": "required",
9694
+ },
9695
+ },
9696
+ },
9697
+ },
9698
+ },
9699
+ "sectionValidations": {},
9700
+ },
9701
+ },
9702
+ "metadata": {
9703
+ "apiName": "com.palantir.create-example-interface",
9704
+ "displayMetadata": {
9705
+ "configuration": {
9706
+ "defaultLayout": "FORM",
9707
+ "displayAndFormat": {
9708
+ "table": {
9709
+ "columnWidthByParameterRid": {},
9710
+ "enableFileImport": true,
9711
+ "fitHorizontally": false,
9712
+ "frozenColumnCount": 0,
9713
+ "rowHeightInLines": 1,
9714
+ },
9715
+ },
9716
+ "enableLayoutUserSwitch": false,
9717
+ },
9718
+ "description": "",
9719
+ "displayName": "Create exampleInterface",
9720
+ "icon": {
9721
+ "blueprint": {
9722
+ "color": "#000000",
9723
+ "locator": "edit",
9724
+ },
9725
+ "type": "blueprint",
9726
+ },
9727
+ "successMessage": [],
9728
+ "typeClasses": [],
9729
+ },
9730
+ "entities": {
9731
+ "affectedInterfaceTypes": [
9732
+ "com.palantir.exampleInterface",
9733
+ ],
9734
+ "affectedLinkTypes": [],
9735
+ "affectedObjectTypes": [],
9736
+ "typeGroups": [],
9737
+ },
9738
+ "formContentOrdering": [],
9739
+ "parameterOrdering": [
9740
+ "objectTypeParameter",
9741
+ "com.palantir.property1",
9742
+ ],
9743
+ "parameters": {
9744
+ "com.palantir.property1": {
9745
+ "displayMetadata": {
9746
+ "description": "",
9747
+ "displayName": "property1",
9748
+ "typeClasses": [],
9749
+ },
9750
+ "id": "com.palantir.property1",
9751
+ "type": {
9752
+ "string": {},
9753
+ "type": "string",
9754
+ },
9755
+ },
9756
+ "objectTypeParameter": {
9757
+ "displayMetadata": {
9758
+ "description": "",
9759
+ "displayName": "Object type to create",
9760
+ "typeClasses": [],
9761
+ },
9762
+ "id": "objectTypeParameter",
9763
+ "type": {
9764
+ "objectTypeReference": {
9765
+ "interfaceTypeRids": [
9766
+ "com.palantir.exampleInterface",
9767
+ ],
9768
+ },
9769
+ "type": "objectTypeReference",
9770
+ },
9771
+ },
9772
+ },
9773
+ "sections": {},
9774
+ "status": {
9775
+ "active": {},
9776
+ "type": "active",
9777
+ },
9778
+ },
9779
+ },
9780
+ },
9781
+ "com.palantir.modify-example-interface": {
9782
+ "actionType": {
9783
+ "actionTypeLogic": {
9784
+ "logic": {
9785
+ "rules": [
9786
+ {
9787
+ "modifyInterfaceRule": {
9788
+ "interfaceObjectToModifyParameter": "interfaceObjectToModifyParameter",
9789
+ "sharedPropertyValues": {
9790
+ "com.palantir.property1": {
9791
+ "parameterId": "com.palantir.property1",
9792
+ "type": "parameterId",
9793
+ },
9794
+ },
9795
+ },
9796
+ "type": "modifyInterfaceRule",
9797
+ },
9798
+ ],
9799
+ },
9800
+ "validation": {
9801
+ "actionTypeLevelValidation": {
9802
+ "rules": {
9803
+ "0": {
9804
+ "condition": {
9805
+ "true": {},
9806
+ "type": "true",
9807
+ },
9808
+ "displayMetadata": {
9809
+ "failureMessage": "",
9810
+ "typeClasses": [],
8484
9811
  },
8485
9812
  },
8486
9813
  },
8487
- "managedBy": {
9814
+ },
9815
+ "parameterValidations": {
9816
+ "com.palantir.property1": {
8488
9817
  "conditionalOverrides": [],
8489
9818
  "defaultValidation": {
8490
9819
  "display": {
8491
- "prefill": {
8492
- "objectParameterPropertyValue": {
8493
- "parameterId": "myManager",
8494
- "propertyTypeId": "id",
8495
- },
8496
- "type": "objectParameterPropertyValue",
8497
- },
8498
9820
  "renderHint": {
8499
9821
  "textInput": {},
8500
9822
  "type": "textInput",
@@ -8513,13 +9835,13 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
8513
9835
  "type": "text",
8514
9836
  },
8515
9837
  "required": {
8516
- "notRequired": {},
8517
- "type": "notRequired",
9838
+ "required": {},
9839
+ "type": "required",
8518
9840
  },
8519
9841
  },
8520
9842
  },
8521
9843
  },
8522
- "myManager": {
9844
+ "interfaceObjectToModifyParameter": {
8523
9845
  "conditionalOverrides": [],
8524
9846
  "defaultValidation": {
8525
9847
  "display": {
@@ -8534,15 +9856,15 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
8534
9856
  },
8535
9857
  "validation": {
8536
9858
  "allowedValues": {
8537
- "objectQuery": {
8538
- "objectQuery": {},
8539
- "type": "objectQuery",
9859
+ "interfaceObjectQuery": {
9860
+ "interfaceObjectQuery": {},
9861
+ "type": "interfaceObjectQuery",
8540
9862
  },
8541
- "type": "objectQuery",
9863
+ "type": "interfaceObjectQuery",
8542
9864
  },
8543
9865
  "required": {
8544
- "notRequired": {},
8545
- "type": "notRequired",
9866
+ "required": {},
9867
+ "type": "required",
8546
9868
  },
8547
9869
  },
8548
9870
  },
@@ -8552,7 +9874,7 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
8552
9874
  },
8553
9875
  },
8554
9876
  "metadata": {
8555
- "apiName": "com.palantir.create-object-employee",
9877
+ "apiName": "com.palantir.modify-example-interface",
8556
9878
  "displayMetadata": {
8557
9879
  "configuration": {
8558
9880
  "defaultLayout": "FORM",
@@ -8568,7 +9890,7 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
8568
9890
  "enableLayoutUserSwitch": false,
8569
9891
  },
8570
9892
  "description": "",
8571
- "displayName": "Create Employee",
9893
+ "displayName": "Modify exampleInterface",
8572
9894
  "icon": {
8573
9895
  "blueprint": {
8574
9896
  "color": "#000000",
@@ -8580,320 +9902,173 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
8580
9902
  "typeClasses": [],
8581
9903
  },
8582
9904
  "entities": {
8583
- "affectedInterfaceTypes": [],
8584
- "affectedLinkTypes": [],
8585
- "affectedObjectTypes": [
8586
- "com.palantir.employee",
9905
+ "affectedInterfaceTypes": [
9906
+ "com.palantir.exampleInterface",
8587
9907
  ],
9908
+ "affectedLinkTypes": [],
9909
+ "affectedObjectTypes": [],
8588
9910
  "typeGroups": [],
8589
9911
  },
8590
9912
  "formContentOrdering": [],
8591
9913
  "parameterOrdering": [
8592
- "myManager",
8593
- "id",
8594
- "managedBy",
9914
+ "interfaceObjectToModifyParameter",
9915
+ "com.palantir.property1",
8595
9916
  ],
8596
9917
  "parameters": {
8597
- "id": {
8598
- "displayMetadata": {
8599
- "description": "",
8600
- "displayName": "ID",
8601
- "typeClasses": [],
8602
- },
8603
- "id": "id",
8604
- "type": {
8605
- "string": {},
8606
- "type": "string",
8607
- },
8608
- },
8609
- "managedBy": {
9918
+ "com.palantir.property1": {
8610
9919
  "displayMetadata": {
8611
9920
  "description": "",
8612
- "displayName": "ManagedBy",
9921
+ "displayName": "property1",
8613
9922
  "typeClasses": [],
8614
9923
  },
8615
- "id": "managedBy",
9924
+ "id": "com.palantir.property1",
8616
9925
  "type": {
8617
9926
  "string": {},
8618
9927
  "type": "string",
8619
9928
  },
8620
9929
  },
8621
- "myManager": {
9930
+ "interfaceObjectToModifyParameter": {
8622
9931
  "displayMetadata": {
8623
9932
  "description": "",
8624
- "displayName": "MyManager",
9933
+ "displayName": "Object type to modify",
8625
9934
  "typeClasses": [],
8626
9935
  },
8627
- "id": "myManager",
9936
+ "id": "interfaceObjectToModifyParameter",
8628
9937
  "type": {
8629
- "objectReference": {
8630
- "objectTypeId": "com.palantir.manager",
8631
- },
8632
- "type": "objectReference",
8633
- },
8634
- },
8635
- },
8636
- "sections": {},
8637
- "status": {
8638
- "active": {},
8639
- "type": "active",
8640
- },
8641
- },
8642
- },
8643
- },
8644
- },
8645
- "blockPermissionInformation": {
8646
- "actionTypes": {},
8647
- "linkTypes": {},
8648
- "objectTypes": {},
8649
- },
8650
- "interfaceTypes": {},
8651
- "linkTypes": {},
8652
- "objectTypes": {
8653
- "com.palantir.employee": {
8654
- "datasources": [
8655
- {
8656
- "datasource": {
8657
- "datasetV2": {
8658
- "datasetRid": "com.palantir.employee",
8659
- "propertyMapping": {
8660
- "id": {
8661
- "column": "id",
8662
- "type": "column",
8663
- },
8664
- "managedBy": {
8665
- "column": "managedBy",
8666
- "type": "column",
8667
- },
8668
- },
8669
- },
8670
- "type": "datasetV2",
8671
- },
8672
- "editsConfiguration": {
8673
- "onlyAllowPrivilegedEdits": false,
8674
- },
8675
- "redacted": false,
8676
- "rid": "ri.ontology.main.datasource.com.palantir.employee",
8677
- },
8678
- ],
8679
- "entityMetadata": {
8680
- "arePatchesEnabled": false,
8681
- },
8682
- "objectType": {
8683
- "allImplementsInterfaces": {},
8684
- "apiName": "com.palantir.employee",
8685
- "displayMetadata": {
8686
- "description": undefined,
8687
- "displayName": "Employee",
8688
- "groupDisplayName": undefined,
8689
- "icon": {
8690
- "blueprint": {
8691
- "color": "#2D72D2",
8692
- "locator": "cube",
8693
- },
8694
- "type": "blueprint",
8695
- },
8696
- "pluralDisplayName": "Employees",
8697
- "visibility": "NORMAL",
8698
- },
8699
- "implementsInterfaces2": [],
8700
- "primaryKeys": [
8701
- "id",
8702
- ],
8703
- "propertyTypes": {
8704
- "id": {
8705
- "apiName": "id",
8706
- "baseFormatter": undefined,
8707
- "dataConstraints": undefined,
8708
- "displayMetadata": {
8709
- "description": "dummy",
8710
- "displayName": "ID",
8711
- "visibility": "NORMAL",
8712
- },
8713
- "indexedForSearch": true,
8714
- "inlineAction": undefined,
8715
- "ruleSetBinding": undefined,
8716
- "sharedPropertyTypeApiName": undefined,
8717
- "sharedPropertyTypeRid": undefined,
8718
- "status": {
8719
- "active": {},
8720
- "type": "active",
8721
- },
8722
- "type": {
8723
- "string": {
8724
- "analyzerOverride": undefined,
8725
- "enableAsciiFolding": undefined,
8726
- "isLongText": false,
8727
- "supportsEfficientLeadingWildcard": false,
8728
- "supportsExactMatching": true,
8729
- },
8730
- "type": "string",
8731
- },
8732
- "typeClasses": [
8733
- {
8734
- "kind": "render_hint",
8735
- "name": "SELECTABLE",
8736
- },
8737
- {
8738
- "kind": "render_hint",
8739
- "name": "SORTABLE",
8740
- },
8741
- ],
8742
- "valueType": undefined,
8743
- },
8744
- "managedBy": {
8745
- "apiName": "managedBy",
8746
- "baseFormatter": undefined,
8747
- "dataConstraints": undefined,
8748
- "displayMetadata": {
8749
- "description": undefined,
8750
- "displayName": "ManagedBy",
8751
- "visibility": "NORMAL",
8752
- },
8753
- "indexedForSearch": true,
8754
- "inlineAction": undefined,
8755
- "ruleSetBinding": undefined,
8756
- "sharedPropertyTypeApiName": undefined,
8757
- "sharedPropertyTypeRid": undefined,
8758
- "status": {
8759
- "active": {},
8760
- "type": "active",
8761
- },
8762
- "type": {
8763
- "string": {
8764
- "analyzerOverride": undefined,
8765
- "enableAsciiFolding": undefined,
8766
- "isLongText": false,
8767
- "supportsEfficientLeadingWildcard": false,
8768
- "supportsExactMatching": true,
8769
- },
8770
- "type": "string",
8771
- },
8772
- "typeClasses": [
8773
- {
8774
- "kind": "render_hint",
8775
- "name": "SELECTABLE",
8776
- },
8777
- {
8778
- "kind": "render_hint",
8779
- "name": "SORTABLE",
8780
- },
8781
- ],
8782
- "valueType": undefined,
8783
- },
8784
- },
8785
- "redacted": false,
8786
- "status": {
8787
- "active": {},
8788
- "type": "active",
8789
- },
8790
- "titlePropertyTypeRid": "id",
8791
- },
8792
- },
8793
- "com.palantir.manager": {
8794
- "datasources": [
8795
- {
8796
- "datasource": {
8797
- "datasetV2": {
8798
- "datasetRid": "com.palantir.manager",
8799
- "propertyMapping": {
8800
- "id": {
8801
- "column": "id",
8802
- "type": "column",
9938
+ "interfaceReference": {
9939
+ "interfaceTypeRid": "com.palantir.exampleInterface",
8803
9940
  },
9941
+ "type": "interfaceReference",
8804
9942
  },
8805
9943
  },
8806
- "type": "datasetV2",
8807
9944
  },
8808
- "editsConfiguration": {
8809
- "onlyAllowPrivilegedEdits": false,
9945
+ "sections": {},
9946
+ "status": {
9947
+ "active": {},
9948
+ "type": "active",
8810
9949
  },
8811
- "redacted": false,
8812
- "rid": "ri.ontology.main.datasource.com.palantir.manager",
8813
9950
  },
8814
- ],
8815
- "entityMetadata": {
8816
- "arePatchesEnabled": true,
8817
9951
  },
8818
- "objectType": {
8819
- "allImplementsInterfaces": {},
8820
- "apiName": "com.palantir.manager",
9952
+ },
9953
+ },
9954
+ "blockPermissionInformation": {
9955
+ "actionTypes": {},
9956
+ "linkTypes": {},
9957
+ "objectTypes": {},
9958
+ },
9959
+ "interfaceTypes": {
9960
+ "com.palantir.exampleInterface": {
9961
+ "interfaceType": {
9962
+ "apiName": "com.palantir.exampleInterface",
8821
9963
  "displayMetadata": {
8822
- "description": undefined,
8823
- "displayName": "Manager",
8824
- "groupDisplayName": undefined,
9964
+ "description": "exampleInterface",
9965
+ "displayName": "exampleInterface",
8825
9966
  "icon": {
8826
9967
  "blueprint": {
8827
- "color": "#2D72D2",
8828
- "locator": "cube",
9968
+ "color": "#4C90F0",
9969
+ "locator": "layout-hierarchy",
8829
9970
  },
8830
9971
  "type": "blueprint",
8831
9972
  },
8832
- "pluralDisplayName": "Managers",
8833
- "visibility": "NORMAL",
8834
9973
  },
8835
- "implementsInterfaces2": [],
8836
- "primaryKeys": [
8837
- "id",
8838
- ],
8839
- "propertyTypes": {
8840
- "id": {
8841
- "apiName": "id",
8842
- "baseFormatter": undefined,
8843
- "dataConstraints": undefined,
8844
- "displayMetadata": {
8845
- "description": "dummy",
8846
- "displayName": "ID",
8847
- "visibility": "NORMAL",
8848
- },
8849
- "indexedForSearch": true,
8850
- "inlineAction": undefined,
8851
- "ruleSetBinding": undefined,
8852
- "sharedPropertyTypeApiName": undefined,
8853
- "sharedPropertyTypeRid": undefined,
8854
- "status": {
8855
- "active": {},
8856
- "type": "active",
8857
- },
8858
- "type": {
8859
- "string": {
8860
- "analyzerOverride": undefined,
8861
- "enableAsciiFolding": undefined,
8862
- "isLongText": false,
8863
- "supportsEfficientLeadingWildcard": false,
8864
- "supportsExactMatching": true,
8865
- },
8866
- "type": "string",
8867
- },
8868
- "typeClasses": [
8869
- {
8870
- "kind": "render_hint",
8871
- "name": "SELECTABLE",
9974
+ "extendsInterfaces": [],
9975
+ "links": [],
9976
+ "properties": [],
9977
+ "propertiesV2": {
9978
+ "com.palantir.property1": {
9979
+ "required": true,
9980
+ "sharedPropertyType": {
9981
+ "aliases": [],
9982
+ "apiName": "com.palantir.property1",
9983
+ "baseFormatter": undefined,
9984
+ "dataConstraints": undefined,
9985
+ "displayMetadata": {
9986
+ "description": undefined,
9987
+ "displayName": "property1",
9988
+ "visibility": "NORMAL",
8872
9989
  },
8873
- {
8874
- "kind": "render_hint",
8875
- "name": "SORTABLE",
9990
+ "gothamMapping": undefined,
9991
+ "indexedForSearch": true,
9992
+ "type": {
9993
+ "string": {
9994
+ "analyzerOverride": undefined,
9995
+ "enableAsciiFolding": undefined,
9996
+ "isLongText": false,
9997
+ "supportsEfficientLeadingWildcard": false,
9998
+ "supportsExactMatching": true,
9999
+ },
10000
+ "type": "string",
8876
10001
  },
8877
- ],
8878
- "valueType": undefined,
10002
+ "typeClasses": [
10003
+ {
10004
+ "kind": "render_hint",
10005
+ "name": "SELECTABLE",
10006
+ },
10007
+ {
10008
+ "kind": "render_hint",
10009
+ "name": "SORTABLE",
10010
+ },
10011
+ ],
10012
+ "valueType": undefined,
10013
+ },
8879
10014
  },
8880
10015
  },
8881
- "redacted": false,
10016
+ "propertiesV3": {},
10017
+ "searchable": true,
8882
10018
  "status": {
8883
10019
  "active": {},
8884
10020
  "type": "active",
8885
10021
  },
8886
- "titlePropertyTypeRid": "id",
8887
10022
  },
8888
10023
  },
8889
10024
  },
8890
- "sharedPropertyTypes": {},
10025
+ "linkTypes": {},
10026
+ "objectTypes": {},
10027
+ "sharedPropertyTypes": {
10028
+ "com.palantir.property1": {
10029
+ "sharedPropertyType": {
10030
+ "aliases": [],
10031
+ "apiName": "com.palantir.property1",
10032
+ "baseFormatter": undefined,
10033
+ "dataConstraints": undefined,
10034
+ "displayMetadata": {
10035
+ "description": undefined,
10036
+ "displayName": "property1",
10037
+ "visibility": "NORMAL",
10038
+ },
10039
+ "gothamMapping": undefined,
10040
+ "indexedForSearch": true,
10041
+ "type": {
10042
+ "string": {
10043
+ "analyzerOverride": undefined,
10044
+ "enableAsciiFolding": undefined,
10045
+ "isLongText": false,
10046
+ "supportsEfficientLeadingWildcard": false,
10047
+ "supportsExactMatching": true,
10048
+ },
10049
+ "type": "string",
10050
+ },
10051
+ "typeClasses": [
10052
+ {
10053
+ "kind": "render_hint",
10054
+ "name": "SELECTABLE",
10055
+ },
10056
+ {
10057
+ "kind": "render_hint",
10058
+ "name": "SORTABLE",
10059
+ },
10060
+ ],
10061
+ "valueType": undefined,
10062
+ },
10063
+ },
10064
+ },
8891
10065
  },
10066
+ "randomnessKey": undefined,
8892
10067
  "valueTypes": {
8893
10068
  "valueTypes": [],
8894
10069
  },
8895
10070
  }
8896
- `);});it("Simple interface actions (without object types) are properly defined",()=>{const exampleInterface=defineInterface({apiName:"exampleInterface",properties:{property1:"string"}});defineCreateInterfaceObjectAction(exampleInterface);defineModifyInterfaceObjectAction(exampleInterface);expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
10071
+ `);});it("Interface actions with customizations are properly defined",()=>{const exampleInterface=defineInterface({apiName:"exampleInterface",properties:{property1:"string",property2:"string"}});defineCreateInterfaceObjectAction({interfaceType:exampleInterface,excludedProperties:["property2"]});defineModifyInterfaceObjectAction({interfaceType:exampleInterface,excludedProperties:["property2"]});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
8897
10072
  {
8898
10073
  "importedOntology": {
8899
10074
  "actionTypes": {},
@@ -9276,6 +10451,13 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
9276
10451
  "displayMetadata": {
9277
10452
  "description": "exampleInterface",
9278
10453
  "displayName": "exampleInterface",
10454
+ "icon": {
10455
+ "blueprint": {
10456
+ "color": "#4C90F0",
10457
+ "locator": "layout-hierarchy",
10458
+ },
10459
+ "type": "blueprint",
10460
+ },
9279
10461
  },
9280
10462
  "extendsInterfaces": [],
9281
10463
  "links": [],
@@ -9318,6 +10500,43 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
9318
10500
  "valueType": undefined,
9319
10501
  },
9320
10502
  },
10503
+ "com.palantir.property2": {
10504
+ "required": true,
10505
+ "sharedPropertyType": {
10506
+ "aliases": [],
10507
+ "apiName": "com.palantir.property2",
10508
+ "baseFormatter": undefined,
10509
+ "dataConstraints": undefined,
10510
+ "displayMetadata": {
10511
+ "description": undefined,
10512
+ "displayName": "property2",
10513
+ "visibility": "NORMAL",
10514
+ },
10515
+ "gothamMapping": undefined,
10516
+ "indexedForSearch": true,
10517
+ "type": {
10518
+ "string": {
10519
+ "analyzerOverride": undefined,
10520
+ "enableAsciiFolding": undefined,
10521
+ "isLongText": false,
10522
+ "supportsEfficientLeadingWildcard": false,
10523
+ "supportsExactMatching": true,
10524
+ },
10525
+ "type": "string",
10526
+ },
10527
+ "typeClasses": [
10528
+ {
10529
+ "kind": "render_hint",
10530
+ "name": "SELECTABLE",
10531
+ },
10532
+ {
10533
+ "kind": "render_hint",
10534
+ "name": "SORTABLE",
10535
+ },
10536
+ ],
10537
+ "valueType": undefined,
10538
+ },
10539
+ },
9321
10540
  },
9322
10541
  "propertiesV3": {},
9323
10542
  "searchable": true,
@@ -9367,8 +10586,45 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
9367
10586
  "valueType": undefined,
9368
10587
  },
9369
10588
  },
10589
+ "com.palantir.property2": {
10590
+ "sharedPropertyType": {
10591
+ "aliases": [],
10592
+ "apiName": "com.palantir.property2",
10593
+ "baseFormatter": undefined,
10594
+ "dataConstraints": undefined,
10595
+ "displayMetadata": {
10596
+ "description": undefined,
10597
+ "displayName": "property2",
10598
+ "visibility": "NORMAL",
10599
+ },
10600
+ "gothamMapping": undefined,
10601
+ "indexedForSearch": true,
10602
+ "type": {
10603
+ "string": {
10604
+ "analyzerOverride": undefined,
10605
+ "enableAsciiFolding": undefined,
10606
+ "isLongText": false,
10607
+ "supportsEfficientLeadingWildcard": false,
10608
+ "supportsExactMatching": true,
10609
+ },
10610
+ "type": "string",
10611
+ },
10612
+ "typeClasses": [
10613
+ {
10614
+ "kind": "render_hint",
10615
+ "name": "SELECTABLE",
10616
+ },
10617
+ {
10618
+ "kind": "render_hint",
10619
+ "name": "SORTABLE",
10620
+ },
10621
+ ],
10622
+ "valueType": undefined,
10623
+ },
10624
+ },
9370
10625
  },
9371
10626
  },
10627
+ "randomnessKey": undefined,
9372
10628
  "valueTypes": {
9373
10629
  "valueTypes": [],
9374
10630
  },
@@ -9629,11 +10885,11 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
9629
10885
  },
9630
10886
  "type": "datasetV2",
9631
10887
  },
10888
+ "datasourceName": "com.palantir.sampleObject",
9632
10889
  "editsConfiguration": {
9633
10890
  "onlyAllowPrivilegedEdits": false,
9634
10891
  },
9635
10892
  "redacted": false,
9636
- "rid": "ri.ontology.main.datasource.com.palantir.sampleObject",
9637
10893
  },
9638
10894
  ],
9639
10895
  "entityMetadata": {
@@ -9753,6 +11009,7 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
9753
11009
  },
9754
11010
  "sharedPropertyTypes": {},
9755
11011
  },
11012
+ "randomnessKey": undefined,
9756
11013
  "valueTypes": {
9757
11014
  "valueTypes": [],
9758
11015
  },
@@ -10013,11 +11270,11 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
10013
11270
  },
10014
11271
  "type": "datasetV2",
10015
11272
  },
11273
+ "datasourceName": "com.palantir.sampleObject",
10016
11274
  "editsConfiguration": {
10017
11275
  "onlyAllowPrivilegedEdits": false,
10018
11276
  },
10019
11277
  "redacted": false,
10020
- "rid": "ri.ontology.main.datasource.com.palantir.sampleObject",
10021
11278
  },
10022
11279
  ],
10023
11280
  "entityMetadata": {
@@ -10137,6 +11394,7 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
10137
11394
  },
10138
11395
  "sharedPropertyTypes": {},
10139
11396
  },
11397
+ "randomnessKey": undefined,
10140
11398
  "valueTypes": {
10141
11399
  "valueTypes": [],
10142
11400
  },
@@ -10757,11 +12015,11 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
10757
12015
  },
10758
12016
  "type": "datasetV2",
10759
12017
  },
12018
+ "datasourceName": "com.palantir.objectWithArrays",
10760
12019
  "editsConfiguration": {
10761
12020
  "onlyAllowPrivilegedEdits": false,
10762
12021
  },
10763
12022
  "redacted": false,
10764
- "rid": "ri.ontology.main.datasource.com.palantir.objectWithArrays",
10765
12023
  },
10766
12024
  ],
10767
12025
  "entityMetadata": {
@@ -10965,6 +12223,7 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
10965
12223
  },
10966
12224
  "sharedPropertyTypes": {},
10967
12225
  },
12226
+ "randomnessKey": undefined,
10968
12227
  "valueTypes": {
10969
12228
  "valueTypes": [],
10970
12229
  },
@@ -11271,11 +12530,11 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
11271
12530
  },
11272
12531
  "type": "datasetV2",
11273
12532
  },
12533
+ "datasourceName": "com.palantir.sampleObject",
11274
12534
  "editsConfiguration": {
11275
12535
  "onlyAllowPrivilegedEdits": false,
11276
12536
  },
11277
12537
  "redacted": false,
11278
- "rid": "ri.ontology.main.datasource.com.palantir.sampleObject",
11279
12538
  },
11280
12539
  ],
11281
12540
  "entityMetadata": {
@@ -11395,6 +12654,7 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
11395
12654
  },
11396
12655
  "sharedPropertyTypes": {},
11397
12656
  },
12657
+ "randomnessKey": undefined,
11398
12658
  "valueTypes": {
11399
12659
  "valueTypes": [],
11400
12660
  },
@@ -11706,11 +12966,11 @@ parameterOrdering:["foo","id"]});}).toThrowErrorMatchingInlineSnapshot(`[Error:
11706
12966
  },
11707
12967
  "type": "datasetV2",
11708
12968
  },
12969
+ "datasourceName": "com.palantir.sampleObject",
11709
12970
  "editsConfiguration": {
11710
12971
  "onlyAllowPrivilegedEdits": false,
11711
12972
  },
11712
12973
  "redacted": false,
11713
- "rid": "ri.ontology.main.datasource.com.palantir.sampleObject",
11714
12974
  },
11715
12975
  ],
11716
12976
  "entityMetadata": {
@@ -11870,11 +13130,12 @@ parameterOrdering:["foo","id"]});}).toThrowErrorMatchingInlineSnapshot(`[Error:
11870
13130
  },
11871
13131
  "sharedPropertyTypes": {},
11872
13132
  },
13133
+ "randomnessKey": undefined,
11873
13134
  "valueTypes": {
11874
13135
  "valueTypes": [],
11875
13136
  },
11876
13137
  }
11877
- `);});});describe("Imports",()=>{it("Legacy importing works",()=>{const id=importSharedPropertyType({apiName:"id",packageName:"com.palantir.core.ontology.types",typeHint:"string"});defineInterface({apiName:"myInterface",properties:{id}});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
13138
+ `);});it("Interface actions validate SPT existence",()=>{const spt=defineSharedPropertyType({apiName:"spt",type:"string"});const importedInterface={"apiName":"com.palantir.other.ontology.event.Event","displayMetadata":{"displayName":"Event","description":"Event","icon":{"type":"blueprint","blueprint":{"color":"#4C90F0","locator":"timeline-events"}}},"extendsInterfaces":[],"links":[],"status":{"type":"active","active":{}},"propertiesV2":{"com.palantir.other.ontology.types.id":{"required":true,"sharedPropertyType":{"displayName":"Id","apiName":"com.palantir.other.ontology.types.id","type":"string","nonNameSpacedApiName":"id","typeClasses":[{"kind":"render_hint","name":"SELECTABLE"},{"kind":"render_hint","name":"SORTABLE"}],"__type":"SHARED_PROPERTY_TYPE"}}},"searchable":false,"__type":"INTERFACE_TYPE"};importOntologyEntity(importedInterface);const interfaceType=defineInterface({apiName:"interfaceType",properties:{spt},extends:importedInterface});expect(()=>defineAction({apiName:"action",displayName:"action",status:"active",parameters:[{id:"interfaceObjectToModifyParameter",displayName:"Interface object to modify",type:{type:"interfaceReference",interfaceReference:{interfaceTypeRid:interfaceType.apiName}},validation:{required:true,allowedValues:{type:"interfaceObjectQuery"}}},{id:"sptParameter",displayName:"SPT",type:"string",validation:{required:true,allowedValues:{type:"text"}}},{id:"otherParameter",displayName:"Other parameter",type:"string",validation:{required:true,allowedValues:{type:"text"}}}],rules:[{type:"modifyInterfaceRule",modifyInterfaceRule:{interfaceObjectToModifyParameter:"interfaceObjectToModifyParameter",sharedPropertyValues:{spt:{type:"parameterId",parameterId:"sptParameter"},"com.palantir.other.invalid.spt":{type:"staticValue",staticValue:{type:"double",double:4}},other:{type:"parameterId",parameterId:"otherParameter"}}}}]})).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Shared property type com.palantir.other.invalid.spt does not exist in interface type com.palantir.interfaceType]`);expect(()=>defineCreateInterfaceObjectAction({interfaceType:interfaceType})).not.toThrow();});it("Interface actions validate SPT existence on the interface",()=>{expect(()=>{const spt=defineSharedPropertyType({apiName:"spt",type:"string"});const pulseRepetitionIntervalSecs={"apiName":"com.palantir.other.ontology.pulseRepetitionIntervalSecs","displayName":"Pulse Repetition Interval (s)","description":"Pulse Repetition Interval in seconds.","type":"double","nonNameSpacedApiName":"pulseRepetitionIntervalSecs","typeClasses":[],"__type":OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE};importOntologyEntity(pulseRepetitionIntervalSecs);const interfaceType=defineInterface({apiName:"interfaceType",properties:{spt}});defineAction({apiName:"action",displayName:"action",status:"active",parameters:[{id:"interfaceObjectToModifyParameter",displayName:"Interface object to modify",type:{type:"interfaceReference",interfaceReference:{interfaceTypeRid:interfaceType.apiName}},validation:{required:true,allowedValues:{type:"interfaceObjectQuery"}}},{id:"sptParameter",displayName:"SPT",type:"string",validation:{required:true,allowedValues:{type:"text"}}}],rules:[{type:"modifyInterfaceRule",modifyInterfaceRule:{interfaceObjectToModifyParameter:"interfaceObjectToModifyParameter",sharedPropertyValues:{spt:{type:"parameterId",parameterId:"sptParameter"},[pulseRepetitionIntervalSecs.apiName]:{type:"staticValue",staticValue:{type:"double",double:4}}}}}]});}).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Shared property type com.palantir.other.ontology.pulseRepetitionIntervalSecs does not exist in interface type com.palantir.interfaceType]`);});});describe("Imports",()=>{it("Legacy importing works",()=>{const id=importSharedPropertyType({apiName:"id",packageName:"com.palantir.core.ontology.types",typeHint:"string"});defineInterface({apiName:"myInterface",properties:{id}});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
11878
13139
  {
11879
13140
  "importedOntology": {
11880
13141
  "actionTypes": {},
@@ -11933,6 +13194,13 @@ parameterOrdering:["foo","id"]});}).toThrowErrorMatchingInlineSnapshot(`[Error:
11933
13194
  "displayMetadata": {
11934
13195
  "description": "myInterface",
11935
13196
  "displayName": "myInterface",
13197
+ "icon": {
13198
+ "blueprint": {
13199
+ "color": "#4C90F0",
13200
+ "locator": "layout-hierarchy",
13201
+ },
13202
+ "type": "blueprint",
13203
+ },
11936
13204
  },
11937
13205
  "extendsInterfaces": [],
11938
13206
  "links": [],
@@ -11980,6 +13248,7 @@ parameterOrdering:["foo","id"]});}).toThrowErrorMatchingInlineSnapshot(`[Error:
11980
13248
  "objectTypes": {},
11981
13249
  "sharedPropertyTypes": {},
11982
13250
  },
13251
+ "randomnessKey": undefined,
11983
13252
  "valueTypes": {
11984
13253
  "valueTypes": [],
11985
13254
  },
@@ -12044,6 +13313,13 @@ const spt={apiName:"com.other.package.spt",nonNameSpacedApiName:"spt",type:"stri
12044
13313
  "displayMetadata": {
12045
13314
  "description": "myInterface",
12046
13315
  "displayName": "myInterface",
13316
+ "icon": {
13317
+ "blueprint": {
13318
+ "color": "#4C90F0",
13319
+ "locator": "layout-hierarchy",
13320
+ },
13321
+ "type": "blueprint",
13322
+ },
12047
13323
  },
12048
13324
  "extendsInterfaces": [],
12049
13325
  "links": [],
@@ -12091,6 +13367,7 @@ const spt={apiName:"com.other.package.spt",nonNameSpacedApiName:"spt",type:"stri
12091
13367
  "objectTypes": {},
12092
13368
  "sharedPropertyTypes": {},
12093
13369
  },
13370
+ "randomnessKey": undefined,
12094
13371
  "valueTypes": {
12095
13372
  "valueTypes": [],
12096
13373
  },
@@ -12351,6 +13628,13 @@ const spt={apiName:"com.other.package.spt",nonNameSpacedApiName:"spt",type:"stri
12351
13628
  "displayMetadata": {
12352
13629
  "description": "childInterface",
12353
13630
  "displayName": "childInterface",
13631
+ "icon": {
13632
+ "blueprint": {
13633
+ "color": "#4C90F0",
13634
+ "locator": "layout-hierarchy",
13635
+ },
13636
+ "type": "blueprint",
13637
+ },
12354
13638
  },
12355
13639
  "extendsInterfaces": [
12356
13640
  "com.palantir.parentInterface",
@@ -12410,6 +13694,13 @@ const spt={apiName:"com.other.package.spt",nonNameSpacedApiName:"spt",type:"stri
12410
13694
  "displayMetadata": {
12411
13695
  "description": "parentInterface",
12412
13696
  "displayName": "parentInterface",
13697
+ "icon": {
13698
+ "blueprint": {
13699
+ "color": "#4C90F0",
13700
+ "locator": "layout-hierarchy",
13701
+ },
13702
+ "type": "blueprint",
13703
+ },
12413
13704
  },
12414
13705
  "extendsInterfaces": [],
12415
13706
  "links": [],
@@ -12483,11 +13774,11 @@ const spt={apiName:"com.other.package.spt",nonNameSpacedApiName:"spt",type:"stri
12483
13774
  },
12484
13775
  "type": "datasetV2",
12485
13776
  },
13777
+ "datasourceName": "com.palantir.objectDef",
12486
13778
  "editsConfiguration": {
12487
13779
  "onlyAllowPrivilegedEdits": false,
12488
13780
  },
12489
13781
  "redacted": false,
12490
- "rid": "ri.ontology.main.datasource.com.palantir.objectDef",
12491
13782
  },
12492
13783
  ],
12493
13784
  "entityMetadata": {
@@ -12694,6 +13985,7 @@ const spt={apiName:"com.other.package.spt",nonNameSpacedApiName:"spt",type:"stri
12694
13985
  },
12695
13986
  },
12696
13987
  },
13988
+ "randomnessKey": undefined,
12697
13989
  "valueTypes": {
12698
13990
  "valueTypes": [],
12699
13991
  },