@osdk/generator 2.1.0-beta.3 → 2.1.0-beta.30

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 (439) hide show
  1. package/CHANGELOG.md +293 -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 +5 -3
  29. package/build/browser/generateClientSdkPackage.js.map +1 -1
  30. package/build/browser/generateClientSdkPackage.test.js +3 -2
  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 +24 -5
  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 +8 -6
  75. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js.map +1 -1
  76. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +22 -20
  77. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -1
  78. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.js +7 -3
  79. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.js.map +1 -1
  80. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js +572 -557
  81. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
  82. package/build/browser/v2.0/generateMetadata.js +4 -1
  83. package/build/browser/v2.0/generateMetadata.js.map +1 -1
  84. package/build/browser/v2.0/generatePerActionDataFiles.js +33 -10
  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 +6 -3
  89. package/build/browser/v2.0/generatePerInterfaceDataFiles.js.map +1 -1
  90. package/build/browser/v2.0/generatePerObjectDataFiles.js +2 -1
  91. package/build/browser/v2.0/generatePerObjectDataFiles.js.map +1 -1
  92. package/build/browser/v2.0/generatePerQueryDataFiles.js +6 -5
  93. package/build/browser/v2.0/generatePerQueryDataFiles.js.map +1 -1
  94. package/build/browser/v2.0/generatePerQueryDataFiles.test.js +9 -8
  95. package/build/browser/v2.0/generatePerQueryDataFiles.test.js.map +1 -1
  96. package/build/browser/v2.0/generateRootIndexTsFile.js +3 -1
  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 +23 -10
  101. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -1
  102. package/build/browser/validateWireOntologyAssumptions.js +3 -2
  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 +5 -3
  134. package/build/esm/generateClientSdkPackage.js.map +1 -1
  135. package/build/esm/generateClientSdkPackage.test.js +3 -2
  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 +24 -5
  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 +8 -6
  180. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js.map +1 -1
  181. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +22 -20
  182. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -1
  183. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.js +7 -3
  184. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.js.map +1 -1
  185. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js +572 -557
  186. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
  187. package/build/esm/v2.0/generateMetadata.js +4 -1
  188. package/build/esm/v2.0/generateMetadata.js.map +1 -1
  189. package/build/esm/v2.0/generatePerActionDataFiles.js +33 -10
  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 +6 -3
  194. package/build/esm/v2.0/generatePerInterfaceDataFiles.js.map +1 -1
  195. package/build/esm/v2.0/generatePerObjectDataFiles.js +2 -1
  196. package/build/esm/v2.0/generatePerObjectDataFiles.js.map +1 -1
  197. package/build/esm/v2.0/generatePerQueryDataFiles.js +6 -5
  198. package/build/esm/v2.0/generatePerQueryDataFiles.js.map +1 -1
  199. package/build/esm/v2.0/generatePerQueryDataFiles.test.js +9 -8
  200. package/build/esm/v2.0/generatePerQueryDataFiles.test.js.map +1 -1
  201. package/build/esm/v2.0/generateRootIndexTsFile.js +3 -1
  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 +23 -10
  206. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -1
  207. package/build/esm/validateWireOntologyAssumptions.js +3 -2
  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/types/generateClientSdkPackage.d.ts +31 -0
  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/types/util/test/TodoWireOntology.d.ts +2 -0
  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 +1 -2
  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/{esm → types}/v2.0/generatePerActionDataFiles.d.ts +1 -2
  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 +29 -13
  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 -27
  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 -13
  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 +0 -47
  286. package/build/browser/generateClientSdkPackage.d.ts.map +0 -1
  287. package/build/browser/generateClientSdkPackage.test.d.ts +0 -2
  288. package/build/browser/generateClientSdkPackage.test.d.ts.map +0 -1
  289. package/build/browser/index.d.ts +0 -5
  290. package/build/browser/index.d.ts.map +0 -1
  291. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.d.ts.map +0 -1
  292. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.d.ts +0 -2
  293. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.d.ts.map +0 -1
  294. package/build/browser/shared/getObjectImports.d.ts.map +0 -1
  295. package/build/browser/shared/getObjectTypeApiNamesFromQuery.d.ts.map +0 -1
  296. package/build/browser/shared/getObjectTypesFromQueryDataType.d.ts.map +0 -1
  297. package/build/browser/shared/propertyJsdoc.d.ts.map +0 -1
  298. package/build/browser/shared/sanitizeMetadata.d.ts +0 -2
  299. package/build/browser/shared/sanitizeMetadata.d.ts.map +0 -1
  300. package/build/browser/shared/sanitizeMetadata.test.d.ts +0 -2
  301. package/build/browser/shared/sanitizeMetadata.test.d.ts.map +0 -1
  302. package/build/browser/util/InMemoryFs.d.ts.map +0 -1
  303. package/build/browser/util/commaSeparatedIdentifiers.d.ts.map +0 -1
  304. package/build/browser/util/commaSeparatedTypeIdentifiers.d.ts.map +0 -1
  305. package/build/browser/util/deleteUndefineds.d.ts.map +0 -1
  306. package/build/browser/util/reservedKeywords.d.ts.map +0 -1
  307. package/build/browser/util/stringUnionFrom.d.ts.map +0 -1
  308. package/build/browser/util/stringify.d.ts +0 -20
  309. package/build/browser/util/stringify.d.ts.map +0 -1
  310. package/build/browser/util/test/TodoWireOntology.d.ts +0 -217
  311. package/build/browser/util/test/TodoWireOntology.d.ts.map +0 -1
  312. package/build/browser/util/test/compileThis.d.ts.map +0 -1
  313. package/build/browser/util/test/createMockMinimalFiles.d.ts +0 -13
  314. package/build/browser/util/test/createMockMinimalFiles.d.ts.map +0 -1
  315. package/build/browser/util/test/formatTs.d.ts.map +0 -1
  316. package/build/browser/util/verifyOutDir.d.ts +0 -9
  317. package/build/browser/util/verifyOutDir.d.ts.map +0 -1
  318. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts +0 -2
  319. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts.map +0 -1
  320. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts +0 -2
  321. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts.map +0 -1
  322. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.d.ts +0 -4
  323. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.d.ts.map +0 -1
  324. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts +0 -2
  325. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts.map +0 -1
  326. package/build/browser/v2.0/generateMetadata.d.ts.map +0 -1
  327. package/build/browser/v2.0/generatePerActionDataFiles.d.ts +0 -3
  328. package/build/browser/v2.0/generatePerActionDataFiles.d.ts.map +0 -1
  329. package/build/browser/v2.0/generatePerActionDataFiles.test.d.ts +0 -2
  330. package/build/browser/v2.0/generatePerActionDataFiles.test.d.ts.map +0 -1
  331. package/build/browser/v2.0/generatePerInterfaceDataFiles.d.ts +0 -2
  332. package/build/browser/v2.0/generatePerInterfaceDataFiles.d.ts.map +0 -1
  333. package/build/browser/v2.0/generatePerObjectDataFiles.d.ts +0 -3
  334. package/build/browser/v2.0/generatePerObjectDataFiles.d.ts.map +0 -1
  335. package/build/browser/v2.0/generatePerQueryDataFiles.d.ts.map +0 -1
  336. package/build/browser/v2.0/generatePerQueryDataFiles.test.d.ts +0 -2
  337. package/build/browser/v2.0/generatePerQueryDataFiles.test.d.ts.map +0 -1
  338. package/build/browser/v2.0/generateRootIndexTsFile.d.ts +0 -3
  339. package/build/browser/v2.0/generateRootIndexTsFile.d.ts.map +0 -1
  340. package/build/browser/v2.0/getDescriptionIfPresent.d.ts.map +0 -1
  341. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +0 -1
  342. package/build/browser/validateWireOntologyAssumptions.d.ts.map +0 -1
  343. package/build/esm/GenerateContext/EnhanceCommon.d.ts +0 -7
  344. package/build/esm/GenerateContext/EnhanceCommon.d.ts.map +0 -1
  345. package/build/esm/GenerateContext/EnhancedAction.d.ts +0 -14
  346. package/build/esm/GenerateContext/EnhancedAction.d.ts.map +0 -1
  347. package/build/esm/GenerateContext/EnhancedBase.d.ts +0 -21
  348. package/build/esm/GenerateContext/EnhancedBase.d.ts.map +0 -1
  349. package/build/esm/GenerateContext/EnhancedInterfaceType.d.ts +0 -13
  350. package/build/esm/GenerateContext/EnhancedInterfaceType.d.ts.map +0 -1
  351. package/build/esm/GenerateContext/EnhancedObjectType.d.ts.map +0 -1
  352. package/build/esm/GenerateContext/EnhancedOntologyDefinition.d.ts +0 -27
  353. package/build/esm/GenerateContext/EnhancedOntologyDefinition.d.ts.map +0 -1
  354. package/build/esm/GenerateContext/EnhancedQuery.d.ts +0 -14
  355. package/build/esm/GenerateContext/EnhancedQuery.d.ts.map +0 -1
  356. package/build/esm/GenerateContext/EnhancedSharedPropertyType.d.ts +0 -8
  357. package/build/esm/GenerateContext/EnhancedSharedPropertyType.d.ts.map +0 -1
  358. package/build/esm/GenerateContext/ForeignType.d.ts +0 -9
  359. package/build/esm/GenerateContext/ForeignType.d.ts.map +0 -1
  360. package/build/esm/GenerateContext/GenerateContext.d.ts +0 -13
  361. package/build/esm/GenerateContext/GenerateContext.d.ts.map +0 -1
  362. package/build/esm/GenerateContext/enhanceOntology.d.ts +0 -10
  363. package/build/esm/GenerateContext/enhanceOntology.d.ts.map +0 -1
  364. package/build/esm/MinimalFs.d.ts +0 -10
  365. package/build/esm/MinimalFs.d.ts.map +0 -1
  366. package/build/esm/WireOntologyDefinition.d.ts +0 -4
  367. package/build/esm/WireOntologyDefinition.d.ts.map +0 -1
  368. package/build/esm/generateClientSdkPackage.d.ts +0 -47
  369. package/build/esm/generateClientSdkPackage.d.ts.map +0 -1
  370. package/build/esm/generateClientSdkPackage.test.d.ts +0 -2
  371. package/build/esm/generateClientSdkPackage.test.d.ts.map +0 -1
  372. package/build/esm/index.d.ts +0 -5
  373. package/build/esm/index.d.ts.map +0 -1
  374. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.d.ts +0 -2
  375. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.d.ts.map +0 -1
  376. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.test.d.ts +0 -2
  377. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.test.d.ts.map +0 -1
  378. package/build/esm/shared/getObjectImports.d.ts +0 -4
  379. package/build/esm/shared/getObjectImports.d.ts.map +0 -1
  380. package/build/esm/shared/getObjectTypeApiNamesFromQuery.d.ts +0 -4
  381. package/build/esm/shared/getObjectTypeApiNamesFromQuery.d.ts.map +0 -1
  382. package/build/esm/shared/getObjectTypesFromQueryDataType.d.ts +0 -3
  383. package/build/esm/shared/getObjectTypesFromQueryDataType.d.ts.map +0 -1
  384. package/build/esm/shared/propertyJsdoc.d.ts +0 -6
  385. package/build/esm/shared/propertyJsdoc.d.ts.map +0 -1
  386. package/build/esm/shared/sanitizeMetadata.d.ts +0 -2
  387. package/build/esm/shared/sanitizeMetadata.d.ts.map +0 -1
  388. package/build/esm/shared/sanitizeMetadata.test.d.ts +0 -2
  389. package/build/esm/shared/sanitizeMetadata.test.d.ts.map +0 -1
  390. package/build/esm/util/InMemoryFs.d.ts +0 -7
  391. package/build/esm/util/InMemoryFs.d.ts.map +0 -1
  392. package/build/esm/util/commaSeparatedIdentifiers.d.ts +0 -2
  393. package/build/esm/util/commaSeparatedIdentifiers.d.ts.map +0 -1
  394. package/build/esm/util/commaSeparatedTypeIdentifiers.d.ts +0 -2
  395. package/build/esm/util/commaSeparatedTypeIdentifiers.d.ts.map +0 -1
  396. package/build/esm/util/deleteUndefineds.d.ts +0 -2
  397. package/build/esm/util/deleteUndefineds.d.ts.map +0 -1
  398. package/build/esm/util/reservedKeywords.d.ts +0 -2
  399. package/build/esm/util/reservedKeywords.d.ts.map +0 -1
  400. package/build/esm/util/stringUnionFrom.d.ts +0 -2
  401. package/build/esm/util/stringUnionFrom.d.ts.map +0 -1
  402. package/build/esm/util/stringify.d.ts +0 -20
  403. package/build/esm/util/stringify.d.ts.map +0 -1
  404. package/build/esm/util/test/TodoWireOntology.d.ts +0 -217
  405. package/build/esm/util/test/TodoWireOntology.d.ts.map +0 -1
  406. package/build/esm/util/test/compileThis.d.ts +0 -3
  407. package/build/esm/util/test/compileThis.d.ts.map +0 -1
  408. package/build/esm/util/test/createMockMinimalFiles.d.ts +0 -13
  409. package/build/esm/util/test/createMockMinimalFiles.d.ts.map +0 -1
  410. package/build/esm/util/test/formatTs.d.ts +0 -2
  411. package/build/esm/util/test/formatTs.d.ts.map +0 -1
  412. package/build/esm/util/verifyOutDir.d.ts +0 -9
  413. package/build/esm/util/verifyOutDir.d.ts.map +0 -1
  414. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts +0 -2
  415. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts.map +0 -1
  416. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts +0 -2
  417. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts.map +0 -1
  418. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.d.ts.map +0 -1
  419. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts +0 -2
  420. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts.map +0 -1
  421. package/build/esm/v2.0/generateMetadata.d.ts +0 -3
  422. package/build/esm/v2.0/generateMetadata.d.ts.map +0 -1
  423. package/build/esm/v2.0/generatePerActionDataFiles.d.ts.map +0 -1
  424. package/build/esm/v2.0/generatePerActionDataFiles.test.d.ts +0 -2
  425. package/build/esm/v2.0/generatePerActionDataFiles.test.d.ts.map +0 -1
  426. package/build/esm/v2.0/generatePerInterfaceDataFiles.d.ts +0 -2
  427. package/build/esm/v2.0/generatePerInterfaceDataFiles.d.ts.map +0 -1
  428. package/build/esm/v2.0/generatePerObjectDataFiles.d.ts.map +0 -1
  429. package/build/esm/v2.0/generatePerQueryDataFiles.d.ts +0 -9
  430. package/build/esm/v2.0/generatePerQueryDataFiles.d.ts.map +0 -1
  431. package/build/esm/v2.0/generatePerQueryDataFiles.test.d.ts +0 -2
  432. package/build/esm/v2.0/generatePerQueryDataFiles.test.d.ts.map +0 -1
  433. package/build/esm/v2.0/generateRootIndexTsFile.d.ts.map +0 -1
  434. package/build/esm/v2.0/getDescriptionIfPresent.d.ts +0 -2
  435. package/build/esm/v2.0/getDescriptionIfPresent.d.ts.map +0 -1
  436. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts +0 -12
  437. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +0 -1
  438. package/build/esm/validateWireOntologyAssumptions.d.ts +0 -3
  439. package/build/esm/validateWireOntologyAssumptions.d.ts.map +0 -1
@@ -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.#createRequireType(\"objectTypes\");\n requireInterfaceType = this.#createRequireType(\"interfaceTypes\");\n requireActionType = this.#createRequireType(\"actionTypes\");\n requireQueryType = this.#createRequireType(\"queryTypes\");\n requireSharedPropertyType = this.#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":"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","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,cAAc,EAClB,IAAI,CAACP,MAAM,EACXb,qBAAqB,EACrBW,kBACF,CAAC;IACD,IAAI,CAACU,mBAAmB,GAAGJ,KAAK,CAC9BT,GAAG,CAACa,mBAAmB,EACvB,IAAI,CAACR,MAAM,EACXV,0BAA0B,EAC1BS,YACF,CAAC;EACH;EAEA,CAACU,iBAAiB,GAQhBC,IAAoB,IACjB;IACH,OACEC,WAAmB,IAEgC;MACnD,MAAMC,GAAG,GAAG,IAAI,CAACF,IAAI,CAAC,CAACC,WAAW,CAAC;MACnC,IAAI,CAACC,GAAG,EAAE;QACR,MAAM,CAACC,YAAY,EAAEC,YAAY,CAAC,GAAG5B,gBAAgB,CAACyB,WAAW,CAAC;QAElE,MAAM,IAAII,KAAK,CACb,kBAAkBL,IAAI,mBAAmBC,WAAW,EACtD,CAAC;MACH;MACA,OAAOC,GAAG;IAEZ,CAAC;EACH,CAAC;EAEMI,iBAAiB,GAAgC,IAAI,CACzD,CAACP,iBAAiB,CAAC,aAAa,CAAC;EAC7BQ,oBAAoB,GAAmC,IAAI,CAC/D,CAACR,iBAAiB,CAAC,gBAAgB,CAAC;EAChCS,iBAAiB,GAAgC,IAAI,CACzD,CAACT,iBAAiB,CAAC,aAAa,CAAC;EAC7BU,gBAAgB,GAA+B,IAAI,CACvD,CAACV,iBAAiB,CAAC,YAAY,CAAC;EAC5BW,yBAAyB,GAAwC,IAAI,CACzE,CAACX,iBAAiB,CACjB,qBACF,CAAC;AACL;AAaA,SAASL,KAAKA,CACZiB,CAAoB,EACpBrB,MAAqB,EACrBsB,WAAqD,EACrDC,WAAe,EACkB;EACjC,MAAMC,OAAoC,GAAG,EAAE;EAE/C,KAAK,MAAM,CAACb,WAAW,EAAEc,CAAC,CAAC,IAAIC,MAAM,CAACF,OAAO,CAACH,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;IACtD,KAAIE,WAAW,EAAEI,GAAG,CAAChB,WAAW,CAAC,EAE1B;MACLa,OAAO,CAACI,IAAI,CAAC,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";
@@ -23,7 +24,7 @@ export async function generateClientSdkPackage(packageName, packageVersion, sdkV
23
24
  }
24
25
  for (const packageType of ["module", "commonjs"]) {
25
26
  const outDir = path.join(baseOutDir, "dist", packageType);
26
- generateClientSdkVersionTwoPointZero(ontology, `typescript-sdk/${packageVersion} osdk-cli/${cliVersion}`, minimalFs, outDir, packageType, externalObjects, externalInterfaces);
27
+ await generateClientSdkVersionTwoPointZero(ontology, `typescript-sdk/${packageVersion} osdk-cli/${cliVersion}`, minimalFs, outDir, packageType, externalObjects, externalInterfaces);
27
28
  await fs.promises.mkdir(outDir, {
28
29
  recursive: true
29
30
  });
@@ -34,7 +35,8 @@ export async function generateClientSdkPackage(packageName, packageVersion, sdkV
34
35
  compilerOptions: getTsCompilerOptions(packageType)
35
36
  });
36
37
  }
37
- await writeJson(minimalFs, path.join(baseOutDir, "package.json"), await getPackageJsonContents(packageName, packageVersion, dependencyVersions));
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
@@ -121,6 +123,6 @@ export function getPackageJsonContents(name, version, dependencyVersions) {
121
123
  async function writeJson(minimalFs, filePath, body) {
122
124
  // consola.info(`Writing ${filePath}`);
123
125
  // consola.debug(`Writing ${filePath} with body`, body);
124
- return await minimalFs.writeFile(filePath, JSON.stringify(body, undefined, 2) + "\n");
126
+ return void (await minimalFs.writeFile(filePath, JSON.stringify(body, undefined, 2) + "\n"));
125
127
  }
126
128
  //# sourceMappingURL=generateClientSdkPackage.js.map
@@ -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 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\"), await 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 await minimalFs.writeFile(filePath, JSON.stringify(body, undefined, 2) + \"\\n\");\n}\n"],"mappings":"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","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,EACTR,IAAI,CAACiB,IAAI,CAACD,MAAM,EAAE,cAAc,CAAC,EACjC;MAAEM,IAAI,EAAEP;IAAY,CACtB,CAAC;IAED,MAAMM,SAAS,CACbb,SAAS,EACTR,IAAI,CAACiB,IAAI,CAACD,MAAM,EAAE,eAAe,CAAC,EAClC;MACEO,eAAe,EAAEC,oBAAoB,CAACT,WAAW;IACnD,CACF,CAAC;EACH;EAEA,MAAMM,SAAS,CACbb,SAAS,EACTR,IAAI,CAACiB,IAAI,CAACX,UAAU,EAAE,cAAc,CAAC,EACrCmB,sBAAsB,CACpBtB,WAAW,EACXC,cAAc,EACdK,kBACF,CACF,CAAC;;EAED;EACA,MAAMD,SAAS,CAACW,KAAK,CAACnB,IAAI,CAACiB,IAAI,CAACX,UAAU,EAAE,UAAU,CAAC,EAAE;IACvDc,SAAS,EAAE;EACb,CAAC,CAAC;EACF,MAAMZ,SAAS,CAACkB,SAAS,CACvB1B,IAAI,CAACiB,IAAI,CAACX,UAAU,EAAE,UAAU,EAAE,YAAY,CAAC,EAC/C,gEACF,CAAC;EACD,MAAME,SAAS,CAACkB,SAAS,CACvB1B,IAAI,CAACiB,IAAI,CAACX,UAAU,EAAE,UAAU,EAAE,cAAc,CAAC,EACjD,iDACF,CAAC;AACH;AAEA,SAASkB,oBAAoBA,CAACT,WAAkC,EAAE;EAChE,MAAMY,cAAc,GAAG;IACrBC,aAAa,EAAE,IAAI;IAEnBC,WAAW,EAAE,IAAI;IAEjBC,eAAe,EAAE,IAAI;IACrBC,eAAe,EAAE,IAAI;IAErBC,gCAAgC,EAAE,IAAI;IACtCC,MAAM,EAAE,IAAI;IAEZC,YAAY,EAAE;EAChB,CAAC;EAED,MAAMX,eAAe,GAAGR,WAAW,KAAK,UAAU,GAC9C;IACA,GAAGY,cAAc;IACjBQ,MAAM,EAAE,UAAU;IAClBC,MAAM,EAAE;EACV,CAAC,GACC;IACA,GAAGT,cAAc;IACjBQ,MAAM,EAAE,UAAU;IAClBC,MAAM,EAAE;EACV,CAAC;EACH,OAAOb,eAAe;AACxB;AAUA,OAAO,SAASc,uBAAuBA,CACrC;EACEC,cAAc;EACdC;AACkB,CAAC,EAIrB;EACA,OAAO;IACLC,eAAe,EAAE;MACf,WAAW,EAAEF;IACf,CAAC;IACDG,gBAAgB,EAAE;MAChB,WAAW,EAAEH,cAAc;MAC3B,cAAc,EAAEC;IAClB;EACF,CAAC;AACH;AAEA,SAASG,2BAA2BA,CAClCjC,kBAAsC,EACtC;EACA,MAAM;IACJkC,iBAAiB;IACjBC,YAAY;IACZC;EACF,CAAC,GAAGpC,kBAAkB;EAEtB,MAAMqC,IAAI,GAAGT,uBAAuB,CAAC5B,kBAAkB,CAAC;EAExD,OAAO;IACL+B,eAAe,EAAE;MACf,GAAGM,IAAI,CAACN,eAAe;MACvB,YAAY,EAAEG,iBAAiB;MAC/B,OAAO,EAAEC,YAAY;MACrB,uBAAuB,EAAEC;IAC3B,CAAC;IACDJ,gBAAgB,EAAE;MAChB,GAAGK,IAAI,CAACL;IACV;EACF,CAAC;AACH;AAEA,OAAO,SAAShB,sBAAsBA,CACpCsB,IAAY,EACZC,OAAe,EACfvC,kBAAsC,EAmBtC;EACA,MAAMwC,SAAS,GAAG,eAAe;EACjC,MAAMC,cAAc,GAAG,iBAAiB;EACxC,OAAO;IACLH,IAAI;IACJC,OAAO;IACPG,IAAI,EAAE,GAAGD,cAAc,WAAW;IAClCf,MAAM,EAAE,GAAGc,SAAS,WAAW;IAC/BG,OAAO,EAAE;MACP,GAAG,EAAE;QACHC,MAAM,EAAE,GAAGJ,SAAS,WAAW;QAC/BK,OAAO,EAAE,GAAGJ,cAAc;MAC5B;IACF,CAAC;IACDK,OAAO,EAAE;MACPC,OAAO,EACL,UAAUP,SAAS,4BAA4BC,cAAc,gBAAgB;MAC/EO,KAAK,EAAE;IACT,CAAC;IACD,GAAGf,2BAA2B,CAACjC,kBAAkB,CAAC;IAClDiD,KAAK,EAAE,CACL,SAAS,EACT,WAAW,EACX,sBAAsB;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", () => {
@@ -23,7 +24,7 @@ describe("generateClientSdkPackage", () => {
23
24
  osdkClientApiVersion: "^66.6.6",
24
25
  areTheTypesWrongVersion: "^0.15.2",
25
26
  tslibVersion: "^2.6.2",
26
- typescriptVersion: "^5.4.2"
27
+ typescriptVersion: "~5.5.4"
27
28
  };
28
29
  describe("v2", () => {
29
30
  test("returns the package.json contents", async () => {
@@ -33,7 +34,7 @@ describe("generateClientSdkPackage", () => {
33
34
  "@arethetypeswrong/cli": "^0.15.2",
34
35
  "@osdk/api": "^99.9.9",
35
36
  "tslib": "^2.6.2",
36
- "typescript": "^5.4.2",
37
+ "typescript": "~5.5.4",
37
38
  },
38
39
  "exports": {
39
40
  ".": {
@@ -1 +1 @@
1
- {"version":3,"file":"generateClientSdkPackage.test.js","names":["describe","expect","test","getPackageJsonContents","versions","osdkApiVersion","osdkClientVersion","osdkClientApiVersion","areTheTypesWrongVersion","tslibVersion","typescriptVersion","toMatchInlineSnapshot"],"sources":["generateClientSdkPackage.test.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 { describe, expect, test } from \"vitest\";\nimport { getPackageJsonContents } from \"./generateClientSdkPackage.js\";\ndescribe(\"generateClientSdkPackage\", () => {\n describe(getPackageJsonContents, () => {\n const versions = {\n osdkApiVersion: \"^99.9.9\",\n osdkClientVersion: \"^88.8.8\",\n osdkClientApiVersion: \"^66.6.6\",\n areTheTypesWrongVersion: \"^0.15.2\",\n tslibVersion: \"^2.6.2\",\n typescriptVersion: \"^5.4.2\",\n };\n describe(\"v2\", () => {\n test(\"returns the package.json contents\", async () => {\n expect(getPackageJsonContents(\"foo\", \"1.2.3\", versions))\n .toMatchInlineSnapshot(`\n {\n \"devDependencies\": {\n \"@arethetypeswrong/cli\": \"^0.15.2\",\n \"@osdk/api\": \"^99.9.9\",\n \"tslib\": \"^2.6.2\",\n \"typescript\": \"^5.4.2\",\n },\n \"exports\": {\n \".\": {\n \"import\": \"./dist/module/index.js\",\n \"require\": \"./dist/commonjs/index.js\",\n },\n },\n \"files\": [\n \"**/*.js\",\n \"**/*.d.ts\",\n \"dist/**/package.json\",\n ],\n \"main\": \"./dist/commonjs/index.js\",\n \"module\": \"./dist/module/index.js\",\n \"name\": \"foo\",\n \"peerDependencies\": {\n \"@osdk/api\": \"^99.9.9\",\n \"@osdk/client\": \"^88.8.8\",\n },\n \"scripts\": {\n \"check\": \"npm exec attw $(npm pack)\",\n \"prepack\": \"tsc -p ./dist/module/tsconfig.json && tsc -p ./dist/commonjs/tsconfig.json\",\n },\n \"version\": \"1.2.3\",\n }\n `);\n });\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,IAAI,QAAQ,QAAQ;AAC/C,SAASC,sBAAsB,QAAQ,+BAA+B;AACtEH,QAAQ,CAAC,0BAA0B,EAAE,MAAM;EACvCA,QAAQ,CAACG,sBAAsB,EAAE,MAAM;IACnC,MAAMC,QAAQ,GAAG;MACbC,cAAc,EAAE,SAAS;MACzBC,iBAAiB,EAAE,SAAS;MAC5BC,oBAAoB,EAAE,SAAS;MAC/BC,uBAAuB,EAAE,SAAS;MAClCC,YAAY,EAAE,QAAQ;MACtBC,iBAAiB,EAAE;IACvB,CAAC;IACDV,QAAQ,CAAC,IAAI,EAAE,MAAM;MACjBE,IAAI,CAAC,mCAAmC,EAAE,YAAY;QAClDD,MAAM,CAACE,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAEC,QAAQ,CAAC,CAAC,CACnDO,qBAAqB,CAAC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,CAAC;MACA,CAAC,CAAC;IACN,CAAC,CAAC;EACN,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"generateClientSdkPackage.test.js","names":["describe","expect","test","getPackageJsonContents","versions","osdkApiVersion","osdkClientVersion","osdkClientApiVersion","areTheTypesWrongVersion","tslibVersion","typescriptVersion","toMatchInlineSnapshot"],"sources":["generateClientSdkPackage.test.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 { describe, expect, test } from \"vitest\";\nimport { getPackageJsonContents } from \"./generateClientSdkPackage.js\";\n\ndescribe(\"generateClientSdkPackage\", () => {\n describe(getPackageJsonContents, () => {\n const versions = {\n osdkApiVersion: \"^99.9.9\",\n osdkClientVersion: \"^88.8.8\",\n osdkClientApiVersion: \"^66.6.6\",\n areTheTypesWrongVersion: \"^0.15.2\",\n tslibVersion: \"^2.6.2\",\n typescriptVersion: \"~5.5.4\",\n } as const;\n\n describe(\"v2\", () => {\n test(\"returns the package.json contents\", async () => {\n expect(getPackageJsonContents(\"foo\", \"1.2.3\", versions))\n .toMatchInlineSnapshot(`\n {\n \"devDependencies\": {\n \"@arethetypeswrong/cli\": \"^0.15.2\",\n \"@osdk/api\": \"^99.9.9\",\n \"tslib\": \"^2.6.2\",\n \"typescript\": \"~5.5.4\",\n },\n \"exports\": {\n \".\": {\n \"import\": \"./dist/module/index.js\",\n \"require\": \"./dist/commonjs/index.js\",\n },\n },\n \"files\": [\n \"**/*.js\",\n \"**/*.d.ts\",\n \"dist/**/package.json\",\n ],\n \"main\": \"./dist/commonjs/index.js\",\n \"module\": \"./dist/module/index.js\",\n \"name\": \"foo\",\n \"peerDependencies\": {\n \"@osdk/api\": \"^99.9.9\",\n \"@osdk/client\": \"^88.8.8\",\n },\n \"scripts\": {\n \"check\": \"npm exec attw $(npm pack)\",\n \"prepack\": \"tsc -p ./dist/module/tsconfig.json && tsc -p ./dist/commonjs/tsconfig.json\",\n },\n \"version\": \"1.2.3\",\n }\n `);\n });\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,IAAI,QAAQ,QAAQ;AAC/C,SAASC,sBAAsB,QAAQ,+BAA+B;AAEtEH,QAAQ,CAAC,0BAA0B,EAAE,MAAM;EACzCA,QAAQ,CAACG,sBAAsB,EAAE,MAAM;IACrC,MAAMC,QAAQ,GAAG;MACfC,cAAc,EAAE,SAAS;MACzBC,iBAAiB,EAAE,SAAS;MAC5BC,oBAAoB,EAAE,SAAS;MAC/BC,uBAAuB,EAAE,SAAS;MAClCC,YAAY,EAAE,QAAQ;MACtBC,iBAAiB,EAAE;IACrB,CAAU;IAEVV,QAAQ,CAAC,IAAI,EAAE,MAAM;MACnBE,IAAI,CAAC,mCAAmC,EAAE,YAAY;QACpDD,MAAM,CAACE,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAEC,QAAQ,CAAC,CAAC,CACrDO,qBAAqB,CAAC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,CAAC;MACN,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","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
  export { generateClientSdkPackage as __UNSTABLE_generateClientSdkPackage, getExpectedDependencies } from "./generateClientSdkPackage.js";
17
18
  export { generateClientSdkVersionTwoPointZero } from "./v2.0/generateClientSdkVersionTwoPointZero.js";
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["generateClientSdkPackage","__UNSTABLE_generateClientSdkPackage","getExpectedDependencies","generateClientSdkVersionTwoPointZero"],"sources":["index.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 { generateClientSdkPackage as __UNSTABLE_generateClientSdkPackage, getExpectedDependencies, } from \"./generateClientSdkPackage.js\";\nexport { generateClientSdkVersionTwoPointZero } from \"./v2.0/generateClientSdkVersionTwoPointZero.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,wBAAwB,IAAIC,mCAAmC,EAAEC,uBAAuB,QAAS,+BAA+B;AACzI,SAASC,oCAAoC,QAAQ,gDAAgD","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["generateClientSdkPackage","__UNSTABLE_generateClientSdkPackage","getExpectedDependencies","generateClientSdkVersionTwoPointZero"],"sources":["index.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 {\n generateClientSdkPackage as __UNSTABLE_generateClientSdkPackage,\n getExpectedDependencies,\n} from \"./generateClientSdkPackage.js\";\nexport type { MinimalFs } from \"./MinimalFs.js\";\nexport { generateClientSdkVersionTwoPointZero } from \"./v2.0/generateClientSdkVersionTwoPointZero.js\";\nexport type { WireOntologyDefinition } from \"./WireOntologyDefinition.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,wBAAwB,IAAIC,mCAAmC,EAC/DC,uBAAuB,QAClB,+BAA+B;AAEtC,SAASC,oCAAoC,QAAQ,gDAAgD","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
  export function startsWithApiNamespace(name, ontologyApiNamespace) {
17
18
  if (ontologyApiNamespace) {
18
19
  return name.startsWith(`${ontologyApiNamespace}.`) && !name.slice(ontologyApiNamespace.length + 1).includes(".");
@@ -1 +1 @@
1
- {"version":3,"file":"startsWithApiNamespace.js","names":["startsWithApiNamespace","name","ontologyApiNamespace","startsWith","slice","length","includes"],"sources":["startsWithApiNamespace.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 function startsWithApiNamespace(name, ontologyApiNamespace) {\n if (ontologyApiNamespace) {\n return name.startsWith(`${ontologyApiNamespace}.`)\n && !name.slice(ontologyApiNamespace.length + 1).includes(\".\");\n }\n else {\n return !name.includes(\".\");\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,sBAAsBA,CAACC,IAAI,EAAEC,oBAAoB,EAAE;EAC/D,IAAIA,oBAAoB,EAAE;IACtB,OAAOD,IAAI,CAACE,UAAU,CAAC,GAAGD,oBAAoB,GAAG,CAAC,IAC3C,CAACD,IAAI,CAACG,KAAK,CAACF,oBAAoB,CAACG,MAAM,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,GAAG,CAAC;EACrE,CAAC,MACI;IACD,OAAO,CAACL,IAAI,CAACK,QAAQ,CAAC,GAAG,CAAC;EAC9B;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"startsWithApiNamespace.js","names":["startsWithApiNamespace","name","ontologyApiNamespace","startsWith","slice","length","includes"],"sources":["startsWithApiNamespace.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\nexport function startsWithApiNamespace(\n name: string,\n ontologyApiNamespace: string | undefined,\n): boolean {\n if (ontologyApiNamespace) {\n return name.startsWith(`${ontologyApiNamespace}.`)\n && !name.slice(ontologyApiNamespace.length + 1).includes(\".\");\n } else {\n return !name.includes(\".\");\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASA,sBAAsBA,CACpCC,IAAY,EACZC,oBAAwC,EAC/B;EACT,IAAIA,oBAAoB,EAAE;IACxB,OAAOD,IAAI,CAACE,UAAU,CAAC,GAAGD,oBAAoB,GAAG,CAAC,IAC7C,CAACD,IAAI,CAACG,KAAK,CAACF,oBAAoB,CAACG,MAAM,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,GAAG,CAAC;EACjE,CAAC,MAAM;IACL,OAAO,CAACL,IAAI,CAACK,QAAQ,CAAC,GAAG,CAAC;EAC5B;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 { describe, expect, it } from "vitest";
17
18
  import { startsWithApiNamespace } from "./startsWithApiNamespace.js";
18
19
  describe(startsWithApiNamespace, () => {
@@ -1 +1 @@
1
- {"version":3,"file":"startsWithApiNamespace.test.js","names":["describe","expect","it","startsWithApiNamespace","partialNamespace","fullNamespace","fullApiName","toBe","undefined","apiNameOnly"],"sources":["startsWithApiNamespace.test.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 { describe, expect, it } from \"vitest\";\nimport { startsWithApiNamespace } from \"./startsWithApiNamespace.js\";\ndescribe(startsWithApiNamespace, () => {\n describe(\"a name with periods\", () => {\n const wrongNamespace = \"incorrect.namespace\";\n const partialNamespace = \"a.b\";\n const fullNamespace = `${partialNamespace}.c`;\n const apiNameOnly = \"Foo\";\n const fullApiName = `${fullNamespace}.${apiNameOnly}`;\n it(\"returns false if only partial namespace is provided\", () => {\n expect(startsWithApiNamespace(fullApiName, partialNamespace)).toBe(false);\n });\n it(\"returns true if full namespace is provided\", () => {\n expect(startsWithApiNamespace(fullApiName, fullNamespace)).toBe(true);\n });\n it(\"returns false if a wrong namespace is provided\", () => {\n expect(startsWithApiNamespace(fullApiName, wrongNamespace)).toBe(false);\n });\n it(\"return false if no namespace is provided\", () => {\n expect(startsWithApiNamespace(fullApiName, undefined)).toBe(false);\n });\n });\n describe(\"a name without periods\", () => {\n const wrongNamespace = \"incorrect.namespace\";\n const apiNameOnly = \"Foo\";\n it(\"returns false if any namespace is provided\", () => {\n expect(startsWithApiNamespace(apiNameOnly, wrongNamespace)).toBe(false);\n });\n it(\"returns true if no namespace is provided\", () => {\n expect(startsWithApiNamespace(apiNameOnly, undefined)).toBe(true);\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AAC7C,SAASC,sBAAsB,QAAQ,6BAA6B;AACpEH,QAAQ,CAACG,sBAAsB,EAAE,MAAM;EACnCH,QAAQ,CAAC,qBAAqB,EAAE,MAAM;IAElC,MAAMI,gBAAgB,GAAG,KAAK;IAC9B,MAAMC,aAAa,GAAG,GAAGD,gBAAgB,IAAI;IAE7C,MAAME,WAAW,GAAG,GAAGD,aAAa,IADhB,KAAK,EAC4B;IACrDH,EAAE,CAAC,qDAAqD,EAAE,MAAM;MAC5DD,MAAM,CAACE,sBAAsB,CAACG,WAAW,EAAEF,gBAAgB,CAAC,CAAC,CAACG,IAAI,CAAC,KAAK,CAAC;IAC7E,CAAC,CAAC;IACFL,EAAE,CAAC,4CAA4C,EAAE,MAAM;MACnDD,MAAM,CAACE,sBAAsB,CAACG,WAAW,EAAED,aAAa,CAAC,CAAC,CAACE,IAAI,CAAC,IAAI,CAAC;IACzE,CAAC,CAAC;IACFL,EAAE,CAAC,gDAAgD,EAAE,MAAM;MACvDD,MAAM,CAACE,sBAAsB,CAACG,WAAW,EAZtB,qBAYsC,CAAC,CAAC,CAACC,IAAI,CAAC,KAAK,CAAC;IAC3E,CAAC,CAAC;IACFL,EAAE,CAAC,0CAA0C,EAAE,MAAM;MACjDD,MAAM,CAACE,sBAAsB,CAACG,WAAW,EAAEE,SAAS,CAAC,CAAC,CAACD,IAAI,CAAC,KAAK,CAAC;IACtE,CAAC,CAAC;EACN,CAAC,CAAC;EACFP,QAAQ,CAAC,wBAAwB,EAAE,MAAM;IAErC,MAAMS,WAAW,GAAG,KAAK;IACzBP,EAAE,CAAC,4CAA4C,EAAE,MAAM;MACnDD,MAAM,CAACE,sBAAsB,CAACM,WAAW,EAHtB,qBAGsC,CAAC,CAAC,CAACF,IAAI,CAAC,KAAK,CAAC;IAC3E,CAAC,CAAC;IACFL,EAAE,CAAC,0CAA0C,EAAE,MAAM;MACjDD,MAAM,CAACE,sBAAsB,CAACM,WAAW,EAAED,SAAS,CAAC,CAAC,CAACD,IAAI,CAAC,IAAI,CAAC;IACrE,CAAC,CAAC;EACN,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"startsWithApiNamespace.test.js","names":["describe","expect","it","startsWithApiNamespace","partialNamespace","fullNamespace","fullApiName","toBe","undefined","apiNameOnly"],"sources":["startsWithApiNamespace.test.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 { describe, expect, it } from \"vitest\";\nimport { startsWithApiNamespace } from \"./startsWithApiNamespace.js\";\n\ndescribe(startsWithApiNamespace, () => {\n describe(\"a name with periods\", () => {\n const wrongNamespace = \"incorrect.namespace\";\n const partialNamespace = \"a.b\";\n const fullNamespace = `${partialNamespace}.c`;\n const apiNameOnly = \"Foo\";\n const fullApiName = `${fullNamespace}.${apiNameOnly}`;\n\n it(\"returns false if only partial namespace is provided\", () => {\n expect(startsWithApiNamespace(fullApiName, partialNamespace)).toBe(\n false,\n );\n });\n\n it(\"returns true if full namespace is provided\", () => {\n expect(startsWithApiNamespace(fullApiName, fullNamespace)).toBe(true);\n });\n\n it(\"returns false if a wrong namespace is provided\", () => {\n expect(startsWithApiNamespace(fullApiName, wrongNamespace)).toBe(false);\n });\n\n it(\"return false if no namespace is provided\", () => {\n expect(startsWithApiNamespace(fullApiName, undefined)).toBe(false);\n });\n });\n\n describe(\"a name without periods\", () => {\n const wrongNamespace = \"incorrect.namespace\";\n const apiNameOnly = \"Foo\";\n\n it(\"returns false if any namespace is provided\", () => {\n expect(startsWithApiNamespace(apiNameOnly, wrongNamespace)).toBe(\n false,\n );\n });\n\n it(\"returns true if no namespace is provided\", () => {\n expect(startsWithApiNamespace(apiNameOnly, undefined)).toBe(true);\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AAC7C,SAASC,sBAAsB,QAAQ,6BAA6B;AAEpEH,QAAQ,CAACG,sBAAsB,EAAE,MAAM;EACrCH,QAAQ,CAAC,qBAAqB,EAAE,MAAM;IAEpC,MAAMI,gBAAgB,GAAG,KAAK;IAC9B,MAAMC,aAAa,GAAG,GAAGD,gBAAgB,IAAI;IAE7C,MAAME,WAAW,GAAG,GAAGD,aAAa,IADhB,KAAK,EAC4B;IAErDH,EAAE,CAAC,qDAAqD,EAAE,MAAM;MAC9DD,MAAM,CAACE,sBAAsB,CAACG,WAAW,EAAEF,gBAAgB,CAAC,CAAC,CAACG,IAAI,CAChE,KACF,CAAC;IACH,CAAC,CAAC;IAEFL,EAAE,CAAC,4CAA4C,EAAE,MAAM;MACrDD,MAAM,CAACE,sBAAsB,CAACG,WAAW,EAAED,aAAa,CAAC,CAAC,CAACE,IAAI,CAAC,IAAI,CAAC;IACvE,CAAC,CAAC;IAEFL,EAAE,CAAC,gDAAgD,EAAE,MAAM;MACzDD,MAAM,CAACE,sBAAsB,CAACG,WAAW,EAjBpB,qBAiBoC,CAAC,CAAC,CAACC,IAAI,CAAC,KAAK,CAAC;IACzE,CAAC,CAAC;IAEFL,EAAE,CAAC,0CAA0C,EAAE,MAAM;MACnDD,MAAM,CAACE,sBAAsB,CAACG,WAAW,EAAEE,SAAS,CAAC,CAAC,CAACD,IAAI,CAAC,KAAK,CAAC;IACpE,CAAC,CAAC;EACJ,CAAC,CAAC;EAEFP,QAAQ,CAAC,wBAAwB,EAAE,MAAM;IAEvC,MAAMS,WAAW,GAAG,KAAK;IAEzBP,EAAE,CAAC,4CAA4C,EAAE,MAAM;MACrDD,MAAM,CAACE,sBAAsB,CAACM,WAAW,EAJpB,qBAIoC,CAAC,CAAC,CAACF,IAAI,CAC9D,KACF,CAAC;IACH,CAAC,CAAC;IAEFL,EAAE,CAAC,0CAA0C,EAAE,MAAM;MACnDD,MAAM,CAACE,sBAAsB,CAACM,WAAW,EAAED,SAAS,CAAC,CAAC,CAACD,IAAI,CAAC,IAAI,CAAC;IACnE,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","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
  export function getObjectImports(objects, curApiName, currentFilePath, v2) {
17
18
  return Array.from(objects).filter(obj => obj.fullApiName !== curApiName).map(obj => {
18
19
  const defId = obj.getDefinitionIdentifier(v2);
@@ -1 +1 @@
1
- {"version":3,"file":"getObjectImports.js","names":["getObjectImports","objects","curApiName","currentFilePath","v2","Array","from","filter","obj","fullApiName","map","defId","getDefinitionIdentifier","importedId","getImportedDefinitionIdentifier","nameOrAlias","getImportPathRelTo","join"],"sources":["getObjectImports.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 function getObjectImports(objects, curApiName, currentFilePath, v2) {\n return Array.from(objects).filter(obj => obj.fullApiName !== curApiName)\n .map(obj => {\n const defId = obj.getDefinitionIdentifier(v2);\n const importedId = obj.getImportedDefinitionIdentifier(v2);\n const nameOrAlias = defId === importedId\n ? defId\n : `${defId} as ${importedId}`;\n return `import type { ${nameOrAlias} } from \"${obj.getImportPathRelTo(\"./\" + currentFilePath)}\";`;\n }).join(\"\\n\");\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,gBAAgBA,CAACC,OAAO,EAAEC,UAAU,EAAEC,eAAe,EAAEC,EAAE,EAAE;EACvE,OAAOC,KAAK,CAACC,IAAI,CAACL,OAAO,CAAC,CAACM,MAAM,CAACC,GAAG,IAAIA,GAAG,CAACC,WAAW,KAAKP,UAAU,CAAC,CACnEQ,GAAG,CAACF,GAAG,IAAI;IACZ,MAAMG,KAAK,GAAGH,GAAG,CAACI,uBAAuB,CAACR,EAAE,CAAC;IAC7C,MAAMS,UAAU,GAAGL,GAAG,CAACM,+BAA+B,CAACV,EAAE,CAAC;IAC1D,MAAMW,WAAW,GAAGJ,KAAK,KAAKE,UAAU,GAClCF,KAAK,GACL,GAAGA,KAAK,OAAOE,UAAU,EAAE;IACjC,OAAO,iBAAiBE,WAAW,YAAYP,GAAG,CAACQ,kBAAkB,CAAC,IAAI,GAAGb,eAAe,CAAC,IAAI;EACrG,CAAC,CAAC,CAACc,IAAI,CAAC,IAAI,CAAC;AACjB","ignoreList":[]}
1
+ {"version":3,"file":"getObjectImports.js","names":["getObjectImports","objects","curApiName","currentFilePath","v2","Array","from","filter","obj","fullApiName","map","defId","getDefinitionIdentifier","importedId","getImportedDefinitionIdentifier","nameOrAlias","getImportPathRelTo","join"],"sources":["getObjectImports.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 { EnhancedInterfaceType } from \"../GenerateContext/EnhancedInterfaceType.js\";\nimport type { EnhancedObjectType } from \"../GenerateContext/EnhancedObjectType.js\";\nimport type { ForeignType } from \"../GenerateContext/ForeignType.js\";\n\nexport function getObjectImports(\n objects: Set<EnhancedObjectType | ForeignType | EnhancedInterfaceType>,\n curApiName: string | undefined,\n currentFilePath: string,\n v2: boolean,\n): string {\n return Array.from(objects).filter(obj => obj.fullApiName !== curApiName)\n .map(obj => {\n const defId = obj.getDefinitionIdentifier(v2);\n const importedId = obj.getImportedDefinitionIdentifier(v2);\n\n const nameOrAlias = defId === importedId\n ? defId\n : `${defId} as ${importedId}`;\n\n return `import type { ${nameOrAlias} } from \"${\n obj.getImportPathRelTo(\"./\" + currentFilePath)\n }\";`;\n }).join(\"\\n\");\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA,OAAO,SAASA,gBAAgBA,CAC9BC,OAAsE,EACtEC,UAA8B,EAC9BC,eAAuB,EACvBC,EAAW,EACH;EACR,OAAOC,KAAK,CAACC,IAAI,CAACL,OAAO,CAAC,CAACM,MAAM,CAACC,GAAG,IAAIA,GAAG,CAACC,WAAW,KAAKP,UAAU,CAAC,CACrEQ,GAAG,CAACF,GAAG,IAAI;IACV,MAAMG,KAAK,GAAGH,GAAG,CAACI,uBAAuB,CAACR,EAAE,CAAC;IAC7C,MAAMS,UAAU,GAAGL,GAAG,CAACM,+BAA+B,CAACV,EAAE,CAAC;IAE1D,MAAMW,WAAW,GAAGJ,KAAK,KAAKE,UAAU,GACpCF,KAAK,GACL,GAAGA,KAAK,OAAOE,UAAU,EAAE;IAE/B,OAAO,iBAAiBE,WAAW,YACjCP,GAAG,CAACQ,kBAAkB,CAAC,IAAI,GAAGb,eAAe,CAAC,IAC5C;EACN,CAAC,CAAC,CAACc,IAAI,CAAC,IAAI,CAAC;AACjB","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 { getObjectTypesFromQueryDataType } from "./getObjectTypesFromQueryDataType.js";
17
18
  export function getObjectTypeApiNamesFromQuery(query) {
18
19
  const types = new Set();
@@ -1 +1 @@
1
- {"version":3,"file":"getObjectTypeApiNamesFromQuery.js","names":["getObjectTypesFromQueryDataType","getObjectTypeApiNamesFromQuery","query","types","Set","dataType","Object","values","parameters","output","Array","from"],"sources":["getObjectTypeApiNamesFromQuery.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 { getObjectTypesFromQueryDataType } from \"./getObjectTypesFromQueryDataType.js\";\nexport function getObjectTypeApiNamesFromQuery(query) {\n const types = new Set();\n for (const { dataType } of Object.values(query.parameters)) {\n getObjectTypesFromQueryDataType(dataType, types);\n }\n getObjectTypesFromQueryDataType(query.output, types);\n return Array.from(types);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,+BAA+B,QAAQ,sCAAsC;AACtF,OAAO,SAASC,8BAA8BA,CAACC,KAAK,EAAE;EAClD,MAAMC,KAAK,GAAG,IAAIC,GAAG,CAAC,CAAC;EACvB,KAAK,MAAM;IAAEC;EAAS,CAAC,IAAIC,MAAM,CAACC,MAAM,CAACL,KAAK,CAACM,UAAU,CAAC,EAAE;IACxDR,+BAA+B,CAACK,QAAQ,EAAEF,KAAK,CAAC;EACpD;EACAH,+BAA+B,CAACE,KAAK,CAACO,MAAM,EAAEN,KAAK,CAAC;EACpD,OAAOO,KAAK,CAACC,IAAI,CAACR,KAAK,CAAC;AAC5B","ignoreList":[]}
1
+ {"version":3,"file":"getObjectTypeApiNamesFromQuery.js","names":["getObjectTypesFromQueryDataType","getObjectTypeApiNamesFromQuery","query","types","Set","dataType","Object","values","parameters","output","Array","from"],"sources":["getObjectTypeApiNamesFromQuery.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 { QueryTypeV2 } from \"@osdk/internal.foundry.core\";\nimport type { EnhancedQuery } from \"../GenerateContext/EnhancedQuery.js\";\nimport { getObjectTypesFromQueryDataType } from \"./getObjectTypesFromQueryDataType.js\";\n\nexport function getObjectTypeApiNamesFromQuery(\n query: QueryTypeV2 | EnhancedQuery,\n): string[] {\n const types = new Set<string>();\n\n for (const { dataType } of Object.values(query.parameters)) {\n getObjectTypesFromQueryDataType(dataType, types);\n }\n getObjectTypesFromQueryDataType(query.output, types);\n\n return Array.from(types);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,+BAA+B,QAAQ,sCAAsC;AAEtF,OAAO,SAASC,8BAA8BA,CAC5CC,KAAkC,EACxB;EACV,MAAMC,KAAK,GAAG,IAAIC,GAAG,CAAS,CAAC;EAE/B,KAAK,MAAM;IAAEC;EAAS,CAAC,IAAIC,MAAM,CAACC,MAAM,CAACL,KAAK,CAACM,UAAU,CAAC,EAAE;IAC1DR,+BAA+B,CAACK,QAAQ,EAAEF,KAAK,CAAC;EAClD;EACAH,+BAA+B,CAACE,KAAK,CAACO,MAAM,EAAEN,KAAK,CAAC;EAEpD,OAAOO,KAAK,CAACC,IAAI,CAACR,KAAK,CAAC;AAC1B","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
  export function getObjectTypesFromQueryDataType(dataType, types) {
17
18
  switch (dataType.type) {
18
19
  case "array":
@@ -1 +1 @@
1
- {"version":3,"file":"getObjectTypesFromQueryDataType.js","names":["getObjectTypesFromQueryDataType","dataType","types","type","subType","add","objectTypeApiName","prop","Object","values","fields","fieldType","unionTypes","Error"],"sources":["getObjectTypesFromQueryDataType.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 function getObjectTypesFromQueryDataType(dataType, types) {\n switch (dataType.type) {\n case \"array\":\n case \"set\":\n getObjectTypesFromQueryDataType(dataType.subType, types);\n return;\n case \"object\":\n types.add(dataType.objectTypeApiName);\n return;\n case \"objectSet\":\n types.add(dataType.objectTypeApiName);\n return;\n case \"struct\":\n for (const prop of Object.values(dataType.fields)) {\n getObjectTypesFromQueryDataType(prop.fieldType, types);\n }\n return;\n case \"union\":\n for (const type of dataType.unionTypes) {\n getObjectTypesFromQueryDataType(type, types);\n }\n return;\n case \"attachment\":\n case \"boolean\":\n case \"date\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"null\":\n case \"string\":\n case \"threeDimensionalAggregation\":\n case \"timestamp\":\n case \"twoDimensionalAggregation\":\n case \"unsupported\":\n /* complete no-op */\n return;\n default:\n const _ = dataType;\n throw new Error(`Cannot find object types from unsupported QueryDataType ${dataType.type}`);\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,+BAA+BA,CAACC,QAAQ,EAAEC,KAAK,EAAE;EAC7D,QAAQD,QAAQ,CAACE,IAAI;IACjB,KAAK,OAAO;IACZ,KAAK,KAAK;MACNH,+BAA+B,CAACC,QAAQ,CAACG,OAAO,EAAEF,KAAK,CAAC;MACxD;IACJ,KAAK,QAAQ;MACTA,KAAK,CAACG,GAAG,CAACJ,QAAQ,CAACK,iBAAiB,CAAC;MACrC;IACJ,KAAK,WAAW;MACZJ,KAAK,CAACG,GAAG,CAACJ,QAAQ,CAACK,iBAAiB,CAAC;MACrC;IACJ,KAAK,QAAQ;MACT,KAAK,MAAMC,IAAI,IAAIC,MAAM,CAACC,MAAM,CAACR,QAAQ,CAACS,MAAM,CAAC,EAAE;QAC/CV,+BAA+B,CAACO,IAAI,CAACI,SAAS,EAAET,KAAK,CAAC;MAC1D;MACA;IACJ,KAAK,OAAO;MACR,KAAK,MAAMC,IAAI,IAAIF,QAAQ,CAACW,UAAU,EAAE;QACpCZ,+BAA+B,CAACG,IAAI,EAAED,KAAK,CAAC;MAChD;MACA;IACJ,KAAK,YAAY;IACjB,KAAK,SAAS;IACd,KAAK,MAAM;IACX,KAAK,QAAQ;IACb,KAAK,OAAO;IACZ,KAAK,SAAS;IACd,KAAK,MAAM;IACX,KAAK,MAAM;IACX,KAAK,QAAQ;IACb,KAAK,6BAA6B;IAClC,KAAK,WAAW;IAChB,KAAK,2BAA2B;IAChC,KAAK,aAAa;MACd;MACA;IACJ;MAEI,MAAM,IAAIW,KAAK,CAAC,2DAA2DZ,QAAQ,CAACE,IAAI,EAAE,CAAC;EACnG;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"getObjectTypesFromQueryDataType.js","names":["getObjectTypesFromQueryDataType","dataType","types","type","subType","add","objectTypeApiName","prop","Object","values","fields","fieldType","unionTypes","Error"],"sources":["getObjectTypesFromQueryDataType.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 } from \"@osdk/internal.foundry.core\";\n\nexport function getObjectTypesFromQueryDataType(\n dataType: QueryDataType,\n types: Set<string>,\n): void {\n switch (dataType.type) {\n case \"array\":\n case \"set\":\n getObjectTypesFromQueryDataType(dataType.subType, types);\n return;\n\n case \"object\":\n types.add(dataType.objectTypeApiName);\n return;\n\n case \"objectSet\":\n types.add(dataType.objectTypeApiName!);\n return;\n\n case \"struct\":\n for (const prop of Object.values(dataType.fields)) {\n getObjectTypesFromQueryDataType(prop.fieldType, types);\n }\n return;\n\n case \"union\":\n for (const type of dataType.unionTypes) {\n getObjectTypesFromQueryDataType(type, types);\n }\n return;\n\n case \"attachment\":\n case \"boolean\":\n case \"date\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"null\":\n case \"string\":\n case \"threeDimensionalAggregation\":\n case \"timestamp\":\n case \"twoDimensionalAggregation\":\n case \"unsupported\":\n /* complete no-op */\n return;\n\n default:\n const _: never = dataType;\n throw new Error(\n `Cannot find object types from unsupported QueryDataType ${\n (dataType as any).type\n }`,\n );\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAO,SAASA,+BAA+BA,CAC7CC,QAAuB,EACvBC,KAAkB,EACZ;EACN,QAAQD,QAAQ,CAACE,IAAI;IACnB,KAAK,OAAO;IACZ,KAAK,KAAK;MACRH,+BAA+B,CAACC,QAAQ,CAACG,OAAO,EAAEF,KAAK,CAAC;MACxD;IAEF,KAAK,QAAQ;MACXA,KAAK,CAACG,GAAG,CAACJ,QAAQ,CAACK,iBAAiB,CAAC;MACrC;IAEF,KAAK,WAAW;MACdJ,KAAK,CAACG,GAAG,CAACJ,QAAQ,CAACK,iBAAkB,CAAC;MACtC;IAEF,KAAK,QAAQ;MACX,KAAK,MAAMC,IAAI,IAAIC,MAAM,CAACC,MAAM,CAACR,QAAQ,CAACS,MAAM,CAAC,EAAE;QACjDV,+BAA+B,CAACO,IAAI,CAACI,SAAS,EAAET,KAAK,CAAC;MACxD;MACA;IAEF,KAAK,OAAO;MACV,KAAK,MAAMC,IAAI,IAAIF,QAAQ,CAACW,UAAU,EAAE;QACtCZ,+BAA+B,CAACG,IAAI,EAAED,KAAK,CAAC;MAC9C;MACA;IAEF,KAAK,YAAY;IACjB,KAAK,SAAS;IACd,KAAK,MAAM;IACX,KAAK,QAAQ;IACb,KAAK,OAAO;IACZ,KAAK,SAAS;IACd,KAAK,MAAM;IACX,KAAK,MAAM;IACX,KAAK,QAAQ;IACb,KAAK,6BAA6B;IAClC,KAAK,WAAW;IAChB,KAAK,2BAA2B;IAChC,KAAK,aAAa;MAChB;MACA;IAEF;MAEE,MAAM,IAAIW,KAAK,CACb,2DACGZ,QAAQ,CAASE,IAAI,EAE1B,CAAC;EACL;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
  export function propertyJsdoc(property, {
17
18
  isInherited,
18
19
  apiName
@@ -1 +1 @@
1
- {"version":3,"file":"propertyJsdoc.js","names":["propertyJsdoc","property","isInherited","apiName","ret","renderDisplayName","displayName","description"],"sources":["propertyJsdoc.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 function propertyJsdoc(property, { isInherited, apiName }) {\n let ret = `/**\\n`;\n const renderDisplayName = property.displayName\n && property.displayName !== apiName;\n if (isInherited || renderDisplayName || property.description) {\n if (isInherited) {\n ret += ` * (inherited from parent)\\n`;\n }\n if (renderDisplayName) {\n ret += ` * display name: '${property.displayName}'${property.description ? \",\" : \"\"}\\n`;\n }\n if (property.description) {\n ret += ` * description: ${property.description}\\n`;\n }\n }\n else {\n ret += ` * (no ontology metadata)\\n`;\n }\n ret += ` */\\n`;\n return ret;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,aAAaA,CAACC,QAAQ,EAAE;EAAEC,WAAW;EAAEC;AAAQ,CAAC,EAAE;EAC9D,IAAIC,GAAG,GAAG,OAAO;EACjB,MAAMC,iBAAiB,GAAGJ,QAAQ,CAACK,WAAW,IACvCL,QAAQ,CAACK,WAAW,KAAKH,OAAO;EACvC,IAAID,WAAW,IAAIG,iBAAiB,IAAIJ,QAAQ,CAACM,WAAW,EAAE;IAC1D,IAAIL,WAAW,EAAE;MACbE,GAAG,IAAI,8BAA8B;IACzC;IACA,IAAIC,iBAAiB,EAAE;MACnBD,GAAG,IAAI,uBAAuBH,QAAQ,CAACK,WAAW,IAAIL,QAAQ,CAACM,WAAW,GAAG,GAAG,GAAG,EAAE,IAAI;IAC7F;IACA,IAAIN,QAAQ,CAACM,WAAW,EAAE;MACtBH,GAAG,IAAI,qBAAqBH,QAAQ,CAACM,WAAW,IAAI;IACxD;EACJ,CAAC,MACI;IACDH,GAAG,IAAI,6BAA6B;EACxC;EACAA,GAAG,IAAI,OAAO;EACd,OAAOA,GAAG;AACd","ignoreList":[]}
1
+ {"version":3,"file":"propertyJsdoc.js","names":["propertyJsdoc","property","isInherited","apiName","ret","renderDisplayName","displayName","description"],"sources":["propertyJsdoc.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\";\n\nexport function propertyJsdoc(\n property: ObjectMetadata.Property,\n { isInherited, apiName }: { isInherited?: boolean; apiName: string },\n): string {\n let ret = `/**\\n`;\n const renderDisplayName = property.displayName\n && property.displayName !== apiName;\n if (isInherited || renderDisplayName || property.description) {\n if (isInherited) {\n ret += ` * (inherited from parent)\\n`;\n }\n\n if (renderDisplayName) {\n ret += ` * display name: '${property.displayName}'${\n property.description ? \",\" : \"\"\n }\\n`;\n }\n\n if (property.description) {\n ret += ` * description: ${property.description}\\n`;\n }\n } else {\n ret += ` * (no ontology metadata)\\n`;\n }\n\n ret += ` */\\n`;\n return ret;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAO,SAASA,aAAaA,CAC3BC,QAAiC,EACjC;EAAEC,WAAW;EAAEC;AAAoD,CAAC,EAC5D;EACR,IAAIC,GAAG,GAAG,OAAO;EACjB,MAAMC,iBAAiB,GAAGJ,QAAQ,CAACK,WAAW,IACzCL,QAAQ,CAACK,WAAW,KAAKH,OAAO;EACrC,IAAID,WAAW,IAAIG,iBAAiB,IAAIJ,QAAQ,CAACM,WAAW,EAAE;IAC5D,IAAIL,WAAW,EAAE;MACfE,GAAG,IAAI,8BAA8B;IACvC;IAEA,IAAIC,iBAAiB,EAAE;MACrBD,GAAG,IAAI,uBAAuBH,QAAQ,CAACK,WAAW,IAChDL,QAAQ,CAACM,WAAW,GAAG,GAAG,GAAG,EAAE,IAC7B;IACN;IAEA,IAAIN,QAAQ,CAACM,WAAW,EAAE;MACxBH,GAAG,IAAI,qBAAqBH,QAAQ,CAACM,WAAW,IAAI;IACtD;EACF,CAAC,MAAM;IACLH,GAAG,IAAI,6BAA6B;EACtC;EAEAA,GAAG,IAAI,OAAO;EACd,OAAOA,GAAG;AACZ","ignoreList":[]}