@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 @@
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)) ?? []
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")) ?? []
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 ),\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 ),\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,CA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jC,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,86 @@
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 convertConditionDefinition(condition) {
18
+ switch (condition.type) {
19
+ case "and":
20
+ if ("conditions" in condition) {
21
+ return {
22
+ type: "and",
23
+ and: {
24
+ conditions: condition.conditions.map(c => convertConditionDefinition(c))
25
+ }
26
+ };
27
+ } else {
28
+ return condition;
29
+ }
30
+ case "or":
31
+ if ("conditions" in condition) {
32
+ return {
33
+ type: "or",
34
+ or: {
35
+ conditions: condition.conditions.map(c => convertConditionDefinition(c))
36
+ }
37
+ };
38
+ } else {
39
+ return condition;
40
+ }
41
+ case "group":
42
+ return {
43
+ type: "comparison",
44
+ comparison: {
45
+ operator: "INTERSECTS",
46
+ left: {
47
+ type: "userProperty",
48
+ userProperty: {
49
+ userId: {
50
+ type: "currentUser",
51
+ currentUser: {}
52
+ },
53
+ propertyValue: {
54
+ type: "groupIds",
55
+ groupIds: {}
56
+ }
57
+ }
58
+ },
59
+ right: {
60
+ type: "staticValue",
61
+ staticValue: {
62
+ type: "stringList",
63
+ stringList: {
64
+ strings: [condition.name]
65
+ }
66
+ }
67
+ }
68
+ }
69
+ };
70
+ case "parameter":
71
+ return {
72
+ type: "comparison",
73
+ comparison: {
74
+ operator: "EQUALS",
75
+ left: {
76
+ type: "parameterId",
77
+ parameterId: condition.parameterId
78
+ },
79
+ right: condition.matches
80
+ }
81
+ };
82
+ default:
83
+ return condition;
84
+ }
85
+ }
86
+ //# sourceMappingURL=convertConditionDefinition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertConditionDefinition.js","names":["convertConditionDefinition","condition","type","and","conditions","map","c","or","comparison","operator","left","userProperty","userId","currentUser","propertyValue","groupIds","right","staticValue","stringList","strings","name","parameterId","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 type { ConditionDefinition } from \"../../api/action/ConditionDefinition.js\";\n\nexport function convertConditionDefinition(\n condition: ConditionDefinition,\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)\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)\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 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;;AAKA,OAAO,SAASA,0BAA0BA,CACxCC,SAA8B,EACT;EACrB,QAAQA,SAAS,CAACC,IAAI;IACpB,KAAK,KAAK;MACR,IAAI,YAAY,IAAID,SAAS,EAAE;QAC7B,OAAO;UACLC,IAAI,EAAE,KAAK;UACXC,GAAG,EAAE;YACHC,UAAU,EAAEH,SAAS,CAACG,UAAU,CAACC,GAAG,CAACC,CAAC,IACpCN,0BAA0B,CAACM,CAAC,CAC9B;UACF;QACF,CAAC;MACH,CAAC,MAAM;QACL,OAAOL,SAAS;MAClB;IACF,KAAK,IAAI;MACP,IAAI,YAAY,IAAIA,SAAS,EAAE;QAC7B,OAAO;UACLC,IAAI,EAAE,IAAI;UACVK,EAAE,EAAE;YACFH,UAAU,EAAEH,SAAS,CAACG,UAAU,CAACC,GAAG,CAACC,CAAC,IACpCN,0BAA0B,CAACM,CAAC,CAC9B;UACF;QACF,CAAC;MACH,CAAC,MAAM;QACL,OAAOL,SAAS;MAClB;IACF,KAAK,OAAO;MACV,OAAO;QACLC,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,CACPlB,SAAS,CAACmB,IAAI;cAElB;YACF;UACF;QACF;MACF,CAAC;IACH,KAAK,WAAW;MACd,OAAO;QACLlB,IAAI,EAAE,YAAY;QAClBM,UAAU,EAAE;UACVC,QAAQ,EAAE,QAAQ;UAClBC,IAAI,EAAE;YACJR,IAAI,EAAE,aAAa;YACnBmB,WAAW,EAAEpB,SAAS,CAACoB;UACzB,CAAC;UACDL,KAAK,EAAEf,SAAS,CAACqB;QACnB;MACF,CAAC;IACH;MACE,OAAOrB,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,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,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":[]}
@@ -0,0 +1,119 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { cleanAndValidateLinkTypeId } from "../../api/defineOntology.js";
18
+ import { convertCardinality } from "./convertCardinality.js";
19
+ export function convertLink(linkType) {
20
+ let definition;
21
+ let datasource = undefined;
22
+ if ("one" in linkType) {
23
+ definition = {
24
+ type: "oneToMany",
25
+ oneToMany: {
26
+ cardinalityHint: convertCardinality(linkType.cardinality),
27
+ manyToOneLinkMetadata: linkType.toMany.metadata,
28
+ objectTypeRidManySide: linkType.toMany.object.apiName,
29
+ objectTypeRidOneSide: linkType.one.object.apiName,
30
+ oneToManyLinkMetadata: linkType.one.metadata,
31
+ oneSidePrimaryKeyToManySidePropertyMapping: [{
32
+ from: {
33
+ apiName: linkType.one.object.primaryKeyPropertyApiName,
34
+ object: linkType.one.object.apiName
35
+ },
36
+ to: {
37
+ apiName: linkType.manyForeignKeyProperty,
38
+ object: linkType.toMany.object.apiName
39
+ }
40
+ }]
41
+ }
42
+ };
43
+ } else {
44
+ definition = {
45
+ type: "manyToMany",
46
+ manyToMany: {
47
+ objectTypeAToBLinkMetadata: linkType.many.metadata,
48
+ objectTypeBToALinkMetadata: linkType.toMany.metadata,
49
+ objectTypeRidA: linkType.many.object.apiName,
50
+ objectTypeRidB: linkType.toMany.object.apiName,
51
+ peeringMetadata: undefined,
52
+ objectTypeAPrimaryKeyPropertyMapping: [{
53
+ from: {
54
+ apiName: linkType.many.object.primaryKeyPropertyApiName,
55
+ object: linkType.many.object.apiName
56
+ },
57
+ to: {
58
+ apiName: linkType.many.object.primaryKeyPropertyApiName,
59
+ object: linkType.many.object.apiName
60
+ }
61
+ }],
62
+ objectTypeBPrimaryKeyPropertyMapping: [{
63
+ from: {
64
+ apiName: linkType.toMany.object.primaryKeyPropertyApiName,
65
+ object: linkType.toMany.object.apiName
66
+ },
67
+ to: {
68
+ apiName: linkType.toMany.object.primaryKeyPropertyApiName,
69
+ object: linkType.toMany.object.apiName
70
+ }
71
+ }]
72
+ }
73
+ };
74
+ datasource = {
75
+ rid: "ri.ontology.main.datasource.link-".concat(linkType.apiName),
76
+ datasource: {
77
+ type: "dataset",
78
+ dataset: {
79
+ datasetRid: "link-".concat(linkType.apiName),
80
+ writebackDatasetRid: undefined,
81
+ objectTypeAPrimaryKeyMapping: [{
82
+ property: {
83
+ apiName: linkType.many.object.primaryKeyPropertyApiName,
84
+ object: linkType.many.object.apiName
85
+ },
86
+ column: linkType.many.object.primaryKeyPropertyApiName
87
+ }],
88
+ objectTypeBPrimaryKeyMapping: [{
89
+ property: {
90
+ apiName: linkType.toMany.object.primaryKeyPropertyApiName,
91
+ object: linkType.toMany.object.apiName
92
+ },
93
+ column: linkType.toMany.object.primaryKeyPropertyApiName
94
+ }]
95
+ }
96
+ },
97
+ editsConfiguration: {
98
+ onlyAllowPrivilegedEdits: false
99
+ },
100
+ redacted: linkType.redacted
101
+ };
102
+ }
103
+ return {
104
+ linkType: {
105
+ definition: definition,
106
+ id: cleanAndValidateLinkTypeId(linkType.apiName),
107
+ status: linkType.status ?? {
108
+ type: "active",
109
+ active: {}
110
+ },
111
+ redacted: linkType.redacted ?? false
112
+ },
113
+ datasources: datasource !== undefined ? [datasource] : [],
114
+ entityMetadata: {
115
+ arePatchesEnabled: linkType.editsEnabled ?? false
116
+ }
117
+ };
118
+ }
119
+ //# sourceMappingURL=convertLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertLink.js","names":["cleanAndValidateLinkTypeId","convertCardinality","convertLink","linkType","definition","datasource","undefined","type","oneToMany","cardinalityHint","cardinality","manyToOneLinkMetadata","toMany","metadata","objectTypeRidManySide","object","apiName","objectTypeRidOneSide","one","oneToManyLinkMetadata","oneSidePrimaryKeyToManySidePropertyMapping","from","primaryKeyPropertyApiName","to","manyForeignKeyProperty","manyToMany","objectTypeAToBLinkMetadata","many","objectTypeBToALinkMetadata","objectTypeRidA","objectTypeRidB","peeringMetadata","objectTypeAPrimaryKeyPropertyMapping","objectTypeBPrimaryKeyPropertyMapping","rid","concat","dataset","datasetRid","writebackDatasetRid","objectTypeAPrimaryKeyMapping","property","column","objectTypeBPrimaryKeyMapping","editsConfiguration","onlyAllowPrivilegedEdits","redacted","id","status","active","datasources","entityMetadata","arePatchesEnabled","editsEnabled"],"sources":["convertLink.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n OntologyIrLinkDefinition,\n OntologyIrLinkTypeBlockDataV2,\n OntologyIrManyToManyLinkTypeDatasource,\n} from \"@osdk/client.unstable\";\nimport { cleanAndValidateLinkTypeId } from \"../../api/defineOntology.js\";\nimport type { LinkType } from \"../../api/links/LinkType.js\";\nimport { convertCardinality } from \"./convertCardinality.js\";\n\nexport function convertLink(\n linkType: LinkType,\n): OntologyIrLinkTypeBlockDataV2 {\n let definition: OntologyIrLinkDefinition;\n let datasource: OntologyIrManyToManyLinkTypeDatasource | undefined =\n undefined;\n if (\"one\" in linkType) {\n definition = {\n type: \"oneToMany\",\n oneToMany: {\n cardinalityHint: convertCardinality(linkType.cardinality),\n manyToOneLinkMetadata: linkType.toMany.metadata,\n objectTypeRidManySide: linkType.toMany.object.apiName,\n objectTypeRidOneSide: linkType.one.object.apiName,\n oneToManyLinkMetadata: linkType.one.metadata,\n oneSidePrimaryKeyToManySidePropertyMapping: [{\n from: {\n apiName: linkType.one.object.primaryKeyPropertyApiName,\n object: linkType.one.object.apiName,\n },\n to: {\n apiName: linkType.manyForeignKeyProperty,\n object: linkType.toMany.object.apiName,\n },\n }],\n },\n };\n } else {\n definition = {\n type: \"manyToMany\",\n manyToMany: {\n objectTypeAToBLinkMetadata: linkType.many.metadata,\n objectTypeBToALinkMetadata: linkType.toMany.metadata,\n objectTypeRidA: linkType.many.object.apiName,\n objectTypeRidB: linkType.toMany.object.apiName,\n peeringMetadata: undefined,\n objectTypeAPrimaryKeyPropertyMapping: [{\n from: {\n apiName: linkType.many.object.primaryKeyPropertyApiName,\n object: linkType.many.object.apiName,\n },\n to: {\n apiName: linkType.many.object.primaryKeyPropertyApiName,\n object: linkType.many.object.apiName,\n },\n }],\n objectTypeBPrimaryKeyPropertyMapping: [{\n from: {\n apiName: linkType.toMany.object.primaryKeyPropertyApiName,\n object: linkType.toMany.object.apiName,\n },\n to: {\n apiName: linkType.toMany.object.primaryKeyPropertyApiName,\n object: linkType.toMany.object.apiName,\n },\n }],\n },\n };\n\n datasource = {\n rid: \"ri.ontology.main.datasource.link-\".concat(linkType.apiName),\n datasource: {\n type: \"dataset\",\n dataset: {\n datasetRid: \"link-\".concat(linkType.apiName),\n writebackDatasetRid: undefined,\n objectTypeAPrimaryKeyMapping: [{\n property: {\n apiName: linkType.many.object.primaryKeyPropertyApiName,\n object: linkType.many.object.apiName,\n },\n column: linkType.many.object.primaryKeyPropertyApiName,\n }],\n objectTypeBPrimaryKeyMapping: [{\n property: {\n apiName: linkType.toMany.object.primaryKeyPropertyApiName,\n object: linkType.toMany.object.apiName,\n },\n column: linkType.toMany.object.primaryKeyPropertyApiName,\n }],\n },\n },\n editsConfiguration: {\n onlyAllowPrivilegedEdits: false,\n },\n redacted: linkType.redacted,\n };\n }\n\n return {\n linkType: {\n definition: definition,\n id: cleanAndValidateLinkTypeId(linkType.apiName),\n status: linkType.status ?? { type: \"active\", active: {} },\n redacted: linkType.redacted ?? false,\n },\n datasources: datasource !== undefined ? [datasource] : [],\n entityMetadata: {\n arePatchesEnabled: linkType.editsEnabled ?? false,\n },\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,SAASA,0BAA0B,QAAQ,6BAA6B;AAExE,SAASC,kBAAkB,QAAQ,yB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