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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (439) hide show
  1. package/CHANGELOG.md +293 -0
  2. package/build/browser/GenerateContext/EnhanceCommon.js +0 -15
  3. package/build/browser/GenerateContext/EnhanceCommon.js.map +1 -1
  4. package/build/browser/GenerateContext/EnhancedAction.js +1 -1
  5. package/build/browser/GenerateContext/EnhancedAction.js.map +1 -1
  6. package/build/browser/GenerateContext/EnhancedBase.js +2 -7
  7. package/build/browser/GenerateContext/EnhancedBase.js.map +1 -1
  8. package/build/browser/GenerateContext/EnhancedInterfaceType.js +1 -1
  9. package/build/browser/GenerateContext/EnhancedInterfaceType.js.map +1 -1
  10. package/build/browser/GenerateContext/EnhancedObjectType.js +1 -1
  11. package/build/browser/GenerateContext/EnhancedObjectType.js.map +1 -1
  12. package/build/browser/GenerateContext/EnhancedOntologyDefinition.js +1 -8
  13. package/build/browser/GenerateContext/EnhancedOntologyDefinition.js.map +1 -1
  14. package/build/browser/GenerateContext/EnhancedQuery.js +1 -1
  15. package/build/browser/GenerateContext/EnhancedQuery.js.map +1 -1
  16. package/build/browser/GenerateContext/EnhancedSharedPropertyType.js +1 -1
  17. package/build/browser/GenerateContext/EnhancedSharedPropertyType.js.map +1 -1
  18. package/build/browser/GenerateContext/ForeignType.js +1 -1
  19. package/build/browser/GenerateContext/ForeignType.js.map +1 -1
  20. package/build/browser/GenerateContext/GenerateContext.js +0 -15
  21. package/build/browser/GenerateContext/GenerateContext.js.map +1 -1
  22. package/build/browser/GenerateContext/enhanceOntology.js +1 -0
  23. package/build/browser/GenerateContext/enhanceOntology.js.map +1 -1
  24. package/build/browser/MinimalFs.js +0 -15
  25. package/build/browser/MinimalFs.js.map +1 -1
  26. package/build/browser/WireOntologyDefinition.js +0 -15
  27. package/build/browser/WireOntologyDefinition.js.map +1 -1
  28. package/build/browser/generateClientSdkPackage.js +5 -3
  29. package/build/browser/generateClientSdkPackage.js.map +1 -1
  30. package/build/browser/generateClientSdkPackage.test.js +3 -2
  31. package/build/browser/generateClientSdkPackage.test.js.map +1 -1
  32. package/build/browser/index.js +1 -0
  33. package/build/browser/index.js.map +1 -1
  34. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.js +1 -0
  35. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.js.map +1 -1
  36. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.js +1 -0
  37. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.js.map +1 -1
  38. package/build/browser/shared/getObjectImports.js +1 -0
  39. package/build/browser/shared/getObjectImports.js.map +1 -1
  40. package/build/browser/shared/getObjectTypeApiNamesFromQuery.js +1 -0
  41. package/build/browser/shared/getObjectTypeApiNamesFromQuery.js.map +1 -1
  42. package/build/browser/shared/getObjectTypesFromQueryDataType.js +1 -0
  43. package/build/browser/shared/getObjectTypesFromQueryDataType.js.map +1 -1
  44. package/build/browser/shared/propertyJsdoc.js +1 -0
  45. package/build/browser/shared/propertyJsdoc.js.map +1 -1
  46. package/build/browser/shared/sanitizeMetadata.js +9 -0
  47. package/build/browser/shared/sanitizeMetadata.js.map +1 -1
  48. package/build/browser/shared/sanitizeMetadata.test.js +1 -0
  49. package/build/browser/shared/sanitizeMetadata.test.js.map +1 -1
  50. package/build/browser/util/InMemoryFs.js +1 -0
  51. package/build/browser/util/InMemoryFs.js.map +1 -1
  52. package/build/browser/util/commaSeparatedIdentifiers.js +1 -0
  53. package/build/browser/util/commaSeparatedIdentifiers.js.map +1 -1
  54. package/build/browser/util/commaSeparatedTypeIdentifiers.js +1 -0
  55. package/build/browser/util/commaSeparatedTypeIdentifiers.js.map +1 -1
  56. package/build/browser/util/deleteUndefineds.js +1 -0
  57. package/build/browser/util/deleteUndefineds.js.map +1 -1
  58. package/build/browser/util/reservedKeywords.js +1 -0
  59. package/build/browser/util/reservedKeywords.js.map +1 -1
  60. package/build/browser/util/stringUnionFrom.js +1 -0
  61. package/build/browser/util/stringUnionFrom.js.map +1 -1
  62. package/build/browser/util/stringify.js +16 -0
  63. package/build/browser/util/stringify.js.map +1 -1
  64. package/build/browser/util/test/TodoWireOntology.js +24 -5
  65. package/build/browser/util/test/TodoWireOntology.js.map +1 -1
  66. package/build/browser/util/test/compileThis.js +1 -0
  67. package/build/browser/util/test/compileThis.js.map +1 -1
  68. package/build/browser/util/test/createMockMinimalFiles.js +1 -0
  69. package/build/browser/util/test/createMockMinimalFiles.js.map +1 -1
  70. package/build/browser/util/test/formatTs.js +1 -0
  71. package/build/browser/util/test/formatTs.js.map +1 -1
  72. package/build/browser/util/verifyOutDir.js +1 -0
  73. package/build/browser/util/verifyOutDir.js.map +1 -1
  74. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js +8 -6
  75. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js.map +1 -1
  76. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +22 -20
  77. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -1
  78. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.js +7 -3
  79. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.js.map +1 -1
  80. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js +572 -557
  81. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
  82. package/build/browser/v2.0/generateMetadata.js +4 -1
  83. package/build/browser/v2.0/generateMetadata.js.map +1 -1
  84. package/build/browser/v2.0/generatePerActionDataFiles.js +33 -10
  85. package/build/browser/v2.0/generatePerActionDataFiles.js.map +1 -1
  86. package/build/browser/v2.0/generatePerActionDataFiles.test.js +1 -0
  87. package/build/browser/v2.0/generatePerActionDataFiles.test.js.map +1 -1
  88. package/build/browser/v2.0/generatePerInterfaceDataFiles.js +6 -3
  89. package/build/browser/v2.0/generatePerInterfaceDataFiles.js.map +1 -1
  90. package/build/browser/v2.0/generatePerObjectDataFiles.js +2 -1
  91. package/build/browser/v2.0/generatePerObjectDataFiles.js.map +1 -1
  92. package/build/browser/v2.0/generatePerQueryDataFiles.js +6 -5
  93. package/build/browser/v2.0/generatePerQueryDataFiles.js.map +1 -1
  94. package/build/browser/v2.0/generatePerQueryDataFiles.test.js +9 -8
  95. package/build/browser/v2.0/generatePerQueryDataFiles.test.js.map +1 -1
  96. package/build/browser/v2.0/generateRootIndexTsFile.js +3 -1
  97. package/build/browser/v2.0/generateRootIndexTsFile.js.map +1 -1
  98. package/build/browser/v2.0/getDescriptionIfPresent.js +1 -0
  99. package/build/browser/v2.0/getDescriptionIfPresent.js.map +1 -1
  100. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js +23 -10
  101. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -1
  102. package/build/browser/validateWireOntologyAssumptions.js +3 -2
  103. package/build/browser/validateWireOntologyAssumptions.js.map +1 -1
  104. package/build/cjs/index.cjs +1384 -0
  105. package/build/cjs/index.cjs.map +1 -0
  106. package/build/cjs/index.d.cts +31 -0
  107. package/build/esm/GenerateContext/EnhanceCommon.js +0 -15
  108. package/build/esm/GenerateContext/EnhanceCommon.js.map +1 -1
  109. package/build/esm/GenerateContext/EnhancedAction.js +1 -1
  110. package/build/esm/GenerateContext/EnhancedAction.js.map +1 -1
  111. package/build/esm/GenerateContext/EnhancedBase.js +2 -7
  112. package/build/esm/GenerateContext/EnhancedBase.js.map +1 -1
  113. package/build/esm/GenerateContext/EnhancedInterfaceType.js +1 -1
  114. package/build/esm/GenerateContext/EnhancedInterfaceType.js.map +1 -1
  115. package/build/esm/GenerateContext/EnhancedObjectType.js +1 -1
  116. package/build/esm/GenerateContext/EnhancedObjectType.js.map +1 -1
  117. package/build/esm/GenerateContext/EnhancedOntologyDefinition.js +1 -8
  118. package/build/esm/GenerateContext/EnhancedOntologyDefinition.js.map +1 -1
  119. package/build/esm/GenerateContext/EnhancedQuery.js +1 -1
  120. package/build/esm/GenerateContext/EnhancedQuery.js.map +1 -1
  121. package/build/esm/GenerateContext/EnhancedSharedPropertyType.js +1 -1
  122. package/build/esm/GenerateContext/EnhancedSharedPropertyType.js.map +1 -1
  123. package/build/esm/GenerateContext/ForeignType.js +1 -1
  124. package/build/esm/GenerateContext/ForeignType.js.map +1 -1
  125. package/build/esm/GenerateContext/GenerateContext.js +0 -15
  126. package/build/esm/GenerateContext/GenerateContext.js.map +1 -1
  127. package/build/esm/GenerateContext/enhanceOntology.js +1 -0
  128. package/build/esm/GenerateContext/enhanceOntology.js.map +1 -1
  129. package/build/esm/MinimalFs.js +0 -15
  130. package/build/esm/MinimalFs.js.map +1 -1
  131. package/build/esm/WireOntologyDefinition.js +0 -15
  132. package/build/esm/WireOntologyDefinition.js.map +1 -1
  133. package/build/esm/generateClientSdkPackage.js +5 -3
  134. package/build/esm/generateClientSdkPackage.js.map +1 -1
  135. package/build/esm/generateClientSdkPackage.test.js +3 -2
  136. package/build/esm/generateClientSdkPackage.test.js.map +1 -1
  137. package/build/esm/index.js +1 -0
  138. package/build/esm/index.js.map +1 -1
  139. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.js +1 -0
  140. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.js.map +1 -1
  141. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.test.js +1 -0
  142. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.test.js.map +1 -1
  143. package/build/esm/shared/getObjectImports.js +1 -0
  144. package/build/esm/shared/getObjectImports.js.map +1 -1
  145. package/build/esm/shared/getObjectTypeApiNamesFromQuery.js +1 -0
  146. package/build/esm/shared/getObjectTypeApiNamesFromQuery.js.map +1 -1
  147. package/build/esm/shared/getObjectTypesFromQueryDataType.js +1 -0
  148. package/build/esm/shared/getObjectTypesFromQueryDataType.js.map +1 -1
  149. package/build/esm/shared/propertyJsdoc.js +1 -0
  150. package/build/esm/shared/propertyJsdoc.js.map +1 -1
  151. package/build/esm/shared/sanitizeMetadata.js +9 -0
  152. package/build/esm/shared/sanitizeMetadata.js.map +1 -1
  153. package/build/esm/shared/sanitizeMetadata.test.js +1 -0
  154. package/build/esm/shared/sanitizeMetadata.test.js.map +1 -1
  155. package/build/esm/util/InMemoryFs.js +1 -0
  156. package/build/esm/util/InMemoryFs.js.map +1 -1
  157. package/build/esm/util/commaSeparatedIdentifiers.js +1 -0
  158. package/build/esm/util/commaSeparatedIdentifiers.js.map +1 -1
  159. package/build/esm/util/commaSeparatedTypeIdentifiers.js +1 -0
  160. package/build/esm/util/commaSeparatedTypeIdentifiers.js.map +1 -1
  161. package/build/esm/util/deleteUndefineds.js +1 -0
  162. package/build/esm/util/deleteUndefineds.js.map +1 -1
  163. package/build/esm/util/reservedKeywords.js +1 -0
  164. package/build/esm/util/reservedKeywords.js.map +1 -1
  165. package/build/esm/util/stringUnionFrom.js +1 -0
  166. package/build/esm/util/stringUnionFrom.js.map +1 -1
  167. package/build/esm/util/stringify.js +16 -0
  168. package/build/esm/util/stringify.js.map +1 -1
  169. package/build/esm/util/test/TodoWireOntology.js +24 -5
  170. package/build/esm/util/test/TodoWireOntology.js.map +1 -1
  171. package/build/esm/util/test/compileThis.js +1 -0
  172. package/build/esm/util/test/compileThis.js.map +1 -1
  173. package/build/esm/util/test/createMockMinimalFiles.js +1 -0
  174. package/build/esm/util/test/createMockMinimalFiles.js.map +1 -1
  175. package/build/esm/util/test/formatTs.js +1 -0
  176. package/build/esm/util/test/formatTs.js.map +1 -1
  177. package/build/esm/util/verifyOutDir.js +1 -0
  178. package/build/esm/util/verifyOutDir.js.map +1 -1
  179. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js +8 -6
  180. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js.map +1 -1
  181. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +22 -20
  182. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -1
  183. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.js +7 -3
  184. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.js.map +1 -1
  185. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js +572 -557
  186. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
  187. package/build/esm/v2.0/generateMetadata.js +4 -1
  188. package/build/esm/v2.0/generateMetadata.js.map +1 -1
  189. package/build/esm/v2.0/generatePerActionDataFiles.js +33 -10
  190. package/build/esm/v2.0/generatePerActionDataFiles.js.map +1 -1
  191. package/build/esm/v2.0/generatePerActionDataFiles.test.js +1 -0
  192. package/build/esm/v2.0/generatePerActionDataFiles.test.js.map +1 -1
  193. package/build/esm/v2.0/generatePerInterfaceDataFiles.js +6 -3
  194. package/build/esm/v2.0/generatePerInterfaceDataFiles.js.map +1 -1
  195. package/build/esm/v2.0/generatePerObjectDataFiles.js +2 -1
  196. package/build/esm/v2.0/generatePerObjectDataFiles.js.map +1 -1
  197. package/build/esm/v2.0/generatePerQueryDataFiles.js +6 -5
  198. package/build/esm/v2.0/generatePerQueryDataFiles.js.map +1 -1
  199. package/build/esm/v2.0/generatePerQueryDataFiles.test.js +9 -8
  200. package/build/esm/v2.0/generatePerQueryDataFiles.test.js.map +1 -1
  201. package/build/esm/v2.0/generateRootIndexTsFile.js +3 -1
  202. package/build/esm/v2.0/generateRootIndexTsFile.js.map +1 -1
  203. package/build/esm/v2.0/getDescriptionIfPresent.js +1 -0
  204. package/build/esm/v2.0/getDescriptionIfPresent.js.map +1 -1
  205. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js +23 -10
  206. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -1
  207. package/build/esm/validateWireOntologyAssumptions.js +3 -2
  208. package/build/esm/validateWireOntologyAssumptions.js.map +1 -1
  209. package/build/types/GenerateContext/EnhanceCommon.d.ts +6 -0
  210. package/build/types/GenerateContext/EnhancedAction.d.ts +13 -0
  211. package/build/types/GenerateContext/EnhancedBase.d.ts +20 -0
  212. package/build/types/GenerateContext/EnhancedInterfaceType.d.ts +12 -0
  213. package/build/{esm → types}/GenerateContext/EnhancedObjectType.d.ts +5 -6
  214. package/build/types/GenerateContext/EnhancedOntologyDefinition.d.ts +28 -0
  215. package/build/types/GenerateContext/EnhancedQuery.d.ts +13 -0
  216. package/build/{browser → types}/GenerateContext/EnhancedSharedPropertyType.d.ts +2 -3
  217. package/build/types/GenerateContext/ForeignType.d.ts +8 -0
  218. package/build/types/GenerateContext/GenerateContext.d.ts +13 -0
  219. package/build/types/GenerateContext/enhanceOntology.d.ts +9 -0
  220. package/build/types/MinimalFs.d.ts +7 -0
  221. package/build/{browser → types}/WireOntologyDefinition.d.ts +1 -3
  222. package/build/types/generateClientSdkPackage.d.ts +31 -0
  223. package/build/types/generateClientSdkPackage.test.d.ts +1 -0
  224. package/build/types/index.d.ts +4 -0
  225. package/build/{browser → types}/shared/apiNamespaces/startsWithApiNamespace.d.ts +0 -1
  226. package/build/types/shared/apiNamespaces/startsWithApiNamespace.test.d.ts +1 -0
  227. package/build/{browser → types}/shared/getObjectImports.d.ts +2 -2
  228. package/build/{browser → types}/shared/getObjectTypeApiNamesFromQuery.d.ts +0 -1
  229. package/build/{browser → types}/shared/getObjectTypesFromQueryDataType.d.ts +0 -1
  230. package/build/{browser → types}/shared/propertyJsdoc.d.ts +2 -3
  231. package/build/types/shared/sanitizeMetadata.d.ts +1 -0
  232. package/build/types/shared/sanitizeMetadata.test.d.ts +1 -0
  233. package/build/{browser → types}/util/InMemoryFs.d.ts +2 -3
  234. package/build/{browser → types}/util/commaSeparatedIdentifiers.d.ts +0 -1
  235. package/build/{browser → types}/util/commaSeparatedTypeIdentifiers.d.ts +0 -1
  236. package/build/{browser → types}/util/deleteUndefineds.d.ts +0 -1
  237. package/build/{browser → types}/util/reservedKeywords.d.ts +0 -1
  238. package/build/{browser → types}/util/stringUnionFrom.d.ts +0 -1
  239. package/build/types/util/stringify.d.ts +20 -0
  240. package/build/types/util/test/TodoWireOntology.d.ts +2 -0
  241. package/build/{browser → types}/util/test/compileThis.d.ts +0 -1
  242. package/build/types/util/test/createMockMinimalFiles.d.ts +10 -0
  243. package/build/{browser → types}/util/test/formatTs.d.ts +0 -1
  244. package/build/types/util/verifyOutDir.d.ts +8 -0
  245. package/build/types/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts +1 -0
  246. package/build/types/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts +1 -0
  247. package/build/{esm → types}/v2.0/generateClientSdkVersionTwoPointZero.d.ts +1 -2
  248. package/build/types/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts +1 -0
  249. package/build/{browser → types}/v2.0/generateMetadata.d.ts +0 -1
  250. package/build/{esm → types}/v2.0/generatePerActionDataFiles.d.ts +1 -2
  251. package/build/types/v2.0/generatePerActionDataFiles.test.d.ts +1 -0
  252. package/build/types/v2.0/generatePerInterfaceDataFiles.d.ts +1 -0
  253. package/build/{esm → types}/v2.0/generatePerObjectDataFiles.d.ts +0 -1
  254. package/build/{browser → types}/v2.0/generatePerQueryDataFiles.d.ts +2 -5
  255. package/build/types/v2.0/generatePerQueryDataFiles.test.d.ts +1 -0
  256. package/build/{esm → types}/v2.0/generateRootIndexTsFile.d.ts +0 -1
  257. package/build/{browser → types}/v2.0/getDescriptionIfPresent.d.ts +0 -1
  258. package/build/{browser → types}/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts +4 -6
  259. package/build/{browser → types}/validateWireOntologyAssumptions.d.ts +0 -1
  260. package/package.json +29 -13
  261. package/build/browser/GenerateContext/EnhanceCommon.d.ts +0 -7
  262. package/build/browser/GenerateContext/EnhanceCommon.d.ts.map +0 -1
  263. package/build/browser/GenerateContext/EnhancedAction.d.ts +0 -14
  264. package/build/browser/GenerateContext/EnhancedAction.d.ts.map +0 -1
  265. package/build/browser/GenerateContext/EnhancedBase.d.ts +0 -21
  266. package/build/browser/GenerateContext/EnhancedBase.d.ts.map +0 -1
  267. package/build/browser/GenerateContext/EnhancedInterfaceType.d.ts +0 -13
  268. package/build/browser/GenerateContext/EnhancedInterfaceType.d.ts.map +0 -1
  269. package/build/browser/GenerateContext/EnhancedObjectType.d.ts +0 -12
  270. package/build/browser/GenerateContext/EnhancedObjectType.d.ts.map +0 -1
  271. package/build/browser/GenerateContext/EnhancedOntologyDefinition.d.ts +0 -27
  272. package/build/browser/GenerateContext/EnhancedOntologyDefinition.d.ts.map +0 -1
  273. package/build/browser/GenerateContext/EnhancedQuery.d.ts +0 -14
  274. package/build/browser/GenerateContext/EnhancedQuery.d.ts.map +0 -1
  275. package/build/browser/GenerateContext/EnhancedSharedPropertyType.d.ts.map +0 -1
  276. package/build/browser/GenerateContext/ForeignType.d.ts +0 -9
  277. package/build/browser/GenerateContext/ForeignType.d.ts.map +0 -1
  278. package/build/browser/GenerateContext/GenerateContext.d.ts +0 -13
  279. package/build/browser/GenerateContext/GenerateContext.d.ts.map +0 -1
  280. package/build/browser/GenerateContext/enhanceOntology.d.ts +0 -10
  281. package/build/browser/GenerateContext/enhanceOntology.d.ts.map +0 -1
  282. package/build/browser/MinimalFs.d.ts +0 -10
  283. package/build/browser/MinimalFs.d.ts.map +0 -1
  284. package/build/browser/WireOntologyDefinition.d.ts.map +0 -1
  285. package/build/browser/generateClientSdkPackage.d.ts +0 -47
  286. package/build/browser/generateClientSdkPackage.d.ts.map +0 -1
  287. package/build/browser/generateClientSdkPackage.test.d.ts +0 -2
  288. package/build/browser/generateClientSdkPackage.test.d.ts.map +0 -1
  289. package/build/browser/index.d.ts +0 -5
  290. package/build/browser/index.d.ts.map +0 -1
  291. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.d.ts.map +0 -1
  292. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.d.ts +0 -2
  293. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.d.ts.map +0 -1
  294. package/build/browser/shared/getObjectImports.d.ts.map +0 -1
  295. package/build/browser/shared/getObjectTypeApiNamesFromQuery.d.ts.map +0 -1
  296. package/build/browser/shared/getObjectTypesFromQueryDataType.d.ts.map +0 -1
  297. package/build/browser/shared/propertyJsdoc.d.ts.map +0 -1
  298. package/build/browser/shared/sanitizeMetadata.d.ts +0 -2
  299. package/build/browser/shared/sanitizeMetadata.d.ts.map +0 -1
  300. package/build/browser/shared/sanitizeMetadata.test.d.ts +0 -2
  301. package/build/browser/shared/sanitizeMetadata.test.d.ts.map +0 -1
  302. package/build/browser/util/InMemoryFs.d.ts.map +0 -1
  303. package/build/browser/util/commaSeparatedIdentifiers.d.ts.map +0 -1
  304. package/build/browser/util/commaSeparatedTypeIdentifiers.d.ts.map +0 -1
  305. package/build/browser/util/deleteUndefineds.d.ts.map +0 -1
  306. package/build/browser/util/reservedKeywords.d.ts.map +0 -1
  307. package/build/browser/util/stringUnionFrom.d.ts.map +0 -1
  308. package/build/browser/util/stringify.d.ts +0 -20
  309. package/build/browser/util/stringify.d.ts.map +0 -1
  310. package/build/browser/util/test/TodoWireOntology.d.ts +0 -217
  311. package/build/browser/util/test/TodoWireOntology.d.ts.map +0 -1
  312. package/build/browser/util/test/compileThis.d.ts.map +0 -1
  313. package/build/browser/util/test/createMockMinimalFiles.d.ts +0 -13
  314. package/build/browser/util/test/createMockMinimalFiles.d.ts.map +0 -1
  315. package/build/browser/util/test/formatTs.d.ts.map +0 -1
  316. package/build/browser/util/verifyOutDir.d.ts +0 -9
  317. package/build/browser/util/verifyOutDir.d.ts.map +0 -1
  318. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts +0 -2
  319. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts.map +0 -1
  320. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts +0 -2
  321. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts.map +0 -1
  322. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.d.ts +0 -4
  323. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.d.ts.map +0 -1
  324. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts +0 -2
  325. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts.map +0 -1
  326. package/build/browser/v2.0/generateMetadata.d.ts.map +0 -1
  327. package/build/browser/v2.0/generatePerActionDataFiles.d.ts +0 -3
  328. package/build/browser/v2.0/generatePerActionDataFiles.d.ts.map +0 -1
  329. package/build/browser/v2.0/generatePerActionDataFiles.test.d.ts +0 -2
  330. package/build/browser/v2.0/generatePerActionDataFiles.test.d.ts.map +0 -1
  331. package/build/browser/v2.0/generatePerInterfaceDataFiles.d.ts +0 -2
  332. package/build/browser/v2.0/generatePerInterfaceDataFiles.d.ts.map +0 -1
  333. package/build/browser/v2.0/generatePerObjectDataFiles.d.ts +0 -3
  334. package/build/browser/v2.0/generatePerObjectDataFiles.d.ts.map +0 -1
  335. package/build/browser/v2.0/generatePerQueryDataFiles.d.ts.map +0 -1
  336. package/build/browser/v2.0/generatePerQueryDataFiles.test.d.ts +0 -2
  337. package/build/browser/v2.0/generatePerQueryDataFiles.test.d.ts.map +0 -1
  338. package/build/browser/v2.0/generateRootIndexTsFile.d.ts +0 -3
  339. package/build/browser/v2.0/generateRootIndexTsFile.d.ts.map +0 -1
  340. package/build/browser/v2.0/getDescriptionIfPresent.d.ts.map +0 -1
  341. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +0 -1
  342. package/build/browser/validateWireOntologyAssumptions.d.ts.map +0 -1
  343. package/build/esm/GenerateContext/EnhanceCommon.d.ts +0 -7
  344. package/build/esm/GenerateContext/EnhanceCommon.d.ts.map +0 -1
  345. package/build/esm/GenerateContext/EnhancedAction.d.ts +0 -14
  346. package/build/esm/GenerateContext/EnhancedAction.d.ts.map +0 -1
  347. package/build/esm/GenerateContext/EnhancedBase.d.ts +0 -21
  348. package/build/esm/GenerateContext/EnhancedBase.d.ts.map +0 -1
  349. package/build/esm/GenerateContext/EnhancedInterfaceType.d.ts +0 -13
  350. package/build/esm/GenerateContext/EnhancedInterfaceType.d.ts.map +0 -1
  351. package/build/esm/GenerateContext/EnhancedObjectType.d.ts.map +0 -1
  352. package/build/esm/GenerateContext/EnhancedOntologyDefinition.d.ts +0 -27
  353. package/build/esm/GenerateContext/EnhancedOntologyDefinition.d.ts.map +0 -1
  354. package/build/esm/GenerateContext/EnhancedQuery.d.ts +0 -14
  355. package/build/esm/GenerateContext/EnhancedQuery.d.ts.map +0 -1
  356. package/build/esm/GenerateContext/EnhancedSharedPropertyType.d.ts +0 -8
  357. package/build/esm/GenerateContext/EnhancedSharedPropertyType.d.ts.map +0 -1
  358. package/build/esm/GenerateContext/ForeignType.d.ts +0 -9
  359. package/build/esm/GenerateContext/ForeignType.d.ts.map +0 -1
  360. package/build/esm/GenerateContext/GenerateContext.d.ts +0 -13
  361. package/build/esm/GenerateContext/GenerateContext.d.ts.map +0 -1
  362. package/build/esm/GenerateContext/enhanceOntology.d.ts +0 -10
  363. package/build/esm/GenerateContext/enhanceOntology.d.ts.map +0 -1
  364. package/build/esm/MinimalFs.d.ts +0 -10
  365. package/build/esm/MinimalFs.d.ts.map +0 -1
  366. package/build/esm/WireOntologyDefinition.d.ts +0 -4
  367. package/build/esm/WireOntologyDefinition.d.ts.map +0 -1
  368. package/build/esm/generateClientSdkPackage.d.ts +0 -47
  369. package/build/esm/generateClientSdkPackage.d.ts.map +0 -1
  370. package/build/esm/generateClientSdkPackage.test.d.ts +0 -2
  371. package/build/esm/generateClientSdkPackage.test.d.ts.map +0 -1
  372. package/build/esm/index.d.ts +0 -5
  373. package/build/esm/index.d.ts.map +0 -1
  374. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.d.ts +0 -2
  375. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.d.ts.map +0 -1
  376. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.test.d.ts +0 -2
  377. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.test.d.ts.map +0 -1
  378. package/build/esm/shared/getObjectImports.d.ts +0 -4
  379. package/build/esm/shared/getObjectImports.d.ts.map +0 -1
  380. package/build/esm/shared/getObjectTypeApiNamesFromQuery.d.ts +0 -4
  381. package/build/esm/shared/getObjectTypeApiNamesFromQuery.d.ts.map +0 -1
  382. package/build/esm/shared/getObjectTypesFromQueryDataType.d.ts +0 -3
  383. package/build/esm/shared/getObjectTypesFromQueryDataType.d.ts.map +0 -1
  384. package/build/esm/shared/propertyJsdoc.d.ts +0 -6
  385. package/build/esm/shared/propertyJsdoc.d.ts.map +0 -1
  386. package/build/esm/shared/sanitizeMetadata.d.ts +0 -2
  387. package/build/esm/shared/sanitizeMetadata.d.ts.map +0 -1
  388. package/build/esm/shared/sanitizeMetadata.test.d.ts +0 -2
  389. package/build/esm/shared/sanitizeMetadata.test.d.ts.map +0 -1
  390. package/build/esm/util/InMemoryFs.d.ts +0 -7
  391. package/build/esm/util/InMemoryFs.d.ts.map +0 -1
  392. package/build/esm/util/commaSeparatedIdentifiers.d.ts +0 -2
  393. package/build/esm/util/commaSeparatedIdentifiers.d.ts.map +0 -1
  394. package/build/esm/util/commaSeparatedTypeIdentifiers.d.ts +0 -2
  395. package/build/esm/util/commaSeparatedTypeIdentifiers.d.ts.map +0 -1
  396. package/build/esm/util/deleteUndefineds.d.ts +0 -2
  397. package/build/esm/util/deleteUndefineds.d.ts.map +0 -1
  398. package/build/esm/util/reservedKeywords.d.ts +0 -2
  399. package/build/esm/util/reservedKeywords.d.ts.map +0 -1
  400. package/build/esm/util/stringUnionFrom.d.ts +0 -2
  401. package/build/esm/util/stringUnionFrom.d.ts.map +0 -1
  402. package/build/esm/util/stringify.d.ts +0 -20
  403. package/build/esm/util/stringify.d.ts.map +0 -1
  404. package/build/esm/util/test/TodoWireOntology.d.ts +0 -217
  405. package/build/esm/util/test/TodoWireOntology.d.ts.map +0 -1
  406. package/build/esm/util/test/compileThis.d.ts +0 -3
  407. package/build/esm/util/test/compileThis.d.ts.map +0 -1
  408. package/build/esm/util/test/createMockMinimalFiles.d.ts +0 -13
  409. package/build/esm/util/test/createMockMinimalFiles.d.ts.map +0 -1
  410. package/build/esm/util/test/formatTs.d.ts +0 -2
  411. package/build/esm/util/test/formatTs.d.ts.map +0 -1
  412. package/build/esm/util/verifyOutDir.d.ts +0 -9
  413. package/build/esm/util/verifyOutDir.d.ts.map +0 -1
  414. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts +0 -2
  415. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts.map +0 -1
  416. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts +0 -2
  417. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts.map +0 -1
  418. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.d.ts.map +0 -1
  419. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts +0 -2
  420. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts.map +0 -1
  421. package/build/esm/v2.0/generateMetadata.d.ts +0 -3
  422. package/build/esm/v2.0/generateMetadata.d.ts.map +0 -1
  423. package/build/esm/v2.0/generatePerActionDataFiles.d.ts.map +0 -1
  424. package/build/esm/v2.0/generatePerActionDataFiles.test.d.ts +0 -2
  425. package/build/esm/v2.0/generatePerActionDataFiles.test.d.ts.map +0 -1
  426. package/build/esm/v2.0/generatePerInterfaceDataFiles.d.ts +0 -2
  427. package/build/esm/v2.0/generatePerInterfaceDataFiles.d.ts.map +0 -1
  428. package/build/esm/v2.0/generatePerObjectDataFiles.d.ts.map +0 -1
  429. package/build/esm/v2.0/generatePerQueryDataFiles.d.ts +0 -9
  430. package/build/esm/v2.0/generatePerQueryDataFiles.d.ts.map +0 -1
  431. package/build/esm/v2.0/generatePerQueryDataFiles.test.d.ts +0 -2
  432. package/build/esm/v2.0/generatePerQueryDataFiles.test.d.ts.map +0 -1
  433. package/build/esm/v2.0/generateRootIndexTsFile.d.ts.map +0 -1
  434. package/build/esm/v2.0/getDescriptionIfPresent.d.ts +0 -2
  435. package/build/esm/v2.0/getDescriptionIfPresent.d.ts.map +0 -1
  436. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts +0 -12
  437. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +0 -1
  438. package/build/esm/validateWireOntologyAssumptions.d.ts +0 -3
  439. package/build/esm/validateWireOntologyAssumptions.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"deleteUndefineds.js","names":["deleteUndefineds","obj","Object","fromEntries","entries","filter","value","undefined"],"sources":["deleteUndefineds.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 deleteUndefineds(obj) {\n return Object.fromEntries(Object.entries(obj).filter(([, value]) => value !== undefined));\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,gBAAgBA,CAACC,GAAG,EAAE;EAClC,OAAOC,MAAM,CAACC,WAAW,CAACD,MAAM,CAACE,OAAO,CAACH,GAAG,CAAC,CAACI,MAAM,CAAC,CAAC,GAAGC,KAAK,CAAC,KAAKA,KAAK,KAAKC,SAAS,CAAC,CAAC;AAC7F","ignoreList":[]}
1
+ {"version":3,"file":"deleteUndefineds.js","names":["deleteUndefineds","obj","Object","fromEntries","entries","filter","value","undefined"],"sources":["deleteUndefineds.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function deleteUndefineds<T extends Record<string, any>>(obj: T): T {\n return Object.fromEntries(\n Object.entries(obj).filter(([, value]) => value !== undefined),\n ) as T;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASA,gBAAgBA,CAAgCC,GAAM,EAAK;EACzE,OAAOC,MAAM,CAACC,WAAW,CACvBD,MAAM,CAACE,OAAO,CAACH,GAAG,CAAC,CAACI,MAAM,CAAC,CAAC,GAAGC,KAAK,CAAC,KAAKA,KAAK,KAAKC,SAAS,CAC/D,CAAC;AACH","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  // This must match the reservedKeywords definition in packages/legacy-client
17
18
  const reservedKeywords = new Set(["break", "case", "catch", "class", "const", "continue", "debugger", "default", "delete", "do", "else", "enum", "export", "extends", "false", "finally", "for", "function", "if", "import", "in", "instanceof", "new", "null", "return", "super", "switch", "this", "throw", "true", "try", "typeof", "var", "void", "while", "with", "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"]);
18
19
  export function isReservedKeyword(name) {
@@ -1 +1 @@
1
- {"version":3,"file":"reservedKeywords.js","names":["reservedKeywords","Set","isReservedKeyword","name","has"],"sources":["reservedKeywords.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 */\n// This must match the reservedKeywords definition in packages/legacy-client\nconst reservedKeywords = new Set([\n \"break\",\n \"case\",\n \"catch\",\n \"class\",\n \"const\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"delete\",\n \"do\",\n \"else\",\n \"enum\",\n \"export\",\n \"extends\",\n \"false\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"import\",\n \"in\",\n \"instanceof\",\n \"new\",\n \"null\",\n \"return\",\n \"super\",\n \"switch\",\n \"this\",\n \"throw\",\n \"true\",\n \"try\",\n \"typeof\",\n \"var\",\n \"void\",\n \"while\",\n \"with\",\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n]);\nexport function isReservedKeyword(name) {\n return reservedKeywords.has(name);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,gBAAgB,GAAG,IAAIC,GAAG,CAAC,CAC7B,OAAO,EACP,MAAM,EACN,OAAO,EACP,OAAO,EACP,OAAO,EACP,UAAU,EACV,UAAU,EACV,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAS,EACT,OAAO,EACP,SAAS,EACT,KAAK,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,MAAM,EACN,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,MAAM,EACN,OAAO,EACP,MAAM,EACN,KAAK,EACL,QAAQ,EACR,KAAK,EACL,MAAM,EACN,OAAO,EACP,MAAM,EACN,YAAY,EACZ,WAAW,EACX,KAAK,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,CACV,CAAC;AACF,OAAO,SAASC,iBAAiBA,CAACC,IAAI,EAAE;EACpC,OAAOH,gBAAgB,CAACI,GAAG,CAACD,IAAI,CAAC;AACrC","ignoreList":[]}
1
+ {"version":3,"file":"reservedKeywords.js","names":["reservedKeywords","Set","isReservedKeyword","name","has"],"sources":["reservedKeywords.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This must match the reservedKeywords definition in packages/legacy-client\nconst reservedKeywords = new Set([\n \"break\",\n \"case\",\n \"catch\",\n \"class\",\n \"const\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"delete\",\n \"do\",\n \"else\",\n \"enum\",\n \"export\",\n \"extends\",\n \"false\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"import\",\n \"in\",\n \"instanceof\",\n \"new\",\n \"null\",\n \"return\",\n \"super\",\n \"switch\",\n \"this\",\n \"throw\",\n \"true\",\n \"try\",\n \"typeof\",\n \"var\",\n \"void\",\n \"while\",\n \"with\",\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n]);\n\nexport function isReservedKeyword(name: string): boolean {\n return reservedKeywords.has(name);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMA,gBAAgB,GAAG,IAAIC,GAAG,CAAC,CAC/B,OAAO,EACP,MAAM,EACN,OAAO,EACP,OAAO,EACP,OAAO,EACP,UAAU,EACV,UAAU,EACV,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAS,EACT,OAAO,EACP,SAAS,EACT,KAAK,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,MAAM,EACN,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,MAAM,EACN,OAAO,EACP,MAAM,EACN,KAAK,EACL,QAAQ,EACR,KAAK,EACL,MAAM,EACN,OAAO,EACP,MAAM,EACN,YAAY,EACZ,WAAW,EACX,KAAK,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,CACR,CAAC;AAEF,OAAO,SAASC,iBAAiBA,CAACC,IAAY,EAAW;EACvD,OAAOH,gBAAgB,CAACI,GAAG,CAACD,IAAI,CAAC;AACnC","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  export function stringUnionFrom(values) {
17
18
  if (values.length === 0) {
18
19
  return "never";
@@ -1 +1 @@
1
- {"version":3,"file":"stringUnionFrom.js","names":["stringUnionFrom","values","length","map","v","join"],"sources":["stringUnionFrom.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport function stringUnionFrom(values) {\n if (values.length === 0) {\n return \"never\";\n }\n else {\n return values.map(v => `\"${v}\"`).join(\"|\");\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,eAAeA,CAACC,MAAM,EAAE;EACpC,IAAIA,MAAM,CAACC,MAAM,KAAK,CAAC,EAAE;IACrB,OAAO,OAAO;EAClB,CAAC,MACI;IACD,OAAOD,MAAM,CAACE,GAAG,CAACC,CAAC,IAAI,IAAIA,CAAC,GAAG,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;EAC9C;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"stringUnionFrom.js","names":["stringUnionFrom","values","length","map","v","join"],"sources":["stringUnionFrom.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function stringUnionFrom(values: ReadonlyArray<string>): string {\n if (values.length === 0) {\n return \"never\";\n } else {\n return values.map(v => `\"${v}\"`).join(\"|\");\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASA,eAAeA,CAACC,MAA6B,EAAU;EACrE,IAAIA,MAAM,CAACC,MAAM,KAAK,CAAC,EAAE;IACvB,OAAO,OAAO;EAChB,CAAC,MAAM;IACL,OAAOD,MAAM,CAACE,GAAG,CAACC,CAAC,IAAI,IAAIA,CAAC,GAAG,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;EAC5C;AACF","ignoreList":[]}
@@ -13,6 +13,22 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
17
+ /**
18
+ * A function for changing the stringified key/value pairs of an object.
19
+ *
20
+ * @param value The value of the key/value pair.
21
+ * @param defaultValueFormatter The function that would be called if this customizer wasn't used
22
+ * @param key The key of the key/value pair.
23
+ * @param defaultKeyFormatter The function that would be called if this customizer wasn't used
24
+ *
25
+ * @returns A string, a tuple of strings, or undefined.
26
+ * If a string is returned, it will be used as the value of the key/value pair.
27
+ * If a tuple of strings is returned, the first string will be used as the key of the key/value pair
28
+ * and the second string will be used as the value of the key/value pair.
29
+ * If undefined is returned, the pair will be removed
30
+ */
31
+
16
32
  const defaultCustomizer = (value, defaultValueFormatter, key, defaultKeyFormatter) => {
17
33
  return [defaultKeyFormatter(key), defaultValueFormatter(value)];
18
34
  };
@@ -1 +1 @@
1
- {"version":3,"file":"stringify.js","names":["defaultCustomizer","value","defaultValueFormatter","key","defaultKeyFormatter","stringify","obj","customizer","separator","JSON","entries","sortedKeys","Object","keys","sort","a","b","localeCompare","res","push","join"],"sources":["stringify.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 */\nconst defaultCustomizer = (value, defaultValueFormatter, key, defaultKeyFormatter) => {\n return [defaultKeyFormatter(key), defaultValueFormatter(value)];\n};\nexport function stringify(obj, customizer = {}, separator = \",\\n\") {\n const defaultKeyFormatter = (key) => `${JSON.stringify(key)}`;\n const entries = [];\n const sortedKeys = Object.keys(obj).sort((a, b) => a.localeCompare(b));\n for (const key of sortedKeys) {\n const value = obj[key];\n const res = (customizer[key] ?? customizer[\"*\"] ?? defaultCustomizer)(value, (value) => JSON.stringify(value, null, 2), key, defaultKeyFormatter);\n if (res) {\n if (typeof res === \"string\") {\n entries.push(`${defaultKeyFormatter(key)}: ${res}`);\n }\n else {\n entries.push(`${res[0]}: ${res[1]}`);\n }\n }\n }\n return entries.join(separator);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,iBAAiB,GAAGA,CAACC,KAAK,EAAEC,qBAAqB,EAAEC,GAAG,EAAEC,mBAAmB,KAAK;EAClF,OAAO,CAACA,mBAAmB,CAACD,GAAG,CAAC,EAAED,qBAAqB,CAACD,KAAK,CAAC,CAAC;AACnE,CAAC;AACD,OAAO,SAASI,SAASA,CAACC,GAAG,EAAEC,UAAU,GAAG,CAAC,CAAC,EAAEC,SAAS,GAAG,KAAK,EAAE;EAC/D,MAAMJ,mBAAmB,GAAID,GAAG,IAAK,GAAGM,IAAI,CAACJ,SAAS,CAACF,GAAG,CAAC,EAAE;EAC7D,MAAMO,OAAO,GAAG,EAAE;EAClB,MAAMC,UAAU,GAAGC,MAAM,CAACC,IAAI,CAACP,GAAG,CAAC,CAACQ,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,CAACE,aAAa,CAACD,CAAC,CAAC,CAAC;EACtE,KAAK,MAAMb,GAAG,IAAIQ,UAAU,EAAE;IAC1B,MAAMV,KAAK,GAAGK,GAAG,CAACH,GAAG,CAAC;IACtB,MAAMe,GAAG,GAAG,CAACX,UAAU,CAACJ,GAAG,CAAC,IAAII,UAAU,CAAC,GAAG,CAAC,IAAIP,iBAAiB,EAAEC,KAAK,EAAGA,KAAK,IAAKQ,IAAI,CAACJ,SAAS,CAACJ,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,EAAEE,GAAG,EAAEC,mBAAmB,CAAC;IACjJ,IAAIc,GAAG,EAAE;MACL,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE;QACzBR,OAAO,CAACS,IAAI,CAAC,GAAGf,mBAAmB,CAACD,GAAG,CAAC,KAAKe,GAAG,EAAE,CAAC;MACvD,CAAC,MACI;QACDR,OAAO,CAACS,IAAI,CAAC,GAAGD,GAAG,CAAC,CAAC,CAAC,KAAKA,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;MACxC;IACJ;EACJ;EACA,OAAOR,OAAO,CAACU,IAAI,CAACZ,SAAS,CAAC;AAClC","ignoreList":[]}
1
+ {"version":3,"file":"stringify.js","names":["defaultCustomizer","value","defaultValueFormatter","key","defaultKeyFormatter","stringify","obj","customizer","separator","JSON","entries","sortedKeys","Object","keys","sort","a","b","localeCompare","res","push","join"],"sources":["stringify.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * A function for changing the stringified key/value pairs of an object.\n *\n * @param value The value of the key/value pair.\n * @param defaultValueFormatter The function that would be called if this customizer wasn't used\n * @param key The key of the key/value pair.\n * @param defaultKeyFormatter The function that would be called if this customizer wasn't used\n *\n * @returns A string, a tuple of strings, or undefined.\n * If a string is returned, it will be used as the value of the key/value pair.\n * If a tuple of strings is returned, the first string will be used as the key of the key/value pair\n * and the second string will be used as the value of the key/value pair.\n * If undefined is returned, the pair will be removed\n */\ntype Customizer<K extends string | symbol | number, V extends {}> = (\n value: V,\n defaultValueFormatter: (value: any) => string,\n key: K extends \"*\" ? string : K,\n defaultKeyFormatter: (key: string) => string,\n) => [string, string] | string | undefined;\nconst defaultCustomizer: Customizer<string, any> = (\n value,\n defaultValueFormatter,\n key,\n defaultKeyFormatter,\n) => {\n return [defaultKeyFormatter(key), defaultValueFormatter(value)];\n};\n\nexport function stringify<T extends Record<string, any>>(\n obj: T,\n customizer: {\n [K in keyof T | \"*\"]?: Customizer<K, T[K]>;\n } = {},\n separator = \",\\n\",\n): string {\n const defaultKeyFormatter = (key: string) => `${JSON.stringify(key)}`;\n const entries: Array<string> = [];\n\n const sortedKeys = Object.keys(obj).sort((a, b) => a.localeCompare(b));\n\n for (const key of sortedKeys) {\n const value = obj[key];\n const res =\n (customizer[key as keyof T] ?? customizer[\"*\"] ?? defaultCustomizer)(\n value,\n (value) => JSON.stringify(value, null, 2),\n key as any,\n defaultKeyFormatter,\n );\n\n if (res) {\n if (typeof res === \"string\") {\n entries.push(`${defaultKeyFormatter(key)}: ${res}`);\n } else {\n entries.push(`${res[0]}: ${res[1]}`);\n }\n }\n }\n return entries.join(separator);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,MAAMA,iBAA0C,GAAGA,CACjDC,KAAK,EACLC,qBAAqB,EACrBC,GAAG,EACHC,mBAAmB,KAChB;EACH,OAAO,CAACA,mBAAmB,CAACD,GAAG,CAAC,EAAED,qBAAqB,CAACD,KAAK,CAAC,CAAC;AACjE,CAAC;AAED,OAAO,SAASI,SAASA,CACvBC,GAAM,EACNC,UAEC,GAAG,CAAC,CAAC,EACNC,SAAS,GAAG,KAAK,EACT;EACR,MAAMJ,mBAAmB,GAAID,GAAW,IAAK,GAAGM,IAAI,CAACJ,SAAS,CAACF,GAAG,CAAC,EAAE;EACrE,MAAMO,OAAsB,GAAG,EAAE;EAEjC,MAAMC,UAAU,GAAGC,MAAM,CAACC,IAAI,CAACP,GAAG,CAAC,CAACQ,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,CAACE,aAAa,CAACD,CAAC,CAAC,CAAC;EAEtE,KAAK,MAAMb,GAAG,IAAIQ,UAAU,EAAE;IAC5B,MAAMV,KAAK,GAAGK,GAAG,CAACH,GAAG,CAAC;IACtB,MAAMe,GAAG,GACP,CAACX,UAAU,CAACJ,GAAG,CAAY,IAAII,UAAU,CAAC,GAAG,CAAC,IAAIP,iBAAiB,EACjEC,KAAK,EACJA,KAAK,IAAKQ,IAAI,CAACJ,SAAS,CAACJ,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,EACzCE,GAAG,EACHC,mBACF,CAAC;IAEH,IAAIc,GAAG,EAAE;MACP,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE;QAC3BR,OAAO,CAACS,IAAI,CAAC,GAAGf,mBAAmB,CAACD,GAAG,CAAC,KAAKe,GAAG,EAAE,CAAC;MACrD,CAAC,MAAM;QACLR,OAAO,CAACS,IAAI,CAAC,GAAGD,GAAG,CAAC,CAAC,CAAC,KAAKA,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;MACtC;IACF;EACF;EACA,OAAOR,OAAO,CAACU,IAAI,CAACZ,SAAS,CAAC;AAChC","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  export const TodoWireOntology = {
17
18
  ontology: {
18
19
  rid: "ridHere",
@@ -85,19 +86,22 @@ export const TodoWireOntology = {
85
86
  id: {
86
87
  dataType: {
87
88
  type: "integer"
88
- }
89
+ },
90
+ rid: "rid"
89
91
  },
90
92
  body: {
91
93
  dataType: {
92
94
  type: "string"
93
95
  },
94
96
  description: "The text of the todo",
95
- displayName: "Body"
97
+ displayName: "Body",
98
+ rid: "rid"
96
99
  },
97
100
  complete: {
98
101
  dataType: {
99
102
  type: "boolean"
100
- }
103
+ },
104
+ rid: "rid"
101
105
  }
102
106
  },
103
107
  status: "ACTIVE",
@@ -139,7 +143,8 @@ export const TodoWireOntology = {
139
143
  email: {
140
144
  dataType: {
141
145
  type: "string"
142
- }
146
+ },
147
+ rid: "rid"
143
148
  }
144
149
  },
145
150
  rid: "ridForPerson",
@@ -214,7 +219,21 @@ export const TodoWireOntology = {
214
219
  rid: "idk",
215
220
  displayName: "Sum Interface",
216
221
  extendsInterfaces: [],
217
- links: {}
222
+ links: {},
223
+ implementedByObjectTypes: [],
224
+ allProperties: {
225
+ "SomeProperty": {
226
+ apiName: "SomeProperty",
227
+ description: "Some property",
228
+ displayName: "Sum Property",
229
+ dataType: {
230
+ type: "string"
231
+ },
232
+ rid: "idk2"
233
+ }
234
+ },
235
+ allExtendsInterfaces: [],
236
+ allLinks: {}
218
237
  }
219
238
  },
220
239
  sharedPropertyTypes: {
@@ -1 +1 @@
1
- {"version":3,"file":"TodoWireOntology.js","names":["TodoWireOntology","ontology","rid","apiName","displayName","description","actionTypes","parameters","object","dataType","type","objectApiName","objectTypeApiName","required","operations","status","objectTypes","Todo","objectType","primaryKey","pluralDisplayName","icon","name","color","titleProperty","properties","id","body","complete","linkTypes","cardinality","foreignKeyPropertyApiName","linkTypeRid","implementsInterfaces","implementsInterfaces2","sharedPropertyTypeMapping","Person","email","queryTypes","output","completed","version","someTodo","interfaceTypes","SomeInterface","extendsInterfaces","links","sharedPropertyTypes","SomeProperty"],"sources":["TodoWireOntology.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 const TodoWireOntology = {\n ontology: {\n rid: \"ridHere\",\n apiName: \"OntologyApiName\",\n displayName: \"\",\n description: \"\",\n },\n actionTypes: {\n \"markTodoCompleted\": {\n apiName: \"markTodoCompleted\",\n description: \"An action which takes different types of parameters\",\n parameters: {\n object: {\n description: \"A Todo to mark completed\",\n dataType: {\n type: \"object\",\n objectApiName: \"Todo\",\n objectTypeApiName: \"Todo\",\n },\n required: false,\n },\n },\n rid: \"ri.ontology.main.action-type.9f84017d-cf17-4fa8-84c3-8e01e5d594f2\",\n operations: [{\n type: \"modifyObject\",\n objectTypeApiName: \"Todo\",\n }],\n status: \"ACTIVE\",\n },\n \"deleteTodos\": {\n apiName: \"deleteTodos\",\n description: \"An action which takes in an array of objects\",\n parameters: {\n object: {\n description: \"Todo(s) to be deleted\",\n \"dataType\": {\n \"type\": \"array\",\n \"subType\": {\n \"type\": \"object\",\n \"objectApiName\": \"Todo\",\n \"objectTypeApiName\": \"Todo\",\n },\n },\n required: false,\n },\n },\n rid: \"ri.ontology.main.action-type.8f94017d-cf17-4fa8-84c3-8e01e5d594f2\",\n operations: [{\n type: \"deleteObject\",\n objectTypeApiName: \"Todo\",\n }],\n status: \"ACTIVE\",\n },\n },\n objectTypes: {\n Todo: {\n objectType: {\n apiName: \"Todo\",\n primaryKey: \"id\",\n displayName: \"AwesomeTodoDisplayname\",\n pluralDisplayName: \"AwesomeTodoDisplayNames\",\n icon: { type: \"blueprint\", name: \"document\", color: \"blue\" },\n description: \"Its a todo item.\",\n titleProperty: \"body\",\n properties: {\n id: {\n dataType: {\n type: \"integer\",\n },\n },\n body: {\n dataType: {\n type: \"string\",\n },\n description: \"The text of the todo\",\n displayName: \"Body\",\n },\n complete: {\n dataType: {\n type: \"boolean\",\n },\n },\n },\n status: \"ACTIVE\",\n rid: \"ridForTodo\",\n },\n linkTypes: [{\n apiName: \"Assignee\",\n cardinality: \"ONE\",\n displayName: \"Assignee\",\n objectTypeApiName: \"Person\",\n status: \"ACTIVE\",\n foreignKeyPropertyApiName: \"email\",\n linkTypeRid: \"\",\n }],\n implementsInterfaces: [\"SomeInterface\"],\n implementsInterfaces2: {\n \"SomeInterface\": {\n properties: {\n \"SomeProperty\": \"body\",\n },\n },\n },\n sharedPropertyTypeMapping: {},\n },\n Person: {\n objectType: {\n apiName: \"Person\",\n primaryKey: \"email\",\n displayName: \"Person\",\n pluralDisplayName: \"Persons\",\n icon: { type: \"blueprint\", name: \"document\", color: \"blue\" },\n description: \"A person\",\n titleProperty: \"email\",\n properties: {\n email: {\n dataType: {\n type: \"string\",\n },\n },\n },\n rid: \"ridForPerson\",\n status: \"ACTIVE\",\n },\n linkTypes: [{\n apiName: \"Todos\",\n cardinality: \"MANY\",\n displayName: \"Todos\",\n objectTypeApiName: \"Todo\",\n status: \"ACTIVE\",\n foreignKeyPropertyApiName: \"id\",\n linkTypeRid: \"\",\n }],\n implementsInterfaces: [],\n implementsInterfaces2: {},\n sharedPropertyTypeMapping: {},\n },\n },\n queryTypes: {\n \"getCount\": {\n apiName: \"getCount\",\n output: {\n type: \"integer\",\n },\n parameters: {\n completed: { dataType: { type: \"boolean\" } },\n },\n rid: \"rid.query.1\",\n version: \"0\",\n },\n \"returnsTodo\": {\n apiName: \"returnsTodo\",\n output: {\n type: \"object\",\n objectApiName: \"Todo\",\n objectTypeApiName: \"Todo\",\n },\n parameters: {\n someTodo: {\n description: \"Random desc so we test jsdoc\",\n dataType: {\n type: \"object\",\n objectApiName: \"Todo\",\n objectTypeApiName: \"Todo\",\n },\n },\n },\n rid: \"rid.query.2\",\n version: \"0\",\n },\n },\n interfaceTypes: {\n SomeInterface: {\n apiName: \"SomeInterface\",\n description: \"Some interface\",\n properties: {\n \"SomeProperty\": {\n apiName: \"SomeProperty\",\n description: \"Some property\",\n displayName: \"Sum Property\",\n dataType: {\n type: \"string\",\n },\n rid: \"idk2\",\n },\n },\n rid: \"idk\",\n displayName: \"Sum Interface\",\n extendsInterfaces: [],\n links: {},\n },\n },\n sharedPropertyTypes: {\n SomeProperty: {\n apiName: \"SomeProperty\",\n description: \"Some property\",\n displayName: \"Sum Property\",\n dataType: {\n type: \"string\",\n },\n rid: \"idk2\",\n },\n },\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,gBAAgB,GAAG;EAC5BC,QAAQ,EAAE;IACNC,GAAG,EAAE,SAAS;IACdC,OAAO,EAAE,iBAAiB;IAC1BC,WAAW,EAAE,EAAE;IACfC,WAAW,EAAE;EACjB,CAAC;EACDC,WAAW,EAAE;IACT,mBAAmB,EAAE;MACjBH,OAAO,EAAE,mBAAmB;MAC5BE,WAAW,EAAE,qDAAqD;MAClEE,UAAU,EAAE;QACRC,MAAM,EAAE;UACJH,WAAW,EAAE,0BAA0B;UACvCI,QAAQ,EAAE;YACNC,IAAI,EAAE,QAAQ;YACdC,aAAa,EAAE,MAAM;YACrBC,iBAAiB,EAAE;UACvB,CAAC;UACDC,QAAQ,EAAE;QACd;MACJ,CAAC;MACDX,GAAG,EAAE,mEAAmE;MACxEY,UAAU,EAAE,CAAC;QACLJ,IAAI,EAAE,cAAc;QACpBE,iBAAiB,EAAE;MACvB,CAAC,CAAC;MACNG,MAAM,EAAE;IACZ,CAAC;IACD,aAAa,EAAE;MACXZ,OAAO,EAAE,aAAa;MACtBE,WAAW,EAAE,8CAA8C;MAC3DE,UAAU,EAAE;QACRC,MAAM,EAAE;UACJH,WAAW,EAAE,uBAAuB;UACpC,UAAU,EAAE;YACR,MAAM,EAAE,OAAO;YACf,SAAS,EAAE;cACP,MAAM,EAAE,QAAQ;cAChB,eAAe,EAAE,MAAM;cACvB,mBAAmB,EAAE;YACzB;UACJ,C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,EAAE;MACvB,CAAC;MACDL,UAAU,EAAE;QACRmC,QAAQ,EAAE;UACNrC,WAAW,EAAE,8BAA8B;UAC3CI,QAAQ,EAAE;YACNC,IAAI,EAAE,QAAQ;YACdC,aAAa,EAAE,MAAM;YACrBC,iBAAiB,EAAE;UACvB;QACJ;MACJ,CAAC;MACDV,GAAG,EAAE,aAAa;MAClBuC,OAAO,EAAE;IACb;EACJ,CAAC;EACDE,cAAc,EAAE;IACZC,aAAa,EAAE;MACXzC,OAAO,EAAE,eAAe;MACxBE,WAAW,EAAE,gBAAgB;MAC7BoB,UAAU,EAAE;QACR,cAAc,EAAE;UACZtB,OAAO,EAAE,cAAc;UACvBE,WAAW,EAAE,eAAe;UAC5BD,WAAW,EAAE,cAAc;UAC3BK,QAAQ,EAAE;YACNC,IAAI,EAAE;UACV,CAAC;UACDR,GAAG,EAAE;QACT;MACJ,CAAC;MACDA,GAAG,EAAE,KAAK;MACVE,WAAW,EAAE,eAAe;MAC5ByC,iBAAiB,EAAE,EAAE;MACrBC,KAAK,EAAE,CAAC;IACZ;EACJ,CAAC;EACDC,mBAAmB,EAAE;IACjBC,YAAY,EAAE;MACV7C,OAAO,EAAE,cAAc;MACvBE,WAAW,EAAE,eAAe;MAC5BD,WAAW,EAAE,cAAc;MAC3BK,QAAQ,EAAE;QACNC,IAAI,EAAE;MACV,CAAC;MACDR,GAAG,EAAE;IACT;EACJ;AACJ,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"TodoWireOntology.js","names":["TodoWireOntology","ontology","rid","apiName","displayName","description","actionTypes","parameters","object","dataType","type","objectApiName","objectTypeApiName","required","operations","status","objectTypes","Todo","objectType","primaryKey","pluralDisplayName","icon","name","color","titleProperty","properties","id","body","complete","linkTypes","cardinality","foreignKeyPropertyApiName","linkTypeRid","implementsInterfaces","implementsInterfaces2","sharedPropertyTypeMapping","Person","email","queryTypes","output","completed","version","someTodo","interfaceTypes","SomeInterface","extendsInterfaces","links","implementedByObjectTypes","allProperties","allExtendsInterfaces","allLinks","sharedPropertyTypes","SomeProperty"],"sources":["TodoWireOntology.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { WireOntologyDefinition } from \"../../WireOntologyDefinition.js\";\n\nexport const TodoWireOntology: WireOntologyDefinition = {\n ontology: {\n rid: \"ridHere\",\n apiName: \"OntologyApiName\",\n displayName: \"\",\n description: \"\",\n },\n actionTypes: {\n \"markTodoCompleted\": {\n apiName: \"markTodoCompleted\",\n description: \"An action which takes different types of parameters\",\n parameters: {\n object: {\n description: \"A Todo to mark completed\",\n dataType: {\n type: \"object\",\n objectApiName: \"Todo\",\n objectTypeApiName: \"Todo\",\n },\n required: false,\n },\n },\n rid: \"ri.ontology.main.action-type.9f84017d-cf17-4fa8-84c3-8e01e5d594f2\",\n operations: [{\n type: \"modifyObject\",\n objectTypeApiName: \"Todo\",\n }],\n status: \"ACTIVE\",\n },\n \"deleteTodos\": {\n apiName: \"deleteTodos\",\n description: \"An action which takes in an array of objects\",\n parameters: {\n object: {\n description: \"Todo(s) to be deleted\",\n \"dataType\": {\n \"type\": \"array\",\n\n \"subType\": {\n \"type\": \"object\",\n \"objectApiName\": \"Todo\",\n \"objectTypeApiName\": \"Todo\",\n },\n },\n required: false,\n },\n },\n rid: \"ri.ontology.main.action-type.8f94017d-cf17-4fa8-84c3-8e01e5d594f2\",\n operations: [{\n type: \"deleteObject\",\n objectTypeApiName: \"Todo\",\n }],\n status: \"ACTIVE\",\n },\n },\n objectTypes: {\n Todo: {\n objectType: {\n apiName: \"Todo\",\n primaryKey: \"id\",\n displayName: \"AwesomeTodoDisplayname\",\n pluralDisplayName: \"AwesomeTodoDisplayNames\",\n icon: { type: \"blueprint\", name: \"document\", color: \"blue\" },\n description: \"Its a todo item.\",\n titleProperty: \"body\",\n properties: {\n id: {\n dataType: {\n type: \"integer\",\n },\n rid: \"rid\",\n },\n body: {\n dataType: {\n type: \"string\",\n },\n description: \"The text of the todo\",\n displayName: \"Body\",\n rid: \"rid\",\n },\n complete: {\n dataType: {\n type: \"boolean\",\n },\n rid: \"rid\",\n },\n },\n status: \"ACTIVE\",\n rid: \"ridForTodo\",\n },\n linkTypes: [{\n apiName: \"Assignee\",\n cardinality: \"ONE\",\n displayName: \"Assignee\",\n objectTypeApiName: \"Person\",\n status: \"ACTIVE\",\n foreignKeyPropertyApiName: \"email\",\n linkTypeRid: \"\",\n }],\n implementsInterfaces: [\"SomeInterface\"],\n implementsInterfaces2: {\n \"SomeInterface\": {\n properties: {\n \"SomeProperty\": \"body\",\n },\n },\n },\n sharedPropertyTypeMapping: {},\n },\n Person: {\n objectType: {\n apiName: \"Person\",\n primaryKey: \"email\",\n displayName: \"Person\",\n pluralDisplayName: \"Persons\",\n icon: { type: \"blueprint\", name: \"document\", color: \"blue\" },\n description: \"A person\",\n titleProperty: \"email\",\n properties: {\n email: {\n dataType: {\n type: \"string\",\n },\n rid: \"rid\",\n },\n },\n\n rid: \"ridForPerson\",\n status: \"ACTIVE\",\n },\n linkTypes: [{\n apiName: \"Todos\",\n cardinality: \"MANY\",\n displayName: \"Todos\",\n objectTypeApiName: \"Todo\",\n status: \"ACTIVE\",\n foreignKeyPropertyApiName: \"id\",\n linkTypeRid: \"\",\n }],\n implementsInterfaces: [],\n implementsInterfaces2: {},\n sharedPropertyTypeMapping: {},\n },\n },\n queryTypes: {\n \"getCount\": {\n apiName: \"getCount\",\n output: {\n type: \"integer\",\n },\n parameters: {\n completed: { dataType: { type: \"boolean\" } },\n },\n rid: \"rid.query.1\",\n version: \"0\",\n },\n \"returnsTodo\": {\n apiName: \"returnsTodo\",\n output: {\n type: \"object\",\n objectApiName: \"Todo\",\n objectTypeApiName: \"Todo\",\n },\n parameters: {\n someTodo: {\n description: \"Random desc so we test jsdoc\",\n dataType: {\n type: \"object\",\n objectApiName: \"Todo\",\n objectTypeApiName: \"Todo\",\n },\n },\n },\n rid: \"rid.query.2\",\n version: \"0\",\n },\n },\n interfaceTypes: {\n SomeInterface: {\n apiName: \"SomeInterface\",\n description: \"Some interface\",\n properties: {\n \"SomeProperty\": {\n apiName: \"SomeProperty\",\n description: \"Some property\",\n displayName: \"Sum Property\",\n dataType: {\n type: \"string\",\n },\n rid: \"idk2\",\n },\n },\n rid: \"idk\",\n displayName: \"Sum Interface\",\n extendsInterfaces: [],\n links: {},\n implementedByObjectTypes: [],\n allProperties: {\n \"SomeProperty\": {\n apiName: \"SomeProperty\",\n description: \"Some property\",\n displayName: \"Sum Property\",\n dataType: {\n type: \"string\",\n },\n rid: \"idk2\",\n },\n },\n allExtendsInterfaces: [],\n allLinks: {},\n },\n },\n sharedPropertyTypes: {\n SomeProperty: {\n apiName: \"SomeProperty\",\n description: \"Some property\",\n displayName: \"Sum Property\",\n dataType: {\n type: \"string\",\n },\n rid: \"idk2\",\n },\n },\n} as const satisfies WireOntologyDefinition;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAO,MAAMA,gBAAwC,GAAG;EACtDC,QAAQ,EAAE;IACRC,GAAG,EAAE,SAAS;IACdC,OAAO,EAAE,iBAAiB;IAC1BC,WAAW,EAAE,EAAE;IACfC,WAAW,EAAE;EACf,CAAC;EACDC,WAAW,EAAE;IACX,mBAAmB,EAAE;MACnBH,OAAO,EAAE,mBAAmB;MAC5BE,WAAW,EAAE,qDAAqD;MAClEE,UAAU,EAAE;QACVC,MAAM,EAAE;UACNH,WAAW,EAAE,0BAA0B;UACvCI,QAAQ,EAAE;YACRC,IAAI,EAAE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C,KAAK,EAAE,CAAC,CAAC;MACTC,wBAAwB,EAAE,EAAE;MAC5BC,aAAa,EAAE;QACb,cAAc,EAAE;UACd7C,OAAO,EAAE,cAAc;UACvBE,WAAW,EAAE,eAAe;UAC5BD,WAAW,EAAE,cAAc;UAC3BK,QAAQ,EAAE;YACRC,IAAI,EAAE;UACR,CAAC;UACDR,GAAG,EAAE;QACP;MACF,CAAC;MACD+C,oBAAoB,EAAE,EAAE;MACxBC,QAAQ,EAAE,CAAC;IACb;EACF,CAAC;EACDC,mBAAmB,EAAE;IACnBC,YAAY,EAAE;MACZjD,OAAO,EAAE,cAAc;MACvBE,WAAW,EAAE,eAAe;MAC5BD,WAAW,EAAE,cAAc;MAC3BK,QAAQ,EAAE;QACRC,IAAI,EAAE;MACR,CAAC;MACDR,GAAG,EAAE;IACP;EACF;AACF,CAA2C","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import * as ts from "typescript";
17
18
  export function compileThis(files, basePath) {
18
19
  const compilerOptions = {
@@ -1 +1 @@
1
- {"version":3,"file":"compileThis.js","names":["ts","compileThis","files","basePath","compilerOptions","noEmit","target","ScriptTarget","ES2020","host","createCompilerHost","originalReadFile","readFile","filename","startsWith","writeFile","Error","program","createProgram","options","rootNames","getPreEmitDiagnostics"],"sources":["compileThis.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\";\nexport function compileThis(files, basePath) {\n const compilerOptions = {\n noEmit: true,\n target: ts.ScriptTarget.ES2020,\n };\n const host = ts.createCompilerHost(compilerOptions);\n const originalReadFile = host.readFile;\n host.readFile = (filename) => {\n if (filename.startsWith(basePath)) {\n return files[filename];\n }\n else {\n return originalReadFile(filename);\n }\n };\n host.writeFile = () => {\n throw new Error(\"File writes not allowed\");\n };\n const program = ts.createProgram({\n options: compilerOptions,\n host,\n rootNames: [\"/foo/index.ts\"],\n });\n return ts.getPreEmitDiagnostics(program);\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,OAAO,SAASC,WAAWA,CAACC,KAAK,EAAEC,QAAQ,EAAE;EACzC,MAAMC,eAAe,GAAG;IACpBC,MAAM,EAAE,IAAI;IACZC,MAAM,EAAEN,EAAE,CAACO,YAAY,CAACC;EAC5B,CAAC;EACD,MAAMC,IAAI,GAAGT,EAAE,CAACU,kBAAkB,CAACN,eAAe,CAAC;EACnD,MAAMO,gBAAgB,GAAGF,IAAI,CAACG,QAAQ;EACtCH,IAAI,CAACG,QAAQ,GAAIC,QAAQ,IAAK;IAC1B,IAAIA,QAAQ,CAACC,UAAU,CAACX,QAAQ,CAAC,EAAE;MAC/B,OAAOD,KAAK,CAACW,QAAQ,CAAC;IAC1B,CAAC,MACI;MACD,OAAOF,gBAAgB,CAACE,QAAQ,CAAC;IACrC;EACJ,CAAC;EACDJ,IAAI,CAACM,SAAS,GAAG,MAAM;IACnB,MAAM,IAAIC,KAAK,CAAC,yBAAyB,CAAC;EAC9C,CAAC;EACD,MAAMC,OAAO,GAAGjB,EAAE,CAACkB,aAAa,CAAC;IAC7BC,OAAO,EAAEf,eAAe;IACxBK,IAAI;IACJW,SAAS,EAAE,CAAC,eAAe;EAC/B,CAAC,CAAC;EACF,OAAOpB,EAAE,CAACqB,qBAAqB,CAACJ,OAAO,CAAC;AAC5C","ignoreList":[]}
1
+ {"version":3,"file":"compileThis.js","names":["ts","compileThis","files","basePath","compilerOptions","noEmit","target","ScriptTarget","ES2020","host","createCompilerHost","originalReadFile","readFile","filename","startsWith","writeFile","Error","program","createProgram","options","rootNames","getPreEmitDiagnostics"],"sources":["compileThis.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as ts from \"typescript\";\n\nexport function compileThis(\n files: Record<string, string>,\n basePath: string,\n): readonly ts.Diagnostic[] {\n const compilerOptions: ts.CompilerOptions = {\n noEmit: true,\n target: ts.ScriptTarget.ES2020,\n };\n\n const host = ts.createCompilerHost(compilerOptions);\n const originalReadFile = host.readFile;\n host.readFile = (filename) => {\n if (filename.startsWith(basePath)) {\n return files[filename];\n } else {\n return originalReadFile(filename);\n }\n };\n host.writeFile = () => {\n throw new Error(\"File writes not allowed\");\n };\n\n const program = ts.createProgram({\n options: compilerOptions,\n host,\n rootNames: [\"/foo/index.ts\"],\n });\n\n return ts.getPreEmitDiagnostics(program);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,EAAE,MAAM,YAAY;AAEhC,OAAO,SAASC,WAAWA,CACzBC,KAA6B,EAC7BC,QAAgB,EACU;EAC1B,MAAMC,eAAmC,GAAG;IAC1CC,MAAM,EAAE,IAAI;IACZC,MAAM,EAAEN,EAAE,CAACO,YAAY,CAACC;EAC1B,CAAC;EAED,MAAMC,IAAI,GAAGT,EAAE,CAACU,kBAAkB,CAACN,eAAe,CAAC;EACnD,MAAMO,gBAAgB,GAAGF,IAAI,CAACG,QAAQ;EACtCH,IAAI,CAACG,QAAQ,GAAIC,QAAQ,IAAK;IAC5B,IAAIA,QAAQ,CAACC,UAAU,CAACX,QAAQ,CAAC,EAAE;MACjC,OAAOD,KAAK,CAACW,QAAQ,CAAC;IACxB,CAAC,MAAM;MACL,OAAOF,gBAAgB,CAACE,QAAQ,CAAC;IACnC;EACF,CAAC;EACDJ,IAAI,CAACM,SAAS,GAAG,MAAM;IACrB,MAAM,IAAIC,KAAK,CAAC,yBAAyB,CAAC;EAC5C,CAAC;EAED,MAAMC,OAAO,GAAGjB,EAAE,CAACkB,aAAa,CAAC;IAC/BC,OAAO,EAAEf,eAAe;IACxBK,IAAI;IACJW,SAAS,EAAE,CAAC,eAAe;EAC7B,CAAC,CAAC;EAEF,OAAOpB,EAAE,CAACqB,qBAAqB,CAACJ,OAAO,CAAC;AAC1C","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { vi } from "vitest";
17
18
  export function createMockMinimalFiles() {
18
19
  const writeFile = vi.fn(() => Promise.resolve());
@@ -1 +1 @@
1
- {"version":3,"file":"createMockMinimalFiles.js","names":["vi","createMockMinimalFiles","writeFile","fn","Promise","resolve","getFiles","Object","fromEntries","mock","calls","readdir","minimalFiles","mkdir","dumpFilesToConsole","path","contents","entries","console","group","log","groupEnd"],"sources":["createMockMinimalFiles.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 { vi } from \"vitest\";\nexport function createMockMinimalFiles() {\n const writeFile = vi.fn(() => Promise.resolve());\n const getFiles = () => Object.fromEntries(writeFile.mock.calls);\n const readdir = vi.fn(() => Promise.resolve([]));\n return {\n minimalFiles: {\n writeFile: writeFile,\n mkdir: () => Promise.resolve(),\n readdir: readdir,\n },\n getFiles,\n dumpFilesToConsole: () => {\n for (const [path, contents] of Object.entries(getFiles())) {\n console.group(path);\n console.log(contents);\n console.groupEnd();\n }\n },\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,QAAQ;AAC3B,OAAO,SAASC,sBAAsBA,CAAA,EAAG;EACrC,MAAMC,SAAS,GAAGF,EAAE,CAACG,EAAE,CAAC,MAAMC,OAAO,CAACC,OAAO,CAAC,CAAC,CAAC;EAChD,MAAMC,QAAQ,GAAGA,CAAA,KAAMC,MAAM,CAACC,WAAW,CAACN,SAAS,CAACO,IAAI,CAACC,KAAK,CAAC;EAC/D,MAAMC,OAAO,GAAGX,EAAE,CAACG,EAAE,CAAC,MAAMC,OAAO,CAACC,OAAO,CAAC,EAAE,CAAC,CAAC;EAChD,OAAO;IACHO,YAAY,EAAE;MACVV,SAAS,EAAEA,SAAS;MACpBW,KAAK,EAAEA,CAAA,KAAMT,OAAO,CAACC,OAAO,CAAC,CAAC;MAC9BM,OAAO,EAAEA;IACb,CAAC;IACDL,QAAQ;IACRQ,kBAAkB,EAAEA,CAAA,KAAM;MACtB,KAAK,MAAM,CAACC,IAAI,EAAEC,QAAQ,CAAC,IAAIT,MAAM,CAACU,OAAO,CAACX,QAAQ,CAAC,CAAC,CAAC,EAAE;QACvDY,OAAO,CAACC,KAAK,CAACJ,IAAI,CAAC;QACnBG,OAAO,CAACE,GAAG,CAACJ,QAAQ,CAAC;QACrBE,OAAO,CAACG,QAAQ,CAAC,CAAC;MACtB;IACJ;EACJ,CAAC;AACL","ignoreList":[]}
1
+ {"version":3,"file":"createMockMinimalFiles.js","names":["vi","createMockMinimalFiles","writeFile","fn","Promise","resolve","getFiles","Object","fromEntries","mock","calls","readdir","minimalFiles","mkdir","dumpFilesToConsole","path","contents","entries","console","group","log","groupEnd"],"sources":["createMockMinimalFiles.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { vi } from \"vitest\";\nimport type { ReaddirFn, WriteFileFn } from \"../../MinimalFs.js\";\n\nexport function createMockMinimalFiles(): {\n minimalFiles: {\n writeFile: WriteFileFn;\n mkdir: () => Promise<void>;\n readdir: ReaddirFn;\n };\n getFiles: () => {\n [k: string]: string;\n };\n dumpFilesToConsole: () => void;\n} {\n const writeFile = vi.fn<WriteFileFn>(\n () => Promise.resolve(),\n );\n const getFiles = () => Object.fromEntries(writeFile.mock.calls);\n\n const readdir = vi.fn<ReaddirFn>(\n () => Promise.resolve([]),\n );\n\n return {\n minimalFiles: {\n writeFile: writeFile as WriteFileFn,\n mkdir: () => Promise.resolve(),\n readdir: readdir as ReaddirFn,\n },\n getFiles,\n dumpFilesToConsole: () => {\n for (const [path, contents] of Object.entries(getFiles())) {\n console.group(path);\n console.log(contents);\n console.groupEnd();\n }\n },\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,EAAE,QAAQ,QAAQ;AAG3B,OAAO,SAASC,sBAAsBA,CAAA,EAUpC;EACA,MAAMC,SAAS,GAAGF,EAAE,CAACG,EAAE,CACrB,MAAMC,OAAO,CAACC,OAAO,CAAC,CACxB,CAAC;EACD,MAAMC,QAAQ,GAAGA,CAAA,KAAMC,MAAM,CAACC,WAAW,CAACN,SAAS,CAACO,IAAI,CAACC,KAAK,CAAC;EAE/D,MAAMC,OAAO,GAAGX,EAAE,CAACG,EAAE,CACnB,MAAMC,OAAO,CAACC,OAAO,CAAC,EAAE,CAC1B,CAAC;EAED,OAAO;IACLO,YAAY,EAAE;MACZV,SAAS,EAAEA,SAAwB;MACnCW,KAAK,EAAEA,CAAA,KAAMT,OAAO,CAACC,OAAO,CAAC,CAAC;MAC9BM,OAAO,EAAEA;IACX,CAAC;IACDL,QAAQ;IACRQ,kBAAkB,EAAEA,CAAA,KAAM;MACxB,KAAK,MAAM,CAACC,IAAI,EAAEC,QAAQ,CAAC,IAAIT,MAAM,CAACU,OAAO,CAACX,QAAQ,CAAC,CAAC,CAAC,EAAE;QACzDY,OAAO,CAACC,KAAK,CAACJ,IAAI,CAAC;QACnBG,OAAO,CAACE,GAAG,CAACJ,QAAQ,CAAC;QACrBE,OAAO,CAACG,QAAQ,CAAC,CAAC;MACpB;IACF;EACF,CAAC;AACH","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { format } from "prettier";
17
18
  export function formatTs(contents) {
18
19
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"formatTs.js","names":["format","formatTs","contents","parser","singleQuote","trailingComma","tabWidth","printWidth","e","console","error","log"],"sources":["formatTs.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 { format } from \"prettier\";\nexport function formatTs(contents) {\n try {\n return format(contents, {\n parser: \"typescript\",\n singleQuote: true,\n trailingComma: \"all\",\n tabWidth: 2,\n printWidth: 120,\n });\n }\n catch (e) {\n console.error(\"Failed to format file\", e);\n console.log(contents);\n return contents;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,MAAM,QAAQ,UAAU;AACjC,OAAO,SAASC,QAAQA,CAACC,QAAQ,EAAE;EAC/B,IAAI;IACA,OAAOF,MAAM,CAACE,QAAQ,EAAE;MACpBC,MAAM,EAAE,YAAY;MACpBC,WAAW,EAAE,IAAI;MACjBC,aAAa,EAAE,KAAK;MACpBC,QAAQ,EAAE,CAAC;MACXC,UAAU,EAAE;IAChB,CAAC,CAAC;EACN,CAAC,CACD,OAAOC,CAAC,EAAE;IACNC,OAAO,CAACC,KAAK,CAAC,uBAAuB,EAAEF,CAAC,CAAC;IACzCC,OAAO,CAACE,GAAG,CAACT,QAAQ,CAAC;IACrB,OAAOA,QAAQ;EACnB;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"formatTs.js","names":["format","formatTs","contents","parser","singleQuote","trailingComma","tabWidth","printWidth","e","console","error","log"],"sources":["formatTs.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { format } from \"prettier\";\n\nexport function formatTs(contents: string): string | Promise<string> {\n try {\n return format(contents, {\n parser: \"typescript\",\n singleQuote: true,\n trailingComma: \"all\",\n tabWidth: 2,\n printWidth: 120,\n });\n } catch (e) {\n console.error(\"Failed to format file\", e);\n console.log(contents);\n return contents;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,UAAU;AAEjC,OAAO,SAASC,QAAQA,CAACC,QAAgB,EAA4B;EACnE,IAAI;IACF,OAAOF,MAAM,CAACE,QAAQ,EAAE;MACtBC,MAAM,EAAE,YAAY;MACpBC,WAAW,EAAE,IAAI;MACjBC,aAAa,EAAE,KAAK;MACpBC,QAAQ,EAAE,CAAC;MACXC,UAAU,EAAE;IACd,CAAC,CAAC;EACJ,CAAC,CAAC,OAAOC,CAAC,EAAE;IACVC,OAAO,CAACC,KAAK,CAAC,uBAAuB,EAAEF,CAAC,CAAC;IACzCC,OAAO,CAACE,GAAG,CAACT,QAAQ,CAAC;IACrB,OAAOA,QAAQ;EACjB;AACF","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  /**
17
18
  * Verify that the target outDir does not yet exist OR is empty.
18
19
  *
@@ -1 +1 @@
1
- {"version":3,"file":"verifyOutDir.js","names":["verifyOutDir","outDir","fs","contents","readdir","length","Error","e","code"],"sources":["verifyOutDir.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 */\n/**\n * Verify that the target outDir does not yet exist OR is empty.\n *\n * Re-generating an ontology on top of itself is not supported and may leave old\n * files around or refuse to update files with new contents in some cases.\n */\nexport async function verifyOutDir(outDir, fs) {\n // if outDir exists and is not empty, we cannot proceed with the generation\n try {\n const contents = await fs.readdir(outDir);\n if (contents.length !== 0) {\n throw new Error(`outDir ${outDir} is not empty, please delete its contents and try again`);\n }\n }\n catch (e) {\n if (e.code === \"ENOENT\") {\n // acceptable, we'll create the directory ourselves\n }\n else {\n throw e;\n }\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeA,YAAYA,CAACC,MAAM,EAAEC,EAAE,EAAE;EAC3C;EACA,IAAI;IACA,MAAMC,QAAQ,GAAG,MAAMD,EAAE,CAACE,OAAO,CAACH,MAAM,CAAC;IACzC,IAAIE,QAAQ,CAACE,MAAM,KAAK,CAAC,EAAE;MACvB,MAAM,IAAIC,KAAK,CAAC,UAAUL,MAAM,yDAAyD,CAAC;IAC9F;EACJ,CAAC,CACD,OAAOM,CAAC,EAAE;IACN,MAAIA,CAAC,CAACC,IAAI,KAAK,QAAQ,GAGlB;MACD,MAAMD,CAAC;IACX,CAAC,CAJG;EAKR;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"verifyOutDir.js","names":["verifyOutDir","outDir","fs","contents","readdir","length","Error","e","code"],"sources":["verifyOutDir.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { MinimalFs } from \"../MinimalFs.js\";\n\n/**\n * Verify that the target outDir does not yet exist OR is empty.\n *\n * Re-generating an ontology on top of itself is not supported and may leave old\n * files around or refuse to update files with new contents in some cases.\n */\nexport async function verifyOutDir(\n outDir: string,\n fs: MinimalFs,\n): Promise<void> {\n // if outDir exists and is not empty, we cannot proceed with the generation\n try {\n const contents = await fs.readdir(outDir);\n if (contents.length !== 0) {\n throw new Error(\n `outDir ${outDir} is not empty, please delete its contents and try again`,\n );\n }\n } catch (e) {\n if ((e as { code: string }).code === \"ENOENT\") {\n // acceptable, we'll create the directory ourselves\n } else {\n throw e;\n }\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeA,YAAYA,CAChCC,MAAc,EACdC,EAAa,EACE;EACf;EACA,IAAI;IACF,MAAMC,QAAQ,GAAG,MAAMD,EAAE,CAACE,OAAO,CAACH,MAAM,CAAC;IACzC,IAAIE,QAAQ,CAACE,MAAM,KAAK,CAAC,EAAE;MACzB,MAAM,IAAIC,KAAK,CACb,UAAUL,MAAM,yDAClB,CAAC;IACH;EACF,CAAC,CAAC,OAAOM,CAAC,EAAE;IACV,MAAKA,CAAC,CAAsBC,IAAI,KAAK,QAAQ,GAEtC;MACL,MAAMD,CAAC;IACT,CAAC,CAHC;EAIJ;AACF","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from "@osdk/generator-converters";
17
18
  import fastDeepEqual from "fast-deep-equal";
18
19
  import invariant from "tiny-invariant";
@@ -21,8 +22,9 @@ import { EnhancedInterfaceType } from "../GenerateContext/EnhancedInterfaceType.
21
22
  import { deleteUndefineds } from "../util/deleteUndefineds.js";
22
23
  import { stringify } from "../util/stringify.js";
23
24
  import { createDefinition, createObjectSet, createOsdkObject, createPropertyKeys, createProps } from "./wireObjectTypeV2ToSdkObjectConstV2.js";
25
+
24
26
  /** @internal */
25
- export function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef, ontology, v2 = false) {
27
+ export function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef, ontology, v2 = false, forInternalUse = false) {
26
28
  const definition = deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(interfaceDef.raw, v2));
27
29
  const objectDefIdentifier = interfaceDef.getDefinitionIdentifier(v2);
28
30
  const parents = definition.implements?.map(p => {
@@ -43,9 +45,9 @@ export function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef, ont
43
45
  }
44
46
  for (const apiName of Object.keys(parent.properties)) {
45
47
  if (definition.properties[apiName] != null) {
46
- !fastDeepEqual(definition.properties[apiName], parent.properties[apiName]) ? invariant(false, `Interface ${definition.apiName} redefines property '${apiName}' from parent '${parent.apiName}' but the properties do not match`) : void 0;
48
+ !fastDeepEqual(definition.properties[apiName], parent.properties[apiName]) ? process.env.NODE_ENV !== "production" ? invariant(false, `Interface ${definition.apiName} redefines property '${apiName}' from parent '${parent.apiName}' but the properties do not match`) : invariant(false) : void 0;
47
49
  } else if (mergedProperties[apiName] != null) {
48
- !fastDeepEqual(mergedProperties[apiName], parent.properties[apiName]) ? invariant(false, `Some interface defines a conflicting property '${apiName}' that does not match property from parent '${parent.apiName}'`) : void 0;
50
+ !fastDeepEqual(mergedProperties[apiName], parent.properties[apiName]) ? process.env.NODE_ENV !== "production" ? invariant(false, `Some interface defines a conflicting property '${apiName}' that does not match property from parent '${parent.apiName}'`) : invariant(false) : void 0;
49
51
  }
50
52
  mergedProperties[apiName] = parent.properties[apiName];
51
53
  }
@@ -78,13 +80,13 @@ export function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef, ont
78
80
  // if we want links to work
79
81
 
80
82
  return `${[].join("\n")}
81
- ${v2 ? function () {
83
+ ${v2 ? function (forInternalUse = false) {
82
84
  return `import type {
83
85
  InterfaceDefinition as $InterfaceDefinition,
84
86
  ObjectSet as $ObjectSet,
85
87
  Osdk as $Osdk,
86
88
  PropertyValueWireToClient as $PropType,
87
- } from "@osdk/api";
89
+ } from "${forInternalUse ? "@osdk/api" : "@osdk/client"}";
88
90
 
89
91
  ${Object.keys(definition.links).length === 0 ? `export type ${osdkObjectLinksIdentifier} = {};` : `
90
92
  export interface ${osdkObjectLinksIdentifier} {
@@ -116,7 +118,7 @@ ${stringify(definition.links, {
116
118
  ${createDefinition(interfaceDef, ontology, interfaceDef.shortApiName, ids)}
117
119
 
118
120
  `;
119
- }() : ""}
121
+ }(forInternalUse) : ""}
120
122
 
121
123
  export const ${interfaceDef.shortApiName}: ${interfaceDef.shortApiName} = {
122
124
  type: "interface",
@@ -1 +1 @@
1
- {"version":3,"file":"UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js","names":["__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition","fastDeepEqual","invariant","extractNamespace","EnhancedInterfaceType","deleteUndefineds","stringify","createDefinition","createObjectSet","createOsdkObject","createPropertyKeys","createProps","__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst","interfaceDef","ontology","v2","definition","raw","objectDefIdentifier","getDefinitionIdentifier","parents","implements","map","p","parent","requireInterfaceType","it","mergedProperties","properties","apiName","Object","keys","objectSetIdentifier","shortApiName","propertyKeysIdentifier","osdkObjectPropsIdentifier","osdkObjectStrictPropsIdentifier","osdkObjectLinksIdentifier","osdkObjectIdentifier","ids","apiNamespace","badProperties","filter","length","Error","fullApiName","join","links","linkTarget","requireObjectType","targetType","getImportedDefinitionIdentifier","multiplicity"],"sources":["UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.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 { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from \"@osdk/generator-converters\";\nimport fastDeepEqual from \"fast-deep-equal\";\nimport invariant from \"tiny-invariant\";\nimport { extractNamespace } from \"../GenerateContext/EnhancedBase.js\";\nimport { EnhancedInterfaceType } from \"../GenerateContext/EnhancedInterfaceType.js\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { stringify } from \"../util/stringify.js\";\nimport { createDefinition, createObjectSet, createOsdkObject, createPropertyKeys, createProps, } from \"./wireObjectTypeV2ToSdkObjectConstV2.js\";\n/** @internal */\nexport function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef, ontology, v2 = false) {\n const definition = deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(interfaceDef.raw, v2));\n const objectDefIdentifier = interfaceDef.getDefinitionIdentifier(v2);\n const parents = definition.implements?.map(p => {\n const parent = ontology.requireInterfaceType(p, true);\n if (parent instanceof EnhancedInterfaceType) {\n const it = deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(parent.raw, v2));\n return it;\n }\n }) ?? [];\n const mergedProperties = { ...definition.properties };\n for (const parent of parents) {\n if (parent == null) {\n // came from a foreign type and we cannot merge properties yet\n // so if they weren't listed on the interface its over\n continue;\n }\n for (const apiName of Object.keys(parent.properties)) {\n if (definition.properties[apiName] != null) {\n invariant(fastDeepEqual(definition.properties[apiName], parent.properties[apiName]), `Interface ${definition.apiName} redefines property '${apiName}' from parent '${parent.apiName}' but the properties do not match`);\n }\n else if (mergedProperties[apiName] != null) {\n invariant(fastDeepEqual(mergedProperties[apiName], parent.properties[apiName]), `Some interface defines a conflicting property '${apiName}' that does not match property from parent '${parent.apiName}'`);\n }\n mergedProperties[apiName] = parent.properties[apiName];\n }\n }\n definition.properties = mergedProperties;\n const objectSetIdentifier = `${interfaceDef.shortApiName}.ObjectSet`;\n const propertyKeysIdentifier = `${interfaceDef.shortApiName}.PropertyKeys`;\n // const osdkObjectPropsIdentifier = `OsdkObjectProps$${objectDefIdentifier}`;\n const osdkObjectPropsIdentifier = `${interfaceDef.shortApiName}.Props`;\n const osdkObjectStrictPropsIdentifier = `${interfaceDef.shortApiName}.StrictProps`;\n const osdkObjectLinksIdentifier = `OsdkObjectLinks$${objectDefIdentifier}`;\n const osdkObjectIdentifier = `${interfaceDef.shortApiName}.OsdkObject`;\n const ids = {\n objectDefIdentifier: interfaceDef.shortApiName,\n osdkObjectLinksIdentifier,\n osdkObjectPropsIdentifier,\n osdkObjectStrictPropsIdentifier,\n objectSetIdentifier,\n osdkObjectIdentifier,\n propertyKeysIdentifier,\n };\n if (interfaceDef.apiNamespace) {\n const badProperties = Object.keys(definition.properties).filter(apiName => extractNamespace(apiName)[0] == null);\n if (badProperties.length > 0) {\n throw new Error(`Interfaces with fully qualified api names MUST NOT have any properties with an unqualified api name. Interface: ${interfaceDef.fullApiName}, properties: ${badProperties.join(\", \")}`);\n }\n }\n function getV2Types() {\n return `import type {\n InterfaceDefinition as $InterfaceDefinition,\n ObjectSet as $ObjectSet, \n Osdk as $Osdk,\n PropertyValueWireToClient as $PropType,\n } from \"@osdk/api\";\n \n ${Object.keys(definition.links).length === 0\n ? `export type ${osdkObjectLinksIdentifier} = {};`\n : `\n export interface ${osdkObjectLinksIdentifier} {\n${stringify(definition.links, {\n \"*\": (definition) => {\n const linkTarget = ontology.requireObjectType(definition.targetType)\n .getImportedDefinitionIdentifier(v2);\n return `${definition.multiplicity\n ? `${linkTarget}[\"objectSet\"]`\n : `SingleLinkAccessor<${linkTarget}>`}\n `;\n },\n })}\n }\n `}\n\n export namespace ${interfaceDef.shortApiName} {\n\n ${createPropertyKeys(interfaceDef)}\n\n\n ${createProps(interfaceDef, \"Props\", false)}\n ${createProps(interfaceDef, \"StrictProps\", true)}\n\n\n ${createObjectSet(interfaceDef, ids)}\n\n ${createOsdkObject(interfaceDef, \"OsdkInstance\", ids)}\n \n } \n\n ${createDefinition(interfaceDef, ontology, interfaceDef.shortApiName, ids)}\n\n`;\n }\n // FIXME: We need to fill in the imports\n // if we want links to work\n const imports = [];\n definition;\n return `${imports.join(\"\\n\")}\n ${v2 ? getV2Types() : \"\"}\n\n export const ${interfaceDef.shortApiName}: ${interfaceDef.shortApiName} = {\n type: \"interface\",\n apiName: \"${interfaceDef.fullApiName}\",\n osdkMetadata: $osdkMetadata,\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,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,SAAS,MAAM,gBAAgB;AACtC,SAASC,gBAAgB,QAAQ,oCAAoC;AACrE,SAASC,qBAAqB,QAAQ,6CAA6C;AACnF,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,SAAS,QAAQ,sBAAsB;AAChD,SAASC,gBAAgB,EAAEC,eAAe,EAAEC,gBAAgB,EAAEC,kBAAkB,EAAEC,WAAW,QAAS,yCAAyC;AAC/I;AACA,OAAO,SAASC,8CAA8CA,CAACC,YAAY,EAAEC,QAAQ,EAAEC,EAAE,GAAG,KAAK,EAAE;EAC/F,MAAMC,UAAU,GAAGX,gBAAgB,CAACL,mDAAmD,CAACa,YAAY,CAACI,GAAG,EAAEF,EAAE,CAAC,CAAC;EAC9G,MAAMG,mBAAmB,GAAGL,YAAY,CAACM,uBAAuB,CAACJ,EAAE,CAAC;EACpE,MAAMK,OAAO,GAAGJ,UAAU,CAACK,UAAU,EAAEC,GAAG,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ACU,UAAU,CAAC+B,KAAK,EAAE;MACd,GAAG,EAAG/B,UAAU,IAAK;QACjB,MAAMgC,UAAU,GAAGlC,QAAQ,CAACmC,iBAAiB,CAACjC,UAAU,CAACkC,UAAU,CAAC,CAC/DC,+BAA+B,CAACpC,EAAE,CAAC;QACxC,OAAO,GAAGC,UAAU,CAACoC,YAAY,GAC3B,GAAGJ,UAAU,eAAe,GAC5B,sBAAsBA,UAAU,GAAG;AAC7D,WAAW;MACK;IACJ,CAAC,CAAC;AACd;AACA,KAAK;AACL;AACA,uBAAuBnC,YAAY,CAACoB,YAAY;AAChD;AACA,QAAQvB,kBAAkB,CAACG,YAAY,CAAC;AACxC;AACA;AACA,QAAQF,WAAW,CAACE,YAAY,EAAE,OAAO,EAAE,KAAK,CAAC;AACjD,QAAQF,WAAW,CAACE,YAAY,EAAE,aAAa,EAAE,IAAI,CAAC;AACtD;AACA;AACA,QAAQL,eAAe,CAACK,YAAY,EAAE0B,GAAG,CAAC;AAC1C;AACA,QAAQ9B,gBAAgB,CAACI,YAAY,EAAE,cAAc,EAAE0B,GAAG,CAAC;AAC3D;AACA;AACA;AACA,MAAMhC,gBAAgB,CAACM,YAAY,EAAEC,QAAQ,EAAED,YAAY,CAACoB,YAAY,EAAEM,GAAG,CAAC;AAC9E;AACA,CAAC;EACG,CAAC,CAMiB,CAAC,GAAG,EAAE;AAC5B;AACA,mBAAmB1B,YAAY,CAACoB,YAAY,KAAKpB,YAAY,CAACoB,YAAY;AAC1E;AACA,kBAAkBpB,YAAY,CAACgC,WAAW;AAC1C;AACA,UAAU;AACV","ignoreList":[]}
1
+ {"version":3,"file":"UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js","names":["__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition","fastDeepEqual","invariant","extractNamespace","EnhancedInterfaceType","deleteUndefineds","stringify","createDefinition","createObjectSet","createOsdkObject","createPropertyKeys","createProps","__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst","interfaceDef","ontology","v2","forInternalUse","definition","raw","objectDefIdentifier","getDefinitionIdentifier","parents","implements","map","p","parent","requireInterfaceType","it","mergedProperties","properties","apiName","Object","keys","process","env","NODE_ENV","objectSetIdentifier","shortApiName","propertyKeysIdentifier","osdkObjectPropsIdentifier","osdkObjectStrictPropsIdentifier","osdkObjectLinksIdentifier","osdkObjectIdentifier","ids","apiNamespace","badProperties","filter","length","Error","fullApiName","join","links","linkTarget","requireObjectType","targetType","getImportedDefinitionIdentifier","multiplicity"],"sources":["UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from \"@osdk/generator-converters\";\nimport fastDeepEqual from \"fast-deep-equal\";\nimport invariant from \"tiny-invariant\";\nimport { extractNamespace } from \"../GenerateContext/EnhancedBase.js\";\nimport { EnhancedInterfaceType } from \"../GenerateContext/EnhancedInterfaceType.js\";\nimport type { EnhancedOntologyDefinition } from \"../GenerateContext/EnhancedOntologyDefinition.js\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { stringify } from \"../util/stringify.js\";\nimport type { Identifiers } from \"./wireObjectTypeV2ToSdkObjectConstV2.js\";\nimport {\n createDefinition,\n createObjectSet,\n createOsdkObject,\n createPropertyKeys,\n createProps,\n} from \"./wireObjectTypeV2ToSdkObjectConstV2.js\";\n\n/** @internal */\nexport function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(\n interfaceDef: EnhancedInterfaceType,\n ontology: EnhancedOntologyDefinition,\n v2: boolean = false,\n forInternalUse: boolean = false,\n) {\n const definition = deleteUndefineds(\n __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(\n interfaceDef.raw,\n v2,\n ),\n );\n\n const objectDefIdentifier = interfaceDef.getDefinitionIdentifier(v2);\n\n const parents = definition.implements?.map(p => {\n const parent = ontology.requireInterfaceType(p, true);\n if (parent instanceof EnhancedInterfaceType) {\n const it = deleteUndefineds(\n __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(\n parent.raw,\n v2,\n ),\n );\n return it;\n }\n }) ?? [];\n\n const mergedProperties = { ...definition.properties };\n for (const parent of parents) {\n if (parent == null) {\n // came from a foreign type and we cannot merge properties yet\n // so if they weren't listed on the interface its over\n continue;\n }\n for (const apiName of Object.keys(parent.properties)) {\n if (definition.properties[apiName] != null) {\n invariant(\n fastDeepEqual(\n definition.properties[apiName],\n parent.properties[apiName],\n ),\n `Interface ${definition.apiName} redefines property '${apiName}' from parent '${parent.apiName}' but the properties do not match`,\n );\n } else if (mergedProperties[apiName] != null) {\n invariant(\n fastDeepEqual(\n mergedProperties[apiName],\n parent.properties[apiName],\n ),\n `Some interface defines a conflicting property '${apiName}' that does not match property from parent '${parent.apiName}'`,\n );\n }\n mergedProperties[apiName] = parent.properties[apiName];\n }\n }\n\n definition.properties = mergedProperties;\n\n const objectSetIdentifier = `${interfaceDef.shortApiName}.ObjectSet`;\n const propertyKeysIdentifier = `${interfaceDef.shortApiName}.PropertyKeys`;\n // const osdkObjectPropsIdentifier = `OsdkObjectProps$${objectDefIdentifier}`;\n const osdkObjectPropsIdentifier = `${interfaceDef.shortApiName}.Props`;\n const osdkObjectStrictPropsIdentifier =\n `${interfaceDef.shortApiName}.StrictProps`;\n const osdkObjectLinksIdentifier = `OsdkObjectLinks$${objectDefIdentifier}`;\n const osdkObjectIdentifier = `${interfaceDef.shortApiName}.OsdkObject`;\n\n const ids: Identifiers = {\n objectDefIdentifier: interfaceDef.shortApiName,\n osdkObjectLinksIdentifier,\n osdkObjectPropsIdentifier,\n osdkObjectStrictPropsIdentifier,\n objectSetIdentifier,\n osdkObjectIdentifier,\n propertyKeysIdentifier,\n };\n\n if (interfaceDef.apiNamespace) {\n const badProperties = Object.keys(definition.properties).filter(apiName =>\n extractNamespace(apiName)[0] == null\n );\n if (badProperties.length > 0) {\n throw new Error(\n `Interfaces with fully qualified api names MUST NOT have any properties with an unqualified api name. Interface: ${interfaceDef.fullApiName}, properties: ${\n badProperties.join(\", \")\n }`,\n );\n }\n }\n\n function getV2Types(forInternalUse: boolean = false) {\n return `import type {\n InterfaceDefinition as $InterfaceDefinition,\n ObjectSet as $ObjectSet, \n Osdk as $Osdk,\n PropertyValueWireToClient as $PropType,\n } from \"${forInternalUse ? \"@osdk/api\" : \"@osdk/client\"}\";\n \n ${\n Object.keys(definition.links).length === 0\n ? `export type ${osdkObjectLinksIdentifier} = {};`\n : `\n export interface ${osdkObjectLinksIdentifier} {\n${\n stringify(definition.links, {\n \"*\": (definition) => {\n const linkTarget = ontology.requireObjectType(\n definition.targetType,\n )\n .getImportedDefinitionIdentifier(v2);\n\n return `${\n definition.multiplicity\n ? `${linkTarget}[\"objectSet\"]`\n : `SingleLinkAccessor<${linkTarget}>`\n }\n `;\n },\n })\n }\n }\n `\n }\n\n export namespace ${interfaceDef.shortApiName} {\n\n ${createPropertyKeys(interfaceDef)}\n\n\n ${createProps(interfaceDef, \"Props\", false)}\n ${createProps(interfaceDef, \"StrictProps\", true)}\n\n\n ${createObjectSet(interfaceDef, ids)}\n\n ${createOsdkObject(interfaceDef, \"OsdkInstance\", ids)}\n \n } \n\n ${createDefinition(interfaceDef, ontology, interfaceDef.shortApiName, ids)}\n\n`;\n }\n\n // FIXME: We need to fill in the imports\n // if we want links to work\n const imports: string[] = [];\n definition;\n return `${imports.join(\"\\n\")}\n ${v2 ? getV2Types(forInternalUse) : \"\"}\n\n export const ${interfaceDef.shortApiName}: ${interfaceDef.shortApiName} = {\n type: \"interface\",\n apiName: \"${interfaceDef.fullApiName}\",\n osdkMetadata: $osdkMetadata,\n };`;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,mDAAmD,QAAQ,4BAA4B;AAChG,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,SAAS,MAAM,gBAAgB;AACtC,SAASC,gBAAgB,QAAQ,oCAAoC;AACrE,SAASC,qBAAqB,QAAQ,6CAA6C;AAEnF,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,SAAS,QAAQ,sBAAsB;AAEhD,SACEC,gBAAgB,EAChBC,eAAe,EACfC,gBAAgB,EAChBC,kBAAkB,EAClBC,WAAW,QACN,yCAAyC;;AAEhD;AACA,OAAO,SAASC,8CAA8CA,CAC5DC,YAAmC,EACnCC,QAAoC,EACpCC,EAAW,GAAG,KAAK,EACnBC,cAAuB,GAAG,KAAK,EAC/B;EACA,MAAMC,UAAU,GAAGZ,gBAAgB,CACjCL,mDAAmD,CACjDa,YAAY,CAACK,GAAG,EAChBH,EACF,CACF,CAAC;EAED,MAAMI,mBAAmB,GAAGN,YAAY,CAACO,uBAAuB,CAACL,EAAE,CAAC;EAEpE,MAAMM,OAAO,GAAGJ,UAAU,CAACK,UAAU,EAAEC,GAAG,CAACC,CAAC,IAAI;IAC9C,MAAMC,MAAM,GAAGX,QAAQ,CAACY,oBAAoB,CAACF,CAAC,EAAE,IAAI,CAAC;IACrD,IAAIC,MAAM,YAAYrB,qBAAqB,EAAE;MAC3C,MAAMuB,EAAE,GAAGtB,gBAAgB,CACzBL,mDAAmD,CACjDyB,MAAM,CAACP,GAAG,EACVH,EACF,CACF,CAAC;MACD,OAAOY,EAAE;IACX;EACF,CAAC,CAAC,IAAI,EAAE;EAER,MAAMC,gBAAgB,GAAG;IAAE,GAAGX,UAAU,CAACY;EAAW,CAAC;EACrD,KAAK,MAAMJ,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,CAACuC,YAAY,GACnB,GAAGJ,UAAU,eAAe,GAC5B,sBAAsBA,UAAU,GAAG;AACvD,WACW;MACC;IACF,CAAC,CAAC;AACZ;AACA,KACK;AACL;AACA,uBACuBvC,YAAY,CAACwB,YAAY;AAChD;AACA,QAAQ3B,kBAAkB,CAACG,YAAY,CAAC;AACxC;AACA;AACA,QAAQF,WAAW,CAACE,YAAY,EAAE,OAAO,EAAE,KAAK,CAAC;AACjD,QAAQF,WAAW,CAACE,YAAY,EAAE,aAAa,EAAE,IAAI,CAAC;AACtD;AACA;AACA,QAAQL,eAAe,CAACK,YAAY,EAAE8B,GAAG,CAAC;AAC1C;AACA,QAAQlC,gBAAgB,CAACI,YAAY,EAAE,cAAc,EAAE8B,GAAG,CAAC;AAC3D;AACA;AACA;AACA,MAAMpC,gBAAgB,CAACM,YAAY,EAAEC,QAAQ,EAAED,YAAY,CAACwB,YAAY,EAAEM,GAAG,CAAC;AAC9E;AACA,CAAC;EACC,CAAC,CAOmB3B,cAAc,CAAC,GAAG,EAAE;AAC1C;AACA,mBAAmBH,YAAY,CAACwB,YAAY,KAAKxB,YAAY,CAACwB,YAAY;AAC1E;AACA,kBAAkBxB,YAAY,CAACoC,WAAW;AAC1C;AACA,UAAU;AACV","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { format } from "prettier";
17
18
  import { describe, expect, it } from "vitest";
18
19
  import { EnhancedInterfaceType } from "../GenerateContext/EnhancedInterfaceType.js";
@@ -39,7 +40,11 @@ function simpleInterface(apiName, spts, parents, metadataLevel = 2) {
39
40
  description: metadataLevel >= 2 ? `${apiName} interface desc` : undefined,
40
41
  extendsInterfaces: parents,
41
42
  links: {},
42
- properties
43
+ properties,
44
+ implementedByObjectTypes: [],
45
+ allExtendsInterfaces: parents,
46
+ allLinks: {},
47
+ allProperties: properties
43
48
  };
44
49
  }
45
50
  function simpleOntology(apiName, interfaces) {
@@ -66,11 +71,12 @@ describe(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst, () => {
66
71
  importExt: ""
67
72
  });
68
73
  expect(ontology.interfaceTypes.Bar instanceof EnhancedInterfaceType).toBe(true);
74
+
69
75
  // type guard for below
70
76
  if (ontology.interfaceTypes.Bar instanceof ForeignType) {
71
77
  throw new Error("Expected Bar to be an EnhancedInterfaceType");
72
78
  }
73
- const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Bar, ontology, true), {
79
+ const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Bar, ontology, true, true), {
74
80
  parser: "typescript",
75
81
  printWidth: 100
76
82
  });
@@ -90,20 +96,18 @@ describe(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst, () => {
90
96
  export interface Props {
91
97
  readonly bar: $PropType["integer"] | undefined;
92
98
  }
93
- export interface StrictProps {
94
- readonly bar: $PropType["integer"] | undefined;
95
- }
99
+ export type StrictProps = Props;
96
100
 
97
101
  export interface ObjectSet extends $ObjectSet<Bar, Bar.ObjectSet> {}
98
102
 
99
103
  export type OsdkInstance<
100
- OPTIONS extends never | "$notStrict" | "$rid" = never,
104
+ OPTIONS extends never | "$rid" = never,
101
105
  K extends keyof Bar.Props = keyof Bar.Props,
102
106
  > = $Osdk.Instance<Bar, OPTIONS, K>;
103
107
 
104
108
  /** @deprecated use OsdkInstance */
105
109
  export type OsdkObject<
106
- OPTIONS extends never | "$notStrict" | "$rid" = never,
110
+ OPTIONS extends never | "$rid" = never,
107
111
  K extends keyof Bar.Props = keyof Bar.Props,
108
112
  > = OsdkInstance<OPTIONS, K>;
109
113
  }
@@ -119,6 +123,7 @@ describe(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst, () => {
119
123
  strictProps: Bar.StrictProps;
120
124
  apiName: "Bar";
121
125
  displayName: "Bar";
126
+ implementedBy: [];
122
127
  implements: [];
123
128
  links: {};
124
129
  properties: {
@@ -147,7 +152,7 @@ describe(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst, () => {
147
152
  sanitized: simpleOntology("ontology", [simpleInterface("Foo", [fooSpt], ["Parent"]), simpleInterface("Parent", [barSpt], [])]),
148
153
  importExt: ""
149
154
  });
150
- const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Foo, ontology, true), {
155
+ const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Foo, ontology, true, true), {
151
156
  parser: "typescript"
152
157
  });
153
158
  expect(formattedCode).toMatchInlineSnapshot(`
@@ -166,20 +171,18 @@ describe(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst, () => {
166
171
  export interface Props {
167
172
  readonly foo: $PropType["integer"] | undefined;
168
173
  }
169
- export interface StrictProps {
170
- readonly foo: $PropType["integer"] | undefined;
171
- }
174
+ export type StrictProps = Props;
172
175
 
173
176
  export interface ObjectSet extends $ObjectSet<Foo, Foo.ObjectSet> {}
174
177
 
175
178
  export type OsdkInstance<
176
- OPTIONS extends never | "$notStrict" | "$rid" = never,
179
+ OPTIONS extends never | "$rid" = never,
177
180
  K extends keyof Foo.Props = keyof Foo.Props,
178
181
  > = $Osdk.Instance<Foo, OPTIONS, K>;
179
182
 
180
183
  /** @deprecated use OsdkInstance */
181
184
  export type OsdkObject<
182
- OPTIONS extends never | "$notStrict" | "$rid" = never,
185
+ OPTIONS extends never | "$rid" = never,
183
186
  K extends keyof Foo.Props = keyof Foo.Props,
184
187
  > = OsdkInstance<OPTIONS, K>;
185
188
  }
@@ -196,6 +199,7 @@ describe(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst, () => {
196
199
  apiName: "Foo";
197
200
  description: "Foo interface desc";
198
201
  displayName: "Foo interface dn";
202
+ implementedBy: [];
199
203
  implements: ["Parent"];
200
204
  links: {};
201
205
  properties: {
@@ -225,7 +229,7 @@ describe(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst, () => {
225
229
  sanitized: simpleOntology("ontology", [simpleInterface("Foo", [fooSpt, barSpt], ["Parent"]), simpleInterface("Parent", [barSpt], [])]),
226
230
  importExt: ""
227
231
  });
228
- const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Foo, ontology, true), {
232
+ const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Foo, ontology, true, true), {
229
233
  parser: "typescript"
230
234
  });
231
235
  expect(formattedCode).toMatchInlineSnapshot(`
@@ -245,21 +249,18 @@ describe(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst, () => {
245
249
  readonly bar: $PropType["integer"] | undefined;
246
250
  readonly foo: $PropType["integer"] | undefined;
247
251
  }
248
- export interface StrictProps {
249
- readonly bar: $PropType["integer"] | undefined;
250
- readonly foo: $PropType["integer"] | undefined;
251
- }
252
+ export type StrictProps = Props;
252
253
 
253
254
  export interface ObjectSet extends $ObjectSet<Foo, Foo.ObjectSet> {}
254
255
 
255
256
  export type OsdkInstance<
256
- OPTIONS extends never | "$notStrict" | "$rid" = never,
257
+ OPTIONS extends never | "$rid" = never,
257
258
  K extends keyof Foo.Props = keyof Foo.Props,
258
259
  > = $Osdk.Instance<Foo, OPTIONS, K>;
259
260
 
260
261
  /** @deprecated use OsdkInstance */
261
262
  export type OsdkObject<
262
- OPTIONS extends never | "$notStrict" | "$rid" = never,
263
+ OPTIONS extends never | "$rid" = never,
263
264
  K extends keyof Foo.Props = keyof Foo.Props,
264
265
  > = OsdkInstance<OPTIONS, K>;
265
266
  }
@@ -276,6 +277,7 @@ describe(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst, () => {
276
277
  apiName: "Foo";
277
278
  description: "Foo interface desc";
278
279
  displayName: "Foo interface dn";
280
+ implementedBy: [];
279
281
  implements: ["Parent"];
280
282
  links: {};
281
283
  properties: {