@osdk/maker 0.13.0-beta.9 → 0.14.0-beta.2

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 +91 -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 +69 -46
  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 +17 -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 +1987 -691
  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 +13 -4
  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 +88 -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 +1177 -1045
  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 +69 -46
  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 +17 -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 +1987 -691
  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 +13 -4
  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 +88 -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 +4 -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 +4 -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 +5 -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
@@ -0,0 +1,132 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { cleanAndValidateLinkTypeId } from "../../api/defineOntology.js";
18
+ import { convertCardinality } from "./convertCardinality.js";
19
+ export function convertLink(linkType) {
20
+ let definition;
21
+ let datasource = undefined;
22
+ if ("one" in linkType) {
23
+ definition = {
24
+ type: "oneToMany",
25
+ oneToMany: {
26
+ cardinalityHint: convertCardinality(linkType.cardinality),
27
+ manyToOneLinkMetadata: linkType.toMany.metadata,
28
+ objectTypeRidManySide: linkType.toMany.object.apiName,
29
+ objectTypeRidOneSide: linkType.one.object.apiName,
30
+ oneToManyLinkMetadata: linkType.one.metadata,
31
+ oneSidePrimaryKeyToManySidePropertyMapping: [{
32
+ from: {
33
+ apiName: linkType.one.object.primaryKeyPropertyApiName,
34
+ object: linkType.one.object.apiName
35
+ },
36
+ to: {
37
+ apiName: linkType.manyForeignKeyProperty,
38
+ object: linkType.toMany.object.apiName
39
+ }
40
+ }]
41
+ }
42
+ };
43
+ } else if ("intermediaryObjectType" in linkType) {
44
+ definition = {
45
+ type: "intermediary",
46
+ intermediary: {
47
+ objectTypeAToBLinkMetadata: linkType.many.metadata,
48
+ objectTypeBToALinkMetadata: linkType.toMany.metadata,
49
+ objectTypeRidA: linkType.many.object.apiName,
50
+ objectTypeRidB: linkType.toMany.object.apiName,
51
+ intermediaryObjectTypeRid: linkType.intermediaryObjectType.apiName,
52
+ aToIntermediaryLinkTypeRid: cleanAndValidateLinkTypeId(linkType.many.linkToIntermediary.apiName),
53
+ intermediaryToBLinkTypeRid: cleanAndValidateLinkTypeId(linkType.toMany.linkToIntermediary.apiName)
54
+ }
55
+ };
56
+ } else {
57
+ definition = {
58
+ type: "manyToMany",
59
+ manyToMany: {
60
+ objectTypeAToBLinkMetadata: linkType.many.metadata,
61
+ objectTypeBToALinkMetadata: linkType.toMany.metadata,
62
+ objectTypeRidA: linkType.many.object.apiName,
63
+ objectTypeRidB: linkType.toMany.object.apiName,
64
+ peeringMetadata: undefined,
65
+ objectTypeAPrimaryKeyPropertyMapping: [{
66
+ from: {
67
+ apiName: linkType.many.object.primaryKeyPropertyApiName,
68
+ object: linkType.many.object.apiName
69
+ },
70
+ to: {
71
+ apiName: linkType.many.object.primaryKeyPropertyApiName,
72
+ object: linkType.many.object.apiName
73
+ }
74
+ }],
75
+ objectTypeBPrimaryKeyPropertyMapping: [{
76
+ from: {
77
+ apiName: linkType.toMany.object.primaryKeyPropertyApiName,
78
+ object: linkType.toMany.object.apiName
79
+ },
80
+ to: {
81
+ apiName: linkType.toMany.object.primaryKeyPropertyApiName,
82
+ object: linkType.toMany.object.apiName
83
+ }
84
+ }]
85
+ }
86
+ };
87
+ datasource = {
88
+ datasourceName: linkType.apiName,
89
+ datasource: {
90
+ type: "dataset",
91
+ dataset: {
92
+ datasetRid: "link-".concat(linkType.apiName),
93
+ writebackDatasetRid: undefined,
94
+ objectTypeAPrimaryKeyMapping: [{
95
+ property: {
96
+ apiName: linkType.many.object.primaryKeyPropertyApiName,
97
+ object: linkType.many.object.apiName
98
+ },
99
+ column: linkType.many.object.primaryKeyPropertyApiName
100
+ }],
101
+ objectTypeBPrimaryKeyMapping: [{
102
+ property: {
103
+ apiName: linkType.toMany.object.primaryKeyPropertyApiName,
104
+ object: linkType.toMany.object.apiName
105
+ },
106
+ column: linkType.toMany.object.primaryKeyPropertyApiName
107
+ }]
108
+ }
109
+ },
110
+ editsConfiguration: {
111
+ onlyAllowPrivilegedEdits: false
112
+ },
113
+ redacted: linkType.redacted
114
+ };
115
+ }
116
+ return {
117
+ linkType: {
118
+ definition: definition,
119
+ id: cleanAndValidateLinkTypeId(linkType.apiName),
120
+ status: linkType.status ?? {
121
+ type: "active",
122
+ active: {}
123
+ },
124
+ redacted: linkType.redacted ?? false
125
+ },
126
+ datasources: datasource !== undefined ? [datasource] : [],
127
+ entityMetadata: {
128
+ arePatchesEnabled: linkType.editsEnabled ?? false
129
+ }
130
+ };
131
+ }
132
+ //# sourceMappingURL=convertLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertLink.js","names":["cleanAndValidateLinkTypeId","convertCardinality","convertLink","linkType","definition","datasource","undefined","type","oneToMany","cardinalityHint","cardinality","manyToOneLinkMetadata","toMany","metadata","objectTypeRidManySide","object","apiName","objectTypeRidOneSide","one","oneToManyLinkMetadata","oneSidePrimaryKeyToManySidePropertyMapping","from","primaryKeyPropertyApiName","to","manyForeignKeyProperty","intermediary","objectTypeAToBLinkMetadata","many","objectTypeBToALinkMetadata","objectTypeRidA","objectTypeRidB","intermediaryObjectTypeRid","intermediaryObjectType","aToIntermediaryLinkTypeRid","linkToIntermediary","intermediaryToBLinkTypeRid","manyToMany","peeringMetadata","objectTypeAPrimaryKeyPropertyMapping","objectTypeBPrimaryKeyPropertyMapping","datasourceName","dataset","datasetRid","concat","writebackDatasetRid","objectTypeAPrimaryKeyMapping","property","column","objectTypeBPrimaryKeyMapping","editsConfiguration","onlyAllowPrivilegedEdits","redacted","id","status","active","datasources","entityMetadata","arePatchesEnabled","editsEnabled"],"sources":["convertLink.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n OntologyIrLinkDefinition,\n OntologyIrLinkTypeBlockDataV2,\n OntologyIrManyToManyLinkTypeDatasource,\n} from \"@osdk/client.unstable\";\nimport { cleanAndValidateLinkTypeId } from \"../../api/defineOntology.js\";\nimport type { LinkType } from \"../../api/links/LinkType.js\";\nimport { convertCardinality } from \"./convertCardinality.js\";\n\nexport function convertLink(\n linkType: LinkType,\n): OntologyIrLinkTypeBlockDataV2 {\n let definition: OntologyIrLinkDefinition;\n let datasource: OntologyIrManyToManyLinkTypeDatasource | undefined =\n undefined;\n if (\"one\" in linkType) {\n definition = {\n type: \"oneToMany\",\n oneToMany: {\n cardinalityHint: convertCardinality(linkType.cardinality),\n manyToOneLinkMetadata: linkType.toMany.metadata,\n objectTypeRidManySide: linkType.toMany.object.apiName,\n objectTypeRidOneSide: linkType.one.object.apiName,\n oneToManyLinkMetadata: linkType.one.metadata,\n oneSidePrimaryKeyToManySidePropertyMapping: [{\n from: {\n apiName: linkType.one.object.primaryKeyPropertyApiName,\n object: linkType.one.object.apiName,\n },\n to: {\n apiName: linkType.manyForeignKeyProperty,\n object: linkType.toMany.object.apiName,\n },\n }],\n },\n };\n } else if (\"intermediaryObjectType\" in linkType) {\n definition = {\n type: \"intermediary\",\n intermediary: {\n objectTypeAToBLinkMetadata: linkType.many.metadata,\n objectTypeBToALinkMetadata: linkType.toMany.metadata,\n objectTypeRidA: linkType.many.object.apiName,\n objectTypeRidB: linkType.toMany.object.apiName,\n intermediaryObjectTypeRid: linkType.intermediaryObjectType.apiName,\n aToIntermediaryLinkTypeRid: cleanAndValidateLinkTypeId(\n linkType.many.linkToIntermediary.apiName,\n ),\n intermediaryToBLinkTypeRid: cleanAndValidateLinkTypeId(\n linkType.toMany.linkToIntermediary.apiName,\n ),\n },\n };\n } else {\n definition = {\n type: \"manyToMany\",\n manyToMany: {\n objectTypeAToBLinkMetadata: linkType.many.metadata,\n objectTypeBToALinkMetadata: linkType.toMany.metadata,\n objectTypeRidA: linkType.many.object.apiName,\n objectTypeRidB: linkType.toMany.object.apiName,\n peeringMetadata: undefined,\n objectTypeAPrimaryKeyPropertyMapping: [{\n from: {\n apiName: linkType.many.object.primaryKeyPropertyApiName,\n object: linkType.many.object.apiName,\n },\n to: {\n apiName: linkType.many.object.primaryKeyPropertyApiName,\n object: linkType.many.object.apiName,\n },\n }],\n objectTypeBPrimaryKeyPropertyMapping: [{\n from: {\n apiName: linkType.toMany.object.primaryKeyPropertyApiName,\n object: linkType.toMany.object.apiName,\n },\n to: {\n apiName: linkType.toMany.object.primaryKeyPropertyApiName,\n object: linkType.toMany.object.apiName,\n },\n }],\n },\n };\n\n datasource = {\n datasourceName: linkType.apiName,\n datasource: {\n type: \"dataset\",\n dataset: {\n datasetRid: \"link-\".concat(linkType.apiName),\n writebackDatasetRid: undefined,\n objectTypeAPrimaryKeyMapping: [{\n property: {\n apiName: linkType.many.object.primaryKeyPropertyApiName,\n object: linkType.many.object.apiName,\n },\n column: linkType.many.object.primaryKeyPropertyApiName,\n }],\n objectTypeBPrimaryKeyMapping: [{\n property: {\n apiName: linkType.toMany.object.primaryKeyPropertyApiName,\n object: linkType.toMany.object.apiName,\n },\n column: linkType.toMany.object.primaryKeyPropertyApiName,\n }],\n },\n },\n editsConfiguration: {\n onlyAllowPrivilegedEdits: false,\n },\n redacted: linkType.redacted,\n };\n }\n\n return {\n linkType: {\n definition: definition,\n id: cleanAndValidateLinkTypeId(linkType.apiName),\n status: linkType.status ?? { type: \"active\", active: {} },\n redacted: linkType.redacted ?? false,\n },\n datasources: datasource !== undefined ? [datasource] : [],\n entityMetadata: {\n arePatchesEnabled: linkType.editsEnabled ?? false,\n },\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,SAASA,0BAA0B,QAAQ,6BAA6B;AAExE,SAASC,kBAAkB,QAAQ,yBAAyB;AAE5D,OAAO,SAASC,WAAWA,CACzBC,QAAkB,EACa;EAC/B,IAAIC,UAAoC;EACxC,IAAIC,UAA8D,GAChEC,SAAS;EACX,IAAI,KAAK,IAAIH,QAAQ,EAAE;IACrBC,UAAU,GAAG;MACXG,IAAI,EAAE,WAAW;MACjBC,SAAS,EAAE;QACTC,eAAe,EAAER,kBAAkB,CAACE,QAAQ,CAACO,WAAW,CAAC;QACzDC,qBAAqB,EAAER,QAAQ,CAACS,MAAM,CAACC,QAAQ;QAC/CC,qBAAqB,EAAEX,QAAQ,CAACS,MAAM,CAACG,MAAM,CAACC,OAAO;QACrDC,oBAAoB,EAAEd,QAAQ,CAACe,GAAG,CAACH,MAAM,CAACC,OAAO;QACjDG,qBAAqB,EAAEhB,QAAQ,CAACe,GAAG,CAACL,QAAQ;QAC5CO,0CAA0C,EAAE,CAAC;UAC3CC,IAAI,EAAE;YACJL,OAAO,EAAEb,QAAQ,CAACe,GAAG,CAACH,MAAM,CAACO,yBAAyB;YACtDP,MAAM,EAAEZ,QAAQ,CAACe,GAAG,CAACH,MAAM,CAACC;UAC9B,CAAC;UACDO,EAAE,EAAE;YACFP,OAAO,EAAEb,QAAQ,CAACqB,sBAAsB;YACxCT,MAAM,EAAEZ,QAAQ,CAACS,MAAM,CAACG,MAAM,CAACC;UACjC;QACF,CAAC;MACH;IACF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,CAAC;QACH;MACF,CAAC;MACD2B,kBAAkB,EAAE;QAClBC,wBAAwB,EAAE;MAC5B,CAAC;MACDC,QAAQ,EAAEhD,QAAQ,CAACgD;IACrB,CAAC;EACH;EAEA,OAAO;IACLhD,QAAQ,EAAE;MACRC,UAAU,EAAEA,UAAU;MACtBgD,EAAE,EAAEpD,0BAA0B,CAACG,QAAQ,CAACa,OAAO,CAAC;MAChDqC,MAAM,EAAElD,QAAQ,CAACkD,MAAM,IAAI;QAAE9C,IAAI,EAAE,QAAQ;QAAE+C,MAAM,EAAE,CAAC;MAAE,CAAC;MACzDH,QAAQ,EAAEhD,QAAQ,CAACgD,QAAQ,IAAI;IACjC,CAAC;IACDI,WAAW,EAAElD,UAAU,KAAKC,SAAS,GAAG,CAACD,UAAU,CAAC,GAAG,EAAE;IACzDmD,cAAc,EAAE;MACdC,iBAAiB,EAAEtD,QAAQ,CAACuD,YAAY,IAAI;IAC9C;EACF,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,41 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { randomUUID } from "crypto";
18
+ export function convertMappingValue(value) {
19
+ switch (value.type) {
20
+ case "uuid":
21
+ return {
22
+ type: "uniqueIdentifier",
23
+ uniqueIdentifier: {
24
+ linkId: value.linkId ?? randomUUID()
25
+ }
26
+ };
27
+ case "currentTime":
28
+ return {
29
+ type: "currentTime",
30
+ currentTime: {}
31
+ };
32
+ case "currentUser":
33
+ return {
34
+ type: "currentUser",
35
+ currentUser: {}
36
+ };
37
+ default:
38
+ return value;
39
+ }
40
+ }
41
+ //# sourceMappingURL=convertMappingValue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertMappingValue.js","names":["randomUUID","convertMappingValue","value","type","uniqueIdentifier","linkId","currentTime","currentUser"],"sources":["convertMappingValue.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OntologyIrLogicRuleValue } from \"@osdk/client.unstable\";\nimport { randomUUID } from \"crypto\";\nimport type { MappingValue } from \"../../api/action/MappingValue.js\";\n\nexport function convertMappingValue(\n value: MappingValue,\n): OntologyIrLogicRuleValue {\n switch (value.type) {\n case \"uuid\":\n return {\n type: \"uniqueIdentifier\",\n uniqueIdentifier: {\n linkId: value.linkId ?? randomUUID(),\n },\n };\n case \"currentTime\":\n return {\n type: \"currentTime\",\n currentTime: {},\n };\n case \"currentUser\":\n return {\n type: \"currentUser\",\n currentUser: {},\n };\n default:\n return value;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,UAAU,QAAQ,QAAQ;AAGnC,OAAO,SAASC,mBAAmBA,CACjCC,KAAmB,EACO;EAC1B,QAAQA,KAAK,CAACC,IAAI;IAChB,KAAK,MAAM;MACT,OAAO;QACLA,IAAI,EAAE,kBAAkB;QACxBC,gBAAgB,EAAE;UAChBC,MAAM,EAAEH,KAAK,CAACG,MAAM,IAAIL,UAAU,CAAC;QACrC;MACF,CAAC;IACH,KAAK,aAAa;MAChB,OAAO;QACLG,IAAI,EAAE,aAAa;QACnBG,WAAW,EAAE,CAAC;MAChB,CAAC;IACH,KAAK,aAAa;MAChB,OAAO;QACLH,IAAI,EAAE,aAAa;QACnBI,WAAW,EAAE,CAAC;MAChB,CAAC;IACH;MACE,OAAOL,KAAK;EAChB;AACF","ignoreList":[]}
@@ -0,0 +1,43 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import invariant from "tiny-invariant";
18
+ export function convertNullabilityToDataConstraint(prop) {
19
+ if (typeof prop.type === "object" && prop.type.type === "marking") {
20
+ if (prop.nullability === undefined) {
21
+ return {
22
+ propertyTypeConstraints: [],
23
+ nullability: undefined,
24
+ nullabilityV2: {
25
+ noEmptyCollections: true,
26
+ noNulls: true
27
+ }
28
+ };
29
+ }
30
+ !prop.nullability?.noNulls ? process.env.NODE_ENV !== "production" ? invariant(false, "Marking property type has noNulls set to false, marking properties must not be nullable") : invariant(false) : void 0;
31
+ return {
32
+ propertyTypeConstraints: [],
33
+ nullability: undefined,
34
+ nullabilityV2: prop.nullability
35
+ };
36
+ }
37
+ return prop.nullability === undefined ? undefined : {
38
+ propertyTypeConstraints: [],
39
+ nullability: undefined,
40
+ nullabilityV2: prop.nullability
41
+ };
42
+ }
43
+ //# sourceMappingURL=convertNullabilityToDataConstraint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertNullabilityToDataConstraint.js","names":["invariant","convertNullabilityToDataConstraint","prop","type","nullability","undefined","propertyTypeConstraints","nullabilityV2","noEmptyCollections","noNulls","process","env","NODE_ENV"],"sources":["convertNullabilityToDataConstraint.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { DataConstraints } from \"@osdk/client.unstable\";\nimport invariant from \"tiny-invariant\";\nimport type { Nullability } from \"../../api/properties/Nullability.js\";\nimport type { PropertyTypeType } from \"../../api/properties/PropertyTypeType.js\";\n\nexport function convertNullabilityToDataConstraint(\n prop: { type: PropertyTypeType; nullability?: Nullability },\n): DataConstraints | undefined {\n if (typeof prop.type === \"object\" && prop.type.type === \"marking\") {\n if (prop.nullability === undefined) {\n return {\n propertyTypeConstraints: [],\n nullability: undefined,\n nullabilityV2: { noEmptyCollections: true, noNulls: true },\n };\n }\n invariant(\n prop.nullability?.noNulls,\n \"Marking property type has noNulls set to false, marking properties must not be nullable\",\n );\n return {\n propertyTypeConstraints: [],\n nullability: undefined,\n nullabilityV2: prop.nullability,\n };\n }\n return prop.nullability === undefined ? undefined : {\n propertyTypeConstraints: [],\n nullability: undefined,\n nullabilityV2: prop.nullability,\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAOA,SAAS,MAAM,gBAAgB;AAItC,OAAO,SAASC,kCAAkCA,CAChDC,IAA2D,EAC9B;EAC7B,IAAI,OAAOA,IAAI,CAACC,IAAI,KAAK,QAAQ,IAAID,IAAI,CAACC,IAAI,CAACA,IAAI,KAAK,SAAS,EAAE;IACjE,IAAID,IAAI,CAACE,WAAW,KAAKC,SAAS,EAAE;MAClC,OAAO;QACLC,uBAAuB,EAAE,EAAE;QAC3BF,WAAW,EAAEC,SAAS;QACtBE,aAAa,EAAE;UAAEC,kBAAkB,EAAE,IAAI;UAAEC,OAAO,EAAE;QAAK;MAC3D,CAAC;IACH;IACA,CACEP,IAAI,CAACE,WAAW,EAAEK,OAAO,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAD3BZ,SAAS,QAEP,yFAAyF,IAF3FA,SAAS;IAIT,OAAO;MACLM,uBAAuB,EAAE,EAAE;MAC3BF,WAAW,EAAEC,SAAS;MACtBE,aAAa,EAAEL,IAAI,CAACE;IACtB,CAAC;EACH;EACA,OAAOF,IAAI,CAACE,WAAW,KAAKC,SAAS,GAAGA,SAAS,GAAG;IAClDC,uBAAuB,EAAE,EAAE;IAC3BF,WAAW,EAAEC,SAAS;IACtBE,aAAa,EAAEL,IAAI,CAACE;EACtB,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,108 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { addNamespaceIfNone, buildDatasource, convertObjectStatus } from "../../api/defineOntology.js";
18
+ import { isExotic } from "../../api/properties/PropertyTypeType.js";
19
+ import { convertDatasourceDefinition } from "./convertDatasourceDefinition.js";
20
+ import { convertObjectPropertyType } from "./convertObjectPropertyType.js";
21
+ export function convertObject(objectType) {
22
+ const propertyDatasources = (objectType.properties ?? []).flatMap(prop => extractPropertyDatasource(prop, objectType.apiName));
23
+ const classificationGroupMarkingNames = extractMarkingGroups(objectType.properties ?? [], "CBAC");
24
+ const mandatoryMarkingNames = extractMarkingGroups(objectType.properties ?? [], "MANDATORY");
25
+ const classificationInputGroup = classificationGroupMarkingNames.length > 0 ? classificationGroupMarkingNames.reduce((l, r) => l + "/" + r) : undefined;
26
+ const mandatoryInputGroup = mandatoryMarkingNames.length > 0 ? mandatoryMarkingNames.reduce((l, r) => l + "/" + r) : undefined;
27
+ const objectDatasource = buildDatasource(objectType.apiName, convertDatasourceDefinition(objectType, objectType.properties ?? []), classificationInputGroup, mandatoryInputGroup);
28
+ const implementations = objectType.implementsInterfaces ?? [];
29
+ return {
30
+ objectType: {
31
+ displayMetadata: {
32
+ description: objectType.description,
33
+ displayName: objectType.displayName,
34
+ groupDisplayName: undefined,
35
+ icon: {
36
+ type: "blueprint",
37
+ blueprint: objectType.icon ?? {
38
+ locator: "cube",
39
+ color: "#2D72D2"
40
+ }
41
+ },
42
+ pluralDisplayName: objectType.pluralDisplayName,
43
+ visibility: objectType.visibility ?? "NORMAL"
44
+ },
45
+ primaryKeys: [objectType.primaryKeyPropertyApiName],
46
+ propertyTypes: Object.fromEntries(objectType.properties?.map(val => [val.apiName, convertObjectPropertyType(val)]) ?? []),
47
+ titlePropertyTypeRid: objectType.titlePropertyApiName,
48
+ apiName: objectType.apiName,
49
+ status: convertObjectStatus(objectType.status),
50
+ redacted: false,
51
+ implementsInterfaces2: implementations.map(impl => ({
52
+ interfaceTypeApiName: impl.implements.apiName,
53
+ linksV2: {},
54
+ propertiesV2: {},
55
+ properties: Object.fromEntries(impl.propertyMapping.map(mapping => [addNamespaceIfNone(mapping.interfaceProperty), {
56
+ propertyTypeRid: mapping.mapsTo
57
+ }]))
58
+ })),
59
+ allImplementsInterfaces: {}
60
+ },
61
+ datasources: [...propertyDatasources, objectDatasource],
62
+ entityMetadata: {
63
+ arePatchesEnabled: objectType.editsEnabled ?? false
64
+ }
65
+ };
66
+ }
67
+
68
+ /**
69
+ * Extracts marking group names of a specific type from object properties
70
+ */
71
+ export function extractMarkingGroups(properties, markingType) {
72
+ return properties.map(prop => {
73
+ if (typeof prop.type === "object" && prop.type.type === "marking" && prop.type.markingType === markingType) {
74
+ return prop.type.markingInputGroupName;
75
+ }
76
+ return undefined;
77
+ }).filter(val => val !== undefined);
78
+ }
79
+ export function extractPropertyDatasource(property, objectTypeApiName) {
80
+ if (!isExotic(property.type)) {
81
+ return [];
82
+ }
83
+ const identifier = objectTypeApiName + "." + property.apiName;
84
+ switch (property.type) {
85
+ case "geotimeSeries":
86
+ const geotimeDefinition = {
87
+ type: "geotimeSeries",
88
+ geotimeSeries: {
89
+ geotimeSeriesIntegrationRid: identifier,
90
+ properties: [property.apiName]
91
+ }
92
+ };
93
+ return [buildDatasource(property.apiName, geotimeDefinition)];
94
+ case "mediaReference":
95
+ const mediaSetDefinition = {
96
+ type: "mediaSetView",
97
+ mediaSetView: {
98
+ assumedMarkings: [],
99
+ mediaSetViewLocator: identifier,
100
+ properties: [property.apiName]
101
+ }
102
+ };
103
+ return [buildDatasource(property.apiName, mediaSetDefinition)];
104
+ default:
105
+ return [];
106
+ }
107
+ }
108
+ //# sourceMappingURL=convertObject.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertObject.js","names":["addNamespaceIfNone","buildDatasource","convertObjectStatus","isExotic","convertDatasourceDefinition","convertObjectPropertyType","convertObject","objectType","propertyDatasources","properties","flatMap","prop","extractPropertyDatasource","apiName","classificationGroupMarkingNames","extractMarkingGroups","mandatoryMarkingNames","classificationInputGroup","length","reduce","l","r","undefined","mandatoryInputGroup","objectDatasource","implementations","implementsInterfaces","displayMetadata","description","displayName","groupDisplayName","icon","type","blueprint","locator","color","pluralDisplayName","visibility","primaryKeys","primaryKeyPropertyApiName","propertyTypes","Object","fromEntries","map","val","titlePropertyTypeRid","titlePropertyApiName","status","redacted","implementsInterfaces2","impl","interfaceTypeApiName","implements","linksV2","propertiesV2","propertyMapping","mapping","interfaceProperty","propertyTypeRid","mapsTo","allImplementsInterfaces","datasources","entityMetadata","arePatchesEnabled","editsEnabled","markingType","markingInputGroupName","filter","property","objectTypeApiName","identifier","geotimeDefinition","geotimeSeries","geotimeSeriesIntegrationRid","mediaSetDefinition","mediaSetView","assumedMarkings","mediaSetViewLocator"],"sources":["convertObject.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n OntologyIrObjectTypeBlockDataV2,\n OntologyIrObjectTypeDatasource,\n OntologyIrObjectTypeDatasourceDefinition,\n OntologyIrPropertyType,\n} from \"@osdk/client.unstable\";\nimport {\n addNamespaceIfNone,\n buildDatasource,\n convertObjectStatus,\n} from \"../../api/defineOntology.js\";\nimport type { ObjectPropertyType } from \"../../api/object/ObjectPropertyType.js\";\nimport type { ObjectType } from \"../../api/object/ObjectType.js\";\nimport { isExotic } from \"../../api/properties/PropertyTypeType.js\";\nimport { convertDatasourceDefinition } from \"./convertDatasourceDefinition.js\";\nimport { convertObjectPropertyType } from \"./convertObjectPropertyType.js\";\n\nexport function convertObject(\n objectType: ObjectType,\n): OntologyIrObjectTypeBlockDataV2 {\n const propertyDatasources: OntologyIrObjectTypeDatasource[] =\n (objectType.properties ?? [])\n .flatMap(prop => extractPropertyDatasource(prop, objectType.apiName));\n\n const classificationGroupMarkingNames = extractMarkingGroups(\n objectType.properties ?? [],\n \"CBAC\",\n );\n\n const mandatoryMarkingNames = extractMarkingGroups(\n objectType.properties ?? [],\n \"MANDATORY\",\n );\n\n const classificationInputGroup = classificationGroupMarkingNames.length > 0\n ? classificationGroupMarkingNames.reduce((l, r) => l + \"/\" + r)\n : undefined;\n\n const mandatoryInputGroup = mandatoryMarkingNames.length > 0\n ? mandatoryMarkingNames.reduce((l, r) => l + \"/\" + r)\n : undefined;\n\n const objectDatasource = buildDatasource(\n objectType.apiName,\n convertDatasourceDefinition(\n objectType,\n objectType.properties ?? [],\n ),\n classificationInputGroup,\n mandatoryInputGroup,\n );\n\n const implementations = objectType.implementsInterfaces ?? [];\n\n return {\n objectType: {\n displayMetadata: {\n description: objectType.description,\n displayName: objectType.displayName,\n groupDisplayName: undefined,\n icon: {\n type: \"blueprint\",\n blueprint: objectType.icon ?? { locator: \"cube\", color: \"#2D72D2\" },\n },\n pluralDisplayName: objectType.pluralDisplayName,\n visibility: objectType.visibility ?? \"NORMAL\",\n },\n primaryKeys: [objectType.primaryKeyPropertyApiName],\n propertyTypes: Object.fromEntries(\n objectType.properties?.map<[string, OntologyIrPropertyType]>(\n val => [val.apiName, convertObjectPropertyType(val)],\n ) ?? [],\n ),\n titlePropertyTypeRid: objectType.titlePropertyApiName,\n apiName: objectType.apiName,\n status: convertObjectStatus(objectType.status),\n redacted: false,\n implementsInterfaces2: implementations.map(impl => ({\n interfaceTypeApiName: impl.implements.apiName,\n linksV2: {},\n propertiesV2: {},\n properties: Object.fromEntries(\n impl.propertyMapping.map(\n mapping => [addNamespaceIfNone(mapping.interfaceProperty), {\n propertyTypeRid: mapping.mapsTo,\n }],\n ),\n ),\n })),\n allImplementsInterfaces: {},\n },\n datasources: [...propertyDatasources, objectDatasource],\n entityMetadata: { arePatchesEnabled: objectType.editsEnabled ?? false },\n };\n}\n\n/**\n * Extracts marking group names of a specific type from object properties\n */\nexport function extractMarkingGroups(\n properties: ObjectPropertyType[],\n markingType: \"CBAC\" | \"MANDATORY\",\n): string[] {\n return properties\n .map(prop => {\n if (\n typeof prop.type === \"object\"\n && prop.type.type === \"marking\"\n && prop.type.markingType === markingType\n ) {\n return prop.type.markingInputGroupName;\n }\n return undefined;\n })\n .filter((val): val is string => val !== undefined);\n}\nexport function extractPropertyDatasource(\n property: ObjectPropertyType,\n objectTypeApiName: string,\n): OntologyIrObjectTypeDatasource[] {\n if (!isExotic(property.type)) {\n return [];\n }\n const identifier = objectTypeApiName + \".\" + property.apiName;\n switch (property.type as string) {\n case \"geotimeSeries\":\n const geotimeDefinition: OntologyIrObjectTypeDatasourceDefinition = {\n type: \"geotimeSeries\",\n geotimeSeries: {\n geotimeSeriesIntegrationRid: identifier,\n properties: [property.apiName],\n },\n };\n return [buildDatasource(property.apiName, geotimeDefinition)];\n case \"mediaReference\":\n const mediaSetDefinition: OntologyIrObjectTypeDatasourceDefinition = {\n type: \"mediaSetView\",\n mediaSetView: {\n assumedMarkings: [],\n mediaSetViewLocator: identifier,\n properties: [property.apiName],\n },\n };\n return [buildDatasource(property.apiName, mediaSetDefinition)];\n default:\n return [];\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,SACEA,kBAAkB,EAClBC,eAAe,EACfC,mBAAmB,QACd,6BAA6B;AAGpC,SAASC,QAAQ,QAAQ,0CAA0C;AACnE,SAASC,2BAA2B,QAAQ,kCAAkC;AAC9E,SAASC,yBAAyB,QAAQ,gCAAgC;AAE1E,OAAO,SAASC,aAAaA,CAC3BC,UAAsB,EACW;EACjC,MAAMC,mBAAqD,GACzD,CAACD,UAAU,CAACE,UAAU,IAAI,EAAE,EACzBC,OAAO,CAACC,IAAI,IAAIC,yBAAyB,CAACD,IAAI,EAAEJ,UAAU,CAACM,OAAO,CAAC,CAAC;EAEzE,MAAMC,+BAA+B,GAAGC,oBAAoB,CAC1DR,UAAU,CAACE,UAAU,IAAI,EAAE,EAC3B,MACF,CAAC;EAED,MAAMO,qBAAqB,GAAGD,oBAAoB,CAChDR,UAAU,CAACE,UAAU,IA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,GAAG,IAAoBA,GAAG,KAAKtB,SAAS,CAAC;AACtD;AACA,OAAO,SAASV,yBAAyBA,CACvCwD,QAA4B,EAC5BC,iBAAyB,EACS;EAClC,IAAI,CAAClE,QAAQ,CAACiE,QAAQ,CAACpC,IAAI,CAAC,EAAE;IAC5B,OAAO,EAAE;EACX;EACA,MAAMsC,UAAU,GAAGD,iBAAiB,GAAG,GAAG,GAAGD,QAAQ,CAACvD,OAAO;EAC7D,QAAQuD,QAAQ,CAACpC,IAAI;IACnB,KAAK,eAAe;MAClB,MAAMuC,iBAA2D,GAAG;QAClEvC,IAAI,EAAE,eAAe;QACrBwC,aAAa,EAAE;UACbC,2BAA2B,EAAEH,UAAU;UACvC7D,UAAU,EAAE,CAAC2D,QAAQ,CAACvD,OAAO;QAC/B;MACF,CAAC;MACD,OAAO,CAACZ,eAAe,CAACmE,QAAQ,CAACvD,OAAO,EAAE0D,iBAAiB,CAAC,CAAC;IAC/D,KAAK,gBAAgB;MACnB,MAAMG,kBAA4D,GAAG;QACnE1C,IAAI,EAAE,cAAc;QACpB2C,YAAY,EAAE;UACZC,eAAe,EAAE,EAAE;UACnBC,mBAAmB,EAAEP,UAAU;UAC/B7D,UAAU,EAAE,CAAC2D,QAAQ,CAACvD,OAAO;QAC/B;MACF,CAAC;MACD,OAAO,CAACZ,eAAe,CAACmE,QAAQ,CAACvD,OAAO,EAAE6D,kBAAkB,CAAC,CAAC;IAChE;MACE,OAAO,EAAE;EACb;AACF","ignoreList":[]}
@@ -0,0 +1,53 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import invariant from "tiny-invariant";
18
+ import { convertObjectStatus, namespace } from "../../api/defineOntology.js";
19
+ import { defaultTypeClasses, getPropertyTypeName, hasRenderHints, shouldNotHaveRenderHints } from "../../api/propertyConversionUtils.js";
20
+ import { convertNullabilityToDataConstraint } from "./convertNullabilityToDataConstraint.js";
21
+ import { convertValueType } from "./convertValueType.js";
22
+ import { convertValueTypeDataConstraints } from "./convertValueTypeDataConstraints.js";
23
+ import { propertyTypeTypeToOntologyIrType } from "./propertyTypeTypeToOntologyIrType.js";
24
+ export function convertObjectPropertyType(property) {
25
+ const apiName = namespace + property.apiName;
26
+ !(!shouldNotHaveRenderHints(property.type) || !hasRenderHints(property.typeClasses)) ? process.env.NODE_ENV !== "production" ? invariant(false, `Property type ${apiName} of type '${getPropertyTypeName(property.type)}' should not have render hints`) : invariant(false) : void 0;
27
+ const output = {
28
+ apiName: property.apiName,
29
+ sharedPropertyTypeApiName: property.sharedPropertyType?.apiName,
30
+ displayMetadata: {
31
+ displayName: property.displayName,
32
+ description: property.description,
33
+ visibility: property.visibility ?? "NORMAL"
34
+ },
35
+ indexedForSearch: property.indexedForSearch ?? true,
36
+ ruleSetBinding: undefined,
37
+ baseFormatter: property.baseFormatter,
38
+ type: property.array ? {
39
+ type: "array",
40
+ array: {
41
+ subtype: propertyTypeTypeToOntologyIrType(property.type)
42
+ }
43
+ } : propertyTypeTypeToOntologyIrType(property.type),
44
+ typeClasses: property.typeClasses ?? (shouldNotHaveRenderHints(property.type) ? [] : defaultTypeClasses),
45
+ status: convertObjectStatus(property.status),
46
+ inlineAction: undefined,
47
+ dataConstraints: property.valueType ? convertValueTypeDataConstraints(property.valueType.constraints) : convertNullabilityToDataConstraint(property),
48
+ sharedPropertyTypeRid: property.sharedPropertyType?.apiName,
49
+ valueType: property.valueType ? convertValueType(property.valueType) : undefined
50
+ };
51
+ return output;
52
+ }
53
+ //# sourceMappingURL=convertObjectPropertyType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertObjectPropertyType.js","names":["invariant","convertObjectStatus","namespace","defaultTypeClasses","getPropertyTypeName","hasRenderHints","shouldNotHaveRenderHints","convertNullabilityToDataConstraint","convertValueType","convertValueTypeDataConstraints","propertyTypeTypeToOntologyIrType","convertObjectPropertyType","property","apiName","type","typeClasses","process","env","NODE_ENV","output","sharedPropertyTypeApiName","sharedPropertyType","displayMetadata","displayName","description","visibility","indexedForSearch","ruleSetBinding","undefined","baseFormatter","array","subtype","status","inlineAction","dataConstraints","valueType","constraints","sharedPropertyTypeRid"],"sources":["convertObjectPropertyType.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OntologyIrPropertyType } from \"@osdk/client.unstable\";\nimport invariant from \"tiny-invariant\";\nimport { convertObjectStatus, namespace } from \"../../api/defineOntology.js\";\nimport type { ObjectPropertyType } from \"../../api/object/ObjectPropertyType.js\";\nimport {\n defaultTypeClasses,\n getPropertyTypeName,\n hasRenderHints,\n shouldNotHaveRenderHints,\n} from \"../../api/propertyConversionUtils.js\";\nimport { convertNullabilityToDataConstraint } from \"./convertNullabilityToDataConstraint.js\";\nimport { convertValueType } from \"./convertValueType.js\";\nimport { convertValueTypeDataConstraints } from \"./convertValueTypeDataConstraints.js\";\nimport { propertyTypeTypeToOntologyIrType } from \"./propertyTypeTypeToOntologyIrType.js\";\n\nexport function convertObjectPropertyType(\n property: ObjectPropertyType,\n): OntologyIrPropertyType {\n const apiName = namespace + property.apiName;\n invariant(\n !shouldNotHaveRenderHints(property.type)\n || !hasRenderHints(property.typeClasses),\n `Property type ${apiName} of type '${\n getPropertyTypeName(property.type)\n }' should not have render hints`,\n );\n const output: OntologyIrPropertyType = {\n apiName: property.apiName,\n sharedPropertyTypeApiName: property.sharedPropertyType?.apiName,\n displayMetadata: {\n displayName: property.displayName,\n description: property.description,\n visibility: property.visibility ?? \"NORMAL\",\n },\n indexedForSearch: property.indexedForSearch ?? true,\n ruleSetBinding: undefined,\n baseFormatter: property.baseFormatter,\n type: property.array\n ? {\n type: \"array\" as const,\n array: {\n subtype: propertyTypeTypeToOntologyIrType(property.type),\n },\n }\n : propertyTypeTypeToOntologyIrType(property.type),\n typeClasses: property.typeClasses\n ?? (shouldNotHaveRenderHints(property.type) ? [] : defaultTypeClasses),\n status: convertObjectStatus(property.status),\n inlineAction: undefined,\n dataConstraints: property.valueType\n ? convertValueTypeDataConstraints(property.valueType.constraints)\n : convertNullabilityToDataConstraint(property),\n sharedPropertyTypeRid: property.sharedPropertyType?.apiName,\n valueType: property.valueType\n ? convertValueType(property.valueType)\n : undefined,\n };\n return output;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAOA,SAAS,MAAM,gBAAgB;AACtC,SAASC,mBAAmB,EAAEC,SAAS,QAAQ,6BAA6B;AAE5E,SACEC,kBAAkB,EAClBC,mBAAmB,EACnBC,cAAc,EACdC,wBAAwB,QACnB,sCAAsC;AAC7C,SAASC,kCAAkC,QAAQ,yCAAyC;AAC5F,SAASC,gBAAgB,QAAQ,uBAAuB;AACxD,SAASC,+BAA+B,QAAQ,sCAAsC;AACtF,SAASC,gCAAgC,QAAQ,uCAAuC;AAExF,OAAO,SAASC,yBAAyBA,CACvCC,QAA4B,EACJ;EACxB,MAAMC,OAAO,GAAGX,SAAS,GAAGU,QAAQ,CAACC,OAAO;EAC5C,EACE,CAACP,wBAAwB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ACS,kBAAkB,EAAER,OAAO;IAC3DsB,SAAS,EAAEvB,QAAQ,CAACuB,SAAS,GACzB3B,gBAAgB,CAACI,QAAQ,CAACuB,SAAS,CAAC,GACpCP;EACN,CAAC;EACD,OAAOT,MAAM;AACf","ignoreList":[]}
@@ -0,0 +1,29 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { importedTypes } from "../../api/defineOntology.js";
18
+ import { convertOntologyDefinitionToWireBlockData } from "./convertOntologyDefinitionToWireBlockData.js";
19
+ import { convertOntologyToValueTypeIr } from "./convertOntologyToValueTypeIr.js";
20
+ export function convertOntologyDefinition(ontology, randomnessKey) {
21
+ return {
22
+ ontology: convertOntologyDefinitionToWireBlockData(ontology),
23
+ importedOntology: convertOntologyDefinitionToWireBlockData(importedTypes),
24
+ valueTypes: convertOntologyToValueTypeIr(ontology),
25
+ importedValueTypes: convertOntologyToValueTypeIr(importedTypes),
26
+ randomnessKey
27
+ };
28
+ }
29
+ //# sourceMappingURL=convertOntologyDefinition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertOntologyDefinition.js","names":["importedTypes","convertOntologyDefinitionToWireBlockData","convertOntologyToValueTypeIr","convertOntologyDefinition","ontology","randomnessKey","importedOntology","valueTypes","importedValueTypes"],"sources":["convertOntologyDefinition.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OntologyIr } from \"@osdk/client.unstable\";\nimport type { OntologyDefinition } from \"../../api/common/OntologyDefinition.js\";\nimport { importedTypes } from \"../../api/defineOntology.js\";\nimport { convertOntologyDefinitionToWireBlockData } from \"./convertOntologyDefinitionToWireBlockData.js\";\nimport { convertOntologyToValueTypeIr } from \"./convertOntologyToValueTypeIr.js\";\n\nexport function convertOntologyDefinition(\n ontology: OntologyDefinition,\n randomnessKey?: string,\n): OntologyIr {\n return {\n ontology: convertOntologyDefinitionToWireBlockData(ontology),\n importedOntology: convertOntologyDefinitionToWireBlockData(importedTypes),\n valueTypes: convertOntologyToValueTypeIr(ontology),\n importedValueTypes: convertOntologyToValueTypeIr(importedTypes),\n randomnessKey,\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,aAAa,QAAQ,6BAA6B;AAC3D,SAASC,wCAAwC,QAAQ,+CAA+C;AACxG,SAASC,4BAA4B,QAAQ,mCAAmC;AAEhF,OAAO,SAASC,yBAAyBA,CACvCC,QAA4B,EAC5BC,aAAsB,EACV;EACZ,OAAO;IACLD,QAAQ,EAAEH,wCAAwC,CAACG,QAAQ,CAAC;IAC5DE,gBAAgB,EAAEL,wCAAwC,CAACD,aAAa,CAAC;IACzEO,UAAU,EAAEL,4BAA4B,CAACE,QAAQ,CAAC;IAClDI,kBAAkB,EAAEN,4BAA4B,CAACF,aAAa,CAAC;IAC/DK;EACF,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,57 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { OntologyEntityTypeEnum } from "../../api/common/OntologyEntityTypeEnum.js";
18
+ import { cleanAndValidateLinkTypeId, convertAction } from "../../api/defineOntology.js";
19
+ import { convertInterface } from "./convertInterface.js";
20
+ import { convertLink } from "./convertLink.js";
21
+ import { convertObject } from "./convertObject.js";
22
+ import { convertSpt } from "./convertSpt.js";
23
+ export function convertOntologyDefinitionToWireBlockData(ontology) {
24
+ return {
25
+ objectTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.OBJECT_TYPE]).map(([apiName, objectType]) => {
26
+ return [apiName, convertObject(objectType)];
27
+ })),
28
+ sharedPropertyTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE]).map(([apiName, spt]) => [apiName, {
29
+ sharedPropertyType: convertSpt(spt)
30
+ }])),
31
+ interfaceTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.INTERFACE_TYPE]).map(([apiName, interfaceType]) => {
32
+ return [apiName, {
33
+ interfaceType: convertInterface(interfaceType)
34
+ }];
35
+ })),
36
+ linkTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.LINK_TYPE]).map(([id, link]) => {
37
+ return [cleanAndValidateLinkTypeId(id), convertLink(link)];
38
+ })),
39
+ actionTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.ACTION_TYPE]).map(([apiName, action]) => {
40
+ return [apiName, convertAction(action)];
41
+ })),
42
+ blockPermissionInformation: {
43
+ actionTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.ACTION_TYPE]).filter(([apiName, action]) => action.validation).map(([apiName, action]) => {
44
+ return [apiName, {
45
+ restrictionStatus: {
46
+ hasRolesApplied: true,
47
+ ontologyPackageRid: null,
48
+ publicProject: false
49
+ }
50
+ }];
51
+ })),
52
+ linkTypes: {},
53
+ objectTypes: {}
54
+ }
55
+ };
56
+ }
57
+ //# sourceMappingURL=convertOntologyDefinitionToWireBlockData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertOntologyDefinitionToWireBlockData.js","names":["OntologyEntityTypeEnum","cleanAndValidateLinkTypeId","convertAction","convertInterface","convertLink","convertObject","convertSpt","convertOntologyDefinitionToWireBlockData","ontology","objectTypes","Object","fromEntries","entries","OBJECT_TYPE","map","apiName","objectType","sharedPropertyTypes","SHARED_PROPERTY_TYPE","spt","sharedPropertyType","interfaceTypes","INTERFACE_TYPE","interfaceType","linkTypes","LINK_TYPE","id","link","actionTypes","ACTION_TYPE","action","blockPermissionInformation","filter","validation","restrictionStatus","hasRolesApplied","ontologyPackageRid","publicProject"],"sources":["convertOntologyDefinitionToWireBlockData.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ActionTypePermissionInformation,\n OntologyIrActionTypeBlockDataV2,\n OntologyIrInterfaceTypeBlockDataV2,\n OntologyIrLinkTypeBlockDataV2,\n OntologyIrObjectTypeBlockDataV2,\n OntologyIrOntologyBlockDataV2,\n OntologyIrSharedPropertyTypeBlockDataV2,\n} from \"@osdk/client.unstable\";\nimport { type OntologyDefinition } from \"../../api/common/OntologyDefinition.js\";\nimport { OntologyEntityTypeEnum } from \"../../api/common/OntologyEntityTypeEnum.js\";\nimport {\n cleanAndValidateLinkTypeId,\n convertAction,\n} from \"../../api/defineOntology.js\";\nimport { convertInterface } from \"./convertInterface.js\";\nimport { convertLink } from \"./convertLink.js\";\nimport { convertObject } from \"./convertObject.js\";\nimport { convertSpt } from \"./convertSpt.js\";\n\nexport function convertOntologyDefinitionToWireBlockData(\n ontology: OntologyDefinition,\n): OntologyIrOntologyBlockDataV2 {\n return ({\n objectTypes: Object.fromEntries(\n Object.entries(ontology[OntologyEntityTypeEnum.OBJECT_TYPE]).map<\n [string, OntologyIrObjectTypeBlockDataV2]\n >(([apiName, objectType]) => {\n return [apiName, convertObject(objectType)];\n }),\n ),\n sharedPropertyTypes: Object.fromEntries(\n Object.entries(\n ontology[OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE],\n )\n .map<[string, OntologyIrSharedPropertyTypeBlockDataV2]>((\n [apiName, spt],\n ) => [apiName, { sharedPropertyType: convertSpt(spt) }]),\n ),\n interfaceTypes: Object.fromEntries(\n Object.entries(\n ontology[OntologyEntityTypeEnum.INTERFACE_TYPE],\n )\n .map<[string, OntologyIrInterfaceTypeBlockDataV2]>(\n ([apiName, interfaceType]) => {\n return [apiName, {\n interfaceType: convertInterface(interfaceType),\n }];\n },\n ),\n ),\n linkTypes: Object.fromEntries(\n Object.entries(ontology[OntologyEntityTypeEnum.LINK_TYPE]).map<\n [string, OntologyIrLinkTypeBlockDataV2]\n >(([id, link]) => {\n return [cleanAndValidateLinkTypeId(id), convertLink(link)];\n }),\n ),\n actionTypes: Object.fromEntries(\n Object.entries(ontology[OntologyEntityTypeEnum.ACTION_TYPE]).map<\n [string, OntologyIrActionTypeBlockDataV2]\n >(([apiName, action]) => {\n return [apiName, convertAction(action)];\n }),\n ),\n blockPermissionInformation: {\n actionTypes: Object.fromEntries(\n Object.entries(ontology[OntologyEntityTypeEnum.ACTION_TYPE])\n .filter(([apiName, action]) => action.validation)\n .map<\n [string, ActionTypePermissionInformation]\n >(([apiName, action]) => {\n return [apiName, {\n restrictionStatus: {\n hasRolesApplied: true,\n ontologyPackageRid: null,\n publicProject: false,\n },\n }];\n }),\n ),\n linkTypes: {},\n objectTypes: {},\n },\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA,SAASA,sBAAsB,QAAQ,4CAA4C;AACnF,SACEC,0BAA0B,EAC1BC,aAAa,QACR,6BAA6B;AACpC,SAASC,gBAAgB,QAAQ,uBAAuB;AACxD,SAASC,WAAW,QAAQ,kBAAkB;AAC9C,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,UAAU,QAAQ,iBAAiB;AAE5C,OAAO,SAASC,wCAAwCA,CACtDC,QAA4B,EACG;EAC/B,OAAQ;IACNC,WAAW,EAAEC,MAAM,CAACC,WAAW,CAC7BD,MAAM,CAACE,OAAO,CAACJ,QAAQ,CAACR,sBAAsB,CAACa,WAAW,CAAC,CAAC,CAACC,GAAG,CAE9D,CAAC,CAACC,OAAO,EAAEC,UAAU,CAAC,KAAK;MAC3B,OAAO,CAACD,OAAO,EAAEV,aAAa,CAACW,UAAU,CAAC,CAAC;IAC7C,CAAC,CACH,CAAC;IACDC,mBAAmB,EAAEP,MAAM,CAACC,WAAW,CACrCD,MAAM,CAACE,OAAO,CACZJ,QAAQ,CAACR,sBAAsB,CAACkB,oBAAoB,CACtD,CAAC,CACEJ,GAAG,CAAoD,CACtD,CAACC,OAAO,EAAEI,GAAG,CAAC,KACX,CAACJ,OAAO,EAAE;MAAEK,kBAAkB,EAAEd,UAAU,CAACa,GAAG;IAAE,CAAC,CAAC,CAC3D,CAAC;IACDE,cAAc,EAAEX,MAAM,CAACC,WAAW,CAChCD,MAAM,CAACE,OAAO,CACZJ,QAAQ,CAACR,sBAAsB,CAACsB,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EAAE,CAAC,CAAC;MACbf,WAAW,EAAE,CAAC;IAChB;EACF,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { OntologyEntityTypeEnum } from "../../api/common/OntologyEntityTypeEnum.js";
18
+ import { convertValueTypesToIr } from "./convertValueTypesToIr.js";
19
+ export function convertOntologyToValueTypeIr(ontology) {
20
+ return {
21
+ valueTypes: convertValueTypesToIr(ontology[OntologyEntityTypeEnum.VALUE_TYPE])
22
+ };
23
+ }
24
+ //# sourceMappingURL=convertOntologyToValueTypeIr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertOntologyToValueTypeIr.js","names":["OntologyEntityTypeEnum","convertValueTypesToIr","convertOntologyToValueTypeIr","ontology","valueTypes","VALUE_TYPE"],"sources":["convertOntologyToValueTypeIr.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OntologyIrValueTypeBlockData } from \"@osdk/client.unstable\";\nimport { type OntologyDefinition } from \"../../api/common/OntologyDefinition.js\";\nimport { OntologyEntityTypeEnum } from \"../../api/common/OntologyEntityTypeEnum.js\";\nimport { convertValueTypesToIr } from \"./convertValueTypesToIr.js\";\n\nexport function convertOntologyToValueTypeIr(\n ontology: OntologyDefinition,\n): OntologyIrValueTypeBlockData {\n return {\n valueTypes: convertValueTypesToIr(\n ontology[OntologyEntityTypeEnum.VALUE_TYPE],\n ),\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,sBAAsB,QAAQ,4CAA4C;AACnF,SAASC,qBAAqB,QAAQ,4BAA4B;AAElE,OAAO,SAASC,4BAA4BA,CAC1CC,QAA4B,EACE;EAC9B,OAAO;IACLC,UAAU,EAAEH,qBAAqB,CAC/BE,QAAQ,CAACH,sBAAsB,CAACK,UAAU,CAC5C;EACF,CAAC;AACH","ignoreList":[]}