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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (514) hide show
  1. package/CHANGELOG.md +91 -0
  2. package/README.md +55 -13
  3. package/build/browser/api/action/ActionLevelValidationDefinition.js +2 -0
  4. package/build/browser/api/action/ActionLevelValidationDefinition.js.map +1 -0
  5. package/build/browser/api/action/ActionParameter.js +2 -0
  6. package/build/browser/api/action/ActionParameter.js.map +1 -0
  7. package/build/browser/api/action/ActionParameterAllowedValues.js +2 -0
  8. package/build/browser/api/action/ActionParameterAllowedValues.js.map +1 -0
  9. package/build/browser/api/action/ActionParameterConditionalOverride.js +2 -0
  10. package/build/browser/api/action/ActionParameterConditionalOverride.js.map +1 -0
  11. package/build/browser/api/action/ActionParameterConfiguration.js +2 -0
  12. package/build/browser/api/action/ActionParameterConfiguration.js.map +1 -0
  13. package/build/browser/api/action/ActionParameterType.js +22 -0
  14. package/build/browser/api/action/ActionParameterType.js.map +1 -0
  15. package/build/browser/api/action/ActionSection.js +2 -0
  16. package/build/browser/api/action/ActionSection.js.map +1 -0
  17. package/build/browser/api/action/ActionStatus.js +2 -0
  18. package/build/browser/api/action/ActionStatus.js.map +1 -0
  19. package/build/browser/api/action/ActionType.js +2 -0
  20. package/build/browser/api/action/ActionType.js.map +1 -0
  21. package/build/browser/api/action/ActionValidationRule.js +2 -0
  22. package/build/browser/api/action/ActionValidationRule.js.map +1 -0
  23. package/build/browser/api/action/ConditionDefinition.js +2 -0
  24. package/build/browser/api/action/ConditionDefinition.js.map +1 -0
  25. package/build/browser/api/action/MappingValue.js +2 -0
  26. package/build/browser/api/action/MappingValue.js.map +1 -0
  27. package/build/browser/api/action/SectionConditionalOverride.js +2 -0
  28. package/build/browser/api/action/SectionConditionalOverride.js.map +1 -0
  29. package/build/browser/api/action/SubmissionMetadata.js +2 -0
  30. package/build/browser/api/action/SubmissionMetadata.js.map +1 -0
  31. package/build/browser/api/common/BlueprintIcons.js +2 -0
  32. package/build/browser/api/common/BlueprintIcons.js.map +1 -0
  33. package/build/browser/api/common/OntologyDefinition.js +2 -0
  34. package/build/browser/api/common/OntologyDefinition.js.map +1 -0
  35. package/build/browser/api/common/OntologyEntityBase.js +2 -0
  36. package/build/browser/api/common/OntologyEntityBase.js.map +1 -0
  37. package/build/browser/api/{types.js → common/OntologyEntityTypeEnum.js} +2 -8
  38. package/build/browser/api/common/OntologyEntityTypeEnum.js.map +1 -0
  39. package/build/browser/api/common/OntologyEntityTypeMapping.js +2 -0
  40. package/build/browser/api/common/OntologyEntityTypeMapping.js.map +1 -0
  41. package/build/browser/api/common/TypeClass.js +2 -0
  42. package/build/browser/api/common/TypeClass.js.map +1 -0
  43. package/build/browser/api/defineAction.js +69 -46
  44. package/build/browser/api/defineAction.js.map +1 -1
  45. package/build/browser/api/defineInterface.js +14 -34
  46. package/build/browser/api/defineInterface.js.map +1 -1
  47. package/build/browser/api/defineInterfaceLinkConstraint.js +3 -2
  48. package/build/browser/api/defineInterfaceLinkConstraint.js.map +1 -1
  49. package/build/browser/api/defineLink.js +33 -12
  50. package/build/browser/api/defineLink.js.map +1 -1
  51. package/build/browser/api/defineObject.js +9 -29
  52. package/build/browser/api/defineObject.js.map +1 -1
  53. package/build/browser/api/defineOntology.js +17 -552
  54. package/build/browser/api/defineOntology.js.map +1 -1
  55. package/build/browser/api/defineSpt.js +1 -1
  56. package/build/browser/api/defineSpt.js.map +1 -1
  57. package/build/browser/api/defineValueType.js +1 -1
  58. package/build/browser/api/defineValueType.js.map +1 -1
  59. package/build/browser/api/importOntologyEntity.js +1 -1
  60. package/build/browser/api/importOntologyEntity.js.map +1 -1
  61. package/build/browser/api/{defineImportSpt.js → importSharedPropertyType.js} +2 -3
  62. package/build/browser/api/importSharedPropertyType.js.map +1 -0
  63. package/build/browser/api/interface/InterfacePropertyType.js +2 -0
  64. package/build/browser/api/interface/InterfacePropertyType.js.map +1 -0
  65. package/build/browser/api/interface/InterfaceType.js +2 -0
  66. package/build/browser/api/interface/InterfaceType.js.map +1 -0
  67. package/build/browser/api/interface/getFlattenedInterfaceProperties.js +27 -0
  68. package/build/browser/api/interface/getFlattenedInterfaceProperties.js.map +1 -0
  69. package/build/browser/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.js +42 -0
  70. package/build/browser/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.js.map +1 -0
  71. package/build/browser/api/links/LinkType.js +2 -0
  72. package/build/browser/api/links/LinkType.js.map +1 -0
  73. package/build/browser/api/namespace/combineApiNamespaceIfMissing.js +20 -0
  74. package/build/browser/api/namespace/combineApiNamespaceIfMissing.js.map +1 -0
  75. package/build/browser/api/object/InterfaceImplementation.js +2 -0
  76. package/build/browser/api/object/InterfaceImplementation.js.map +1 -0
  77. package/build/browser/api/object/ObjectPropertyType.js +2 -0
  78. package/build/browser/api/object/ObjectPropertyType.js.map +1 -0
  79. package/build/browser/api/object/ObjectPropertyTypeUserDefinition.js +2 -0
  80. package/build/browser/api/object/ObjectPropertyTypeUserDefinition.js.map +1 -0
  81. package/build/browser/api/object/ObjectType.js +2 -0
  82. package/build/browser/api/object/ObjectType.js.map +1 -0
  83. package/build/browser/api/object/ObjectTypeDatasourceDefinition.js +2 -0
  84. package/build/browser/api/object/ObjectTypeDatasourceDefinition.js.map +1 -0
  85. package/build/browser/api/object/ObjectTypeDefinition.js +2 -0
  86. package/build/browser/api/object/ObjectTypeDefinition.js.map +1 -0
  87. package/build/browser/api/object/ObjectTypeStatus.js +2 -0
  88. package/build/browser/api/object/ObjectTypeStatus.js.map +1 -0
  89. package/build/browser/api/objectStatus.test.js.map +1 -1
  90. package/build/browser/api/overall.test.js +1987 -691
  91. package/build/browser/api/overall.test.js.map +1 -1
  92. package/build/browser/api/properties/Nullability.js +2 -0
  93. package/build/browser/api/properties/Nullability.js.map +1 -0
  94. package/build/browser/api/properties/PropertyTypeType.js +34 -0
  95. package/build/browser/api/properties/PropertyTypeType.js.map +1 -0
  96. package/build/browser/api/properties/SharedPropertyType.js +2 -0
  97. package/build/browser/api/properties/SharedPropertyType.js.map +1 -0
  98. package/build/browser/api/propertyConversionUtils.js +0 -238
  99. package/build/browser/api/propertyConversionUtils.js.map +1 -1
  100. package/build/browser/api/values/ValueTypeDefinitionVersion.js +2 -0
  101. package/build/browser/api/values/ValueTypeDefinitionVersion.js.map +1 -0
  102. package/build/browser/api/values/ValueTypeType.js +2 -0
  103. package/build/browser/api/values/ValueTypeType.js.map +1 -0
  104. package/build/browser/api/wrapWithProxy.js +1 -0
  105. package/build/browser/api/wrapWithProxy.js.map +1 -1
  106. package/build/browser/cli/main.js +13 -4
  107. package/build/browser/cli/main.js.map +1 -1
  108. package/build/browser/conversion/toConjure/distributeTypeHelper.js +23 -0
  109. package/build/browser/conversion/toConjure/distributeTypeHelper.js.map +1 -0
  110. package/build/browser/conversion/toMarketplace/convertActionParameterConditionalOverride.js +88 -0
  111. package/build/browser/conversion/toMarketplace/convertActionParameterConditionalOverride.js.map +1 -0
  112. package/build/browser/conversion/toMarketplace/convertActionParameters.js +31 -0
  113. package/build/browser/conversion/toMarketplace/convertActionParameters.js.map +1 -0
  114. package/build/browser/conversion/toMarketplace/convertActionSections.js +43 -0
  115. package/build/browser/conversion/toMarketplace/convertActionSections.js.map +1 -0
  116. package/build/browser/conversion/toMarketplace/convertActionValidation.js +93 -0
  117. package/build/browser/conversion/toMarketplace/convertActionValidation.js.map +1 -0
  118. package/build/browser/conversion/toMarketplace/convertActionVisibility.js +41 -0
  119. package/build/browser/conversion/toMarketplace/convertActionVisibility.js.map +1 -0
  120. package/build/browser/conversion/toMarketplace/convertCardinality.js +23 -0
  121. package/build/browser/conversion/toMarketplace/convertCardinality.js.map +1 -0
  122. package/build/browser/conversion/toMarketplace/convertConditionDefinition.js +88 -0
  123. package/build/browser/conversion/toMarketplace/convertConditionDefinition.js.map +1 -0
  124. package/build/browser/conversion/toMarketplace/convertDataConstraintToDataConstraints.js +26 -0
  125. package/build/browser/conversion/toMarketplace/convertDataConstraintToDataConstraints.js.map +1 -0
  126. package/build/browser/conversion/toMarketplace/convertDatasourceDefinition.js +89 -0
  127. package/build/browser/conversion/toMarketplace/convertDatasourceDefinition.js.map +1 -0
  128. package/build/browser/conversion/toMarketplace/convertInterface.js +47 -0
  129. package/build/browser/conversion/toMarketplace/convertInterface.js.map +1 -0
  130. package/build/browser/conversion/toMarketplace/convertLink.js +132 -0
  131. package/build/browser/conversion/toMarketplace/convertLink.js.map +1 -0
  132. package/build/browser/conversion/toMarketplace/convertMappingValue.js +41 -0
  133. package/build/browser/conversion/toMarketplace/convertMappingValue.js.map +1 -0
  134. package/build/browser/conversion/toMarketplace/convertNullabilityToDataConstraint.js +43 -0
  135. package/build/browser/conversion/toMarketplace/convertNullabilityToDataConstraint.js.map +1 -0
  136. package/build/browser/conversion/toMarketplace/convertObject.js +108 -0
  137. package/build/browser/conversion/toMarketplace/convertObject.js.map +1 -0
  138. package/build/browser/conversion/toMarketplace/convertObjectPropertyType.js +53 -0
  139. package/build/browser/conversion/toMarketplace/convertObjectPropertyType.js.map +1 -0
  140. package/build/browser/conversion/toMarketplace/convertOntologyDefinition.js +29 -0
  141. package/build/browser/conversion/toMarketplace/convertOntologyDefinition.js.map +1 -0
  142. package/build/browser/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js +57 -0
  143. package/build/browser/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js.map +1 -0
  144. package/build/browser/conversion/toMarketplace/convertOntologyToValueTypeIr.js +24 -0
  145. package/build/browser/conversion/toMarketplace/convertOntologyToValueTypeIr.js.map +1 -0
  146. package/build/browser/conversion/toMarketplace/convertSectionConditionalOverride.js +35 -0
  147. package/build/browser/conversion/toMarketplace/convertSectionConditionalOverride.js.map +1 -0
  148. package/build/browser/conversion/toMarketplace/convertSpt.js +62 -0
  149. package/build/browser/conversion/toMarketplace/convertSpt.js.map +1 -0
  150. package/build/browser/conversion/toMarketplace/convertValueType.js +25 -0
  151. package/build/browser/conversion/toMarketplace/convertValueType.js.map +1 -0
  152. package/build/browser/conversion/toMarketplace/convertValueTypeDataConstraints.js +30 -0
  153. package/build/browser/conversion/toMarketplace/convertValueTypeDataConstraints.js.map +1 -0
  154. package/build/browser/conversion/toMarketplace/convertValueTypesToIr.js +34 -0
  155. package/build/browser/conversion/toMarketplace/convertValueTypesToIr.js.map +1 -0
  156. package/build/browser/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.js +83 -0
  157. package/build/browser/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.js.map +1 -0
  158. package/build/browser/conversion/toMarketplace/getFormContentOrdering.js +39 -0
  159. package/build/browser/conversion/toMarketplace/getFormContentOrdering.js.map +1 -0
  160. package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js +124 -0
  161. package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js.map +1 -0
  162. package/build/browser/index.js +5 -5
  163. package/build/browser/index.js.map +1 -1
  164. package/build/browser/util/OptionalFields.js +2 -0
  165. package/build/browser/util/OptionalFields.js.map +1 -0
  166. package/build/browser/util/RequiredFields.js +2 -0
  167. package/build/browser/util/RequiredFields.js.map +1 -0
  168. package/build/cjs/index.cjs +1177 -1045
  169. package/build/cjs/index.cjs.map +1 -1
  170. package/build/cjs/index.d.cts +417 -346
  171. package/build/esm/api/action/ActionLevelValidationDefinition.js +2 -0
  172. package/build/esm/api/action/ActionLevelValidationDefinition.js.map +1 -0
  173. package/build/esm/api/action/ActionParameter.js +2 -0
  174. package/build/esm/api/action/ActionParameter.js.map +1 -0
  175. package/build/esm/api/action/ActionParameterAllowedValues.js +2 -0
  176. package/build/esm/api/action/ActionParameterAllowedValues.js.map +1 -0
  177. package/build/esm/api/action/ActionParameterConditionalOverride.js +2 -0
  178. package/build/esm/api/action/ActionParameterConditionalOverride.js.map +1 -0
  179. package/build/esm/api/action/ActionParameterConfiguration.js +2 -0
  180. package/build/esm/api/action/ActionParameterConfiguration.js.map +1 -0
  181. package/build/esm/api/action/ActionParameterType.js +22 -0
  182. package/build/esm/api/action/ActionParameterType.js.map +1 -0
  183. package/build/esm/api/action/ActionSection.js +2 -0
  184. package/build/esm/api/action/ActionSection.js.map +1 -0
  185. package/build/esm/api/action/ActionStatus.js +2 -0
  186. package/build/esm/api/action/ActionStatus.js.map +1 -0
  187. package/build/esm/api/action/ActionType.js +2 -0
  188. package/build/esm/api/action/ActionType.js.map +1 -0
  189. package/build/esm/api/action/ActionValidationRule.js +2 -0
  190. package/build/esm/api/action/ActionValidationRule.js.map +1 -0
  191. package/build/esm/api/action/ConditionDefinition.js +2 -0
  192. package/build/esm/api/action/ConditionDefinition.js.map +1 -0
  193. package/build/esm/api/action/MappingValue.js +2 -0
  194. package/build/esm/api/action/MappingValue.js.map +1 -0
  195. package/build/esm/api/action/SectionConditionalOverride.js +2 -0
  196. package/build/esm/api/action/SectionConditionalOverride.js.map +1 -0
  197. package/build/esm/api/action/SubmissionMetadata.js +2 -0
  198. package/build/esm/api/action/SubmissionMetadata.js.map +1 -0
  199. package/build/esm/api/common/BlueprintIcons.js +2 -0
  200. package/build/esm/api/common/BlueprintIcons.js.map +1 -0
  201. package/build/esm/api/common/OntologyDefinition.js +2 -0
  202. package/build/esm/api/common/OntologyDefinition.js.map +1 -0
  203. package/build/esm/api/common/OntologyEntityBase.js +2 -0
  204. package/build/esm/api/common/OntologyEntityBase.js.map +1 -0
  205. package/build/esm/api/{types.js → common/OntologyEntityTypeEnum.js} +2 -8
  206. package/build/esm/api/common/OntologyEntityTypeEnum.js.map +1 -0
  207. package/build/esm/api/common/OntologyEntityTypeMapping.js +2 -0
  208. package/build/esm/api/common/OntologyEntityTypeMapping.js.map +1 -0
  209. package/build/esm/api/common/TypeClass.js +2 -0
  210. package/build/esm/api/common/TypeClass.js.map +1 -0
  211. package/build/esm/api/defineAction.js +69 -46
  212. package/build/esm/api/defineAction.js.map +1 -1
  213. package/build/esm/api/defineInterface.js +14 -34
  214. package/build/esm/api/defineInterface.js.map +1 -1
  215. package/build/esm/api/defineInterfaceLinkConstraint.js +3 -2
  216. package/build/esm/api/defineInterfaceLinkConstraint.js.map +1 -1
  217. package/build/esm/api/defineLink.js +33 -12
  218. package/build/esm/api/defineLink.js.map +1 -1
  219. package/build/esm/api/defineObject.js +9 -29
  220. package/build/esm/api/defineObject.js.map +1 -1
  221. package/build/esm/api/defineOntology.js +17 -552
  222. package/build/esm/api/defineOntology.js.map +1 -1
  223. package/build/esm/api/defineSpt.js +1 -1
  224. package/build/esm/api/defineSpt.js.map +1 -1
  225. package/build/esm/api/defineValueType.js +1 -1
  226. package/build/esm/api/defineValueType.js.map +1 -1
  227. package/build/esm/api/importOntologyEntity.js +1 -1
  228. package/build/esm/api/importOntologyEntity.js.map +1 -1
  229. package/build/esm/api/{defineImportSpt.js → importSharedPropertyType.js} +2 -3
  230. package/build/esm/api/importSharedPropertyType.js.map +1 -0
  231. package/build/esm/api/interface/InterfacePropertyType.js +2 -0
  232. package/build/esm/api/interface/InterfacePropertyType.js.map +1 -0
  233. package/build/esm/api/interface/InterfaceType.js +2 -0
  234. package/build/esm/api/interface/InterfaceType.js.map +1 -0
  235. package/build/esm/api/interface/getFlattenedInterfaceProperties.js +27 -0
  236. package/build/esm/api/interface/getFlattenedInterfaceProperties.js.map +1 -0
  237. package/build/esm/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.js +42 -0
  238. package/build/esm/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.js.map +1 -0
  239. package/build/esm/api/links/LinkType.js +2 -0
  240. package/build/esm/api/links/LinkType.js.map +1 -0
  241. package/build/esm/api/namespace/combineApiNamespaceIfMissing.js +20 -0
  242. package/build/esm/api/namespace/combineApiNamespaceIfMissing.js.map +1 -0
  243. package/build/esm/api/object/InterfaceImplementation.js +2 -0
  244. package/build/esm/api/object/InterfaceImplementation.js.map +1 -0
  245. package/build/esm/api/object/ObjectPropertyType.js +2 -0
  246. package/build/esm/api/object/ObjectPropertyType.js.map +1 -0
  247. package/build/esm/api/object/ObjectPropertyTypeUserDefinition.js +2 -0
  248. package/build/esm/api/object/ObjectPropertyTypeUserDefinition.js.map +1 -0
  249. package/build/esm/api/object/ObjectType.js +2 -0
  250. package/build/esm/api/object/ObjectType.js.map +1 -0
  251. package/build/esm/api/object/ObjectTypeDatasourceDefinition.js +2 -0
  252. package/build/esm/api/object/ObjectTypeDatasourceDefinition.js.map +1 -0
  253. package/build/esm/api/object/ObjectTypeDefinition.js +2 -0
  254. package/build/esm/api/object/ObjectTypeDefinition.js.map +1 -0
  255. package/build/esm/api/object/ObjectTypeStatus.js +2 -0
  256. package/build/esm/api/object/ObjectTypeStatus.js.map +1 -0
  257. package/build/esm/api/objectStatus.test.js.map +1 -1
  258. package/build/esm/api/overall.test.js +1987 -691
  259. package/build/esm/api/overall.test.js.map +1 -1
  260. package/build/esm/api/properties/Nullability.js +2 -0
  261. package/build/esm/api/properties/Nullability.js.map +1 -0
  262. package/build/esm/api/properties/PropertyTypeType.js +34 -0
  263. package/build/esm/api/properties/PropertyTypeType.js.map +1 -0
  264. package/build/esm/api/properties/SharedPropertyType.js +2 -0
  265. package/build/esm/api/properties/SharedPropertyType.js.map +1 -0
  266. package/build/esm/api/propertyConversionUtils.js +0 -238
  267. package/build/esm/api/propertyConversionUtils.js.map +1 -1
  268. package/build/esm/api/values/ValueTypeDefinitionVersion.js +2 -0
  269. package/build/esm/api/values/ValueTypeDefinitionVersion.js.map +1 -0
  270. package/build/esm/api/values/ValueTypeType.js +2 -0
  271. package/build/esm/api/values/ValueTypeType.js.map +1 -0
  272. package/build/esm/api/wrapWithProxy.js +1 -0
  273. package/build/esm/api/wrapWithProxy.js.map +1 -1
  274. package/build/esm/cli/main.js +13 -4
  275. package/build/esm/cli/main.js.map +1 -1
  276. package/build/esm/conversion/toConjure/distributeTypeHelper.js +23 -0
  277. package/build/esm/conversion/toConjure/distributeTypeHelper.js.map +1 -0
  278. package/build/esm/conversion/toMarketplace/convertActionParameterConditionalOverride.js +88 -0
  279. package/build/esm/conversion/toMarketplace/convertActionParameterConditionalOverride.js.map +1 -0
  280. package/build/esm/conversion/toMarketplace/convertActionParameters.js +31 -0
  281. package/build/esm/conversion/toMarketplace/convertActionParameters.js.map +1 -0
  282. package/build/esm/conversion/toMarketplace/convertActionSections.js +43 -0
  283. package/build/esm/conversion/toMarketplace/convertActionSections.js.map +1 -0
  284. package/build/esm/conversion/toMarketplace/convertActionValidation.js +93 -0
  285. package/build/esm/conversion/toMarketplace/convertActionValidation.js.map +1 -0
  286. package/build/esm/conversion/toMarketplace/convertActionVisibility.js +41 -0
  287. package/build/esm/conversion/toMarketplace/convertActionVisibility.js.map +1 -0
  288. package/build/esm/conversion/toMarketplace/convertCardinality.js +23 -0
  289. package/build/esm/conversion/toMarketplace/convertCardinality.js.map +1 -0
  290. package/build/esm/conversion/toMarketplace/convertConditionDefinition.js +88 -0
  291. package/build/esm/conversion/toMarketplace/convertConditionDefinition.js.map +1 -0
  292. package/build/esm/conversion/toMarketplace/convertDataConstraintToDataConstraints.js +26 -0
  293. package/build/esm/conversion/toMarketplace/convertDataConstraintToDataConstraints.js.map +1 -0
  294. package/build/esm/conversion/toMarketplace/convertDatasourceDefinition.js +89 -0
  295. package/build/esm/conversion/toMarketplace/convertDatasourceDefinition.js.map +1 -0
  296. package/build/esm/conversion/toMarketplace/convertInterface.js +47 -0
  297. package/build/esm/conversion/toMarketplace/convertInterface.js.map +1 -0
  298. package/build/esm/conversion/toMarketplace/convertLink.js +132 -0
  299. package/build/esm/conversion/toMarketplace/convertLink.js.map +1 -0
  300. package/build/esm/conversion/toMarketplace/convertMappingValue.js +41 -0
  301. package/build/esm/conversion/toMarketplace/convertMappingValue.js.map +1 -0
  302. package/build/esm/conversion/toMarketplace/convertNullabilityToDataConstraint.js +43 -0
  303. package/build/esm/conversion/toMarketplace/convertNullabilityToDataConstraint.js.map +1 -0
  304. package/build/esm/conversion/toMarketplace/convertObject.js +108 -0
  305. package/build/esm/conversion/toMarketplace/convertObject.js.map +1 -0
  306. package/build/esm/conversion/toMarketplace/convertObjectPropertyType.js +53 -0
  307. package/build/esm/conversion/toMarketplace/convertObjectPropertyType.js.map +1 -0
  308. package/build/esm/conversion/toMarketplace/convertOntologyDefinition.js +29 -0
  309. package/build/esm/conversion/toMarketplace/convertOntologyDefinition.js.map +1 -0
  310. package/build/esm/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js +57 -0
  311. package/build/esm/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js.map +1 -0
  312. package/build/esm/conversion/toMarketplace/convertOntologyToValueTypeIr.js +24 -0
  313. package/build/esm/conversion/toMarketplace/convertOntologyToValueTypeIr.js.map +1 -0
  314. package/build/esm/conversion/toMarketplace/convertSectionConditionalOverride.js +35 -0
  315. package/build/esm/conversion/toMarketplace/convertSectionConditionalOverride.js.map +1 -0
  316. package/build/esm/conversion/toMarketplace/convertSpt.js +62 -0
  317. package/build/esm/conversion/toMarketplace/convertSpt.js.map +1 -0
  318. package/build/esm/conversion/toMarketplace/convertValueType.js +25 -0
  319. package/build/esm/conversion/toMarketplace/convertValueType.js.map +1 -0
  320. package/build/esm/conversion/toMarketplace/convertValueTypeDataConstraints.js +30 -0
  321. package/build/esm/conversion/toMarketplace/convertValueTypeDataConstraints.js.map +1 -0
  322. package/build/esm/conversion/toMarketplace/convertValueTypesToIr.js +34 -0
  323. package/build/esm/conversion/toMarketplace/convertValueTypesToIr.js.map +1 -0
  324. package/build/esm/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.js +83 -0
  325. package/build/esm/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.js.map +1 -0
  326. package/build/esm/conversion/toMarketplace/getFormContentOrdering.js +39 -0
  327. package/build/esm/conversion/toMarketplace/getFormContentOrdering.js.map +1 -0
  328. package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js +124 -0
  329. package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js.map +1 -0
  330. package/build/esm/index.js +5 -5
  331. package/build/esm/index.js.map +1 -1
  332. package/build/esm/util/OptionalFields.js +2 -0
  333. package/build/esm/util/OptionalFields.js.map +1 -0
  334. package/build/esm/util/RequiredFields.js +2 -0
  335. package/build/esm/util/RequiredFields.js.map +1 -0
  336. package/build/types/api/action/ActionLevelValidationDefinition.d.ts +7 -0
  337. package/build/types/api/action/ActionLevelValidationDefinition.d.ts.map +1 -0
  338. package/build/types/api/action/ActionParameter.d.ts +14 -0
  339. package/build/types/api/action/ActionParameter.d.ts.map +1 -0
  340. package/build/types/api/action/ActionParameterAllowedValues.d.ts +50 -0
  341. package/build/types/api/action/ActionParameterAllowedValues.d.ts.map +1 -0
  342. package/build/types/api/action/ActionParameterConditionalOverride.d.ts +26 -0
  343. package/build/types/api/action/ActionParameterConditionalOverride.d.ts.map +1 -0
  344. package/build/types/api/action/ActionParameterConfiguration.d.ts +20 -0
  345. package/build/types/api/action/ActionParameterConfiguration.d.ts.map +1 -0
  346. package/build/types/api/action/ActionParameterType.d.ts +6 -0
  347. package/build/types/api/action/ActionParameterType.d.ts.map +1 -0
  348. package/build/types/api/action/ActionSection.d.ts +13 -0
  349. package/build/types/api/action/ActionSection.d.ts.map +1 -0
  350. package/build/types/api/action/ActionStatus.d.ts +2 -0
  351. package/build/types/api/action/ActionStatus.d.ts.map +1 -0
  352. package/build/types/api/action/ActionType.d.ts +36 -0
  353. package/build/types/api/action/ActionType.d.ts.map +1 -0
  354. package/build/types/api/action/ActionValidationRule.d.ts +2 -0
  355. package/build/types/api/action/ActionValidationRule.d.ts.map +1 -0
  356. package/build/types/api/action/ConditionDefinition.d.ts +15 -0
  357. package/build/types/api/action/ConditionDefinition.d.ts.map +1 -0
  358. package/build/types/api/action/MappingValue.d.ts +13 -0
  359. package/build/types/api/action/MappingValue.d.ts.map +1 -0
  360. package/build/types/api/action/SectionConditionalOverride.d.ts +2 -0
  361. package/build/types/api/action/SectionConditionalOverride.d.ts.map +1 -0
  362. package/build/types/api/action/SubmissionMetadata.d.ts +6 -0
  363. package/build/types/api/action/SubmissionMetadata.d.ts.map +1 -0
  364. package/build/types/api/{iconNames.d.ts.map → common/BlueprintIcons.d.ts.map} +1 -1
  365. package/build/types/api/common/OntologyDefinition.d.ts +6 -0
  366. package/build/types/api/common/OntologyDefinition.d.ts.map +1 -0
  367. package/build/types/api/common/OntologyEntityBase.d.ts +5 -0
  368. package/build/types/api/common/OntologyEntityBase.d.ts.map +1 -0
  369. package/build/types/api/common/OntologyEntityTypeEnum.d.ts +8 -0
  370. package/build/types/api/common/OntologyEntityTypeEnum.d.ts.map +1 -0
  371. package/build/types/api/common/OntologyEntityTypeMapping.d.ts +16 -0
  372. package/build/types/api/common/OntologyEntityTypeMapping.d.ts.map +1 -0
  373. package/build/types/api/common/TypeClass.d.ts +4 -0
  374. package/build/types/api/common/TypeClass.d.ts.map +1 -0
  375. package/build/types/api/defineAction.d.ts +38 -3
  376. package/build/types/api/defineAction.d.ts.map +1 -1
  377. package/build/types/api/defineInterface.d.ts +5 -3
  378. package/build/types/api/defineInterface.d.ts.map +1 -1
  379. package/build/types/api/defineInterfaceLinkConstraint.d.ts +1 -1
  380. package/build/types/api/defineInterfaceLinkConstraint.d.ts.map +1 -1
  381. package/build/types/api/defineLink.d.ts +1 -1
  382. package/build/types/api/defineLink.d.ts.map +1 -1
  383. package/build/types/api/defineObject.d.ts +2 -4
  384. package/build/types/api/defineObject.d.ts.map +1 -1
  385. package/build/types/api/defineOntology.d.ts +11 -4
  386. package/build/types/api/defineOntology.d.ts.map +1 -1
  387. package/build/types/api/defineSpt.d.ts +2 -1
  388. package/build/types/api/defineSpt.d.ts.map +1 -1
  389. package/build/types/api/defineValueType.d.ts +2 -1
  390. package/build/types/api/defineValueType.d.ts.map +1 -1
  391. package/build/types/api/importOntologyEntity.d.ts +1 -1
  392. package/build/types/api/importOntologyEntity.d.ts.map +1 -1
  393. package/build/types/api/{defineImportSpt.d.ts → importSharedPropertyType.d.ts} +2 -1
  394. package/build/types/api/importSharedPropertyType.d.ts.map +1 -0
  395. package/build/types/api/interface/InterfacePropertyType.d.ts +5 -0
  396. package/build/types/api/interface/InterfacePropertyType.d.ts.map +1 -0
  397. package/build/types/api/interface/InterfaceType.d.ts +10 -0
  398. package/build/types/api/interface/InterfaceType.d.ts.map +1 -0
  399. package/build/types/api/interface/getFlattenedInterfaceProperties.d.ts +3 -0
  400. package/build/types/api/interface/getFlattenedInterfaceProperties.d.ts.map +1 -0
  401. package/build/types/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.d.ts +3 -0
  402. package/build/types/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.d.ts.map +1 -0
  403. package/build/types/api/links/LinkType.d.ts +100 -0
  404. package/build/types/api/links/LinkType.d.ts.map +1 -0
  405. package/build/types/api/namespace/combineApiNamespaceIfMissing.d.ts +1 -0
  406. package/build/types/api/namespace/combineApiNamespaceIfMissing.d.ts.map +1 -0
  407. package/build/types/api/object/InterfaceImplementation.d.ts +8 -0
  408. package/build/types/api/object/InterfaceImplementation.d.ts.map +1 -0
  409. package/build/types/api/object/ObjectPropertyType.d.ts +27 -0
  410. package/build/types/api/object/ObjectPropertyType.d.ts.map +1 -0
  411. package/build/types/api/object/ObjectPropertyTypeUserDefinition.d.ts +3 -0
  412. package/build/types/api/object/ObjectPropertyTypeUserDefinition.d.ts.map +1 -0
  413. package/build/types/api/object/ObjectType.d.ts +29 -0
  414. package/build/types/api/object/ObjectType.d.ts.map +1 -0
  415. package/build/types/api/object/ObjectTypeDatasourceDefinition.d.ts +11 -0
  416. package/build/types/api/object/ObjectTypeDatasourceDefinition.d.ts.map +1 -0
  417. package/build/types/api/object/ObjectTypeDefinition.d.ts +26 -0
  418. package/build/types/api/object/ObjectTypeDefinition.d.ts.map +1 -0
  419. package/build/types/api/object/ObjectTypeStatus.d.ts +5 -0
  420. package/build/types/api/object/ObjectTypeStatus.d.ts.map +1 -0
  421. package/build/types/api/properties/Nullability.d.ts +4 -0
  422. package/build/types/api/properties/Nullability.d.ts.map +1 -0
  423. package/build/types/api/properties/PropertyTypeType.d.ts +33 -0
  424. package/build/types/api/properties/PropertyTypeType.d.ts.map +1 -0
  425. package/build/types/api/properties/SharedPropertyType.d.ts +22 -0
  426. package/build/types/api/properties/SharedPropertyType.d.ts.map +1 -0
  427. package/build/types/api/propertyConversionUtils.d.ts +2 -20
  428. package/build/types/api/propertyConversionUtils.d.ts.map +1 -1
  429. package/build/types/api/values/ValueTypeDefinitionVersion.d.ts +14 -0
  430. package/build/types/api/values/ValueTypeDefinitionVersion.d.ts.map +1 -0
  431. package/build/types/api/values/ValueTypeType.d.ts +178 -0
  432. package/build/types/api/values/ValueTypeType.d.ts.map +1 -0
  433. package/build/types/api/wrapWithProxy.d.ts +1 -1
  434. package/build/types/api/wrapWithProxy.d.ts.map +1 -1
  435. package/build/types/cli/main.d.ts.map +1 -1
  436. package/build/types/conversion/toConjure/distributeTypeHelper.d.ts +3 -0
  437. package/build/types/conversion/toConjure/distributeTypeHelper.d.ts.map +1 -0
  438. package/build/types/conversion/toMarketplace/convertActionParameterConditionalOverride.d.ts +4 -0
  439. package/build/types/conversion/toMarketplace/convertActionParameterConditionalOverride.d.ts.map +1 -0
  440. package/build/types/conversion/toMarketplace/convertActionParameters.d.ts +3 -0
  441. package/build/types/conversion/toMarketplace/convertActionParameters.d.ts.map +1 -0
  442. package/build/types/conversion/toMarketplace/convertActionSections.d.ts +3 -0
  443. package/build/types/conversion/toMarketplace/convertActionSections.d.ts.map +1 -0
  444. package/build/types/conversion/toMarketplace/convertActionValidation.d.ts +3 -0
  445. package/build/types/conversion/toMarketplace/convertActionValidation.d.ts.map +1 -0
  446. package/build/types/conversion/toMarketplace/convertActionVisibility.d.ts +2 -0
  447. package/build/types/conversion/toMarketplace/convertActionVisibility.d.ts.map +1 -0
  448. package/build/types/conversion/toMarketplace/convertCardinality.d.ts +3 -0
  449. package/build/types/conversion/toMarketplace/convertCardinality.d.ts.map +1 -0
  450. package/build/types/conversion/toMarketplace/convertConditionDefinition.d.ts +4 -0
  451. package/build/types/conversion/toMarketplace/convertConditionDefinition.d.ts.map +1 -0
  452. package/build/types/conversion/toMarketplace/convertDataConstraintToDataConstraints.d.ts +2 -0
  453. package/build/types/conversion/toMarketplace/convertDataConstraintToDataConstraints.d.ts.map +1 -0
  454. package/build/types/conversion/toMarketplace/convertDatasourceDefinition.d.ts +4 -0
  455. package/build/types/conversion/toMarketplace/convertDatasourceDefinition.d.ts.map +1 -0
  456. package/build/types/conversion/toMarketplace/convertInterface.d.ts +3 -0
  457. package/build/types/conversion/toMarketplace/convertInterface.d.ts.map +1 -0
  458. package/build/types/conversion/toMarketplace/convertLink.d.ts +3 -0
  459. package/build/types/conversion/toMarketplace/convertLink.d.ts.map +1 -0
  460. package/build/types/conversion/toMarketplace/convertMappingValue.d.ts +3 -0
  461. package/build/types/conversion/toMarketplace/convertMappingValue.d.ts.map +1 -0
  462. package/build/types/conversion/toMarketplace/convertNullabilityToDataConstraint.d.ts +7 -0
  463. package/build/types/conversion/toMarketplace/convertNullabilityToDataConstraint.d.ts.map +1 -0
  464. package/build/types/conversion/toMarketplace/convertObject.d.ts +9 -0
  465. package/build/types/conversion/toMarketplace/convertObject.d.ts.map +1 -0
  466. package/build/types/conversion/toMarketplace/convertObjectPropertyType.d.ts +3 -0
  467. package/build/types/conversion/toMarketplace/convertObjectPropertyType.d.ts.map +1 -0
  468. package/build/types/conversion/toMarketplace/convertOntologyDefinition.d.ts +3 -0
  469. package/build/types/conversion/toMarketplace/convertOntologyDefinition.d.ts.map +1 -0
  470. package/build/types/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.d.ts +3 -0
  471. package/build/types/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.d.ts.map +1 -0
  472. package/build/types/conversion/toMarketplace/convertOntologyToValueTypeIr.d.ts +3 -0
  473. package/build/types/conversion/toMarketplace/convertOntologyToValueTypeIr.d.ts.map +1 -0
  474. package/build/types/conversion/toMarketplace/convertSectionConditionalOverride.d.ts +4 -0
  475. package/build/types/conversion/toMarketplace/convertSectionConditionalOverride.d.ts.map +1 -0
  476. package/build/types/conversion/toMarketplace/convertSpt.d.ts +3 -0
  477. package/build/types/conversion/toMarketplace/convertSpt.d.ts.map +1 -0
  478. package/build/types/conversion/toMarketplace/convertValueType.d.ts +3 -0
  479. package/build/types/conversion/toMarketplace/convertValueType.d.ts.map +1 -0
  480. package/build/types/conversion/toMarketplace/convertValueTypeDataConstraints.d.ts +2 -0
  481. package/build/types/conversion/toMarketplace/convertValueTypeDataConstraints.d.ts.map +1 -0
  482. package/build/types/conversion/toMarketplace/convertValueTypesToIr.d.ts +3 -0
  483. package/build/types/conversion/toMarketplace/convertValueTypesToIr.d.ts.map +1 -0
  484. package/build/types/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.d.ts +2 -0
  485. package/build/types/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.d.ts.map +1 -0
  486. package/build/types/conversion/toMarketplace/getFormContentOrdering.d.ts +3 -0
  487. package/build/types/conversion/toMarketplace/getFormContentOrdering.d.ts.map +1 -0
  488. package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.d.ts +3 -0
  489. package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.d.ts.map +1 -0
  490. package/build/types/index.d.ts +22 -6
  491. package/build/types/index.d.ts.map +1 -1
  492. package/build/types/util/OptionalFields.d.ts +4 -0
  493. package/build/types/util/OptionalFields.d.ts.map +1 -0
  494. package/build/types/util/RequiredFields.d.ts +4 -0
  495. package/build/types/util/RequiredFields.d.ts.map +1 -0
  496. package/package.json +5 -5
  497. package/build/browser/api/defineImportSpt.js.map +0 -1
  498. package/build/browser/api/iconNames.js +0 -2
  499. package/build/browser/api/iconNames.js.map +0 -1
  500. package/build/browser/api/ontologyUtils.js +0 -243
  501. package/build/browser/api/ontologyUtils.js.map +0 -1
  502. package/build/browser/api/types.js.map +0 -1
  503. package/build/esm/api/defineImportSpt.js.map +0 -1
  504. package/build/esm/api/iconNames.js +0 -2
  505. package/build/esm/api/iconNames.js.map +0 -1
  506. package/build/esm/api/ontologyUtils.js +0 -243
  507. package/build/esm/api/ontologyUtils.js.map +0 -1
  508. package/build/esm/api/types.js.map +0 -1
  509. package/build/types/api/defineImportSpt.d.ts.map +0 -1
  510. package/build/types/api/ontologyUtils.d.ts +0 -8
  511. package/build/types/api/ontologyUtils.d.ts.map +0 -1
  512. package/build/types/api/types.d.ts +0 -625
  513. package/build/types/api/types.d.ts.map +0 -1
  514. /package/build/types/api/{iconNames.d.ts → common/BlueprintIcons.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertActionParameterConditionalOverride.js","names":["extractAllowedValues","convertConditionDefinition","convertActionParameterConditionalOverride","override","validation","actionParameters","parameterBlockOverride","type","parameterRequired","required","notRequired","visibility","defaultVisibility","hidden","editable","disabled","prefill","defaultValue","allowedValues","constraint","Error","condition","parameterBlockOverrides"],"sources":["convertActionParameterConditionalOverride.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 OntologyIrConditionalOverride,\n OntologyIrParameterValidationBlockOverride,\n} from \"@osdk/client.unstable\";\nimport type {\n ActionParameter,\n ActionParameterValidation,\n} from \"../../api/action/ActionParameter.js\";\nimport type { ActionParameterConditionalOverride } from \"../../api/action/ActionParameterConditionalOverride.js\";\nimport { extractAllowedValues } from \"../../api/defineOntology.js\";\nimport { convertConditionDefinition } from \"./convertConditionDefinition.js\";\n\nexport function convertActionParameterConditionalOverride(\n override: ActionParameterConditionalOverride,\n validation: ActionParameterValidation,\n actionParameters?: ActionParameter[],\n): OntologyIrConditionalOverride {\n let parameterBlockOverride: OntologyIrParameterValidationBlockOverride;\n switch (override.type) {\n case \"required\":\n parameterBlockOverride = {\n type: \"parameterRequired\",\n parameterRequired: {\n required: validation.required\n ? {\n type: \"notRequired\",\n notRequired: {},\n }\n : {\n type: \"required\",\n required: {},\n },\n },\n };\n break;\n case \"visibility\":\n parameterBlockOverride = {\n type: \"visibility\",\n visibility: {\n visibility: validation.defaultVisibility === \"editable\"\n ? {\n type: \"hidden\",\n hidden: {},\n }\n : {\n type: \"editable\",\n editable: {},\n },\n },\n };\n break;\n case \"disabled\":\n parameterBlockOverride = {\n type: \"visibility\",\n visibility: {\n visibility: validation.defaultVisibility === \"editable\"\n ? {\n type: \"disabled\",\n disabled: {},\n }\n : {\n type: \"editable\",\n editable: {},\n },\n },\n };\n break;\n case \"defaultValue\":\n parameterBlockOverride = {\n type: \"prefill\",\n prefill: {\n prefill: override.defaultValue,\n },\n };\n break;\n case \"constraint\":\n parameterBlockOverride = {\n type: \"allowedValues\",\n allowedValues: {\n allowedValues: extractAllowedValues(override.constraint),\n },\n };\n break;\n default:\n throw new Error(`Unknown parameter override type`);\n }\n return {\n condition: convertConditionDefinition(override.condition, actionParameters),\n parameterBlockOverrides: [parameterBlockOverride],\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAWA,SAASA,oBAAoB,QAAQ,6BAA6B;AAClE,SAASC,0BAA0B,QAAQ,iCAAiC;AAE5E,OAAO,SAASC,yCAAyCA,CACvDC,QAA4C,EAC5CC,UAAqC,EACrCC,gBAAoC,EACL;EAC/B,IAAIC,sBAAkE;EACtE,QAAQH,QAAQ,CAACI,IAAI;IACnB,KAAK,UAAU;MACbD,sBAAsB,GAAG;QACvBC,IAAI,EAAE,mBAAmB;QACzBC,iBAAiB,EAAE;UACjBC,QAAQ,EAAEL,UAAU,CAACK,QAAQ,GACzB;YACAF,IAAI,EAAE,aAAa;YACnBG,WAAW,EAAE,CAAC;UAChB,CAAC,GACC;YACAH,IAAI,EAAE,UAAU;YAChBE,QAAQ,EAAE,CAAC;UACb;QACJ;MACF,CAAC;MACD;IACF,KAAK,YAAY;MACfH,sBAAsB,GAAG;QACvBC,IAAI,EAAE,YAAY;QAClBI,UAAU,EAAE;UACVA,UAAU,EAAEP,UAAU,CAACQ,iBAAiB,KAAK,UAAU,GACnD;YACAL,IAAI,EAAE,QAAQ;YACdM,MAAM,EAAE,CAAC;UACX,CAAC,GACC;YACAN,IAAI,EAAE,UAAU;YAChBO,QAAQ,EAAE,CAAC;UACb;QACJ;MACF,CAAC;MACD;IACF,KAAK,UAAU;MACbR,sBAAsB,GAAG;QACvBC,IAAI,EAAE,YAAY;QAClBI,UAAU,EAAE;UACVA,UAAU,EAAEP,UAAU,CAACQ,iBAAiB,KAAK,UAAU,GACnD;YACAL,IAAI,EAAE,UAAU;YAChBQ,QAAQ,EAAE,CAAC;UACb,CAAC,GACC;YACAR,IAAI,EAAE,UAAU;YAChBO,QAAQ,EAAE,CAAC;UACb;QACJ;MACF,CAAC;MACD;IACF,KAAK,cAAc;MACjBR,sBAAsB,GAAG;QACvBC,IAAI,EAAE,SAAS;QACfS,OAAO,EAAE;UACPA,OAAO,EAAEb,QAAQ,CAACc;QACpB;MACF,CAAC;MACD;IACF,KAAK,YAAY;MACfX,sBAAsB,GAAG;QACvBC,IAAI,EAAE,eAAe;QACrBW,aAAa,EAAE;UACbA,aAAa,EAAElB,oBAAoB,CAACG,QAAQ,CAACgB,UAAU;QACzD;MACF,CAAC;MACD;IACF;MACE,MAAM,IAAIC,KAAK,CAAC,iCAAiC,CAAC;EACtD;EACA,OAAO;IACLC,SAAS,EAAEpB,0BAA0B,CAACE,QAAQ,CAACkB,SAAS,EAAEhB,gBAAgB,CAAC;IAC3EiB,uBAAuB,EAAE,CAAChB,sBAAsB;EAClD,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,31 @@
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 convertActionParameters(action) {
18
+ return Object.fromEntries((action.parameters ?? []).map(p => [p.id, {
19
+ id: p.id,
20
+ type: typeof p.type === "string" ? {
21
+ type: p.type,
22
+ [p.type]: {}
23
+ } : p.type,
24
+ displayMetadata: {
25
+ displayName: p.displayName,
26
+ description: p.description ?? "",
27
+ typeClasses: []
28
+ }
29
+ }]));
30
+ }
31
+ //# sourceMappingURL=convertActionParameters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertActionParameters.js","names":["convertActionParameters","action","Object","fromEntries","parameters","map","p","id","type","displayMetadata","displayName","description","typeClasses"],"sources":["convertActionParameters.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 OntologyIrBaseParameterType,\n OntologyIrParameter,\n ParameterId,\n} from \"@osdk/client.unstable\";\nimport type { ActionType } from \"../../api/action/ActionType.js\";\n\nexport function convertActionParameters(\n action: ActionType,\n): Record<ParameterId, OntologyIrParameter> {\n return Object.fromEntries((action.parameters ?? []).map(p => [p.id, {\n id: p.id,\n type: (typeof p.type === \"string\"\n ? { type: p.type, [p.type]: {} }\n : p.type) as OntologyIrBaseParameterType,\n displayMetadata: {\n displayName: p.displayName,\n description: p.description ?? \"\",\n typeClasses: [],\n },\n }]));\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,OAAO,SAASA,uBAAuBA,CACrCC,MAAkB,EACwB;EAC1C,OAAOC,MAAM,CAACC,WAAW,CAAC,CAACF,MAAM,CAACG,UAAU,IAAI,EAAE,EAAEC,GAAG,CAACC,CAAC,IAAI,CAACA,CAAC,CAACC,EAAE,EAAE;IAClEA,EAAE,EAAED,CAAC,CAACC,EAAE;IACRC,IAAI,EAAG,OAAOF,CAAC,CAACE,IAAI,KAAK,QAAQ,GAC7B;MAAEA,IAAI,EAAEF,CAAC,CAACE,IAAI;MAAE,CAACF,CAAC,CAACE,IAAI,GAAG,CAAC;IAAE,CAAC,GAC9BF,CAAC,CAACE,IAAoC;IAC1CC,eAAe,EAAE;MACfC,WAAW,EAAEJ,CAAC,CAACI,WAAW;MAC1BC,WAAW,EAAEL,CAAC,CAACK,WAAW,IAAI,EAAE;MAChCC,WAAW,EAAE;IACf;EACF,CAAC,CAAC,CAAC,CAAC;AACN","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 { uppercaseFirstLetter } from "../../api/defineObject.js";
18
+ export function convertActionSections(action) {
19
+ return Object.fromEntries(Object.entries(action.sections ?? {}).map(([sectionId, section]) => [sectionId, {
20
+ id: sectionId,
21
+ content: section.parameters.map(p => ({
22
+ type: "parameterId",
23
+ parameterId: p
24
+ })),
25
+ displayMetadata: {
26
+ collapsedByDefault: section.collapsedByDefault ?? false,
27
+ columnCount: section.columnCount ?? 1,
28
+ description: section.description ?? "",
29
+ displayName: section.displayName ?? uppercaseFirstLetter(sectionId),
30
+ showTitleBar: section.showTitleBar ?? true,
31
+ ...(section.style && {
32
+ style: section.style === "box" ? {
33
+ type: "box",
34
+ box: {}
35
+ } : {
36
+ type: "minimal",
37
+ minimal: {}
38
+ }
39
+ })
40
+ }
41
+ }]));
42
+ }
43
+ //# sourceMappingURL=convertActionSections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertActionSections.js","names":["uppercaseFirstLetter","convertActionSections","action","Object","fromEntries","entries","sections","map","sectionId","section","id","content","parameters","p","type","parameterId","displayMetadata","collapsedByDefault","columnCount","description","displayName","showTitleBar","style","box","minimal"],"sources":["convertActionSections.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 { OntologyIrSection, SectionId } from \"@osdk/client.unstable\";\nimport type { ActionType } from \"../../api/action/ActionType.js\";\nimport { uppercaseFirstLetter } from \"../../api/defineObject.js\";\n\nexport function convertActionSections(\n action: ActionType,\n): Record<SectionId, OntologyIrSection> {\n return Object.fromEntries(\n Object.entries(action.sections ?? {}).map((\n [sectionId, section],\n ) => [sectionId, {\n id: sectionId,\n content: section.parameters.map(p => ({\n type: \"parameterId\",\n parameterId: p,\n })),\n displayMetadata: {\n collapsedByDefault: section.collapsedByDefault ?? false,\n columnCount: section.columnCount ?? 1,\n description: section.description ?? \"\",\n displayName: section.displayName ?? uppercaseFirstLetter(sectionId),\n showTitleBar: section.showTitleBar ?? true,\n ...section.style\n && {\n style: section.style === \"box\"\n ? { type: \"box\", box: {} }\n : { type: \"minimal\", minimal: {} },\n },\n },\n }]),\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,oBAAoB,QAAQ,2BAA2B;AAEhE,OAAO,SAASC,qBAAqBA,CACnCC,MAAkB,EACoB;EACtC,OAAOC,MAAM,CAACC,WAAW,CACvBD,MAAM,CAACE,OAAO,CAACH,MAAM,CAACI,QAAQ,IAAI,CAAC,CAAC,CAAC,CAACC,GAAG,CAAC,CACxC,CAACC,SAAS,EAAEC,OAAO,CAAC,KACjB,CAACD,SAAS,EAAE;IACfE,EAAE,EAAEF,SAAS;IACbG,OAAO,EAAEF,OAAO,CAACG,UAAU,CAACL,GAAG,CAACM,CAAC,KAAK;MACpCC,IAAI,EAAE,aAAa;MACnBC,WAAW,EAAEF;IACf,CAAC,CAAC,CAAC;IACHG,eAAe,EAAE;MACfC,kBAAkB,EAAER,OAAO,CAACQ,kBAAkB,IAAI,KAAK;MACvDC,WAAW,EAAET,OAAO,CAACS,WAAW,IAAI,CAAC;MACrCC,WAAW,EAAEV,OAAO,CAACU,WAAW,IAAI,EAAE;MACtCC,WAAW,EAAEX,OAAO,CAACW,WAAW,IAAIpB,oBAAoB,CAACQ,SAAS,CAAC;MACnEa,YAAY,EAAEZ,OAAO,CAACY,YAAY,IAAI,IAAI;MAC1C,IAAGZ,OAAO,CAACa,KAAK,IACX;QACDA,KAAK,EAAEb,OAAO,CAACa,KAAK,KAAK,KAAK,GAC1B;UAAER,IAAI,EAAE,KAAK;UAAES,GAAG,EAAE,CAAC;QAAE,CAAC,GACxB;UAAET,IAAI,EAAE,SAAS;UAAEU,OAAO,EAAE,CAAC;QAAE;MACrC,CAAC;IACL;EACF,CAAC,CAAC,CACJ,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,93 @@
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 { extractAllowedValues, renderHintFromBaseType } from "../../api/defineOntology.js";
18
+ import { convertActionParameterConditionalOverride } from "./convertActionParameterConditionalOverride.js";
19
+ import { convertActionVisibility } from "./convertActionVisibility.js";
20
+ import { convertSectionConditionalOverride } from "./convertSectionConditionalOverride.js";
21
+ export function convertActionValidation(action) {
22
+ return {
23
+ actionTypeLevelValidation: {
24
+ rules: Object.fromEntries((action.validation ?? [{
25
+ condition: {
26
+ type: "true",
27
+ true: {}
28
+ },
29
+ displayMetadata: {
30
+ failureMessage: "",
31
+ typeClasses: []
32
+ }
33
+ }]).map((rule, idx) => [idx, rule]))
34
+ },
35
+ parameterValidations: Object.fromEntries((action.parameters ?? []).map(p => {
36
+ return [p.id, {
37
+ defaultValidation: {
38
+ display: {
39
+ renderHint: renderHintFromBaseType(p),
40
+ visibility: convertActionVisibility(p.validation.defaultVisibility),
41
+ ...(p.defaultValue && {
42
+ prefill: p.defaultValue
43
+ })
44
+ },
45
+ validation: {
46
+ allowedValues: extractAllowedValues(p.validation.allowedValues),
47
+ required: convertParameterRequirementConstraint(p.validation.required)
48
+ }
49
+ },
50
+ conditionalOverrides: p.validation.conditionalOverrides?.map(override => convertActionParameterConditionalOverride(override, p.validation, action.parameters)) ?? []
51
+ }];
52
+ })),
53
+ sectionValidations: {
54
+ ...Object.fromEntries(Object.entries(action.sections ?? {}).map(([sectionId, section]) => [section.id, {
55
+ defaultDisplayMetadata: section.defaultVisibility === "hidden" ? {
56
+ visibility: {
57
+ type: "hidden",
58
+ hidden: {}
59
+ }
60
+ } : {
61
+ visibility: {
62
+ type: "visible",
63
+ visible: {}
64
+ }
65
+ },
66
+ conditionalOverrides: section.conditionalOverrides?.map(override => convertSectionConditionalOverride(override, section.defaultVisibility ?? "visible", action.parameters)) ?? []
67
+ }]))
68
+ }
69
+ };
70
+ }
71
+ function convertParameterRequirementConstraint(required) {
72
+ if (typeof required === "boolean") {
73
+ return required ? {
74
+ type: "required",
75
+ required: {}
76
+ } : {
77
+ type: "notRequired",
78
+ notRequired: {}
79
+ };
80
+ }
81
+ const {
82
+ min,
83
+ max
84
+ } = required.listLength;
85
+ return {
86
+ type: "listLengthValidation",
87
+ listLengthValidation: {
88
+ minLength: min,
89
+ maxLength: max
90
+ }
91
+ };
92
+ }
93
+ //# sourceMappingURL=convertActionValidation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertActionValidation.js","names":["extractAllowedValues","renderHintFromBaseType","convertActionParameterConditionalOverride","convertActionVisibility","convertSectionConditionalOverride","convertActionValidation","action","actionTypeLevelValidation","rules","Object","fromEntries","validation","condition","type","true","displayMetadata","failureMessage","typeClasses","map","rule","idx","parameterValidations","parameters","p","id","defaultValidation","display","renderHint","visibility","defaultVisibility","defaultValue","prefill","allowedValues","required","convertParameterRequirementConstraint","conditionalOverrides","override","sectionValidations","entries","sections","sectionId","section","defaultDisplayMetadata","hidden","visible","notRequired","min","max","listLength","listLengthValidation","minLength","maxLength"],"sources":["convertActionValidation.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 OntologyIrActionValidation,\n ParameterRequiredConfiguration,\n} from \"@osdk/client.unstable\";\nimport type { ActionParameterRequirementConstraint } from \"../../api/action/ActionParameterConfiguration.js\";\nimport type { ActionType } from \"../../api/action/ActionType.js\";\nimport {\n extractAllowedValues,\n renderHintFromBaseType,\n} from \"../../api/defineOntology.js\";\nimport { convertActionParameterConditionalOverride } from \"./convertActionParameterConditionalOverride.js\";\nimport { convertActionVisibility } from \"./convertActionVisibility.js\";\nimport { convertSectionConditionalOverride } from \"./convertSectionConditionalOverride.js\";\n\nexport function convertActionValidation(\n action: ActionType,\n): OntologyIrActionValidation {\n return {\n actionTypeLevelValidation: {\n rules: Object.fromEntries(\n (action.validation\n ?? [{\n condition: { type: \"true\", true: {} },\n displayMetadata: { failureMessage: \"\", typeClasses: [] },\n }]).map((rule, idx) => [idx, rule]),\n ),\n },\n parameterValidations: Object.fromEntries(\n (action.parameters ?? []).map(p => {\n return [\n p.id,\n {\n defaultValidation: {\n display: {\n renderHint: renderHintFromBaseType(p),\n visibility: convertActionVisibility(\n p.validation.defaultVisibility,\n ),\n ...p.defaultValue\n && { prefill: p.defaultValue },\n },\n validation: {\n allowedValues: extractAllowedValues(\n p.validation.allowedValues!,\n ),\n required: convertParameterRequirementConstraint(\n p.validation.required!,\n ),\n },\n },\n conditionalOverrides: p.validation.conditionalOverrides?.map(\n (override) =>\n convertActionParameterConditionalOverride(\n override,\n p.validation,\n action.parameters,\n ),\n ) ?? [],\n },\n ];\n }),\n ),\n sectionValidations: {\n ...Object.fromEntries(\n Object.entries(action.sections ?? {}).map((\n [sectionId, section],\n ) => [\n section.id,\n {\n defaultDisplayMetadata: section.defaultVisibility === \"hidden\"\n ? {\n visibility: {\n type: \"hidden\",\n hidden: {},\n },\n }\n : {\n visibility: {\n type: \"visible\",\n visible: {},\n },\n },\n conditionalOverrides: section.conditionalOverrides?.map(\n (override) =>\n convertSectionConditionalOverride(\n override,\n section.defaultVisibility ?? \"visible\",\n action.parameters,\n ),\n ) ?? [],\n },\n ]),\n ),\n },\n };\n}\n\nfunction convertParameterRequirementConstraint(\n required: ActionParameterRequirementConstraint,\n): ParameterRequiredConfiguration {\n if (typeof required === \"boolean\") {\n return required\n ? { type: \"required\", required: {} }\n : { type: \"notRequired\", notRequired: {} };\n }\n const { min, max } = required.listLength;\n return {\n type: \"listLengthValidation\",\n listLengthValidation: { minLength: min, maxLength: max },\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,SACEA,oBAAoB,EACpBC,sBAAsB,QACjB,6BAA6B;AACpC,SAASC,yCAAyC,QAAQ,gDAAgD;AAC1G,SAASC,uBAAuB,QAAQ,8BAA8B;AACtE,SAASC,iCAAiC,QAAQ,wCAAwC;AAE1F,OAAO,SAASC,uBAAuBA,CACrCC,MAAkB,EACU;EAC5B,OAAO;IACLC,yBAAyB,EAAE;MACzBC,KAAK,EAAEC,MAAM,CAACC,WAAW,CACvB,CAACJ,MAAM,CAACK,UAAU,IACb,CAAC;QACFC,SAAS,EAAE;UAAEC,IAAI,EAAE,MAAM;UAAEC,IAAI,EAAE,CAAC;QAAE,CAAC;QACrCC,eAAe,EAAE;UAAEC,cAAc,EAAE,EAAE;UAAEC,WAAW,EAAE;QAAG;MACzD,CAAC,CAAC,EAAEC,GAAG,CAAC,CAACC,IAAI,EAAEC,GAAG,KAAK,CAACA,GAAG,EAAED,IAAI,CAAC,CACtC;IACF,CAAC;IACDE,oBAAoB,EAAEZ,MAAM,CAACC,WAAW,CACtC,CAACJ,MAAM,CAACgB,UAAU,IAAI,EAAE,EAAEJ,GAAG,CAACK,CAAC,IAAI;MACjC,OAAO,CACLA,CAAC,CAACC,EAAE,EACJ;QACEC,iBAAiB,EAAE;UACjBC,OAAO,EAAE;YACPC,UAAU,EAAE1B,sBAAsB,CAACsB,CAAC,CAAC;YACrCK,UAAU,EAAEzB,uBAAuB,CACjCoB,CAAC,CAACZ,UAAU,CAACkB,iBACf,CAAC;YACD,IAAGN,CAAC,CAACO,YAAY,IACZ;cAAEC,OAAO,EAAER,CAAC,CAACO;YAAa,CAAC;UAClC,CAAC;UACDnB,UAAU,EAAE;YACVqB,aAAa,EAAEhC,oBAAoB,CACjCuB,CAAC,CAACZ,UAAU,CAACqB,aACf,CAAC;YACDC,QAAQ,EAAEC,qCAAqC,CAC7CX,CAAC,CAACZ,UAAU,CAACsB,QACf;UACF;QACF,CAAC;QACDE,oBAAoB,EAAEZ,CAAC,CAACZ,UAAU,CAACwB,oBAAoB,EAAEjB,GAAG,CACzDkB,QAAQ,IACPlC,yCAAyC,CACvCkC,QAAQ,EACRb,CAAC,CAACZ,UAAU,EACZL,MAAM,CAACgB,UACT,CACJ,CAAC,IAAI;MACP,CAAC,CACF;IACH,CAAC,CACH,CAAC;IACDe,kBAAkB,EAAE;MAClB,GAAG5B,MAAM,CAACC,WAAW,CACnBD,MAAM,CAAC6B,OAAO,CAAChC,MAAM,CAACiC,QAAQ,IAAI,CAAC,CAAC,CAAC,CAACrB,GAAG,CAAC,CACxC,CAACsB,SAAS,EAAEC,OAAO,CAAC,KACjB,CACHA,OAAO,CAACjB,EAAE,EACV;QACEkB,sBAAsB,EAAED,OAAO,CAACZ,iBAAiB,KAAK,QAAQ,GAC1D;UACAD,UAAU,EAAE;YACVf,IAAI,EAAE,QAAQ;YACd8B,MAAM,EAAE,CAAC;UACX;QACF,CAAC,GACC;UACAf,UAAU,EAAE;YACVf,IAAI,EAAE,SAAS;YACf+B,OAAO,EAAE,CAAC;UACZ;QACF,CAAC;QACHT,oBAAoB,EAAEM,OAAO,CAACN,oBAAoB,EAAEjB,GAAG,CACpDkB,QAAQ,IACPhC,iCAAiC,CAC/BgC,QAAQ,EACRK,OAAO,CAACZ,iBAAiB,IAAI,SAAS,EACtCvB,MAAM,CAACgB,UACT,CACJ,CAAC,IAAI;MACP,CAAC,CACF,CACH;IACF;EACF,CAAC;AACH;AAEA,SAASY,qCAAqCA,CAC5CD,QAA8C,EACd;EAChC,IAAI,OAAOA,QAAQ,KAAK,SAAS,EAAE;IACjC,OAAOA,QAAQ,GACX;MAAEpB,IAAI,EAAE,UAAU;MAAEoB,QAAQ,EAAE,CAAC;IAAE,CAAC,GAClC;MAAEpB,IAAI,EAAE,aAAa;MAAEgC,WAAW,EAAE,CAAC;IAAE,CAAC;EAC9C;EACA,MAAM;IAAEC,GAAG;IAAEC;EAAI,CAAC,GAAGd,QAAQ,CAACe,UAAU;EACxC,OAAO;IACLnC,IAAI,EAAE,sBAAsB;IAC5BoC,oBAAoB,EAAE;MAAEC,SAAS,EAAEJ,GAAG;MAAEK,SAAS,EAAEJ;IAAI;EACzD,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,41 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ export function convertActionVisibility(visibility) {
18
+ switch (visibility) {
19
+ case "editable":
20
+ return {
21
+ type: "editable",
22
+ editable: {}
23
+ };
24
+ case "disabled":
25
+ return {
26
+ type: "disabled",
27
+ disabled: {}
28
+ };
29
+ case "hidden":
30
+ return {
31
+ type: "hidden",
32
+ hidden: {}
33
+ };
34
+ default:
35
+ return {
36
+ type: "editable",
37
+ editable: {}
38
+ };
39
+ }
40
+ }
41
+ //# sourceMappingURL=convertActionVisibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertActionVisibility.js","names":["convertActionVisibility","visibility","type","editable","disabled","hidden"],"sources":["convertActionVisibility.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 { ParameterVisibility } from \"@osdk/client.unstable\";\n\nexport function convertActionVisibility(\n visibility: \"editable\" | \"disabled\" | \"hidden\" | undefined,\n): ParameterVisibility {\n switch (visibility) {\n case \"editable\":\n return {\n type: \"editable\",\n editable: {},\n };\n case \"disabled\":\n return {\n type: \"disabled\",\n disabled: {},\n };\n case \"hidden\":\n return {\n type: \"hidden\",\n hidden: {},\n };\n default:\n return {\n type: \"editable\",\n editable: {},\n };\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAO,SAASA,uBAAuBA,CACrCC,UAA0D,EACrC;EACrB,QAAQA,UAAU;IAChB,KAAK,UAAU;MACb,OAAO;QACLC,IAAI,EAAE,UAAU;QAChBC,QAAQ,EAAE,CAAC;MACb,CAAC;IACH,KAAK,UAAU;MACb,OAAO;QACLD,IAAI,EAAE,UAAU;QAChBE,QAAQ,EAAE,CAAC;MACb,CAAC;IACH,KAAK,QAAQ;MACX,OAAO;QACLF,IAAI,EAAE,QAAQ;QACdG,MAAM,EAAE,CAAC;MACX,CAAC;IACH;MACE,OAAO;QACLH,IAAI,EAAE,UAAU;QAChBC,QAAQ,EAAE,CAAC;MACb,CAAC;EACL;AACF","ignoreList":[]}
@@ -0,0 +1,23 @@
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 convertCardinality(cardinality) {
18
+ if (cardinality === "OneToMany" || cardinality === undefined) {
19
+ return "ONE_TO_MANY";
20
+ }
21
+ return "ONE_TO_ONE";
22
+ }
23
+ //# sourceMappingURL=convertCardinality.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertCardinality.js","names":["convertCardinality","cardinality","undefined"],"sources":["convertCardinality.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 { OntologyIrOneToManyLinkDefinition } from \"@osdk/client.unstable\";\nimport type { OneToManyLinkTypeDefinition } from \"../../api/links/LinkType.js\";\n\nexport function convertCardinality(\n cardinality: OneToManyLinkTypeDefinition[\"cardinality\"],\n): OntologyIrOneToManyLinkDefinition[\"cardinalityHint\"] {\n if (cardinality === \"OneToMany\" || cardinality === undefined) {\n return \"ONE_TO_MANY\";\n }\n return \"ONE_TO_ONE\";\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,OAAO,SAASA,kBAAkBA,CAChCC,WAAuD,EACD;EACtD,IAAIA,WAAW,KAAK,WAAW,IAAIA,WAAW,KAAKC,SAAS,EAAE;IAC5D,OAAO,aAAa;EACtB;EACA,OAAO,YAAY;AACrB","ignoreList":[]}
@@ -0,0 +1,88 @@
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 convertConditionDefinition(condition, actionParameters) {
19
+ switch (condition.type) {
20
+ case "and":
21
+ if ("conditions" in condition) {
22
+ return {
23
+ type: "and",
24
+ and: {
25
+ conditions: condition.conditions.map(c => convertConditionDefinition(c, actionParameters))
26
+ }
27
+ };
28
+ } else {
29
+ return condition;
30
+ }
31
+ case "or":
32
+ if ("conditions" in condition) {
33
+ return {
34
+ type: "or",
35
+ or: {
36
+ conditions: condition.conditions.map(c => convertConditionDefinition(c, actionParameters))
37
+ }
38
+ };
39
+ } else {
40
+ return condition;
41
+ }
42
+ case "group":
43
+ return {
44
+ type: "comparison",
45
+ comparison: {
46
+ operator: "INTERSECTS",
47
+ left: {
48
+ type: "userProperty",
49
+ userProperty: {
50
+ userId: {
51
+ type: "currentUser",
52
+ currentUser: {}
53
+ },
54
+ propertyValue: {
55
+ type: "groupIds",
56
+ groupIds: {}
57
+ }
58
+ }
59
+ },
60
+ right: {
61
+ type: "staticValue",
62
+ staticValue: {
63
+ type: "stringList",
64
+ stringList: {
65
+ strings: [condition.name]
66
+ }
67
+ }
68
+ }
69
+ }
70
+ };
71
+ case "parameter":
72
+ !actionParameters?.some(param => param.id === condition.parameterId) ? process.env.NODE_ENV !== "production" ? invariant(false, `Action parameter condition references unknown parameter ${condition.parameterId}`) : invariant(false) : void 0;
73
+ return {
74
+ type: "comparison",
75
+ comparison: {
76
+ operator: "EQUALS",
77
+ left: {
78
+ type: "parameterId",
79
+ parameterId: condition.parameterId
80
+ },
81
+ right: condition.matches
82
+ }
83
+ };
84
+ default:
85
+ return condition;
86
+ }
87
+ }
88
+ //# sourceMappingURL=convertConditionDefinition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertConditionDefinition.js","names":["invariant","convertConditionDefinition","condition","actionParameters","type","and","conditions","map","c","or","comparison","operator","left","userProperty","userId","currentUser","propertyValue","groupIds","right","staticValue","stringList","strings","name","some","param","id","parameterId","process","env","NODE_ENV","matches"],"sources":["convertConditionDefinition.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 { OntologyIrCondition } from \"@osdk/client.unstable\";\nimport invariant from \"tiny-invariant\";\nimport type { ActionParameter } from \"../../api/action/ActionParameter.js\";\nimport type { ConditionDefinition } from \"../../api/action/ConditionDefinition.js\";\n\nexport function convertConditionDefinition(\n condition: ConditionDefinition,\n actionParameters?: ActionParameter[],\n): OntologyIrCondition {\n switch (condition.type) {\n case \"and\":\n if (\"conditions\" in condition) {\n return {\n type: \"and\",\n and: {\n conditions: condition.conditions.map(c =>\n convertConditionDefinition(c, actionParameters)\n ),\n },\n };\n } else {\n return condition;\n }\n case \"or\":\n if (\"conditions\" in condition) {\n return {\n type: \"or\",\n or: {\n conditions: condition.conditions.map(c =>\n convertConditionDefinition(c, actionParameters)\n ),\n },\n };\n } else {\n return condition;\n }\n case \"group\":\n return {\n type: \"comparison\",\n comparison: {\n operator: \"INTERSECTS\",\n left: {\n type: \"userProperty\",\n userProperty: {\n userId: {\n type: \"currentUser\",\n currentUser: {},\n },\n propertyValue: {\n type: \"groupIds\",\n groupIds: {},\n },\n },\n },\n right: {\n type: \"staticValue\",\n staticValue: {\n type: \"stringList\",\n stringList: {\n strings: [\n condition.name,\n ],\n },\n },\n },\n },\n };\n case \"parameter\":\n invariant(\n actionParameters?.some(param => param.id === condition.parameterId),\n `Action parameter condition references unknown parameter ${condition.parameterId}`,\n );\n return {\n type: \"comparison\",\n comparison: {\n operator: \"EQUALS\",\n left: {\n type: \"parameterId\",\n parameterId: condition.parameterId,\n },\n right: condition.matches,\n },\n };\n default:\n return condition;\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,0BAA0BA,CACxCC,SAA8B,EAC9BC,gBAAoC,EACf;EACrB,QAAQD,SAAS,CAACE,IAAI;IACpB,KAAK,KAAK;MACR,IAAI,YAAY,IAAIF,SAAS,EAAE;QAC7B,OAAO;UACLE,IAAI,EAAE,KAAK;UACXC,GAAG,EAAE;YACHC,UAAU,EAAEJ,SAAS,CAACI,UAAU,CAACC,GAAG,CAACC,CAAC,IACpCP,0BAA0B,CAACO,CAAC,EAAEL,gBAAgB,CAChD;UACF;QACF,CAAC;MACH,CAAC,MAAM;QACL,OAAOD,SAAS;MAClB;IACF,KAAK,IAAI;MACP,IAAI,YAAY,IAAIA,SAAS,EAAE;QAC7B,OAAO;UACLE,IAAI,EAAE,IAAI;UACVK,EAAE,EAAE;YACFH,UAAU,EAAEJ,SAAS,CAACI,UAAU,CAACC,GAAG,CAACC,CAAC,IACpCP,0BAA0B,CAACO,CAAC,EAAEL,gBAAgB,CAChD;UACF;QACF,CAAC;MACH,CAAC,MAAM;QACL,OAAOD,SAAS;MAClB;IACF,KAAK,OAAO;MACV,OAAO;QACLE,IAAI,EAAE,YAAY;QAClBM,UAAU,EAAE;UACVC,QAAQ,EAAE,YAAY;UACtBC,IAAI,EAAE;YACJR,IAAI,EAAE,cAAc;YACpBS,YAAY,EAAE;cACZC,MAAM,EAAE;gBACNV,IAAI,EAAE,aAAa;gBACnBW,WAAW,EAAE,CAAC;cAChB,CAAC;cACDC,aAAa,EAAE;gBACbZ,IAAI,EAAE,UAAU;gBAChBa,QAAQ,EAAE,CAAC;cACb;YACF;UACF,CAAC;UACDC,KAAK,EAAE;YACLd,IAAI,EAAE,aAAa;YACnBe,WAAW,EAAE;cACXf,IAAI,EAAE,YAAY;cAClBgB,UAAU,EAAE;gBACVC,OAAO,EAAE,CACPnB,SAAS,CAACoB,IAAI;cAElB;YACF;UACF;QACF;MACF,CAAC;IACH,KAAK,WAAW;MACd,CACEnB,gBAAgB,EAAEoB,IAAI,CAACC,KAAK,IAAIA,KAAK,CAACC,EAAE,KAAKvB,SAAS,CAACwB,WAAW,CAAC,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBADrE7B,SAAS,QAEP,2DAA2DE,SAAS,CAACwB,WAAW,EAAE,IAFpF1B,SAAS;MAIT,OAAO;QACLI,IAAI,EAAE,YAAY;QAClBM,UAAU,EAAE;UACVC,QAAQ,EAAE,QAAQ;UAClBC,IAAI,EAAE;YACJR,IAAI,EAAE,aAAa;YACnBsB,WAAW,EAAExB,SAAS,CAACwB;UACzB,CAAC;UACDR,KAAK,EAAEhB,SAAS,CAAC4B;QACnB;MACF,CAAC;IACH;MACE,OAAO5B,SAAS;EACpB;AACF","ignoreList":[]}
@@ -0,0 +1,26 @@
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 convertDataConstraintToDataConstraints(dc) {
19
+ return {
20
+ propertyTypeConstraints: [{
21
+ constraints: dataConstraintToPropertyTypeDataConstraint(dc)
22
+ // known limitation: structs don't carry field-level data constraint failure messages
23
+ }]
24
+ };
25
+ }
26
+ //# sourceMappingURL=convertDataConstraintToDataConstraints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertDataConstraintToDataConstraints.js","names":["dataConstraintToPropertyTypeDataConstraint","convertDataConstraintToDataConstraints","dc","propertyTypeConstraints","constraints"],"sources":["convertDataConstraintToDataConstraints.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 { DataConstraint, DataConstraints } from \"@osdk/client.unstable\";\nimport { dataConstraintToPropertyTypeDataConstraint } from \"./dataConstraintToPropertyTypeDataConstraint.js\";\n\nexport function convertDataConstraintToDataConstraints(\n dc: DataConstraint,\n): DataConstraints {\n return {\n propertyTypeConstraints: [\n {\n constraints: dataConstraintToPropertyTypeDataConstraint(dc),\n // known limitation: structs don't carry field-level data constraint failure messages\n },\n ],\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,0CAA0C,QAAQ,iDAAiD;AAE5G,OAAO,SAASC,sCAAsCA,CACpDC,EAAkB,EACD;EACjB,OAAO;IACLC,uBAAuB,EAAE,CACvB;MACEC,WAAW,EAAEJ,0CAA0C,CAACE,EAAE;MAC1D;IACF,CAAC;EAEL,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,89 @@
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 convertDatasourceDefinition(objectType, properties) {
18
+ switch (objectType.datasource?.type) {
19
+ case "stream":
20
+ const window = objectType.datasource.retentionPeriod;
21
+ const retentionPolicy = window ? {
22
+ type: "time",
23
+ time: {
24
+ window
25
+ }
26
+ } : {
27
+ type: "none",
28
+ none: {}
29
+ };
30
+ const propertyMapping = Object.fromEntries(properties.map(prop => [prop.apiName, prop.apiName]));
31
+ return {
32
+ type: "streamV2",
33
+ streamV2: {
34
+ streamLocator: objectType.apiName,
35
+ propertyMapping,
36
+ retentionPolicy,
37
+ propertySecurityGroups: undefined
38
+ }
39
+ };
40
+ case "restrictedView":
41
+ return {
42
+ type: "restrictedViewV2",
43
+ restrictedViewV2: {
44
+ restrictedViewRid: objectType.apiName,
45
+ propertyMapping: buildPropertyMapping(properties)
46
+ }
47
+ };
48
+ case "dataset":
49
+ default:
50
+ return {
51
+ type: "datasetV2",
52
+ datasetV2: {
53
+ datasetRid: objectType.apiName,
54
+ propertyMapping: buildPropertyMapping(properties)
55
+ }
56
+ };
57
+ }
58
+ }
59
+ function buildPropertyMapping(properties) {
60
+ return Object.fromEntries(properties.map(prop => {
61
+ // editOnly
62
+ if (prop.editOnly) {
63
+ return [prop.apiName, {
64
+ type: "editOnly",
65
+ editOnly: {}
66
+ }];
67
+ }
68
+ // structs
69
+ if (typeof prop.type === "object" && prop.type?.type === "struct") {
70
+ const structMapping = {
71
+ type: "struct",
72
+ struct: {
73
+ column: prop.apiName,
74
+ mapping: Object.fromEntries(Object.keys(prop.type.structDefinition).map(fieldName => [fieldName, {
75
+ apiName: fieldName,
76
+ mappings: {}
77
+ }]))
78
+ }
79
+ };
80
+ return [prop.apiName, structMapping];
81
+ }
82
+ // default: column mapping
83
+ return [prop.apiName, {
84
+ type: "column",
85
+ column: prop.apiName
86
+ }];
87
+ }));
88
+ }
89
+ //# sourceMappingURL=convertDatasourceDefinition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertDatasourceDefinition.js","names":["convertDatasourceDefinition","objectType","properties","datasource","type","window","retentionPeriod","retentionPolicy","time","none","propertyMapping","Object","fromEntries","map","prop","apiName","streamV2","streamLocator","propertySecurityGroups","undefined","restrictedViewV2","restrictedViewRid","buildPropertyMapping","datasetV2","datasetRid","editOnly","structMapping","struct","column","mapping","keys","structDefinition","fieldName","mappings"],"sources":["convertDatasourceDefinition.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 OntologyIrObjectTypeDatasourceDefinition,\n PropertyTypeMappingInfo,\n RetentionPolicy,\n} from \"@osdk/client.unstable\";\nimport type { ObjectPropertyType } from \"../../api/object/ObjectPropertyType.js\";\nimport type { ObjectType } from \"../../api/object/ObjectType.js\";\n\nexport function convertDatasourceDefinition(\n objectType: ObjectType,\n properties: ObjectPropertyType[],\n): OntologyIrObjectTypeDatasourceDefinition {\n switch (objectType.datasource?.type) {\n case \"stream\":\n const window = objectType.datasource.retentionPeriod;\n const retentionPolicy: RetentionPolicy = window\n ? { type: \"time\", time: { window } }\n : { type: \"none\", none: {} };\n const propertyMapping = Object.fromEntries(\n properties.map((\n prop,\n ) => [prop.apiName, prop.apiName]),\n );\n return {\n type: \"streamV2\",\n streamV2: {\n streamLocator: objectType.apiName,\n propertyMapping,\n retentionPolicy,\n propertySecurityGroups: undefined,\n },\n };\n case \"restrictedView\":\n return {\n type: \"restrictedViewV2\",\n restrictedViewV2: {\n restrictedViewRid: objectType.apiName,\n propertyMapping: buildPropertyMapping(properties),\n },\n };\n case \"dataset\":\n default:\n return {\n type: \"datasetV2\",\n datasetV2: {\n datasetRid: objectType.apiName,\n propertyMapping: buildPropertyMapping(properties),\n },\n };\n }\n}\n\nfunction buildPropertyMapping(\n properties: ObjectPropertyType[],\n): Record<string, PropertyTypeMappingInfo> {\n return Object.fromEntries(\n properties.map((prop) => {\n // editOnly\n if (prop.editOnly) {\n return [prop.apiName, { type: \"editOnly\", editOnly: {} }];\n }\n // structs\n if (typeof prop.type === \"object\" && prop.type?.type === \"struct\") {\n const structMapping = {\n type: \"struct\",\n struct: {\n column: prop.apiName,\n mapping: Object.fromEntries(\n Object.keys(prop.type.structDefinition).map((fieldName) => [\n fieldName,\n { apiName: fieldName, mappings: {} },\n ]),\n ),\n },\n };\n return [prop.apiName, structMapping];\n }\n // default: column mapping\n return [prop.apiName, { type: \"column\", column: prop.apiName }];\n }),\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,OAAO,SAASA,2BAA2BA,CACzCC,UAAsB,EACtBC,UAAgC,EACU;EAC1C,QAAQD,UAAU,CAACE,UAAU,EAAEC,IAAI;IACjC,KAAK,QAAQ;MACX,MAAMC,MAAM,GAAGJ,UAAU,CAACE,UAAU,CAACG,eAAe;MACpD,MAAMC,eAAgC,GAAGF,MAAM,GAC3C;QAAED,IAAI,EAAE,MAAM;QAAEI,IAAI,EAAE;UAAEH;QAAO;MAAE,CAAC,GAClC;QAAED,IAAI,EAAE,MAAM;QAAEK,IAAI,EAAE,CAAC;MAAE,CAAC;MAC9B,MAAMC,eAAe,GAAGC,MAAM,CAACC,WAAW,CACxCV,UAAU,CAACW,GAAG,CACZC,IAAI,IACD,CAACA,IAAI,CAACC,OAAO,EAAED,IAAI,CAACC,OAAO,CAAC,CACnC,CAAC;MACD,OAAO;QACLX,IAAI,EAAE,UAAU;QAChBY,QAAQ,EAAE;UACRC,aAAa,EAAEhB,UAAU,CAACc,OAAO;UACjCL,eAAe;UACfH,eAAe;UACfW,sBAAsB,EAAEC;QAC1B;MACF,CAAC;IACH,KAAK,gBAAgB;MACnB,OAAO;QACLf,IAAI,EAAE,kBAAkB;QACxBgB,gBAAgB,EAAE;UAChBC,iBAAiB,EAAEpB,UAAU,CAACc,OAAO;UACrCL,eAAe,EAAEY,oBAAoB,CAACpB,UAAU;QAClD;MACF,CAAC;IACH,KAAK,SAAS;IACd;MACE,OAAO;QACLE,IAAI,EAAE,WAAW;QACjBmB,SAAS,EAAE;UACTC,UAAU,EAAEvB,UAAU,CAACc,OAAO;UAC9BL,eAAe,EAAEY,oBAAoB,CAACpB,UAAU;QAClD;MACF,CAAC;EACL;AACF;AAEA,SAASoB,oBAAoBA,CAC3BpB,UAAgC,EACS;EACzC,OAAOS,MAAM,CAACC,WAAW,CACvBV,UAAU,CAACW,GAAG,CAAEC,IAAI,IAAK;IACvB;IACA,IAAIA,IAAI,CAACW,QAAQ,EAAE;MACjB,OAAO,CAACX,IAAI,CAACC,OAAO,EAAE;QAAEX,IAAI,EAAE,UAAU;QAAEqB,QAAQ,EAAE,CAAC;MAAE,CAAC,CAAC;IAC3D;IACA;IACA,IAAI,OAAOX,IAAI,CAACV,IAAI,KAAK,QAAQ,IAAIU,IAAI,CAACV,IAAI,EAAEA,IAAI,KAAK,QAAQ,EAAE;MACjE,MAAMsB,aAAa,GAAG;QACpBtB,IAAI,EAAE,QAAQ;QACduB,MAAM,EAAE;UACNC,MAAM,EAAEd,IAAI,CAACC,OAAO;UACpBc,OAAO,EAAElB,MAAM,CAACC,WAAW,CACzBD,MAAM,CAACmB,IAAI,CAAChB,IAAI,CAACV,IAAI,CAAC2B,gBAAgB,CAAC,CAAClB,GAAG,CAAEmB,SAAS,IAAK,CACzDA,SAAS,EACT;YAAEjB,OAAO,EAAEiB,SAAS;YAAEC,QAAQ,EAAE,CAAC;UAAE,CAAC,CACrC,CACH;QACF;MACF,CAAC;MACD,OAAO,CAACnB,IAAI,CAACC,OAAO,EAAEW,aAAa,CAAC;IACtC;IACA;IACA,OAAO,CAACZ,IAAI,CAACC,OAAO,EAAE;MAAEX,IAAI,EAAE,QAAQ;MAAEwB,MAAM,EAAEd,IAAI,CAACC;IAAQ,CAAC,CAAC;EACjE,CAAC,CACH,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,47 @@
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 { convertSpt } from "./convertSpt.js";
18
+ export function convertInterface(interfaceType) {
19
+ const {
20
+ __type,
21
+ ...other
22
+ } = interfaceType;
23
+ return {
24
+ ...other,
25
+ propertiesV2: Object.fromEntries(Object.values(interfaceType.propertiesV2).map(spt => [spt.sharedPropertyType.apiName, {
26
+ required: spt.required,
27
+ sharedPropertyType: convertSpt(spt.sharedPropertyType)
28
+ }])),
29
+ displayMetadata: {
30
+ displayName: interfaceType.displayMetadata.displayName,
31
+ description: interfaceType.displayMetadata.description,
32
+ icon: interfaceType.displayMetadata.icon ?? {
33
+ type: "blueprint",
34
+ blueprint: {
35
+ color: "#4C90F0",
36
+ locator: "layout-hierarchy"
37
+ }
38
+ }
39
+ },
40
+ extendsInterfaces: interfaceType.extendsInterfaces.map(i => i.apiName),
41
+ // these are omitted from our internal types but we need to re-add them for the final json
42
+ properties: [],
43
+ // TODO(mwalther): Support propertiesV3
44
+ propertiesV3: {}
45
+ };
46
+ }
47
+ //# sourceMappingURL=convertInterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertInterface.js","names":["convertSpt","convertInterface","interfaceType","__type","other","propertiesV2","Object","fromEntries","values","map","spt","sharedPropertyType","apiName","required","displayMetadata","displayName","description","icon","type","blueprint","color","locator","extendsInterfaces","i","properties","propertiesV3"],"sources":["convertInterface.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 { OntologyIrMarketplaceInterfaceType } from \"@osdk/client.unstable\";\nimport type { InterfaceType } from \"../../api/interface/InterfaceType.js\";\nimport { convertSpt } from \"./convertSpt.js\";\n\nexport function convertInterface(\n interfaceType: InterfaceType,\n): OntologyIrMarketplaceInterfaceType {\n const { __type, ...other } = interfaceType;\n return {\n ...other,\n propertiesV2: Object.fromEntries(\n Object.values(interfaceType.propertiesV2)\n .map((\n spt,\n ) => [spt.sharedPropertyType.apiName, {\n required: spt.required,\n sharedPropertyType: convertSpt(spt.sharedPropertyType),\n }]),\n ),\n displayMetadata: {\n displayName: interfaceType.displayMetadata.displayName,\n description: interfaceType.displayMetadata.description,\n icon: interfaceType.displayMetadata.icon ?? {\n type: \"blueprint\",\n blueprint: { color: \"#4C90F0\", locator: \"layout-hierarchy\" },\n },\n },\n extendsInterfaces: interfaceType.extendsInterfaces.map(i => i.apiName),\n // these are omitted from our internal types but we need to re-add them for the final json\n properties: [],\n // TODO(mwalther): Support propertiesV3\n propertiesV3: {},\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,UAAU,QAAQ,iBAAiB;AAE5C,OAAO,SAASC,gBAAgBA,CAC9BC,aAA4B,EACQ;EACpC,MAAM;IAAEC,MAAM;IAAE,GAAGC;EAAM,CAAC,GAAGF,aAAa;EAC1C,OAAO;IACL,GAAGE,KAAK;IACRC,YAAY,EAAEC,MAAM,CAACC,WAAW,CAC9BD,MAAM,CAACE,MAAM,CAACN,aAAa,CAACG,YAAY,CAAC,CACtCI,GAAG,CACFC,GAAG,IACA,CAACA,GAAG,CAACC,kBAAkB,CAACC,OAAO,EAAE;MACpCC,QAAQ,EAAEH,GAAG,CAACG,QAAQ;MACtBF,kBAAkB,EAAEX,UAAU,CAACU,GAAG,CAACC,kBAAkB;IACvD,CAAC,CAAC,CACN,CAAC;IACDG,eAAe,EAAE;MACfC,WAAW,EAAEb,aAAa,CAACY,eAAe,CAACC,WAAW;MACtDC,WAAW,EAAEd,aAAa,CAACY,eAAe,CAACE,WAAW;MACtDC,IAAI,EAAEf,aAAa,CAACY,eAAe,CAACG,IAAI,IAAI;QAC1CC,IAAI,EAAE,WAAW;QACjBC,SAAS,EAAE;UAAEC,KAAK,EAAE,SAAS;UAAEC,OAAO,EAAE;QAAmB;MAC7D;IACF,CAAC;IACDC,iBAAiB,EAAEpB,aAAa,CAACoB,iBAAiB,CAACb,GAAG,CAACc,CAAC,IAAIA,CAAC,CAACX,OAAO,CAAC;IACtE;IACAY,UAAU,EAAE,EAAE;IACd;IACAC,YAAY,EAAE,CAAC;EACjB,CAAC;AACH","ignoreList":[]}