@osdk/generator 2.0.0-beta.13 → 2.0.0-beta.14

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 (293) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/build/browser/GenerateContext/EnhanceCommon.d.ts +9 -0
  3. package/build/browser/GenerateContext/EnhanceCommon.d.ts.map +1 -0
  4. package/build/browser/GenerateContext/EnhanceCommon.js +17 -0
  5. package/build/browser/GenerateContext/EnhanceCommon.js.map +1 -0
  6. package/build/browser/GenerateContext/EnhancedAction.d.ts +14 -0
  7. package/build/browser/GenerateContext/EnhancedAction.d.ts.map +1 -0
  8. package/build/browser/GenerateContext/EnhancedAction.js +42 -0
  9. package/build/browser/GenerateContext/EnhancedAction.js.map +1 -0
  10. package/build/browser/GenerateContext/EnhancedBase.d.ts +23 -0
  11. package/build/browser/GenerateContext/EnhancedBase.d.ts.map +1 -0
  12. package/build/browser/GenerateContext/EnhancedBase.js +72 -0
  13. package/build/browser/GenerateContext/EnhancedBase.js.map +1 -0
  14. package/build/browser/GenerateContext/EnhancedInterfaceType.d.ts +13 -0
  15. package/build/browser/GenerateContext/EnhancedInterfaceType.d.ts.map +1 -0
  16. package/build/browser/GenerateContext/EnhancedInterfaceType.js +38 -0
  17. package/build/browser/GenerateContext/EnhancedInterfaceType.js.map +1 -0
  18. package/build/browser/GenerateContext/EnhancedObjectType.d.ts +12 -0
  19. package/build/browser/GenerateContext/EnhancedObjectType.d.ts.map +1 -0
  20. package/build/browser/GenerateContext/EnhancedObjectType.js +35 -0
  21. package/build/browser/GenerateContext/EnhancedObjectType.js.map +1 -0
  22. package/build/browser/GenerateContext/EnhancedOntologyDefinition.d.ts +27 -0
  23. package/build/browser/GenerateContext/EnhancedOntologyDefinition.d.ts.map +1 -0
  24. package/build/browser/GenerateContext/EnhancedOntologyDefinition.js +77 -0
  25. package/build/browser/GenerateContext/EnhancedOntologyDefinition.js.map +1 -0
  26. package/build/browser/GenerateContext/EnhancedQuery.d.ts +14 -0
  27. package/build/browser/GenerateContext/EnhancedQuery.d.ts.map +1 -0
  28. package/build/browser/GenerateContext/EnhancedQuery.js +42 -0
  29. package/build/browser/GenerateContext/EnhancedQuery.js.map +1 -0
  30. package/build/browser/GenerateContext/EnhancedSharedPropertyType.d.ts +8 -0
  31. package/build/browser/GenerateContext/EnhancedSharedPropertyType.d.ts.map +1 -0
  32. package/build/browser/GenerateContext/EnhancedSharedPropertyType.js +24 -0
  33. package/build/browser/GenerateContext/EnhancedSharedPropertyType.js.map +1 -0
  34. package/build/browser/GenerateContext/ForeignType.d.ts +10 -0
  35. package/build/browser/GenerateContext/ForeignType.d.ts.map +1 -0
  36. package/build/browser/GenerateContext/ForeignType.js +36 -0
  37. package/build/browser/GenerateContext/ForeignType.js.map +1 -0
  38. package/build/browser/GenerateContext/GenerateContext.d.ts +13 -0
  39. package/build/browser/GenerateContext/GenerateContext.d.ts.map +1 -0
  40. package/build/browser/GenerateContext/GenerateContext.js +17 -0
  41. package/build/browser/GenerateContext/GenerateContext.js.map +1 -0
  42. package/build/browser/GenerateContext/enhanceOntology.d.ts +4 -0
  43. package/build/browser/GenerateContext/enhanceOntology.d.ts.map +1 -0
  44. package/build/browser/GenerateContext/enhanceOntology.js +20 -0
  45. package/build/browser/GenerateContext/enhanceOntology.js.map +1 -0
  46. package/build/browser/MinimalFs.d.ts +10 -0
  47. package/build/browser/MinimalFs.d.ts.map +1 -0
  48. package/build/browser/MinimalFs.js +17 -0
  49. package/build/browser/MinimalFs.js.map +1 -0
  50. package/build/browser/WireOntologyDefinition.d.ts +4 -0
  51. package/build/browser/WireOntologyDefinition.d.ts.map +1 -0
  52. package/build/browser/WireOntologyDefinition.js +17 -0
  53. package/build/browser/WireOntologyDefinition.js.map +1 -0
  54. package/build/browser/generateClientSdkPackage.d.ts +47 -0
  55. package/build/browser/generateClientSdkPackage.d.ts.map +1 -0
  56. package/build/browser/generateClientSdkPackage.js +126 -0
  57. package/build/browser/generateClientSdkPackage.js.map +1 -0
  58. package/build/browser/generateClientSdkPackage.test.d.ts +2 -0
  59. package/build/browser/generateClientSdkPackage.test.d.ts.map +1 -0
  60. package/build/browser/generateClientSdkPackage.test.js +67 -0
  61. package/build/browser/generateClientSdkPackage.test.js.map +1 -0
  62. package/build/browser/index.d.ts +5 -0
  63. package/build/browser/index.d.ts.map +1 -0
  64. package/build/browser/index.js +17 -1286
  65. package/build/browser/index.js.map +1 -1
  66. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.d.ts +2 -0
  67. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.d.ts.map +1 -0
  68. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.js +23 -0
  69. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.js.map +1 -0
  70. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.d.ts +2 -0
  71. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.d.ts.map +1 -0
  72. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.js +46 -0
  73. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.js.map +1 -0
  74. package/build/browser/shared/getObjectImports.d.ts +4 -0
  75. package/build/browser/shared/getObjectImports.d.ts.map +1 -0
  76. package/build/browser/shared/getObjectImports.js +24 -0
  77. package/build/browser/shared/getObjectImports.js.map +1 -0
  78. package/build/browser/shared/getObjectTypeApiNamesFromQuery.d.ts +4 -0
  79. package/build/browser/shared/getObjectTypeApiNamesFromQuery.d.ts.map +1 -0
  80. package/build/browser/shared/getObjectTypeApiNamesFromQuery.js +27 -0
  81. package/build/browser/shared/getObjectTypeApiNamesFromQuery.js.map +1 -0
  82. package/build/browser/shared/getObjectTypesFromQueryDataType.d.ts +3 -0
  83. package/build/browser/shared/getObjectTypesFromQueryDataType.d.ts.map +1 -0
  84. package/build/browser/shared/getObjectTypesFromQueryDataType.js +57 -0
  85. package/build/browser/shared/getObjectTypesFromQueryDataType.js.map +1 -0
  86. package/build/browser/shared/propertyJsdoc.d.ts +6 -0
  87. package/build/browser/shared/propertyJsdoc.d.ts.map +1 -0
  88. package/build/browser/shared/propertyJsdoc.js +38 -0
  89. package/build/browser/shared/propertyJsdoc.js.map +1 -0
  90. package/build/browser/shared/sanitizeMetadata.d.ts +2 -0
  91. package/build/browser/shared/sanitizeMetadata.d.ts.map +1 -0
  92. package/build/browser/shared/sanitizeMetadata.js +33 -0
  93. package/build/browser/shared/sanitizeMetadata.js.map +1 -0
  94. package/build/browser/shared/sanitizeMetadata.test.d.ts +2 -0
  95. package/build/browser/shared/sanitizeMetadata.test.d.ts.map +1 -0
  96. package/build/browser/shared/sanitizeMetadata.test.js +44 -0
  97. package/build/browser/shared/sanitizeMetadata.test.js.map +1 -0
  98. package/build/browser/util/InMemoryFs.d.ts +7 -0
  99. package/build/browser/util/InMemoryFs.d.ts.map +1 -0
  100. package/build/browser/util/InMemoryFs.js +30 -0
  101. package/build/browser/util/InMemoryFs.js.map +1 -0
  102. package/build/browser/util/commaSeparatedIdentifiers.d.ts +2 -0
  103. package/build/browser/util/commaSeparatedIdentifiers.d.ts.map +1 -0
  104. package/build/browser/util/commaSeparatedIdentifiers.js +25 -0
  105. package/build/browser/util/commaSeparatedIdentifiers.js.map +1 -0
  106. package/build/browser/util/commaSeparatedTypeIdentifiers.d.ts +2 -0
  107. package/build/browser/util/commaSeparatedTypeIdentifiers.d.ts.map +1 -0
  108. package/build/browser/util/commaSeparatedTypeIdentifiers.js +19 -0
  109. package/build/browser/util/commaSeparatedTypeIdentifiers.js.map +1 -0
  110. package/build/browser/util/deleteUndefineds.d.ts +2 -0
  111. package/build/browser/util/deleteUndefineds.d.ts.map +1 -0
  112. package/build/browser/util/deleteUndefineds.js +19 -0
  113. package/build/browser/util/deleteUndefineds.js.map +1 -0
  114. package/build/browser/util/reservedKeywords.d.ts +2 -0
  115. package/build/browser/util/reservedKeywords.d.ts.map +1 -0
  116. package/build/browser/util/reservedKeywords.js +21 -0
  117. package/build/browser/util/reservedKeywords.js.map +1 -0
  118. package/build/browser/util/stringUnionFrom.d.ts +2 -0
  119. package/build/browser/util/stringUnionFrom.d.ts.map +1 -0
  120. package/build/browser/util/stringUnionFrom.js +23 -0
  121. package/build/browser/util/stringUnionFrom.js.map +1 -0
  122. package/build/browser/util/stringify.d.ts +20 -0
  123. package/build/browser/util/stringify.d.ts.map +1 -0
  124. package/build/browser/util/stringify.js +36 -0
  125. package/build/browser/util/stringify.js.map +1 -0
  126. package/build/browser/util/test/TodoWireOntology.d.ts +217 -0
  127. package/build/browser/util/test/TodoWireOntology.d.ts.map +1 -0
  128. package/build/browser/util/test/TodoWireOntology.js +232 -0
  129. package/build/browser/util/test/TodoWireOntology.js.map +1 -0
  130. package/build/browser/util/test/compileThis.d.ts +3 -0
  131. package/build/browser/util/test/compileThis.d.ts.map +1 -0
  132. package/build/browser/util/test/compileThis.js +41 -0
  133. package/build/browser/util/test/compileThis.js.map +1 -0
  134. package/build/browser/util/test/createMockMinimalFiles.d.ts +13 -0
  135. package/build/browser/util/test/createMockMinimalFiles.d.ts.map +1 -0
  136. package/build/browser/util/test/createMockMinimalFiles.js +37 -0
  137. package/build/browser/util/test/createMockMinimalFiles.js.map +1 -0
  138. package/build/browser/util/test/formatTs.d.ts +2 -0
  139. package/build/browser/util/test/formatTs.d.ts.map +1 -0
  140. package/build/browser/util/test/formatTs.js +32 -0
  141. package/build/browser/util/test/formatTs.js.map +1 -0
  142. package/build/browser/util/verifyOutDir.d.ts +9 -0
  143. package/build/browser/util/verifyOutDir.d.ts.map +1 -0
  144. package/build/browser/util/verifyOutDir.js +35 -0
  145. package/build/browser/util/verifyOutDir.js.map +1 -0
  146. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts +2 -0
  147. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts.map +1 -0
  148. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js +114 -0
  149. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js.map +1 -0
  150. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts +2 -0
  151. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts.map +1 -0
  152. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +273 -0
  153. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -0
  154. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.d.ts +4 -0
  155. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.d.ts.map +1 -0
  156. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.js +119 -0
  157. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.js.map +1 -0
  158. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts +2 -0
  159. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts.map +1 -0
  160. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js +1949 -0
  161. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -0
  162. package/build/browser/v2.0/generateMetadata.d.ts +3 -0
  163. package/build/browser/v2.0/generateMetadata.d.ts.map +1 -0
  164. package/build/browser/v2.0/generateMetadata.js +35 -0
  165. package/build/browser/v2.0/generateMetadata.js.map +1 -0
  166. package/build/browser/v2.0/generatePerActionDataFiles.d.ts +3 -0
  167. package/build/browser/v2.0/generatePerActionDataFiles.d.ts.map +1 -0
  168. package/build/browser/v2.0/generatePerActionDataFiles.js +240 -0
  169. package/build/browser/v2.0/generatePerActionDataFiles.js.map +1 -0
  170. package/build/browser/v2.0/generatePerActionDataFiles.test.d.ts +2 -0
  171. package/build/browser/v2.0/generatePerActionDataFiles.test.d.ts.map +1 -0
  172. package/build/browser/v2.0/generatePerActionDataFiles.test.js +51 -0
  173. package/build/browser/v2.0/generatePerActionDataFiles.test.js.map +1 -0
  174. package/build/browser/v2.0/generatePerQueryDataFiles.d.ts +9 -0
  175. package/build/browser/v2.0/generatePerQueryDataFiles.d.ts.map +1 -0
  176. package/build/browser/v2.0/generatePerQueryDataFiles.js +194 -0
  177. package/build/browser/v2.0/generatePerQueryDataFiles.js.map +1 -0
  178. package/build/browser/v2.0/generatePerQueryDataFiles.test.d.ts +2 -0
  179. package/build/browser/v2.0/generatePerQueryDataFiles.test.d.ts.map +1 -0
  180. package/build/browser/v2.0/generatePerQueryDataFiles.test.js +199 -0
  181. package/build/browser/v2.0/generatePerQueryDataFiles.test.js.map +1 -0
  182. package/build/browser/v2.0/getDescriptionIfPresent.d.ts +2 -0
  183. package/build/browser/v2.0/getDescriptionIfPresent.d.ts.map +1 -0
  184. package/build/browser/v2.0/getDescriptionIfPresent.js +24 -0
  185. package/build/browser/v2.0/getDescriptionIfPresent.js.map +1 -0
  186. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts +13 -0
  187. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +1 -0
  188. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js +205 -0
  189. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -0
  190. package/build/browser/validateWireOntologyAssumptions.d.ts +3 -0
  191. package/build/browser/validateWireOntologyAssumptions.d.ts.map +1 -0
  192. package/build/browser/validateWireOntologyAssumptions.js +33 -0
  193. package/build/browser/validateWireOntologyAssumptions.js.map +1 -0
  194. package/build/esm/GenerateContext/EnhanceCommon.js +17 -0
  195. package/build/esm/GenerateContext/EnhanceCommon.js.map +1 -0
  196. package/build/esm/GenerateContext/EnhancedAction.js +42 -0
  197. package/build/esm/GenerateContext/EnhancedAction.js.map +1 -0
  198. package/build/esm/GenerateContext/EnhancedBase.js +72 -0
  199. package/build/esm/GenerateContext/EnhancedBase.js.map +1 -0
  200. package/build/esm/GenerateContext/EnhancedInterfaceType.js +38 -0
  201. package/build/esm/GenerateContext/EnhancedInterfaceType.js.map +1 -0
  202. package/build/esm/GenerateContext/EnhancedObjectType.js +35 -0
  203. package/build/esm/GenerateContext/EnhancedObjectType.js.map +1 -0
  204. package/build/esm/GenerateContext/EnhancedOntologyDefinition.js +77 -0
  205. package/build/esm/GenerateContext/EnhancedOntologyDefinition.js.map +1 -0
  206. package/build/esm/GenerateContext/EnhancedQuery.js +42 -0
  207. package/build/esm/GenerateContext/EnhancedQuery.js.map +1 -0
  208. package/build/esm/GenerateContext/EnhancedSharedPropertyType.js +24 -0
  209. package/build/esm/GenerateContext/EnhancedSharedPropertyType.js.map +1 -0
  210. package/build/esm/GenerateContext/ForeignType.js +36 -0
  211. package/build/esm/GenerateContext/ForeignType.js.map +1 -0
  212. package/build/esm/GenerateContext/GenerateContext.js +17 -0
  213. package/build/esm/GenerateContext/GenerateContext.js.map +1 -0
  214. package/build/esm/GenerateContext/enhanceOntology.js +20 -0
  215. package/build/esm/GenerateContext/enhanceOntology.js.map +1 -0
  216. package/build/esm/MinimalFs.js +17 -0
  217. package/build/esm/MinimalFs.js.map +1 -0
  218. package/build/esm/WireOntologyDefinition.js +17 -0
  219. package/build/esm/WireOntologyDefinition.js.map +1 -0
  220. package/build/esm/generateClientSdkPackage.d.ts +1 -6
  221. package/build/esm/generateClientSdkPackage.d.ts.map +1 -1
  222. package/build/esm/generateClientSdkPackage.js +126 -0
  223. package/build/esm/generateClientSdkPackage.js.map +1 -0
  224. package/build/esm/generateClientSdkPackage.test.js +67 -0
  225. package/build/esm/generateClientSdkPackage.test.js.map +1 -0
  226. package/build/esm/index.js +17 -1286
  227. package/build/esm/index.js.map +1 -1
  228. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.js +23 -0
  229. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.js.map +1 -0
  230. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.test.js +46 -0
  231. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.test.js.map +1 -0
  232. package/build/esm/shared/getObjectImports.js +24 -0
  233. package/build/esm/shared/getObjectImports.js.map +1 -0
  234. package/build/esm/shared/getObjectTypeApiNamesFromQuery.js +27 -0
  235. package/build/esm/shared/getObjectTypeApiNamesFromQuery.js.map +1 -0
  236. package/build/esm/shared/getObjectTypesFromQueryDataType.js +57 -0
  237. package/build/esm/shared/getObjectTypesFromQueryDataType.js.map +1 -0
  238. package/build/esm/shared/propertyJsdoc.js +38 -0
  239. package/build/esm/shared/propertyJsdoc.js.map +1 -0
  240. package/build/esm/shared/sanitizeMetadata.js +33 -0
  241. package/build/esm/shared/sanitizeMetadata.js.map +1 -0
  242. package/build/esm/shared/sanitizeMetadata.test.js +44 -0
  243. package/build/esm/shared/sanitizeMetadata.test.js.map +1 -0
  244. package/build/esm/util/InMemoryFs.js +30 -0
  245. package/build/esm/util/InMemoryFs.js.map +1 -0
  246. package/build/esm/util/commaSeparatedIdentifiers.js +25 -0
  247. package/build/esm/util/commaSeparatedIdentifiers.js.map +1 -0
  248. package/build/esm/util/commaSeparatedTypeIdentifiers.js +19 -0
  249. package/build/esm/util/commaSeparatedTypeIdentifiers.js.map +1 -0
  250. package/build/esm/util/deleteUndefineds.js +19 -0
  251. package/build/esm/util/deleteUndefineds.js.map +1 -0
  252. package/build/esm/util/reservedKeywords.js +21 -0
  253. package/build/esm/util/reservedKeywords.js.map +1 -0
  254. package/build/esm/util/stringUnionFrom.js +23 -0
  255. package/build/esm/util/stringUnionFrom.js.map +1 -0
  256. package/build/esm/util/stringify.js +36 -0
  257. package/build/esm/util/stringify.js.map +1 -0
  258. package/build/esm/util/test/TodoWireOntology.js +232 -0
  259. package/build/esm/util/test/TodoWireOntology.js.map +1 -0
  260. package/build/esm/util/test/compileThis.js +41 -0
  261. package/build/esm/util/test/compileThis.js.map +1 -0
  262. package/build/esm/util/test/createMockMinimalFiles.js +37 -0
  263. package/build/esm/util/test/createMockMinimalFiles.js.map +1 -0
  264. package/build/esm/util/test/formatTs.js +32 -0
  265. package/build/esm/util/test/formatTs.js.map +1 -0
  266. package/build/esm/util/verifyOutDir.js +35 -0
  267. package/build/esm/util/verifyOutDir.js.map +1 -0
  268. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js +114 -0
  269. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js.map +1 -0
  270. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +273 -0
  271. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -0
  272. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.js +119 -0
  273. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.js.map +1 -0
  274. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js +1949 -0
  275. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -0
  276. package/build/esm/v2.0/generateMetadata.js +35 -0
  277. package/build/esm/v2.0/generateMetadata.js.map +1 -0
  278. package/build/esm/v2.0/generatePerActionDataFiles.d.ts.map +1 -1
  279. package/build/esm/v2.0/generatePerActionDataFiles.js +240 -0
  280. package/build/esm/v2.0/generatePerActionDataFiles.js.map +1 -0
  281. package/build/esm/v2.0/generatePerActionDataFiles.test.js +51 -0
  282. package/build/esm/v2.0/generatePerActionDataFiles.test.js.map +1 -0
  283. package/build/esm/v2.0/generatePerQueryDataFiles.js +194 -0
  284. package/build/esm/v2.0/generatePerQueryDataFiles.js.map +1 -0
  285. package/build/esm/v2.0/generatePerQueryDataFiles.test.js +199 -0
  286. package/build/esm/v2.0/generatePerQueryDataFiles.test.js.map +1 -0
  287. package/build/esm/v2.0/getDescriptionIfPresent.js +24 -0
  288. package/build/esm/v2.0/getDescriptionIfPresent.js.map +1 -0
  289. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js +205 -0
  290. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -0
  291. package/build/esm/validateWireOntologyAssumptions.js +33 -0
  292. package/build/esm/validateWireOntologyAssumptions.js.map +1 -0
  293. package/package.json +6 -8
@@ -0,0 +1,51 @@
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
+ import * as path from "node:path";
17
+ import { describe, expect, it } from "vitest";
18
+ import { enhanceOntology } from "../GenerateContext/enhanceOntology.js";
19
+ import { createMockMinimalFiles } from "../util/test/createMockMinimalFiles.js";
20
+ import { TodoWireOntology } from "../util/test/TodoWireOntology.js";
21
+ import { generatePerActionDataFiles } from "./generatePerActionDataFiles.js";
22
+ describe(generatePerActionDataFiles, () => {
23
+ it("guards against empty actions", async () => {
24
+ const helper = createMockMinimalFiles();
25
+ const BASE_PATH = "/foo";
26
+ const sanitizedOntology = {
27
+ ...TodoWireOntology,
28
+ actionTypes: {}
29
+ };
30
+ await generatePerActionDataFiles({
31
+ sanitizedOntology,
32
+ fs: helper.minimalFiles,
33
+ outDir: BASE_PATH,
34
+ ontology: enhanceOntology(sanitizedOntology, undefined, new Map(), "")
35
+ });
36
+ expect(helper.getFiles()[`${BASE_PATH}/ontology/actions.ts`]).toEqual("export {};\n");
37
+ });
38
+ it("imports object types correctly with array params in actions", async () => {
39
+ const helper = createMockMinimalFiles();
40
+ const BASE_PATH = "/foo/ontology/actions";
41
+ const sanitizedOntology = TodoWireOntology;
42
+ await generatePerActionDataFiles({
43
+ sanitizedOntology,
44
+ fs: helper.minimalFiles,
45
+ outDir: path.join(BASE_PATH, "..", ".."),
46
+ ontology: enhanceOntology(sanitizedOntology, undefined, new Map(), "")
47
+ });
48
+ expect(helper.getFiles()[`${BASE_PATH}/deleteTodos.ts`]).toContain("import type { Todo } from '../objects/Todo';\n");
49
+ });
50
+ });
51
+ //# sourceMappingURL=generatePerActionDataFiles.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generatePerActionDataFiles.test.js","names":["path","describe","expect","it","enhanceOntology","createMockMinimalFiles","TodoWireOntology","generatePerActionDataFiles","helper","BASE_PATH","sanitizedOntology","actionTypes","fs","minimalFiles","outDir","ontology","undefined","Map","getFiles","toEqual","join","toContain"],"sources":["generatePerActionDataFiles.test.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 */\nimport * as path from \"node:path\";\nimport { describe, expect, it } from \"vitest\";\nimport { enhanceOntology } from \"../GenerateContext/enhanceOntology.js\";\nimport { createMockMinimalFiles } from \"../util/test/createMockMinimalFiles.js\";\nimport { TodoWireOntology } from \"../util/test/TodoWireOntology.js\";\nimport { generatePerActionDataFiles } from \"./generatePerActionDataFiles.js\";\ndescribe(generatePerActionDataFiles, () => {\n it(\"guards against empty actions\", async () => {\n const helper = createMockMinimalFiles();\n const BASE_PATH = \"/foo\";\n const sanitizedOntology = { ...TodoWireOntology, actionTypes: {} };\n await generatePerActionDataFiles({\n sanitizedOntology,\n fs: helper.minimalFiles,\n outDir: BASE_PATH,\n ontology: enhanceOntology(sanitizedOntology, undefined, new Map(), \"\"),\n });\n expect(helper.getFiles()[`${BASE_PATH}/ontology/actions.ts`]).toEqual(\"export {};\\n\");\n });\n it(\"imports object types correctly with array params in actions\", async () => {\n const helper = createMockMinimalFiles();\n const BASE_PATH = \"/foo/ontology/actions\";\n const sanitizedOntology = TodoWireOntology;\n await generatePerActionDataFiles({\n sanitizedOntology,\n fs: helper.minimalFiles,\n outDir: path.join(BASE_PATH, \"..\", \"..\"),\n ontology: enhanceOntology(sanitizedOntology, undefined, new Map(), \"\"),\n });\n expect(helper.getFiles()[`${BASE_PATH}/deleteTodos.ts`]).toContain(\"import type { Todo } from '../objects/Todo';\\n\");\n });\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,SAASC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AAC7C,SAASC,eAAe,QAAQ,uCAAuC;AACvE,SAASC,sBAAsB,QAAQ,wCAAwC;AAC/E,SAASC,gBAAgB,QAAQ,kCAAkC;AACnE,SAASC,0BAA0B,QAAQ,iCAAiC;AAC5EN,QAAQ,CAACM,0BAA0B,EAAE,MAAM;EACvCJ,EAAE,CAAC,8BAA8B,EAAE,YAAY;IAC3C,MAAMK,MAAM,GAAGH,sBAAsB,CAAC,CAAC;IACvC,MAAMI,SAAS,GAAG,MAAM;IACxB,MAAMC,iBAAiB,GAAG;MAAE,GAAGJ,gBAAgB;MAAEK,WAAW,EAAE,CAAC;IAAE,CAAC;IAClE,MAAMJ,0BAA0B,CAAC;MAC7BG,iBAAiB;MACjBE,EAAE,EAAEJ,MAAM,CAACK,YAAY;MACvBC,MAAM,EAAEL,SAAS;MACjBM,QAAQ,EAAEX,eAAe,CAACM,iBAAiB,EAAEM,SAAS,EAAE,IAAIC,GAAG,CAAC,CAAC,EAAE,EAAE;IACzE,CAAC,CAAC;IACFf,MAAM,CAACM,MAAM,CAACU,QAAQ,CAAC,CAAC,CAAC,GAAGT,SAAS,sBAAsB,CAAC,CAAC,CAACU,OAAO,CAAC,cAAc,CAAC;EACzF,CAAC,CAAC;EACFhB,EAAE,CAAC,6DAA6D,EAAE,YAAY;IAC1E,MAAMK,MAAM,GAAGH,sBAAsB,CAAC,CAAC;IACvC,MAAMI,SAAS,GAAG,uBAAuB;IACzC,MAAMC,iBAAiB,GAAGJ,gBAAgB;IAC1C,MAAMC,0BAA0B,CAAC;MAC7BG,iBAAiB;MACjBE,EAAE,EAAEJ,MAAM,CAACK,YAAY;MACvBC,MAAM,EAAEd,IAAI,CAACoB,IAAI,CAACX,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC;MACxCM,QAAQ,EAAEX,eAAe,CAACM,iBAAiB,EAAEM,SAAS,EAAE,IAAIC,GAAG,CAAC,CAAC,EAAE,EAAE;IACzE,CAAC,CAAC;IACFf,MAAM,CAACM,MAAM,CAACU,QAAQ,CAAC,CAAC,CAAC,GAAGT,SAAS,iBAAiB,CAAC,CAAC,CAACY,SAAS,CAAC,gDAAgD,CAAC;EACxH,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,9 @@
1
+ import type { QueryParameterDefinition } from "@osdk/api";
2
+ import type { EnhancedOntologyDefinition } from "../GenerateContext/EnhancedOntologyDefinition.js";
3
+ import type { GenerateContext } from "../GenerateContext/GenerateContext.js";
4
+ export declare function generatePerQueryDataFilesV2({ fs, outDir: rootOutDir, ontology, importExt, }: Pick<GenerateContext, "fs" | "outDir" | "importExt" | "ontology">, v2: boolean): Promise<void>;
5
+ export declare function queryParamJsDoc(param: QueryParameterDefinition<any>, { apiName }: {
6
+ apiName: string;
7
+ }): string;
8
+ export declare function getQueryParamType(enhancedOntology: EnhancedOntologyDefinition, input: QueryParameterDefinition<any, any>, type: "Param" | "Result"): string;
9
+ //# sourceMappingURL=generatePerQueryDataFiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generatePerQueryDataFiles.d.ts","sourceRoot":"","sources":["../../../src/v2.0/generatePerQueryDataFiles.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAQ1D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAEnG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAS7E,wBAAsB,2BAA2B,CAC/C,EACE,EAAE,EACF,MAAM,EAAE,UAAU,EAClB,QAAQ,EACR,SAAc,GACf,EAAE,IAAI,CACL,eAAe,EACb,IAAI,GACJ,QAAQ,GACR,WAAW,GACX,UAAU,CACb,EACD,EAAE,EAAE,OAAO,iBA+BZ;AAoKD,wBAAgB,eAAe,CAC7B,KAAK,EAAE,wBAAwB,CAAC,GAAG,CAAC,EACpC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,UAcjC;AAED,wBAAgB,iBAAiB,CAC/B,gBAAgB,EAAE,0BAA0B,EAC5C,KAAK,EAAE,wBAAwB,CAAC,GAAG,EAAE,GAAG,CAAC,EACzC,IAAI,EAAE,OAAO,GAAG,QAAQ,GACvB,MAAM,CAyDR"}
@@ -0,0 +1,194 @@
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
+ import { wireQueryDataTypeToQueryDataTypeDefinition, wireQueryParameterV2ToQueryParameterDefinition as paramToDef, wireQueryTypeV2ToSdkQueryDefinitionNoParams } from "@osdk/generator-converters";
17
+ import path from "node:path";
18
+ import { getObjectImports } from "../shared/getObjectImports.js";
19
+ import { getObjectTypeApiNamesFromQuery } from "../shared/getObjectTypeApiNamesFromQuery.js";
20
+ import { deleteUndefineds } from "../util/deleteUndefineds.js";
21
+ import { stringify } from "../util/stringify.js";
22
+ import { formatTs } from "../util/test/formatTs.js";
23
+ import { getDescriptionIfPresent } from "./getDescriptionIfPresent.js";
24
+ export async function generatePerQueryDataFilesV2({
25
+ fs,
26
+ outDir: rootOutDir,
27
+ ontology,
28
+ importExt = ""
29
+ }) {
30
+ const relOutDir = path.join(".", "ontology", "queries");
31
+ const outDir = path.join(rootOutDir, "ontology", "queries");
32
+ await fs.mkdir(outDir, {
33
+ recursive: true
34
+ });
35
+ await Promise.all(Object.values(ontology.queryTypes).map(async query => {
36
+ await generateV2QueryFile(fs, outDir, relOutDir, query, importExt, ontology);
37
+ }));
38
+ await fs.writeFile(`${outDir}.ts`, await formatTs(`
39
+ ${Object.values(ontology.queryTypes).map(query => `export * from "${query.getImportPathRelTo(relOutDir)}";`).join("\n")}
40
+ ${Object.keys(ontology.queryTypes).length === 0 ? "export {};" : ""}
41
+ `));
42
+ }
43
+ async function generateV2QueryFile(fs, outDir, relOutDir, query, importExt, ontology) {
44
+ const relFilePath = path.join(relOutDir, `${query.shortApiName}.ts`);
45
+ const objectTypes = getObjectTypeApiNamesFromQuery(query);
46
+ const objectTypeObjects = new Set(objectTypes.map(o => ontology.requireObjectType(o)));
47
+ const importObjects = getObjectImports(objectTypeObjects, "", relFilePath, true);
48
+ const baseProps = deleteUndefineds(wireQueryTypeV2ToSdkQueryDefinitionNoParams(query.raw));
49
+ const outputBase = deleteUndefineds(wireQueryDataTypeToQueryDataTypeDefinition(query.output));
50
+ const referencedObjectTypes = objectTypes.length > 0 ? objectTypes.map(apiNameObj => `"${apiNameObj}"`).join("|") : "never";
51
+ await fs.writeFile(path.join(outDir, `${query.shortApiName}.ts`), await formatTs(`
52
+ import type { QueryDefinition , VersionBound} from "@osdk/api";
53
+ import type { QueryParam, QueryResult } from "@osdk/api";
54
+ import type { $ExpectedClientVersion } from "../../OntologyMetadata${importExt}";
55
+ import { $osdkMetadata} from "../../OntologyMetadata${importExt}";
56
+ ${importObjects}
57
+
58
+ export namespace ${query.shortApiName} {
59
+ export interface Signature {
60
+ ${getDescriptionIfPresent(query.description)}
61
+ (${Object.keys(query.parameters).length > 0 ? `query: ${query.paramsIdentifier}` : ""}): Promise<${getQueryParamType(ontology, paramToDef({
62
+ dataType: query.output
63
+ }), "Result")}>
64
+ }
65
+
66
+ ${Object.keys(query.parameters).length > 0 ? `
67
+ export interface Parameters {
68
+ ${stringify(query.parameters, {
69
+ "*": (parameter, formatter, apiName) => {
70
+ const q = paramToDef(parameter);
71
+ return [`
72
+ ${queryParamJsDoc(paramToDef(parameter), {
73
+ apiName
74
+ })}readonly "${apiName}"${q.nullable ? "?" : ""}`, `${getQueryParamType(ontology, q, "Param")}`];
75
+ }
76
+ })}
77
+ }
78
+
79
+ ` : ""}
80
+
81
+
82
+
83
+ }
84
+
85
+ export interface ${query.shortApiName} extends QueryDefinition<
86
+ "${query.fullApiName}",
87
+ ${referencedObjectTypes},
88
+ ${query.shortApiName}.Signature
89
+ >, VersionBound<$ExpectedClientVersion>{
90
+ __DefinitionMetadata?: {
91
+ ${stringify(baseProps)}
92
+ parameters: {
93
+ ${parameterDefsForType(ontology, query)}
94
+ };
95
+ output: {
96
+ ${stringify(outputBase)},
97
+ ${getLineFor__OsdkTargetType(ontology, query.output)}
98
+ };
99
+ signature: ${query.shortApiName}.Signature;
100
+ },
101
+ ${stringify(baseProps, {
102
+ "description": () => undefined,
103
+ "displayName": () => undefined,
104
+ "rid": () => undefined
105
+ })},
106
+ osdkMetadata: typeof $osdkMetadata;
107
+ }
108
+
109
+
110
+ export const ${query.shortApiName}: ${query.definitionIdentifier} = {
111
+ ${stringify(baseProps, {
112
+ "description": () => undefined,
113
+ "displayName": () => undefined,
114
+ "rid": () => undefined
115
+ })},
116
+ osdkMetadata: $osdkMetadata
117
+ };
118
+ `));
119
+ }
120
+ function parametersForConst(query) {
121
+ return stringify(query.parameters, {
122
+ "*": (parameter, formatter) => formatter(deleteUndefineds(paramToDef(parameter)))
123
+ });
124
+ }
125
+ function parameterDefsForType(ontology, query) {
126
+ return stringify(query.parameters, {
127
+ "*": (parameter, valueFormatter, apiName) => [`${queryParamJsDoc(paramToDef(parameter), {
128
+ apiName
129
+ })} ${apiName}`, ` {
130
+ ${stringify(deleteUndefineds(paramToDef(parameter)))},
131
+ ${getLineFor__OsdkTargetType(ontology, parameter.dataType)}
132
+ }`]
133
+ });
134
+ }
135
+ function getLineFor__OsdkTargetType(ontology, qdt) {
136
+ if (qdt.type === "object" || qdt.type === "objectSet") {
137
+ return `__OsdkTargetType?: ${ontology.requireObjectType(qdt.objectTypeApiName).getImportedDefinitionIdentifier(true)}`;
138
+ }
139
+ return "";
140
+ }
141
+ export function queryParamJsDoc(param, {
142
+ apiName
143
+ }) {
144
+ let ret = `/**\n`;
145
+ if (param.description) {
146
+ if (param.description) {
147
+ ret += ` * description: ${param.description}\n`;
148
+ }
149
+ } else {
150
+ ret += ` * (no ontology metadata)\n`;
151
+ }
152
+ ret += ` */\n`;
153
+ return ret;
154
+ }
155
+ export function getQueryParamType(enhancedOntology, input, type) {
156
+ let inner = `unknown /* ${input.type} */`;
157
+ switch (input.type) {
158
+ case "date":
159
+ inner = `Query${type}.PrimitiveType<${JSON.stringify("datetime")}>`;
160
+ break;
161
+ case "attachment":
162
+ case "boolean":
163
+ case "double":
164
+ case "float":
165
+ case "integer":
166
+ case "long":
167
+ case "string":
168
+ case "struct":
169
+ case "threeDimensionalAggregation":
170
+ case "timestamp":
171
+ case "twoDimensionalAggregation":
172
+ inner = `Query${type}.PrimitiveType<${JSON.stringify(input.type)}>`;
173
+ break;
174
+ case "object":
175
+ inner = `Query${type}.ObjectType<${enhancedOntology.requireObjectType(input.object).getImportedDefinitionIdentifier(true)}>`;
176
+ break;
177
+ case "objectSet":
178
+ inner = `Query${type}.ObjectSetType<${enhancedOntology.requireObjectType(input.objectSet).getImportedDefinitionIdentifier(true)}>`;
179
+ break;
180
+ case "set":
181
+ inner = `${type === "Param" ? "Readonly" : ""}Set<${getQueryParamType(enhancedOntology, input.set, type)}>`;
182
+ break;
183
+ case "union":
184
+ inner = input.union.map(u => getQueryParamType(enhancedOntology, u, type)).join(" | ");
185
+ break;
186
+ }
187
+ if (input.multiplicity && type === "Param") {
188
+ return `ReadonlyArray<${inner}>`;
189
+ } else if (input.multiplicity) {
190
+ return `Array<${inner}>`;
191
+ }
192
+ return inner;
193
+ }
194
+ //# sourceMappingURL=generatePerQueryDataFiles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generatePerQueryDataFiles.js","names":["wireQueryDataTypeToQueryDataTypeDefinition","wireQueryParameterV2ToQueryParameterDefinition","paramToDef","wireQueryTypeV2ToSdkQueryDefinitionNoParams","path","getObjectImports","getObjectTypeApiNamesFromQuery","deleteUndefineds","stringify","formatTs","getDescriptionIfPresent","generatePerQueryDataFilesV2","fs","outDir","rootOutDir","ontology","importExt","relOutDir","join","mkdir","recursive","Promise","all","Object","values","queryTypes","map","query","generateV2QueryFile","writeFile","getImportPathRelTo","keys","length","relFilePath","shortApiName","objectTypes","objectTypeObjects","Set","o","requireObjectType","importObjects","baseProps","raw","outputBase","output","referencedObjectTypes","apiNameObj","description","parameters","paramsIdentifier","getQueryParamType","dataType","*","parameter","formatter","apiName","q","queryParamJsDoc","nullable","fullApiName","parameterDefsForType","getLineFor__OsdkTargetType","undefined","displayName","rid","definitionIdentifier","parametersForConst","valueFormatter","qdt","type","objectTypeApiName","getImportedDefinitionIdentifier","param","ret","enhancedOntology","input","inner","JSON","object","objectSet","set","union","u","multiplicity"],"sources":["generatePerQueryDataFiles.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 */\nimport { wireQueryDataTypeToQueryDataTypeDefinition, wireQueryParameterV2ToQueryParameterDefinition as paramToDef, wireQueryTypeV2ToSdkQueryDefinitionNoParams, } from \"@osdk/generator-converters\";\nimport path from \"node:path\";\nimport { getObjectImports } from \"../shared/getObjectImports.js\";\nimport { getObjectTypeApiNamesFromQuery } from \"../shared/getObjectTypeApiNamesFromQuery.js\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { stringify } from \"../util/stringify.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nimport { getDescriptionIfPresent } from \"./getDescriptionIfPresent.js\";\nexport async function generatePerQueryDataFilesV2({ fs, outDir: rootOutDir, ontology, importExt = \"\", }, v2) {\n const relOutDir = path.join(\".\", \"ontology\", \"queries\");\n const outDir = path.join(rootOutDir, \"ontology\", \"queries\");\n await fs.mkdir(outDir, { recursive: true });\n await Promise.all(Object.values(ontology.queryTypes).map(async (query) => {\n await generateV2QueryFile(fs, outDir, relOutDir, query, importExt, ontology);\n }));\n const indexFilePath = `${outDir}.ts`;\n await fs.writeFile(indexFilePath, await formatTs(`\n ${Object.values(ontology.queryTypes).map(query => `export * from \"${query.getImportPathRelTo(relOutDir)}\";`)\n .join(\"\\n\")}\n ${Object.keys(ontology.queryTypes).length === 0 ? \"export {};\" : \"\"}\n `));\n}\nasync function generateV2QueryFile(fs, outDir, relOutDir, query, importExt, ontology) {\n const relFilePath = path.join(relOutDir, `${query.shortApiName}.ts`);\n const objectTypes = getObjectTypeApiNamesFromQuery(query);\n const objectTypeObjects = new Set(objectTypes.map(o => ontology.requireObjectType(o)));\n const importObjects = getObjectImports(objectTypeObjects, \"\", relFilePath, true);\n const baseProps = deleteUndefineds(wireQueryTypeV2ToSdkQueryDefinitionNoParams(query.raw));\n const outputBase = deleteUndefineds(wireQueryDataTypeToQueryDataTypeDefinition(query.output));\n const referencedObjectTypes = objectTypes.length > 0\n ? objectTypes.map(apiNameObj => `\"${apiNameObj}\"`).join(\"|\")\n : \"never\";\n await fs.writeFile(path.join(outDir, `${query.shortApiName}.ts`), await formatTs(`\n import type { QueryDefinition , VersionBound} from \"@osdk/api\";\n import type { QueryParam, QueryResult } from \"@osdk/api\";\n import type { $ExpectedClientVersion } from \"../../OntologyMetadata${importExt}\";\n import { $osdkMetadata} from \"../../OntologyMetadata${importExt}\";\n ${importObjects}\n\n export namespace ${query.shortApiName} {\n export interface Signature {\n ${getDescriptionIfPresent(query.description)}\n (${Object.keys(query.parameters).length > 0\n ? `query: ${query.paramsIdentifier}`\n : \"\"}): Promise<${getQueryParamType(ontology, paramToDef({ dataType: query.output }), \"Result\")}>\n }\n\n ${Object.keys(query.parameters).length > 0\n ? `\n export interface Parameters {\n ${stringify(query.parameters, {\n \"*\": (parameter, formatter, apiName) => {\n const q = paramToDef(parameter);\n return [\n `\n ${queryParamJsDoc(paramToDef(parameter), { apiName })}readonly \"${apiName}\"${q.nullable ? \"?\" : \"\"}`,\n `${getQueryParamType(ontology, q, \"Param\")}`,\n ];\n },\n })}\n }\n \n `\n : \"\"}\n\n \n\n }\n\n export interface ${query.shortApiName} extends QueryDefinition<\n \"${query.fullApiName}\", \n ${referencedObjectTypes},\n ${query.shortApiName}.Signature\n >, VersionBound<$ExpectedClientVersion>{\n __DefinitionMetadata?: {\n ${stringify(baseProps)}\n parameters: {\n ${parameterDefsForType(ontology, query)}\n };\n output: {\n ${stringify(outputBase)},\n ${getLineFor__OsdkTargetType(ontology, query.output)}\n };\n signature: ${query.shortApiName}.Signature;\n }, \n ${stringify(baseProps, {\n \"description\": () => undefined,\n \"displayName\": () => undefined,\n \"rid\": () => undefined,\n })}, \n osdkMetadata: typeof $osdkMetadata;\n }\n\n\n export const ${query.shortApiName}: ${query.definitionIdentifier} = {\n ${stringify(baseProps, {\n \"description\": () => undefined,\n \"displayName\": () => undefined,\n \"rid\": () => undefined,\n })},\n osdkMetadata: $osdkMetadata\n };\n `));\n}\nfunction parametersForConst(query) {\n return stringify(query.parameters, {\n \"*\": (parameter, formatter) => formatter(deleteUndefineds(paramToDef(parameter))),\n });\n}\nfunction parameterDefsForType(ontology, query) {\n return stringify(query.parameters, {\n \"*\": (parameter, valueFormatter, apiName) => [\n `${queryParamJsDoc(paramToDef(parameter), { apiName })} ${apiName}`,\n ` {\n ${stringify(deleteUndefineds(paramToDef(parameter)))},\n ${getLineFor__OsdkTargetType(ontology, parameter.dataType)}\n }`,\n ],\n });\n}\nfunction getLineFor__OsdkTargetType(ontology, qdt) {\n if (qdt.type === \"object\" || qdt.type === \"objectSet\") {\n return `__OsdkTargetType?: ${ontology.requireObjectType(qdt.objectTypeApiName).getImportedDefinitionIdentifier(true)}`;\n }\n return \"\";\n}\nexport function queryParamJsDoc(param, { apiName }) {\n let ret = `/**\\n`;\n if (param.description) {\n if (param.description) {\n ret += ` * description: ${param.description}\\n`;\n }\n }\n else {\n ret += ` * (no ontology metadata)\\n`;\n }\n ret += ` */\\n`;\n return ret;\n}\nexport function getQueryParamType(enhancedOntology, input, type) {\n let inner = `unknown /* ${input.type} */`;\n switch (input.type) {\n case \"date\":\n inner = `Query${type}.PrimitiveType<${JSON.stringify(\"datetime\")}>`;\n break;\n case \"attachment\":\n case \"boolean\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"string\":\n case \"struct\":\n case \"threeDimensionalAggregation\":\n case \"timestamp\":\n case \"twoDimensionalAggregation\":\n inner = `Query${type}.PrimitiveType<${JSON.stringify(input.type)}>`;\n break;\n case \"object\":\n inner = `Query${type}.ObjectType<${enhancedOntology.requireObjectType(input.object)\n .getImportedDefinitionIdentifier(true)}>`;\n break;\n case \"objectSet\":\n inner = `Query${type}.ObjectSetType<${enhancedOntology.requireObjectType(input.objectSet)\n .getImportedDefinitionIdentifier(true)}>`;\n break;\n case \"set\":\n inner = `${type === \"Param\" ? \"Readonly\" : \"\"}Set<${getQueryParamType(enhancedOntology, input.set, type)}>`;\n break;\n case \"union\":\n inner = input.union.map((u) => getQueryParamType(enhancedOntology, u, type)).join(\" | \");\n break;\n }\n if (input.multiplicity && type === \"Param\") {\n return `ReadonlyArray<${inner}>`;\n }\n else if (input.multiplicity) {\n return `Array<${inner}>`;\n }\n return inner;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,0CAA0C,EAAEC,8CAA8C,IAAIC,UAAU,EAAEC,2CAA2C,QAAS,4BAA4B;AACnM,OAAOC,IAAI,MAAM,WAAW;AAC5B,SAASC,gBAAgB,QAAQ,+BAA+B;AAChE,SAASC,8BAA8B,QAAQ,6CAA6C;AAC5F,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,SAAS,QAAQ,sBAAsB;AAChD,SAASC,QAAQ,QAAQ,0BAA0B;AACnD,SAASC,uBAAuB,QAAQ,8BAA8B;AACtE,OAAO,eAAeC,2BAA2BA,CAAC;EAAEC,EAAE;EAAEC,MAAM,EAAEC,UAAU;EAAEC,QAAQ;EAAEC,SAAS,GAAG;AAAI,CAAC,EAAM;EACzG,MAAMC,SAAS,GAAGb,IAAI,CAACc,IAAI,CAAC,GAAG,EAAE,UAAU,EAAE,SAAS,CAAC;EACvD,MAAML,MAAM,GAAGT,IAAI,CAACc,IAAI,CAACJ,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC;EAC3D,MAAMF,EAAE,CAACO,KAAK,CAACN,MAAM,EAAE;IAAEO,SAAS,EAAE;EAAK,CAAC,CAAC;EAC3C,MAAMC,OAAO,CAACC,GAAG,CAACC,MAAM,CAACC,MAAM,CAACT,QAAQ,CAACU,UAAU,CAAC,CAACC,GAAG,CAAC,MAAOC,KAAK,IAAK;IACtE,MAAMC,m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ACI,IAAID,KAAK,CAACQ,YAAY,EAAE;IACzB,OAAO,SAASP,KAAK,GAAG;EAC5B;EACA,OAAOA,KAAK;AAChB","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=generatePerQueryDataFiles.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generatePerQueryDataFiles.test.d.ts","sourceRoot":"","sources":["../../../src/v2.0/generatePerQueryDataFiles.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,199 @@
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
+ import * as ts from "typescript";
17
+ import { describe, expect, it } from "vitest";
18
+ import { enhanceOntology } from "../GenerateContext/enhanceOntology.js";
19
+ import { createMockMinimalFiles } from "../util/test/createMockMinimalFiles.js";
20
+ import { TodoWireOntology } from "../util/test/TodoWireOntology.js";
21
+ import { generatePerQueryDataFilesV2 } from "./generatePerQueryDataFiles.js";
22
+ describe("generatePerQueryDataFiles", () => {
23
+ it("is stable v2", async () => {
24
+ const helper = createMockMinimalFiles();
25
+ await generatePerQueryDataFilesV2({
26
+ fs: helper.minimalFiles,
27
+ ontology: enhanceOntology(TodoWireOntology, undefined, new Map(), ".js"),
28
+ outDir: "/foo",
29
+ importExt: ".js"
30
+ }, true);
31
+ expect(helper.getFiles()).toMatchInlineSnapshot(`
32
+ {
33
+ "/foo/ontology/queries.ts": "export * from './queries/getCount.js';
34
+ export * from './queries/returnsTodo.js';
35
+ ",
36
+ "/foo/ontology/queries/getCount.ts": "import type { QueryDefinition, VersionBound } from '@osdk/api';
37
+ import type { QueryParam, QueryResult } from '@osdk/api';
38
+ import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';
39
+ import { $osdkMetadata } from '../../OntologyMetadata.js';
40
+
41
+ export namespace getCount {
42
+ export interface Signature {
43
+ (query: getCount.Parameters): Promise<QueryResult.PrimitiveType<'integer'>>;
44
+ }
45
+
46
+ export interface Parameters {
47
+ /**
48
+ * (no ontology metadata)
49
+ */
50
+ readonly completed: QueryParam.PrimitiveType<'boolean'>;
51
+ }
52
+ }
53
+
54
+ export interface getCount
55
+ extends QueryDefinition<'getCount', never, getCount.Signature>,
56
+ VersionBound<$ExpectedClientVersion> {
57
+ __DefinitionMetadata?: {
58
+ apiName: 'getCount';
59
+ rid: 'rid.query.1';
60
+ type: 'query';
61
+ version: '0';
62
+ parameters: {
63
+ /**
64
+ * (no ontology metadata)
65
+ */
66
+ completed: {
67
+ nullable: false;
68
+ type: 'boolean';
69
+ };
70
+ };
71
+ output: {
72
+ nullable: false;
73
+ type: 'integer';
74
+ };
75
+ signature: getCount.Signature;
76
+ };
77
+ apiName: 'getCount';
78
+ type: 'query';
79
+ version: '0';
80
+ osdkMetadata: typeof $osdkMetadata;
81
+ }
82
+
83
+ export const getCount: getCount = {
84
+ apiName: 'getCount',
85
+ type: 'query',
86
+ version: '0',
87
+ osdkMetadata: $osdkMetadata,
88
+ };
89
+ ",
90
+ "/foo/ontology/queries/returnsTodo.ts": "import type { QueryDefinition, VersionBound } from '@osdk/api';
91
+ import type { QueryParam, QueryResult } from '@osdk/api';
92
+ import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';
93
+ import { $osdkMetadata } from '../../OntologyMetadata.js';
94
+ import type { Todo } from '../objects/Todo.js';
95
+
96
+ export namespace returnsTodo {
97
+ export interface Signature {
98
+ (query: returnsTodo.Parameters): Promise<QueryResult.ObjectType<Todo>>;
99
+ }
100
+
101
+ export interface Parameters {
102
+ /**
103
+ * description: Random desc so we test jsdoc
104
+ */
105
+ readonly someTodo: QueryParam.ObjectType<Todo>;
106
+ }
107
+ }
108
+
109
+ export interface returnsTodo
110
+ extends QueryDefinition<'returnsTodo', 'Todo', returnsTodo.Signature>,
111
+ VersionBound<$ExpectedClientVersion> {
112
+ __DefinitionMetadata?: {
113
+ apiName: 'returnsTodo';
114
+ rid: 'rid.query.2';
115
+ type: 'query';
116
+ version: '0';
117
+ parameters: {
118
+ /**
119
+ * description: Random desc so we test jsdoc
120
+ */
121
+ someTodo: {
122
+ description: 'Random desc so we test jsdoc';
123
+ nullable: false;
124
+ object: 'Todo';
125
+ type: 'object';
126
+ __OsdkTargetType?: Todo;
127
+ };
128
+ };
129
+ output: {
130
+ nullable: false;
131
+ object: 'Todo';
132
+ type: 'object';
133
+ __OsdkTargetType?: Todo;
134
+ };
135
+ signature: returnsTodo.Signature;
136
+ };
137
+ apiName: 'returnsTodo';
138
+ type: 'query';
139
+ version: '0';
140
+ osdkMetadata: typeof $osdkMetadata;
141
+ }
142
+
143
+ export const returnsTodo: returnsTodo = {
144
+ apiName: 'returnsTodo',
145
+ type: 'query',
146
+ version: '0',
147
+ osdkMetadata: $osdkMetadata,
148
+ };
149
+ ",
150
+ }
151
+ `);
152
+ await helper.minimalFiles.writeFile("/bar/test.ts", `
153
+ import {returnsTodo} from "/foo/ontology/queries/returnsTodo.ts";
154
+
155
+ returnsTodo({someTodo:/*marker*/})
156
+ `);
157
+ const rootFileNames = Object.keys(helper.getFiles());
158
+ console.log(rootFileNames);
159
+ const files = {};
160
+ // initialize the list of files
161
+ rootFileNames.forEach(fileName => {
162
+ files[fileName] = {
163
+ version: 0
164
+ };
165
+ });
166
+ const servicesHost = {
167
+ getScriptFileNames: () => Object.keys(helper.getFiles()),
168
+ getScriptVersion: fileName => files[fileName] && files[fileName].version.toString(),
169
+ getScriptSnapshot: fileName => {
170
+ if (!helper.getFiles()[fileName]) {
171
+ return undefined;
172
+ }
173
+ return ts.ScriptSnapshot.fromString(helper.getFiles()[fileName]);
174
+ },
175
+ getCurrentDirectory: () => "/bar",
176
+ getCompilationSettings: () => ({}),
177
+ getDefaultLibFileName: options => ts.getDefaultLibFilePath(options),
178
+ fileExists: path => {
179
+ console.log(path);
180
+ return helper.getFiles()[path] !== undefined;
181
+ },
182
+ readFile: path => {
183
+ console.log("readFile: ", path);
184
+ return helper.getFiles()[path];
185
+ },
186
+ readDirectory: (path, extensions, exclude, include, depth) => {
187
+ console.log("readDirectory", path);
188
+ return ts.sys.readDirectory(path, extensions, exclude, include, depth);
189
+ },
190
+ directoryExists: ts.sys.directoryExists,
191
+ getDirectories: ts.sys.getDirectories
192
+ };
193
+ const langServices = ts.createLanguageService(servicesHost);
194
+ const q = langServices.getDocCommentTemplateAtPosition("/bar/test.ts", 1);
195
+ console.log(q);
196
+ ts.createDocumentRegistry();
197
+ });
198
+ });
199
+ //# sourceMappingURL=generatePerQueryDataFiles.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generatePerQueryDataFiles.test.js","names":["ts","describe","expect","it","enhanceOntology","createMockMinimalFiles","TodoWireOntology","generatePerQueryDataFilesV2","helper","fs","minimalFiles","ontology","undefined","Map","outDir","importExt","getFiles","toMatchInlineSnapshot","writeFile","rootFileNames","Object","keys","console","log","files","forEach","fileName","version","servicesHost","getScriptFileNames","getScriptVersion","toString","getScriptSnapshot","ScriptSnapshot","fromString","getCurrentDirectory","getCompilationSettings","getDefaultLibFileName","options","getDefaultLibFilePath","fileExists","path","readFile","readDirectory","extensions","exclude","include","depth","sys","directoryExists","getDirectories","langServices","createLanguageService","q","getDocCommentTemplateAtPosition","createDocumentRegistry"],"sources":["generatePerQueryDataFiles.test.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 */\nimport * as ts from \"typescript\";\nimport { describe, expect, it } from \"vitest\";\nimport { enhanceOntology } from \"../GenerateContext/enhanceOntology.js\";\nimport { createMockMinimalFiles } from \"../util/test/createMockMinimalFiles.js\";\nimport { TodoWireOntology } from \"../util/test/TodoWireOntology.js\";\nimport { generatePerQueryDataFilesV2 } from \"./generatePerQueryDataFiles.js\";\ndescribe(\"generatePerQueryDataFiles\", () => {\n it(\"is stable v2\", async () => {\n const helper = createMockMinimalFiles();\n const BASE_PATH = \"/foo\";\n await generatePerQueryDataFilesV2({\n fs: helper.minimalFiles,\n ontology: enhanceOntology(TodoWireOntology, undefined, new Map(), \".js\"),\n outDir: BASE_PATH,\n importExt: \".js\",\n }, true);\n expect(helper.getFiles()).toMatchInlineSnapshot(`\n {\n \"/foo/ontology/queries.ts\": \"export * from './queries/getCount.js';\n export * from './queries/returnsTodo.js';\n \",\n \"/foo/ontology/queries/getCount.ts\": \"import type { QueryDefinition, VersionBound } from '@osdk/api';\n import type { QueryParam, QueryResult } from '@osdk/api';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n\n export namespace getCount {\n export interface Signature {\n (query: getCount.Parameters): Promise<QueryResult.PrimitiveType<'integer'>>;\n }\n\n export interface Parameters {\n /**\n * (no ontology metadata)\n */\n readonly completed: QueryParam.PrimitiveType<'boolean'>;\n }\n }\n\n export interface getCount\n extends QueryDefinition<'getCount', never, getCount.Signature>,\n VersionBound<$ExpectedClientVersion> {\n __DefinitionMetadata?: {\n apiName: 'getCount';\n rid: 'rid.query.1';\n type: 'query';\n version: '0';\n parameters: {\n /**\n * (no ontology metadata)\n */\n completed: {\n nullable: false;\n type: 'boolean';\n };\n };\n output: {\n nullable: false;\n type: 'integer';\n };\n signature: getCount.Signature;\n };\n apiName: 'getCount';\n type: 'query';\n version: '0';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const getCount: getCount = {\n apiName: 'getCount',\n type: 'query',\n version: '0',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/queries/returnsTodo.ts\": \"import type { QueryDefinition, VersionBound } from '@osdk/api';\n import type { QueryParam, QueryResult } from '@osdk/api';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n import type { Todo } from '../objects/Todo.js';\n\n export namespace returnsTodo {\n export interface Signature {\n (query: returnsTodo.Parameters): Promise<QueryResult.ObjectType<Todo>>;\n }\n\n export interface Parameters {\n /**\n * description: Random desc so we test jsdoc\n */\n readonly someTodo: QueryParam.ObjectType<Todo>;\n }\n }\n\n export interface returnsTodo\n extends QueryDefinition<'returnsTodo', 'Todo', returnsTodo.Signature>,\n VersionBound<$ExpectedClientVersion> {\n __DefinitionMetadata?: {\n apiName: 'returnsTodo';\n rid: 'rid.query.2';\n type: 'query';\n version: '0';\n parameters: {\n /**\n * description: Random desc so we test jsdoc\n */\n someTodo: {\n description: 'Random desc so we test jsdoc';\n nullable: false;\n object: 'Todo';\n type: 'object';\n __OsdkTargetType?: Todo;\n };\n };\n output: {\n nullable: false;\n object: 'Todo';\n type: 'object';\n __OsdkTargetType?: Todo;\n };\n signature: returnsTodo.Signature;\n };\n apiName: 'returnsTodo';\n type: 'query';\n version: '0';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const returnsTodo: returnsTodo = {\n apiName: 'returnsTodo',\n type: 'query',\n version: '0',\n osdkMetadata: $osdkMetadata,\n };\n \",\n }\n `);\n await helper.minimalFiles.writeFile(\"/bar/test.ts\", `\n import {returnsTodo} from \"/foo/ontology/queries/returnsTodo.ts\";\n\n returnsTodo({someTodo:/*marker*/})\n `);\n const rootFileNames = Object.keys(helper.getFiles());\n console.log(rootFileNames);\n const files = {};\n // initialize the list of files\n rootFileNames.forEach(fileName => {\n files[fileName] = { version: 0 };\n });\n const servicesHost = {\n getScriptFileNames: () => Object.keys(helper.getFiles()),\n getScriptVersion: fileName => files[fileName] && files[fileName].version.toString(),\n getScriptSnapshot: fileName => {\n if (!helper.getFiles()[fileName]) {\n return undefined;\n }\n return ts.ScriptSnapshot.fromString(helper.getFiles()[fileName]);\n },\n getCurrentDirectory: () => \"/bar\",\n getCompilationSettings: () => ({}),\n getDefaultLibFileName: options => ts.getDefaultLibFilePath(options),\n fileExists: (path) => {\n console.log(path);\n return helper.getFiles()[path] !== undefined;\n },\n readFile: (path) => {\n console.log(\"readFile: \", path);\n return helper.getFiles()[path];\n },\n readDirectory: (path, extensions, exclude, include, depth) => {\n console.log(\"readDirectory\", path);\n return ts.sys.readDirectory(path, extensions, exclude, include, depth);\n },\n directoryExists: ts.sys.directoryExists,\n getDirectories: ts.sys.getDirectories,\n };\n const langServices = ts.createLanguageService(servicesHost);\n const q = langServices.getDocCommentTemplateAtPosition(\"/bar/test.ts\", 1);\n console.log(q);\n ts.createDocumentRegistry();\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKA,EAAE,MAAM,YAAY;AAChC,SAASC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AAC7C,SAASC,eAAe,QAAQ,uCAAuC;AACvE,SAASC,sBAAsB,QAAQ,wCAAwC;AAC/E,SAASC,gBAAgB,QAAQ,kCAAkC;AACnE,SAASC,2BAA2B,QAAQ,gCAAgC;AAC5EN,QAAQ,CAAC,2BAA2B,EAAE,MAAM;EACxCE,EAAE,CAAC,cAAc,EAAE,YAAY;IAC3B,MAAMK,MAAM,GAAGH,sBAAsB,CAAC,CAAC;IAEvC,MAAME,2BAA2B,CAAC;MAC9BE,EAAE,EAAED,MAAM,CAACE,YAAY;MACvBC,QAAQ,EAAEP,eAAe,CAACE,gBAAgB,EAAEM,SAAS,EAAE,IAAIC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC;MACxEC,MAAM,EAJQ,MAIG;MACjBC,SAAS,EAAE;IACf,CAAC,EAAE,IAAI,CAAC;IACRb,MAAM,CAACM,MAAM,CAACQ,QAAQ,CAAC,CAAC,CAAC,CAACC,qBAAqB,CAAC;AACxD;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;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;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;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,KAAK,CAAC;IACE,MAAMT,MAAM,CAACE,YAAY,CAACQ,SAAS,CAAC,cAAc,EAAE;AAC5D;AACA;AACA;AACA,KAAK,CAAC;IACE,MAAMC,aAAa,GAAGC,MAAM,CAACC,IAAI,CAACb,MAAM,CAACQ,QAAQ,CAAC,CAAC,CAAC;IACpDM,OAAO,CAACC,GAAG,CAACJ,aAAa,CAAC;IAC1B,MAAMK,KAAK,GAAG,CAAC,CAAC;IAChB;IACAL,aAAa,CAACM,OAAO,CAACC,QAAQ,IAAI;MAC9BF,KAAK,CAACE,QAAQ,CAAC,GAAG;QAAEC,OAAO,EAAE;MAAE,CAAC;IACpC,CAAC,CAAC;IACF,MAAMC,YAA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AAU,EAAEC,OAAO,EAAEC,OAAO,EAAEC,KAAK,CAAC;MAC1E,CAAC;MACDE,eAAe,EAAEjD,EAAE,CAACgD,GAAG,CAACC,eAAe;MACvCC,cAAc,EAAElD,EAAE,CAACgD,GAAG,CAACE;IAC3B,CAAC;IACD,MAAMC,YAAY,GAAGnD,EAAE,CAACoD,qBAAqB,CAACxB,YAAY,CAAC;IAC3D,MAAMyB,CAAC,GAAGF,YAAY,CAACG,+BAA+B,CAAC,cAAc,EAAE,CAAC,CAAC;IACzEhC,OAAO,CAACC,GAAG,CAAC8B,CAAC,CAAC;IACdrD,EAAE,CAACuD,sBAAsB,CAAC,CAAC;EAC/B,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export declare function getDescriptionIfPresent(description?: string, includeNewline?: boolean): string;
2
+ //# sourceMappingURL=getDescriptionIfPresent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDescriptionIfPresent.d.ts","sourceRoot":"","sources":["../../../src/v2.0/getDescriptionIfPresent.ts"],"names":[],"mappings":"AAgBA,wBAAgB,uBAAuB,CACrC,WAAW,CAAC,EAAE,MAAM,EACpB,cAAc,CAAC,EAAE,OAAO,UAQzB"}
@@ -0,0 +1,24 @@
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
+ export function getDescriptionIfPresent(description, includeNewline) {
17
+ if (description) {
18
+ return `/**
19
+ * ${description}
20
+ */${includeNewline ? "\n" : ""}`;
21
+ }
22
+ return "";
23
+ }
24
+ //# sourceMappingURL=getDescriptionIfPresent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDescriptionIfPresent.js","names":["getDescriptionIfPresent","description","includeNewline"],"sources":["getDescriptionIfPresent.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 function getDescriptionIfPresent(description, includeNewline) {\n if (description) {\n return `/**\n * ${description}\n */${includeNewline ? \"\\n\" : \"\"}`;\n }\n return \"\";\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,uBAAuBA,CAACC,WAAW,EAAEC,cAAc,EAAE;EACjE,IAAID,WAAW,EAAE;IACb,OAAO;AACf,KAAKA,WAAW;AAChB,KAAKC,cAAc,GAAG,IAAI,GAAG,EAAE,EAAE;EAC7B;EACA,OAAO,EAAE;AACb","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ import type { EnhancedInterfaceType } from "../GenerateContext/EnhancedInterfaceType.js";
2
+ import { EnhancedObjectType } from "../GenerateContext/EnhancedObjectType.js";
3
+ import type { EnhancedOntologyDefinition } from "../GenerateContext/EnhancedOntologyDefinition.js";
4
+ export declare function getObjectDefIdentifier(name: string, v2: boolean): string;
5
+ export interface Identifiers extends Record<"osdkObjectIdentifier" | "propertyKeysIdentifier" | "osdkObjectPropsIdentifier" | "objectDefIdentifier" | "osdkObjectLinksIdentifier" | "osdkObjectStrictPropsIdentifier" | "objectSetIdentifier", string> {
6
+ }
7
+ export declare function createOsdkObject(object: EnhancedObjectType | EnhancedInterfaceType, identifier: string, { osdkObjectPropsIdentifier, objectDefIdentifier, osdkObjectStrictPropsIdentifier, osdkObjectLinksIdentifier, }: Identifiers): string;
8
+ export declare function createObjectSet(object: EnhancedObjectType | EnhancedInterfaceType, { objectDefIdentifier, objectSetIdentifier, propertyKeysIdentifier, osdkObjectIdentifier, }: Identifiers): string;
9
+ export declare function createProps(type: EnhancedInterfaceType | EnhancedObjectType, identifier: string, strict: boolean): string;
10
+ export declare function createDefinition(object: EnhancedObjectType | EnhancedInterfaceType, ontology: EnhancedOntologyDefinition, identifier: string, { objectDefIdentifier, objectSetIdentifier, osdkObjectPropsIdentifier, osdkObjectStrictPropsIdentifier, osdkObjectLinksIdentifier, }: Identifiers): string;
11
+ export declare function createLinks(ontology: EnhancedOntologyDefinition, object: EnhancedObjectType | EnhancedInterfaceType, identifier: string): string;
12
+ export declare function createPropertyKeys(type: EnhancedObjectType | EnhancedInterfaceType): string;
13
+ //# sourceMappingURL=wireObjectTypeV2ToSdkObjectConstV2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wireObjectTypeV2ToSdkObjectConstV2.d.ts","sourceRoot":"","sources":["../../../src/v2.0/wireObjectTypeV2ToSdkObjectConstV2.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAOnG,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,UAE/D;AAqGD,MAAM,WAAW,WAAY,SAC3B,MAAM,CACF,sBAAsB,GACtB,wBAAwB,GACxB,2BAA2B,GAC3B,qBAAqB,GACrB,2BAA2B,GAC3B,iCAAiC,GACjC,qBAAqB,EACvB,MAAM,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