@osdk/generator 2.0.0-beta.9 → 2.0.1

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 (328) hide show
  1. package/CHANGELOG.md +207 -0
  2. package/build/{cjs/GenerateContext/EnhanceCommon.d.cts → browser/GenerateContext/EnhanceCommon.d.ts} +1 -1
  3. package/build/browser/GenerateContext/EnhanceCommon.js +17 -0
  4. package/build/browser/GenerateContext/EnhanceCommon.js.map +1 -0
  5. package/build/{cjs/GenerateContext/EnhancedAction.d.cts → browser/GenerateContext/EnhancedAction.d.ts} +2 -2
  6. package/build/browser/GenerateContext/EnhancedAction.js +42 -0
  7. package/build/browser/GenerateContext/EnhancedAction.js.map +1 -0
  8. package/build/{cjs/GenerateContext/EnhancedBase.d.cts → browser/GenerateContext/EnhancedBase.d.ts} +1 -1
  9. package/build/{cjs → browser}/GenerateContext/EnhancedBase.d.ts.map +1 -1
  10. package/build/browser/GenerateContext/EnhancedBase.js +72 -0
  11. package/build/browser/GenerateContext/EnhancedBase.js.map +1 -0
  12. package/build/{cjs/GenerateContext/EnhancedInterfaceType.d.cts → browser/GenerateContext/EnhancedInterfaceType.d.ts} +4 -4
  13. package/build/{cjs → browser}/GenerateContext/EnhancedInterfaceType.d.ts.map +1 -1
  14. package/build/browser/GenerateContext/EnhancedInterfaceType.js +38 -0
  15. package/build/browser/GenerateContext/EnhancedInterfaceType.js.map +1 -0
  16. package/build/{cjs/GenerateContext/EnhancedObjectType.d.cts → browser/GenerateContext/EnhancedObjectType.d.ts} +4 -4
  17. package/build/browser/GenerateContext/EnhancedObjectType.d.ts.map +1 -0
  18. package/build/browser/GenerateContext/EnhancedObjectType.js +35 -0
  19. package/build/browser/GenerateContext/EnhancedObjectType.js.map +1 -0
  20. package/build/{cjs/GenerateContext/EnhancedOntologyDefinition.d.cts → browser/GenerateContext/EnhancedOntologyDefinition.d.ts} +8 -8
  21. package/build/browser/GenerateContext/EnhancedOntologyDefinition.js +77 -0
  22. package/build/browser/GenerateContext/EnhancedOntologyDefinition.js.map +1 -0
  23. package/build/{cjs/GenerateContext/EnhancedQuery.d.cts → browser/GenerateContext/EnhancedQuery.d.ts} +2 -2
  24. package/build/browser/GenerateContext/EnhancedQuery.js +42 -0
  25. package/build/browser/GenerateContext/EnhancedQuery.js.map +1 -0
  26. package/build/{cjs/GenerateContext/EnhancedSharedPropertyType.d.cts → browser/GenerateContext/EnhancedSharedPropertyType.d.ts} +2 -2
  27. package/build/browser/GenerateContext/EnhancedSharedPropertyType.js +24 -0
  28. package/build/browser/GenerateContext/EnhancedSharedPropertyType.js.map +1 -0
  29. package/build/{cjs/GenerateContext/ForeignType.d.cts → browser/GenerateContext/ForeignType.d.ts} +2 -2
  30. package/build/browser/GenerateContext/ForeignType.js +36 -0
  31. package/build/browser/GenerateContext/ForeignType.js.map +1 -0
  32. package/build/{cjs/GenerateContext/GenerateContext.d.cts → browser/GenerateContext/GenerateContext.d.ts} +3 -3
  33. package/build/browser/GenerateContext/GenerateContext.js +17 -0
  34. package/build/browser/GenerateContext/GenerateContext.js.map +1 -0
  35. package/build/{cjs/GenerateContext/enhanceOntology.d.cts → browser/GenerateContext/enhanceOntology.d.ts} +2 -2
  36. package/build/browser/GenerateContext/enhanceOntology.js +20 -0
  37. package/build/browser/GenerateContext/enhanceOntology.js.map +1 -0
  38. package/build/browser/MinimalFs.js +17 -0
  39. package/build/browser/MinimalFs.js.map +1 -0
  40. package/build/browser/WireOntologyDefinition.js +17 -0
  41. package/build/browser/WireOntologyDefinition.js.map +1 -0
  42. package/build/{cjs/generateClientSdkPackage.d.cts → browser/generateClientSdkPackage.d.ts} +3 -8
  43. package/build/{cjs → browser}/generateClientSdkPackage.d.ts.map +1 -1
  44. package/build/browser/generateClientSdkPackage.js +126 -0
  45. package/build/browser/generateClientSdkPackage.js.map +1 -0
  46. package/build/browser/generateClientSdkPackage.test.js +67 -0
  47. package/build/browser/generateClientSdkPackage.test.js.map +1 -0
  48. package/build/{cjs/index.d.cts → browser/index.d.ts} +4 -4
  49. package/build/browser/index.js +17 -1559
  50. package/build/browser/index.js.map +1 -1
  51. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.js +23 -0
  52. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.js.map +1 -0
  53. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.js +46 -0
  54. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.js.map +1 -0
  55. package/build/{cjs/shared/getObjectImports.d.cts → browser/shared/getObjectImports.d.ts} +2 -2
  56. package/build/browser/shared/getObjectImports.js +24 -0
  57. package/build/browser/shared/getObjectImports.js.map +1 -0
  58. package/build/{cjs/shared/getObjectTypeApiNamesFromQuery.d.cts → browser/shared/getObjectTypeApiNamesFromQuery.d.ts} +1 -1
  59. package/build/browser/shared/getObjectTypeApiNamesFromQuery.js +27 -0
  60. package/build/browser/shared/getObjectTypeApiNamesFromQuery.js.map +1 -0
  61. package/build/browser/shared/getObjectTypesFromQueryDataType.js +57 -0
  62. package/build/browser/shared/getObjectTypesFromQueryDataType.js.map +1 -0
  63. package/build/browser/shared/propertyJsdoc.d.ts +6 -0
  64. package/build/browser/shared/propertyJsdoc.d.ts.map +1 -0
  65. package/build/browser/shared/propertyJsdoc.js +38 -0
  66. package/build/browser/shared/propertyJsdoc.js.map +1 -0
  67. package/build/browser/shared/sanitizeMetadata.js +33 -0
  68. package/build/browser/shared/sanitizeMetadata.js.map +1 -0
  69. package/build/browser/shared/sanitizeMetadata.test.js +44 -0
  70. package/build/browser/shared/sanitizeMetadata.test.js.map +1 -0
  71. package/build/{cjs/util/InMemoryFs.d.cts → browser/util/InMemoryFs.d.ts} +1 -1
  72. package/build/browser/util/InMemoryFs.js +30 -0
  73. package/build/browser/util/InMemoryFs.js.map +1 -0
  74. package/build/browser/util/commaSeparatedIdentifiers.js +25 -0
  75. package/build/browser/util/commaSeparatedIdentifiers.js.map +1 -0
  76. package/build/browser/util/commaSeparatedTypeIdentifiers.js +19 -0
  77. package/build/browser/util/commaSeparatedTypeIdentifiers.js.map +1 -0
  78. package/build/browser/util/deleteUndefineds.js +19 -0
  79. package/build/browser/util/deleteUndefineds.js.map +1 -0
  80. package/build/browser/util/reservedKeywords.js +21 -0
  81. package/build/browser/util/reservedKeywords.js.map +1 -0
  82. package/build/browser/util/stringUnionFrom.js +23 -0
  83. package/build/browser/util/stringUnionFrom.js.map +1 -0
  84. package/build/browser/util/stringify.js +36 -0
  85. package/build/browser/util/stringify.js.map +1 -0
  86. package/build/browser/util/test/TodoWireOntology.js +232 -0
  87. package/build/browser/util/test/TodoWireOntology.js.map +1 -0
  88. package/build/browser/util/test/compileThis.js +41 -0
  89. package/build/browser/util/test/compileThis.js.map +1 -0
  90. package/build/{cjs/util/test/createMockMinimalFiles.d.cts → browser/util/test/createMockMinimalFiles.d.ts} +1 -1
  91. package/build/browser/util/test/createMockMinimalFiles.js +37 -0
  92. package/build/browser/util/test/createMockMinimalFiles.js.map +1 -0
  93. package/build/browser/util/test/formatTs.js +32 -0
  94. package/build/browser/util/test/formatTs.js.map +1 -0
  95. package/build/{cjs/util/verifyOutDir.d.cts → browser/util/verifyOutDir.d.ts} +1 -1
  96. package/build/browser/util/verifyOutDir.js +35 -0
  97. package/build/browser/util/verifyOutDir.js.map +1 -0
  98. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js +114 -0
  99. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js.map +1 -0
  100. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +273 -0
  101. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -0
  102. package/build/{cjs/v2.0/generateClientSdkVersionTwoPointZero.d.cts → browser/v2.0/generateClientSdkVersionTwoPointZero.d.ts} +2 -2
  103. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.js +119 -0
  104. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.js.map +1 -0
  105. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js +1939 -0
  106. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -0
  107. package/build/{cjs/v2.0/generateMetadata.d.cts → browser/v2.0/generateMetadata.d.ts} +1 -1
  108. package/build/browser/v2.0/generateMetadata.js +35 -0
  109. package/build/browser/v2.0/generateMetadata.js.map +1 -0
  110. package/build/{cjs/v2.0/generatePerActionDataFiles.d.cts → browser/v2.0/generatePerActionDataFiles.d.ts} +1 -1
  111. package/build/{cjs → browser}/v2.0/generatePerActionDataFiles.d.ts.map +1 -1
  112. package/build/browser/v2.0/generatePerActionDataFiles.js +240 -0
  113. package/build/browser/v2.0/generatePerActionDataFiles.js.map +1 -0
  114. package/build/browser/v2.0/generatePerActionDataFiles.test.js +51 -0
  115. package/build/browser/v2.0/generatePerActionDataFiles.test.js.map +1 -0
  116. package/build/{cjs/v2.0/generatePerQueryDataFiles.d.cts → browser/v2.0/generatePerQueryDataFiles.d.ts} +3 -3
  117. package/build/{cjs → browser}/v2.0/generatePerQueryDataFiles.d.ts.map +1 -1
  118. package/build/browser/v2.0/generatePerQueryDataFiles.js +192 -0
  119. package/build/browser/v2.0/generatePerQueryDataFiles.js.map +1 -0
  120. package/build/browser/v2.0/generatePerQueryDataFiles.test.js +195 -0
  121. package/build/browser/v2.0/generatePerQueryDataFiles.test.js.map +1 -0
  122. package/build/browser/v2.0/getDescriptionIfPresent.js +24 -0
  123. package/build/browser/v2.0/getDescriptionIfPresent.js.map +1 -0
  124. package/build/{cjs/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.cts → browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts} +3 -3
  125. package/build/{cjs → browser}/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +1 -1
  126. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js +205 -0
  127. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -0
  128. package/build/{cjs/validateWireOntologyAssumptions.d.cts → browser/validateWireOntologyAssumptions.d.ts} +1 -1
  129. package/build/browser/validateWireOntologyAssumptions.js +33 -0
  130. package/build/browser/validateWireOntologyAssumptions.js.map +1 -0
  131. package/build/esm/GenerateContext/EnhanceCommon.js +17 -0
  132. package/build/esm/GenerateContext/EnhanceCommon.js.map +1 -0
  133. package/build/esm/GenerateContext/EnhancedAction.js +42 -0
  134. package/build/esm/GenerateContext/EnhancedAction.js.map +1 -0
  135. package/build/esm/GenerateContext/EnhancedBase.d.ts.map +1 -1
  136. package/build/esm/GenerateContext/EnhancedBase.js +72 -0
  137. package/build/esm/GenerateContext/EnhancedBase.js.map +1 -0
  138. package/build/esm/GenerateContext/EnhancedInterfaceType.d.ts +2 -2
  139. package/build/esm/GenerateContext/EnhancedInterfaceType.d.ts.map +1 -1
  140. package/build/esm/GenerateContext/EnhancedInterfaceType.js +38 -0
  141. package/build/esm/GenerateContext/EnhancedInterfaceType.js.map +1 -0
  142. package/build/esm/GenerateContext/EnhancedObjectType.d.ts +2 -2
  143. package/build/esm/GenerateContext/EnhancedObjectType.d.ts.map +1 -1
  144. package/build/esm/GenerateContext/EnhancedObjectType.js +35 -0
  145. package/build/esm/GenerateContext/EnhancedObjectType.js.map +1 -0
  146. package/build/esm/GenerateContext/EnhancedOntologyDefinition.js +77 -0
  147. package/build/esm/GenerateContext/EnhancedOntologyDefinition.js.map +1 -0
  148. package/build/esm/GenerateContext/EnhancedQuery.js +42 -0
  149. package/build/esm/GenerateContext/EnhancedQuery.js.map +1 -0
  150. package/build/esm/GenerateContext/EnhancedSharedPropertyType.js +24 -0
  151. package/build/esm/GenerateContext/EnhancedSharedPropertyType.js.map +1 -0
  152. package/build/esm/GenerateContext/ForeignType.js +36 -0
  153. package/build/esm/GenerateContext/ForeignType.js.map +1 -0
  154. package/build/esm/GenerateContext/GenerateContext.js +17 -0
  155. package/build/esm/GenerateContext/GenerateContext.js.map +1 -0
  156. package/build/esm/GenerateContext/enhanceOntology.js +20 -0
  157. package/build/esm/GenerateContext/enhanceOntology.js.map +1 -0
  158. package/build/esm/MinimalFs.js +17 -0
  159. package/build/esm/MinimalFs.js.map +1 -0
  160. package/build/esm/WireOntologyDefinition.js +17 -0
  161. package/build/esm/WireOntologyDefinition.js.map +1 -0
  162. package/build/esm/generateClientSdkPackage.d.ts +1 -6
  163. package/build/esm/generateClientSdkPackage.d.ts.map +1 -1
  164. package/build/esm/generateClientSdkPackage.js +126 -0
  165. package/build/esm/generateClientSdkPackage.js.map +1 -0
  166. package/build/esm/generateClientSdkPackage.test.js +67 -0
  167. package/build/esm/generateClientSdkPackage.test.js.map +1 -0
  168. package/build/esm/index.js +17 -1559
  169. package/build/esm/index.js.map +1 -1
  170. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.js +23 -0
  171. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.js.map +1 -0
  172. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.test.js +46 -0
  173. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.test.js.map +1 -0
  174. package/build/esm/shared/getObjectImports.js +24 -0
  175. package/build/esm/shared/getObjectImports.js.map +1 -0
  176. package/build/esm/shared/getObjectTypeApiNamesFromQuery.js +27 -0
  177. package/build/esm/shared/getObjectTypeApiNamesFromQuery.js.map +1 -0
  178. package/build/esm/shared/getObjectTypesFromQueryDataType.js +57 -0
  179. package/build/esm/shared/getObjectTypesFromQueryDataType.js.map +1 -0
  180. package/build/esm/shared/propertyJsdoc.d.ts +2 -2
  181. package/build/esm/shared/propertyJsdoc.d.ts.map +1 -1
  182. package/build/esm/shared/propertyJsdoc.js +38 -0
  183. package/build/esm/shared/propertyJsdoc.js.map +1 -0
  184. package/build/esm/shared/sanitizeMetadata.js +33 -0
  185. package/build/esm/shared/sanitizeMetadata.js.map +1 -0
  186. package/build/esm/shared/sanitizeMetadata.test.js +44 -0
  187. package/build/esm/shared/sanitizeMetadata.test.js.map +1 -0
  188. package/build/esm/util/InMemoryFs.js +30 -0
  189. package/build/esm/util/InMemoryFs.js.map +1 -0
  190. package/build/esm/util/commaSeparatedIdentifiers.js +25 -0
  191. package/build/esm/util/commaSeparatedIdentifiers.js.map +1 -0
  192. package/build/esm/util/commaSeparatedTypeIdentifiers.js +19 -0
  193. package/build/esm/util/commaSeparatedTypeIdentifiers.js.map +1 -0
  194. package/build/esm/util/deleteUndefineds.js +19 -0
  195. package/build/esm/util/deleteUndefineds.js.map +1 -0
  196. package/build/esm/util/reservedKeywords.js +21 -0
  197. package/build/esm/util/reservedKeywords.js.map +1 -0
  198. package/build/esm/util/stringUnionFrom.js +23 -0
  199. package/build/esm/util/stringUnionFrom.js.map +1 -0
  200. package/build/esm/util/stringify.js +36 -0
  201. package/build/esm/util/stringify.js.map +1 -0
  202. package/build/esm/util/test/TodoWireOntology.js +232 -0
  203. package/build/esm/util/test/TodoWireOntology.js.map +1 -0
  204. package/build/esm/util/test/compileThis.js +41 -0
  205. package/build/esm/util/test/compileThis.js.map +1 -0
  206. package/build/esm/util/test/createMockMinimalFiles.js +37 -0
  207. package/build/esm/util/test/createMockMinimalFiles.js.map +1 -0
  208. package/build/esm/util/test/formatTs.js +32 -0
  209. package/build/esm/util/test/formatTs.js.map +1 -0
  210. package/build/esm/util/verifyOutDir.js +35 -0
  211. package/build/esm/util/verifyOutDir.js.map +1 -0
  212. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js +114 -0
  213. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js.map +1 -0
  214. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +273 -0
  215. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -0
  216. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.js +119 -0
  217. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.js.map +1 -0
  218. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js +1939 -0
  219. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -0
  220. package/build/esm/v2.0/generateMetadata.js +35 -0
  221. package/build/esm/v2.0/generateMetadata.js.map +1 -0
  222. package/build/esm/v2.0/generatePerActionDataFiles.d.ts.map +1 -1
  223. package/build/esm/v2.0/generatePerActionDataFiles.js +240 -0
  224. package/build/esm/v2.0/generatePerActionDataFiles.js.map +1 -0
  225. package/build/esm/v2.0/generatePerActionDataFiles.test.js +51 -0
  226. package/build/esm/v2.0/generatePerActionDataFiles.test.js.map +1 -0
  227. package/build/esm/v2.0/generatePerQueryDataFiles.d.ts +1 -1
  228. package/build/esm/v2.0/generatePerQueryDataFiles.d.ts.map +1 -1
  229. package/build/esm/v2.0/generatePerQueryDataFiles.js +192 -0
  230. package/build/esm/v2.0/generatePerQueryDataFiles.js.map +1 -0
  231. package/build/esm/v2.0/generatePerQueryDataFiles.test.js +195 -0
  232. package/build/esm/v2.0/generatePerQueryDataFiles.test.js.map +1 -0
  233. package/build/esm/v2.0/getDescriptionIfPresent.js +24 -0
  234. package/build/esm/v2.0/getDescriptionIfPresent.js.map +1 -0
  235. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +1 -1
  236. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js +205 -0
  237. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -0
  238. package/build/esm/validateWireOntologyAssumptions.js +33 -0
  239. package/build/esm/validateWireOntologyAssumptions.js.map +1 -0
  240. package/package.json +9 -14
  241. package/build/cjs/GenerateContext/EnhancedObjectType.d.ts.map +0 -1
  242. package/build/cjs/index.cjs +0 -1588
  243. package/build/cjs/index.cjs.map +0 -1
  244. package/build/cjs/shared/getEditedEntities.d.cts +0 -7
  245. package/build/cjs/shared/getEditedEntities.d.ts.map +0 -1
  246. package/build/cjs/shared/isNullableQueryDataType.d.cts +0 -3
  247. package/build/cjs/shared/isNullableQueryDataType.d.ts.map +0 -1
  248. package/build/cjs/shared/propertyJsdoc.d.cts +0 -6
  249. package/build/cjs/shared/propertyJsdoc.d.ts.map +0 -1
  250. package/build/cjs/shared/wireActionTypeV2ToSdkActionDefinition.d.cts +0 -4
  251. package/build/cjs/shared/wireActionTypeV2ToSdkActionDefinition.d.ts.map +0 -1
  252. package/build/cjs/shared/wireQueryDataTypeToQueryDataTypeDefinition.d.cts +0 -4
  253. package/build/cjs/shared/wireQueryDataTypeToQueryDataTypeDefinition.d.ts.map +0 -1
  254. package/build/cjs/shared/wireQueryTypeV2ToSdkQueryDefinition.d.cts +0 -12
  255. package/build/cjs/shared/wireQueryTypeV2ToSdkQueryDefinition.d.ts.map +0 -1
  256. package/build/esm/shared/getEditedEntities.d.ts +0 -7
  257. package/build/esm/shared/getEditedEntities.d.ts.map +0 -1
  258. package/build/esm/shared/isNullableQueryDataType.d.ts +0 -3
  259. package/build/esm/shared/isNullableQueryDataType.d.ts.map +0 -1
  260. package/build/esm/shared/wireActionTypeV2ToSdkActionDefinition.d.ts +0 -4
  261. package/build/esm/shared/wireActionTypeV2ToSdkActionDefinition.d.ts.map +0 -1
  262. package/build/esm/shared/wireQueryDataTypeToQueryDataTypeDefinition.d.ts +0 -4
  263. package/build/esm/shared/wireQueryDataTypeToQueryDataTypeDefinition.d.ts.map +0 -1
  264. package/build/esm/shared/wireQueryTypeV2ToSdkQueryDefinition.d.ts +0 -12
  265. package/build/esm/shared/wireQueryTypeV2ToSdkQueryDefinition.d.ts.map +0 -1
  266. /package/build/{cjs → browser}/GenerateContext/EnhanceCommon.d.ts.map +0 -0
  267. /package/build/{cjs → browser}/GenerateContext/EnhancedAction.d.ts.map +0 -0
  268. /package/build/{cjs → browser}/GenerateContext/EnhancedOntologyDefinition.d.ts.map +0 -0
  269. /package/build/{cjs → browser}/GenerateContext/EnhancedQuery.d.ts.map +0 -0
  270. /package/build/{cjs → browser}/GenerateContext/EnhancedSharedPropertyType.d.ts.map +0 -0
  271. /package/build/{cjs → browser}/GenerateContext/ForeignType.d.ts.map +0 -0
  272. /package/build/{cjs → browser}/GenerateContext/GenerateContext.d.ts.map +0 -0
  273. /package/build/{cjs → browser}/GenerateContext/enhanceOntology.d.ts.map +0 -0
  274. /package/build/{cjs/MinimalFs.d.cts → browser/MinimalFs.d.ts} +0 -0
  275. /package/build/{cjs → browser}/MinimalFs.d.ts.map +0 -0
  276. /package/build/{cjs/WireOntologyDefinition.d.cts → browser/WireOntologyDefinition.d.ts} +0 -0
  277. /package/build/{cjs → browser}/WireOntologyDefinition.d.ts.map +0 -0
  278. /package/build/{cjs/generateClientSdkPackage.test.d.cts → browser/generateClientSdkPackage.test.d.ts} +0 -0
  279. /package/build/{cjs → browser}/generateClientSdkPackage.test.d.ts.map +0 -0
  280. /package/build/{cjs → browser}/index.d.ts.map +0 -0
  281. /package/build/{cjs/shared/apiNamespaces/startsWithApiNamespace.d.cts → browser/shared/apiNamespaces/startsWithApiNamespace.d.ts} +0 -0
  282. /package/build/{cjs → browser}/shared/apiNamespaces/startsWithApiNamespace.d.ts.map +0 -0
  283. /package/build/{cjs/shared/apiNamespaces/startsWithApiNamespace.test.d.cts → browser/shared/apiNamespaces/startsWithApiNamespace.test.d.ts} +0 -0
  284. /package/build/{cjs → browser}/shared/apiNamespaces/startsWithApiNamespace.test.d.ts.map +0 -0
  285. /package/build/{cjs → browser}/shared/getObjectImports.d.ts.map +0 -0
  286. /package/build/{cjs → browser}/shared/getObjectTypeApiNamesFromQuery.d.ts.map +0 -0
  287. /package/build/{cjs/shared/getObjectTypesFromQueryDataType.d.cts → browser/shared/getObjectTypesFromQueryDataType.d.ts} +0 -0
  288. /package/build/{cjs → browser}/shared/getObjectTypesFromQueryDataType.d.ts.map +0 -0
  289. /package/build/{cjs/shared/sanitizeMetadata.d.cts → browser/shared/sanitizeMetadata.d.ts} +0 -0
  290. /package/build/{cjs → browser}/shared/sanitizeMetadata.d.ts.map +0 -0
  291. /package/build/{cjs/shared/sanitizeMetadata.test.d.cts → browser/shared/sanitizeMetadata.test.d.ts} +0 -0
  292. /package/build/{cjs → browser}/shared/sanitizeMetadata.test.d.ts.map +0 -0
  293. /package/build/{cjs → browser}/util/InMemoryFs.d.ts.map +0 -0
  294. /package/build/{cjs/util/commaSeparatedIdentifiers.d.cts → browser/util/commaSeparatedIdentifiers.d.ts} +0 -0
  295. /package/build/{cjs → browser}/util/commaSeparatedIdentifiers.d.ts.map +0 -0
  296. /package/build/{cjs/util/commaSeparatedTypeIdentifiers.d.cts → browser/util/commaSeparatedTypeIdentifiers.d.ts} +0 -0
  297. /package/build/{cjs → browser}/util/commaSeparatedTypeIdentifiers.d.ts.map +0 -0
  298. /package/build/{cjs/util/deleteUndefineds.d.cts → browser/util/deleteUndefineds.d.ts} +0 -0
  299. /package/build/{cjs → browser}/util/deleteUndefineds.d.ts.map +0 -0
  300. /package/build/{cjs/util/reservedKeywords.d.cts → browser/util/reservedKeywords.d.ts} +0 -0
  301. /package/build/{cjs → browser}/util/reservedKeywords.d.ts.map +0 -0
  302. /package/build/{cjs/util/stringUnionFrom.d.cts → browser/util/stringUnionFrom.d.ts} +0 -0
  303. /package/build/{cjs → browser}/util/stringUnionFrom.d.ts.map +0 -0
  304. /package/build/{cjs/util/stringify.d.cts → browser/util/stringify.d.ts} +0 -0
  305. /package/build/{cjs → browser}/util/stringify.d.ts.map +0 -0
  306. /package/build/{cjs/util/test/TodoWireOntology.d.cts → browser/util/test/TodoWireOntology.d.ts} +0 -0
  307. /package/build/{cjs → browser}/util/test/TodoWireOntology.d.ts.map +0 -0
  308. /package/build/{cjs/util/test/compileThis.d.cts → browser/util/test/compileThis.d.ts} +0 -0
  309. /package/build/{cjs → browser}/util/test/compileThis.d.ts.map +0 -0
  310. /package/build/{cjs → browser}/util/test/createMockMinimalFiles.d.ts.map +0 -0
  311. /package/build/{cjs/util/test/formatTs.d.cts → browser/util/test/formatTs.d.ts} +0 -0
  312. /package/build/{cjs → browser}/util/test/formatTs.d.ts.map +0 -0
  313. /package/build/{cjs → browser}/util/verifyOutDir.d.ts.map +0 -0
  314. /package/build/{cjs/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.cts → browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts} +0 -0
  315. /package/build/{cjs → browser}/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts.map +0 -0
  316. /package/build/{cjs/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.cts → browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts} +0 -0
  317. /package/build/{cjs → browser}/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts.map +0 -0
  318. /package/build/{cjs → browser}/v2.0/generateClientSdkVersionTwoPointZero.d.ts.map +0 -0
  319. /package/build/{cjs/v2.0/generateClientSdkVersionTwoPointZero.test.d.cts → browser/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts} +0 -0
  320. /package/build/{cjs → browser}/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts.map +0 -0
  321. /package/build/{cjs → browser}/v2.0/generateMetadata.d.ts.map +0 -0
  322. /package/build/{cjs/v2.0/generatePerActionDataFiles.test.d.cts → browser/v2.0/generatePerActionDataFiles.test.d.ts} +0 -0
  323. /package/build/{cjs → browser}/v2.0/generatePerActionDataFiles.test.d.ts.map +0 -0
  324. /package/build/{cjs/v2.0/generatePerQueryDataFiles.test.d.cts → browser/v2.0/generatePerQueryDataFiles.test.d.ts} +0 -0
  325. /package/build/{cjs → browser}/v2.0/generatePerQueryDataFiles.test.d.ts.map +0 -0
  326. /package/build/{cjs/v2.0/getDescriptionIfPresent.d.cts → browser/v2.0/getDescriptionIfPresent.d.ts} +0 -0
  327. /package/build/{cjs → browser}/v2.0/getDescriptionIfPresent.d.ts.map +0 -0
  328. /package/build/{cjs → browser}/validateWireOntologyAssumptions.d.ts.map +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,212 @@
1
1
  # @osdk/generator
2
2
 
3
+ ## 2.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - @osdk/internal.foundry.core@0.2.1
8
+ - @osdk/generator-converters@2.0.1
9
+ - @osdk/api@2.0.1
10
+
11
+ ## 2.0.0
12
+
13
+ ### Major Changes
14
+
15
+ - 1252d94: ESM Only
16
+ - 56df85a: We now generate minimal object and interface types
17
+
18
+ ### Minor Changes
19
+
20
+ - ac4f4fd: Notable changes:
21
+ - `{{actionApiName}}$Params` is deprecated in favor of `ActionParams${{actionApiName}}`.
22
+ - All generated `{{actionApiName}}$Params` objects are now exported from generated code.
23
+ - All `{{actionApiName}}$Params` are marked as `readonly`.
24
+ - Some types that are now only needed in `@osdk/client` have been moved back out of `@osdk/client.api`.
25
+ - Generated `ActionParams${{actionApiName}}` are simpler and do not rely on type mapping for the keys, the array'ness, nor multiplicity.
26
+ - `AttachmentUpload.name` is now `readonly`.
27
+ - dc25fb4: Code generation now uses MinQueryDef
28
+ - b946e00: Emitted action definition is minimal size now
29
+ - 7494995: Internal changes to file paths
30
+ - dc25fb4: Improve query generics
31
+ - 33759fb: Removes deprecated types and renames Definition to improve intellisense
32
+ - 1770490: URLs in jsdoc now link to palantir.com
33
+ - dc25fb4: Rename MinimumActionDefinition to MinActionDef
34
+ - 51fe88c: Fix edge case with never in newly generated types
35
+ - 68a8dc7: Fixes an issue that could cause an object with sub-selection to be assigned as a full object
36
+ - dc25fb4: Further simplify types
37
+ - dc25fb4: Renamed definition types to metadata
38
+ - dc25fb4: Fixes edge cases in inferred return types especially when changing object types
39
+ - bbfebfd: Fix generation of actions with full api names
40
+ - 7494995: Fixes query type generation
41
+ - dc25fb4: Modified return type of fetchMetadata to return Object/Interface Definitions
42
+ - 5c89065: Generator no longer organizes imports
43
+ - dc25fb4: Simplified types
44
+ - dc25fb4: Updates return types of fetchMetadata to be Action and Query Definitions
45
+ - 0a374d6: Remove legacy client
46
+ - dc25fb4: Renamed Min_Definition to \_Definition
47
+ - 885c8e4: Fixing bug for codegen on windows machines, where we would use backslashes instead of forward slashes for import paths, which should be OS agnostic.
48
+ - 96ea876: Add namespaces for objects,actions,queries so that you can enumerate them.
49
+ - 6f93c8b: Generates fewer overrides to prevent potential failures
50
+ - 1f633f7: Removed dependency on @osdk/client.api
51
+ - d4d6605: Audited and cleaned up deps
52
+ - 96ea876: Adding js docs for actions so you can hover and see params and description.
53
+ - 081114f: Splits batchApplyAction out of applyAction
54
+
55
+ ### Patch Changes
56
+
57
+ - Updated dependencies [5d6d5ab]
58
+ - Updated dependencies [dc25fb4]
59
+ - Updated dependencies [3affe49]
60
+ - Updated dependencies [b946e00]
61
+ - Updated dependencies [a2c7b37]
62
+ - Updated dependencies [0ea1a17]
63
+ - Updated dependencies [dc25fb4]
64
+ - Updated dependencies [9b0617d]
65
+ - Updated dependencies [94105a5]
66
+ - Updated dependencies [5d6d5ab]
67
+ - Updated dependencies [dc25fb4]
68
+ - Updated dependencies [a2c7b37]
69
+ - Updated dependencies [dc25fb4]
70
+ - Updated dependencies [1252d94]
71
+ - Updated dependencies [e6ade8b]
72
+ - Updated dependencies [5d6d5ab]
73
+ - Updated dependencies [dc25fb4]
74
+ - Updated dependencies [5d6d5ab]
75
+ - Updated dependencies [dc25fb4]
76
+ - Updated dependencies [a2c7b37]
77
+ - Updated dependencies [795777a]
78
+ - Updated dependencies [fe9547e]
79
+ - Updated dependencies [95f9247]
80
+ - Updated dependencies [5d6d5ab]
81
+ - Updated dependencies [d2f75f9]
82
+ - Updated dependencies [b7cd0a1]
83
+ - Updated dependencies [512ee35]
84
+ - Updated dependencies [e86c505]
85
+ - Updated dependencies [dc25fb4]
86
+ - Updated dependencies [0ce2858]
87
+ - Updated dependencies [dc25fb4]
88
+ - Updated dependencies [5d6d5ab]
89
+ - Updated dependencies [7c2db00]
90
+ - Updated dependencies [dc25fb4]
91
+ - Updated dependencies [dc25fb4]
92
+ - Updated dependencies [fc28eae]
93
+ - Updated dependencies [56df85a]
94
+ - Updated dependencies [5d6d5ab]
95
+ - Updated dependencies [dc25fb4]
96
+ - Updated dependencies [5d6d5ab]
97
+ - Updated dependencies [a9923f3]
98
+ - Updated dependencies [1f633f7]
99
+ - Updated dependencies [d4d6605]
100
+ - Updated dependencies [64818dc]
101
+ - @osdk/internal.foundry.core@0.2.0
102
+ - @osdk/generator-converters@2.0.0
103
+ - @osdk/api@2.0.0
104
+
105
+ ## 2.0.0-beta.16
106
+
107
+ ### Minor Changes
108
+
109
+ - dc25fb4: Improve query generics
110
+ - dc25fb4: Further simplify types
111
+
112
+ ### Patch Changes
113
+
114
+ - Updated dependencies [dc25fb4]
115
+ - Updated dependencies [dc25fb4]
116
+ - @osdk/generator-converters@2.0.0-beta.16
117
+ - @osdk/api@2.0.0-beta.16
118
+ - @osdk/internal.foundry.core@0.2.0-beta.10
119
+
120
+ ## 2.0.0-beta.15
121
+
122
+ ### Minor Changes
123
+
124
+ - dc25fb4: Simplified types
125
+
126
+ ### Patch Changes
127
+
128
+ - Updated dependencies [dc25fb4]
129
+ - @osdk/generator-converters@2.0.0-beta.15
130
+ - @osdk/api@2.0.0-beta.15
131
+
132
+ ## 2.0.0-beta.14
133
+
134
+ ### Minor Changes
135
+
136
+ - 1f633f7: Removed dependency on @osdk/client.api
137
+ - d4d6605: Audited and cleaned up deps
138
+
139
+ ### Patch Changes
140
+
141
+ - Updated dependencies [5d6d5ab]
142
+ - Updated dependencies [a2c7b37]
143
+ - Updated dependencies [fe9547e]
144
+ - Updated dependencies [1f633f7]
145
+ - Updated dependencies [d4d6605]
146
+ - @osdk/internal.foundry.core@0.2.0-beta.9
147
+ - @osdk/api@2.0.0-beta.14
148
+ - @osdk/generator-converters@2.0.0-beta.14
149
+
150
+ ## 2.0.0-beta.13
151
+
152
+ ### Minor Changes
153
+
154
+ - 1488144: Renamed definition types to metadata
155
+ - bbfebfd: Fix generation of actions with full api names
156
+ - f6e2880: Fixes query type generation
157
+ - c28792e: Modified return type of fetchMetadata to return Object/Interface Definitions
158
+ - 26ee3bd: Updates return types of fetchMetadata to be Action and Query Definitions
159
+ - 6ab5d2e: Renamed Min_Definition to \_Definition
160
+ - 885c8e4: Fixing bug for codegen on windows machines, where we would use backslashes instead of forward slashes for import paths, which should be OS agnostic.
161
+
162
+ ### Patch Changes
163
+
164
+ - Updated dependencies [1488144]
165
+ - Updated dependencies [c28792e]
166
+ - Updated dependencies [26ee3bd]
167
+ - Updated dependencies [6ab5d2e]
168
+ - @osdk/generator-converters@2.0.0-beta.13
169
+ - @osdk/api@2.0.0-beta.13
170
+ - @osdk/internal.foundry.core@0.2.0-beta.8
171
+
172
+ ## 2.0.0-beta.12
173
+
174
+ ### Patch Changes
175
+
176
+ - Updated dependencies [dc25fb4]
177
+ - @osdk/generator-converters@2.0.0-beta.12
178
+ - @osdk/api@2.0.0-beta.12
179
+
180
+ ## 2.0.0-beta.11
181
+
182
+ ### Patch Changes
183
+
184
+ - @osdk/generator-converters@2.0.0-beta.11
185
+ - @osdk/api@2.0.0-beta.11
186
+
187
+ ## 2.0.0-beta.10
188
+
189
+ ### Major Changes
190
+
191
+ - 1252d94: ESM Only
192
+ - 56df85a: We now generate minimal object and interface types
193
+
194
+ ### Minor Changes
195
+
196
+ - dc25fb4: Code generation now uses MinQueryDef
197
+ - dc25fb4: Rename MinimumActionDefinition to MinActionDef
198
+
199
+ ### Patch Changes
200
+
201
+ - Updated dependencies [dc25fb4]
202
+ - Updated dependencies [dc25fb4]
203
+ - Updated dependencies [1252d94]
204
+ - Updated dependencies [5d6d5ab]
205
+ - Updated dependencies [56df85a]
206
+ - @osdk/generator-converters@2.0.0-beta.10
207
+ - @osdk/api@2.0.0-beta.10
208
+ - @osdk/internal.foundry.core@0.2.0-beta.7
209
+
3
210
  ## 2.0.0-beta.9
4
211
 
5
212
  ### Minor Changes
@@ -1,4 +1,4 @@
1
- import type { EnhancedOntologyDefinition } from "./EnhancedOntologyDefinition.cjs";
1
+ import type { EnhancedOntologyDefinition } from "./EnhancedOntologyDefinition.js";
2
2
  export interface EnhanceCommon {
3
3
  ontologyApiNamespace: string | undefined;
4
4
  apiNamespacePackageMap: Map<string, string>;
@@ -0,0 +1,17 @@
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
+ export {};
17
+ //# sourceMappingURL=EnhanceCommon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnhanceCommon.js","names":[],"sources":["EnhanceCommon.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  import type { ActionTypeV2 } from "@osdk/internal.foundry.core";
2
- import type { EnhanceCommon } from "./EnhanceCommon.cjs";
3
- import { EnhancedBase } from "./EnhancedBase.cjs";
2
+ import type { EnhanceCommon } from "./EnhanceCommon.js";
3
+ import { EnhancedBase } from "./EnhancedBase.js";
4
4
  export declare class EnhancedAction extends EnhancedBase<ActionTypeV2> {
5
5
  raw: ActionTypeV2;
6
6
  constructor(common: EnhanceCommon, raw: ActionTypeV2);
@@ -0,0 +1,42 @@
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
+ import { EnhancedBase } from "./EnhancedBase.js";
17
+ export class EnhancedAction extends EnhancedBase {
18
+ raw;
19
+ constructor(common, raw) {
20
+ super(common, raw, raw.apiName, "./ontology/actions");
21
+ this.raw = raw;
22
+ }
23
+ get description() {
24
+ return this.raw.description;
25
+ }
26
+ get parameters() {
27
+ return this.raw.parameters;
28
+ }
29
+ get operations() {
30
+ return this.raw.operations;
31
+ }
32
+ get paramsIdentifier() {
33
+ return `${this.shortApiName}.Params`;
34
+ }
35
+ get definitionIdentifier() {
36
+ return `${this.shortApiName}.Definition`;
37
+ }
38
+ get definitionParamsIdentifier() {
39
+ return `${this.shortApiName}.ParamsDefinition`;
40
+ }
41
+ }
42
+ //# sourceMappingURL=EnhancedAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnhancedAction.js","names":["EnhancedBase","EnhancedAction","raw","constructor","common","apiName","description","parameters","operations","paramsIdentifier","shortApiName","definitionIdentifier","definitionParamsIdentifier"],"sources":["EnhancedAction.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedAction extends EnhancedBase {\n raw;\n constructor(common, raw) {\n super(common, raw, raw.apiName, \"./ontology/actions\");\n this.raw = raw;\n }\n get description() {\n return this.raw.description;\n }\n get parameters() {\n return this.raw.parameters;\n }\n get operations() {\n return this.raw.operations;\n }\n get paramsIdentifier() {\n return `${this.shortApiName}.Params`;\n }\n get definitionIdentifier() {\n return `${this.shortApiName}.Definition`;\n }\n get definitionParamsIdentifier() {\n return `${this.shortApiName}.ParamsDefinition`;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,mBAAmB;AAChD,OAAO,MAAMC,cAAc,SAASD,YAAY,CAAC;EAC7CE,GAAG;EACHC,WAAWA,CAACC,MAAM,EAAEF,GAAG,EAAE;IACrB,KAAK,CAACE,MAAM,EAAEF,GAAG,EAAEA,GAAG,CAACG,OAAO,EAAE,oBAAoB,CAAC;IACrD,IAAI,CAACH,GAAG,GAAGA,GAAG;EAClB;EACA,IAAII,WAAWA,CAAA,EAAG;IACd,OAAO,IAAI,CAACJ,GAAG,CAACI,WAAW;EAC/B;EACA,IAAIC,UAAUA,CAAA,EAAG;IACb,OAAO,IAAI,CAACL,GAAG,CAACK,UAAU;EAC9B;EACA,IAAIC,UAAUA,CAAA,EAAG;IACb,OAAO,IAAI,CAACN,GAAG,CAACM,UAAU;EAC9B;EACA,IAAIC,gBAAgBA,CAAA,EAAG;IACnB,OAAO,GAAG,IAAI,CAACC,YAAY,SAAS;EACxC;EACA,IAAIC,oBAAoBA,CAAA,EAAG;IACvB,OAAO,GAAG,IAAI,CAACD,YAAY,aAAa;EAC5C;EACA,IAAIE,0BAA0BA,CAAA,EAAG;IAC7B,OAAO,GAAG,IAAI,CAACF,YAAY,mBAAmB;EAClD;AACJ","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import type { EnhanceCommon } from "./EnhanceCommon.cjs";
1
+ import type { EnhanceCommon } from "./EnhanceCommon.js";
2
2
  export declare abstract class AbstractImportable {
3
3
  protected _common: EnhanceCommon;
4
4
  shortApiName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"EnhancedBase.d.ts","sourceRoot":"","sources":["../../../src/GenerateContext/EnhancedBase.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,8BAAsB,kBAAkB;IACtC,SAAS,CAAC,OAAO,EAAE,aAAa,CAAC;IAEjC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IAEzB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;gBAGzC,MAAM,EAAE,aAAa,EACrB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM;IAqBlB,kBAAkB,aAAc,MAAM,YAYpC;CACH;AAED,8BAAsB,YAAY,CAAC,CAAC,CAAE,SAAQ,kBAAkB;IAC9D,GAAG,EAAE,CAAC,CAAC;gBAGL,MAAM,EAAE,aAAa,EACrB,GAAG,EAAE,CAAC,EACN,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM;CAWnB;AAED,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,GAChB,CAAC,MAAM,GAAG,SAAS,EAAE,MAAM,CAAC,CAI9B"}
1
+ {"version":3,"file":"EnhancedBase.d.ts","sourceRoot":"","sources":["../../../src/GenerateContext/EnhancedBase.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,8BAAsB,kBAAkB;IACtC,SAAS,CAAC,OAAO,EAAE,aAAa,CAAC;IAEjC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IAEzB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;gBAGzC,MAAM,EAAE,aAAa,EACrB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM;IAqBlB,kBAAkB,aAAc,MAAM,YAapC;CACH;AAED,8BAAsB,YAAY,CAAC,CAAC,CAAE,SAAQ,kBAAkB;IAC9D,GAAG,EAAE,CAAC,CAAC;gBAGL,MAAM,EAAE,aAAa,EACrB,GAAG,EAAE,CAAC,EACN,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM;CAWnB;AAED,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,GAChB,CAAC,MAAM,GAAG,SAAS,EAAE,MAAM,CAAC,CAI9B"}
@@ -0,0 +1,72 @@
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
+ import * as path from "node:path";
17
+ export class AbstractImportable {
18
+ _common;
19
+ shortApiName;
20
+ fullApiName;
21
+ apiNamespace;
22
+ /**
23
+ * Either a path relative to the ourDir (e.g. "./ontology/objects/foo.js") or a normal
24
+ * module import (e.g. "@something/foo")/
25
+ */
26
+ importPath;
27
+ uniqueImportName;
28
+ isLocal;
29
+ sourcePackage;
30
+ constructor(common, fullApiName, basePath) {
31
+ this._common = common;
32
+ this.fullApiName = fullApiName;
33
+ [this.apiNamespace, this.shortApiName] = extractNamespace(this.fullApiName);
34
+ const {
35
+ ontologyApiNamespace,
36
+ apiNamespacePackageMap,
37
+ importExt
38
+ } = common;
39
+ this.isLocal = ontologyApiNamespace === this.apiNamespace;
40
+ this.sourcePackage = this.apiNamespace && !this.isLocal ? apiNamespacePackageMap.get(this.apiNamespace) : undefined;
41
+ this.importPath = this.isLocal ? `${basePath}/${this.shortApiName}${importExt}` : this.sourcePackage;
42
+ this.uniqueImportName = this.shortApiName;
43
+ }
44
+ getImportPathRelTo = filePath => {
45
+ if (this.importPath.startsWith(".")) {
46
+ const result = path.relative(path.dirname(filePath), this.importPath).split(path.sep).join("/");
47
+ if (result.startsWith(".")) {
48
+ return result;
49
+ } else {
50
+ return `./${result}`;
51
+ }
52
+ } else {
53
+ return this.importPath;
54
+ }
55
+ };
56
+ }
57
+ export class EnhancedBase extends AbstractImportable {
58
+ raw;
59
+ constructor(common, raw, fullApiName, basePath) {
60
+ super(common, fullApiName, basePath);
61
+ this.raw = raw;
62
+ if (!this.isLocal && !this.sourcePackage) {
63
+ throw new Error(`Expected { ns:'${this.apiNamespace}', shortName: '${this.shortApiName}'} to be in namespace '${common.ontologyApiNamespace}' or in a provided package mapping`);
64
+ }
65
+ }
66
+ }
67
+ export function extractNamespace(fqApiName) {
68
+ const last = fqApiName.lastIndexOf(".");
69
+ if (last === -1) return [undefined, fqApiName];
70
+ return [fqApiName.slice(0, last), fqApiName.slice(last + 1)];
71
+ }
72
+ //# sourceMappingURL=EnhancedBase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnhancedBase.js","names":["path","AbstractImportable","_common","shortApiName","fullApiName","apiNamespace","importPath","uniqueImportName","isLocal","sourcePackage","constructor","common","basePath","extractNamespace","ontologyApiNamespace","apiNamespacePackageMap","importExt","get","undefined","getImportPathRelTo","filePath","startsWith","result","relative","dirname","split","sep","join","EnhancedBase","raw","Error","fqApiName","last","lastIndexOf","slice"],"sources":["EnhancedBase.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as path from \"node:path\";\nexport class AbstractImportable {\n _common;\n shortApiName;\n fullApiName;\n apiNamespace;\n /**\n * Either a path relative to the ourDir (e.g. \"./ontology/objects/foo.js\") or a normal\n * module import (e.g. \"@something/foo\")/\n */\n importPath;\n uniqueImportName;\n isLocal;\n sourcePackage;\n constructor(common, fullApiName, basePath) {\n this._common = common;\n this.fullApiName = fullApiName;\n [this.apiNamespace, this.shortApiName] = extractNamespace(this.fullApiName);\n const { ontologyApiNamespace, apiNamespacePackageMap, importExt } = common;\n this.isLocal = ontologyApiNamespace === this.apiNamespace;\n this.sourcePackage = this.apiNamespace && !this.isLocal\n ? apiNamespacePackageMap.get(this.apiNamespace)\n : undefined;\n this.importPath = this.isLocal\n ? `${basePath}/${this.shortApiName}${importExt}`\n : this.sourcePackage;\n this.uniqueImportName = this.shortApiName;\n }\n getImportPathRelTo = (filePath) => {\n if (this.importPath.startsWith(\".\")) {\n const result = path.relative(path.dirname(filePath), this.importPath)\n .split(path.sep).join(\"/\");\n if (result.startsWith(\".\")) {\n return result;\n }\n else {\n return `./${result}`;\n }\n }\n else {\n return this.importPath;\n }\n };\n}\nexport class EnhancedBase extends AbstractImportable {\n raw;\n constructor(common, raw, fullApiName, basePath) {\n super(common, fullApiName, basePath);\n this.raw = raw;\n if (!this.isLocal && !this.sourcePackage) {\n throw new Error(`Expected { ns:'${this.apiNamespace}', shortName: '${this.shortApiName}'} to be in namespace '${common.ontologyApiNamespace}' or in a provided package mapping`);\n }\n }\n}\nexport function extractNamespace(fqApiName) {\n const last = fqApiName.lastIndexOf(\".\");\n if (last === -1)\n return [undefined, fqApiName];\n return [fqApiName.slice(0, last), fqApiName.slice(last + 1)];\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKA,IAAI,MAAM,WAAW;AACjC,OAAO,MAAMC,kBAAkB,CAAC;EAC5BC,OAAO;EACPC,YAAY;EACZC,WAAW;EACXC,YAAY;EACZ;AACJ;AACA;AACA;EACIC,UAAU;EACVC,gBAAgB;EAChBC,OAAO;EACPC,aAAa;EACbC,WAAWA,CAACC,MAAM,EAAEP,WAAW,EAAEQ,QAAQ,EAAE;IACvC,IAAI,CAACV,OAAO,GAAGS,MAAM;IACrB,IAAI,CAACP,WAAW,GAAGA,WAAW;IAC9B,CAAC,IAAI,CAACC,YAAY,EAAE,IAAI,CAACF,YAAY,CAAC,GAAGU,gBAAgB,CAAC,IAAI,CAACT,WAAW,CAAC;IAC3E,MAAM;MAAEU,oBAAoB;MAAEC,sBAAsB;MAAEC;IAAU,CAAC,GAAGL,MAAM;IAC1E,IAAI,CAACH,OAAO,GAAGM,oBAAoB,KAAK,IAAI,CAACT,YAAY;IACzD,IAAI,CAACI,aAAa,GAAG,IAAI,CAACJ,YAAY,IAAI,CAAC,IAAI,CAACG,OAAO,GACjDO,sBAAsB,CAACE,GAAG,CAAC,IAAI,CAACZ,YAAY,CAAC,GAC7Ca,SAAS;IACf,IAAI,CAACZ,UAAU,GAAG,IAAI,CAACE,OAAO,GACxB,GAAGI,QAAQ,IAAI,IAAI,CAACT,YAAY,GAAGa,SAAS,EAAE,GAC9C,IAAI,CAACP,aAAa;IACxB,IAAI,CAACF,gBAAgB,GAAG,IAAI,CAACJ,YAAY;EAC7C;EACAgB,kBAAkB,GAAIC,QAAQ,IAAK;IAC/B,IAAI,IAAI,CAACd,UAAU,CAACe,UAAU,CAAC,GAAG,CAAC,EAAE;MACjC,MAAMC,MAAM,GAAGtB,IAAI,CAACuB,QAAQ,CAACvB,IAAI,CAACwB,OAAO,CAACJ,QAAQ,CAAC,EAAE,IAAI,CAACd,UAAU,CAAC,CAChEmB,KAAK,CAACzB,IAAI,CAAC0B,GAAG,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;MAC9B,IAAIL,MAAM,CAACD,UAAU,CAAC,GAAG,CAAC,EAAE;QACxB,OAAOC,MAAM;MACjB,CAAC,MACI;QACD,OAAO,KAAKA,MAAM,EAAE;MACxB;IACJ,CAAC,MACI;MACD,OAAO,IAAI,CAAChB,UAAU;IAC1B;EACJ,CAAC;AACL;AACA,OAAO,MAAMsB,YAAY,SAAS3B,kBAAkB,CAAC;EACjD4B,GAAG;EACHnB,WAAWA,CAACC,MAAM,EAAEkB,GAAG,EAAEzB,WAAW,EAAEQ,QAAQ,EAAE;IAC5C,KAAK,CAACD,MAAM,EAAEP,WAAW,EAAEQ,QAAQ,CAAC;IACpC,IAAI,CAACiB,GAAG,GAAGA,GAAG;IACd,IAAI,CAAC,IAAI,CAACrB,OAAO,IAAI,CAAC,IAAI,CAACC,aAAa,EAAE;MACtC,MAAM,IAAIqB,KAAK,CAAC,kBAAkB,IAAI,CAACzB,YAAY,kBAAkB,IAAI,CAACF,YAAY,0BAA0BQ,MAAM,CAACG,oBAAoB,oCAAoC,CAAC;IACpL;EACJ;AACJ;AACA,OAAO,SAASD,gBAAgBA,CAACkB,SAAS,EAAE;EACxC,MAAMC,IAAI,GAAGD,SAAS,CAACE,WAAW,CAAC,GAAG,CAAC;EACvC,IAAID,IAAI,KAAK,CAAC,CAAC,EACX,OAAO,CAACd,SAAS,EAAEa,SAAS,CAAC;EACjC,OAAO,CAACA,SAAS,CAACG,KAAK,CAAC,CAAC,EAAEF,IAAI,CAAC,EAAED,SAAS,CAACG,KAAK,CAACF,IAAI,GAAG,CAAC,CAAC,CAAC;AAChE","ignoreList":[]}
@@ -1,13 +1,13 @@
1
- import type { InterfaceDefinition } from "@osdk/api";
1
+ import type { InterfaceMetadata } from "@osdk/api";
2
2
  import type { InterfaceType } from "@osdk/internal.foundry.core";
3
- import type { EnhanceCommon } from "./EnhanceCommon.cjs";
4
- import { EnhancedBase } from "./EnhancedBase.cjs";
3
+ import type { EnhanceCommon } from "./EnhanceCommon.js";
4
+ import { EnhancedBase } from "./EnhancedBase.js";
5
5
  export declare class EnhancedInterfaceType extends EnhancedBase<InterfaceType> {
6
6
  raw: InterfaceType;
7
7
  constructor(common: EnhanceCommon, raw: InterfaceType);
8
8
  getDefinitionIdentifier(v2: boolean): string;
9
9
  getImportedDefinitionIdentifier(v2: boolean): string;
10
10
  get properties(): Record<import("@osdk/internal.foundry.core").SharedPropertyTypeApiName, import("@osdk/internal.foundry.core").SharedPropertyType>;
11
- getCleanedUpDefinition(v2: boolean): InterfaceDefinition<any, any>;
11
+ getCleanedUpDefinition(v2: boolean): InterfaceMetadata;
12
12
  }
13
13
  //# sourceMappingURL=EnhancedInterfaceType.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EnhancedInterfaceType.d.ts","sourceRoot":"","sources":["../../../src/GenerateContext/EnhancedInterfaceType.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAErD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,qBAAa,qBAAsB,SAAQ,YAAY,CAAC,aAAa,CAAC;IAC1B,GAAG,EAAE,aAAa;gBAAhD,MAAM,EAAE,aAAa,EAAS,GAAG,EAAE,aAAa;IAI5D,uBAAuB,CAAC,EAAE,EAAE,OAAO;IAInC,+BAA+B,CAAC,EAAE,EAAE,OAAO;IAI3C,IAAI,UAAU,sIAEb;IAED,sBAAsB,CAAC,EAAE,EAAE,OAAO,GAAG,mBAAmB,CAAC,GAAG,EAAE,GAAG,CAAC;CAQnE"}
1
+ {"version":3,"file":"EnhancedInterfaceType.d.ts","sourceRoot":"","sources":["../../../src/GenerateContext/EnhancedInterfaceType.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,qBAAa,qBAAsB,SAAQ,YAAY,CAAC,aAAa,CAAC;IAC1B,GAAG,EAAE,aAAa;gBAAhD,MAAM,EAAE,aAAa,EAAS,GAAG,EAAE,aAAa;IAI5D,uBAAuB,CAAC,EAAE,EAAE,OAAO;IAInC,+BAA+B,CAAC,EAAE,EAAE,OAAO;IAI3C,IAAI,UAAU,sIAEb;IAED,sBAAsB,CAAC,EAAE,EAAE,OAAO,GAAG,iBAAiB;CAQvD"}
@@ -0,0 +1,38 @@
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
+ import { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from "@osdk/generator-converters";
17
+ import { deleteUndefineds } from "../util/deleteUndefineds.js";
18
+ import { EnhancedBase } from "./EnhancedBase.js";
19
+ export class EnhancedInterfaceType extends EnhancedBase {
20
+ raw;
21
+ constructor(common, raw) {
22
+ super(common, raw, raw.apiName, "./ontology/interfaces");
23
+ this.raw = raw;
24
+ }
25
+ getDefinitionIdentifier(v2) {
26
+ return v2 ? this.shortApiName : `${this.shortApiName}Def`;
27
+ }
28
+ getImportedDefinitionIdentifier(v2) {
29
+ return this.getDefinitionIdentifier(v2);
30
+ }
31
+ get properties() {
32
+ return this.raw.properties;
33
+ }
34
+ getCleanedUpDefinition(v2) {
35
+ return deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(this.raw, v2));
36
+ }
37
+ }
38
+ //# sourceMappingURL=EnhancedInterfaceType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnhancedInterfaceType.js","names":["__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition","deleteUndefineds","EnhancedBase","EnhancedInterfaceType","raw","constructor","common","apiName","getDefinitionIdentifier","v2","shortApiName","getImportedDefinitionIdentifier","properties","getCleanedUpDefinition"],"sources":["EnhancedInterfaceType.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from \"@osdk/generator-converters\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedInterfaceType extends EnhancedBase {\n raw;\n constructor(common, raw) {\n super(common, raw, raw.apiName, \"./ontology/interfaces\");\n this.raw = raw;\n }\n getDefinitionIdentifier(v2) {\n return v2 ? this.shortApiName : `${this.shortApiName}Def`;\n }\n getImportedDefinitionIdentifier(v2) {\n return this.getDefinitionIdentifier(v2);\n }\n get properties() {\n return this.raw.properties;\n }\n getCleanedUpDefinition(v2) {\n return deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(this.raw, v2));\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,mDAAmD,QAAQ,4BAA4B;AAChG,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,YAAY,QAAQ,mBAAmB;AAChD,OAAO,MAAMC,qBAAqB,SAASD,YAAY,CAAC;EACpDE,GAAG;EACHC,WAAWA,CAACC,MAAM,EAAEF,GAAG,EAAE;IACrB,KAAK,CAACE,MAAM,EAAEF,GAAG,EAAEA,GAAG,CAACG,OAAO,EAAE,uBAAuB,CAAC;IACxD,IAAI,CAACH,GAAG,GAAGA,GAAG;EAClB;EACAI,uBAAuBA,CAACC,EAAE,EAAE;IACxB,OAAOA,EAAE,GAAG,IAAI,CAACC,YAAY,GAAG,GAAG,IAAI,CAACA,YAAY,KAAK;EAC7D;EACAC,+BAA+BA,CAACF,EAAE,EAAE;IAChC,OAAO,IAAI,CAACD,uBAAuB,CAACC,EAAE,CAAC;EAC3C;EACA,IAAIG,UAAUA,CAAA,EAAG;IACb,OAAO,IAAI,CAACR,GAAG,CAACQ,UAAU;EAC9B;EACAC,sBAAsBA,CAACJ,EAAE,EAAE;IACvB,OAAOR,gBAAgB,CAACD,mDAAmD,CAAC,IAAI,CAACI,GAAG,EAAEK,EAAE,CAAC,CAAC;EAC9F;AACJ","ignoreList":[]}
@@ -1,12 +1,12 @@
1
- import type { ObjectTypeDefinition } from "@osdk/api";
1
+ import type { ObjectMetadata } from "@osdk/api";
2
2
  import type { ObjectTypeFullMetadata } from "@osdk/internal.foundry.core";
3
- import type { EnhanceCommon } from "./EnhanceCommon.cjs";
4
- import { EnhancedBase } from "./EnhancedBase.cjs";
3
+ import type { EnhanceCommon } from "./EnhanceCommon.js";
4
+ import { EnhancedBase } from "./EnhancedBase.js";
5
5
  export declare class EnhancedObjectType extends EnhancedBase<ObjectTypeFullMetadata> {
6
6
  raw: ObjectTypeFullMetadata;
7
7
  constructor(common: EnhanceCommon, raw: ObjectTypeFullMetadata);
8
8
  getDefinitionIdentifier(v2: boolean): string;
9
9
  getImportedDefinitionIdentifier(v2: boolean): string;
10
- getCleanedUpDefinition(v2: boolean): ObjectTypeDefinition<any>;
10
+ getCleanedUpDefinition(v2: boolean): ObjectMetadata;
11
11
  }
12
12
  //# sourceMappingURL=EnhancedObjectType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnhancedObjectType.d.ts","sourceRoot":"","sources":["../../../src/GenerateContext/EnhancedObjectType.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,qBAAa,kBAAmB,SAAQ,YAAY,CAAC,sBAAsB,CAAC;IAChC,GAAG,EAAE,sBAAsB;gBAAzD,MAAM,EAAE,aAAa,EAAS,GAAG,EAAE,sBAAsB;IAIrE,uBAAuB,CAAC,EAAE,EAAE,OAAO;IAInC,+BAA+B,CAAC,EAAE,EAAE,OAAO;IAI3C,sBAAsB,CAAC,EAAE,EAAE,OAAO,GAAG,cAAc;CAQpD"}
@@ -0,0 +1,35 @@
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
+ import { wireObjectTypeFullMetadataToSdkObjectMetadata } from "@osdk/generator-converters";
17
+ import { deleteUndefineds } from "../util/deleteUndefineds.js";
18
+ import { EnhancedBase } from "./EnhancedBase.js";
19
+ export class EnhancedObjectType extends EnhancedBase {
20
+ raw;
21
+ constructor(common, raw) {
22
+ super(common, raw, raw.objectType.apiName, "./ontology/objects");
23
+ this.raw = raw;
24
+ }
25
+ getDefinitionIdentifier(v2) {
26
+ return v2 ? `${this.shortApiName}` : `${this.shortApiName}Def`;
27
+ }
28
+ getImportedDefinitionIdentifier(v2) {
29
+ return this.getDefinitionIdentifier(v2);
30
+ }
31
+ getCleanedUpDefinition(v2) {
32
+ return deleteUndefineds(wireObjectTypeFullMetadataToSdkObjectMetadata(this.raw, v2));
33
+ }
34
+ }
35
+ //# sourceMappingURL=EnhancedObjectType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnhancedObjectType.js","names":["wireObjectTypeFullMetadataToSdkObjectMetadata","deleteUndefineds","EnhancedBase","EnhancedObjectType","raw","constructor","common","objectType","apiName","getDefinitionIdentifier","v2","shortApiName","getImportedDefinitionIdentifier","getCleanedUpDefinition"],"sources":["EnhancedObjectType.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { wireObjectTypeFullMetadataToSdkObjectMetadata } from \"@osdk/generator-converters\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedObjectType extends EnhancedBase {\n raw;\n constructor(common, raw) {\n super(common, raw, raw.objectType.apiName, \"./ontology/objects\");\n this.raw = raw;\n }\n getDefinitionIdentifier(v2) {\n return v2 ? `${this.shortApiName}` : `${this.shortApiName}Def`;\n }\n getImportedDefinitionIdentifier(v2) {\n return this.getDefinitionIdentifier(v2);\n }\n getCleanedUpDefinition(v2) {\n return deleteUndefineds(wireObjectTypeFullMetadataToSdkObjectMetadata(this.raw, v2));\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,6CAA6C,QAAQ,4BAA4B;AAC1F,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,YAAY,QAAQ,mBAAmB;AAChD,OAAO,MAAMC,kBAAkB,SAASD,YAAY,CAAC;EACjDE,GAAG;EACHC,WAAWA,CAACC,MAAM,EAAEF,GAAG,EAAE;IACrB,KAAK,CAACE,MAAM,EAAEF,GAAG,EAAEA,GAAG,CAACG,UAAU,CAACC,OAAO,EAAE,oBAAoB,CAAC;IAChE,IAAI,CAACJ,GAAG,GAAGA,GAAG;EAClB;EACAK,uBAAuBA,CAACC,EAAE,EAAE;IACxB,OAAOA,EAAE,GAAG,GAAG,IAAI,CAACC,YAAY,EAAE,GAAG,GAAG,IAAI,CAACA,YAAY,KAAK;EAClE;EACAC,+BAA+BA,CAACF,EAAE,EAAE;IAChC,OAAO,IAAI,CAACD,uBAAuB,CAACC,EAAE,CAAC;EAC3C;EACAG,sBAAsBA,CAACH,EAAE,EAAE;IACvB,OAAOT,gBAAgB,CAACD,6CAA6C,CAAC,IAAI,CAACI,GAAG,EAAEM,EAAE,CAAC,CAAC;EACxF;AACJ","ignoreList":[]}
@@ -1,12 +1,12 @@
1
1
  import type { OntologyV2 } from "@osdk/internal.foundry.core";
2
- import type { WireOntologyDefinition } from "../WireOntologyDefinition.cjs";
3
- import type { EnhanceCommon } from "./EnhanceCommon.cjs";
4
- import { EnhancedAction } from "./EnhancedAction.cjs";
5
- import { EnhancedInterfaceType } from "./EnhancedInterfaceType.cjs";
6
- import { EnhancedObjectType } from "./EnhancedObjectType.cjs";
7
- import { EnhancedQuery } from "./EnhancedQuery.cjs";
8
- import { EnhancedSharedPropertyType } from "./EnhancedSharedPropertyType.cjs";
9
- import { ForeignType } from "./ForeignType.cjs";
2
+ import type { WireOntologyDefinition } from "../WireOntologyDefinition.js";
3
+ import type { EnhanceCommon } from "./EnhanceCommon.js";
4
+ import { EnhancedAction } from "./EnhancedAction.js";
5
+ import { EnhancedInterfaceType } from "./EnhancedInterfaceType.js";
6
+ import { EnhancedObjectType } from "./EnhancedObjectType.js";
7
+ import { EnhancedQuery } from "./EnhancedQuery.js";
8
+ import { EnhancedSharedPropertyType } from "./EnhancedSharedPropertyType.js";
9
+ import { ForeignType } from "./ForeignType.js";
10
10
  export declare class EnhancedOntologyDefinition {
11
11
  #private;
12
12
  ontology: OntologyV2;
@@ -0,0 +1,77 @@
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
+ import { EnhancedAction } from "./EnhancedAction.js";
17
+ import { extractNamespace } from "./EnhancedBase.js";
18
+ import { EnhancedInterfaceType } from "./EnhancedInterfaceType.js";
19
+ import { EnhancedObjectType } from "./EnhancedObjectType.js";
20
+ import { EnhancedQuery } from "./EnhancedQuery.js";
21
+ import { EnhancedSharedPropertyType } from "./EnhancedSharedPropertyType.js";
22
+ import { ForeignType } from "./ForeignType.js";
23
+ export class EnhancedOntologyDefinition {
24
+ ontology;
25
+ objectTypes;
26
+ actionTypes;
27
+ queryTypes;
28
+ interfaceTypes;
29
+ sharedPropertyTypes;
30
+ #foreignTypes = {};
31
+ raw;
32
+ common;
33
+ constructor(raw, ontologyApiNamespace, apiNamespacePackageMap, importExt) {
34
+ this.common = {
35
+ apiNamespacePackageMap,
36
+ enhancedOntology: this,
37
+ importExt,
38
+ ontologyApiNamespace
39
+ };
40
+ this.raw = raw;
41
+ this.ontology = raw.ontology;
42
+ this.objectTypes = remap(raw.objectTypes, this.common, EnhancedObjectType);
43
+ this.actionTypes = remap(raw.actionTypes, this.common, EnhancedAction);
44
+ this.queryTypes = remap(raw.queryTypes, this.common, EnhancedQuery);
45
+ this.interfaceTypes = remap(raw.interfaceTypes, this.common, EnhancedInterfaceType);
46
+ this.sharedPropertyTypes = remap(raw.sharedPropertyTypes, this.common, EnhancedSharedPropertyType);
47
+ }
48
+ #createRequireType = type => {
49
+ return (fullApiName, localOnly) => {
50
+ const ret = this[type][fullApiName];
51
+ if (!ret) {
52
+ const [apiNamespace, shortApiName] = extractNamespace(fullApiName);
53
+ if (localOnly || !apiNamespace) {
54
+ throw new Error(`Unable to find ${type}: No entry for '${fullApiName}`);
55
+ }
56
+ if (!this.common.apiNamespacePackageMap.has(apiNamespace)) {
57
+ throw new Error(`Unable to find ${type}: Unknown namespace '${apiNamespace}'`);
58
+ }
59
+ const ret = this.#foreignTypes[fullApiName] ?? new ForeignType(this.common, type, apiNamespace, shortApiName);
60
+ this.#foreignTypes[fullApiName] = ret;
61
+ return ret;
62
+ }
63
+ return ret;
64
+ };
65
+ };
66
+ requireObjectType = this.#createRequireType("objectTypes");
67
+ requireInterfaceType = this.#createRequireType("interfaceTypes");
68
+ requireActionType = this.#createRequireType("actionTypes");
69
+ requireQueryType = this.#createRequireType("queryTypes");
70
+ requireSharedPropertyType = this.#createRequireType("sharedPropertyTypes");
71
+ }
72
+ function remap(r, common, Constructor) {
73
+ return Object.fromEntries(Object.entries(r ?? {}).map(([fullApiName, v]) => {
74
+ return [fullApiName, new Constructor(common, v)];
75
+ }).sort((a, b) => a[0].localeCompare(b[0])));
76
+ }
77
+ //# sourceMappingURL=EnhancedOntologyDefinition.js.map