@osdk/generator 2.1.0-beta.22 → 2.1.0-beta.24

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 (438) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/build/browser/GenerateContext/EnhanceCommon.js +0 -15
  3. package/build/browser/GenerateContext/EnhanceCommon.js.map +1 -1
  4. package/build/browser/GenerateContext/EnhancedAction.js +1 -1
  5. package/build/browser/GenerateContext/EnhancedAction.js.map +1 -1
  6. package/build/browser/GenerateContext/EnhancedBase.js +2 -7
  7. package/build/browser/GenerateContext/EnhancedBase.js.map +1 -1
  8. package/build/browser/GenerateContext/EnhancedInterfaceType.js +1 -1
  9. package/build/browser/GenerateContext/EnhancedInterfaceType.js.map +1 -1
  10. package/build/browser/GenerateContext/EnhancedObjectType.js +1 -1
  11. package/build/browser/GenerateContext/EnhancedObjectType.js.map +1 -1
  12. package/build/browser/GenerateContext/EnhancedOntologyDefinition.js +1 -8
  13. package/build/browser/GenerateContext/EnhancedOntologyDefinition.js.map +1 -1
  14. package/build/browser/GenerateContext/EnhancedQuery.js +1 -1
  15. package/build/browser/GenerateContext/EnhancedQuery.js.map +1 -1
  16. package/build/browser/GenerateContext/EnhancedSharedPropertyType.js +1 -1
  17. package/build/browser/GenerateContext/EnhancedSharedPropertyType.js.map +1 -1
  18. package/build/browser/GenerateContext/ForeignType.js +1 -1
  19. package/build/browser/GenerateContext/ForeignType.js.map +1 -1
  20. package/build/browser/GenerateContext/GenerateContext.js +0 -15
  21. package/build/browser/GenerateContext/GenerateContext.js.map +1 -1
  22. package/build/browser/GenerateContext/enhanceOntology.js +1 -0
  23. package/build/browser/GenerateContext/enhanceOntology.js.map +1 -1
  24. package/build/browser/MinimalFs.js +0 -15
  25. package/build/browser/MinimalFs.js.map +1 -1
  26. package/build/browser/WireOntologyDefinition.js +0 -15
  27. package/build/browser/WireOntologyDefinition.js.map +1 -1
  28. package/build/browser/generateClientSdkPackage.js +2 -0
  29. package/build/browser/generateClientSdkPackage.js.map +1 -1
  30. package/build/browser/generateClientSdkPackage.test.js +1 -0
  31. package/build/browser/generateClientSdkPackage.test.js.map +1 -1
  32. package/build/browser/index.js +1 -0
  33. package/build/browser/index.js.map +1 -1
  34. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.js +1 -0
  35. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.js.map +1 -1
  36. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.js +1 -0
  37. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.js.map +1 -1
  38. package/build/browser/shared/getObjectImports.js +1 -0
  39. package/build/browser/shared/getObjectImports.js.map +1 -1
  40. package/build/browser/shared/getObjectTypeApiNamesFromQuery.js +1 -0
  41. package/build/browser/shared/getObjectTypeApiNamesFromQuery.js.map +1 -1
  42. package/build/browser/shared/getObjectTypesFromQueryDataType.js +1 -0
  43. package/build/browser/shared/getObjectTypesFromQueryDataType.js.map +1 -1
  44. package/build/browser/shared/propertyJsdoc.js +1 -0
  45. package/build/browser/shared/propertyJsdoc.js.map +1 -1
  46. package/build/browser/shared/sanitizeMetadata.js +9 -0
  47. package/build/browser/shared/sanitizeMetadata.js.map +1 -1
  48. package/build/browser/shared/sanitizeMetadata.test.js +1 -0
  49. package/build/browser/shared/sanitizeMetadata.test.js.map +1 -1
  50. package/build/browser/util/InMemoryFs.js +1 -0
  51. package/build/browser/util/InMemoryFs.js.map +1 -1
  52. package/build/browser/util/commaSeparatedIdentifiers.js +1 -0
  53. package/build/browser/util/commaSeparatedIdentifiers.js.map +1 -1
  54. package/build/browser/util/commaSeparatedTypeIdentifiers.js +1 -0
  55. package/build/browser/util/commaSeparatedTypeIdentifiers.js.map +1 -1
  56. package/build/browser/util/deleteUndefineds.js +1 -0
  57. package/build/browser/util/deleteUndefineds.js.map +1 -1
  58. package/build/browser/util/reservedKeywords.js +1 -0
  59. package/build/browser/util/reservedKeywords.js.map +1 -1
  60. package/build/browser/util/stringUnionFrom.js +1 -0
  61. package/build/browser/util/stringUnionFrom.js.map +1 -1
  62. package/build/browser/util/stringify.js +16 -0
  63. package/build/browser/util/stringify.js.map +1 -1
  64. package/build/browser/util/test/TodoWireOntology.js +1 -0
  65. package/build/browser/util/test/TodoWireOntology.js.map +1 -1
  66. package/build/browser/util/test/compileThis.js +1 -0
  67. package/build/browser/util/test/compileThis.js.map +1 -1
  68. package/build/browser/util/test/createMockMinimalFiles.js +1 -0
  69. package/build/browser/util/test/createMockMinimalFiles.js.map +1 -1
  70. package/build/browser/util/test/formatTs.js +1 -0
  71. package/build/browser/util/test/formatTs.js.map +1 -1
  72. package/build/browser/util/verifyOutDir.js +1 -0
  73. package/build/browser/util/verifyOutDir.js.map +1 -1
  74. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js +2 -0
  75. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js.map +1 -1
  76. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +5 -0
  77. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -1
  78. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.js +3 -0
  79. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.js.map +1 -1
  80. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js +17 -1
  81. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
  82. package/build/browser/v2.0/generateMetadata.js +3 -0
  83. package/build/browser/v2.0/generateMetadata.js.map +1 -1
  84. package/build/browser/v2.0/generatePerActionDataFiles.js +30 -8
  85. package/build/browser/v2.0/generatePerActionDataFiles.js.map +1 -1
  86. package/build/browser/v2.0/generatePerActionDataFiles.test.js +1 -0
  87. package/build/browser/v2.0/generatePerActionDataFiles.test.js.map +1 -1
  88. package/build/browser/v2.0/generatePerInterfaceDataFiles.js +2 -0
  89. package/build/browser/v2.0/generatePerInterfaceDataFiles.js.map +1 -1
  90. package/build/browser/v2.0/generatePerObjectDataFiles.js +1 -0
  91. package/build/browser/v2.0/generatePerObjectDataFiles.js.map +1 -1
  92. package/build/browser/v2.0/generatePerQueryDataFiles.js +1 -0
  93. package/build/browser/v2.0/generatePerQueryDataFiles.js.map +1 -1
  94. package/build/browser/v2.0/generatePerQueryDataFiles.test.js +2 -0
  95. package/build/browser/v2.0/generatePerQueryDataFiles.test.js.map +1 -1
  96. package/build/browser/v2.0/generateRootIndexTsFile.js +2 -0
  97. package/build/browser/v2.0/generateRootIndexTsFile.js.map +1 -1
  98. package/build/browser/v2.0/getDescriptionIfPresent.js +1 -0
  99. package/build/browser/v2.0/getDescriptionIfPresent.js.map +1 -1
  100. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js +2 -0
  101. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -1
  102. package/build/browser/validateWireOntologyAssumptions.js +1 -0
  103. package/build/browser/validateWireOntologyAssumptions.js.map +1 -1
  104. package/build/cjs/index.cjs +1384 -0
  105. package/build/cjs/index.cjs.map +1 -0
  106. package/build/cjs/index.d.cts +31 -0
  107. package/build/esm/GenerateContext/EnhanceCommon.js +0 -15
  108. package/build/esm/GenerateContext/EnhanceCommon.js.map +1 -1
  109. package/build/esm/GenerateContext/EnhancedAction.js +1 -1
  110. package/build/esm/GenerateContext/EnhancedAction.js.map +1 -1
  111. package/build/esm/GenerateContext/EnhancedBase.js +2 -7
  112. package/build/esm/GenerateContext/EnhancedBase.js.map +1 -1
  113. package/build/esm/GenerateContext/EnhancedInterfaceType.js +1 -1
  114. package/build/esm/GenerateContext/EnhancedInterfaceType.js.map +1 -1
  115. package/build/esm/GenerateContext/EnhancedObjectType.js +1 -1
  116. package/build/esm/GenerateContext/EnhancedObjectType.js.map +1 -1
  117. package/build/esm/GenerateContext/EnhancedOntologyDefinition.js +1 -8
  118. package/build/esm/GenerateContext/EnhancedOntologyDefinition.js.map +1 -1
  119. package/build/esm/GenerateContext/EnhancedQuery.js +1 -1
  120. package/build/esm/GenerateContext/EnhancedQuery.js.map +1 -1
  121. package/build/esm/GenerateContext/EnhancedSharedPropertyType.js +1 -1
  122. package/build/esm/GenerateContext/EnhancedSharedPropertyType.js.map +1 -1
  123. package/build/esm/GenerateContext/ForeignType.js +1 -1
  124. package/build/esm/GenerateContext/ForeignType.js.map +1 -1
  125. package/build/esm/GenerateContext/GenerateContext.js +0 -15
  126. package/build/esm/GenerateContext/GenerateContext.js.map +1 -1
  127. package/build/esm/GenerateContext/enhanceOntology.js +1 -0
  128. package/build/esm/GenerateContext/enhanceOntology.js.map +1 -1
  129. package/build/esm/MinimalFs.js +0 -15
  130. package/build/esm/MinimalFs.js.map +1 -1
  131. package/build/esm/WireOntologyDefinition.js +0 -15
  132. package/build/esm/WireOntologyDefinition.js.map +1 -1
  133. package/build/esm/generateClientSdkPackage.js +2 -0
  134. package/build/esm/generateClientSdkPackage.js.map +1 -1
  135. package/build/esm/generateClientSdkPackage.test.js +1 -0
  136. package/build/esm/generateClientSdkPackage.test.js.map +1 -1
  137. package/build/esm/index.js +1 -0
  138. package/build/esm/index.js.map +1 -1
  139. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.js +1 -0
  140. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.js.map +1 -1
  141. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.test.js +1 -0
  142. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.test.js.map +1 -1
  143. package/build/esm/shared/getObjectImports.js +1 -0
  144. package/build/esm/shared/getObjectImports.js.map +1 -1
  145. package/build/esm/shared/getObjectTypeApiNamesFromQuery.js +1 -0
  146. package/build/esm/shared/getObjectTypeApiNamesFromQuery.js.map +1 -1
  147. package/build/esm/shared/getObjectTypesFromQueryDataType.js +1 -0
  148. package/build/esm/shared/getObjectTypesFromQueryDataType.js.map +1 -1
  149. package/build/esm/shared/propertyJsdoc.js +1 -0
  150. package/build/esm/shared/propertyJsdoc.js.map +1 -1
  151. package/build/esm/shared/sanitizeMetadata.js +9 -0
  152. package/build/esm/shared/sanitizeMetadata.js.map +1 -1
  153. package/build/esm/shared/sanitizeMetadata.test.js +1 -0
  154. package/build/esm/shared/sanitizeMetadata.test.js.map +1 -1
  155. package/build/esm/util/InMemoryFs.js +1 -0
  156. package/build/esm/util/InMemoryFs.js.map +1 -1
  157. package/build/esm/util/commaSeparatedIdentifiers.js +1 -0
  158. package/build/esm/util/commaSeparatedIdentifiers.js.map +1 -1
  159. package/build/esm/util/commaSeparatedTypeIdentifiers.js +1 -0
  160. package/build/esm/util/commaSeparatedTypeIdentifiers.js.map +1 -1
  161. package/build/esm/util/deleteUndefineds.js +1 -0
  162. package/build/esm/util/deleteUndefineds.js.map +1 -1
  163. package/build/esm/util/reservedKeywords.js +1 -0
  164. package/build/esm/util/reservedKeywords.js.map +1 -1
  165. package/build/esm/util/stringUnionFrom.js +1 -0
  166. package/build/esm/util/stringUnionFrom.js.map +1 -1
  167. package/build/esm/util/stringify.js +16 -0
  168. package/build/esm/util/stringify.js.map +1 -1
  169. package/build/esm/util/test/TodoWireOntology.js +1 -0
  170. package/build/esm/util/test/TodoWireOntology.js.map +1 -1
  171. package/build/esm/util/test/compileThis.js +1 -0
  172. package/build/esm/util/test/compileThis.js.map +1 -1
  173. package/build/esm/util/test/createMockMinimalFiles.js +1 -0
  174. package/build/esm/util/test/createMockMinimalFiles.js.map +1 -1
  175. package/build/esm/util/test/formatTs.js +1 -0
  176. package/build/esm/util/test/formatTs.js.map +1 -1
  177. package/build/esm/util/verifyOutDir.js +1 -0
  178. package/build/esm/util/verifyOutDir.js.map +1 -1
  179. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js +2 -0
  180. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js.map +1 -1
  181. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +5 -0
  182. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -1
  183. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.js +3 -0
  184. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.js.map +1 -1
  185. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js +17 -1
  186. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
  187. package/build/esm/v2.0/generateMetadata.js +3 -0
  188. package/build/esm/v2.0/generateMetadata.js.map +1 -1
  189. package/build/esm/v2.0/generatePerActionDataFiles.js +30 -8
  190. package/build/esm/v2.0/generatePerActionDataFiles.js.map +1 -1
  191. package/build/esm/v2.0/generatePerActionDataFiles.test.js +1 -0
  192. package/build/esm/v2.0/generatePerActionDataFiles.test.js.map +1 -1
  193. package/build/esm/v2.0/generatePerInterfaceDataFiles.js +2 -0
  194. package/build/esm/v2.0/generatePerInterfaceDataFiles.js.map +1 -1
  195. package/build/esm/v2.0/generatePerObjectDataFiles.js +1 -0
  196. package/build/esm/v2.0/generatePerObjectDataFiles.js.map +1 -1
  197. package/build/esm/v2.0/generatePerQueryDataFiles.js +1 -0
  198. package/build/esm/v2.0/generatePerQueryDataFiles.js.map +1 -1
  199. package/build/esm/v2.0/generatePerQueryDataFiles.test.js +2 -0
  200. package/build/esm/v2.0/generatePerQueryDataFiles.test.js.map +1 -1
  201. package/build/esm/v2.0/generateRootIndexTsFile.js +2 -0
  202. package/build/esm/v2.0/generateRootIndexTsFile.js.map +1 -1
  203. package/build/esm/v2.0/getDescriptionIfPresent.js +1 -0
  204. package/build/esm/v2.0/getDescriptionIfPresent.js.map +1 -1
  205. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js +2 -0
  206. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -1
  207. package/build/esm/validateWireOntologyAssumptions.js +1 -0
  208. package/build/esm/validateWireOntologyAssumptions.js.map +1 -1
  209. package/build/types/GenerateContext/EnhanceCommon.d.ts +6 -0
  210. package/build/types/GenerateContext/EnhancedAction.d.ts +13 -0
  211. package/build/types/GenerateContext/EnhancedBase.d.ts +20 -0
  212. package/build/types/GenerateContext/EnhancedInterfaceType.d.ts +12 -0
  213. package/build/{esm → types}/GenerateContext/EnhancedObjectType.d.ts +5 -6
  214. package/build/types/GenerateContext/EnhancedOntologyDefinition.d.ts +28 -0
  215. package/build/types/GenerateContext/EnhancedQuery.d.ts +13 -0
  216. package/build/{browser → types}/GenerateContext/EnhancedSharedPropertyType.d.ts +2 -3
  217. package/build/types/GenerateContext/ForeignType.d.ts +8 -0
  218. package/build/types/GenerateContext/GenerateContext.d.ts +13 -0
  219. package/build/types/GenerateContext/enhanceOntology.d.ts +9 -0
  220. package/build/types/MinimalFs.d.ts +7 -0
  221. package/build/{browser → types}/WireOntologyDefinition.d.ts +1 -3
  222. package/build/{browser → types}/generateClientSdkPackage.d.ts +23 -26
  223. package/build/types/generateClientSdkPackage.test.d.ts +1 -0
  224. package/build/types/index.d.ts +4 -0
  225. package/build/{browser → types}/shared/apiNamespaces/startsWithApiNamespace.d.ts +0 -1
  226. package/build/types/shared/apiNamespaces/startsWithApiNamespace.test.d.ts +1 -0
  227. package/build/{browser → types}/shared/getObjectImports.d.ts +2 -2
  228. package/build/{browser → types}/shared/getObjectTypeApiNamesFromQuery.d.ts +0 -1
  229. package/build/{browser → types}/shared/getObjectTypesFromQueryDataType.d.ts +0 -1
  230. package/build/{browser → types}/shared/propertyJsdoc.d.ts +2 -3
  231. package/build/types/shared/sanitizeMetadata.d.ts +1 -0
  232. package/build/types/shared/sanitizeMetadata.test.d.ts +1 -0
  233. package/build/{browser → types}/util/InMemoryFs.d.ts +2 -3
  234. package/build/{browser → types}/util/commaSeparatedIdentifiers.d.ts +0 -1
  235. package/build/{browser → types}/util/commaSeparatedTypeIdentifiers.d.ts +0 -1
  236. package/build/{browser → types}/util/deleteUndefineds.d.ts +0 -1
  237. package/build/{browser → types}/util/reservedKeywords.d.ts +0 -1
  238. package/build/{browser → types}/util/stringUnionFrom.d.ts +0 -1
  239. package/build/types/util/stringify.d.ts +20 -0
  240. package/build/{browser → types}/util/test/TodoWireOntology.d.ts +0 -1
  241. package/build/{browser → types}/util/test/compileThis.d.ts +0 -1
  242. package/build/types/util/test/createMockMinimalFiles.d.ts +10 -0
  243. package/build/{browser → types}/util/test/formatTs.d.ts +0 -1
  244. package/build/types/util/verifyOutDir.d.ts +8 -0
  245. package/build/types/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts +1 -0
  246. package/build/types/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts +1 -0
  247. package/build/{esm → types}/v2.0/generateClientSdkVersionTwoPointZero.d.ts +0 -1
  248. package/build/types/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts +1 -0
  249. package/build/{browser → types}/v2.0/generateMetadata.d.ts +0 -1
  250. package/build/types/v2.0/generatePerActionDataFiles.d.ts +2 -0
  251. package/build/types/v2.0/generatePerActionDataFiles.test.d.ts +1 -0
  252. package/build/types/v2.0/generatePerInterfaceDataFiles.d.ts +1 -0
  253. package/build/{esm → types}/v2.0/generatePerObjectDataFiles.d.ts +0 -1
  254. package/build/{browser → types}/v2.0/generatePerQueryDataFiles.d.ts +2 -5
  255. package/build/types/v2.0/generatePerQueryDataFiles.test.d.ts +1 -0
  256. package/build/{esm → types}/v2.0/generateRootIndexTsFile.d.ts +0 -1
  257. package/build/{browser → types}/v2.0/getDescriptionIfPresent.d.ts +0 -1
  258. package/build/{browser → types}/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts +4 -6
  259. package/build/{browser → types}/validateWireOntologyAssumptions.d.ts +0 -1
  260. package/package.json +24 -11
  261. package/build/browser/GenerateContext/EnhanceCommon.d.ts +0 -7
  262. package/build/browser/GenerateContext/EnhanceCommon.d.ts.map +0 -1
  263. package/build/browser/GenerateContext/EnhancedAction.d.ts +0 -14
  264. package/build/browser/GenerateContext/EnhancedAction.d.ts.map +0 -1
  265. package/build/browser/GenerateContext/EnhancedBase.d.ts +0 -21
  266. package/build/browser/GenerateContext/EnhancedBase.d.ts.map +0 -1
  267. package/build/browser/GenerateContext/EnhancedInterfaceType.d.ts +0 -13
  268. package/build/browser/GenerateContext/EnhancedInterfaceType.d.ts.map +0 -1
  269. package/build/browser/GenerateContext/EnhancedObjectType.d.ts +0 -12
  270. package/build/browser/GenerateContext/EnhancedObjectType.d.ts.map +0 -1
  271. package/build/browser/GenerateContext/EnhancedOntologyDefinition.d.ts +0 -29
  272. package/build/browser/GenerateContext/EnhancedOntologyDefinition.d.ts.map +0 -1
  273. package/build/browser/GenerateContext/EnhancedQuery.d.ts +0 -14
  274. package/build/browser/GenerateContext/EnhancedQuery.d.ts.map +0 -1
  275. package/build/browser/GenerateContext/EnhancedSharedPropertyType.d.ts.map +0 -1
  276. package/build/browser/GenerateContext/ForeignType.d.ts +0 -9
  277. package/build/browser/GenerateContext/ForeignType.d.ts.map +0 -1
  278. package/build/browser/GenerateContext/GenerateContext.d.ts +0 -14
  279. package/build/browser/GenerateContext/GenerateContext.d.ts.map +0 -1
  280. package/build/browser/GenerateContext/enhanceOntology.d.ts +0 -10
  281. package/build/browser/GenerateContext/enhanceOntology.d.ts.map +0 -1
  282. package/build/browser/MinimalFs.d.ts +0 -10
  283. package/build/browser/MinimalFs.d.ts.map +0 -1
  284. package/build/browser/WireOntologyDefinition.d.ts.map +0 -1
  285. package/build/browser/generateClientSdkPackage.d.ts.map +0 -1
  286. package/build/browser/generateClientSdkPackage.test.d.ts +0 -2
  287. package/build/browser/generateClientSdkPackage.test.d.ts.map +0 -1
  288. package/build/browser/index.d.ts +0 -5
  289. package/build/browser/index.d.ts.map +0 -1
  290. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.d.ts.map +0 -1
  291. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.d.ts +0 -2
  292. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.d.ts.map +0 -1
  293. package/build/browser/shared/getObjectImports.d.ts.map +0 -1
  294. package/build/browser/shared/getObjectTypeApiNamesFromQuery.d.ts.map +0 -1
  295. package/build/browser/shared/getObjectTypesFromQueryDataType.d.ts.map +0 -1
  296. package/build/browser/shared/propertyJsdoc.d.ts.map +0 -1
  297. package/build/browser/shared/sanitizeMetadata.d.ts +0 -2
  298. package/build/browser/shared/sanitizeMetadata.d.ts.map +0 -1
  299. package/build/browser/shared/sanitizeMetadata.test.d.ts +0 -2
  300. package/build/browser/shared/sanitizeMetadata.test.d.ts.map +0 -1
  301. package/build/browser/util/InMemoryFs.d.ts.map +0 -1
  302. package/build/browser/util/commaSeparatedIdentifiers.d.ts.map +0 -1
  303. package/build/browser/util/commaSeparatedTypeIdentifiers.d.ts.map +0 -1
  304. package/build/browser/util/deleteUndefineds.d.ts.map +0 -1
  305. package/build/browser/util/reservedKeywords.d.ts.map +0 -1
  306. package/build/browser/util/stringUnionFrom.d.ts.map +0 -1
  307. package/build/browser/util/stringify.d.ts +0 -20
  308. package/build/browser/util/stringify.d.ts.map +0 -1
  309. package/build/browser/util/test/TodoWireOntology.d.ts.map +0 -1
  310. package/build/browser/util/test/compileThis.d.ts.map +0 -1
  311. package/build/browser/util/test/createMockMinimalFiles.d.ts +0 -13
  312. package/build/browser/util/test/createMockMinimalFiles.d.ts.map +0 -1
  313. package/build/browser/util/test/formatTs.d.ts.map +0 -1
  314. package/build/browser/util/verifyOutDir.d.ts +0 -9
  315. package/build/browser/util/verifyOutDir.d.ts.map +0 -1
  316. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts +0 -2
  317. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts.map +0 -1
  318. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts +0 -2
  319. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts.map +0 -1
  320. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.d.ts +0 -4
  321. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.d.ts.map +0 -1
  322. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts +0 -2
  323. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts.map +0 -1
  324. package/build/browser/v2.0/generateMetadata.d.ts.map +0 -1
  325. package/build/browser/v2.0/generatePerActionDataFiles.d.ts +0 -3
  326. package/build/browser/v2.0/generatePerActionDataFiles.d.ts.map +0 -1
  327. package/build/browser/v2.0/generatePerActionDataFiles.test.d.ts +0 -2
  328. package/build/browser/v2.0/generatePerActionDataFiles.test.d.ts.map +0 -1
  329. package/build/browser/v2.0/generatePerInterfaceDataFiles.d.ts +0 -2
  330. package/build/browser/v2.0/generatePerInterfaceDataFiles.d.ts.map +0 -1
  331. package/build/browser/v2.0/generatePerObjectDataFiles.d.ts +0 -3
  332. package/build/browser/v2.0/generatePerObjectDataFiles.d.ts.map +0 -1
  333. package/build/browser/v2.0/generatePerQueryDataFiles.d.ts.map +0 -1
  334. package/build/browser/v2.0/generatePerQueryDataFiles.test.d.ts +0 -2
  335. package/build/browser/v2.0/generatePerQueryDataFiles.test.d.ts.map +0 -1
  336. package/build/browser/v2.0/generateRootIndexTsFile.d.ts +0 -3
  337. package/build/browser/v2.0/generateRootIndexTsFile.d.ts.map +0 -1
  338. package/build/browser/v2.0/getDescriptionIfPresent.d.ts.map +0 -1
  339. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +0 -1
  340. package/build/browser/validateWireOntologyAssumptions.d.ts.map +0 -1
  341. package/build/esm/GenerateContext/EnhanceCommon.d.ts +0 -7
  342. package/build/esm/GenerateContext/EnhanceCommon.d.ts.map +0 -1
  343. package/build/esm/GenerateContext/EnhancedAction.d.ts +0 -14
  344. package/build/esm/GenerateContext/EnhancedAction.d.ts.map +0 -1
  345. package/build/esm/GenerateContext/EnhancedBase.d.ts +0 -21
  346. package/build/esm/GenerateContext/EnhancedBase.d.ts.map +0 -1
  347. package/build/esm/GenerateContext/EnhancedInterfaceType.d.ts +0 -13
  348. package/build/esm/GenerateContext/EnhancedInterfaceType.d.ts.map +0 -1
  349. package/build/esm/GenerateContext/EnhancedObjectType.d.ts.map +0 -1
  350. package/build/esm/GenerateContext/EnhancedOntologyDefinition.d.ts +0 -29
  351. package/build/esm/GenerateContext/EnhancedOntologyDefinition.d.ts.map +0 -1
  352. package/build/esm/GenerateContext/EnhancedQuery.d.ts +0 -14
  353. package/build/esm/GenerateContext/EnhancedQuery.d.ts.map +0 -1
  354. package/build/esm/GenerateContext/EnhancedSharedPropertyType.d.ts +0 -8
  355. package/build/esm/GenerateContext/EnhancedSharedPropertyType.d.ts.map +0 -1
  356. package/build/esm/GenerateContext/ForeignType.d.ts +0 -9
  357. package/build/esm/GenerateContext/ForeignType.d.ts.map +0 -1
  358. package/build/esm/GenerateContext/GenerateContext.d.ts +0 -14
  359. package/build/esm/GenerateContext/GenerateContext.d.ts.map +0 -1
  360. package/build/esm/GenerateContext/enhanceOntology.d.ts +0 -10
  361. package/build/esm/GenerateContext/enhanceOntology.d.ts.map +0 -1
  362. package/build/esm/MinimalFs.d.ts +0 -10
  363. package/build/esm/MinimalFs.d.ts.map +0 -1
  364. package/build/esm/WireOntologyDefinition.d.ts +0 -4
  365. package/build/esm/WireOntologyDefinition.d.ts.map +0 -1
  366. package/build/esm/generateClientSdkPackage.d.ts +0 -34
  367. package/build/esm/generateClientSdkPackage.d.ts.map +0 -1
  368. package/build/esm/generateClientSdkPackage.test.d.ts +0 -2
  369. package/build/esm/generateClientSdkPackage.test.d.ts.map +0 -1
  370. package/build/esm/index.d.ts +0 -5
  371. package/build/esm/index.d.ts.map +0 -1
  372. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.d.ts +0 -2
  373. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.d.ts.map +0 -1
  374. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.test.d.ts +0 -2
  375. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.test.d.ts.map +0 -1
  376. package/build/esm/shared/getObjectImports.d.ts +0 -4
  377. package/build/esm/shared/getObjectImports.d.ts.map +0 -1
  378. package/build/esm/shared/getObjectTypeApiNamesFromQuery.d.ts +0 -4
  379. package/build/esm/shared/getObjectTypeApiNamesFromQuery.d.ts.map +0 -1
  380. package/build/esm/shared/getObjectTypesFromQueryDataType.d.ts +0 -3
  381. package/build/esm/shared/getObjectTypesFromQueryDataType.d.ts.map +0 -1
  382. package/build/esm/shared/propertyJsdoc.d.ts +0 -6
  383. package/build/esm/shared/propertyJsdoc.d.ts.map +0 -1
  384. package/build/esm/shared/sanitizeMetadata.d.ts +0 -2
  385. package/build/esm/shared/sanitizeMetadata.d.ts.map +0 -1
  386. package/build/esm/shared/sanitizeMetadata.test.d.ts +0 -2
  387. package/build/esm/shared/sanitizeMetadata.test.d.ts.map +0 -1
  388. package/build/esm/util/InMemoryFs.d.ts +0 -7
  389. package/build/esm/util/InMemoryFs.d.ts.map +0 -1
  390. package/build/esm/util/commaSeparatedIdentifiers.d.ts +0 -2
  391. package/build/esm/util/commaSeparatedIdentifiers.d.ts.map +0 -1
  392. package/build/esm/util/commaSeparatedTypeIdentifiers.d.ts +0 -2
  393. package/build/esm/util/commaSeparatedTypeIdentifiers.d.ts.map +0 -1
  394. package/build/esm/util/deleteUndefineds.d.ts +0 -2
  395. package/build/esm/util/deleteUndefineds.d.ts.map +0 -1
  396. package/build/esm/util/reservedKeywords.d.ts +0 -2
  397. package/build/esm/util/reservedKeywords.d.ts.map +0 -1
  398. package/build/esm/util/stringUnionFrom.d.ts +0 -2
  399. package/build/esm/util/stringUnionFrom.d.ts.map +0 -1
  400. package/build/esm/util/stringify.d.ts +0 -20
  401. package/build/esm/util/stringify.d.ts.map +0 -1
  402. package/build/esm/util/test/TodoWireOntology.d.ts +0 -3
  403. package/build/esm/util/test/TodoWireOntology.d.ts.map +0 -1
  404. package/build/esm/util/test/compileThis.d.ts +0 -3
  405. package/build/esm/util/test/compileThis.d.ts.map +0 -1
  406. package/build/esm/util/test/createMockMinimalFiles.d.ts +0 -13
  407. package/build/esm/util/test/createMockMinimalFiles.d.ts.map +0 -1
  408. package/build/esm/util/test/formatTs.d.ts +0 -2
  409. package/build/esm/util/test/formatTs.d.ts.map +0 -1
  410. package/build/esm/util/verifyOutDir.d.ts +0 -9
  411. package/build/esm/util/verifyOutDir.d.ts.map +0 -1
  412. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts +0 -2
  413. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts.map +0 -1
  414. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts +0 -2
  415. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts.map +0 -1
  416. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.d.ts.map +0 -1
  417. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts +0 -2
  418. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts.map +0 -1
  419. package/build/esm/v2.0/generateMetadata.d.ts +0 -3
  420. package/build/esm/v2.0/generateMetadata.d.ts.map +0 -1
  421. package/build/esm/v2.0/generatePerActionDataFiles.d.ts +0 -3
  422. package/build/esm/v2.0/generatePerActionDataFiles.d.ts.map +0 -1
  423. package/build/esm/v2.0/generatePerActionDataFiles.test.d.ts +0 -2
  424. package/build/esm/v2.0/generatePerActionDataFiles.test.d.ts.map +0 -1
  425. package/build/esm/v2.0/generatePerInterfaceDataFiles.d.ts +0 -2
  426. package/build/esm/v2.0/generatePerInterfaceDataFiles.d.ts.map +0 -1
  427. package/build/esm/v2.0/generatePerObjectDataFiles.d.ts.map +0 -1
  428. package/build/esm/v2.0/generatePerQueryDataFiles.d.ts +0 -9
  429. package/build/esm/v2.0/generatePerQueryDataFiles.d.ts.map +0 -1
  430. package/build/esm/v2.0/generatePerQueryDataFiles.test.d.ts +0 -2
  431. package/build/esm/v2.0/generatePerQueryDataFiles.test.d.ts.map +0 -1
  432. package/build/esm/v2.0/generateRootIndexTsFile.d.ts.map +0 -1
  433. package/build/esm/v2.0/getDescriptionIfPresent.d.ts +0 -2
  434. package/build/esm/v2.0/getDescriptionIfPresent.d.ts.map +0 -1
  435. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts +0 -12
  436. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +0 -1
  437. package/build/esm/validateWireOntologyAssumptions.d.ts +0 -3
  438. package/build/esm/validateWireOntologyAssumptions.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # @osdk/generator
2
2
 
3
+ ## 2.1.0-beta.24
4
+
5
+ ### Minor Changes
6
+
7
+ - 03f95eb: Add support for interface params in actions.
8
+ - c691c8b: Package now has experimental support for commonjs
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies [03f95eb]
13
+ - Updated dependencies [c691c8b]
14
+ - Updated dependencies [3c9ac22]
15
+ - @osdk/generator-converters@2.1.0-beta.24
16
+ - @osdk/api@2.1.0-beta.24
17
+
18
+ ## 2.1.0-beta.23
19
+
20
+ ### Minor Changes
21
+
22
+ - d794c19: Adding support for struct action params.
23
+ - f0b519d: Upgrade to vitest 3 and vite 6
24
+ - 696c59c: Exposes $osdkMetadata from the root of generated packages for clients that want access to $osdkMetadata.extraUserAgent
25
+ - d665147: Update platform sdk deps
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies [d794c19]
30
+ - Updated dependencies [f0b519d]
31
+ - Updated dependencies [62c1d63]
32
+ - Updated dependencies [d665147]
33
+ - @osdk/generator-converters@2.1.0-beta.23
34
+ - @osdk/api@2.1.0-beta.23
35
+
3
36
  ## 2.1.0-beta.22
4
37
 
5
38
  ### Minor Changes
@@ -1,17 +1,2 @@
1
- /*
2
- * Copyright 2024 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
1
  export {};
17
2
  //# sourceMappingURL=EnhanceCommon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EnhanceCommon.js","names":[],"sources":["EnhanceCommon.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"file":"EnhanceCommon.js","names":[],"sources":["EnhanceCommon.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { EnhancedOntologyDefinition } from \"./EnhancedOntologyDefinition.js\";\n\nexport interface EnhanceCommon {\n importExt: string;\n /** DO NOT USE THIS IN THE CONSTRUCTOR(S) */\n enhancedOntology: EnhancedOntologyDefinition;\n}\n"],"mappings":"","ignoreList":[]}
@@ -13,9 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { EnhancedBase } from "./EnhancedBase.js";
17
18
  export class EnhancedAction extends EnhancedBase {
18
- raw;
19
19
  constructor(common, raw) {
20
20
  super(common, raw, raw.apiName, "./ontology/actions");
21
21
  this.raw = raw;
@@ -1 +1 @@
1
- {"version":3,"file":"EnhancedAction.js","names":["EnhancedBase","EnhancedAction","raw","constructor","common","apiName","description","parameters","operations","paramsIdentifier","shortApiName","definitionIdentifier","definitionParamsIdentifier"],"sources":["EnhancedAction.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedAction extends EnhancedBase {\n raw;\n constructor(common, raw) {\n super(common, raw, raw.apiName, \"./ontology/actions\");\n this.raw = raw;\n }\n get description() {\n return this.raw.description;\n }\n get parameters() {\n return this.raw.parameters;\n }\n get operations() {\n return this.raw.operations;\n }\n get paramsIdentifier() {\n return `${this.shortApiName}.Params`;\n }\n get definitionIdentifier() {\n return `${this.shortApiName}.Definition`;\n }\n get definitionParamsIdentifier() {\n return `${this.shortApiName}.ParamsDefinition`;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,mBAAmB;AAChD,OAAO,MAAMC,cAAc,SAASD,YAAY,CAAC;EAC7CE,GAAG;EACHC,WAAWA,CAACC,MAAM,EAAEF,GAAG,EAAE;IACrB,KAAK,CAACE,MAAM,EAAEF,GAAG,EAAEA,GAAG,CAACG,OAAO,EAAE,oBAAoB,CAAC;IACrD,IAAI,CAACH,GAAG,GAAGA,GAAG;EAClB;EACA,IAAII,WAAWA,CAAA,EAAG;IACd,OAAO,IAAI,CAACJ,GAAG,CAACI,WAAW;EAC/B;EACA,IAAIC,UAAUA,CAAA,EAAG;IACb,OAAO,IAAI,CAACL,GAAG,CAACK,UAAU;EAC9B;EACA,IAAIC,UAAUA,CAAA,EAAG;IACb,OAAO,IAAI,CAACN,GAAG,CAACM,UAAU;EAC9B;EACA,IAAIC,gBAAgBA,CAAA,EAAG;IACnB,OAAO,GAAG,IAAI,CAACC,YAAY,SAAS;EACxC;EACA,IAAIC,oBAAoBA,CAAA,EAAG;IACvB,OAAO,GAAG,IAAI,CAACD,YAAY,aAAa;EAC5C;EACA,IAAIE,0BAA0BA,CAAA,EAAG;IAC7B,OAAO,GAAG,IAAI,CAACF,YAAY,mBAAmB;EAClD;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"EnhancedAction.js","names":["EnhancedBase","EnhancedAction","constructor","common","raw","apiName","description","parameters","operations","paramsIdentifier","shortApiName","definitionIdentifier","definitionParamsIdentifier"],"sources":["EnhancedAction.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { ActionTypeV2, LogicRule } from \"@osdk/internal.foundry.core\";\nimport type { EnhanceCommon } from \"./EnhanceCommon.js\";\nimport { EnhancedBase } from \"./EnhancedBase.js\";\n\nexport class EnhancedAction extends EnhancedBase<ActionTypeV2> {\n constructor(common: EnhanceCommon, public raw: ActionTypeV2) {\n super(common, raw, raw.apiName, \"./ontology/actions\");\n }\n\n get description(): string | undefined {\n return this.raw.description;\n }\n\n get parameters(): ActionTypeV2[\"parameters\"] {\n return this.raw.parameters;\n }\n\n get operations(): LogicRule[] {\n return this.raw.operations;\n }\n\n get paramsIdentifier() {\n return `${this.shortApiName}.Params`;\n }\n\n get definitionIdentifier() {\n return `${this.shortApiName}.Definition`;\n }\n\n get definitionParamsIdentifier() {\n return `${this.shortApiName}.ParamsDefinition`;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,YAAY,QAAQ,mBAAmB;AAEhD,OAAO,MAAMC,cAAc,SAASD,YAAY,CAAe;EAC7DE,WAAWA,CAACC,MAAqB,EAASC,GAAiB,EAAE;IAC3D,KAAK,CAACD,MAAM,EAAEC,GAAG,EAAEA,GAAG,CAACC,OAAO,EAAE,oBAAoB,CAAC;IAAC,KADdD,GAAiB,GAAjBA,GAAiB;EAE3D;EAEA,IAAIE,WAAWA,CAAA,EAAuB;IACpC,OAAO,IAAI,CAACF,GAAG,CAACE,WAAW;EAC7B;EAEA,IAAIC,UAAUA,CAAA,EAA+B;IAC3C,OAAO,IAAI,CAACH,GAAG,CAACG,UAAU;EAC5B;EAEA,IAAIC,UAAUA,CAAA,EAAgB;IAC5B,OAAO,IAAI,CAACJ,GAAG,CAACI,UAAU;EAC5B;EAEA,IAAIC,gBAAgBA,CAAA,EAAG;IACrB,OAAO,GAAG,IAAI,CAACC,YAAY,SAAS;EACtC;EAEA,IAAIC,oBAAoBA,CAAA,EAAG;IACzB,OAAO,GAAG,IAAI,CAACD,YAAY,aAAa;EAC1C;EAEA,IAAIE,0BAA0BA,CAAA,EAAG;IAC/B,OAAO,GAAG,IAAI,CAACF,YAAY,mBAAmB;EAChD;AACF","ignoreList":[]}
@@ -13,18 +13,14 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import * as path from "node:path";
17
18
  export class AbstractImportable {
18
- _common;
19
- shortApiName;
20
- fullApiName;
21
- apiNamespace;
22
19
  /**
23
20
  * Either a path relative to the ourDir (e.g. "./ontology/objects/foo.js") or a normal
24
21
  * module import (e.g. "@something/foo")/
25
22
  */
26
- importPath;
27
- uniqueImportName;
23
+
28
24
  constructor(common, fullApiName, basePath, isLocal = true) {
29
25
  this._common = common;
30
26
  this.fullApiName = fullApiName;
@@ -49,7 +45,6 @@ export class AbstractImportable {
49
45
  };
50
46
  }
51
47
  export class EnhancedBase extends AbstractImportable {
52
- raw;
53
48
  constructor(common, raw, fullApiName, basePath) {
54
49
  super(common, fullApiName, basePath);
55
50
  this.raw = raw;
@@ -1 +1 @@
1
- {"version":3,"file":"EnhancedBase.js","names":["path","AbstractImportable","_common","shortApiName","fullApiName","apiNamespace","importPath","uniqueImportName","constructor","common","basePath","isLocal","extractNamespace","importExt","getImportPathRelTo","filePath","startsWith","result","relative","dirname","split","sep","join","EnhancedBase","raw","fqApiName","last","lastIndexOf","undefined","slice"],"sources":["EnhancedBase.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport * as path from \"node:path\";\nexport class AbstractImportable {\n _common;\n shortApiName;\n fullApiName;\n apiNamespace;\n /**\n * Either a path relative to the ourDir (e.g. \"./ontology/objects/foo.js\") or a normal\n * module import (e.g. \"@something/foo\")/\n */\n importPath;\n uniqueImportName;\n constructor(common, fullApiName, basePath, isLocal = true) {\n this._common = common;\n this.fullApiName = fullApiName;\n [this.apiNamespace, this.shortApiName] = extractNamespace(this.fullApiName);\n const { importExt } = common;\n this.importPath = isLocal\n ? `${basePath}/${this.shortApiName}${importExt}`\n : basePath;\n this.uniqueImportName = this.shortApiName;\n }\n getImportPathRelTo = (filePath) => {\n if (this.importPath.startsWith(\".\")) {\n const result = path.relative(path.dirname(filePath), this.importPath)\n .split(path.sep).join(\"/\");\n if (result.startsWith(\".\")) {\n return result;\n }\n else {\n return `./${result}`;\n }\n }\n else {\n return this.importPath;\n }\n };\n}\nexport class EnhancedBase extends AbstractImportable {\n raw;\n constructor(common, raw, fullApiName, basePath) {\n super(common, fullApiName, basePath);\n this.raw = raw;\n }\n}\nexport function extractNamespace(fqApiName) {\n const last = fqApiName.lastIndexOf(\".\");\n if (last === -1)\n return [undefined, fqApiName];\n return [fqApiName.slice(0, last), fqApiName.slice(last + 1)];\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKA,IAAI,MAAM,WAAW;AACjC,OAAO,MAAMC,kBAAkB,CAAC;EAC5BC,OAAO;EACPC,YAAY;EACZC,WAAW;EACXC,YAAY;EACZ;AACJ;AACA;AACA;EACIC,UAAU;EACVC,gBAAgB;EAChBC,WAAWA,CAACC,MAAM,EAAEL,WAAW,EAAEM,QAAQ,EAAEC,OAAO,GAAG,IAAI,EAAE;IACvD,IAAI,CAACT,OAAO,GAAGO,MAAM;IACrB,IAAI,CAACL,WAAW,GAAGA,WAAW;IAC9B,CAAC,IAAI,C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S,CAAC;EACjC,OAAO,CAACA,SAAS,CAACI,KAAK,CAAC,CAAC,EAAEH,IAAI,CAAC,EAAED,SAAS,CAACI,KAAK,CAACH,IAAI,GAAG,CAAC,CAAC,CAAC;AAChE","ignoreList":[]}
1
+ {"version":3,"file":"EnhancedBase.js","names":["path","AbstractImportable","constructor","common","fullApiName","basePath","isLocal","_common","apiNamespace","shortApiName","extractNamespace","importExt","importPath","uniqueImportName","getImportPathRelTo","filePath","startsWith","result","relative","dirname","split","sep","join","EnhancedBase","raw","fqApiName","last","lastIndexOf","undefined","slice"],"sources":["EnhancedBase.ts"],"sourcesContent":["/*\n * Copyright 2024 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 * as path from \"node:path\";\nimport type { EnhanceCommon } from \"./EnhanceCommon.js\";\n\nexport abstract class AbstractImportable {\n protected _common: EnhanceCommon;\n\n shortApiName: string;\n fullApiName: string;\n apiNamespace: string | undefined;\n\n /**\n * Either a path relative to the ourDir (e.g. \"./ontology/objects/foo.js\") or a normal\n * module import (e.g. \"@something/foo\")/\n */\n importPath: string;\n uniqueImportName: string;\n\n constructor(\n common: EnhanceCommon,\n fullApiName: string,\n basePath: string,\n isLocal: boolean = true,\n ) {\n this._common = common;\n this.fullApiName = fullApiName;\n\n [this.apiNamespace, this.shortApiName] = extractNamespace(\n this.fullApiName,\n );\n\n const { importExt } = common;\n\n this.importPath = isLocal\n ? `${basePath}/${this.shortApiName}${importExt}`\n : basePath;\n this.uniqueImportName = this.shortApiName;\n }\n\n getImportPathRelTo = (filePath: string): string => {\n if (this.importPath.startsWith(\".\")) {\n const result = path.relative(path.dirname(filePath), this.importPath)\n .split(path.sep).join(\"/\");\n\n if (result.startsWith(\".\")) {\n return result;\n } else {\n return `./${result}`;\n }\n } else {\n return this.importPath;\n }\n };\n}\n\nexport abstract class EnhancedBase<T> extends AbstractImportable {\n raw: T;\n\n constructor(\n common: EnhanceCommon,\n raw: T,\n fullApiName: string,\n basePath: string,\n ) {\n super(common, fullApiName, basePath);\n this.raw = raw;\n }\n}\n\nexport function extractNamespace(\n fqApiName: string,\n): [string | undefined, string] {\n const last = fqApiName.lastIndexOf(\".\");\n if (last === -1) return [undefined, fqApiName];\n return [fqApiName.slice(0, last), fqApiName.slice(last + 1)];\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,IAAI,MAAM,WAAW;AAGjC,OAAO,MAAeC,kBAAkB,CAAC;EAOvC;AACF;AACA;AACA;;EAIEC,WAAWA,CACTC,MAAqB,EACrBC,WAAmB,EACnBC,QAAgB,EAChBC,OAAgB,GAAG,IAAI,EACvB;IACA,IAAI,CAACC,OAAO,GAAGJ,MAAM;IACrB,IAAI,CAACC,WAAW,GAAGA,WAAW;IAE9B,CAAC,IAAI,CAACI,YAAY,EAAE,IAAI,CAACC,YAAY,CAAC,GAAGC,gBAAgB,CACvD,IAAI,CAACN,WACP,CAAC;IAED,MAAM;MAAEO;IAAU,CAAC,GAAGR,MAAM;IAE5B,IAAI,CAACS,UAAU,GAAGN,OAAO,GACrB,GAAGD,QAAQ,IAAI,IAAI,CAACI,YAAY,GAAGE,SAAS,EAAE,GAC9CN,QAAQ;IACZ,IAAI,CAACQ,gBAAgB,GAAG,IAAI,CAACJ,YAAY;EAC3C;EAEAK,kBAAkB,GAAIC,QAAgB,IAAa;IACjD,IAAI,IAAI,CAACH,UAAU,CAACI,UAAU,CAAC,GAAG,CAAC,EAAE;MACnC,MAAMC,MAAM,GAAGjB,IAAI,CAACkB,QAAQ,CAAClB,IAAI,CAACmB,OAAO,CAACJ,QAAQ,CAAC,EAAE,IAAI,CAACH,UAAU,CAAC,CAClEQ,KAAK,CAACpB,IAAI,CAACqB,GAAG,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;MAE5B,IAAIL,MAAM,CAACD,UAAU,CAAC,GAAG,CAAC,EAAE;QAC1B,OAAOC,MAAM;MACf,CAAC,MAAM;QACL,OAAO,KAAKA,MAAM,EAAE;MACtB;IACF,CAAC,MAAM;MACL,OAAO,IAAI,CAACL,UAAU;IACxB;EACF,CAAC;AACH;AAEA,OAAO,MAAeW,YAAY,SAAYtB,kBAAkB,CAAC;EAG/DC,WAAWA,CACTC,MAAqB,EACrBqB,GAAM,EACNpB,WAAmB,EACnBC,QAAgB,EAChB;IACA,KAAK,CAACF,MAAM,EAAEC,WAAW,EAAEC,QAAQ,CAAC;IACpC,IAAI,CAACmB,GAAG,GAAGA,GAAG;EAChB;AACF;AAEA,OAAO,SAASd,gBAAgBA,CAC9Be,SAAiB,EACa;EAC9B,MAAMC,IAAI,GAAGD,SAAS,CAACE,WAAW,CAAC,GAAG,CAAC;EACvC,IAAID,IAAI,KAAK,CAAC,CAAC,EAAE,OAAO,CAACE,SAAS,EAAEH,SAAS,CAAC;EAC9C,OAAO,CAACA,SAAS,CAACI,KAAK,CAAC,CAAC,EAAEH,IAAI,CAAC,EAAED,SAAS,CAACI,KAAK,CAACH,IAAI,GAAG,CAAC,CAAC,CAAC;AAC9D","ignoreList":[]}
@@ -13,11 +13,11 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from "@osdk/generator-converters";
17
18
  import { deleteUndefineds } from "../util/deleteUndefineds.js";
18
19
  import { EnhancedBase } from "./EnhancedBase.js";
19
20
  export class EnhancedInterfaceType extends EnhancedBase {
20
- raw;
21
21
  constructor(common, raw) {
22
22
  super(common, raw, raw.apiName, "./ontology/interfaces");
23
23
  this.raw = raw;
@@ -1 +1 @@
1
- {"version":3,"file":"EnhancedInterfaceType.js","names":["__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition","deleteUndefineds","EnhancedBase","EnhancedInterfaceType","raw","constructor","common","apiName","getDefinitionIdentifier","v2","shortApiName","getImportedDefinitionIdentifier","properties","getCleanedUpDefinition"],"sources":["EnhancedInterfaceType.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from \"@osdk/generator-converters\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedInterfaceType extends EnhancedBase {\n raw;\n constructor(common, raw) {\n super(common, raw, raw.apiName, \"./ontology/interfaces\");\n this.raw = raw;\n }\n getDefinitionIdentifier(v2) {\n return v2 ? this.shortApiName : `${this.shortApiName}Def`;\n }\n getImportedDefinitionIdentifier(v2) {\n return this.getDefinitionIdentifier(v2);\n }\n get properties() {\n return this.raw.properties;\n }\n getCleanedUpDefinition(v2) {\n return deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(this.raw, v2));\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,mDAAmD,QAAQ,4BAA4B;AAChG,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,YAAY,QAAQ,mBAAmB;AAChD,OAAO,MAAMC,qBAAqB,SAASD,YAAY,CAAC;EACpDE,GAAG;EACHC,WAAWA,CAACC,MAAM,EAAEF,GAAG,EAAE;IACrB,KAAK,CAACE,MAAM,EAAEF,GAAG,EAAEA,GAAG,CAACG,OAAO,EAAE,uBAAuB,CAAC;IACxD,IAAI,CAACH,GAAG,GAAGA,GAAG;EAClB;EACAI,uBAAuBA,CAACC,EAAE,EAAE;IACxB,OAAOA,EAAE,GAAG,IAAI,CAACC,YAAY,GAAG,GAAG,IAAI,CAACA,YAAY,KAAK;EAC7D;EACAC,+BAA+BA,CAACF,EAAE,EAAE;IAChC,OAAO,IAAI,CAACD,uBAAuB,CAACC,EAAE,CAAC;EAC3C;EACA,IAAIG,UAAUA,CAAA,EAAG;IACb,OAAO,IAAI,CAACR,GAAG,CAACQ,UAAU;EAC9B;EACAC,sBAAsBA,CAACJ,EAAE,EAAE;IACvB,OAAOR,gBAAgB,CAACD,mDAAmD,CAAC,IAAI,CAACI,GAAG,EAAEK,EAAE,CAAC,CAAC;EAC9F;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"EnhancedInterfaceType.js","names":["__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition","deleteUndefineds","EnhancedBase","EnhancedInterfaceType","constructor","common","raw","apiName","getDefinitionIdentifier","v2","shortApiName","getImportedDefinitionIdentifier","properties","getCleanedUpDefinition"],"sources":["EnhancedInterfaceType.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { InterfaceMetadata } from \"@osdk/api\";\nimport { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from \"@osdk/generator-converters\";\nimport type { InterfaceType } from \"@osdk/internal.foundry.core\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport type { EnhanceCommon } from \"./EnhanceCommon.js\";\nimport { EnhancedBase } from \"./EnhancedBase.js\";\n\nexport class EnhancedInterfaceType extends EnhancedBase<InterfaceType> {\n constructor(common: EnhanceCommon, public raw: InterfaceType) {\n super(common, raw, raw.apiName, \"./ontology/interfaces\");\n }\n\n getDefinitionIdentifier(v2: boolean): string {\n return v2 ? this.shortApiName : `${this.shortApiName}Def`;\n }\n\n getImportedDefinitionIdentifier(v2: boolean): string {\n return this.getDefinitionIdentifier(v2);\n }\n\n get properties(): InterfaceType[\"properties\"] {\n return this.raw.properties;\n }\n\n getCleanedUpDefinition(v2: boolean): InterfaceMetadata {\n return deleteUndefineds(\n __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(\n this.raw,\n v2,\n ),\n );\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,mDAAmD,QAAQ,4BAA4B;AAEhG,SAASC,gBAAgB,QAAQ,6BAA6B;AAE9D,SAASC,YAAY,QAAQ,mBAAmB;AAEhD,OAAO,MAAMC,qBAAqB,SAASD,YAAY,CAAgB;EACrEE,WAAWA,CAACC,MAAqB,EAASC,GAAkB,EAAE;IAC5D,KAAK,CAACD,MAAM,EAAEC,GAAG,EAAEA,GAAG,CAACC,OAAO,EAAE,uBAAuB,CAAC;IAAC,KADjBD,GAAkB,GAAlBA,GAAkB;EAE5D;EAEAE,uBAAuBA,CAACC,EAAW,EAAU;IAC3C,OAAOA,EAAE,GAAG,IAAI,CAACC,YAAY,GAAG,GAAG,IAAI,CAACA,YAAY,KAAK;EAC3D;EAEAC,+BAA+BA,CAACF,EAAW,EAAU;IACnD,OAAO,IAAI,CAACD,uBAAuB,CAACC,EAAE,CAAC;EACzC;EAEA,IAAIG,UAAUA,CAAA,EAAgC;IAC5C,OAAO,IAAI,CAACN,GAAG,CAACM,UAAU;EAC5B;EAEAC,sBAAsBA,CAACJ,EAAW,EAAqB;IACrD,OAAOR,gBAAgB,CACrBD,mDAAmD,CACjD,IAAI,CAACM,GAAG,EACRG,EACF,CACF,CAAC;EACH;AACF","ignoreList":[]}
@@ -13,11 +13,11 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { wireObjectTypeFullMetadataToSdkObjectMetadata } from "@osdk/generator-converters";
17
18
  import { deleteUndefineds } from "../util/deleteUndefineds.js";
18
19
  import { EnhancedBase } from "./EnhancedBase.js";
19
20
  export class EnhancedObjectType extends EnhancedBase {
20
- raw;
21
21
  constructor(common, raw) {
22
22
  super(common, raw, raw.objectType.apiName, "./ontology/objects");
23
23
  this.raw = raw;
@@ -1 +1 @@
1
- {"version":3,"file":"EnhancedObjectType.js","names":["wireObjectTypeFullMetadataToSdkObjectMetadata","deleteUndefineds","EnhancedBase","EnhancedObjectType","raw","constructor","common","objectType","apiName","getDefinitionIdentifier","v2","shortApiName","getImportedDefinitionIdentifier","getCleanedUpDefinition"],"sources":["EnhancedObjectType.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { wireObjectTypeFullMetadataToSdkObjectMetadata } from \"@osdk/generator-converters\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedObjectType extends EnhancedBase {\n raw;\n constructor(common, raw) {\n super(common, raw, raw.objectType.apiName, \"./ontology/objects\");\n this.raw = raw;\n }\n getDefinitionIdentifier(v2) {\n return v2 ? `${this.shortApiName}` : `${this.shortApiName}Def`;\n }\n getImportedDefinitionIdentifier(v2) {\n return this.getDefinitionIdentifier(v2);\n }\n getCleanedUpDefinition(v2) {\n return deleteUndefineds(wireObjectTypeFullMetadataToSdkObjectMetadata(this.raw, v2));\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,6CAA6C,QAAQ,4BAA4B;AAC1F,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,YAAY,QAAQ,mBAAmB;AAChD,OAAO,MAAMC,kBAAkB,SAASD,YAAY,CAAC;EACjDE,GAAG;EACHC,WAAWA,CAACC,MAAM,EAAEF,GAAG,EAAE;IACrB,KAAK,CAACE,MAAM,EAAEF,GAAG,EAAEA,GAAG,CAACG,UAAU,CAACC,OAAO,EAAE,oBAAoB,CAAC;IAChE,IAAI,CAACJ,GAAG,GAAGA,GAAG;EAClB;EACAK,uBAAuBA,CAACC,EAAE,EAAE;IACxB,OAAOA,EAAE,GAAG,GAAG,IAAI,CAACC,YAAY,EAAE,GAAG,GAAG,IAAI,CAACA,YAAY,KAAK;EAClE;EACAC,+BAA+BA,CAACF,EAAE,EAAE;IAChC,OAAO,IAAI,CAACD,uBAAuB,CAACC,EAAE,CAAC;EAC3C;EACAG,sBAAsBA,CAACH,EAAE,EAAE;IACvB,OAAOT,gBAAgB,CAACD,6CAA6C,CAAC,IAAI,CAACI,GAAG,EAAEM,EAAE,CAAC,CAAC;EACxF;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"EnhancedObjectType.js","names":["wireObjectTypeFullMetadataToSdkObjectMetadata","deleteUndefineds","EnhancedBase","EnhancedObjectType","constructor","common","raw","objectType","apiName","getDefinitionIdentifier","v2","shortApiName","getImportedDefinitionIdentifier","getCleanedUpDefinition"],"sources":["EnhancedObjectType.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { ObjectMetadata } from \"@osdk/api\";\nimport { wireObjectTypeFullMetadataToSdkObjectMetadata } from \"@osdk/generator-converters\";\nimport type { ObjectTypeFullMetadata } from \"@osdk/internal.foundry.core\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport type { EnhanceCommon } from \"./EnhanceCommon.js\";\nimport { EnhancedBase } from \"./EnhancedBase.js\";\n\nexport class EnhancedObjectType extends EnhancedBase<ObjectTypeFullMetadata> {\n constructor(common: EnhanceCommon, public raw: ObjectTypeFullMetadata) {\n super(common, raw, raw.objectType.apiName, \"./ontology/objects\");\n }\n\n getDefinitionIdentifier(v2: boolean): string {\n return v2 ? `${this.shortApiName}` : `${this.shortApiName}Def`;\n }\n\n getImportedDefinitionIdentifier(v2: boolean): string {\n return this.getDefinitionIdentifier(v2);\n }\n\n getCleanedUpDefinition(v2: boolean): ObjectMetadata {\n return deleteUndefineds(\n wireObjectTypeFullMetadataToSdkObjectMetadata(\n this.raw,\n v2,\n ),\n );\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,6CAA6C,QAAQ,4BAA4B;AAE1F,SAASC,gBAAgB,QAAQ,6BAA6B;AAE9D,SAASC,YAAY,QAAQ,mBAAmB;AAEhD,OAAO,MAAMC,kBAAkB,SAASD,YAAY,CAAyB;EAC3EE,WAAWA,CAACC,MAAqB,EAASC,GAA2B,EAAE;IACrE,KAAK,CAACD,MAAM,EAAEC,GAAG,EAAEA,GAAG,CAACC,UAAU,CAACC,OAAO,EAAE,oBAAoB,CAAC;IAAC,KADzBF,GAA2B,GAA3BA,GAA2B;EAErE;EAEAG,uBAAuBA,CAACC,EAAW,EAAU;IAC3C,OAAOA,EAAE,GAAG,GAAG,IAAI,CAACC,YAAY,EAAE,GAAG,GAAG,IAAI,CAACA,YAAY,KAAK;EAChE;EAEAC,+BAA+BA,CAACF,EAAW,EAAU;IACnD,OAAO,IAAI,CAACD,uBAAuB,CAACC,EAAE,CAAC;EACzC;EAEAG,sBAAsBA,CAACH,EAAW,EAAkB;IAClD,OAAOT,gBAAgB,CACrBD,6CAA6C,CAC3C,IAAI,CAACM,GAAG,EACRI,EACF,CACF,CAAC;EACH;AACF","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { EnhancedAction } from "./EnhancedAction.js";
17
18
  import { extractNamespace } from "./EnhancedBase.js";
18
19
  import { EnhancedInterfaceType } from "./EnhancedInterfaceType.js";
@@ -21,15 +22,7 @@ import { EnhancedQuery } from "./EnhancedQuery.js";
21
22
  import { EnhancedSharedPropertyType } from "./EnhancedSharedPropertyType.js";
22
23
  import { ForeignType } from "./ForeignType.js";
23
24
  export class EnhancedOntologyDefinition {
24
- ontology;
25
- objectTypes;
26
- actionTypes;
27
- queryTypes;
28
- interfaceTypes;
29
- sharedPropertyTypes;
30
25
  #foreignTypes = {};
31
- raw;
32
- common;
33
26
  constructor(raw, importExt, externalObjects, externalInterfaces, externalSpts) {
34
27
  this.common = {
35
28
  enhancedOntology: this,
@@ -1 +1 @@
1
- {"version":3,"file":"EnhancedOntologyDefinition.js","names":["EnhancedAction","extractNamespace","EnhancedInterfaceType","EnhancedObjectType","EnhancedQuery","EnhancedSharedPropertyType","ForeignType","EnhancedOntologyDefinition","ontology","objectTypes","actionTypes","queryTypes","interfaceTypes","sharedPropertyTypes","foreignTypes","raw","common","constructor","importExt","externalObjects","externalInterfaces","externalSpts","enhancedOntology","remap","createRequireType","type","fullApiName","ret","apiNamespace","shortApiName","Error","requireObjectType","requireInterfaceType","requireActionType","requireQueryType","requireSharedPropertyType","r","Constructor","externalMap","entries","v","Object","has","push","destPackage","fromEntries","sort","a","b","localeCompare"],"sources":["EnhancedOntologyDefinition.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { EnhancedAction } from \"./EnhancedAction.js\";\nimport { extractNamespace } from \"./EnhancedBase.js\";\nimport { EnhancedInterfaceType } from \"./EnhancedInterfaceType.js\";\nimport { EnhancedObjectType } from \"./EnhancedObjectType.js\";\nimport { EnhancedQuery } from \"./EnhancedQuery.js\";\nimport { EnhancedSharedPropertyType } from \"./EnhancedSharedPropertyType.js\";\nimport { ForeignType } from \"./ForeignType.js\";\nexport class EnhancedOntologyDefinition {\n ontology;\n objectTypes;\n actionTypes;\n queryTypes;\n interfaceTypes;\n sharedPropertyTypes;\n #foreignTypes = {};\n raw;\n common;\n constructor(raw, importExt, externalObjects, externalInterfaces, externalSpts) {\n this.common = {\n enhancedOntology: this,\n importExt,\n };\n this.raw = raw;\n this.ontology = raw.ontology;\n this.objectTypes = remap(raw.objectTypes, this.common, EnhancedObjectType, externalObjects);\n this.actionTypes = remap(raw.actionTypes, this.common, EnhancedAction);\n this.queryTypes = remap(raw.queryTypes, this.common, EnhancedQuery);\n this.interfaceTypes = remap(raw.interfaceTypes, this.common, EnhancedInterfaceType, externalInterfaces);\n this.sharedPropertyTypes = remap(raw.sharedPropertyTypes, this.common, EnhancedSharedPropertyType, externalSpts);\n }\n #createRequireType = (type) => {\n return (fullApiName, localOnly) => {\n const ret = this[type][fullApiName];\n if (!ret) {\n const [apiNamespace, shortApiName] = extractNamespace(fullApiName);\n throw new Error(`Unable to find ${type}: No entry for '${fullApiName}`);\n }\n return ret;\n };\n };\n requireObjectType = this\n .#createRequireType(\"objectTypes\");\n requireInterfaceType = this\n .#createRequireType(\"interfaceTypes\");\n requireActionType = this\n .#createRequireType(\"actionTypes\");\n requireQueryType = this\n .#createRequireType(\"queryTypes\");\n requireSharedPropertyType = this\n .#createRequireType(\"sharedPropertyTypes\");\n}\nfunction remap(r, common, Constructor, externalMap) {\n const entries = [];\n for (const [fullApiName, v] of Object.entries(r ?? {})) {\n if (externalMap?.has(fullApiName)) {\n // skip it, we handle it below\n }\n else {\n entries.push([fullApiName, new Constructor(common, v)]);\n }\n }\n if (externalMap) {\n for (const [fullApiName, destPackage] of externalMap) {\n const [apiNamespace, shortApiName] = extractNamespace(fullApiName);\n // I think this check should be required but the ontology manager / dev console doesn't enforce it right now\n // if (apiNamespace === undefined) {\n // throw new Error(\n // `Cannot reference an external type (${fullApiName}) that is missing a namespace`,\n // );\n // }\n entries.push([\n fullApiName,\n new ForeignType(common, apiNamespace, shortApiName, destPackage),\n ]);\n }\n }\n return Object.fromEntries(entries.sort((a, b) => a[0].localeCompare(b[0])));\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,cAAc,QAAQ,qBAAqB;AACpD,SAASC,gBAAgB,QAAQ,mBAAmB;AACpD,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SAASC,kBAAkB,QAAQ,yBAAyB;AAC5D,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,0BA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,CAACU,MAAM,EAAEY,YAAY,EAAEC,YAAY,EAAEe,WAAW,CAAC,CACnE,CAAC;IACN;EACJ;EACA,OAAOH,MAAM,CAACI,WAAW,CAACN,OAAO,CAACO,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,CAAC,CAAC,CAAC,CAACE,aAAa,CAACD,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/E","ignoreList":[]}
1
+ {"version":3,"file":"EnhancedOntologyDefinition.js","names":["EnhancedAction","extractNamespace","EnhancedInterfaceType","EnhancedObjectType","EnhancedQuery","EnhancedSharedPropertyType","ForeignType","EnhancedOntologyDefinition","foreignTypes","constructor","raw","importExt","externalObjects","externalInterfaces","externalSpts","common","enhancedOntology","ontology","objectTypes","remap","actionTypes","queryTypes","interfaceTypes","sharedPropertyTypes","createRequireType","type","fullApiName","ret","apiNamespace","shortApiName","Error","requireObjectType","requireInterfaceType","requireActionType","requireQueryType","requireSharedPropertyType","r","Constructor","externalMap","entries","v","Object","has","push","destPackage","fromEntries","sort","a","b","localeCompare"],"sources":["EnhancedOntologyDefinition.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { OntologyV2 } from \"@osdk/internal.foundry.core\";\nimport type { WireOntologyDefinition } from \"../WireOntologyDefinition.js\";\nimport type { EnhanceCommon } from \"./EnhanceCommon.js\";\nimport { EnhancedAction } from \"./EnhancedAction.js\";\nimport { extractNamespace } from \"./EnhancedBase.js\";\nimport { EnhancedInterfaceType } from \"./EnhancedInterfaceType.js\";\nimport { EnhancedObjectType } from \"./EnhancedObjectType.js\";\nimport { EnhancedQuery } from \"./EnhancedQuery.js\";\nimport { EnhancedSharedPropertyType } from \"./EnhancedSharedPropertyType.js\";\nimport { ForeignType } from \"./ForeignType.js\";\n\ntype RequiredType<\n K extends\n | \"objectTypes\"\n | \"actionTypes\"\n | \"interfaceTypes\"\n | \"queryTypes\"\n | \"sharedPropertyTypes\",\n> = <\n L extends boolean = false,\n>(\n fullApiName: string,\n localOnly?: L,\n) => L extends true ? EnhancedOntologyDefinition[K][string] : ForeignType;\n\nexport class EnhancedOntologyDefinition {\n ontology: OntologyV2;\n objectTypes: Record<string, EnhancedObjectType | ForeignType>;\n actionTypes: Record<string, EnhancedAction>;\n queryTypes: Record<string, EnhancedQuery>;\n interfaceTypes: Record<\n string,\n EnhancedInterfaceType | ForeignType\n >;\n sharedPropertyTypes: Record<\n string,\n EnhancedSharedPropertyType | ForeignType\n >;\n #foreignTypes: Record<string, ForeignType> = {};\n\n raw: WireOntologyDefinition;\n common: EnhanceCommon;\n\n constructor(\n raw: WireOntologyDefinition,\n importExt: string,\n externalObjects?: Map<string, string>,\n externalInterfaces?: Map<string, string>,\n externalSpts?: Map<string, string>,\n ) {\n this.common = {\n enhancedOntology: this,\n importExt,\n };\n this.raw = raw;\n this.ontology = raw.ontology;\n this.objectTypes = remap(\n raw.objectTypes,\n this.common,\n EnhancedObjectType,\n externalObjects,\n );\n this.actionTypes = remap(\n raw.actionTypes,\n this.common,\n EnhancedAction,\n );\n this.queryTypes = remap(\n raw.queryTypes,\n this.common,\n EnhancedQuery,\n );\n this.interfaceTypes = remap(\n raw.interfaceTypes,\n this.common,\n EnhancedInterfaceType,\n externalInterfaces,\n );\n this.sharedPropertyTypes = remap(\n raw.sharedPropertyTypes,\n this.common,\n EnhancedSharedPropertyType,\n externalSpts,\n );\n }\n\n #createRequireType = <\n K extends\n | \"objectTypes\"\n | \"actionTypes\"\n | \"interfaceTypes\"\n | \"queryTypes\"\n | \"sharedPropertyTypes\",\n >(\n type: K & keyof this,\n ) => {\n return <L extends boolean = false>(\n fullApiName: string,\n localOnly?: L,\n ): L extends true ? this[K][string] : ForeignType => {\n const ret = this[type][fullApiName];\n if (!ret) {\n const [apiNamespace, shortApiName] = extractNamespace(fullApiName);\n\n throw new Error(\n `Unable to find ${type}: No entry for '${fullApiName}`,\n );\n }\n return ret as this[K][string] as L extends true ? this[K][string]\n : ForeignType;\n };\n };\n\n public requireObjectType: RequiredType<\"objectTypes\"> = this\n .#createRequireType(\"objectTypes\");\n public requireInterfaceType: RequiredType<\"interfaceTypes\"> = this\n .#createRequireType(\"interfaceTypes\");\n public requireActionType: RequiredType<\"actionTypes\"> = this\n .#createRequireType(\"actionTypes\");\n public requireQueryType: RequiredType<\"queryTypes\"> = this\n .#createRequireType(\"queryTypes\");\n public requireSharedPropertyType: RequiredType<\"sharedPropertyTypes\"> = this\n .#createRequireType(\n \"sharedPropertyTypes\",\n );\n}\n\nfunction remap<T, X>(\n r: Record<string, T>,\n common: EnhanceCommon,\n Constructor: { new(common: EnhanceCommon, og: T): X },\n): Record<string, X>;\nfunction remap<T, X>(\n r: Record<string, T>,\n common: EnhanceCommon,\n Constructor: { new(common: EnhanceCommon, original: T): X },\n externalMap?: Map<string, string>,\n): Record<string, X | ForeignType>;\nfunction remap<T, X, const Q extends Map<string, string> | undefined>(\n r: Record<string, T>,\n common: EnhanceCommon,\n Constructor: { new(common: EnhanceCommon, og: T): X },\n externalMap?: Q,\n): Record<string, X | ForeignType> {\n const entries: [string, X | ForeignType][] = [];\n\n for (const [fullApiName, v] of Object.entries(r ?? {})) {\n if (externalMap?.has(fullApiName)) {\n // skip it, we handle it below\n } else {\n entries.push([fullApiName, new Constructor(common, v)]);\n }\n }\n\n if (externalMap) {\n for (const [fullApiName, destPackage] of externalMap) {\n const [apiNamespace, shortApiName] = extractNamespace(fullApiName);\n // I think this check should be required but the ontology manager / dev console doesn't enforce it right now\n // if (apiNamespace === undefined) {\n // throw new Error(\n // `Cannot reference an external type (${fullApiName}) that is missing a namespace`,\n // );\n // }\n entries.push([\n fullApiName,\n new ForeignType(\n common,\n apiNamespace,\n shortApiName,\n destPackage,\n ),\n ]);\n }\n }\n\n return Object.fromEntries(\n entries.sort((a, b) => a[0].localeCompare(b[0])),\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,SAASA,cAAc,QAAQ,qBAAqB;AACpD,SAASC,gBAAgB,QAAQ,mBAAmB;AACpD,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SAASC,kBAAkB,QAAQ,yBAAyB;AAC5D,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,0BAA0B,QAAQ,iCAAiC;AAC5E,SAASC,WAAW,QAAQ,kBAAkB;AAgB9C,OAAO,MAAMC,0BAA0B,CAAC;EAatC,CAACC,YAAY,GAAgC,CAAC,CAAC;EAK/CC,WAAWA,CACTC,GAA2B,EAC3BC,SAAiB,EACjBC,eAAqC,EACrCC,kBAAwC,EACxCC,YAAkC,EAClC;IACA,IAAI,CAACC,MAAM,GAAG;MACZC,gBAAgB,EAAE,IAAI;MACtBL;IACF,CAAC;IACD,IAAI,CAACD,GAAG,GAAGA,GAAG;IACd,IAAI,CAACO,QAAQ,GAAGP,GAAG,CAACO,QAAQ;IAC5B,IAAI,CAACC,WAAW,GAAGC,KAAK,CACtBT,GAAG,CAACQ,WAAW,EACf,IAAI,CAACH,MAAM,EACXZ,kBAAkB,EAClBS,eACF,CAAC;IACD,IAAI,CAACQ,WAAW,GAAGD,KAAK,CACtBT,GAAG,CAACU,WAAW,EACf,IAAI,CAACL,MAAM,EACXf,cACF,CAAC;IACD,IAAI,CAACqB,UAAU,GAAGF,KAAK,CACrBT,GAAG,CAACW,UAAU,EACd,IAAI,CAACN,MAAM,EACXX,aACF,CAAC;IACD,IAAI,CAACkB,cAAc,GAAGH,KAAK,CACzBT,GAAG,CAACY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CAACjB,WAAW,EAAE,IAAIW,WAAW,CAACtB,MAAM,EAAEyB,CAAC,CAAC,CAAC,CAAC;IACzD,CAAC,CAHC;EAIJ;EAEA,IAAIF,WAAW,EAAE;IACf,KAAK,MAAM,CAACZ,WAAW,EAAEkB,WAAW,CAAC,IAAIN,WAAW,EAAE;MACpD,MAAM,CAACV,YAAY,EAAEC,YAAY,CAAC,GAAG5B,gBAAgB,CAACyB,WAAW,CAAC;MAClE;MACA;MACA;MACA;MACA;MACA;MACAa,OAAO,CAACI,IAAI,CAAC,CACXjB,WAAW,EACX,IAAIpB,WAAW,CACbS,MAAM,EACNa,YAAY,EACZC,YAAY,EACZe,WACF,CAAC,CACF,CAAC;IACJ;EACF;EAEA,OAAOH,MAAM,CAACI,WAAW,CACvBN,OAAO,CAACO,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,CAAC,CAAC,CAAC,CAACE,aAAa,CAACD,CAAC,CAAC,CAAC,CAAC,CAAC,CACjD,CAAC;AACH","ignoreList":[]}
@@ -13,9 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { EnhancedBase } from "./EnhancedBase.js";
17
18
  export class EnhancedQuery extends EnhancedBase {
18
- raw;
19
19
  constructor(common, raw) {
20
20
  super(common, raw, raw.apiName, "./ontology/queries");
21
21
  this.raw = raw;
@@ -1 +1 @@
1
- {"version":3,"file":"EnhancedQuery.js","names":["EnhancedBase","EnhancedQuery","raw","constructor","common","apiName","description","parameters","output","paramsIdentifier","shortApiName","definitionIdentifier","definitionParamsIdentifier"],"sources":["EnhancedQuery.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedQuery extends EnhancedBase {\n raw;\n constructor(common, raw) {\n super(common, raw, raw.apiName, \"./ontology/queries\");\n this.raw = raw;\n }\n get description() {\n return this.raw.description;\n }\n get parameters() {\n return this.raw.parameters;\n }\n get output() {\n return this.raw.output;\n }\n get paramsIdentifier() {\n return `${this.shortApiName}.Parameters`;\n }\n get definitionIdentifier() {\n return `${this.shortApiName}`;\n }\n get definitionParamsIdentifier() {\n return `${this.definitionIdentifier}$Params`;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,mBAAmB;AAChD,OAAO,MAAMC,aAAa,SAASD,YAAY,CAAC;EAC5CE,GAAG;EACHC,WAAWA,CAACC,MAAM,EAAEF,GAAG,EAAE;IACrB,KAAK,CAACE,MAAM,EAAEF,GAAG,EAAEA,GAAG,CAACG,OAAO,EAAE,oBAAoB,CAAC;IACrD,IAAI,CAACH,GAAG,GAAGA,GAAG;EAClB;EACA,IAAII,WAAWA,CAAA,EAAG;IACd,OAAO,IAAI,CAACJ,GAAG,CAACI,WAAW;EAC/B;EACA,IAAIC,UAAUA,CAAA,EAAG;IACb,OAAO,IAAI,CAACL,GAAG,CAACK,UAAU;EAC9B;EACA,IAAIC,MAAMA,CAAA,EAAG;IACT,OAAO,IAAI,CAACN,GAAG,CAACM,MAAM;EAC1B;EACA,IAAIC,gBAAgBA,CAAA,EAAG;IACnB,OAAO,GAAG,IAAI,CAACC,YAAY,aAAa;EAC5C;EACA,IAAIC,oBAAoBA,CAAA,EAAG;IACvB,OAAO,GAAG,IAAI,CAACD,YAAY,EAAE;EACjC;EACA,IAAIE,0BAA0BA,CAAA,EAAG;IAC7B,OAAO,GAAG,IAAI,CAACD,oBAAoB,SAAS;EAChD;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"EnhancedQuery.js","names":["EnhancedBase","EnhancedQuery","constructor","common","raw","apiName","description","parameters","output","paramsIdentifier","shortApiName","definitionIdentifier","definitionParamsIdentifier"],"sources":["EnhancedQuery.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { QueryDataType, QueryTypeV2 } from \"@osdk/internal.foundry.core\";\nimport type { EnhanceCommon } from \"./EnhanceCommon.js\";\nimport { EnhancedBase } from \"./EnhancedBase.js\";\n\nexport class EnhancedQuery extends EnhancedBase<QueryTypeV2> {\n constructor(common: EnhanceCommon, public raw: QueryTypeV2) {\n super(common, raw, raw.apiName, \"./ontology/queries\");\n }\n\n get description(): string | undefined {\n return this.raw.description;\n }\n\n get parameters(): QueryTypeV2[\"parameters\"] {\n return this.raw.parameters;\n }\n\n get output(): QueryDataType {\n return this.raw.output;\n }\n\n get paramsIdentifier() {\n return `${this.shortApiName}.Parameters`;\n }\n\n get definitionIdentifier() {\n return `${this.shortApiName}`;\n }\n\n get definitionParamsIdentifier() {\n return `${this.definitionIdentifier}$Params`;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,YAAY,QAAQ,mBAAmB;AAEhD,OAAO,MAAMC,aAAa,SAASD,YAAY,CAAc;EAC3DE,WAAWA,CAACC,MAAqB,EAASC,GAAgB,EAAE;IAC1D,KAAK,CAACD,MAAM,EAAEC,GAAG,EAAEA,GAAG,CAACC,OAAO,EAAE,oBAAoB,CAAC;IAAC,KADdD,GAAgB,GAAhBA,GAAgB;EAE1D;EAEA,IAAIE,WAAWA,CAAA,EAAuB;IACpC,OAAO,IAAI,CAACF,GAAG,CAACE,WAAW;EAC7B;EAEA,IAAIC,UAAUA,CAAA,EAA8B;IAC1C,OAAO,IAAI,CAACH,GAAG,CAACG,UAAU;EAC5B;EAEA,IAAIC,MAAMA,CAAA,EAAkB;IAC1B,OAAO,IAAI,CAACJ,GAAG,CAACI,MAAM;EACxB;EAEA,IAAIC,gBAAgBA,CAAA,EAAG;IACrB,OAAO,GAAG,IAAI,CAACC,YAAY,aAAa;EAC1C;EAEA,IAAIC,oBAAoBA,CAAA,EAAG;IACzB,OAAO,GAAG,IAAI,CAACD,YAAY,EAAE;EAC/B;EAEA,IAAIE,0BAA0BA,CAAA,EAAG;IAC/B,OAAO,GAAG,IAAI,CAACD,oBAAoB,SAAS;EAC9C;AACF","ignoreList":[]}
@@ -13,9 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { EnhancedBase } from "./EnhancedBase.js";
17
18
  export class EnhancedSharedPropertyType extends EnhancedBase {
18
- raw;
19
19
  constructor(common, raw) {
20
20
  super(common, raw, raw.apiName, "./ontology/interfaces");
21
21
  this.raw = raw;
@@ -1 +1 @@
1
- {"version":3,"file":"EnhancedSharedPropertyType.js","names":["EnhancedBase","EnhancedSharedPropertyType","raw","constructor","common","apiName"],"sources":["EnhancedSharedPropertyType.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedSharedPropertyType extends EnhancedBase {\n raw;\n constructor(common, raw) {\n super(common, raw, raw.apiName, \"./ontology/interfaces\");\n this.raw = raw;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,mBAAmB;AAChD,OAAO,MAAMC,0BAA0B,SAASD,YAAY,CAAC;EACzDE,GAAG;EACHC,WAAWA,CAACC,MAAM,EAAEF,GAAG,EAAE;IACrB,KAAK,CAACE,MAAM,EAAEF,GAAG,EAAEA,GAAG,CAACG,OAAO,EAAE,uBAAuB,CAAC;IACxD,IAAI,CAACH,GAAG,GAAGA,GAAG;EAClB;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"EnhancedSharedPropertyType.js","names":["EnhancedBase","EnhancedSharedPropertyType","constructor","common","raw","apiName"],"sources":["EnhancedSharedPropertyType.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { SharedPropertyType } from \"@osdk/internal.foundry.core\";\nimport type { EnhanceCommon } from \"./EnhanceCommon.js\";\nimport { EnhancedBase } from \"./EnhancedBase.js\";\n\nexport class EnhancedSharedPropertyType\n extends EnhancedBase<SharedPropertyType>\n{\n constructor(common: EnhanceCommon, public raw: SharedPropertyType) {\n super(common, raw, raw.apiName, \"./ontology/interfaces\");\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,YAAY,QAAQ,mBAAmB;AAEhD,OAAO,MAAMC,0BAA0B,SAC7BD,YAAY,CACtB;EACEE,WAAWA,CAACC,MAAqB,EAASC,GAAuB,EAAE;IACjE,KAAK,CAACD,MAAM,EAAEC,GAAG,EAAEA,GAAG,CAACC,OAAO,EAAE,uBAAuB,CAAC;IAAC,KADjBD,GAAuB,GAAvBA,GAAuB;EAEjE;AACF","ignoreList":[]}
@@ -13,9 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { AbstractImportable } from "./EnhancedBase.js";
17
18
  export class ForeignType extends AbstractImportable {
18
- _common;
19
19
  constructor(_common, apiNamespace, shortApiName, destinationPackage) {
20
20
  super(_common, apiNamespace ? `${apiNamespace}.${shortApiName}` : shortApiName, destinationPackage, false);
21
21
  this._common = _common;
@@ -1 +1 @@
1
- {"version":3,"file":"ForeignType.js","names":["AbstractImportable","ForeignType","_common","constructor","apiNamespace","shortApiName","destinationPackage","getImportedDefinitionIdentifier","replace","getDefinitionIdentifier","uniqueImportName"],"sources":["ForeignType.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { AbstractImportable } from \"./EnhancedBase.js\";\nexport class ForeignType extends AbstractImportable {\n _common;\n constructor(_common, apiNamespace, shortApiName, destinationPackage) {\n super(_common, apiNamespace ? `${apiNamespace}.${shortApiName}` : shortApiName, destinationPackage, false);\n this._common = _common;\n }\n getImportedDefinitionIdentifier(v2) {\n return `$Imported$${this.apiNamespace?.replace(/\\./g, \"$\")}$${this.shortApiName}`;\n }\n getDefinitionIdentifier(v2) {\n return this.uniqueImportName;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,kBAAkB,QAAQ,mBAAmB;AACtD,OAAO,MAAMC,WAAW,SAASD,kBAAkB,CAAC;EAChDE,OAAO;EACPC,WAAWA,CAACD,OAAO,EAAEE,YAAY,EAAEC,YAAY,EAAEC,kBAAkB,EAAE;IACjE,KAAK,CAACJ,OAAO,EAAEE,YAAY,GAAG,GAAGA,YAAY,IAAIC,YAAY,EAAE,GAAGA,YAAY,EAAEC,kBAAkB,EAAE,KAAK,CAAC;IAC1G,IAAI,CAACJ,OAAO,GAAGA,OAAO;EAC1B;EACAK,+BAA+BA,CAAA,EAAK;IAChC,OAAO,aAAa,IAAI,CAACH,YAAY,EAAEI,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,IAAI,CAACH,YAAY,EAAE;EACrF;EACAI,uBAAuBA,CAAA,EAAK;IACxB,OAAO,IAAI,CAACC,gBAAgB;EAChC;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"ForeignType.js","names":["AbstractImportable","ForeignType","constructor","_common","apiNamespace","shortApiName","destinationPackage","getImportedDefinitionIdentifier","replace","getDefinitionIdentifier","uniqueImportName"],"sources":["ForeignType.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { EnhanceCommon } from \"./EnhanceCommon.js\";\nimport { AbstractImportable } from \"./EnhancedBase.js\";\n\nexport class ForeignType extends AbstractImportable {\n constructor(\n public _common: EnhanceCommon,\n apiNamespace: string | undefined,\n shortApiName: string,\n destinationPackage: string,\n ) {\n super(\n _common,\n apiNamespace ? `${apiNamespace}.${shortApiName}` : shortApiName,\n destinationPackage,\n false,\n );\n }\n\n getImportedDefinitionIdentifier(v2: boolean) {\n return `$Imported$${\n this.apiNamespace?.replace(/\\./g, \"$\")\n }$${this.shortApiName}`;\n }\n\n getDefinitionIdentifier(v2: boolean): string {\n return this.uniqueImportName;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,kBAAkB,QAAQ,mBAAmB;AAEtD,OAAO,MAAMC,WAAW,SAASD,kBAAkB,CAAC;EAClDE,WAAWA,CACFC,OAAsB,EAC7BC,YAAgC,EAChCC,YAAoB,EACpBC,kBAA0B,EAC1B;IACA,KAAK,CACHH,OAAO,EACPC,YAAY,GAAG,GAAGA,YAAY,IAAIC,YAAY,EAAE,GAAGA,YAAY,EAC/DC,kBAAkB,EAClB,KACF,CAAC;IAAC,KAVKH,OAAsB,GAAtBA,OAAsB;EAW/B;EAEAI,+BAA+BA,CAAA,EAAc;IAC3C,OAAO,aACL,IAAI,CAACH,YAAY,EAAEI,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,IACpC,IAAI,CAACH,YAAY,EAAE;EACzB;EAEAI,uBAAuBA,CAAA,EAAsB;IAC3C,OAAO,IAAI,CAACC,gBAAgB;EAC9B;AACF","ignoreList":[]}
@@ -1,17 +1,2 @@
1
- /*
2
- * Copyright 2024 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
1
  export {};
17
2
  //# sourceMappingURL=GenerateContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenerateContext.js","names":[],"sources":["GenerateContext.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"file":"GenerateContext.js","names":[],"sources":["GenerateContext.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { MinimalFs } from \"../MinimalFs.js\";\nimport type { WireOntologyDefinition } from \"../WireOntologyDefinition.js\";\nimport type { EnhancedOntologyDefinition } from \"./EnhancedOntologyDefinition.js\";\n\nexport interface GenerateContext {\n sanitizedOntology: WireOntologyDefinition;\n ontology: EnhancedOntologyDefinition;\n\n importExt?: string;\n fs: MinimalFs;\n\n outDir: string;\n\n ontologyApiNamespace?: string | undefined;\n apiNamespacePackageMap?: Map<string, string>;\n forInternalUse?: boolean;\n}\n"],"mappings":"","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { EnhancedOntologyDefinition } from "./EnhancedOntologyDefinition.js";
17
18
  export function enhanceOntology({
18
19
  sanitized,
@@ -1 +1 @@
1
- {"version":3,"file":"enhanceOntology.js","names":["EnhancedOntologyDefinition","enhanceOntology","sanitized","importExt","externalObjects","externalInterfaces","externalSpts"],"sources":["enhanceOntology.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { EnhancedOntologyDefinition } from \"./EnhancedOntologyDefinition.js\";\nexport function enhanceOntology({ sanitized, importExt, externalObjects, externalInterfaces, externalSpts, }) {\n return new EnhancedOntologyDefinition(sanitized, importExt, externalObjects, externalInterfaces, externalSpts);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,0BAA0B,QAAQ,iCAAiC;AAC5E,OAAO,SAASC,eAAeA,CAAC;EAAEC,SAAS;EAAEC,SAAS;EAAEC,eAAe;EAAEC,kBAAkB;EAAEC;AAAc,CAAC,EAAE;EAC1G,OAAO,IAAIN,0BAA0B,CAACE,SAAS,EAAEC,SAAS,EAAEC,eAAe,EAAEC,kBAAkB,EAAEC,YAAY,CAAC;AAClH","ignoreList":[]}
1
+ {"version":3,"file":"enhanceOntology.js","names":["EnhancedOntologyDefinition","enhanceOntology","sanitized","importExt","externalObjects","externalInterfaces","externalSpts"],"sources":["enhanceOntology.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { WireOntologyDefinition } from \"../WireOntologyDefinition.js\";\nimport { EnhancedOntologyDefinition } from \"./EnhancedOntologyDefinition.js\";\n\nexport function enhanceOntology(\n {\n sanitized,\n importExt,\n externalObjects,\n externalInterfaces,\n externalSpts,\n }: {\n sanitized: WireOntologyDefinition;\n externalObjects?: Map<string, string>;\n externalInterfaces?: Map<string, string>;\n externalSpts?: Map<string, string>;\n importExt: string;\n },\n): EnhancedOntologyDefinition {\n return new EnhancedOntologyDefinition(\n sanitized,\n importExt,\n externalObjects,\n externalInterfaces,\n externalSpts,\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,0BAA0B,QAAQ,iCAAiC;AAE5E,OAAO,SAASC,eAAeA,CAC7B;EACEC,SAAS;EACTC,SAAS;EACTC,eAAe;EACfC,kBAAkB;EAClBC;AAOF,CAAC,EAC2B;EAC5B,OAAO,IAAIN,0BAA0B,CACnCE,SAAS,EACTC,SAAS,EACTC,eAAe,EACfC,kBAAkB,EAClBC,YACF,CAAC;AACH","ignoreList":[]}
@@ -1,17 +1,2 @@
1
- /*
2
- * Copyright 2023 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
1
  export {};
17
2
  //# sourceMappingURL=MinimalFs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MinimalFs.js","names":[],"sources":["MinimalFs.js"],"sourcesContent":["/*\n * Copyright 2023 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 */\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"file":"MinimalFs.js","names":[],"sources":["MinimalFs.ts"],"sourcesContent":["/*\n * Copyright 2023 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\nexport interface MinimalFs {\n mkdir: (path: string, options?: { recursive: boolean }) => Promise<void>;\n writeFile: WriteFileFn;\n readdir: ReaddirFn;\n}\n\nexport type WriteFileFn = (path: string, contents: string) => Promise<void>;\nexport type ReaddirFn = (path: string) => Promise<string[]>;\n"],"mappings":"","ignoreList":[]}
@@ -1,17 +1,2 @@
1
- /*
2
- * Copyright 2023 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
1
  export {};
17
2
  //# sourceMappingURL=WireOntologyDefinition.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WireOntologyDefinition.js","names":[],"sources":["WireOntologyDefinition.js"],"sourcesContent":["/*\n * Copyright 2023 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 */\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"file":"WireOntologyDefinition.js","names":[],"sources":["WireOntologyDefinition.ts"],"sourcesContent":["/*\n * Copyright 2023 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 * as gateway from \"@osdk/internal.foundry.core\";\n\nexport interface WireOntologyDefinition extends gateway.OntologyFullMetadata {\n}\n"],"mappings":"","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import * as fs from "node:fs";
17
18
  import * as path from "node:path";
18
19
  import { generateClientSdkVersionTwoPointZero } from "./v2.0/generateClientSdkVersionTwoPointZero.js";
@@ -35,6 +36,7 @@ export async function generateClientSdkPackage(packageName, packageVersion, sdkV
35
36
  });
36
37
  }
37
38
  await writeJson(minimalFs, path.join(baseOutDir, "package.json"), getPackageJsonContents(packageName, packageVersion, dependencyVersions));
39
+
38
40
  // we need to shim for the node10 resolver
39
41
  await minimalFs.mkdir(path.join(baseOutDir, "ontology"), {
40
42
  recursive: true
@@ -1 +1 @@
1
- {"version":3,"file":"generateClientSdkPackage.js","names":["fs","path","generateClientSdkVersionTwoPointZero","generateClientSdkPackage","packageName","packageVersion","sdkVersion","baseOutDir","ontology","minimalFs","dependencyVersions","cliVersion","externalObjects","Map","externalInterfaces","Error","packageType","outDir","join","promises","mkdir","recursive","writeJson","type","compilerOptions","getTsCompilerOptions","getPackageJsonContents","writeFile","commonTsconfig","importHelpers","declaration","isolatedModules","esModuleInterop","forceConsistentCasingInFileNames","strict","skipLibCheck","module","target","getExpectedDependencies","osdkApiVersion","osdkClientVersion","devDependencies","peerDependencies","getExpectedDependenciesFull","typescriptVersion","tslibVersion","areTheTypesWrongVersion","base","name","version","esmPrefix","commonjsPrefix","main","exports","import","require","scripts","prepack","check","files","filePath","body","JSON","stringify","undefined"],"sources":["generateClientSdkPackage.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { generateClientSdkVersionTwoPointZero } from \"./v2.0/generateClientSdkVersionTwoPointZero.js\";\nexport async function generateClientSdkPackage(packageName, packageVersion, sdkVersion, baseOutDir, ontology, minimalFs, dependencyVersions, cliVersion, externalObjects = new Map(), externalInterfaces = new Map()) {\n if (!packageName)\n throw new Error(\"Package name is required\");\n if (sdkVersion === \"1.1\") {\n throw new Error(\"This generator version does not support generating v1 sdks\");\n }\n for (const packageType of [\"module\", \"commonjs\"]) {\n const outDir = path.join(baseOutDir, \"dist\", packageType);\n await generateClientSdkVersionTwoPointZero(ontology, `typescript-sdk/${packageVersion} osdk-cli/${cliVersion}`, minimalFs, outDir, packageType, externalObjects, externalInterfaces);\n await fs.promises.mkdir(outDir, { recursive: true });\n await writeJson(minimalFs, path.join(outDir, \"package.json\"), { type: packageType });\n await writeJson(minimalFs, path.join(outDir, `tsconfig.json`), {\n compilerOptions: getTsCompilerOptions(packageType),\n });\n }\n await writeJson(minimalFs, path.join(baseOutDir, \"package.json\"), getPackageJsonContents(packageName, packageVersion, dependencyVersions));\n // we need to shim for the node10 resolver\n await minimalFs.mkdir(path.join(baseOutDir, \"ontology\"), {\n recursive: true,\n });\n await minimalFs.writeFile(path.join(baseOutDir, \"ontology\", \"objects.js\"), `module.exports = require(\"../../dist/module/ontology/objects\")`);\n await minimalFs.writeFile(path.join(baseOutDir, \"ontology\", \"objects.d.ts\"), `export * from \"../dist/module/ontology/objects\"`);\n}\nfunction getTsCompilerOptions(packageType) {\n const commonTsconfig = {\n importHelpers: true,\n declaration: true,\n isolatedModules: true,\n esModuleInterop: true,\n forceConsistentCasingInFileNames: true,\n strict: true,\n skipLibCheck: true,\n };\n const compilerOptions = packageType === \"commonjs\"\n ? {\n ...commonTsconfig,\n module: \"commonjs\",\n target: \"es2018\",\n }\n : {\n ...commonTsconfig,\n module: \"NodeNext\",\n target: \"ES2020\",\n };\n return compilerOptions;\n}\nexport function getExpectedDependencies({ osdkApiVersion, osdkClientVersion, }) {\n return {\n devDependencies: {\n \"@osdk/api\": osdkApiVersion,\n },\n peerDependencies: {\n \"@osdk/api\": osdkApiVersion,\n \"@osdk/client\": osdkClientVersion,\n },\n };\n}\nfunction getExpectedDependenciesFull(dependencyVersions) {\n const { typescriptVersion, tslibVersion, areTheTypesWrongVersion, } = dependencyVersions;\n const base = getExpectedDependencies(dependencyVersions);\n return {\n devDependencies: {\n ...base.devDependencies,\n \"typescript\": typescriptVersion,\n \"tslib\": tslibVersion,\n \"@arethetypeswrong/cli\": areTheTypesWrongVersion,\n },\n peerDependencies: {\n ...base.peerDependencies,\n },\n };\n}\nexport function getPackageJsonContents(name, version, dependencyVersions) {\n const esmPrefix = \"./dist/module\";\n const commonjsPrefix = \"./dist/commonjs\";\n return {\n name,\n version,\n main: `${commonjsPrefix}/index.js`,\n module: `${esmPrefix}/index.js`,\n exports: {\n \".\": {\n import: `${esmPrefix}/index.js`,\n require: `${commonjsPrefix}/index.js`,\n },\n },\n scripts: {\n prepack: `tsc -p ${esmPrefix}/tsconfig.json && tsc -p ${commonjsPrefix}/tsconfig.json`,\n check: \"npm exec attw $(npm pack)\",\n },\n ...getExpectedDependenciesFull(dependencyVersions),\n files: [\n \"**/*.js\",\n \"**/*.d.ts\",\n \"dist/**/package.json\",\n ],\n };\n}\nasync function writeJson(minimalFs, filePath, body) {\n // consola.info(`Writing ${filePath}`);\n // consola.debug(`Writing ${filePath} with body`, body);\n return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AS,CAACkB,SAAS,CAACiC,QAAQ,EAAEE,IAAI,CAACC,SAAS,CAACF,IAAI,EAAEG,SAAS,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;AAC9F","ignoreList":[]}
1
+ {"version":3,"file":"generateClientSdkPackage.js","names":["fs","path","generateClientSdkVersionTwoPointZero","generateClientSdkPackage","packageName","packageVersion","sdkVersion","baseOutDir","ontology","minimalFs","dependencyVersions","cliVersion","externalObjects","Map","externalInterfaces","Error","packageType","outDir","join","promises","mkdir","recursive","writeJson","type","compilerOptions","getTsCompilerOptions","getPackageJsonContents","writeFile","commonTsconfig","importHelpers","declaration","isolatedModules","esModuleInterop","forceConsistentCasingInFileNames","strict","skipLibCheck","module","target","getExpectedDependencies","osdkApiVersion","osdkClientVersion","devDependencies","peerDependencies","getExpectedDependenciesFull","typescriptVersion","tslibVersion","areTheTypesWrongVersion","base","name","version","esmPrefix","commonjsPrefix","main","exports","import","require","scripts","prepack","check","files","filePath","body","JSON","stringify","undefined"],"sources":["generateClientSdkPackage.ts"],"sourcesContent":["/*\n * Copyright 2024 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 * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport type { MinimalFs } from \"./MinimalFs.js\";\nimport { generateClientSdkVersionTwoPointZero } from \"./v2.0/generateClientSdkVersionTwoPointZero.js\";\nimport type { WireOntologyDefinition } from \"./WireOntologyDefinition.js\";\n\nexport async function generateClientSdkPackage(\n packageName: string,\n packageVersion: string,\n sdkVersion: \"1.1\" | \"2.0\",\n baseOutDir: string,\n ontology: WireOntologyDefinition,\n minimalFs: MinimalFs,\n dependencyVersions: DependencyVersions,\n cliVersion: string,\n externalObjects: Map<string, string> = new Map(),\n externalInterfaces: Map<string, string> = new Map(),\n): Promise<void> {\n if (!packageName) throw new Error(\"Package name is required\");\n if (sdkVersion === \"1.1\") {\n throw new Error(\n \"This generator version does not support generating v1 sdks\",\n );\n }\n\n for (const packageType of [\"module\", \"commonjs\"] as const) {\n const outDir = path.join(baseOutDir, \"dist\", packageType);\n\n await generateClientSdkVersionTwoPointZero(\n ontology,\n `typescript-sdk/${packageVersion} osdk-cli/${cliVersion}`,\n minimalFs,\n outDir,\n packageType,\n externalObjects,\n externalInterfaces,\n );\n\n await fs.promises.mkdir(outDir, { recursive: true });\n await writeJson(\n minimalFs,\n path.join(outDir, \"package.json\"),\n { type: packageType },\n );\n\n await writeJson(\n minimalFs,\n path.join(outDir, `tsconfig.json`),\n {\n compilerOptions: getTsCompilerOptions(packageType),\n },\n );\n }\n\n await writeJson(\n minimalFs,\n path.join(baseOutDir, \"package.json\"),\n getPackageJsonContents(\n packageName,\n packageVersion,\n dependencyVersions,\n ),\n );\n\n // we need to shim for the node10 resolver\n await minimalFs.mkdir(path.join(baseOutDir, \"ontology\"), {\n recursive: true,\n });\n await minimalFs.writeFile(\n path.join(baseOutDir, \"ontology\", \"objects.js\"),\n `module.exports = require(\"../../dist/module/ontology/objects\")`,\n );\n await minimalFs.writeFile(\n path.join(baseOutDir, \"ontology\", \"objects.d.ts\"),\n `export * from \"../dist/module/ontology/objects\"`,\n );\n}\n\nfunction getTsCompilerOptions(packageType: \"commonjs\" | \"module\") {\n const commonTsconfig = {\n importHelpers: true,\n\n declaration: true,\n\n isolatedModules: true,\n esModuleInterop: true,\n\n forceConsistentCasingInFileNames: true,\n strict: true,\n\n skipLibCheck: true,\n };\n\n const compilerOptions = packageType === \"commonjs\"\n ? {\n ...commonTsconfig,\n module: \"commonjs\",\n target: \"es2018\",\n }\n : {\n ...commonTsconfig,\n module: \"NodeNext\",\n target: \"ES2020\",\n };\n return compilerOptions;\n}\n\nexport interface DependencyVersions {\n typescriptVersion: string;\n tslibVersion: string;\n areTheTypesWrongVersion: string;\n osdkApiVersion: string;\n osdkClientVersion: string;\n}\n\nexport function getExpectedDependencies(\n {\n osdkApiVersion,\n osdkClientVersion,\n }: DependencyVersions,\n): {\n devDependencies: Record<string, string>;\n peerDependencies: Record<string, string>;\n} {\n return {\n devDependencies: {\n \"@osdk/api\": osdkApiVersion,\n },\n peerDependencies: {\n \"@osdk/api\": osdkApiVersion,\n \"@osdk/client\": osdkClientVersion,\n },\n };\n}\n\nfunction getExpectedDependenciesFull(\n dependencyVersions: DependencyVersions,\n) {\n const {\n typescriptVersion,\n tslibVersion,\n areTheTypesWrongVersion,\n } = dependencyVersions;\n\n const base = getExpectedDependencies(dependencyVersions);\n\n return {\n devDependencies: {\n ...base.devDependencies,\n \"typescript\": typescriptVersion,\n \"tslib\": tslibVersion,\n \"@arethetypeswrong/cli\": areTheTypesWrongVersion,\n },\n peerDependencies: {\n ...base.peerDependencies,\n },\n };\n}\n\nexport function getPackageJsonContents(\n name: string,\n version: string,\n dependencyVersions: DependencyVersions,\n): {\n files: string[];\n devDependencies: Record<string, string>;\n peerDependencies: Record<string, string>;\n name: string;\n version: string;\n main: string;\n module: string;\n exports: {\n \".\": {\n import: string;\n require: string;\n };\n };\n scripts: {\n prepack: string;\n check: string;\n };\n} {\n const esmPrefix = \"./dist/module\";\n const commonjsPrefix = \"./dist/commonjs\";\n return {\n name,\n version,\n main: `${commonjsPrefix}/index.js`,\n module: `${esmPrefix}/index.js`,\n exports: {\n \".\": {\n import: `${esmPrefix}/index.js`,\n require: `${commonjsPrefix}/index.js`,\n },\n },\n scripts: {\n prepack:\n `tsc -p ${esmPrefix}/tsconfig.json && tsc -p ${commonjsPrefix}/tsconfig.json`,\n check: \"npm exec attw $(npm pack)\",\n },\n ...getExpectedDependenciesFull(dependencyVersions),\n files: [\n \"**/*.js\",\n \"**/*.d.ts\",\n \"dist/**/package.json\",\n ],\n };\n}\n\nasync function writeJson(\n minimalFs: MinimalFs,\n filePath: string,\n body: unknown,\n) {\n // consola.info(`Writing ${filePath}`);\n // consola.debug(`Writing ${filePath} with body`, body);\n return void await minimalFs.writeFile(\n filePath,\n JSON.stringify(body, undefined, 2) + \"\\n\",\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,EAAE,MAAM,SAAS;AAC7B,OAAO,KAAKC,IAAI,MAAM,WAAW;AAEjC,SAASC,oCAAoC,QAAQ,gDAAgD;AAGrG,OAAO,eAAeC,wBAAwBA,CAC5CC,WAAmB,EACnBC,cAAsB,EACtBC,UAAyB,EACzBC,UAAkB,EAClBC,QAAgC,EAChCC,SAAoB,EACpBC,kBAAsC,EACtCC,UAAkB,EAClBC,eAAoC,GAAG,IAAIC,GAAG,CAAC,CAAC,EAChDC,kBAAuC,GAAG,IAAID,GAAG,CAAC,CAAC,EACpC;EACf,IAAI,CAACT,WAAW,EAAE,MAAM,IAAIW,KAAK,CAAC,0BAA0B,CAAC;EAC7D,IAAIT,UAAU,KAAK,KAAK,EAAE;IACxB,MAAM,IAAIS,KAAK,CACb,4DACF,CAAC;EACH;EAEA,KAAK,MAAMC,WAAW,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAW;IACzD,MAAMC,MAAM,GAAGhB,IAAI,CAACiB,IAAI,CAACX,UAAU,EAAE,MAAM,EAAES,WAAW,CAAC;IAEzD,MAAMd,oCAAoC,CACxCM,QAAQ,EACR,kBAAkBH,cAAc,aAAaM,UAAU,EAAE,EACzDF,SAAS,EACTQ,MAAM,EACND,WAAW,EACXJ,eAAe,EACfE,kBACF,CAAC;IAED,MAAMd,EAAE,CAACmB,QAAQ,CAACC,KAAK,CAACH,MAAM,EAAE;MAAEI,SAAS,EAAE;IAAK,CAAC,CAAC;IACpD,MAAMC,SAAS,CACbb,SAAS,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B;EAE1B,CAAC;AACH;AAEA,eAAerC,SAASA,CACtBb,SAAoB,EACpBmD,QAAgB,EAChBC,IAAa,EACb;EACA;EACA;EACA,OAAO,MAAK,MAAMpD,SAAS,CAACkB,SAAS,CACnCiC,QAAQ,EACRE,IAAI,CAACC,SAAS,CAACF,IAAI,EAAEG,SAAS,EAAE,CAAC,CAAC,GAAG,IACvC,CAAC;AACH","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { describe, expect, test } from "vitest";
17
18
  import { getPackageJsonContents } from "./generateClientSdkPackage.js";
18
19
  describe("generateClientSdkPackage", () => {