@osdk/maker 0.13.0-beta.11 → 0.13.0-beta.12

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 (510) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/build/browser/api/action/ActionLevelValidationDefinition.js +2 -0
  3. package/build/browser/api/action/ActionLevelValidationDefinition.js.map +1 -0
  4. package/build/browser/api/action/ActionParameter.js +2 -0
  5. package/build/browser/api/action/ActionParameter.js.map +1 -0
  6. package/build/browser/api/action/ActionParameterAllowedValues.js +2 -0
  7. package/build/browser/api/action/ActionParameterAllowedValues.js.map +1 -0
  8. package/build/browser/api/action/ActionParameterConditionalOverride.js +2 -0
  9. package/build/browser/api/action/ActionParameterConditionalOverride.js.map +1 -0
  10. package/build/browser/api/action/ActionParameterConfiguration.js +2 -0
  11. package/build/browser/api/action/ActionParameterConfiguration.js.map +1 -0
  12. package/build/browser/api/action/ActionParameterType.js +22 -0
  13. package/build/browser/api/action/ActionParameterType.js.map +1 -0
  14. package/build/browser/api/action/ActionSection.js +2 -0
  15. package/build/browser/api/action/ActionSection.js.map +1 -0
  16. package/build/browser/api/action/ActionStatus.js +2 -0
  17. package/build/browser/api/action/ActionStatus.js.map +1 -0
  18. package/build/browser/api/action/ActionType.js +2 -0
  19. package/build/browser/api/action/ActionType.js.map +1 -0
  20. package/build/browser/api/action/ActionValidationRule.js +2 -0
  21. package/build/browser/api/action/ActionValidationRule.js.map +1 -0
  22. package/build/browser/api/action/ConditionDefinition.js +2 -0
  23. package/build/browser/api/action/ConditionDefinition.js.map +1 -0
  24. package/build/browser/api/action/MappingValue.js +2 -0
  25. package/build/browser/api/action/MappingValue.js.map +1 -0
  26. package/build/browser/api/action/SectionConditionalOverride.js +2 -0
  27. package/build/browser/api/action/SectionConditionalOverride.js.map +1 -0
  28. package/build/browser/api/action/SubmissionMetadata.js +2 -0
  29. package/build/browser/api/action/SubmissionMetadata.js.map +1 -0
  30. package/build/browser/api/common/BlueprintIcons.js +2 -0
  31. package/build/browser/api/common/BlueprintIcons.js.map +1 -0
  32. package/build/browser/api/common/OntologyDefinition.js +2 -0
  33. package/build/browser/api/common/OntologyDefinition.js.map +1 -0
  34. package/build/browser/api/common/OntologyEntityBase.js +2 -0
  35. package/build/browser/api/common/OntologyEntityBase.js.map +1 -0
  36. package/build/browser/api/{types.js → common/OntologyEntityTypeEnum.js} +2 -8
  37. package/build/browser/api/common/OntologyEntityTypeEnum.js.map +1 -0
  38. package/build/browser/api/common/OntologyEntityTypeMapping.js +2 -0
  39. package/build/browser/api/common/OntologyEntityTypeMapping.js.map +1 -0
  40. package/build/browser/api/common/TypeClass.js +2 -0
  41. package/build/browser/api/common/TypeClass.js.map +1 -0
  42. package/build/browser/api/defineAction.js +16 -28
  43. package/build/browser/api/defineAction.js.map +1 -1
  44. package/build/browser/api/defineInterface.js +7 -32
  45. package/build/browser/api/defineInterface.js.map +1 -1
  46. package/build/browser/api/defineInterfaceLinkConstraint.js +3 -2
  47. package/build/browser/api/defineInterfaceLinkConstraint.js.map +1 -1
  48. package/build/browser/api/defineLink.js +3 -3
  49. package/build/browser/api/defineLink.js.map +1 -1
  50. package/build/browser/api/defineObject.js +9 -29
  51. package/build/browser/api/defineObject.js.map +1 -1
  52. package/build/browser/api/defineOntology.js +14 -557
  53. package/build/browser/api/defineOntology.js.map +1 -1
  54. package/build/browser/api/defineSpt.js +1 -1
  55. package/build/browser/api/defineSpt.js.map +1 -1
  56. package/build/browser/api/defineValueType.js +1 -1
  57. package/build/browser/api/defineValueType.js.map +1 -1
  58. package/build/browser/api/importOntologyEntity.js +1 -1
  59. package/build/browser/api/importOntologyEntity.js.map +1 -1
  60. package/build/browser/api/{defineImportSpt.js → importSharedPropertyType.js} +2 -3
  61. package/build/browser/api/importSharedPropertyType.js.map +1 -0
  62. package/build/browser/api/interface/InterfacePropertyType.js +2 -0
  63. package/build/browser/api/interface/InterfacePropertyType.js.map +1 -0
  64. package/build/browser/api/interface/InterfaceType.js +2 -0
  65. package/build/browser/api/interface/InterfaceType.js.map +1 -0
  66. package/build/browser/api/interface/getFlattenedInterfaceProperties.js +27 -0
  67. package/build/browser/api/interface/getFlattenedInterfaceProperties.js.map +1 -0
  68. package/build/browser/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.js +42 -0
  69. package/build/browser/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.js.map +1 -0
  70. package/build/browser/api/links/LinkType.js +2 -0
  71. package/build/browser/api/links/LinkType.js.map +1 -0
  72. package/build/browser/api/namespace/combineApiNamespaceIfMissing.js +20 -0
  73. package/build/browser/api/namespace/combineApiNamespaceIfMissing.js.map +1 -0
  74. package/build/browser/api/object/InterfaceImplementation.js +2 -0
  75. package/build/browser/api/object/InterfaceImplementation.js.map +1 -0
  76. package/build/browser/api/object/ObjectPropertyType.js +2 -0
  77. package/build/browser/api/object/ObjectPropertyType.js.map +1 -0
  78. package/build/browser/api/object/ObjectPropertyTypeUserDefinition.js +2 -0
  79. package/build/browser/api/object/ObjectPropertyTypeUserDefinition.js.map +1 -0
  80. package/build/browser/api/object/ObjectType.js +2 -0
  81. package/build/browser/api/object/ObjectType.js.map +1 -0
  82. package/build/browser/api/object/ObjectTypeDatasourceDefinition.js +2 -0
  83. package/build/browser/api/object/ObjectTypeDatasourceDefinition.js.map +1 -0
  84. package/build/browser/api/object/ObjectTypeDefinition.js +2 -0
  85. package/build/browser/api/object/ObjectTypeDefinition.js.map +1 -0
  86. package/build/browser/api/object/ObjectTypeStatus.js +2 -0
  87. package/build/browser/api/object/ObjectTypeStatus.js.map +1 -0
  88. package/build/browser/api/objectStatus.test.js.map +1 -1
  89. package/build/browser/api/overall.test.js +2 -5
  90. package/build/browser/api/overall.test.js.map +1 -1
  91. package/build/browser/api/properties/Nullability.js +2 -0
  92. package/build/browser/api/properties/Nullability.js.map +1 -0
  93. package/build/browser/api/properties/PropertyTypeType.js +34 -0
  94. package/build/browser/api/properties/PropertyTypeType.js.map +1 -0
  95. package/build/browser/api/properties/SharedPropertyType.js +2 -0
  96. package/build/browser/api/properties/SharedPropertyType.js.map +1 -0
  97. package/build/browser/api/propertyConversionUtils.js +0 -238
  98. package/build/browser/api/propertyConversionUtils.js.map +1 -1
  99. package/build/browser/api/values/ValueTypeDefinitionVersion.js +2 -0
  100. package/build/browser/api/values/ValueTypeDefinitionVersion.js.map +1 -0
  101. package/build/browser/api/values/ValueTypeType.js +2 -0
  102. package/build/browser/api/values/ValueTypeType.js.map +1 -0
  103. package/build/browser/api/wrapWithProxy.js +1 -0
  104. package/build/browser/api/wrapWithProxy.js.map +1 -1
  105. package/build/browser/cli/main.js +1 -1
  106. package/build/browser/conversion/toConjure/distributeTypeHelper.js +23 -0
  107. package/build/browser/conversion/toConjure/distributeTypeHelper.js.map +1 -0
  108. package/build/browser/conversion/toMarketplace/convertActionParameterConditionalOverride.js +88 -0
  109. package/build/browser/conversion/toMarketplace/convertActionParameterConditionalOverride.js.map +1 -0
  110. package/build/browser/conversion/toMarketplace/convertActionParameters.js +31 -0
  111. package/build/browser/conversion/toMarketplace/convertActionParameters.js.map +1 -0
  112. package/build/browser/conversion/toMarketplace/convertActionSections.js +43 -0
  113. package/build/browser/conversion/toMarketplace/convertActionSections.js.map +1 -0
  114. package/build/browser/conversion/toMarketplace/convertActionValidation.js +93 -0
  115. package/build/browser/conversion/toMarketplace/convertActionValidation.js.map +1 -0
  116. package/build/browser/conversion/toMarketplace/convertActionVisibility.js +41 -0
  117. package/build/browser/conversion/toMarketplace/convertActionVisibility.js.map +1 -0
  118. package/build/browser/conversion/toMarketplace/convertCardinality.js +23 -0
  119. package/build/browser/conversion/toMarketplace/convertCardinality.js.map +1 -0
  120. package/build/browser/conversion/toMarketplace/convertConditionDefinition.js +86 -0
  121. package/build/browser/conversion/toMarketplace/convertConditionDefinition.js.map +1 -0
  122. package/build/browser/conversion/toMarketplace/convertDataConstraintToDataConstraints.js +26 -0
  123. package/build/browser/conversion/toMarketplace/convertDataConstraintToDataConstraints.js.map +1 -0
  124. package/build/browser/conversion/toMarketplace/convertDatasourceDefinition.js +89 -0
  125. package/build/browser/conversion/toMarketplace/convertDatasourceDefinition.js.map +1 -0
  126. package/build/browser/conversion/toMarketplace/convertInterface.js +47 -0
  127. package/build/browser/conversion/toMarketplace/convertInterface.js.map +1 -0
  128. package/build/browser/conversion/toMarketplace/convertLink.js +119 -0
  129. package/build/browser/conversion/toMarketplace/convertLink.js.map +1 -0
  130. package/build/browser/conversion/toMarketplace/convertMappingValue.js +41 -0
  131. package/build/browser/conversion/toMarketplace/convertMappingValue.js.map +1 -0
  132. package/build/browser/conversion/toMarketplace/convertNullabilityToDataConstraint.js +43 -0
  133. package/build/browser/conversion/toMarketplace/convertNullabilityToDataConstraint.js.map +1 -0
  134. package/build/browser/conversion/toMarketplace/convertObject.js +108 -0
  135. package/build/browser/conversion/toMarketplace/convertObject.js.map +1 -0
  136. package/build/browser/conversion/toMarketplace/convertObjectPropertyType.js +53 -0
  137. package/build/browser/conversion/toMarketplace/convertObjectPropertyType.js.map +1 -0
  138. package/build/browser/conversion/toMarketplace/convertOntologyDefinition.js +28 -0
  139. package/build/browser/conversion/toMarketplace/convertOntologyDefinition.js.map +1 -0
  140. package/build/browser/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js +57 -0
  141. package/build/browser/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js.map +1 -0
  142. package/build/browser/conversion/toMarketplace/convertOntologyToValueTypeIr.js +24 -0
  143. package/build/browser/conversion/toMarketplace/convertOntologyToValueTypeIr.js.map +1 -0
  144. package/build/browser/conversion/toMarketplace/convertSectionConditionalOverride.js +35 -0
  145. package/build/browser/conversion/toMarketplace/convertSectionConditionalOverride.js.map +1 -0
  146. package/build/browser/conversion/toMarketplace/convertSpt.js +62 -0
  147. package/build/browser/conversion/toMarketplace/convertSpt.js.map +1 -0
  148. package/build/browser/conversion/toMarketplace/convertValueType.js +25 -0
  149. package/build/browser/conversion/toMarketplace/convertValueType.js.map +1 -0
  150. package/build/browser/conversion/toMarketplace/convertValueTypeDataConstraints.js +30 -0
  151. package/build/browser/conversion/toMarketplace/convertValueTypeDataConstraints.js.map +1 -0
  152. package/build/browser/conversion/toMarketplace/convertValueTypesToIr.js +34 -0
  153. package/build/browser/conversion/toMarketplace/convertValueTypesToIr.js.map +1 -0
  154. package/build/browser/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.js +83 -0
  155. package/build/browser/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.js.map +1 -0
  156. package/build/browser/conversion/toMarketplace/getFormContentOrdering.js +39 -0
  157. package/build/browser/conversion/toMarketplace/getFormContentOrdering.js.map +1 -0
  158. package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js +124 -0
  159. package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js.map +1 -0
  160. package/build/browser/index.js +5 -5
  161. package/build/browser/index.js.map +1 -1
  162. package/build/browser/util/OptionalFields.js +2 -0
  163. package/build/browser/util/OptionalFields.js.map +1 -0
  164. package/build/browser/util/RequiredFields.js +2 -0
  165. package/build/browser/util/RequiredFields.js.map +1 -0
  166. package/build/cjs/index.cjs +1017 -963
  167. package/build/cjs/index.cjs.map +1 -1
  168. package/build/cjs/index.d.cts +382 -346
  169. package/build/esm/api/action/ActionLevelValidationDefinition.js +2 -0
  170. package/build/esm/api/action/ActionLevelValidationDefinition.js.map +1 -0
  171. package/build/esm/api/action/ActionParameter.js +2 -0
  172. package/build/esm/api/action/ActionParameter.js.map +1 -0
  173. package/build/esm/api/action/ActionParameterAllowedValues.js +2 -0
  174. package/build/esm/api/action/ActionParameterAllowedValues.js.map +1 -0
  175. package/build/esm/api/action/ActionParameterConditionalOverride.js +2 -0
  176. package/build/esm/api/action/ActionParameterConditionalOverride.js.map +1 -0
  177. package/build/esm/api/action/ActionParameterConfiguration.js +2 -0
  178. package/build/esm/api/action/ActionParameterConfiguration.js.map +1 -0
  179. package/build/esm/api/action/ActionParameterType.js +22 -0
  180. package/build/esm/api/action/ActionParameterType.js.map +1 -0
  181. package/build/esm/api/action/ActionSection.js +2 -0
  182. package/build/esm/api/action/ActionSection.js.map +1 -0
  183. package/build/esm/api/action/ActionStatus.js +2 -0
  184. package/build/esm/api/action/ActionStatus.js.map +1 -0
  185. package/build/esm/api/action/ActionType.js +2 -0
  186. package/build/esm/api/action/ActionType.js.map +1 -0
  187. package/build/esm/api/action/ActionValidationRule.js +2 -0
  188. package/build/esm/api/action/ActionValidationRule.js.map +1 -0
  189. package/build/esm/api/action/ConditionDefinition.js +2 -0
  190. package/build/esm/api/action/ConditionDefinition.js.map +1 -0
  191. package/build/esm/api/action/MappingValue.js +2 -0
  192. package/build/esm/api/action/MappingValue.js.map +1 -0
  193. package/build/esm/api/action/SectionConditionalOverride.js +2 -0
  194. package/build/esm/api/action/SectionConditionalOverride.js.map +1 -0
  195. package/build/esm/api/action/SubmissionMetadata.js +2 -0
  196. package/build/esm/api/action/SubmissionMetadata.js.map +1 -0
  197. package/build/esm/api/common/BlueprintIcons.js +2 -0
  198. package/build/esm/api/common/BlueprintIcons.js.map +1 -0
  199. package/build/esm/api/common/OntologyDefinition.js +2 -0
  200. package/build/esm/api/common/OntologyDefinition.js.map +1 -0
  201. package/build/esm/api/common/OntologyEntityBase.js +2 -0
  202. package/build/esm/api/common/OntologyEntityBase.js.map +1 -0
  203. package/build/esm/api/{types.js → common/OntologyEntityTypeEnum.js} +2 -8
  204. package/build/esm/api/common/OntologyEntityTypeEnum.js.map +1 -0
  205. package/build/esm/api/common/OntologyEntityTypeMapping.js +2 -0
  206. package/build/esm/api/common/OntologyEntityTypeMapping.js.map +1 -0
  207. package/build/esm/api/common/TypeClass.js +2 -0
  208. package/build/esm/api/common/TypeClass.js.map +1 -0
  209. package/build/esm/api/defineAction.js +16 -28
  210. package/build/esm/api/defineAction.js.map +1 -1
  211. package/build/esm/api/defineInterface.js +7 -32
  212. package/build/esm/api/defineInterface.js.map +1 -1
  213. package/build/esm/api/defineInterfaceLinkConstraint.js +3 -2
  214. package/build/esm/api/defineInterfaceLinkConstraint.js.map +1 -1
  215. package/build/esm/api/defineLink.js +3 -3
  216. package/build/esm/api/defineLink.js.map +1 -1
  217. package/build/esm/api/defineObject.js +9 -29
  218. package/build/esm/api/defineObject.js.map +1 -1
  219. package/build/esm/api/defineOntology.js +14 -557
  220. package/build/esm/api/defineOntology.js.map +1 -1
  221. package/build/esm/api/defineSpt.js +1 -1
  222. package/build/esm/api/defineSpt.js.map +1 -1
  223. package/build/esm/api/defineValueType.js +1 -1
  224. package/build/esm/api/defineValueType.js.map +1 -1
  225. package/build/esm/api/importOntologyEntity.js +1 -1
  226. package/build/esm/api/importOntologyEntity.js.map +1 -1
  227. package/build/esm/api/{defineImportSpt.js → importSharedPropertyType.js} +2 -3
  228. package/build/esm/api/importSharedPropertyType.js.map +1 -0
  229. package/build/esm/api/interface/InterfacePropertyType.js +2 -0
  230. package/build/esm/api/interface/InterfacePropertyType.js.map +1 -0
  231. package/build/esm/api/interface/InterfaceType.js +2 -0
  232. package/build/esm/api/interface/InterfaceType.js.map +1 -0
  233. package/build/esm/api/interface/getFlattenedInterfaceProperties.js +27 -0
  234. package/build/esm/api/interface/getFlattenedInterfaceProperties.js.map +1 -0
  235. package/build/esm/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.js +42 -0
  236. package/build/esm/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.js.map +1 -0
  237. package/build/esm/api/links/LinkType.js +2 -0
  238. package/build/esm/api/links/LinkType.js.map +1 -0
  239. package/build/esm/api/namespace/combineApiNamespaceIfMissing.js +20 -0
  240. package/build/esm/api/namespace/combineApiNamespaceIfMissing.js.map +1 -0
  241. package/build/esm/api/object/InterfaceImplementation.js +2 -0
  242. package/build/esm/api/object/InterfaceImplementation.js.map +1 -0
  243. package/build/esm/api/object/ObjectPropertyType.js +2 -0
  244. package/build/esm/api/object/ObjectPropertyType.js.map +1 -0
  245. package/build/esm/api/object/ObjectPropertyTypeUserDefinition.js +2 -0
  246. package/build/esm/api/object/ObjectPropertyTypeUserDefinition.js.map +1 -0
  247. package/build/esm/api/object/ObjectType.js +2 -0
  248. package/build/esm/api/object/ObjectType.js.map +1 -0
  249. package/build/esm/api/object/ObjectTypeDatasourceDefinition.js +2 -0
  250. package/build/esm/api/object/ObjectTypeDatasourceDefinition.js.map +1 -0
  251. package/build/esm/api/object/ObjectTypeDefinition.js +2 -0
  252. package/build/esm/api/object/ObjectTypeDefinition.js.map +1 -0
  253. package/build/esm/api/object/ObjectTypeStatus.js +2 -0
  254. package/build/esm/api/object/ObjectTypeStatus.js.map +1 -0
  255. package/build/esm/api/objectStatus.test.js.map +1 -1
  256. package/build/esm/api/overall.test.js +2 -5
  257. package/build/esm/api/overall.test.js.map +1 -1
  258. package/build/esm/api/properties/Nullability.js +2 -0
  259. package/build/esm/api/properties/Nullability.js.map +1 -0
  260. package/build/esm/api/properties/PropertyTypeType.js +34 -0
  261. package/build/esm/api/properties/PropertyTypeType.js.map +1 -0
  262. package/build/esm/api/properties/SharedPropertyType.js +2 -0
  263. package/build/esm/api/properties/SharedPropertyType.js.map +1 -0
  264. package/build/esm/api/propertyConversionUtils.js +0 -238
  265. package/build/esm/api/propertyConversionUtils.js.map +1 -1
  266. package/build/esm/api/values/ValueTypeDefinitionVersion.js +2 -0
  267. package/build/esm/api/values/ValueTypeDefinitionVersion.js.map +1 -0
  268. package/build/esm/api/values/ValueTypeType.js +2 -0
  269. package/build/esm/api/values/ValueTypeType.js.map +1 -0
  270. package/build/esm/api/wrapWithProxy.js +1 -0
  271. package/build/esm/api/wrapWithProxy.js.map +1 -1
  272. package/build/esm/cli/main.js +1 -1
  273. package/build/esm/conversion/toConjure/distributeTypeHelper.js +23 -0
  274. package/build/esm/conversion/toConjure/distributeTypeHelper.js.map +1 -0
  275. package/build/esm/conversion/toMarketplace/convertActionParameterConditionalOverride.js +88 -0
  276. package/build/esm/conversion/toMarketplace/convertActionParameterConditionalOverride.js.map +1 -0
  277. package/build/esm/conversion/toMarketplace/convertActionParameters.js +31 -0
  278. package/build/esm/conversion/toMarketplace/convertActionParameters.js.map +1 -0
  279. package/build/esm/conversion/toMarketplace/convertActionSections.js +43 -0
  280. package/build/esm/conversion/toMarketplace/convertActionSections.js.map +1 -0
  281. package/build/esm/conversion/toMarketplace/convertActionValidation.js +93 -0
  282. package/build/esm/conversion/toMarketplace/convertActionValidation.js.map +1 -0
  283. package/build/esm/conversion/toMarketplace/convertActionVisibility.js +41 -0
  284. package/build/esm/conversion/toMarketplace/convertActionVisibility.js.map +1 -0
  285. package/build/esm/conversion/toMarketplace/convertCardinality.js +23 -0
  286. package/build/esm/conversion/toMarketplace/convertCardinality.js.map +1 -0
  287. package/build/esm/conversion/toMarketplace/convertConditionDefinition.js +86 -0
  288. package/build/esm/conversion/toMarketplace/convertConditionDefinition.js.map +1 -0
  289. package/build/esm/conversion/toMarketplace/convertDataConstraintToDataConstraints.js +26 -0
  290. package/build/esm/conversion/toMarketplace/convertDataConstraintToDataConstraints.js.map +1 -0
  291. package/build/esm/conversion/toMarketplace/convertDatasourceDefinition.js +89 -0
  292. package/build/esm/conversion/toMarketplace/convertDatasourceDefinition.js.map +1 -0
  293. package/build/esm/conversion/toMarketplace/convertInterface.js +47 -0
  294. package/build/esm/conversion/toMarketplace/convertInterface.js.map +1 -0
  295. package/build/esm/conversion/toMarketplace/convertLink.js +119 -0
  296. package/build/esm/conversion/toMarketplace/convertLink.js.map +1 -0
  297. package/build/esm/conversion/toMarketplace/convertMappingValue.js +41 -0
  298. package/build/esm/conversion/toMarketplace/convertMappingValue.js.map +1 -0
  299. package/build/esm/conversion/toMarketplace/convertNullabilityToDataConstraint.js +43 -0
  300. package/build/esm/conversion/toMarketplace/convertNullabilityToDataConstraint.js.map +1 -0
  301. package/build/esm/conversion/toMarketplace/convertObject.js +108 -0
  302. package/build/esm/conversion/toMarketplace/convertObject.js.map +1 -0
  303. package/build/esm/conversion/toMarketplace/convertObjectPropertyType.js +53 -0
  304. package/build/esm/conversion/toMarketplace/convertObjectPropertyType.js.map +1 -0
  305. package/build/esm/conversion/toMarketplace/convertOntologyDefinition.js +28 -0
  306. package/build/esm/conversion/toMarketplace/convertOntologyDefinition.js.map +1 -0
  307. package/build/esm/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js +57 -0
  308. package/build/esm/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js.map +1 -0
  309. package/build/esm/conversion/toMarketplace/convertOntologyToValueTypeIr.js +24 -0
  310. package/build/esm/conversion/toMarketplace/convertOntologyToValueTypeIr.js.map +1 -0
  311. package/build/esm/conversion/toMarketplace/convertSectionConditionalOverride.js +35 -0
  312. package/build/esm/conversion/toMarketplace/convertSectionConditionalOverride.js.map +1 -0
  313. package/build/esm/conversion/toMarketplace/convertSpt.js +62 -0
  314. package/build/esm/conversion/toMarketplace/convertSpt.js.map +1 -0
  315. package/build/esm/conversion/toMarketplace/convertValueType.js +25 -0
  316. package/build/esm/conversion/toMarketplace/convertValueType.js.map +1 -0
  317. package/build/esm/conversion/toMarketplace/convertValueTypeDataConstraints.js +30 -0
  318. package/build/esm/conversion/toMarketplace/convertValueTypeDataConstraints.js.map +1 -0
  319. package/build/esm/conversion/toMarketplace/convertValueTypesToIr.js +34 -0
  320. package/build/esm/conversion/toMarketplace/convertValueTypesToIr.js.map +1 -0
  321. package/build/esm/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.js +83 -0
  322. package/build/esm/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.js.map +1 -0
  323. package/build/esm/conversion/toMarketplace/getFormContentOrdering.js +39 -0
  324. package/build/esm/conversion/toMarketplace/getFormContentOrdering.js.map +1 -0
  325. package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js +124 -0
  326. package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js.map +1 -0
  327. package/build/esm/index.js +5 -5
  328. package/build/esm/index.js.map +1 -1
  329. package/build/esm/util/OptionalFields.js +2 -0
  330. package/build/esm/util/OptionalFields.js.map +1 -0
  331. package/build/esm/util/RequiredFields.js +2 -0
  332. package/build/esm/util/RequiredFields.js.map +1 -0
  333. package/build/types/api/action/ActionLevelValidationDefinition.d.ts +7 -0
  334. package/build/types/api/action/ActionLevelValidationDefinition.d.ts.map +1 -0
  335. package/build/types/api/action/ActionParameter.d.ts +14 -0
  336. package/build/types/api/action/ActionParameter.d.ts.map +1 -0
  337. package/build/types/api/action/ActionParameterAllowedValues.d.ts +50 -0
  338. package/build/types/api/action/ActionParameterAllowedValues.d.ts.map +1 -0
  339. package/build/types/api/action/ActionParameterConditionalOverride.d.ts +26 -0
  340. package/build/types/api/action/ActionParameterConditionalOverride.d.ts.map +1 -0
  341. package/build/types/api/action/ActionParameterConfiguration.d.ts +20 -0
  342. package/build/types/api/action/ActionParameterConfiguration.d.ts.map +1 -0
  343. package/build/types/api/action/ActionParameterType.d.ts +6 -0
  344. package/build/types/api/action/ActionParameterType.d.ts.map +1 -0
  345. package/build/types/api/action/ActionSection.d.ts +13 -0
  346. package/build/types/api/action/ActionSection.d.ts.map +1 -0
  347. package/build/types/api/action/ActionStatus.d.ts +2 -0
  348. package/build/types/api/action/ActionStatus.d.ts.map +1 -0
  349. package/build/types/api/action/ActionType.d.ts +36 -0
  350. package/build/types/api/action/ActionType.d.ts.map +1 -0
  351. package/build/types/api/action/ActionValidationRule.d.ts +2 -0
  352. package/build/types/api/action/ActionValidationRule.d.ts.map +1 -0
  353. package/build/types/api/action/ConditionDefinition.d.ts +15 -0
  354. package/build/types/api/action/ConditionDefinition.d.ts.map +1 -0
  355. package/build/types/api/action/MappingValue.d.ts +13 -0
  356. package/build/types/api/action/MappingValue.d.ts.map +1 -0
  357. package/build/types/api/action/SectionConditionalOverride.d.ts +2 -0
  358. package/build/types/api/action/SectionConditionalOverride.d.ts.map +1 -0
  359. package/build/types/api/action/SubmissionMetadata.d.ts +6 -0
  360. package/build/types/api/action/SubmissionMetadata.d.ts.map +1 -0
  361. package/build/types/api/{iconNames.d.ts.map → common/BlueprintIcons.d.ts.map} +1 -1
  362. package/build/types/api/common/OntologyDefinition.d.ts +6 -0
  363. package/build/types/api/common/OntologyDefinition.d.ts.map +1 -0
  364. package/build/types/api/common/OntologyEntityBase.d.ts +5 -0
  365. package/build/types/api/common/OntologyEntityBase.d.ts.map +1 -0
  366. package/build/types/api/common/OntologyEntityTypeEnum.d.ts +8 -0
  367. package/build/types/api/common/OntologyEntityTypeEnum.d.ts.map +1 -0
  368. package/build/types/api/common/OntologyEntityTypeMapping.d.ts +16 -0
  369. package/build/types/api/common/OntologyEntityTypeMapping.d.ts.map +1 -0
  370. package/build/types/api/common/TypeClass.d.ts +4 -0
  371. package/build/types/api/common/TypeClass.d.ts.map +1 -0
  372. package/build/types/api/defineAction.d.ts +30 -1
  373. package/build/types/api/defineAction.d.ts.map +1 -1
  374. package/build/types/api/defineInterface.d.ts +5 -3
  375. package/build/types/api/defineInterface.d.ts.map +1 -1
  376. package/build/types/api/defineInterfaceLinkConstraint.d.ts +1 -1
  377. package/build/types/api/defineInterfaceLinkConstraint.d.ts.map +1 -1
  378. package/build/types/api/defineLink.d.ts +1 -1
  379. package/build/types/api/defineLink.d.ts.map +1 -1
  380. package/build/types/api/defineObject.d.ts +2 -4
  381. package/build/types/api/defineObject.d.ts.map +1 -1
  382. package/build/types/api/defineOntology.d.ts +10 -3
  383. package/build/types/api/defineOntology.d.ts.map +1 -1
  384. package/build/types/api/defineSpt.d.ts +2 -1
  385. package/build/types/api/defineSpt.d.ts.map +1 -1
  386. package/build/types/api/defineValueType.d.ts +2 -1
  387. package/build/types/api/defineValueType.d.ts.map +1 -1
  388. package/build/types/api/importOntologyEntity.d.ts +1 -1
  389. package/build/types/api/importOntologyEntity.d.ts.map +1 -1
  390. package/build/types/api/{defineImportSpt.d.ts → importSharedPropertyType.d.ts} +2 -1
  391. package/build/types/api/importSharedPropertyType.d.ts.map +1 -0
  392. package/build/types/api/interface/InterfacePropertyType.d.ts +5 -0
  393. package/build/types/api/interface/InterfacePropertyType.d.ts.map +1 -0
  394. package/build/types/api/interface/InterfaceType.d.ts +10 -0
  395. package/build/types/api/interface/InterfaceType.d.ts.map +1 -0
  396. package/build/types/api/interface/getFlattenedInterfaceProperties.d.ts +3 -0
  397. package/build/types/api/interface/getFlattenedInterfaceProperties.d.ts.map +1 -0
  398. package/build/types/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.d.ts +3 -0
  399. package/build/types/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.d.ts.map +1 -0
  400. package/build/types/api/links/LinkType.d.ts +71 -0
  401. package/build/types/api/links/LinkType.d.ts.map +1 -0
  402. package/build/types/api/namespace/combineApiNamespaceIfMissing.d.ts +1 -0
  403. package/build/types/api/namespace/combineApiNamespaceIfMissing.d.ts.map +1 -0
  404. package/build/types/api/object/InterfaceImplementation.d.ts +8 -0
  405. package/build/types/api/object/InterfaceImplementation.d.ts.map +1 -0
  406. package/build/types/api/object/ObjectPropertyType.d.ts +27 -0
  407. package/build/types/api/object/ObjectPropertyType.d.ts.map +1 -0
  408. package/build/types/api/object/ObjectPropertyTypeUserDefinition.d.ts +3 -0
  409. package/build/types/api/object/ObjectPropertyTypeUserDefinition.d.ts.map +1 -0
  410. package/build/types/api/object/ObjectType.d.ts +29 -0
  411. package/build/types/api/object/ObjectType.d.ts.map +1 -0
  412. package/build/types/api/object/ObjectTypeDatasourceDefinition.d.ts +11 -0
  413. package/build/types/api/object/ObjectTypeDatasourceDefinition.d.ts.map +1 -0
  414. package/build/types/api/object/ObjectTypeDefinition.d.ts +26 -0
  415. package/build/types/api/object/ObjectTypeDefinition.d.ts.map +1 -0
  416. package/build/types/api/object/ObjectTypeStatus.d.ts +5 -0
  417. package/build/types/api/object/ObjectTypeStatus.d.ts.map +1 -0
  418. package/build/types/api/properties/Nullability.d.ts +4 -0
  419. package/build/types/api/properties/Nullability.d.ts.map +1 -0
  420. package/build/types/api/properties/PropertyTypeType.d.ts +33 -0
  421. package/build/types/api/properties/PropertyTypeType.d.ts.map +1 -0
  422. package/build/types/api/properties/SharedPropertyType.d.ts +22 -0
  423. package/build/types/api/properties/SharedPropertyType.d.ts.map +1 -0
  424. package/build/types/api/propertyConversionUtils.d.ts +2 -20
  425. package/build/types/api/propertyConversionUtils.d.ts.map +1 -1
  426. package/build/types/api/values/ValueTypeDefinitionVersion.d.ts +14 -0
  427. package/build/types/api/values/ValueTypeDefinitionVersion.d.ts.map +1 -0
  428. package/build/types/api/values/ValueTypeType.d.ts +178 -0
  429. package/build/types/api/values/ValueTypeType.d.ts.map +1 -0
  430. package/build/types/api/wrapWithProxy.d.ts +1 -1
  431. package/build/types/api/wrapWithProxy.d.ts.map +1 -1
  432. package/build/types/conversion/toConjure/distributeTypeHelper.d.ts +3 -0
  433. package/build/types/conversion/toConjure/distributeTypeHelper.d.ts.map +1 -0
  434. package/build/types/conversion/toMarketplace/convertActionParameterConditionalOverride.d.ts +4 -0
  435. package/build/types/conversion/toMarketplace/convertActionParameterConditionalOverride.d.ts.map +1 -0
  436. package/build/types/conversion/toMarketplace/convertActionParameters.d.ts +3 -0
  437. package/build/types/conversion/toMarketplace/convertActionParameters.d.ts.map +1 -0
  438. package/build/types/conversion/toMarketplace/convertActionSections.d.ts +3 -0
  439. package/build/types/conversion/toMarketplace/convertActionSections.d.ts.map +1 -0
  440. package/build/types/conversion/toMarketplace/convertActionValidation.d.ts +3 -0
  441. package/build/types/conversion/toMarketplace/convertActionValidation.d.ts.map +1 -0
  442. package/build/types/conversion/toMarketplace/convertActionVisibility.d.ts +2 -0
  443. package/build/types/conversion/toMarketplace/convertActionVisibility.d.ts.map +1 -0
  444. package/build/types/conversion/toMarketplace/convertCardinality.d.ts +3 -0
  445. package/build/types/conversion/toMarketplace/convertCardinality.d.ts.map +1 -0
  446. package/build/types/conversion/toMarketplace/convertConditionDefinition.d.ts +3 -0
  447. package/build/types/conversion/toMarketplace/convertConditionDefinition.d.ts.map +1 -0
  448. package/build/types/conversion/toMarketplace/convertDataConstraintToDataConstraints.d.ts +2 -0
  449. package/build/types/conversion/toMarketplace/convertDataConstraintToDataConstraints.d.ts.map +1 -0
  450. package/build/types/conversion/toMarketplace/convertDatasourceDefinition.d.ts +4 -0
  451. package/build/types/conversion/toMarketplace/convertDatasourceDefinition.d.ts.map +1 -0
  452. package/build/types/conversion/toMarketplace/convertInterface.d.ts +3 -0
  453. package/build/types/conversion/toMarketplace/convertInterface.d.ts.map +1 -0
  454. package/build/types/conversion/toMarketplace/convertLink.d.ts +3 -0
  455. package/build/types/conversion/toMarketplace/convertLink.d.ts.map +1 -0
  456. package/build/types/conversion/toMarketplace/convertMappingValue.d.ts +3 -0
  457. package/build/types/conversion/toMarketplace/convertMappingValue.d.ts.map +1 -0
  458. package/build/types/conversion/toMarketplace/convertNullabilityToDataConstraint.d.ts +7 -0
  459. package/build/types/conversion/toMarketplace/convertNullabilityToDataConstraint.d.ts.map +1 -0
  460. package/build/types/conversion/toMarketplace/convertObject.d.ts +9 -0
  461. package/build/types/conversion/toMarketplace/convertObject.d.ts.map +1 -0
  462. package/build/types/conversion/toMarketplace/convertObjectPropertyType.d.ts +3 -0
  463. package/build/types/conversion/toMarketplace/convertObjectPropertyType.d.ts.map +1 -0
  464. package/build/types/conversion/toMarketplace/convertOntologyDefinition.d.ts +3 -0
  465. package/build/types/conversion/toMarketplace/convertOntologyDefinition.d.ts.map +1 -0
  466. package/build/types/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.d.ts +3 -0
  467. package/build/types/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.d.ts.map +1 -0
  468. package/build/types/conversion/toMarketplace/convertOntologyToValueTypeIr.d.ts +3 -0
  469. package/build/types/conversion/toMarketplace/convertOntologyToValueTypeIr.d.ts.map +1 -0
  470. package/build/types/conversion/toMarketplace/convertSectionConditionalOverride.d.ts +3 -0
  471. package/build/types/conversion/toMarketplace/convertSectionConditionalOverride.d.ts.map +1 -0
  472. package/build/types/conversion/toMarketplace/convertSpt.d.ts +3 -0
  473. package/build/types/conversion/toMarketplace/convertSpt.d.ts.map +1 -0
  474. package/build/types/conversion/toMarketplace/convertValueType.d.ts +3 -0
  475. package/build/types/conversion/toMarketplace/convertValueType.d.ts.map +1 -0
  476. package/build/types/conversion/toMarketplace/convertValueTypeDataConstraints.d.ts +2 -0
  477. package/build/types/conversion/toMarketplace/convertValueTypeDataConstraints.d.ts.map +1 -0
  478. package/build/types/conversion/toMarketplace/convertValueTypesToIr.d.ts +3 -0
  479. package/build/types/conversion/toMarketplace/convertValueTypesToIr.d.ts.map +1 -0
  480. package/build/types/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.d.ts +2 -0
  481. package/build/types/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.d.ts.map +1 -0
  482. package/build/types/conversion/toMarketplace/getFormContentOrdering.d.ts +3 -0
  483. package/build/types/conversion/toMarketplace/getFormContentOrdering.d.ts.map +1 -0
  484. package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.d.ts +3 -0
  485. package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.d.ts.map +1 -0
  486. package/build/types/index.d.ts +22 -6
  487. package/build/types/index.d.ts.map +1 -1
  488. package/build/types/util/OptionalFields.d.ts +4 -0
  489. package/build/types/util/OptionalFields.d.ts.map +1 -0
  490. package/build/types/util/RequiredFields.d.ts +4 -0
  491. package/build/types/util/RequiredFields.d.ts.map +1 -0
  492. package/package.json +3 -3
  493. package/build/browser/api/defineImportSpt.js.map +0 -1
  494. package/build/browser/api/iconNames.js +0 -2
  495. package/build/browser/api/iconNames.js.map +0 -1
  496. package/build/browser/api/ontologyUtils.js +0 -243
  497. package/build/browser/api/ontologyUtils.js.map +0 -1
  498. package/build/browser/api/types.js.map +0 -1
  499. package/build/esm/api/defineImportSpt.js.map +0 -1
  500. package/build/esm/api/iconNames.js +0 -2
  501. package/build/esm/api/iconNames.js.map +0 -1
  502. package/build/esm/api/ontologyUtils.js +0 -243
  503. package/build/esm/api/ontologyUtils.js.map +0 -1
  504. package/build/esm/api/types.js.map +0 -1
  505. package/build/types/api/defineImportSpt.d.ts.map +0 -1
  506. package/build/types/api/ontologyUtils.d.ts +0 -8
  507. package/build/types/api/ontologyUtils.d.ts.map +0 -1
  508. package/build/types/api/types.d.ts +0 -625
  509. package/build/types/api/types.d.ts.map +0 -1
  510. /package/build/types/api/{iconNames.d.ts → common/BlueprintIcons.d.ts} +0 -0
@@ -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,IAAI,EAAE,EAC3B,WACF,CAAC;EAED,MAAMQ,wBAAwB,GAAGH,+BAA+B,CAACI,MAAM,GAAG,CAAC,GACvEJ,+BAA+B,CAACK,MAAM,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAG,GAAG,GAAGC,CAAC,CAAC,GAC7DC,SAAS;EAEb,MAAMC,mBAAmB,GAAGP,qBAAqB,CAACE,MAAM,GAAG,CAAC,GACxDF,qBAAqB,CAACG,MAAM,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAG,GAAG,GAAGC,CAAC,CAAC,GACnDC,SAAS;EAEb,MAAME,gBAAgB,GAAGvB,eAAe,CACtCM,UAAU,CAACM,OAAO,EAClBT,2BAA2B,CACzBG,UAAU,EACVA,UAAU,CAACE,UAAU,IAAI,EAC3B,CAAC,EACDQ,wBAAwB,EACxBM,mBACF,CAAC;EAED,MAAME,eAAe,GAAGlB,UAAU,CAACmB,oBAAoB,IAAI,EAAE;EAE7D,OAAO;IACLnB,UAAU,EAAE;MACVoB,eAAe,EAAE;QACfC,WAAW,EAAErB,UAAU,CAACqB,WAAW;QACnCC,WAAW,EAAEtB,UAAU,CAACsB,WAAW;QACnCC,gBAAgB,EAAER,SAAS;QAC3BS,IAAI,EAAE;UACJC,IAAI,EAAE,WAAW;UACjBC,SAAS,EAAE1B,UAAU,CAACwB,IAAI,IAAI;YAAEG,OAAO,EAAE,MAAM;YAAEC,KAAK,EAAE;UAAU;QACpE,CAAC;QACDC,iBAAiB,EAAE7B,UAAU,CAAC6B,iBAAiB;QAC/CC,UAAU,EAAE9B,UAAU,CAAC8B,UAAU,IAAI;MACvC,CAAC;MACDC,WAAW,EAAE,CAAC/B,UAAU,CAACgC,yBAAyB,CAAC;MACnDC,aAAa,EAAEC,MAAM,CAACC,WAAW,CAC/BnC,UAAU,CAACE,UAAU,EAAEkC,GAAG,CACxBC,GAAG,IAAI,CAACA,GAAG,CAAC/B,OAAO,EAAER,yBAAyB,CAACuC,GAAG,CAAC,CACrD,CAAC,IAAI,EACP,CAAC;MACDC,oBAAoB,EAAEtC,UAAU,CAACuC,oBAAoB;MACrDjC,OAAO,EAAEN,UAAU,CAACM,OAAO;MAC3BkC,MAAM,EAAE7C,mBAAmB,CAACK,UAAU,CAACwC,MAAM,CAAC;MAC9CC,QAAQ,EAAE,KAAK;MACfC,qBAAqB,EAAExB,eAAe,CAACkB,GAAG,CAACO,IAAI,KAAK;QAClDC,oBAAoB,EAAED,IAAI,CAACE,UAAU,CAACvC,OAAO;QAC7CwC,OAAO,EAAE,CAAC,CAAC;QACXC,YAAY,EAAE,CAAC,CAAC;QAChB7C,UAAU,EAAEgC,MAAM,CAACC,WAAW,CAC5BQ,IAAI,CAACK,eAAe,CAACZ,GAAG,CACtBa,OAAO,IAAI,CAACxD,kBAAkB,CAACwD,OAAO,CAACC,iBAAiB,CAAC,EAAE;UACzDC,eAAe,EAAEF,OAAO,CAACG;QAC3B,CAAC,CACH,CACF;MACF,CAAC,CAAC,CAAC;MACHC,uBAAuB,EAAE,CAAC;IAC5B,CAAC;IACDC,WAAW,EAAE,CAAC,GAAGrD,mBAAmB,EAAEgB,gBAAgB,CAAC;IACvDsC,cAAc,EAAE;MAAEC,iBAAiB,EAAExD,UAAU,CAACyD,YAAY,IAAI;IAAM;EACxE,CAAC;AACH;;AAEA;AACA;AACA;AACA,OAAO,SAASjD,oBAAoBA,CAClCN,UAAgC,EAChCwD,WAAiC,EACvB;EACV,OAAOxD,UAAU,CACdkC,GAAG,CAAChC,IAAI,IAAI;IACX,IACE,OAAOA,IAAI,CAACqB,IAAI,KAAK,QAAQ,IAC1BrB,IAAI,CAACqB,IAAI,CAACA,IAAI,KAAK,SAAS,IAC5BrB,IAAI,CAACqB,IAAI,CAACiC,WAAW,KAAKA,WAAW,EACxC;MACA,OAAOtD,IAAI,CAACqB,IAAI,CAACkC,qBAAqB;IACxC;IACA,OAAO5C,SAAS;EAClB,CAAC,CAAC,CACD6C,MAAM,CAAEvB,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,CAACM,QAAQ,CAACE,IAAI,CAAC,IACnC,CAACT,cAAc,CAACO,QAAQ,CAACG,WAAW,CAAC,IAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAF5ClB,SAAS,QAGP,iBAAiBa,OAAO,aACtBT,mBAAmB,CAACQ,QAAQ,CAACE,IAAI,CAAC,gCACJ,IALlCd,SAAS;EAOT,MAAMmB,MAA8B,GAAG;IACrCN,OAAO,EAAED,QAAQ,CAACC,OAAO;IACzBO,yBAAyB,EAAER,QAAQ,CAACS,kBAAkB,EAAER,OAAO;IAC/DS,eAAe,EAAE;MACfC,WAAW,EAAEX,QAAQ,CAACW,WAAW;MACjCC,WAAW,EAAEZ,QAAQ,CAACY,WAAW;MACjCC,UAAU,EAAEb,QAAQ,CAACa,UAAU,IAAI;IACrC,CAAC;IACDC,gBAAgB,EAAEd,QAAQ,CAACc,gBAAgB,IAAI,IAAI;IACnDC,cAAc,EAAEC,SAAS;IACzBC,aAAa,EAAEjB,QAAQ,CAACiB,aAAa;IACrCf,IAAI,EAAEF,QAAQ,CAACkB,KAAK,GAChB;MACAhB,IAAI,EAAE,OAAgB;MACtBgB,KAAK,EAAE;QACLC,OAAO,EAAErB,gCAAgC,CAACE,QAAQ,CAACE,IAAI;MACzD;IACF,CAAC,GACCJ,gCAAgC,CAACE,QAAQ,CAACE,IAAI,CAAC;IACnDC,WAAW,EAAEH,QAAQ,CAACG,WAAW,KAC3BT,wBAAwB,CAACM,QAAQ,CAACE,IAAI,CAAC,GAAG,EAAE,GAAGX,kBAAkB,CAAC;IACxE6B,MAAM,EAAE/B,mBAAmB,CAACW,QAAQ,CAACoB,MAAM,CAAC;IAC5CC,YAAY,EAAEL,SAAS;IACvBM,eAAe,EAAEtB,QAAQ,CAACuB,SAAS,GAC/B1B,+BAA+B,CAACG,QAAQ,CAACuB,SAAS,CAACC,WAAW,CAAC,GAC/D7B,kCAAkC,CAACK,QAAQ,CAAC;IAChDyB,qBAAqB,EAAEzB,QAAQ,CAACS,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,28 @@
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) {
21
+ return {
22
+ ontology: convertOntologyDefinitionToWireBlockData(ontology),
23
+ importedOntology: convertOntologyDefinitionToWireBlockData(importedTypes),
24
+ valueTypes: convertOntologyToValueTypeIr(ontology),
25
+ importedValueTypes: convertOntologyToValueTypeIr(importedTypes)
26
+ };
27
+ }
28
+ //# sourceMappingURL=convertOntologyDefinition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertOntologyDefinition.js","names":["importedTypes","convertOntologyDefinitionToWireBlockData","convertOntologyToValueTypeIr","convertOntologyDefinition","ontology","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): OntologyIr {\n return {\n ontology: convertOntologyDefinitionToWireBlockData(ontology),\n importedOntology: convertOntologyDefinitionToWireBlockData(importedTypes),\n valueTypes: convertOntologyToValueTypeIr(ontology),\n importedValueTypes: convertOntologyToValueTypeIr(importedTypes),\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,EAChB;EACZ,OAAO;IACLA,QAAQ,EAAEH,wCAAwC,CAACG,QAAQ,CAAC;IAC5DC,gBAAgB,EAAEJ,wCAAwC,CAACD,aAAa,CAAC;IACzEM,UAAU,EAAEJ,4BAA4B,CAACE,QAAQ,CAAC;IAClDG,kBAAkB,EAAEL,4BAA4B,CAACF,aAAa;EAChE,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 { 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 [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","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 { convertAction } 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 [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,SAASC,aAAa,QAAQ,6BAA6B;AAC3D,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,CAACP,sBAAsB,CAACY,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,CAACP,sBAAsB,CAACiB,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,CAACP,sBAAsB,CAACqB,cAAc,CAChD,CAAC,CACER,GAAG,CACF,CAAC,CAACC,OAAO,EAAEQ,aAAa,CAAC,KAAK;MAC5B,OAAO,CAACR,OAAO,EAAE;QACfQ,aAAa,EAAEpB,gBAAgB,CAACoB,aAAa;MAC/C,CAAC,CAAC;IACJ,CACF,CACJ,CAAC;IACDC,SAAS,EAAEd,MAAM,CAACC,WAAW,CAC3BD,MAAM,CAACE,OAAO,CAACJ,QAAQ,CAACP,sBAAsB,CAACwB,SAAS,CAAC,CAAC,CAACX,GAAG,CAE5D,CAAC,CAACY,EAAE,EAAEC,IAAI,CAAC,KAAK;MAChB,OAAO,CAACD,EAAE,EAAEtB,WAAW,CAACuB,IAAI,CAAC,CAAC;IAChC,CAAC,CACH,CAAC;IACDC,WAAW,EAAElB,MAAM,CAACC,WAAW,CAC7BD,MAAM,CAACE,OAAO,CAACJ,QAAQ,CAACP,sBAAsB,CAAC4B,WAAW,CAAC,CAAC,CAACf,GAAG,CAE9D,CAAC,CAACC,OAAO,EAAEe,MAAM,CAAC,KAAK;MACvB,OAAO,CAACf,OAAO,EAAEb,aAAa,CAAC4B,MAAM,CAAC,CAAC;IACzC,CAAC,CACH,CAAC;IACDC,0BAA0B,EAAE;MAC1BH,WAAW,EAAElB,MAAM,CAACC,WAAW,CAC7BD,MAAM,CAACE,OAAO,CAACJ,QAAQ,CAACP,sBAAsB,CAAC4B,WAAW,CAAC,CAAC,CACzDG,MAAM,CAAC,CAAC,CAACjB,OAAO,EAAEe,MAAM,CAAC,KAAKA,MAAM,CAACG,UAAU,CAAC,CAChDnB,GAAG,CAEF,CAAC,CAACC,OAAO,EAAEe,MAAM,CAAC,KAAK;QACvB,OAAO,CAACf,OAAO,EAAE;UACfmB,iBAAiB,EAAE;YACjBC,eAAe,EAAE,IAAI;YACrBC,kBAAkB,EAAE,IAAI;YACxBC,aAAa,EAAE;UACjB;QACF,CAAC,CAAC;MACJ,CAAC,CACL,CAAC;MACDb,SAAS,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":[]}
@@ -0,0 +1,35 @@
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 { convertConditionDefinition } from "./convertConditionDefinition.js";
18
+ export function convertSectionConditionalOverride(override, defaultVisibility) {
19
+ return {
20
+ condition: convertConditionDefinition(override.condition),
21
+ sectionBlockOverrides: [{
22
+ type: "visibility",
23
+ visibility: {
24
+ visibility: defaultVisibility === "visible" ? {
25
+ type: "hidden",
26
+ hidden: {}
27
+ } : {
28
+ type: "visible",
29
+ visible: {}
30
+ }
31
+ }
32
+ }]
33
+ };
34
+ }
35
+ //# sourceMappingURL=convertSectionConditionalOverride.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertSectionConditionalOverride.js","names":["convertConditionDefinition","convertSectionConditionalOverride","override","defaultVisibility","condition","sectionBlockOverrides","type","visibility","hidden","visible"],"sources":["convertSectionConditionalOverride.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 { OntologyIrSectionConditionalOverride } from \"@osdk/client.unstable\";\nimport type { SectionConditionalOverride } from \"../../api/action/SectionConditionalOverride.js\";\nimport { convertConditionDefinition } from \"./convertConditionDefinition.js\";\n\nexport function convertSectionConditionalOverride(\n override: SectionConditionalOverride,\n defaultVisibility: \"visible\" | \"hidden\",\n): OntologyIrSectionConditionalOverride {\n return {\n condition: convertConditionDefinition(override.condition),\n sectionBlockOverrides: [\n {\n type: \"visibility\",\n visibility: {\n visibility: defaultVisibility === \"visible\"\n ? {\n type: \"hidden\",\n hidden: {},\n }\n : {\n type: \"visible\",\n visible: {},\n },\n },\n },\n ],\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,0BAA0B,QAAQ,iCAAiC;AAE5E,OAAO,SAASC,iCAAiCA,CAC/CC,QAAoC,EACpCC,iBAAuC,EACD;EACtC,OAAO;IACLC,SAAS,EAAEJ,0BAA0B,CAACE,QAAQ,CAACE,SAAS,CAAC;IACzDC,qBAAqB,EAAE,CACrB;MACEC,IAAI,EAAE,YAAY;MAClBC,UAAU,EAAE;QACVA,UAAU,EAAEJ,iBAAiB,KAAK,SAAS,GACvC;UACAG,IAAI,EAAE,QAAQ;UACdE,MAAM,EAAE,CAAC;QACX,CAAC,GACC;UACAF,IAAI,EAAE,SAAS;UACfG,OAAO,EAAE,CAAC;QACZ;MACJ;IACF,CAAC;EAEL,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,62 @@
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 { convertNullabilityToDataConstraint } from "./convertNullabilityToDataConstraint.js";
18
+ import { propertyTypeTypeToOntologyIrType } from "./propertyTypeTypeToOntologyIrType.js";
19
+ export function convertSpt({
20
+ type,
21
+ array,
22
+ description,
23
+ apiName,
24
+ displayName,
25
+ visibility,
26
+ gothamMapping,
27
+ typeClasses,
28
+ valueType,
29
+ nullability
30
+ }) {
31
+ const dataConstraint = convertNullabilityToDataConstraint({
32
+ type,
33
+ nullability
34
+ });
35
+ return {
36
+ apiName,
37
+ displayMetadata: {
38
+ displayName: displayName ?? apiName,
39
+ visibility: visibility ?? "NORMAL",
40
+ description
41
+ },
42
+ type: array ? {
43
+ type: "array",
44
+ array: {
45
+ subtype: propertyTypeTypeToOntologyIrType(type)
46
+ }
47
+ } : propertyTypeTypeToOntologyIrType(type),
48
+ aliases: [],
49
+ baseFormatter: undefined,
50
+ dataConstraints: dataConstraint,
51
+ gothamMapping: gothamMapping,
52
+ indexedForSearch: true,
53
+ typeClasses: typeClasses ?? [],
54
+ valueType: valueType === undefined ? undefined : {
55
+ apiName: valueType.apiName,
56
+ version: valueType.version,
57
+ packageNamespace: valueType.packageNamespace,
58
+ displayMetadata: valueType.displayMetadata
59
+ }
60
+ };
61
+ }
62
+ //# sourceMappingURL=convertSpt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertSpt.js","names":["convertNullabilityToDataConstraint","propertyTypeTypeToOntologyIrType","convertSpt","type","array","description","apiName","displayName","visibility","gothamMapping","typeClasses","valueType","nullability","dataConstraint","displayMetadata","subtype","aliases","baseFormatter","undefined","dataConstraints","indexedForSearch","version","packageNamespace"],"sources":["convertSpt.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 { OntologyIrSharedPropertyType } from \"@osdk/client.unstable\";\nimport type { SharedPropertyType } from \"../../api/properties/SharedPropertyType.js\";\nimport { convertNullabilityToDataConstraint } from \"./convertNullabilityToDataConstraint.js\";\nimport { propertyTypeTypeToOntologyIrType } from \"./propertyTypeTypeToOntologyIrType.js\";\n\nexport function convertSpt(\n {\n type,\n array,\n description,\n apiName,\n displayName,\n visibility,\n gothamMapping,\n typeClasses,\n valueType,\n nullability,\n }: SharedPropertyType,\n): OntologyIrSharedPropertyType {\n const dataConstraint:\n | OntologyIrSharedPropertyType[\"dataConstraints\"]\n | undefined = convertNullabilityToDataConstraint({ type, nullability });\n return {\n apiName,\n displayMetadata: {\n displayName: displayName ?? apiName,\n visibility: visibility ?? \"NORMAL\",\n description,\n },\n type: array\n ? {\n type: \"array\" as const,\n array: {\n subtype: propertyTypeTypeToOntologyIrType(type),\n },\n }\n : propertyTypeTypeToOntologyIrType(type),\n aliases: [],\n baseFormatter: undefined,\n dataConstraints: dataConstraint,\n gothamMapping: gothamMapping,\n indexedForSearch: true,\n typeClasses: typeClasses ?? [],\n valueType: valueType === undefined ? undefined : {\n apiName: valueType.apiName,\n version: valueType.version,\n packageNamespace: valueType.packageNamespace,\n displayMetadata: valueType.displayMetadata,\n },\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,kCAAkC,QAAQ,yCAAyC;AAC5F,SAASC,gCAAgC,QAAQ,uCAAuC;AAExF,OAAO,SAASC,UAAUA,CACxB;EACEC,IAAI;EACJC,KAAK;EACLC,WAAW;EACXC,OAAO;EACPC,WAAW;EACXC,UAAU;EACVC,aAAa;EACbC,WAAW;EACXC,SAAS;EACTC;AACkB,CAAC,EACS;EAC9B,MAAMC,cAEO,GAAGb,kCAAkC,CAAC;IAAEG,IAAI;IAAES;EAAY,CAAC,CAAC;EACzE,OAAO;IACLN,OAAO;IACPQ,eAAe,EAAE;MACfP,WAAW,EAAEA,WAAW,IAAID,OAAO;MACnCE,UAAU,EAAEA,UAAU,IAAI,QAAQ;MAClCH;IACF,CAAC;IACDF,IAAI,EAAEC,KAAK,GACP;MACAD,IAAI,EAAE,OAAgB;MACtBC,KAAK,EAAE;QACLW,OAAO,EAAEd,gCAAgC,CAACE,IAAI;MAChD;IACF,CAAC,GACCF,gCAAgC,CAACE,IAAI,CAAC;IAC1Ca,OAAO,EAAE,EAAE;IACXC,aAAa,EAAEC,SAAS;IACxBC,eAAe,EAAEN,cAAc;IAC/BJ,aAAa,EAAEA,aAAa;IAC5BW,gBAAgB,EAAE,IAAI;IACtBV,WAAW,EAAEA,WAAW,IAAI,EAAE;IAC9BC,SAAS,EAAEA,SAAS,KAAKO,SAAS,GAAGA,SAAS,GAAG;MAC/CZ,OAAO,EAAEK,SAAS,CAACL,OAAO;MAC1Be,OAAO,EAAEV,SAAS,CAACU,OAAO;MAC1BC,gBAAgB,EAAEX,SAAS,CAACW,gBAAgB;MAC5CR,eAAe,EAAEH,SAAS,CAACG;IAC7B;EACF,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,25 @@
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
+ export function convertValueType(valueType) {
18
+ return {
19
+ apiName: valueType.apiName,
20
+ version: valueType.version,
21
+ packageNamespace: valueType.packageNamespace,
22
+ displayMetadata: valueType.displayMetadata
23
+ };
24
+ }
25
+ //# sourceMappingURL=convertValueType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertValueType.js","names":["convertValueType","valueType","apiName","version","packageNamespace","displayMetadata"],"sources":["convertValueType.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 { OntologyIrValueTypeReferenceWithMetadata } from \"@osdk/client.unstable\";\nimport type { ValueTypeDefinitionVersion } from \"../../api/values/ValueTypeDefinitionVersion.js\";\n\nexport function convertValueType(\n valueType: ValueTypeDefinitionVersion,\n): OntologyIrValueTypeReferenceWithMetadata {\n return {\n apiName: valueType.apiName,\n version: valueType.version,\n packageNamespace: valueType.packageNamespace,\n displayMetadata: valueType.displayMetadata,\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,OAAO,SAASA,gBAAgBA,CAC9BC,SAAqC,EACK;EAC1C,OAAO;IACLC,OAAO,EAAED,SAAS,CAACC,OAAO;IAC1BC,OAAO,EAAEF,SAAS,CAACE,OAAO;IAC1BC,gBAAgB,EAAEH,SAAS,CAACG,gBAAgB;IAC5CC,eAAe,EAAEJ,SAAS,CAACI;EAC7B,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,30 @@
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 { dataConstraintToPropertyTypeDataConstraint } from "./dataConstraintToPropertyTypeDataConstraint.js";
18
+ export function convertValueTypeDataConstraints(dataConstraints) {
19
+ if (dataConstraints.length === 0) {
20
+ return undefined;
21
+ }
22
+ const propertyTypeConstraints = dataConstraints.map(constraint => ({
23
+ constraints: dataConstraintToPropertyTypeDataConstraint(constraint.constraint.constraint),
24
+ failureMessage: constraint.constraint.failureMessage
25
+ }));
26
+ return {
27
+ propertyTypeConstraints
28
+ };
29
+ }
30
+ //# sourceMappingURL=convertValueTypeDataConstraints.js.map