@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,83 @@
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 { convertDataConstraintToDataConstraints } from "./convertDataConstraintToDataConstraints.js";
18
+ export function dataConstraintToPropertyTypeDataConstraint(dc) {
19
+ switch (dc.type) {
20
+ case "array":
21
+ return {
22
+ ...dc
23
+ };
24
+ case "boolean":
25
+ return {
26
+ ...dc
27
+ };
28
+ case "binary":
29
+ throw new Error("Binary type constraints are not supported");
30
+ case "date":
31
+ return {
32
+ ...dc
33
+ };
34
+ case "decimal":
35
+ return {
36
+ ...dc
37
+ };
38
+ case "double":
39
+ return {
40
+ ...dc
41
+ };
42
+ case "float":
43
+ return {
44
+ ...dc
45
+ };
46
+ case "integer":
47
+ return {
48
+ ...dc
49
+ };
50
+ case "long":
51
+ return {
52
+ ...dc
53
+ };
54
+ case "map":
55
+ throw new Error("Map type constraints are not supported");
56
+ case "nullable":
57
+ throw new Error("Nullable constraints are not supported");
58
+ case "short":
59
+ return {
60
+ ...dc
61
+ };
62
+ case "string":
63
+ return {
64
+ ...dc
65
+ };
66
+ case "struct":
67
+ return {
68
+ type: "struct",
69
+ struct: {
70
+ elementConstraints: Object.fromEntries(Object.entries(dc.struct.elementConstraints).map(([field, constraint]) => [field, convertDataConstraintToDataConstraints(constraint)]))
71
+ }
72
+ };
73
+ case "structV2":
74
+ throw new Error("StructV2 constraints are not supported");
75
+ case "timestamp":
76
+ return {
77
+ ...dc
78
+ };
79
+ default:
80
+ throw new Error(`Unknown DataConstraint type: ${dc.type}`);
81
+ }
82
+ }
83
+ //# sourceMappingURL=dataConstraintToPropertyTypeDataConstraint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataConstraintToPropertyTypeDataConstraint.js","names":["convertDataConstraintToDataConstraints","dataConstraintToPropertyTypeDataConstraint","dc","type","Error","struct","elementConstraints","Object","fromEntries","entries","map","field","constraint"],"sources":["dataConstraintToPropertyTypeDataConstraint.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 DataConstraint,\n PropertyTypeDataConstraints,\n PropertyTypeDataConstraints_array,\n PropertyTypeDataConstraints_boolean,\n PropertyTypeDataConstraints_date,\n PropertyTypeDataConstraints_decimal,\n PropertyTypeDataConstraints_double,\n PropertyTypeDataConstraints_float,\n PropertyTypeDataConstraints_integer,\n PropertyTypeDataConstraints_long,\n PropertyTypeDataConstraints_short,\n PropertyTypeDataConstraints_string,\n PropertyTypeDataConstraints_struct,\n PropertyTypeDataConstraints_timestamp,\n} from \"@osdk/client.unstable\";\nimport { convertDataConstraintToDataConstraints } from \"./convertDataConstraintToDataConstraints.js\";\n\nexport function dataConstraintToPropertyTypeDataConstraint(\n dc: DataConstraint,\n): PropertyTypeDataConstraints {\n switch (dc.type) {\n case \"array\":\n return { ...dc } as PropertyTypeDataConstraints_array;\n\n case \"boolean\":\n return { ...dc } as PropertyTypeDataConstraints_boolean;\n\n case \"binary\":\n throw new Error(\"Binary type constraints are not supported\");\n\n case \"date\":\n return { ...dc } as PropertyTypeDataConstraints_date;\n\n case \"decimal\":\n return { ...dc } as PropertyTypeDataConstraints_decimal;\n\n case \"double\":\n return { ...dc } as PropertyTypeDataConstraints_double;\n\n case \"float\":\n return { ...dc } as PropertyTypeDataConstraints_float;\n\n case \"integer\":\n return { ...dc } as PropertyTypeDataConstraints_integer;\n\n case \"long\":\n return { ...dc } as PropertyTypeDataConstraints_long;\n\n case \"map\":\n throw new Error(\"Map type constraints are not supported\");\n\n case \"nullable\":\n throw new Error(\"Nullable constraints are not supported\");\n\n case \"short\":\n return { ...dc } as PropertyTypeDataConstraints_short;\n\n case \"string\":\n return { ...dc } as PropertyTypeDataConstraints_string;\n\n case \"struct\":\n return {\n type: \"struct\",\n struct: {\n elementConstraints: Object.fromEntries(\n Object.entries(dc.struct.elementConstraints).map((\n [field, constraint],\n ) => [\n field,\n convertDataConstraintToDataConstraints(constraint),\n ]),\n ),\n },\n } as PropertyTypeDataConstraints_struct;\n\n case \"structV2\":\n throw new Error(\"StructV2 constraints are not supported\");\n\n case \"timestamp\":\n return { ...dc } as PropertyTypeDataConstraints_timestamp;\n\n default:\n throw new Error(`Unknown DataConstraint type: ${(dc as any).type}`);\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkBA,SAASA,sCAAsC,QAAQ,6CAA6C;AAEpG,OAAO,SAASC,0CAA0CA,CACxDC,EAAkB,EACW;EAC7B,QAAQA,EAAE,CAACC,IAAI;IACb,KAAK,OAAO;MACV,OAAO;QAAE,GAAGD;MAAG,CAAC;IAElB,KAAK,SAAS;MACZ,OAAO;QAAE,GAAGA;MAAG,CAAC;IAElB,KAAK,QAAQ;MACX,MAAM,IAAIE,KAAK,CAAC,2CAA2C,CAAC;IAE9D,KAAK,MAAM;MACT,OAAO;QAAE,GAAGF;MAAG,CAAC;IAElB,KAAK,SAAS;MACZ,OAAO;QAAE,GAAGA;MAAG,CAAC;IAElB,KAAK,QAAQ;MACX,OAAO;QAAE,GAAGA;MAAG,CAAC;IAElB,KAAK,OAAO;MACV,OAAO;QAAE,GAAGA;MAAG,CAAC;IAElB,KAAK,SAAS;MACZ,OAAO;QAAE,GAAGA;MAAG,CAAC;IAElB,KAAK,MAAM;MACT,OAAO;QAAE,GAAGA;MAAG,CAAC;IAElB,KAAK,KAAK;MACR,MAAM,IAAIE,KAAK,CAAC,wCAAwC,CAAC;IAE3D,KAAK,UAAU;MACb,MAAM,IAAIA,KAAK,CAAC,wCAAwC,CAAC;IAE3D,KAAK,OAAO;MACV,OAAO;QAAE,GAAGF;MAAG,CAAC;IAElB,KAAK,QAAQ;MACX,OAAO;QAAE,GAAGA;MAAG,CAAC;IAElB,KAAK,QAAQ;MACX,OAAO;QACLC,IAAI,EAAE,QAAQ;QACdE,MAAM,EAAE;UACNC,kBAAkB,EAAEC,MAAM,CAACC,WAAW,CACpCD,MAAM,CAACE,OAAO,CAACP,EAAE,CAACG,MAAM,CAACC,kBAAkB,CAAC,CAACI,GAAG,CAAC,CAC/C,CAACC,KAAK,EAAEC,UAAU,CAAC,KAChB,CACHD,KAAK,EACLX,sCAAsC,CAACY,UAAU,CAAC,CACnD,CACH;QACF;MACF,CAAC;IAEH,KAAK,UAAU;MACb,MAAM,IAAIR,KAAK,CAAC,wCAAwC,CAAC;IAE3D,KAAK,WAAW;MACd,OAAO;QAAE,GAAGF;MAAG,CAAC;IAElB;MACE,MAAM,IAAIE,KAAK,CAAC,gCAAiCF,EAAE,CAASC,IAAI,EAAE,CAAC;EACvE;AACF","ignoreList":[]}
@@ -0,0 +1,39 @@
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 getFormContentOrdering(action, parameterOrdering) {
18
+ if (!action.sections) return [];
19
+ const parametersToSection = Object.fromEntries(Object.entries(action.sections).flatMap(([sectionId, section]) => section.parameters.map(param => [param, sectionId])));
20
+ const seenIds = new Set();
21
+ const formContentOrdering = [];
22
+ parameterOrdering.forEach(param => {
23
+ if (param in parametersToSection && !seenIds.has(parametersToSection[param])) {
24
+ formContentOrdering.push({
25
+ type: "sectionId",
26
+ sectionId: parametersToSection[param]
27
+ });
28
+ seenIds.add(parametersToSection[param]);
29
+ } else if (!(param in parametersToSection)) {
30
+ formContentOrdering.push({
31
+ type: "parameterId",
32
+ parameterId: param
33
+ });
34
+ seenIds.add(param);
35
+ }
36
+ });
37
+ return formContentOrdering;
38
+ }
39
+ //# sourceMappingURL=getFormContentOrdering.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFormContentOrdering.js","names":["getFormContentOrdering","action","parameterOrdering","sections","parametersToSection","Object","fromEntries","entries","flatMap","sectionId","section","parameters","map","param","seenIds","Set","formContentOrdering","forEach","has","push","type","add","parameterId"],"sources":["getFormContentOrdering.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 { OntologyIrFormContent } from \"@osdk/client.unstable\";\nimport type { ActionType } from \"@osdk/maker\";\n\nexport function getFormContentOrdering(\n action: ActionType,\n parameterOrdering: string[],\n): OntologyIrFormContent[] {\n if (!action.sections) return [];\n const parametersToSection = Object.fromEntries(\n Object.entries(action.sections).flatMap(([sectionId, section]) =>\n section.parameters.map(param => [param, sectionId])\n ),\n );\n const seenIds = new Set<string>();\n const formContentOrdering: OntologyIrFormContent[] = [];\n parameterOrdering.forEach(param => {\n if (\n param in parametersToSection\n && !(seenIds.has(parametersToSection[param]))\n ) {\n formContentOrdering.push({\n type: \"sectionId\",\n sectionId: parametersToSection[param],\n });\n seenIds.add(parametersToSection[param]);\n } else if (!(param in parametersToSection)) {\n formContentOrdering.push({\n type: \"parameterId\",\n parameterId: param,\n });\n seenIds.add(param);\n }\n });\n return formContentOrdering;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,OAAO,SAASA,sBAAsBA,CACpCC,MAAkB,EAClBC,iBAA2B,EACF;EACzB,IAAI,CAACD,MAAM,CAACE,QAAQ,EAAE,OAAO,EAAE;EAC/B,MAAMC,mBAAmB,GAAGC,MAAM,CAACC,WAAW,CAC5CD,MAAM,CAACE,OAAO,CAACN,MAAM,CAACE,QAAQ,CAAC,CAACK,OAAO,CAAC,CAAC,CAACC,SAAS,EAAEC,OAAO,CAAC,KAC3DA,OAAO,CAACC,UAAU,CAACC,GAAG,CAACC,KAAK,IAAI,CAACA,KAAK,EAAEJ,SAAS,CAAC,CACpD,CACF,CAAC;EACD,MAAMK,OAAO,GAAG,IAAIC,GAAG,CAAS,CAAC;EACjC,MAAMC,mBAA4C,GAAG,EAAE;EACvDd,iBAAiB,CAACe,OAAO,CAACJ,KAAK,IAAI;IACjC,IACEA,KAAK,IAAIT,mBAAmB,IACzB,CAAEU,OAAO,CAACI,GAAG,CAACd,mBAAmB,CAACS,KAAK,CAAC,CAAE,EAC7C;MACAG,mBAAmB,CAACG,IAAI,CAAC;QACvBC,IAAI,EAAE,WAAW;QACjBX,SAAS,EAAEL,mBAAmB,CAACS,KAAK;MACtC,CAAC,CAAC;MACFC,OAAO,CAACO,GAAG,CAACjB,mBAAmB,CAACS,KAAK,CAAC,CAAC;IACzC,CAAC,MAAM,IAAI,EAAEA,KAAK,IAAIT,mBAAmB,CAAC,EAAE;MAC1CY,mBAAmB,CAACG,IAAI,CAAC;QACvBC,IAAI,EAAE,aAAa;QACnBE,WAAW,EAAET;MACf,CAAC,CAAC;MACFC,OAAO,CAACO,GAAG,CAACR,KAAK,CAAC;IACpB;EACF,CAAC,CAAC;EACF,OAAOG,mBAAmB;AAC5B","ignoreList":[]}
@@ -0,0 +1,146 @@
1
+ /*
2
+ * Copyright 2026 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 { distributeTypeHelper } from "../toConjure/distributeTypeHelper.js";
18
+ export function propertyTypeTypeToOntologyIrInterfaceType(type, propertyApiName, ridGenerator) {
19
+ switch (true) {
20
+ case typeof type === "object" && type.type === "marking":
21
+ return {
22
+ "type": "marking",
23
+ marking: {
24
+ markingType: type.markingType
25
+ }
26
+ };
27
+ case typeof type === "object" && type.type === "struct":
28
+ const structFields = new Array();
29
+ for (const key in type.structDefinition) {
30
+ const fieldTypeDefinition = type.structDefinition[key];
31
+ let field;
32
+ if (typeof fieldTypeDefinition === "string") {
33
+ field = {
34
+ structFieldRid: ridGenerator.generateStructFieldRid(propertyApiName, key),
35
+ apiName: key,
36
+ displayMetadata: {
37
+ displayName: key,
38
+ description: undefined
39
+ },
40
+ typeClasses: [],
41
+ aliases: [],
42
+ fieldType: propertyTypeTypeToOntologyIrInterfaceType(fieldTypeDefinition, propertyApiName, ridGenerator),
43
+ requireImplementation: true
44
+ };
45
+ } else {
46
+ // If it is a full form type definition then process it as such
47
+ if (typeof fieldTypeDefinition === "object" && "fieldType" in fieldTypeDefinition) {
48
+ field = {
49
+ ...fieldTypeDefinition,
50
+ apiName: key,
51
+ structFieldRid: ridGenerator.generateStructFieldRid(propertyApiName, key),
52
+ fieldType: propertyTypeTypeToOntologyIrInterfaceType(fieldTypeDefinition.fieldType, propertyApiName, ridGenerator),
53
+ displayMetadata: fieldTypeDefinition.displayMetadata ?? {
54
+ displayName: key,
55
+ description: undefined
56
+ },
57
+ typeClasses: fieldTypeDefinition.typeClasses ?? [],
58
+ aliases: fieldTypeDefinition.aliases ?? [],
59
+ requireImplementation: fieldTypeDefinition.requireImplementation ?? true
60
+ };
61
+ } else {
62
+ field = {
63
+ apiName: key,
64
+ structFieldRid: ridGenerator.generateStructFieldRid(propertyApiName, key),
65
+ displayMetadata: {
66
+ displayName: key,
67
+ description: undefined
68
+ },
69
+ typeClasses: [],
70
+ aliases: [],
71
+ fieldType: propertyTypeTypeToOntologyIrInterfaceType(fieldTypeDefinition, propertyApiName, ridGenerator),
72
+ requireImplementation: true
73
+ };
74
+ }
75
+ }
76
+ structFields.push(field);
77
+ }
78
+ return {
79
+ type: "struct",
80
+ struct: {
81
+ structFields
82
+ }
83
+ };
84
+ case typeof type === "object" && type.type === "string":
85
+ return {
86
+ "type": "string",
87
+ "string": {
88
+ analyzerOverride: undefined,
89
+ enableAsciiFolding: type.enableAsciiFolding,
90
+ isLongText: type.isLongText ?? false,
91
+ supportsEfficientLeadingWildcard: type.supportsEfficientLeadingWildcard ?? false,
92
+ supportsExactMatching: type.supportsExactMatching ?? true,
93
+ supportsFullTextRegex: type.supportsFullTextRegex
94
+ }
95
+ };
96
+ case typeof type === "object" && type.type === "decimal":
97
+ return {
98
+ "type": "decimal",
99
+ "decimal": {
100
+ precision: type.precision,
101
+ scale: type.scale
102
+ }
103
+ };
104
+ case type === "geopoint":
105
+ return {
106
+ type: "geohash",
107
+ geohash: {}
108
+ };
109
+ case type === "decimal":
110
+ return {
111
+ type,
112
+ [type]: {
113
+ precision: undefined,
114
+ scale: undefined
115
+ }
116
+ };
117
+ case type === "string":
118
+ return {
119
+ type,
120
+ [type]: {
121
+ analyzerOverride: undefined,
122
+ enableAsciiFolding: undefined,
123
+ isLongText: false,
124
+ supportsEfficientLeadingWildcard: false,
125
+ supportsExactMatching: true
126
+ }
127
+ };
128
+ case type === "mediaReference":
129
+ return {
130
+ type: type,
131
+ mediaReference: {}
132
+ };
133
+ case type === "geotimeSeries":
134
+ return {
135
+ type: "geotimeSeriesReference",
136
+ geotimeSeriesReference: {}
137
+ };
138
+ default:
139
+ // use helper function to distribute `type` properly
140
+ if (typeof type === "object") {
141
+ throw new Error(`Unhandled exotic type: ${JSON.stringify(type)}`);
142
+ }
143
+ return distributeTypeHelper(type);
144
+ }
145
+ }
146
+ //# sourceMappingURL=propertyTypeTypeToOntologyIrInterfaceType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"propertyTypeTypeToOntologyIrInterfaceType.js","names":["distributeTypeHelper","propertyTypeTypeToOntologyIrInterfaceType","type","propertyApiName","ridGenerator","marking","markingType","structFields","Array","key","structDefinition","fieldTypeDefinition","field","structFieldRid","generateStructFieldRid","apiName","displayMetadata","displayName","description","undefined","typeClasses","aliases","fieldType","requireImplementation","push","struct","analyzerOverride","enableAsciiFolding","isLongText","supportsEfficientLeadingWildcard","supportsExactMatching","supportsFullTextRegex","precision","scale","geohash","mediaReference","geotimeSeriesReference","Error","JSON","stringify"],"sources":["propertyTypeTypeToOntologyIrInterfaceType.ts"],"sourcesContent":["/*\n * Copyright 2026 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 InterfacePropertyTypeType,\n InterfaceStructFieldType,\n} from \"@osdk/client.unstable\";\nimport type { PropertyTypeType } from \"@osdk/maker\";\nimport type { OntologyRidGenerator } from \"../../util/generateRid.js\";\nimport { distributeTypeHelper } from \"../toConjure/distributeTypeHelper.js\";\n\nexport function propertyTypeTypeToOntologyIrInterfaceType(\n type: PropertyTypeType,\n propertyApiName: string,\n ridGenerator: OntologyRidGenerator,\n): InterfacePropertyTypeType {\n switch (true) {\n case (typeof type === \"object\" && type.type === \"marking\"):\n return {\n \"type\": \"marking\",\n marking: { markingType: type.markingType },\n };\n\n case (typeof type === \"object\" && type.type === \"struct\"):\n const structFields: Array<InterfaceStructFieldType> = new Array();\n for (const key in type.structDefinition) {\n const fieldTypeDefinition = type.structDefinition[key];\n let field: InterfaceStructFieldType;\n if (typeof fieldTypeDefinition === \"string\") {\n field = {\n structFieldRid: ridGenerator.generateStructFieldRid(\n propertyApiName,\n key,\n ),\n apiName: key,\n displayMetadata: { displayName: key, description: undefined },\n typeClasses: [],\n aliases: [],\n fieldType: propertyTypeTypeToOntologyIrInterfaceType(\n fieldTypeDefinition,\n propertyApiName,\n ridGenerator,\n ),\n requireImplementation: true,\n };\n } else {\n // If it is a full form type definition then process it as such\n if (\n typeof fieldTypeDefinition === \"object\"\n && \"fieldType\" in fieldTypeDefinition\n ) {\n field = {\n ...fieldTypeDefinition,\n apiName: key,\n structFieldRid: ridGenerator.generateStructFieldRid(\n propertyApiName,\n key,\n ),\n fieldType: propertyTypeTypeToOntologyIrInterfaceType(\n fieldTypeDefinition.fieldType,\n propertyApiName,\n ridGenerator,\n ),\n displayMetadata: fieldTypeDefinition.displayMetadata\n ?? { displayName: key, description: undefined },\n typeClasses: fieldTypeDefinition.typeClasses ?? [],\n aliases: fieldTypeDefinition.aliases ?? [],\n requireImplementation: fieldTypeDefinition.requireImplementation\n ?? true,\n };\n } else {\n field = {\n apiName: key,\n structFieldRid: ridGenerator.generateStructFieldRid(\n propertyApiName,\n key,\n ),\n displayMetadata: { displayName: key, description: undefined },\n typeClasses: [],\n aliases: [],\n fieldType: propertyTypeTypeToOntologyIrInterfaceType(\n fieldTypeDefinition,\n propertyApiName,\n ridGenerator,\n ),\n requireImplementation: true,\n };\n }\n }\n\n structFields.push(field);\n }\n\n return {\n type: \"struct\",\n struct: { structFields },\n };\n\n case (typeof type === \"object\" && type.type === \"string\"):\n return {\n \"type\": \"string\",\n \"string\": {\n analyzerOverride: undefined,\n enableAsciiFolding: type.enableAsciiFolding,\n isLongText: type.isLongText ?? false,\n supportsEfficientLeadingWildcard:\n type.supportsEfficientLeadingWildcard ?? false,\n supportsExactMatching: type.supportsExactMatching ?? true,\n supportsFullTextRegex: type.supportsFullTextRegex,\n },\n };\n\n case (typeof type === \"object\" && type.type === \"decimal\"):\n return {\n \"type\": \"decimal\",\n \"decimal\": {\n precision: type.precision,\n scale: type.scale,\n },\n };\n\n case (type === \"geopoint\"):\n return { type: \"geohash\", geohash: {} };\n\n case (type === \"decimal\"):\n return { type, [type]: { precision: undefined, scale: undefined } };\n\n case (type === \"string\"):\n return {\n type,\n [type]: {\n analyzerOverride: undefined,\n enableAsciiFolding: undefined,\n isLongText: false,\n supportsEfficientLeadingWildcard: false,\n supportsExactMatching: true,\n },\n };\n\n case (type === \"mediaReference\"):\n return {\n type: type,\n mediaReference: {},\n };\n\n case (type === \"geotimeSeries\"):\n return {\n type: \"geotimeSeriesReference\",\n geotimeSeriesReference: {},\n };\n\n default:\n // use helper function to distribute `type` properly\n if (typeof type === \"object\") {\n throw new Error(`Unhandled exotic type: ${JSON.stringify(type)}`);\n }\n return distributeTypeHelper(type);\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,SAASA,oBAAoB,QAAQ,sC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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 { distributeTypeHelper } from "../toConjure/distributeTypeHelper.js";
18
+ export function propertyTypeTypeToOntologyIrType(type, ridGenerator, propertyApiName, includeMainValue) {
19
+ switch (true) {
20
+ case typeof type === "object" && type.type === "marking":
21
+ return {
22
+ "type": "marking",
23
+ marking: {
24
+ markingType: type.markingType
25
+ }
26
+ };
27
+ case typeof type === "object" && type.type === "struct":
28
+ const structFields = new Array();
29
+ for (const key in type.structDefinition) {
30
+ const fieldTypeDefinition = type.structDefinition[key];
31
+ let field;
32
+ if (typeof fieldTypeDefinition === "string") {
33
+ field = {
34
+ structFieldRid: propertyApiName ? ridGenerator.generateStructFieldRid(propertyApiName, key) : ridGenerator.generateRid(`structfield.${key}`),
35
+ apiName: key,
36
+ displayMetadata: {
37
+ displayName: key,
38
+ description: undefined
39
+ },
40
+ typeClasses: [],
41
+ aliases: [],
42
+ fieldType: propertyTypeTypeToOntologyIrType(fieldTypeDefinition, ridGenerator, propertyApiName)
43
+ };
44
+ } else {
45
+ // If it is a full form type definition then process it as such
46
+ if ("fieldType" in fieldTypeDefinition) {
47
+ field = {
48
+ ...fieldTypeDefinition,
49
+ structFieldRid: propertyApiName ? ridGenerator.generateStructFieldRid(propertyApiName, key) : ridGenerator.generateRid(`structfield.${key}`),
50
+ apiName: key,
51
+ fieldType: propertyTypeTypeToOntologyIrType(fieldTypeDefinition.fieldType, ridGenerator, propertyApiName),
52
+ displayMetadata: fieldTypeDefinition.displayMetadata ?? {
53
+ displayName: key,
54
+ description: undefined
55
+ },
56
+ typeClasses: fieldTypeDefinition.typeClasses ?? [],
57
+ aliases: fieldTypeDefinition.aliases ?? []
58
+ };
59
+ } else {
60
+ field = {
61
+ structFieldRid: propertyApiName ? ridGenerator.generateStructFieldRid(propertyApiName, key) : ridGenerator.generateRid(`structfield.${key}`),
62
+ apiName: key,
63
+ displayMetadata: {
64
+ displayName: key,
65
+ description: undefined
66
+ },
67
+ typeClasses: [],
68
+ aliases: [],
69
+ fieldType: propertyTypeTypeToOntologyIrType(fieldTypeDefinition, ridGenerator, propertyApiName)
70
+ };
71
+ }
72
+ }
73
+ structFields.push(field);
74
+ }
75
+
76
+ // Build mainValue from the first struct field (matches Java behavior)
77
+ // Only SPTs get mainValue populated; object property structs have mainValue: null
78
+ const mainValue = includeMainValue ? structFields[0] ? {
79
+ type: structFields[0].fieldType,
80
+ fields: [structFields[0].structFieldRid]
81
+ } : undefined : undefined;
82
+ return {
83
+ type: "struct",
84
+ struct: {
85
+ structFields,
86
+ mainValue
87
+ }
88
+ };
89
+ case typeof type === "object" && type.type === "string":
90
+ return {
91
+ "type": "string",
92
+ "string": {
93
+ analyzerOverride: undefined,
94
+ enableAsciiFolding: type.enableAsciiFolding,
95
+ isLongText: type.isLongText ?? false,
96
+ supportsEfficientLeadingWildcard: type.supportsEfficientLeadingWildcard ?? false,
97
+ supportsExactMatching: type.supportsExactMatching ?? true,
98
+ supportsFullTextRegex: type.supportsFullTextRegex
99
+ }
100
+ };
101
+ case typeof type === "object" && type.type === "decimal":
102
+ return {
103
+ "type": "decimal",
104
+ "decimal": {
105
+ precision: type.precision,
106
+ scale: type.scale
107
+ }
108
+ };
109
+ case type === "geopoint":
110
+ return {
111
+ type: "geohash",
112
+ geohash: {}
113
+ };
114
+ case type === "decimal":
115
+ return {
116
+ type,
117
+ [type]: {
118
+ precision: undefined,
119
+ scale: undefined
120
+ }
121
+ };
122
+ case type === "string":
123
+ return {
124
+ type,
125
+ [type]: {
126
+ analyzerOverride: undefined,
127
+ enableAsciiFolding: undefined,
128
+ isLongText: false,
129
+ supportsEfficientLeadingWildcard: false,
130
+ supportsExactMatching: true
131
+ }
132
+ };
133
+ case type === "mediaReference":
134
+ return {
135
+ type: type,
136
+ mediaReference: {}
137
+ };
138
+ case type === "geotimeSeries":
139
+ return {
140
+ type: "geotimeSeriesReference",
141
+ geotimeSeriesReference: {}
142
+ };
143
+ case type === "attachment":
144
+ return {
145
+ type: "attachment",
146
+ attachment: {}
147
+ };
148
+ default:
149
+ // use helper function to distribute `type` properly
150
+ if (typeof type === "object") {
151
+ throw new Error(`Unhandled exotic type: ${JSON.stringify(type)}`);
152
+ }
153
+ return distributeTypeHelper(type);
154
+ }
155
+ }
156
+ //# sourceMappingURL=propertyTypeTypeToOntologyIrType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"propertyTypeTypeToOntologyIrType.js","names":["distributeTypeHelper","propertyTypeTypeToOntologyIrType","type","ridGenerator","propertyApiName","includeMainValue","marking","markingType","structFields","Array","key","structDefinition","fieldTypeDefinition","field","structFieldRid","generateStructFieldRid","generateRid","apiName","displayMetadata","displayName","description","undefined","typeClasses","aliases","fieldType","push","mainValue","fields","struct","analyzerOverride","enableAsciiFolding","isLongText","supportsEfficientLeadingWildcard","supportsExactMatching","supportsFullTextRegex","precision","scale","geohash","mediaReference","geotimeSeriesReference","attachment","Error","JSON","stringify"],"sources":["propertyTypeTypeToOntologyIrType.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 { StructFieldType, Type } from \"@osdk/client.unstable\";\nimport type { PropertyTypeType } from \"@osdk/maker\";\nimport type { OntologyRidGenerator } from \"../../util/generateRid.js\";\nimport { distributeTypeHelper } from \"../toConjure/distributeTypeHelper.js\";\n\nexport function propertyTypeTypeToOntologyIrType(\n type: PropertyTypeType,\n ridGenerator: OntologyRidGenerator,\n propertyApiName?: string,\n includeMainValue?: boolean,\n): Type {\n switch (true) {\n case (typeof type === \"object\" && type.type === \"marking\"):\n return {\n \"type\": \"marking\",\n marking: { markingType: type.markingType },\n };\n\n case (typeof type === \"object\" && type.type === \"struct\"):\n const structFields: Array<StructFieldType> = new Array();\n for (const key in type.structDefinition) {\n const fieldTypeDefinition = type.structDefinition[key];\n let field: StructFieldType;\n if (typeof fieldTypeDefinition === \"string\") {\n field = {\n structFieldRid: propertyApiName\n ? ridGenerator.generateStructFieldRid(propertyApiName, key)\n : ridGenerator.generateRid(`structfield.${key}`),\n apiName: key,\n displayMetadata: { displayName: key, description: undefined },\n typeClasses: [],\n aliases: [],\n fieldType: propertyTypeTypeToOntologyIrType(\n fieldTypeDefinition,\n ridGenerator,\n propertyApiName,\n ),\n };\n } else {\n // If it is a full form type definition then process it as such\n if (\"fieldType\" in fieldTypeDefinition) {\n field = {\n ...fieldTypeDefinition,\n structFieldRid: propertyApiName\n ? ridGenerator.generateStructFieldRid(propertyApiName, key)\n : ridGenerator.generateRid(`structfield.${key}`),\n apiName: key,\n fieldType: propertyTypeTypeToOntologyIrType(\n fieldTypeDefinition.fieldType,\n ridGenerator,\n propertyApiName,\n ),\n displayMetadata: fieldTypeDefinition.displayMetadata\n ?? { displayName: key, description: undefined },\n typeClasses: fieldTypeDefinition.typeClasses ?? [],\n aliases: fieldTypeDefinition.aliases ?? [],\n };\n } else {\n field = {\n structFieldRid: propertyApiName\n ? ridGenerator.generateStructFieldRid(propertyApiName, key)\n : ridGenerator.generateRid(`structfield.${key}`),\n apiName: key,\n displayMetadata: { displayName: key, description: undefined },\n typeClasses: [],\n aliases: [],\n fieldType: propertyTypeTypeToOntologyIrType(\n fieldTypeDefinition,\n ridGenerator,\n propertyApiName,\n ),\n };\n }\n }\n\n structFields.push(field);\n }\n\n // Build mainValue from the first struct field (matches Java behavior)\n // Only SPTs get mainValue populated; object property structs have mainValue: null\n const mainValue = includeMainValue\n ? (structFields[0]\n ? {\n type: structFields[0].fieldType,\n fields: [structFields[0].structFieldRid],\n }\n : undefined)\n : undefined;\n\n return {\n type: \"struct\",\n struct: { structFields, mainValue },\n };\n\n case (typeof type === \"object\" && type.type === \"string\"):\n return {\n \"type\": \"string\",\n \"string\": {\n analyzerOverride: undefined,\n enableAsciiFolding: type.enableAsciiFolding,\n isLongText: type.isLongText ?? false,\n supportsEfficientLeadingWildcard:\n type.supportsEfficientLeadingWildcard ?? false,\n supportsExactMatching: type.supportsExactMatching ?? true,\n supportsFullTextRegex: type.supportsFullTextRegex,\n },\n };\n\n case (typeof type === \"object\" && type.type === \"decimal\"):\n return {\n \"type\": \"decimal\",\n \"decimal\": {\n precision: type.precision,\n scale: type.scale,\n },\n };\n\n case (type === \"geopoint\"):\n return { type: \"geohash\", geohash: {} };\n\n case (type === \"decimal\"):\n return { type, [type]: { precision: undefined, scale: undefined } };\n\n case (type === \"string\"):\n return {\n type,\n [type]: {\n analyzerOverride: undefined,\n enableAsciiFolding: undefined,\n isLongText: false,\n supportsEfficientLeadingWildcard: false,\n supportsExactMatching: true,\n },\n };\n\n case (type === \"mediaReference\"):\n return {\n type: type,\n mediaReference: {},\n };\n\n case (type === \"geotimeSeries\"):\n return {\n type: \"geotimeSeriesReference\",\n geotimeSeriesReference: {},\n };\n case (type === \"attachment\"):\n return {\n type: \"attachment\",\n attachment: {},\n };\n\n default:\n // use helper function to distribute `type` properly\n if (typeof type === \"object\") {\n throw new Error(`Unhandled exotic type: ${JSON.stringify(type)}`);\n }\n return distributeTypeHelper(type);\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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