@osdk/maker-experimental 0.6.0-beta.1 → 0.6.0-beta.3

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 (302) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/bin/maker-experimental.mjs +6 -0
  3. package/build/browser/api/defineOntologyV2.js +35 -0
  4. package/build/browser/api/defineOntologyV2.js.map +1 -0
  5. package/build/browser/cli/main.js +120 -0
  6. package/build/browser/cli/main.js.map +1 -0
  7. package/build/browser/cli/marketplaceSerialization/BlockGeneratorResult.js +2 -0
  8. package/build/browser/cli/marketplaceSerialization/BlockGeneratorResult.js.map +1 -0
  9. package/build/browser/cli/marketplaceSerialization/CodeBlockSetSpec.js +2 -0
  10. package/build/browser/cli/marketplaceSerialization/CodeBlockSetSpec.js.map +1 -0
  11. package/build/browser/cli/marketplaceSerialization/CodeBlockSpec.js +53 -0
  12. package/build/browser/cli/marketplaceSerialization/CodeBlockSpec.js.map +1 -0
  13. package/build/browser/cli/marketplaceSerialization/StoreManifestEntry.js +2 -0
  14. package/build/browser/cli/marketplaceSerialization/StoreManifestEntry.js.map +1 -0
  15. package/build/browser/cli/marketplaceSerialization/index.js +2 -0
  16. package/build/browser/cli/marketplaceSerialization/index.js.map +1 -0
  17. package/build/browser/cli/marketplaceSerialization/specGenerators.js +70 -0
  18. package/build/browser/cli/marketplaceSerialization/specGenerators.js.map +1 -0
  19. package/build/browser/cli/marketplaceSerialization/supportingTypes.js +2 -0
  20. package/build/browser/cli/marketplaceSerialization/supportingTypes.js.map +1 -0
  21. package/build/browser/conversion/toConjure/distributeTypeHelper.js +23 -0
  22. package/build/browser/conversion/toConjure/distributeTypeHelper.js.map +1 -0
  23. package/build/browser/conversion/toMarketplace/convertActionHelpers.js +469 -0
  24. package/build/browser/conversion/toMarketplace/convertActionHelpers.js.map +1 -0
  25. package/build/browser/conversion/toMarketplace/convertActionParameterConditionalOverride.js +96 -0
  26. package/build/browser/conversion/toMarketplace/convertActionParameterConditionalOverride.js.map +1 -0
  27. package/build/browser/conversion/toMarketplace/convertActionParameters.js +81 -0
  28. package/build/browser/conversion/toMarketplace/convertActionParameters.js.map +1 -0
  29. package/build/browser/conversion/toMarketplace/convertActionSections.js +45 -0
  30. package/build/browser/conversion/toMarketplace/convertActionSections.js.map +1 -0
  31. package/build/browser/conversion/toMarketplace/convertActionValidation.js +160 -0
  32. package/build/browser/conversion/toMarketplace/convertActionValidation.js.map +1 -0
  33. package/build/browser/conversion/toMarketplace/convertActionVisibility.js +41 -0
  34. package/build/browser/conversion/toMarketplace/convertActionVisibility.js.map +1 -0
  35. package/build/browser/conversion/toMarketplace/convertCardinality.js +23 -0
  36. package/build/browser/conversion/toMarketplace/convertCardinality.js.map +1 -0
  37. package/build/browser/conversion/toMarketplace/convertConditionDefinition.js +88 -0
  38. package/build/browser/conversion/toMarketplace/convertConditionDefinition.js.map +1 -0
  39. package/build/browser/conversion/toMarketplace/convertDataConstraintToDataConstraints.js +26 -0
  40. package/build/browser/conversion/toMarketplace/convertDataConstraintToDataConstraints.js.map +1 -0
  41. package/build/browser/conversion/toMarketplace/convertDatasourceDefinition.js +352 -0
  42. package/build/browser/conversion/toMarketplace/convertDatasourceDefinition.js.map +1 -0
  43. package/build/browser/conversion/toMarketplace/convertInterface.js +75 -0
  44. package/build/browser/conversion/toMarketplace/convertInterface.js.map +1 -0
  45. package/build/browser/conversion/toMarketplace/convertInterfacePropertyType.js +62 -0
  46. package/build/browser/conversion/toMarketplace/convertInterfacePropertyType.js.map +1 -0
  47. package/build/browser/conversion/toMarketplace/convertLink.js +247 -0
  48. package/build/browser/conversion/toMarketplace/convertLink.js.map +1 -0
  49. package/build/browser/conversion/toMarketplace/convertMappingValue.js +76 -0
  50. package/build/browser/conversion/toMarketplace/convertMappingValue.js.map +1 -0
  51. package/build/browser/conversion/toMarketplace/convertNullabilityToDataConstraint.js +42 -0
  52. package/build/browser/conversion/toMarketplace/convertNullabilityToDataConstraint.js.map +1 -0
  53. package/build/browser/conversion/toMarketplace/convertObject.js +262 -0
  54. package/build/browser/conversion/toMarketplace/convertObject.js.map +1 -0
  55. package/build/browser/conversion/toMarketplace/convertObjectPropertyType.js +59 -0
  56. package/build/browser/conversion/toMarketplace/convertObjectPropertyType.js.map +1 -0
  57. package/build/browser/conversion/toMarketplace/convertOntologyDefinition.js +29 -0
  58. package/build/browser/conversion/toMarketplace/convertOntologyDefinition.js.map +1 -0
  59. package/build/browser/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js +236 -0
  60. package/build/browser/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js.map +1 -0
  61. package/build/browser/conversion/toMarketplace/convertOntologyToValueTypeIr.js +24 -0
  62. package/build/browser/conversion/toMarketplace/convertOntologyToValueTypeIr.js.map +1 -0
  63. package/build/browser/conversion/toMarketplace/convertSectionConditionalOverride.js +35 -0
  64. package/build/browser/conversion/toMarketplace/convertSectionConditionalOverride.js.map +1 -0
  65. package/build/browser/conversion/toMarketplace/convertSpt.js +65 -0
  66. package/build/browser/conversion/toMarketplace/convertSpt.js.map +1 -0
  67. package/build/browser/conversion/toMarketplace/convertValueType.js +20 -0
  68. package/build/browser/conversion/toMarketplace/convertValueType.js.map +1 -0
  69. package/build/browser/conversion/toMarketplace/convertValueTypeDataConstraints.js +30 -0
  70. package/build/browser/conversion/toMarketplace/convertValueTypeDataConstraints.js.map +1 -0
  71. package/build/browser/conversion/toMarketplace/convertValueTypesToIr.js +34 -0
  72. package/build/browser/conversion/toMarketplace/convertValueTypesToIr.js.map +1 -0
  73. package/build/browser/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.js +83 -0
  74. package/build/browser/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.js.map +1 -0
  75. package/build/browser/conversion/toMarketplace/getFormContentOrdering.js +39 -0
  76. package/build/browser/conversion/toMarketplace/getFormContentOrdering.js.map +1 -0
  77. package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.js +146 -0
  78. package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.js.map +1 -0
  79. package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js +156 -0
  80. package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js.map +1 -0
  81. package/build/browser/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.js +442 -0
  82. package/build/browser/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.js.map +1 -0
  83. package/build/browser/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.js +562 -0
  84. package/build/browser/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.js.map +1 -0
  85. package/build/browser/conversion/toMarketplace/shapeExtractors/IrShapeExtractor.js +513 -0
  86. package/build/browser/conversion/toMarketplace/shapeExtractors/IrShapeExtractor.js.map +1 -0
  87. package/build/browser/conversion/toMarketplace/shapeExtractors/LinkTypeShapeExtractor.js +274 -0
  88. package/build/browser/conversion/toMarketplace/shapeExtractors/LinkTypeShapeExtractor.js.map +1 -0
  89. package/build/browser/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.js +425 -0
  90. package/build/browser/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.js.map +1 -0
  91. package/build/browser/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.js +677 -0
  92. package/build/browser/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.js.map +1 -0
  93. package/build/browser/conversion/toMarketplace/typeVisitors.js +615 -0
  94. package/build/browser/conversion/toMarketplace/typeVisitors.js.map +1 -0
  95. package/build/browser/index.js +2 -0
  96. package/build/browser/index.js.map +1 -1
  97. package/build/browser/util/generateRid.js +476 -0
  98. package/build/browser/util/generateRid.js.map +1 -0
  99. package/build/cjs/ActionTypeShapeExtractor-5IVLHAPH.cjs +395 -0
  100. package/build/cjs/ActionTypeShapeExtractor-5IVLHAPH.cjs.map +1 -0
  101. package/build/cjs/chunk-AWYOBJ25.cjs +440 -0
  102. package/build/cjs/chunk-AWYOBJ25.cjs.map +1 -0
  103. package/build/cjs/index.cjs +3965 -2663
  104. package/build/cjs/index.cjs.map +1 -1
  105. package/build/cjs/index.d.cts +103 -1
  106. package/build/esm/api/defineOntologyV2.js +35 -0
  107. package/build/esm/api/defineOntologyV2.js.map +1 -0
  108. package/build/esm/cli/main.js +120 -0
  109. package/build/esm/cli/main.js.map +1 -0
  110. package/build/esm/cli/marketplaceSerialization/BlockGeneratorResult.js +2 -0
  111. package/build/esm/cli/marketplaceSerialization/BlockGeneratorResult.js.map +1 -0
  112. package/build/esm/cli/marketplaceSerialization/CodeBlockSetSpec.js +2 -0
  113. package/build/esm/cli/marketplaceSerialization/CodeBlockSetSpec.js.map +1 -0
  114. package/build/esm/cli/marketplaceSerialization/CodeBlockSpec.js +53 -0
  115. package/build/esm/cli/marketplaceSerialization/CodeBlockSpec.js.map +1 -0
  116. package/build/esm/cli/marketplaceSerialization/StoreManifestEntry.js +2 -0
  117. package/build/esm/cli/marketplaceSerialization/StoreManifestEntry.js.map +1 -0
  118. package/build/esm/cli/marketplaceSerialization/index.js +2 -0
  119. package/build/esm/cli/marketplaceSerialization/index.js.map +1 -0
  120. package/build/esm/cli/marketplaceSerialization/specGenerators.js +70 -0
  121. package/build/esm/cli/marketplaceSerialization/specGenerators.js.map +1 -0
  122. package/build/esm/cli/marketplaceSerialization/supportingTypes.js +2 -0
  123. package/build/esm/cli/marketplaceSerialization/supportingTypes.js.map +1 -0
  124. package/build/esm/conversion/toConjure/distributeTypeHelper.js +23 -0
  125. package/build/esm/conversion/toConjure/distributeTypeHelper.js.map +1 -0
  126. package/build/esm/conversion/toMarketplace/convertActionHelpers.js +469 -0
  127. package/build/esm/conversion/toMarketplace/convertActionHelpers.js.map +1 -0
  128. package/build/esm/conversion/toMarketplace/convertActionParameterConditionalOverride.js +96 -0
  129. package/build/esm/conversion/toMarketplace/convertActionParameterConditionalOverride.js.map +1 -0
  130. package/build/esm/conversion/toMarketplace/convertActionParameters.js +81 -0
  131. package/build/esm/conversion/toMarketplace/convertActionParameters.js.map +1 -0
  132. package/build/esm/conversion/toMarketplace/convertActionSections.js +45 -0
  133. package/build/esm/conversion/toMarketplace/convertActionSections.js.map +1 -0
  134. package/build/esm/conversion/toMarketplace/convertActionValidation.js +160 -0
  135. package/build/esm/conversion/toMarketplace/convertActionValidation.js.map +1 -0
  136. package/build/esm/conversion/toMarketplace/convertActionVisibility.js +41 -0
  137. package/build/esm/conversion/toMarketplace/convertActionVisibility.js.map +1 -0
  138. package/build/esm/conversion/toMarketplace/convertCardinality.js +23 -0
  139. package/build/esm/conversion/toMarketplace/convertCardinality.js.map +1 -0
  140. package/build/esm/conversion/toMarketplace/convertConditionDefinition.js +88 -0
  141. package/build/esm/conversion/toMarketplace/convertConditionDefinition.js.map +1 -0
  142. package/build/esm/conversion/toMarketplace/convertDataConstraintToDataConstraints.js +26 -0
  143. package/build/esm/conversion/toMarketplace/convertDataConstraintToDataConstraints.js.map +1 -0
  144. package/build/esm/conversion/toMarketplace/convertDatasourceDefinition.js +352 -0
  145. package/build/esm/conversion/toMarketplace/convertDatasourceDefinition.js.map +1 -0
  146. package/build/esm/conversion/toMarketplace/convertInterface.js +75 -0
  147. package/build/esm/conversion/toMarketplace/convertInterface.js.map +1 -0
  148. package/build/esm/conversion/toMarketplace/convertInterfacePropertyType.js +62 -0
  149. package/build/esm/conversion/toMarketplace/convertInterfacePropertyType.js.map +1 -0
  150. package/build/esm/conversion/toMarketplace/convertLink.js +247 -0
  151. package/build/esm/conversion/toMarketplace/convertLink.js.map +1 -0
  152. package/build/esm/conversion/toMarketplace/convertMappingValue.js +76 -0
  153. package/build/esm/conversion/toMarketplace/convertMappingValue.js.map +1 -0
  154. package/build/esm/conversion/toMarketplace/convertNullabilityToDataConstraint.js +42 -0
  155. package/build/esm/conversion/toMarketplace/convertNullabilityToDataConstraint.js.map +1 -0
  156. package/build/esm/conversion/toMarketplace/convertObject.js +262 -0
  157. package/build/esm/conversion/toMarketplace/convertObject.js.map +1 -0
  158. package/build/esm/conversion/toMarketplace/convertObjectPropertyType.js +59 -0
  159. package/build/esm/conversion/toMarketplace/convertObjectPropertyType.js.map +1 -0
  160. package/build/esm/conversion/toMarketplace/convertOntologyDefinition.js +29 -0
  161. package/build/esm/conversion/toMarketplace/convertOntologyDefinition.js.map +1 -0
  162. package/build/esm/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js +236 -0
  163. package/build/esm/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js.map +1 -0
  164. package/build/esm/conversion/toMarketplace/convertOntologyToValueTypeIr.js +24 -0
  165. package/build/esm/conversion/toMarketplace/convertOntologyToValueTypeIr.js.map +1 -0
  166. package/build/esm/conversion/toMarketplace/convertSectionConditionalOverride.js +35 -0
  167. package/build/esm/conversion/toMarketplace/convertSectionConditionalOverride.js.map +1 -0
  168. package/build/esm/conversion/toMarketplace/convertSpt.js +65 -0
  169. package/build/esm/conversion/toMarketplace/convertSpt.js.map +1 -0
  170. package/build/esm/conversion/toMarketplace/convertValueType.js +20 -0
  171. package/build/esm/conversion/toMarketplace/convertValueType.js.map +1 -0
  172. package/build/esm/conversion/toMarketplace/convertValueTypeDataConstraints.js +30 -0
  173. package/build/esm/conversion/toMarketplace/convertValueTypeDataConstraints.js.map +1 -0
  174. package/build/esm/conversion/toMarketplace/convertValueTypesToIr.js +34 -0
  175. package/build/esm/conversion/toMarketplace/convertValueTypesToIr.js.map +1 -0
  176. package/build/esm/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.js +83 -0
  177. package/build/esm/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.js.map +1 -0
  178. package/build/esm/conversion/toMarketplace/getFormContentOrdering.js +39 -0
  179. package/build/esm/conversion/toMarketplace/getFormContentOrdering.js.map +1 -0
  180. package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.js +146 -0
  181. package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.js.map +1 -0
  182. package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js +156 -0
  183. package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js.map +1 -0
  184. package/build/esm/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.js +442 -0
  185. package/build/esm/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.js.map +1 -0
  186. package/build/esm/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.js +562 -0
  187. package/build/esm/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.js.map +1 -0
  188. package/build/esm/conversion/toMarketplace/shapeExtractors/IrShapeExtractor.js +513 -0
  189. package/build/esm/conversion/toMarketplace/shapeExtractors/IrShapeExtractor.js.map +1 -0
  190. package/build/esm/conversion/toMarketplace/shapeExtractors/LinkTypeShapeExtractor.js +274 -0
  191. package/build/esm/conversion/toMarketplace/shapeExtractors/LinkTypeShapeExtractor.js.map +1 -0
  192. package/build/esm/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.js +425 -0
  193. package/build/esm/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.js.map +1 -0
  194. package/build/esm/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.js +677 -0
  195. package/build/esm/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.js.map +1 -0
  196. package/build/esm/conversion/toMarketplace/typeVisitors.js +615 -0
  197. package/build/esm/conversion/toMarketplace/typeVisitors.js.map +1 -0
  198. package/build/esm/index.js +2 -0
  199. package/build/esm/index.js.map +1 -1
  200. package/build/esm/util/generateRid.js +476 -0
  201. package/build/esm/util/generateRid.js.map +1 -0
  202. package/build/types/api/defineOntologyV2.d.ts +3 -0
  203. package/build/types/api/defineOntologyV2.d.ts.map +1 -0
  204. package/build/types/cli/main.d.ts +1 -0
  205. package/build/types/cli/main.d.ts.map +1 -0
  206. package/build/types/cli/marketplaceSerialization/BlockGeneratorResult.d.ts +69 -0
  207. package/build/types/cli/marketplaceSerialization/BlockGeneratorResult.d.ts.map +1 -0
  208. package/build/types/cli/marketplaceSerialization/CodeBlockSetSpec.d.ts +60 -0
  209. package/build/types/cli/marketplaceSerialization/CodeBlockSetSpec.d.ts.map +1 -0
  210. package/build/types/cli/marketplaceSerialization/CodeBlockSpec.d.ts +48 -0
  211. package/build/types/cli/marketplaceSerialization/CodeBlockSpec.d.ts.map +1 -0
  212. package/build/types/cli/marketplaceSerialization/StoreManifestEntry.d.ts +13 -0
  213. package/build/types/cli/marketplaceSerialization/StoreManifestEntry.d.ts.map +1 -0
  214. package/build/types/cli/marketplaceSerialization/index.d.ts +11 -0
  215. package/build/types/cli/marketplaceSerialization/index.d.ts.map +1 -0
  216. package/build/types/cli/marketplaceSerialization/specGenerators.d.ts +10 -0
  217. package/build/types/cli/marketplaceSerialization/specGenerators.d.ts.map +1 -0
  218. package/build/types/cli/marketplaceSerialization/supportingTypes.d.ts +31 -0
  219. package/build/types/cli/marketplaceSerialization/supportingTypes.d.ts.map +1 -0
  220. package/build/types/conversion/toConjure/distributeTypeHelper.d.ts +3 -0
  221. package/build/types/conversion/toConjure/distributeTypeHelper.d.ts.map +1 -0
  222. package/build/types/conversion/toMarketplace/convertActionHelpers.d.ts +7 -0
  223. package/build/types/conversion/toMarketplace/convertActionHelpers.d.ts.map +1 -0
  224. package/build/types/conversion/toMarketplace/convertActionParameterConditionalOverride.d.ts +4 -0
  225. package/build/types/conversion/toMarketplace/convertActionParameterConditionalOverride.d.ts.map +1 -0
  226. package/build/types/conversion/toMarketplace/convertActionParameters.d.ts +4 -0
  227. package/build/types/conversion/toMarketplace/convertActionParameters.d.ts.map +1 -0
  228. package/build/types/conversion/toMarketplace/convertActionSections.d.ts +4 -0
  229. package/build/types/conversion/toMarketplace/convertActionSections.d.ts.map +1 -0
  230. package/build/types/conversion/toMarketplace/convertActionValidation.d.ts +4 -0
  231. package/build/types/conversion/toMarketplace/convertActionValidation.d.ts.map +1 -0
  232. package/build/types/conversion/toMarketplace/convertActionVisibility.d.ts +2 -0
  233. package/build/types/conversion/toMarketplace/convertActionVisibility.d.ts.map +1 -0
  234. package/build/types/conversion/toMarketplace/convertCardinality.d.ts +3 -0
  235. package/build/types/conversion/toMarketplace/convertCardinality.d.ts.map +1 -0
  236. package/build/types/conversion/toMarketplace/convertConditionDefinition.d.ts +3 -0
  237. package/build/types/conversion/toMarketplace/convertConditionDefinition.d.ts.map +1 -0
  238. package/build/types/conversion/toMarketplace/convertDataConstraintToDataConstraints.d.ts +2 -0
  239. package/build/types/conversion/toMarketplace/convertDataConstraintToDataConstraints.d.ts.map +1 -0
  240. package/build/types/conversion/toMarketplace/convertDatasourceDefinition.d.ts +4 -0
  241. package/build/types/conversion/toMarketplace/convertDatasourceDefinition.d.ts.map +1 -0
  242. package/build/types/conversion/toMarketplace/convertInterface.d.ts +4 -0
  243. package/build/types/conversion/toMarketplace/convertInterface.d.ts.map +1 -0
  244. package/build/types/conversion/toMarketplace/convertInterfacePropertyType.d.ts +4 -0
  245. package/build/types/conversion/toMarketplace/convertInterfacePropertyType.d.ts.map +1 -0
  246. package/build/types/conversion/toMarketplace/convertLink.d.ts +9 -0
  247. package/build/types/conversion/toMarketplace/convertLink.d.ts.map +1 -0
  248. package/build/types/conversion/toMarketplace/convertMappingValue.d.ts +4 -0
  249. package/build/types/conversion/toMarketplace/convertMappingValue.d.ts.map +1 -0
  250. package/build/types/conversion/toMarketplace/convertNullabilityToDataConstraint.d.ts +6 -0
  251. package/build/types/conversion/toMarketplace/convertNullabilityToDataConstraint.d.ts.map +1 -0
  252. package/build/types/conversion/toMarketplace/convertObject.d.ts +10 -0
  253. package/build/types/conversion/toMarketplace/convertObject.d.ts.map +1 -0
  254. package/build/types/conversion/toMarketplace/convertObjectPropertyType.d.ts +4 -0
  255. package/build/types/conversion/toMarketplace/convertObjectPropertyType.d.ts.map +1 -0
  256. package/build/types/conversion/toMarketplace/convertOntologyDefinition.d.ts +4 -0
  257. package/build/types/conversion/toMarketplace/convertOntologyDefinition.d.ts.map +1 -0
  258. package/build/types/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.d.ts +4 -0
  259. package/build/types/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.d.ts.map +1 -0
  260. package/build/types/conversion/toMarketplace/convertOntologyToValueTypeIr.d.ts +3 -0
  261. package/build/types/conversion/toMarketplace/convertOntologyToValueTypeIr.d.ts.map +1 -0
  262. package/build/types/conversion/toMarketplace/convertSectionConditionalOverride.d.ts +3 -0
  263. package/build/types/conversion/toMarketplace/convertSectionConditionalOverride.d.ts.map +1 -0
  264. package/build/types/conversion/toMarketplace/convertSpt.d.ts +4 -0
  265. package/build/types/conversion/toMarketplace/convertSpt.d.ts.map +1 -0
  266. package/build/types/conversion/toMarketplace/convertValueType.d.ts +4 -0
  267. package/build/types/conversion/toMarketplace/convertValueType.d.ts.map +1 -0
  268. package/build/types/conversion/toMarketplace/convertValueTypeDataConstraints.d.ts +2 -0
  269. package/build/types/conversion/toMarketplace/convertValueTypeDataConstraints.d.ts.map +1 -0
  270. package/build/types/conversion/toMarketplace/convertValueTypesToIr.d.ts +3 -0
  271. package/build/types/conversion/toMarketplace/convertValueTypesToIr.d.ts.map +1 -0
  272. package/build/types/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.d.ts +2 -0
  273. package/build/types/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.d.ts.map +1 -0
  274. package/build/types/conversion/toMarketplace/getFormContentOrdering.d.ts +3 -0
  275. package/build/types/conversion/toMarketplace/getFormContentOrdering.d.ts.map +1 -0
  276. package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.d.ts +4 -0
  277. package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.d.ts.map +1 -0
  278. package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.d.ts +4 -0
  279. package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.d.ts.map +1 -0
  280. package/build/types/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.d.ts +13 -0
  281. package/build/types/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.d.ts.map +1 -0
  282. package/build/types/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.d.ts +1 -0
  283. package/build/types/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.d.ts.map +1 -0
  284. package/build/types/conversion/toMarketplace/shapeExtractors/IrShapeExtractor.d.ts +11 -0
  285. package/build/types/conversion/toMarketplace/shapeExtractors/IrShapeExtractor.d.ts.map +1 -0
  286. package/build/types/conversion/toMarketplace/shapeExtractors/LinkTypeShapeExtractor.d.ts +43 -0
  287. package/build/types/conversion/toMarketplace/shapeExtractors/LinkTypeShapeExtractor.d.ts.map +1 -0
  288. package/build/types/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.d.ts +28 -0
  289. package/build/types/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.d.ts.map +1 -0
  290. package/build/types/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.d.ts +1 -0
  291. package/build/types/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.d.ts.map +1 -0
  292. package/build/types/conversion/toMarketplace/typeVisitors.d.ts +17 -0
  293. package/build/types/conversion/toMarketplace/typeVisitors.d.ts.map +1 -0
  294. package/build/types/index.d.ts +3 -0
  295. package/build/types/index.d.ts.map +1 -1
  296. package/build/types/util/generateRid.d.ts +216 -0
  297. package/build/types/util/generateRid.d.ts.map +1 -0
  298. package/package.json +10 -4
  299. package/build/cjs/chunk-ZPP374PZ.cjs +0 -17
  300. package/build/cjs/chunk-ZPP374PZ.cjs.map +0 -1
  301. package/build/cjs/prompt-VSXFWPU4.cjs +0 -955
  302. package/build/cjs/prompt-VSXFWPU4.cjs.map +0 -1
@@ -0,0 +1,81 @@
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, ridGenerator) {
18
+ return Object.fromEntries((action.parameters ?? []).map(parameter => {
19
+ let convertedType;
20
+ if (typeof parameter.type === "string") {
21
+ // Simple string types like "string", "integer", etc.
22
+ convertedType = {
23
+ type: parameter.type,
24
+ [parameter.type]: {}
25
+ };
26
+ } else {
27
+ // Complex types that need ObjectTypeId conversion
28
+ switch (parameter.type.type) {
29
+ case "objectReference":
30
+ convertedType = {
31
+ type: "objectReference",
32
+ objectReference: {
33
+ ...parameter.type.objectReference,
34
+ objectTypeId: ridGenerator.generateObjectTypeId(parameter.type.objectReference.objectTypeId)
35
+ }
36
+ };
37
+ break;
38
+ case "objectReferenceList":
39
+ convertedType = {
40
+ type: "objectReferenceList",
41
+ objectReferenceList: {
42
+ ...parameter.type.objectReferenceList,
43
+ objectTypeId: ridGenerator.generateObjectTypeId(parameter.type.objectReferenceList.objectTypeId)
44
+ }
45
+ };
46
+ break;
47
+ case "interfaceReference":
48
+ convertedType = {
49
+ type: "interfaceReference",
50
+ interfaceReference: {
51
+ interfaceTypeRid: ridGenerator.generateRidForInterface(parameter.type.interfaceReference.interfaceTypeRid)
52
+ }
53
+ };
54
+ break;
55
+ case "interfaceReferenceList":
56
+ convertedType = {
57
+ type: "interfaceReferenceList",
58
+ interfaceReferenceList: {
59
+ interfaceTypeRid: ridGenerator.generateRidForInterface(parameter.type.interfaceReferenceList.interfaceTypeRid)
60
+ }
61
+ };
62
+ default:
63
+ // Pass through other types unchanged
64
+ convertedType = parameter.type;
65
+ }
66
+ }
67
+ return [parameter.id, {
68
+ id: parameter.id,
69
+ rid: ridGenerator.generateRidForParameter(action.apiName, parameter.id),
70
+ type: convertedType,
71
+ displayMetadata: {
72
+ displayName: parameter.displayName,
73
+ description: parameter.description ?? "",
74
+ typeClasses: [],
75
+ structFields: {},
76
+ structFieldsV2: []
77
+ }
78
+ }];
79
+ }));
80
+ }
81
+ //# sourceMappingURL=convertActionParameters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertActionParameters.js","names":["convertActionParameters","action","ridGenerator","Object","fromEntries","parameters","map","parameter","convertedType","type","objectReference","objectTypeId","generateObjectTypeId","objectReferenceList","interfaceReference","interfaceTypeRid","generateRidForInterface","interfaceReferenceList","id","rid","generateRidForParameter","apiName","displayMetadata","displayName","description","typeClasses","structFields","structFieldsV2"],"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 { Parameter, ParameterId } from \"@osdk/client.unstable\";\nimport type { BaseParameterType } from \"@osdk/client.unstable/api\";\nimport type { ActionType } from \"@osdk/maker\";\nimport type { OntologyRidGenerator } from \"../../util/generateRid.js\";\n\nexport function convertActionParameters(\n action: ActionType,\n ridGenerator: OntologyRidGenerator,\n): Record<ParameterId, Parameter> {\n return Object.fromEntries((action.parameters ?? []).map(parameter => {\n let convertedType: BaseParameterType;\n\n if (typeof parameter.type === \"string\") {\n // Simple string types like \"string\", \"integer\", etc.\n convertedType = { type: parameter.type, [parameter.type]: {} } as any;\n } else {\n // Complex types that need ObjectTypeId conversion\n switch (parameter.type.type) {\n case \"objectReference\":\n convertedType = {\n type: \"objectReference\",\n objectReference: {\n ...parameter.type.objectReference,\n objectTypeId: ridGenerator.generateObjectTypeId(\n parameter.type.objectReference.objectTypeId,\n ),\n },\n };\n break;\n\n case \"objectReferenceList\":\n convertedType = {\n type: \"objectReferenceList\",\n objectReferenceList: {\n ...parameter.type.objectReferenceList,\n objectTypeId: ridGenerator.generateObjectTypeId(\n parameter.type.objectReferenceList.objectTypeId,\n ),\n },\n };\n break;\n\n case \"interfaceReference\":\n convertedType = {\n type: \"interfaceReference\",\n interfaceReference: {\n interfaceTypeRid: ridGenerator.generateRidForInterface(\n parameter.type.interfaceReference.interfaceTypeRid,\n ),\n },\n };\n break;\n case \"interfaceReferenceList\":\n convertedType = {\n type: \"interfaceReferenceList\",\n interfaceReferenceList: {\n interfaceTypeRid: ridGenerator.generateRidForInterface(\n parameter.type.interfaceReferenceList.interfaceTypeRid,\n ),\n },\n };\n\n default:\n // Pass through other types unchanged\n convertedType = parameter.type;\n }\n }\n\n return [parameter.id, {\n id: parameter.id,\n rid: ridGenerator.generateRidForParameter(action.apiName, parameter.id),\n type: convertedType,\n displayMetadata: {\n displayName: parameter.displayName,\n description: parameter.description ?? \"\",\n typeClasses: [],\n structFields: {},\n structFieldsV2: [],\n },\n }];\n }));\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,OAAO,SAASA,uBAAuBA,CACrCC,MAAkB,EAClBC,YAAkC,EACF;EAChC,OAAOC,MAAM,CAACC,WAAW,CAAC,CAACH,MAAM,CAACI,UAAU,IAAI,EAAE,EAAEC,GAAG,CAACC,SAAS,IAAI;IACnE,IAAIC,aAAgC;IAEpC,IAAI,OAAOD,SAAS,CAACE,IAAI,KAAK,QAAQ,EAAE;MACtC;MACAD,aAAa,GAAG;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AuB,CAACnB,MAAM,CAACoB,OAAO,EAAEd,SAAS,CAACW,EAAE,CAAC;MACvET,IAAI,EAAED,aAAa;MACnBc,eAAe,EAAE;QACfC,WAAW,EAAEhB,SAAS,CAACgB,WAAW;QAClCC,WAAW,EAAEjB,SAAS,CAACiB,WAAW,IAAI,EAAE;QACxCC,WAAW,EAAE,EAAE;QACfC,YAAY,EAAE,CAAC,CAAC;QAChBC,cAAc,EAAE;MAClB;IACF,CAAC,CAAC;EACJ,CAAC,CAAC,CAAC;AACL","ignoreList":[]}
@@ -0,0 +1,45 @@
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 "@osdk/maker";
18
+ export function convertActionSections(action, ridGenerator) {
19
+ return Object.fromEntries(Object.entries(action.sections ?? {}).map(([sectionId, section]) => [sectionId, {
20
+ id: sectionId,
21
+ // TODO: Generate proper RID for section
22
+ rid: ridGenerator.generateSectionRid(sectionId),
23
+ content: section.parameters.map(p => ({
24
+ type: "parameterId",
25
+ parameterId: p
26
+ })),
27
+ displayMetadata: {
28
+ collapsedByDefault: section.collapsedByDefault ?? false,
29
+ columnCount: section.columnCount ?? 1,
30
+ description: section.description ?? "",
31
+ displayName: section.displayName ?? uppercaseFirstLetter(sectionId),
32
+ showTitleBar: section.showTitleBar ?? true,
33
+ ...(section.style && {
34
+ style: section.style === "box" ? {
35
+ type: "box",
36
+ box: {}
37
+ } : {
38
+ type: "minimal",
39
+ minimal: {}
40
+ }
41
+ })
42
+ }
43
+ }]));
44
+ }
45
+ //# sourceMappingURL=convertActionSections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertActionSections.js","names":["uppercaseFirstLetter","convertActionSections","action","ridGenerator","Object","fromEntries","entries","sections","map","sectionId","section","id","rid","generateSectionRid","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 { Section, SectionId } from \"@osdk/client.unstable\";\nimport type { ActionType } from \"@osdk/maker\";\nimport { uppercaseFirstLetter } from \"@osdk/maker\";\nimport type { OntologyRidGenerator } from \"../../util/generateRid.js\";\n\nexport function convertActionSections(\n action: ActionType,\n ridGenerator: OntologyRidGenerator,\n): Record<SectionId, Section> {\n return Object.fromEntries(\n Object.entries(action.sections ?? {}).map((\n [sectionId, section],\n ) => [sectionId, {\n id: sectionId,\n // TODO: Generate proper RID for section\n rid: ridGenerator.generateSectionRid(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,aAAa;AAGlD,OAAO,SAASC,qBAAqBA,CACnCC,MAAkB,EAClBC,YAAkC,EACN;EAC5B,OAAOC,MAAM,CAACC,WAAW,CACvBD,MAAM,CAACE,OAAO,CAACJ,MAAM,CAACK,QAAQ,IAAI,CAAC,CAAC,CAAC,CAACC,GAAG,CAAC,CACxC,CAACC,SAAS,EAAEC,OAAO,CAAC,KACjB,CAACD,SAAS,EAAE;IACfE,EAAE,EAAEF,SAAS;IACb;IACAG,GAAG,EAAET,YAAY,CAACU,kBAAkB,CAACJ,SAAS,CAAC;IAC/CK,OAAO,EAAEJ,OAAO,CAACK,UAAU,CAACP,GAAG,CAACQ,CAAC,KAAK;MACpCC,IAAI,EAAE,aAAa;MACnBC,WAAW,EAAEF;IACf,CAAC,CAAC,CAAC;IACHG,eAAe,EAAE;MACfC,kBAAkB,EAAEV,OAAO,CAACU,kBAAkB,IAAI,KAAK;MACvDC,WAAW,EAAEX,OAAO,CAACW,WAAW,IAAI,CAAC;MACrCC,WAAW,EAAEZ,OAAO,CAACY,WAAW,IAAI,EAAE;MACtCC,WAAW,EAAEb,OAAO,CAACa,WAAW,IAAIvB,oBAAoB,CAACS,SAAS,CAAC;MACnEe,YAAY,EAAEd,OAAO,CAACc,YAAY,IAAI,IAAI;MAC1C,IAAGd,OAAO,CAACe,KAAK,IACX;QACDA,KAAK,EAAEf,OAAO,CAACe,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,160 @@
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 { ReadableIdGenerator } from "../../util/generateRid.js";
18
+ import { extractAllowedValues, renderHintFromBaseType } from "./convertActionHelpers.js";
19
+ import { convertActionParameterConditionalOverride } from "./convertActionParameterConditionalOverride.js";
20
+ import { convertActionVisibility } from "./convertActionVisibility.js";
21
+ import { convertSectionConditionalOverride } from "./convertSectionConditionalOverride.js";
22
+
23
+ // Helper function to recursively scan conditions and register groups
24
+ function registerGroupsFromCondition(condition, ridGenerator) {
25
+ if (!condition) return;
26
+ switch (condition.type) {
27
+ case "group":
28
+ // Original format (parameter/section conditional overrides)
29
+ if (condition.name) {
30
+ ridGenerator.getGroupIds().put(ReadableIdGenerator.getForGroup(condition.name), condition.name);
31
+ }
32
+ break;
33
+ case "comparison":
34
+ // Converted format (action-level validations)
35
+ // Check if this is a group comparison by looking at the left side
36
+ if (condition.comparison?.left?.type === "userProperty" && condition.comparison?.left?.userProperty?.propertyValue?.type === "groupIds") {
37
+ // Extract group names from the right side
38
+ const strings = condition.comparison?.right?.staticValue?.stringList?.strings;
39
+ if (Array.isArray(strings)) {
40
+ strings.forEach(groupName => {
41
+ ridGenerator.getGroupIds().put(ReadableIdGenerator.getForGroup(groupName), groupName);
42
+ });
43
+ }
44
+ }
45
+ break;
46
+ case "and":
47
+ case "or":
48
+ // Recursively process nested conditions
49
+ if (condition.conditions) {
50
+ condition.conditions.forEach(c => registerGroupsFromCondition(c, ridGenerator));
51
+ }
52
+ // Handle converted and/or format
53
+ if (condition.and?.conditions) {
54
+ condition.and.conditions.forEach(c => registerGroupsFromCondition(c, ridGenerator));
55
+ }
56
+ if (condition.or?.conditions) {
57
+ condition.or.conditions.forEach(c => registerGroupsFromCondition(c, ridGenerator));
58
+ }
59
+ break;
60
+
61
+ // Other condition types don't have groups
62
+ }
63
+ }
64
+ export function convertActionValidation(action, ridGenerator) {
65
+ const validationRules = action.validation ?? [{
66
+ condition: {
67
+ type: "true",
68
+ true: {}
69
+ },
70
+ displayMetadata: {
71
+ failureMessage: "",
72
+ typeClasses: []
73
+ }
74
+ }];
75
+ const ruleRids = validationRules.map((_, idx) => ridGenerator.generateValidationRuleRid(action.apiName, idx));
76
+
77
+ // Register groups from action-level validation conditions
78
+ validationRules.forEach(rule => {
79
+ registerGroupsFromCondition(rule.condition, ridGenerator);
80
+ });
81
+
82
+ // Register groups from parameter conditional overrides
83
+ (action.parameters ?? []).forEach(p => {
84
+ p.validation.conditionalOverrides?.forEach(override => {
85
+ registerGroupsFromCondition(override.condition, ridGenerator);
86
+ });
87
+ });
88
+
89
+ // Register groups from section conditional overrides
90
+ Object.values(action.sections ?? {}).forEach(section => {
91
+ section.conditionalOverrides?.forEach(override => {
92
+ registerGroupsFromCondition(override.condition, ridGenerator);
93
+ });
94
+ });
95
+ return {
96
+ actionTypeLevelValidation: {
97
+ // TODO: Add proper ordering of validation rule RIDs
98
+ ordering: ruleRids,
99
+ rules: Object.fromEntries(validationRules.map((rule, idx) => [ruleRids[idx], rule]))
100
+ },
101
+ parameterValidations: Object.fromEntries((action.parameters ?? []).map(p => {
102
+ return [p.id, {
103
+ defaultValidation: {
104
+ display: {
105
+ renderHint: p.renderHint ?? renderHintFromBaseType(p, p.validation),
106
+ visibility: convertActionVisibility(p.validation.defaultVisibility),
107
+ ...(p.defaultValue && {
108
+ prefill: p.defaultValue
109
+ })
110
+ },
111
+ validation: {
112
+ allowedValues: extractAllowedValues(p.validation.allowedValues, ridGenerator),
113
+ required: convertParameterRequirementConstraint(p.validation.required)
114
+ }
115
+ },
116
+ conditionalOverrides: p.validation.conditionalOverrides?.map(override => convertActionParameterConditionalOverride(override, p.validation, ridGenerator, action.parameters)) ?? [],
117
+ structFieldValidations: {}
118
+ }];
119
+ })),
120
+ sectionValidations: {
121
+ ...Object.fromEntries(Object.entries(action.sections ?? {}).map(([sectionId, section]) => [section.id, {
122
+ defaultDisplayMetadata: section.defaultVisibility === "hidden" ? {
123
+ visibility: {
124
+ type: "hidden",
125
+ hidden: {}
126
+ }
127
+ } : {
128
+ visibility: {
129
+ type: "visible",
130
+ visible: {}
131
+ }
132
+ },
133
+ conditionalOverrides: section.conditionalOverrides?.map(override => convertSectionConditionalOverride(override, section.defaultVisibility ?? "visible", action.parameters)) ?? []
134
+ }]))
135
+ }
136
+ };
137
+ }
138
+ function convertParameterRequirementConstraint(required) {
139
+ if (typeof required === "boolean") {
140
+ return required ? {
141
+ type: "required",
142
+ required: {}
143
+ } : {
144
+ type: "notRequired",
145
+ notRequired: {}
146
+ };
147
+ }
148
+ const {
149
+ min,
150
+ max
151
+ } = required.listLength;
152
+ return {
153
+ type: "listLengthValidation",
154
+ listLengthValidation: {
155
+ minLength: min,
156
+ maxLength: max
157
+ }
158
+ };
159
+ }
160
+ //# sourceMappingURL=convertActionValidation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertActionValidation.js","names":["ReadableIdGenerator","extractAllowedValues","renderHintFromBaseType","convertActionParameterConditionalOverride","convertActionVisibility","convertSectionConditionalOverride","registerGroupsFromCondition","condition","ridGenerator","type","name","getGroupIds","put","getForGroup","comparison","left","userProperty","propertyValue","strings","right","staticValue","stringList","Array","isArray","forEach","groupName","conditions","c","and","or","convertActionValidation","action","validationRules","validation","true","displayMetadata","failureMessage","typeClasses","ruleRids","map","_","idx","generateValidationRuleRid","apiName","rule","parameters","p","conditionalOverrides","override","Object","values","sections","section","actionTypeLevelValidation","ordering","rules","fromEntries","parameterValidations","id","defaultValidation","display","renderHint","visibility","defaultVisibility","defaultValue","prefill","allowedValues","required","convertParameterRequirementConstraint","structFieldValidations","sectionValidations","entries","sectionId","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 ActionValidation,\n ParameterRequiredConfiguration,\n} from \"@osdk/client.unstable\";\nimport type {\n ActionParameterRequirementConstraint,\n ActionType,\n} from \"@osdk/maker\";\nimport type { OntologyRidGenerator } from \"../../util/generateRid.js\";\nimport { ReadableIdGenerator } from \"../../util/generateRid.js\";\nimport {\n extractAllowedValues,\n renderHintFromBaseType,\n} from \"./convertActionHelpers.js\";\nimport { convertActionParameterConditionalOverride } from \"./convertActionParameterConditionalOverride.js\";\nimport { convertActionVisibility } from \"./convertActionVisibility.js\";\nimport { convertSectionConditionalOverride } from \"./convertSectionConditionalOverride.js\";\n\n// Helper function to recursively scan conditions and register groups\nfunction registerGroupsFromCondition(\n condition: any,\n ridGenerator: OntologyRidGenerator,\n): void {\n if (!condition) return;\n\n switch (condition.type) {\n case \"group\":\n // Original format (parameter/section conditional overrides)\n if (condition.name) {\n ridGenerator.getGroupIds().put(\n ReadableIdGenerator.getForGroup(condition.name),\n condition.name,\n );\n }\n break;\n\n case \"comparison\":\n // Converted format (action-level validations)\n // Check if this is a group comparison by looking at the left side\n if (\n condition.comparison?.left?.type === \"userProperty\"\n && condition.comparison?.left?.userProperty?.propertyValue?.type\n === \"groupIds\"\n ) {\n // Extract group names from the right side\n const strings = condition.comparison?.right?.staticValue?.stringList\n ?.strings;\n if (Array.isArray(strings)) {\n strings.forEach((groupName: string) => {\n ridGenerator.getGroupIds().put(\n ReadableIdGenerator.getForGroup(groupName),\n groupName,\n );\n });\n }\n }\n break;\n\n case \"and\":\n case \"or\":\n // Recursively process nested conditions\n if (condition.conditions) {\n condition.conditions.forEach((c: any) =>\n registerGroupsFromCondition(c, ridGenerator)\n );\n }\n // Handle converted and/or format\n if (condition.and?.conditions) {\n condition.and.conditions.forEach((c: any) =>\n registerGroupsFromCondition(c, ridGenerator)\n );\n }\n if (condition.or?.conditions) {\n condition.or.conditions.forEach((c: any) =>\n registerGroupsFromCondition(c, ridGenerator)\n );\n }\n break;\n\n // Other condition types don't have groups\n }\n}\n\nexport function convertActionValidation(\n action: ActionType,\n ridGenerator: OntologyRidGenerator,\n): ActionValidation {\n const validationRules = action.validation\n ?? [{\n condition: { type: \"true\", true: {} },\n displayMetadata: { failureMessage: \"\", typeClasses: [] },\n }];\n\n const ruleRids = validationRules.map((_, idx) =>\n ridGenerator.generateValidationRuleRid(action.apiName, idx)\n );\n\n // Register groups from action-level validation conditions\n validationRules.forEach(rule => {\n registerGroupsFromCondition(rule.condition, ridGenerator);\n });\n\n // Register groups from parameter conditional overrides\n (action.parameters ?? []).forEach(p => {\n p.validation.conditionalOverrides?.forEach(override => {\n registerGroupsFromCondition(override.condition, ridGenerator);\n });\n });\n\n // Register groups from section conditional overrides\n Object.values(action.sections ?? {}).forEach(section => {\n section.conditionalOverrides?.forEach(override => {\n registerGroupsFromCondition(override.condition, ridGenerator);\n });\n });\n\n return {\n actionTypeLevelValidation: {\n // TODO: Add proper ordering of validation rule RIDs\n ordering: ruleRids,\n rules: Object.fromEntries(\n validationRules.map((rule, idx) => [ruleRids[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: p.renderHint\n ?? renderHintFromBaseType(p, p.validation),\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 ridGenerator,\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 ridGenerator,\n action.parameters,\n ),\n ) ?? [],\n structFieldValidations: {},\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;;AAWA,SAASA,mBAAmB,QAAQ,2BAA2B;AAC/D,SACEC,oBAAoB,EACpBC,sBAAsB,QACjB,2BAA2B;AAClC,SAASC,yCAAyC,QAAQ,gDAAgD;AAC1G,SAASC,uBAAuB,QAAQ,8BAA8B;AACtE,SAASC,iCAAiC,QAAQ,wCAAwC;;AAE1F;AACA,SAASC,2BAA2BA,CAClCC,SAAc,EACdC,YAAkC,EAC5B;EACN,IAAI,CAACD,SAAS,EAAE;EAEhB,QA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ACO,WAAW,CACnBP,MAAM,CAACsB,OAAO,CAACxC,MAAM,CAACoB,QAAQ,IAAI,CAAC,CAAC,CAAC,CAACZ,GAAG,CAAC,CACxC,CAACiC,SAAS,EAAEpB,OAAO,CAAC,KACjB,CACHA,OAAO,CAACM,EAAE,EACV;QACEe,sBAAsB,EAAErB,OAAO,CAACW,iBAAiB,KAAK,QAAQ,GAC1D;UACAD,UAAU,EAAE;YACVrD,IAAI,EAAE,QAAQ;YACdiE,MAAM,EAAE,CAAC;UACX;QACF,CAAC,GACC;UACAZ,UAAU,EAAE;YACVrD,IAAI,EAAE,SAAS;YACfkE,OAAO,EAAE,CAAC;UACZ;QACF,CAAC;QACH5B,oBAAoB,EAAEK,OAAO,CAACL,oBAAoB,EAAER,GAAG,CACpDS,QAAQ,IACP3C,iCAAiC,CAC/B2C,QAAQ,EACRI,OAAO,CAACW,iBAAiB,IAAI,SAAS,EACtChC,MAAM,CAACc,UACT,CACJ,CAAC,IAAI;MACP,CAAC,CACF,CACH;IACF;EACF,CAAC;AACH;AAEA,SAASuB,qCAAqCA,CAC5CD,QAA8C,EACd;EAChC,IAAI,OAAOA,QAAQ,KAAK,SAAS,EAAE;IACjC,OAAOA,QAAQ,GACX;MAAE1D,IAAI,EAAE,UAAU;MAAE0D,QAAQ,EAAE,CAAC;IAAE,CAAC,GAClC;MAAE1D,IAAI,EAAE,aAAa;MAAEmE,WAAW,EAAE,CAAC;IAAE,CAAC;EAC9C;EACA,MAAM;IAAEC,GAAG;IAAEC;EAAI,CAAC,GAAGX,QAAQ,CAACY,UAAU;EACxC,OAAO;IACLtE,IAAI,EAAE,sBAAsB;IAC5BuE,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 \"@osdk/maker\";\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 type { ActionParameter, ConditionDefinition } from \"@osdk/maker\";\nimport invariant from \"tiny-invariant\";\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;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,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":[]}