@osdk/generator 2.0.0-beta.9 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (328) hide show
  1. package/CHANGELOG.md +207 -0
  2. package/build/{cjs/GenerateContext/EnhanceCommon.d.cts → browser/GenerateContext/EnhanceCommon.d.ts} +1 -1
  3. package/build/browser/GenerateContext/EnhanceCommon.js +17 -0
  4. package/build/browser/GenerateContext/EnhanceCommon.js.map +1 -0
  5. package/build/{cjs/GenerateContext/EnhancedAction.d.cts → browser/GenerateContext/EnhancedAction.d.ts} +2 -2
  6. package/build/browser/GenerateContext/EnhancedAction.js +42 -0
  7. package/build/browser/GenerateContext/EnhancedAction.js.map +1 -0
  8. package/build/{cjs/GenerateContext/EnhancedBase.d.cts → browser/GenerateContext/EnhancedBase.d.ts} +1 -1
  9. package/build/{cjs → browser}/GenerateContext/EnhancedBase.d.ts.map +1 -1
  10. package/build/browser/GenerateContext/EnhancedBase.js +72 -0
  11. package/build/browser/GenerateContext/EnhancedBase.js.map +1 -0
  12. package/build/{cjs/GenerateContext/EnhancedInterfaceType.d.cts → browser/GenerateContext/EnhancedInterfaceType.d.ts} +4 -4
  13. package/build/{cjs → browser}/GenerateContext/EnhancedInterfaceType.d.ts.map +1 -1
  14. package/build/browser/GenerateContext/EnhancedInterfaceType.js +38 -0
  15. package/build/browser/GenerateContext/EnhancedInterfaceType.js.map +1 -0
  16. package/build/{cjs/GenerateContext/EnhancedObjectType.d.cts → browser/GenerateContext/EnhancedObjectType.d.ts} +4 -4
  17. package/build/browser/GenerateContext/EnhancedObjectType.d.ts.map +1 -0
  18. package/build/browser/GenerateContext/EnhancedObjectType.js +35 -0
  19. package/build/browser/GenerateContext/EnhancedObjectType.js.map +1 -0
  20. package/build/{cjs/GenerateContext/EnhancedOntologyDefinition.d.cts → browser/GenerateContext/EnhancedOntologyDefinition.d.ts} +8 -8
  21. package/build/browser/GenerateContext/EnhancedOntologyDefinition.js +77 -0
  22. package/build/browser/GenerateContext/EnhancedOntologyDefinition.js.map +1 -0
  23. package/build/{cjs/GenerateContext/EnhancedQuery.d.cts → browser/GenerateContext/EnhancedQuery.d.ts} +2 -2
  24. package/build/browser/GenerateContext/EnhancedQuery.js +42 -0
  25. package/build/browser/GenerateContext/EnhancedQuery.js.map +1 -0
  26. package/build/{cjs/GenerateContext/EnhancedSharedPropertyType.d.cts → browser/GenerateContext/EnhancedSharedPropertyType.d.ts} +2 -2
  27. package/build/browser/GenerateContext/EnhancedSharedPropertyType.js +24 -0
  28. package/build/browser/GenerateContext/EnhancedSharedPropertyType.js.map +1 -0
  29. package/build/{cjs/GenerateContext/ForeignType.d.cts → browser/GenerateContext/ForeignType.d.ts} +2 -2
  30. package/build/browser/GenerateContext/ForeignType.js +36 -0
  31. package/build/browser/GenerateContext/ForeignType.js.map +1 -0
  32. package/build/{cjs/GenerateContext/GenerateContext.d.cts → browser/GenerateContext/GenerateContext.d.ts} +3 -3
  33. package/build/browser/GenerateContext/GenerateContext.js +17 -0
  34. package/build/browser/GenerateContext/GenerateContext.js.map +1 -0
  35. package/build/{cjs/GenerateContext/enhanceOntology.d.cts → browser/GenerateContext/enhanceOntology.d.ts} +2 -2
  36. package/build/browser/GenerateContext/enhanceOntology.js +20 -0
  37. package/build/browser/GenerateContext/enhanceOntology.js.map +1 -0
  38. package/build/browser/MinimalFs.js +17 -0
  39. package/build/browser/MinimalFs.js.map +1 -0
  40. package/build/browser/WireOntologyDefinition.js +17 -0
  41. package/build/browser/WireOntologyDefinition.js.map +1 -0
  42. package/build/{cjs/generateClientSdkPackage.d.cts → browser/generateClientSdkPackage.d.ts} +3 -8
  43. package/build/{cjs → browser}/generateClientSdkPackage.d.ts.map +1 -1
  44. package/build/browser/generateClientSdkPackage.js +126 -0
  45. package/build/browser/generateClientSdkPackage.js.map +1 -0
  46. package/build/browser/generateClientSdkPackage.test.js +67 -0
  47. package/build/browser/generateClientSdkPackage.test.js.map +1 -0
  48. package/build/{cjs/index.d.cts → browser/index.d.ts} +4 -4
  49. package/build/browser/index.js +17 -1559
  50. package/build/browser/index.js.map +1 -1
  51. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.js +23 -0
  52. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.js.map +1 -0
  53. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.js +46 -0
  54. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.js.map +1 -0
  55. package/build/{cjs/shared/getObjectImports.d.cts → browser/shared/getObjectImports.d.ts} +2 -2
  56. package/build/browser/shared/getObjectImports.js +24 -0
  57. package/build/browser/shared/getObjectImports.js.map +1 -0
  58. package/build/{cjs/shared/getObjectTypeApiNamesFromQuery.d.cts → browser/shared/getObjectTypeApiNamesFromQuery.d.ts} +1 -1
  59. package/build/browser/shared/getObjectTypeApiNamesFromQuery.js +27 -0
  60. package/build/browser/shared/getObjectTypeApiNamesFromQuery.js.map +1 -0
  61. package/build/browser/shared/getObjectTypesFromQueryDataType.js +57 -0
  62. package/build/browser/shared/getObjectTypesFromQueryDataType.js.map +1 -0
  63. package/build/browser/shared/propertyJsdoc.d.ts +6 -0
  64. package/build/browser/shared/propertyJsdoc.d.ts.map +1 -0
  65. package/build/browser/shared/propertyJsdoc.js +38 -0
  66. package/build/browser/shared/propertyJsdoc.js.map +1 -0
  67. package/build/browser/shared/sanitizeMetadata.js +33 -0
  68. package/build/browser/shared/sanitizeMetadata.js.map +1 -0
  69. package/build/browser/shared/sanitizeMetadata.test.js +44 -0
  70. package/build/browser/shared/sanitizeMetadata.test.js.map +1 -0
  71. package/build/{cjs/util/InMemoryFs.d.cts → browser/util/InMemoryFs.d.ts} +1 -1
  72. package/build/browser/util/InMemoryFs.js +30 -0
  73. package/build/browser/util/InMemoryFs.js.map +1 -0
  74. package/build/browser/util/commaSeparatedIdentifiers.js +25 -0
  75. package/build/browser/util/commaSeparatedIdentifiers.js.map +1 -0
  76. package/build/browser/util/commaSeparatedTypeIdentifiers.js +19 -0
  77. package/build/browser/util/commaSeparatedTypeIdentifiers.js.map +1 -0
  78. package/build/browser/util/deleteUndefineds.js +19 -0
  79. package/build/browser/util/deleteUndefineds.js.map +1 -0
  80. package/build/browser/util/reservedKeywords.js +21 -0
  81. package/build/browser/util/reservedKeywords.js.map +1 -0
  82. package/build/browser/util/stringUnionFrom.js +23 -0
  83. package/build/browser/util/stringUnionFrom.js.map +1 -0
  84. package/build/browser/util/stringify.js +36 -0
  85. package/build/browser/util/stringify.js.map +1 -0
  86. package/build/browser/util/test/TodoWireOntology.js +232 -0
  87. package/build/browser/util/test/TodoWireOntology.js.map +1 -0
  88. package/build/browser/util/test/compileThis.js +41 -0
  89. package/build/browser/util/test/compileThis.js.map +1 -0
  90. package/build/{cjs/util/test/createMockMinimalFiles.d.cts → browser/util/test/createMockMinimalFiles.d.ts} +1 -1
  91. package/build/browser/util/test/createMockMinimalFiles.js +37 -0
  92. package/build/browser/util/test/createMockMinimalFiles.js.map +1 -0
  93. package/build/browser/util/test/formatTs.js +32 -0
  94. package/build/browser/util/test/formatTs.js.map +1 -0
  95. package/build/{cjs/util/verifyOutDir.d.cts → browser/util/verifyOutDir.d.ts} +1 -1
  96. package/build/browser/util/verifyOutDir.js +35 -0
  97. package/build/browser/util/verifyOutDir.js.map +1 -0
  98. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js +114 -0
  99. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js.map +1 -0
  100. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +273 -0
  101. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -0
  102. package/build/{cjs/v2.0/generateClientSdkVersionTwoPointZero.d.cts → browser/v2.0/generateClientSdkVersionTwoPointZero.d.ts} +2 -2
  103. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.js +119 -0
  104. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.js.map +1 -0
  105. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js +1939 -0
  106. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -0
  107. package/build/{cjs/v2.0/generateMetadata.d.cts → browser/v2.0/generateMetadata.d.ts} +1 -1
  108. package/build/browser/v2.0/generateMetadata.js +35 -0
  109. package/build/browser/v2.0/generateMetadata.js.map +1 -0
  110. package/build/{cjs/v2.0/generatePerActionDataFiles.d.cts → browser/v2.0/generatePerActionDataFiles.d.ts} +1 -1
  111. package/build/{cjs → browser}/v2.0/generatePerActionDataFiles.d.ts.map +1 -1
  112. package/build/browser/v2.0/generatePerActionDataFiles.js +240 -0
  113. package/build/browser/v2.0/generatePerActionDataFiles.js.map +1 -0
  114. package/build/browser/v2.0/generatePerActionDataFiles.test.js +51 -0
  115. package/build/browser/v2.0/generatePerActionDataFiles.test.js.map +1 -0
  116. package/build/{cjs/v2.0/generatePerQueryDataFiles.d.cts → browser/v2.0/generatePerQueryDataFiles.d.ts} +3 -3
  117. package/build/{cjs → browser}/v2.0/generatePerQueryDataFiles.d.ts.map +1 -1
  118. package/build/browser/v2.0/generatePerQueryDataFiles.js +192 -0
  119. package/build/browser/v2.0/generatePerQueryDataFiles.js.map +1 -0
  120. package/build/browser/v2.0/generatePerQueryDataFiles.test.js +195 -0
  121. package/build/browser/v2.0/generatePerQueryDataFiles.test.js.map +1 -0
  122. package/build/browser/v2.0/getDescriptionIfPresent.js +24 -0
  123. package/build/browser/v2.0/getDescriptionIfPresent.js.map +1 -0
  124. package/build/{cjs/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.cts → browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts} +3 -3
  125. package/build/{cjs → browser}/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +1 -1
  126. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js +205 -0
  127. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -0
  128. package/build/{cjs/validateWireOntologyAssumptions.d.cts → browser/validateWireOntologyAssumptions.d.ts} +1 -1
  129. package/build/browser/validateWireOntologyAssumptions.js +33 -0
  130. package/build/browser/validateWireOntologyAssumptions.js.map +1 -0
  131. package/build/esm/GenerateContext/EnhanceCommon.js +17 -0
  132. package/build/esm/GenerateContext/EnhanceCommon.js.map +1 -0
  133. package/build/esm/GenerateContext/EnhancedAction.js +42 -0
  134. package/build/esm/GenerateContext/EnhancedAction.js.map +1 -0
  135. package/build/esm/GenerateContext/EnhancedBase.d.ts.map +1 -1
  136. package/build/esm/GenerateContext/EnhancedBase.js +72 -0
  137. package/build/esm/GenerateContext/EnhancedBase.js.map +1 -0
  138. package/build/esm/GenerateContext/EnhancedInterfaceType.d.ts +2 -2
  139. package/build/esm/GenerateContext/EnhancedInterfaceType.d.ts.map +1 -1
  140. package/build/esm/GenerateContext/EnhancedInterfaceType.js +38 -0
  141. package/build/esm/GenerateContext/EnhancedInterfaceType.js.map +1 -0
  142. package/build/esm/GenerateContext/EnhancedObjectType.d.ts +2 -2
  143. package/build/esm/GenerateContext/EnhancedObjectType.d.ts.map +1 -1
  144. package/build/esm/GenerateContext/EnhancedObjectType.js +35 -0
  145. package/build/esm/GenerateContext/EnhancedObjectType.js.map +1 -0
  146. package/build/esm/GenerateContext/EnhancedOntologyDefinition.js +77 -0
  147. package/build/esm/GenerateContext/EnhancedOntologyDefinition.js.map +1 -0
  148. package/build/esm/GenerateContext/EnhancedQuery.js +42 -0
  149. package/build/esm/GenerateContext/EnhancedQuery.js.map +1 -0
  150. package/build/esm/GenerateContext/EnhancedSharedPropertyType.js +24 -0
  151. package/build/esm/GenerateContext/EnhancedSharedPropertyType.js.map +1 -0
  152. package/build/esm/GenerateContext/ForeignType.js +36 -0
  153. package/build/esm/GenerateContext/ForeignType.js.map +1 -0
  154. package/build/esm/GenerateContext/GenerateContext.js +17 -0
  155. package/build/esm/GenerateContext/GenerateContext.js.map +1 -0
  156. package/build/esm/GenerateContext/enhanceOntology.js +20 -0
  157. package/build/esm/GenerateContext/enhanceOntology.js.map +1 -0
  158. package/build/esm/MinimalFs.js +17 -0
  159. package/build/esm/MinimalFs.js.map +1 -0
  160. package/build/esm/WireOntologyDefinition.js +17 -0
  161. package/build/esm/WireOntologyDefinition.js.map +1 -0
  162. package/build/esm/generateClientSdkPackage.d.ts +1 -6
  163. package/build/esm/generateClientSdkPackage.d.ts.map +1 -1
  164. package/build/esm/generateClientSdkPackage.js +126 -0
  165. package/build/esm/generateClientSdkPackage.js.map +1 -0
  166. package/build/esm/generateClientSdkPackage.test.js +67 -0
  167. package/build/esm/generateClientSdkPackage.test.js.map +1 -0
  168. package/build/esm/index.js +17 -1559
  169. package/build/esm/index.js.map +1 -1
  170. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.js +23 -0
  171. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.js.map +1 -0
  172. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.test.js +46 -0
  173. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.test.js.map +1 -0
  174. package/build/esm/shared/getObjectImports.js +24 -0
  175. package/build/esm/shared/getObjectImports.js.map +1 -0
  176. package/build/esm/shared/getObjectTypeApiNamesFromQuery.js +27 -0
  177. package/build/esm/shared/getObjectTypeApiNamesFromQuery.js.map +1 -0
  178. package/build/esm/shared/getObjectTypesFromQueryDataType.js +57 -0
  179. package/build/esm/shared/getObjectTypesFromQueryDataType.js.map +1 -0
  180. package/build/esm/shared/propertyJsdoc.d.ts +2 -2
  181. package/build/esm/shared/propertyJsdoc.d.ts.map +1 -1
  182. package/build/esm/shared/propertyJsdoc.js +38 -0
  183. package/build/esm/shared/propertyJsdoc.js.map +1 -0
  184. package/build/esm/shared/sanitizeMetadata.js +33 -0
  185. package/build/esm/shared/sanitizeMetadata.js.map +1 -0
  186. package/build/esm/shared/sanitizeMetadata.test.js +44 -0
  187. package/build/esm/shared/sanitizeMetadata.test.js.map +1 -0
  188. package/build/esm/util/InMemoryFs.js +30 -0
  189. package/build/esm/util/InMemoryFs.js.map +1 -0
  190. package/build/esm/util/commaSeparatedIdentifiers.js +25 -0
  191. package/build/esm/util/commaSeparatedIdentifiers.js.map +1 -0
  192. package/build/esm/util/commaSeparatedTypeIdentifiers.js +19 -0
  193. package/build/esm/util/commaSeparatedTypeIdentifiers.js.map +1 -0
  194. package/build/esm/util/deleteUndefineds.js +19 -0
  195. package/build/esm/util/deleteUndefineds.js.map +1 -0
  196. package/build/esm/util/reservedKeywords.js +21 -0
  197. package/build/esm/util/reservedKeywords.js.map +1 -0
  198. package/build/esm/util/stringUnionFrom.js +23 -0
  199. package/build/esm/util/stringUnionFrom.js.map +1 -0
  200. package/build/esm/util/stringify.js +36 -0
  201. package/build/esm/util/stringify.js.map +1 -0
  202. package/build/esm/util/test/TodoWireOntology.js +232 -0
  203. package/build/esm/util/test/TodoWireOntology.js.map +1 -0
  204. package/build/esm/util/test/compileThis.js +41 -0
  205. package/build/esm/util/test/compileThis.js.map +1 -0
  206. package/build/esm/util/test/createMockMinimalFiles.js +37 -0
  207. package/build/esm/util/test/createMockMinimalFiles.js.map +1 -0
  208. package/build/esm/util/test/formatTs.js +32 -0
  209. package/build/esm/util/test/formatTs.js.map +1 -0
  210. package/build/esm/util/verifyOutDir.js +35 -0
  211. package/build/esm/util/verifyOutDir.js.map +1 -0
  212. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js +114 -0
  213. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js.map +1 -0
  214. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +273 -0
  215. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -0
  216. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.js +119 -0
  217. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.js.map +1 -0
  218. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js +1939 -0
  219. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -0
  220. package/build/esm/v2.0/generateMetadata.js +35 -0
  221. package/build/esm/v2.0/generateMetadata.js.map +1 -0
  222. package/build/esm/v2.0/generatePerActionDataFiles.d.ts.map +1 -1
  223. package/build/esm/v2.0/generatePerActionDataFiles.js +240 -0
  224. package/build/esm/v2.0/generatePerActionDataFiles.js.map +1 -0
  225. package/build/esm/v2.0/generatePerActionDataFiles.test.js +51 -0
  226. package/build/esm/v2.0/generatePerActionDataFiles.test.js.map +1 -0
  227. package/build/esm/v2.0/generatePerQueryDataFiles.d.ts +1 -1
  228. package/build/esm/v2.0/generatePerQueryDataFiles.d.ts.map +1 -1
  229. package/build/esm/v2.0/generatePerQueryDataFiles.js +192 -0
  230. package/build/esm/v2.0/generatePerQueryDataFiles.js.map +1 -0
  231. package/build/esm/v2.0/generatePerQueryDataFiles.test.js +195 -0
  232. package/build/esm/v2.0/generatePerQueryDataFiles.test.js.map +1 -0
  233. package/build/esm/v2.0/getDescriptionIfPresent.js +24 -0
  234. package/build/esm/v2.0/getDescriptionIfPresent.js.map +1 -0
  235. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +1 -1
  236. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js +205 -0
  237. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -0
  238. package/build/esm/validateWireOntologyAssumptions.js +33 -0
  239. package/build/esm/validateWireOntologyAssumptions.js.map +1 -0
  240. package/package.json +9 -14
  241. package/build/cjs/GenerateContext/EnhancedObjectType.d.ts.map +0 -1
  242. package/build/cjs/index.cjs +0 -1588
  243. package/build/cjs/index.cjs.map +0 -1
  244. package/build/cjs/shared/getEditedEntities.d.cts +0 -7
  245. package/build/cjs/shared/getEditedEntities.d.ts.map +0 -1
  246. package/build/cjs/shared/isNullableQueryDataType.d.cts +0 -3
  247. package/build/cjs/shared/isNullableQueryDataType.d.ts.map +0 -1
  248. package/build/cjs/shared/propertyJsdoc.d.cts +0 -6
  249. package/build/cjs/shared/propertyJsdoc.d.ts.map +0 -1
  250. package/build/cjs/shared/wireActionTypeV2ToSdkActionDefinition.d.cts +0 -4
  251. package/build/cjs/shared/wireActionTypeV2ToSdkActionDefinition.d.ts.map +0 -1
  252. package/build/cjs/shared/wireQueryDataTypeToQueryDataTypeDefinition.d.cts +0 -4
  253. package/build/cjs/shared/wireQueryDataTypeToQueryDataTypeDefinition.d.ts.map +0 -1
  254. package/build/cjs/shared/wireQueryTypeV2ToSdkQueryDefinition.d.cts +0 -12
  255. package/build/cjs/shared/wireQueryTypeV2ToSdkQueryDefinition.d.ts.map +0 -1
  256. package/build/esm/shared/getEditedEntities.d.ts +0 -7
  257. package/build/esm/shared/getEditedEntities.d.ts.map +0 -1
  258. package/build/esm/shared/isNullableQueryDataType.d.ts +0 -3
  259. package/build/esm/shared/isNullableQueryDataType.d.ts.map +0 -1
  260. package/build/esm/shared/wireActionTypeV2ToSdkActionDefinition.d.ts +0 -4
  261. package/build/esm/shared/wireActionTypeV2ToSdkActionDefinition.d.ts.map +0 -1
  262. package/build/esm/shared/wireQueryDataTypeToQueryDataTypeDefinition.d.ts +0 -4
  263. package/build/esm/shared/wireQueryDataTypeToQueryDataTypeDefinition.d.ts.map +0 -1
  264. package/build/esm/shared/wireQueryTypeV2ToSdkQueryDefinition.d.ts +0 -12
  265. package/build/esm/shared/wireQueryTypeV2ToSdkQueryDefinition.d.ts.map +0 -1
  266. /package/build/{cjs → browser}/GenerateContext/EnhanceCommon.d.ts.map +0 -0
  267. /package/build/{cjs → browser}/GenerateContext/EnhancedAction.d.ts.map +0 -0
  268. /package/build/{cjs → browser}/GenerateContext/EnhancedOntologyDefinition.d.ts.map +0 -0
  269. /package/build/{cjs → browser}/GenerateContext/EnhancedQuery.d.ts.map +0 -0
  270. /package/build/{cjs → browser}/GenerateContext/EnhancedSharedPropertyType.d.ts.map +0 -0
  271. /package/build/{cjs → browser}/GenerateContext/ForeignType.d.ts.map +0 -0
  272. /package/build/{cjs → browser}/GenerateContext/GenerateContext.d.ts.map +0 -0
  273. /package/build/{cjs → browser}/GenerateContext/enhanceOntology.d.ts.map +0 -0
  274. /package/build/{cjs/MinimalFs.d.cts → browser/MinimalFs.d.ts} +0 -0
  275. /package/build/{cjs → browser}/MinimalFs.d.ts.map +0 -0
  276. /package/build/{cjs/WireOntologyDefinition.d.cts → browser/WireOntologyDefinition.d.ts} +0 -0
  277. /package/build/{cjs → browser}/WireOntologyDefinition.d.ts.map +0 -0
  278. /package/build/{cjs/generateClientSdkPackage.test.d.cts → browser/generateClientSdkPackage.test.d.ts} +0 -0
  279. /package/build/{cjs → browser}/generateClientSdkPackage.test.d.ts.map +0 -0
  280. /package/build/{cjs → browser}/index.d.ts.map +0 -0
  281. /package/build/{cjs/shared/apiNamespaces/startsWithApiNamespace.d.cts → browser/shared/apiNamespaces/startsWithApiNamespace.d.ts} +0 -0
  282. /package/build/{cjs → browser}/shared/apiNamespaces/startsWithApiNamespace.d.ts.map +0 -0
  283. /package/build/{cjs/shared/apiNamespaces/startsWithApiNamespace.test.d.cts → browser/shared/apiNamespaces/startsWithApiNamespace.test.d.ts} +0 -0
  284. /package/build/{cjs → browser}/shared/apiNamespaces/startsWithApiNamespace.test.d.ts.map +0 -0
  285. /package/build/{cjs → browser}/shared/getObjectImports.d.ts.map +0 -0
  286. /package/build/{cjs → browser}/shared/getObjectTypeApiNamesFromQuery.d.ts.map +0 -0
  287. /package/build/{cjs/shared/getObjectTypesFromQueryDataType.d.cts → browser/shared/getObjectTypesFromQueryDataType.d.ts} +0 -0
  288. /package/build/{cjs → browser}/shared/getObjectTypesFromQueryDataType.d.ts.map +0 -0
  289. /package/build/{cjs/shared/sanitizeMetadata.d.cts → browser/shared/sanitizeMetadata.d.ts} +0 -0
  290. /package/build/{cjs → browser}/shared/sanitizeMetadata.d.ts.map +0 -0
  291. /package/build/{cjs/shared/sanitizeMetadata.test.d.cts → browser/shared/sanitizeMetadata.test.d.ts} +0 -0
  292. /package/build/{cjs → browser}/shared/sanitizeMetadata.test.d.ts.map +0 -0
  293. /package/build/{cjs → browser}/util/InMemoryFs.d.ts.map +0 -0
  294. /package/build/{cjs/util/commaSeparatedIdentifiers.d.cts → browser/util/commaSeparatedIdentifiers.d.ts} +0 -0
  295. /package/build/{cjs → browser}/util/commaSeparatedIdentifiers.d.ts.map +0 -0
  296. /package/build/{cjs/util/commaSeparatedTypeIdentifiers.d.cts → browser/util/commaSeparatedTypeIdentifiers.d.ts} +0 -0
  297. /package/build/{cjs → browser}/util/commaSeparatedTypeIdentifiers.d.ts.map +0 -0
  298. /package/build/{cjs/util/deleteUndefineds.d.cts → browser/util/deleteUndefineds.d.ts} +0 -0
  299. /package/build/{cjs → browser}/util/deleteUndefineds.d.ts.map +0 -0
  300. /package/build/{cjs/util/reservedKeywords.d.cts → browser/util/reservedKeywords.d.ts} +0 -0
  301. /package/build/{cjs → browser}/util/reservedKeywords.d.ts.map +0 -0
  302. /package/build/{cjs/util/stringUnionFrom.d.cts → browser/util/stringUnionFrom.d.ts} +0 -0
  303. /package/build/{cjs → browser}/util/stringUnionFrom.d.ts.map +0 -0
  304. /package/build/{cjs/util/stringify.d.cts → browser/util/stringify.d.ts} +0 -0
  305. /package/build/{cjs → browser}/util/stringify.d.ts.map +0 -0
  306. /package/build/{cjs/util/test/TodoWireOntology.d.cts → browser/util/test/TodoWireOntology.d.ts} +0 -0
  307. /package/build/{cjs → browser}/util/test/TodoWireOntology.d.ts.map +0 -0
  308. /package/build/{cjs/util/test/compileThis.d.cts → browser/util/test/compileThis.d.ts} +0 -0
  309. /package/build/{cjs → browser}/util/test/compileThis.d.ts.map +0 -0
  310. /package/build/{cjs → browser}/util/test/createMockMinimalFiles.d.ts.map +0 -0
  311. /package/build/{cjs/util/test/formatTs.d.cts → browser/util/test/formatTs.d.ts} +0 -0
  312. /package/build/{cjs → browser}/util/test/formatTs.d.ts.map +0 -0
  313. /package/build/{cjs → browser}/util/verifyOutDir.d.ts.map +0 -0
  314. /package/build/{cjs/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.cts → browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts} +0 -0
  315. /package/build/{cjs → browser}/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts.map +0 -0
  316. /package/build/{cjs/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.cts → browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts} +0 -0
  317. /package/build/{cjs → browser}/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts.map +0 -0
  318. /package/build/{cjs → browser}/v2.0/generateClientSdkVersionTwoPointZero.d.ts.map +0 -0
  319. /package/build/{cjs/v2.0/generateClientSdkVersionTwoPointZero.test.d.cts → browser/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts} +0 -0
  320. /package/build/{cjs → browser}/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts.map +0 -0
  321. /package/build/{cjs → browser}/v2.0/generateMetadata.d.ts.map +0 -0
  322. /package/build/{cjs/v2.0/generatePerActionDataFiles.test.d.cts → browser/v2.0/generatePerActionDataFiles.test.d.ts} +0 -0
  323. /package/build/{cjs → browser}/v2.0/generatePerActionDataFiles.test.d.ts.map +0 -0
  324. /package/build/{cjs/v2.0/generatePerQueryDataFiles.test.d.cts → browser/v2.0/generatePerQueryDataFiles.test.d.ts} +0 -0
  325. /package/build/{cjs → browser}/v2.0/generatePerQueryDataFiles.test.d.ts.map +0 -0
  326. /package/build/{cjs/v2.0/getDescriptionIfPresent.d.cts → browser/v2.0/getDescriptionIfPresent.d.ts} +0 -0
  327. /package/build/{cjs → browser}/v2.0/getDescriptionIfPresent.d.ts.map +0 -0
  328. /package/build/{cjs → browser}/validateWireOntologyAssumptions.d.ts.map +0 -0
@@ -0,0 +1,205 @@
1
+ /*
2
+ * Copyright 2023 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { wireObjectTypeFullMetadataToSdkObjectMetadata } from "@osdk/generator-converters";
17
+ import { EnhancedObjectType } from "../GenerateContext/EnhancedObjectType.js";
18
+ import { getObjectImports } from "../shared/getObjectImports.js";
19
+ import { propertyJsdoc } from "../shared/propertyJsdoc.js";
20
+ import { deleteUndefineds } from "../util/deleteUndefineds.js";
21
+ import { stringify } from "../util/stringify.js";
22
+ export function getObjectDefIdentifier(name, v2) {
23
+ return v2 ? name : `${name}Def`;
24
+ }
25
+ /** @internal */
26
+ export function wireObjectTypeV2ToSdkObjectConstV2(wireObject, {
27
+ ontology
28
+ }, currentFilePath) {
29
+ const object = ontology.requireObjectType(wireObject.objectType.apiName, true);
30
+ const uniqueLinkTargetTypes = new Set(wireObject.linkTypes.map(a => ontology.requireObjectType(a.objectTypeApiName, false)));
31
+ const definition = deleteUndefineds(wireObjectTypeFullMetadataToSdkObjectMetadata(object.raw, true));
32
+ const objectDefIdentifier = object.getDefinitionIdentifier(true);
33
+ const objectSetIdentifier = `${object.shortApiName}.ObjectSet`;
34
+ const propertyKeysIdentifier = `${object.shortApiName}.PropertyKeys`;
35
+ // const osdkObjectPropsIdentifier = `OsdkObjectProps$${objectDefIdentifier}`;
36
+ const osdkObjectPropsIdentifier = `${object.shortApiName}.Props`;
37
+ const osdkObjectStrictPropsIdentifier = `${object.shortApiName}.StrictProps`;
38
+ const osdkObjectLinksIdentifier = `${object.shortApiName}.Links`;
39
+ const osdkObjectIdentifier = `${object.shortApiName}.OsdkObject`;
40
+ const identifiers = {
41
+ objectDefIdentifier: `${object.shortApiName}`,
42
+ osdkObjectLinksIdentifier,
43
+ osdkObjectPropsIdentifier,
44
+ osdkObjectStrictPropsIdentifier,
45
+ objectSetIdentifier,
46
+ osdkObjectIdentifier,
47
+ propertyKeysIdentifier
48
+ };
49
+ const imports = getObjectImports(uniqueLinkTargetTypes, definition.apiName, currentFilePath, true);
50
+ return `${imports}${function () {
51
+ return `import type {
52
+ PropertyKeys as $PropertyKeys,
53
+ ObjectTypeDefinition as $ObjectTypeDefinition,
54
+ ObjectMetadata as $ObjectMetadata,
55
+ } from "@osdk/api";
56
+ import type {
57
+ ObjectSet as $ObjectSet,
58
+ Osdk as $Osdk,
59
+ OsdkObject as $OsdkObject,
60
+ PropertyValueWireToClient as $PropType,
61
+ SingleLinkAccessor as $SingleLinkAccessor,
62
+ } from "@osdk/api";
63
+
64
+
65
+ export namespace ${object.shortApiName} {
66
+
67
+ ${createPropertyKeys(object)}
68
+
69
+
70
+ ${createLinks(ontology, object, "Links")}
71
+
72
+ ${createProps(object, "Props", false)}
73
+ ${createProps(object, "StrictProps", true)}
74
+
75
+ ${createObjectSet(object, identifiers)}
76
+
77
+ ${createOsdkObject(object, "OsdkObject", identifiers)}
78
+ }
79
+
80
+
81
+
82
+ ${createDefinition(object, ontology, object.shortApiName, identifiers)}
83
+ `;
84
+ }()}
85
+
86
+ export const ${object.shortApiName}: ${objectDefIdentifier}
87
+ = {
88
+ type: "${object instanceof EnhancedObjectType ? "object" : "interface"}",
89
+ apiName: "${object.fullApiName}",
90
+ osdkMetadata: $osdkMetadata,
91
+ };`;
92
+ }
93
+ export function createOsdkObject(object, identifier, {
94
+ osdkObjectPropsIdentifier,
95
+ objectDefIdentifier,
96
+ osdkObjectStrictPropsIdentifier,
97
+ osdkObjectLinksIdentifier
98
+ }) {
99
+ object.getCleanedUpDefinition(true);
100
+ return `
101
+ export type ${identifier}<
102
+ OPTIONS extends never | "$notStrict" | "$rid" = never,
103
+ K extends keyof ${osdkObjectPropsIdentifier}= keyof ${osdkObjectPropsIdentifier},
104
+
105
+ >
106
+ = $Osdk<
107
+ ${objectDefIdentifier},
108
+ K | OPTIONS
109
+ >
110
+
111
+ ;
112
+ `;
113
+ }
114
+ export function createObjectSet(object, {
115
+ objectDefIdentifier,
116
+ objectSetIdentifier,
117
+ propertyKeysIdentifier,
118
+ osdkObjectIdentifier
119
+ }) {
120
+ return `
121
+ export interface ObjectSet extends
122
+ $ObjectSet<${objectDefIdentifier},
123
+
124
+ ${objectSetIdentifier}
125
+ >
126
+ {
127
+
128
+ }
129
+ `;
130
+ }
131
+ function maybeStripNamespace(type, q) {
132
+ if (type.apiNamespace && q.startsWith(`${type.apiNamespace}.`)) {
133
+ return q.slice(type.apiNamespace.length + 1);
134
+ } else {
135
+ return q;
136
+ }
137
+ }
138
+ export function createProps(type, identifier, strict) {
139
+ const definition = type.getCleanedUpDefinition(true);
140
+ return `export interface ${identifier} {
141
+ ${stringify(definition.properties, {
142
+ "*": (propertyDefinition, _, apiName) => {
143
+ return [`readonly "${maybeStripNamespace(type, apiName)}"${
144
+ // after we convert everything over we can do this:
145
+ // !strict || propertyDefinition.nullable ? "?" : ""
146
+ ""}`, `$PropType[${JSON.stringify(propertyDefinition.type)}]${propertyDefinition.multiplicity ? "[]" : ""}${propertyDefinition.nullable || !strict ? `| undefined` : ""}`];
147
+ }
148
+ })}
149
+ }`;
150
+ }
151
+ export function createDefinition(object, ontology, identifier, {
152
+ objectDefIdentifier,
153
+ objectSetIdentifier,
154
+ osdkObjectPropsIdentifier,
155
+ osdkObjectStrictPropsIdentifier,
156
+ osdkObjectLinksIdentifier
157
+ }) {
158
+ const definition = object.getCleanedUpDefinition(true);
159
+ return `
160
+ export interface ${identifier} extends ${object instanceof EnhancedObjectType ? `$ObjectTypeDefinition` : `$InterfaceDefinition`} {
161
+ osdkMetadata: typeof $osdkMetadata;
162
+ type: "${object instanceof EnhancedObjectType ? "object" : "interface"}";
163
+ apiName: "${object.fullApiName}";
164
+ __DefinitionMetadata?: {
165
+ objectSet: ${objectSetIdentifier};
166
+ props: ${osdkObjectPropsIdentifier};
167
+ linksType: ${osdkObjectLinksIdentifier};
168
+ strictProps: ${osdkObjectStrictPropsIdentifier};
169
+ ${stringify(definition, {
170
+ links: () => `{
171
+ ${stringify(definition.links, {
172
+ "*": definition => `$ObjectMetadata.Link<${ontology.requireObjectType(definition.targetType).getImportedDefinitionIdentifier(true)}, ${definition.multiplicity}>`
173
+ })}
174
+ }`,
175
+ properties: () => `{
176
+ ${stringify(definition.properties, {
177
+ "*": (propertyDefinition, _, apiName) => [`${propertyJsdoc(propertyDefinition, {
178
+ apiName
179
+ })}"${maybeStripNamespace(object, apiName)}"`, `$PropertyDef<"${propertyDefinition.type}", "${propertyDefinition.nullable ? "nullable" : "non-nullable"}", "${propertyDefinition.multiplicity ? "array" : "single"}">`]
180
+ })}
181
+ }`
182
+ })}
183
+ }
184
+ }
185
+ `;
186
+ }
187
+ export function createLinks(ontology, object, identifier) {
188
+ const definition = object.getCleanedUpDefinition(true);
189
+ return `
190
+ ${Object.keys(definition.links).length === 0 ? `export type ${identifier} = {};` : `
191
+ export interface ${identifier} {
192
+ ${stringify(definition.links, {
193
+ "*": (definition, _, key) => {
194
+ const linkTarget = ontology.requireObjectType(definition.targetType).getImportedDefinitionIdentifier(true);
195
+ return [`readonly ${key}`, `${definition.multiplicity ? `${linkTarget}.ObjectSet` : `$SingleLinkAccessor<${linkTarget}>`}
196
+ `];
197
+ }
198
+ })}
199
+ }
200
+ `}`;
201
+ }
202
+ export function createPropertyKeys(type) {
203
+ return `export type PropertyKeys = ${Object.keys(type.getCleanedUpDefinition(true).properties).map(a => maybeStripNamespace(type, a)).map(a => `"${a}"`).join("|")};`;
204
+ }
205
+ //# sourceMappingURL=wireObjectTypeV2ToSdkObjectConstV2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wireObjectTypeV2ToSdkObjectConstV2.js","names":["wireObjectTypeFullMetadataToSdkObjectMetadata","EnhancedObjectType","getObjectImports","propertyJsdoc","deleteUndefineds","stringify","getObjectDefIdentifier","name","v2","wireObjectTypeV2ToSdkObjectConstV2","wireObject","ontology","currentFilePath","object","requireObjectType","objectType","apiName","uniqueLinkTargetTypes","Set","linkTypes","map","a","objectTypeApiName","definition","raw","objectDefIdentifier","getDefinitionIdentifier","objectSetIdentifier","shortApiName","propertyKeysIdentifier","osdkObjectPropsIdentifier","osdkObjectStrictPropsIdentifier","osdkObjectLinksIdentifier","osdkObjectIdentifier","identifiers","imports","createPropertyKeys","createLinks","createProps","createObjectSet","createOsdkObject","createDefinition","fullApiName","identifier","getCleanedUpDefinition","maybeStripNamespace","type","q","apiNamespace","startsWith","slice","length","strict","properties","*","propertyDefinition","_","JSON","multiplicity","nullable","links","targetType","getImportedDefinitionIdentifier","Object","keys","key","linkTarget","join"],"sources":["wireObjectTypeV2ToSdkObjectConstV2.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 { wireObjectTypeFullMetadataToSdkObjectMetadata } from \"@osdk/generator-converters\";\nimport { EnhancedObjectType } from \"../GenerateContext/EnhancedObjectType.js\";\nimport { getObjectImports } from \"../shared/getObjectImports.js\";\nimport { propertyJsdoc } from \"../shared/propertyJsdoc.js\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { stringify } from \"../util/stringify.js\";\nexport function getObjectDefIdentifier(name, v2) {\n return v2 ? name : `${name}Def`;\n}\n/** @internal */\nexport function wireObjectTypeV2ToSdkObjectConstV2(wireObject, { ontology }, currentFilePath) {\n const object = ontology.requireObjectType(wireObject.objectType.apiName, true);\n const uniqueLinkTargetTypes = new Set(wireObject.linkTypes.map(a => ontology.requireObjectType(a.objectTypeApiName, false)));\n const definition = deleteUndefineds(wireObjectTypeFullMetadataToSdkObjectMetadata(object.raw, true));\n const objectDefIdentifier = object.getDefinitionIdentifier(true);\n const objectSetIdentifier = `${object.shortApiName}.ObjectSet`;\n const propertyKeysIdentifier = `${object.shortApiName}.PropertyKeys`;\n // const osdkObjectPropsIdentifier = `OsdkObjectProps$${objectDefIdentifier}`;\n const osdkObjectPropsIdentifier = `${object.shortApiName}.Props`;\n const osdkObjectStrictPropsIdentifier = `${object.shortApiName}.StrictProps`;\n const osdkObjectLinksIdentifier = `${object.shortApiName}.Links`;\n const osdkObjectIdentifier = `${object.shortApiName}.OsdkObject`;\n const identifiers = {\n objectDefIdentifier: `${object.shortApiName}`,\n osdkObjectLinksIdentifier,\n osdkObjectPropsIdentifier,\n osdkObjectStrictPropsIdentifier,\n objectSetIdentifier,\n osdkObjectIdentifier,\n propertyKeysIdentifier,\n };\n function getV2Types() {\n return `import type {\n PropertyKeys as $PropertyKeys, \n ObjectTypeDefinition as $ObjectTypeDefinition,\n ObjectMetadata as $ObjectMetadata,\n } from \"@osdk/api\";\n import type {\n ObjectSet as $ObjectSet, \n Osdk as $Osdk,\n OsdkObject as $OsdkObject,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n } from \"@osdk/api\";\n\n\n export namespace ${object.shortApiName} {\n\n ${createPropertyKeys(object)}\n\n\n ${createLinks(ontology, object, \"Links\")}\n\n ${createProps(object, \"Props\", false)}\n ${createProps(object, \"StrictProps\", true)}\n\n ${createObjectSet(object, identifiers)}\n \n ${createOsdkObject(object, \"OsdkObject\", identifiers)}\n } \n\n\n\n ${createDefinition(object, ontology, object.shortApiName, identifiers)}\n `;\n }\n const imports = getObjectImports(uniqueLinkTargetTypes, definition.apiName, currentFilePath, true);\n return `${imports}${getV2Types()}\n\n export const ${object.shortApiName}: ${objectDefIdentifier}\n = {\n type: \"${object instanceof EnhancedObjectType ? \"object\" : \"interface\"}\",\n apiName: \"${object.fullApiName}\",\n osdkMetadata: $osdkMetadata, \n };`;\n}\nexport function createOsdkObject(object, identifier, { osdkObjectPropsIdentifier, objectDefIdentifier, osdkObjectStrictPropsIdentifier, osdkObjectLinksIdentifier, }) {\n const definition = object.getCleanedUpDefinition(true);\n return `\n export type ${identifier}<\n OPTIONS extends never | \"$notStrict\" | \"$rid\" = never,\n K extends keyof ${osdkObjectPropsIdentifier}= keyof ${osdkObjectPropsIdentifier},\n\n > \n = $Osdk<\n ${objectDefIdentifier}, \n K | OPTIONS\n > \n \n ;\n `;\n}\nexport function createObjectSet(object, { objectDefIdentifier, objectSetIdentifier, propertyKeysIdentifier, osdkObjectIdentifier, }) {\n return `\nexport interface ObjectSet extends \n$ObjectSet<${objectDefIdentifier},\n\n${objectSetIdentifier}\n>\n{\n\n}\n`;\n}\nfunction maybeStripNamespace(type, q) {\n if (type.apiNamespace && q.startsWith(`${type.apiNamespace}.`)) {\n return q.slice(type.apiNamespace.length + 1);\n }\n else {\n return q;\n }\n}\nexport function createProps(type, identifier, strict) {\n const definition = type.getCleanedUpDefinition(true);\n return `export interface ${identifier} {\n${stringify(definition.properties, {\n \"*\": (propertyDefinition, _, apiName) => {\n return [\n `readonly \"${maybeStripNamespace(type, apiName)}\"${\n // after we convert everything over we can do this:\n // !strict || propertyDefinition.nullable ? \"?\" : \"\"\n \"\"}`,\n `$PropType[${JSON.stringify(propertyDefinition.type)}]${propertyDefinition.multiplicity ? \"[]\" : \"\"}${propertyDefinition.nullable || !strict ? `| undefined` : \"\"}`,\n ];\n },\n })}\n }`;\n}\nexport function createDefinition(object, ontology, identifier, { objectDefIdentifier, objectSetIdentifier, osdkObjectPropsIdentifier, osdkObjectStrictPropsIdentifier, osdkObjectLinksIdentifier, }) {\n const definition = object.getCleanedUpDefinition(true);\n return `\n export interface ${identifier} extends ${object instanceof EnhancedObjectType\n ? `$ObjectTypeDefinition`\n : `$InterfaceDefinition`} {\n osdkMetadata: typeof $osdkMetadata;\n type: \"${object instanceof EnhancedObjectType ? \"object\" : \"interface\"}\";\n apiName: \"${object.fullApiName}\";\n __DefinitionMetadata?: {\n objectSet: ${objectSetIdentifier};\n props: ${osdkObjectPropsIdentifier};\n linksType: ${osdkObjectLinksIdentifier};\n strictProps: ${osdkObjectStrictPropsIdentifier};\n ${stringify(definition, {\n links: (_value) => `{\n ${stringify(definition.links, {\n \"*\": (definition) => `$ObjectMetadata.Link<${ontology.requireObjectType(definition.targetType)\n .getImportedDefinitionIdentifier(true)}, ${definition.multiplicity}>`,\n })}\n }`,\n properties: (_value) => (`{\n ${stringify(definition.properties, {\n \"*\": (propertyDefinition, _, apiName) => [\n `${propertyJsdoc(propertyDefinition, { apiName })}\"${maybeStripNamespace(object, apiName)}\"`,\n `$PropertyDef<\"${propertyDefinition.type}\", \"${propertyDefinition.nullable ? \"nullable\" : \"non-nullable\"}\", \"${propertyDefinition.multiplicity ? \"array\" : \"single\"}\">`,\n ],\n })}\n }`),\n })}\n } \n}\n `;\n}\nexport function createLinks(ontology, object, identifier) {\n const definition = object.getCleanedUpDefinition(true);\n return `\n ${Object.keys(definition.links).length === 0\n ? `export type ${identifier} = {};`\n : `\n export interface ${identifier} {\n${stringify(definition.links, {\n \"*\": (definition, _, key) => {\n const linkTarget = ontology.requireObjectType(definition.targetType)\n .getImportedDefinitionIdentifier(true);\n return [\n `readonly ${key}`,\n `${definition.multiplicity\n ? `${linkTarget}.ObjectSet`\n : `$SingleLinkAccessor<${linkTarget}>`}\n `,\n ];\n },\n })}\n }\n `}`;\n}\nexport function createPropertyKeys(type) {\n return `export type PropertyKeys = ${Object.keys(type.getCleanedUpDefinition(true).properties).map((a) => maybeStripNamespace(type, a)).map(a => `\"${a}\"`).join(\"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AAC,IAAI,CAAC,CAACS,UAAU,CAAC,CAACjC,GAAG,CAAEC,CAAC,IAAKwB,mBAAmB,CAACC,IAAI,EAAEzB,CAAC,CAAC,CAAC,CAACD,GAAG,CAACC,CAAC,IAAI,IAAIA,CAAC,GAAG,CAAC,CAAC8C,IAAI,CAAC,GAAG,CAAC,GAAG;AAC3K","ignoreList":[]}
@@ -1,3 +1,3 @@
1
- import type { WireOntologyDefinition } from "./WireOntologyDefinition.cjs";
1
+ import type { WireOntologyDefinition } from "./WireOntologyDefinition.js";
2
2
  export declare function validateWireOntologyAssumptions(ontology: WireOntologyDefinition): void;
3
3
  //# sourceMappingURL=validateWireOntologyAssumptions.d.ts.map
@@ -0,0 +1,33 @@
1
+ /*
2
+ * Copyright 2023 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import invariant from "tiny-invariant";
17
+ export function validateWireOntologyAssumptions(ontology) {
18
+ invariantNotStartWithDollarSign(ontology.ontology.apiName);
19
+ for (const [objectKey, objectType] of Object.entries(ontology.objectTypes)) {
20
+ invariantMapKeyMatchesApiName(objectKey, objectType.objectType);
21
+ invariantNotStartWithDollarSign(objectType.objectType.apiName);
22
+ for (const [propertyKey, propertyType] of Object.entries(objectType.objectType.properties)) {
23
+ invariantNotStartWithDollarSign(propertyKey);
24
+ }
25
+ }
26
+ }
27
+ function invariantMapKeyMatchesApiName(key, value) {
28
+ !(key === value.apiName) ? invariant(false, "Key in the map should be the same as the apiName.") : void 0;
29
+ }
30
+ function invariantNotStartWithDollarSign(value) {
31
+ !!value.startsWith("$") ? invariant(false, "apiName should not start with $") : void 0;
32
+ }
33
+ //# sourceMappingURL=validateWireOntologyAssumptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateWireOntologyAssumptions.js","names":["invariant","validateWireOntologyAssumptions","ontology","invariantNotStartWithDollarSign","apiName","objectKey","objectType","Object","entries","objectTypes","invariantMapKeyMatchesApiName","propertyKey","propertyType","properties","key","value","startsWith"],"sources":["validateWireOntologyAssumptions.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 invariant from \"tiny-invariant\";\nexport function validateWireOntologyAssumptions(ontology) {\n invariantNotStartWithDollarSign(ontology.ontology.apiName);\n for (const [objectKey, objectType] of Object.entries(ontology.objectTypes)) {\n invariantMapKeyMatchesApiName(objectKey, objectType.objectType);\n invariantNotStartWithDollarSign(objectType.objectType.apiName);\n for (const [propertyKey, propertyType] of Object.entries(objectType.objectType.properties)) {\n invariantNotStartWithDollarSign(propertyKey);\n }\n }\n}\nfunction invariantMapKeyMatchesApiName(key, value) {\n invariant(key === value.apiName, \"Key in the map should be the same as the apiName.\");\n}\nfunction invariantNotStartWithDollarSign(value) {\n invariant(!value.startsWith(\"$\"), \"apiName should not start with $\");\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,SAAS,MAAM,gBAAgB;AACtC,OAAO,SAASC,+BAA+BA,CAACC,QAAQ,EAAE;EACtDC,+BAA+B,CAACD,QAAQ,CAACA,QAAQ,CAACE,OAAO,CAAC;EAC1D,KAAK,MAAM,CAACC,SAAS,EAAEC,UAAU,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACN,QAAQ,CAACO,WAAW,CAAC,EAAE;IACxEC,6BAA6B,CAACL,SAAS,EAAEC,UAAU,CAACA,UAAU,CAAC;IAC/DH,+BAA+B,CAACG,UAAU,CAACA,UAAU,CAACF,OAAO,CAAC;IAC9D,KAAK,MAAM,CAACO,WAAW,EAAEC,YAAY,CAAC,IAAIL,MAAM,CAACC,OAAO,CAACF,UAAU,CAACA,UAAU,CAACO,UAAU,CAAC,EAAE;MACxFV,+BAA+B,CAACQ,WAAW,CAAC;IAChD;EACJ;AACJ;AACA,SAASD,6BAA6BA,CAACI,GAAG,EAAEC,KAAK,EAAE;EAC/C,EAAUD,GAAG,KAAKC,KAAK,CAACX,OAAO,IAA/BJ,SAAS,QAAwB,mDAAmD;AACxF;AACA,SAASG,+BAA+BA,CAACY,KAAK,EAAE;EAC5C,CAAU,CAACA,KAAK,CAACC,UAAU,CAAC,GAAG,CAAC,GAAhChB,SAAS,QAAyB,iCAAiC;AACvE","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
17
+ //# sourceMappingURL=EnhanceCommon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnhanceCommon.js","names":[],"sources":["EnhanceCommon.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -0,0 +1,42 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { EnhancedBase } from "./EnhancedBase.js";
17
+ export class EnhancedAction extends EnhancedBase {
18
+ raw;
19
+ constructor(common, raw) {
20
+ super(common, raw, raw.apiName, "./ontology/actions");
21
+ this.raw = raw;
22
+ }
23
+ get description() {
24
+ return this.raw.description;
25
+ }
26
+ get parameters() {
27
+ return this.raw.parameters;
28
+ }
29
+ get operations() {
30
+ return this.raw.operations;
31
+ }
32
+ get paramsIdentifier() {
33
+ return `${this.shortApiName}.Params`;
34
+ }
35
+ get definitionIdentifier() {
36
+ return `${this.shortApiName}.Definition`;
37
+ }
38
+ get definitionParamsIdentifier() {
39
+ return `${this.shortApiName}.ParamsDefinition`;
40
+ }
41
+ }
42
+ //# sourceMappingURL=EnhancedAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnhancedAction.js","names":["EnhancedBase","EnhancedAction","raw","constructor","common","apiName","description","parameters","operations","paramsIdentifier","shortApiName","definitionIdentifier","definitionParamsIdentifier"],"sources":["EnhancedAction.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedAction extends EnhancedBase {\n raw;\n constructor(common, raw) {\n super(common, raw, raw.apiName, \"./ontology/actions\");\n this.raw = raw;\n }\n get description() {\n return this.raw.description;\n }\n get parameters() {\n return this.raw.parameters;\n }\n get operations() {\n return this.raw.operations;\n }\n get paramsIdentifier() {\n return `${this.shortApiName}.Params`;\n }\n get definitionIdentifier() {\n return `${this.shortApiName}.Definition`;\n }\n get definitionParamsIdentifier() {\n return `${this.shortApiName}.ParamsDefinition`;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,mBAAmB;AAChD,OAAO,MAAMC,cAAc,SAASD,YAAY,CAAC;EAC7CE,GAAG;EACHC,WAAWA,CAACC,MAAM,EAAEF,GAAG,EAAE;IACrB,KAAK,CAACE,MAAM,EAAEF,GAAG,EAAEA,GAAG,CAACG,OAAO,EAAE,oBAAoB,CAAC;IACrD,IAAI,CAACH,GAAG,GAAGA,GAAG;EAClB;EACA,IAAII,WAAWA,CAAA,EAAG;IACd,OAAO,IAAI,CAACJ,GAAG,CAACI,WAAW;EAC/B;EACA,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nB;AAED,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,GAChB,CAAC,MAAM,GAAG,SAAS,EAAE,MAAM,CAAC,CAI9B"}
1
+ {"version":3,"file":"EnhancedBase.d.ts","sourceRoot":"","sources":["../../../src/GenerateContext/EnhancedBase.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,8BAAsB,kBAAkB;IACtC,SAAS,CAAC,OAAO,EAAE,aAAa,CAAC;IAEjC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IAEzB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;gBAGzC,MAAM,EAAE,aAAa,EACrB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM;IAqBlB,kBAAkB,aAAc,MAAM,YAapC;CACH;AAED,8BAAsB,YAAY,CAAC,CAAC,CAAE,SAAQ,kBAAkB;IAC9D,GAAG,EAAE,CAAC,CAAC;gBAGL,MAAM,EAAE,aAAa,EACrB,GAAG,EAAE,CAAC,EACN,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM;CAWnB;AAED,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,GAChB,CAAC,MAAM,GAAG,SAAS,EAAE,MAAM,CAAC,CAI9B"}
@@ -0,0 +1,72 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import * as path from "node:path";
17
+ export class AbstractImportable {
18
+ _common;
19
+ shortApiName;
20
+ fullApiName;
21
+ apiNamespace;
22
+ /**
23
+ * Either a path relative to the ourDir (e.g. "./ontology/objects/foo.js") or a normal
24
+ * module import (e.g. "@something/foo")/
25
+ */
26
+ importPath;
27
+ uniqueImportName;
28
+ isLocal;
29
+ sourcePackage;
30
+ constructor(common, fullApiName, basePath) {
31
+ this._common = common;
32
+ this.fullApiName = fullApiName;
33
+ [this.apiNamespace, this.shortApiName] = extractNamespace(this.fullApiName);
34
+ const {
35
+ ontologyApiNamespace,
36
+ apiNamespacePackageMap,
37
+ importExt
38
+ } = common;
39
+ this.isLocal = ontologyApiNamespace === this.apiNamespace;
40
+ this.sourcePackage = this.apiNamespace && !this.isLocal ? apiNamespacePackageMap.get(this.apiNamespace) : undefined;
41
+ this.importPath = this.isLocal ? `${basePath}/${this.shortApiName}${importExt}` : this.sourcePackage;
42
+ this.uniqueImportName = this.shortApiName;
43
+ }
44
+ getImportPathRelTo = filePath => {
45
+ if (this.importPath.startsWith(".")) {
46
+ const result = path.relative(path.dirname(filePath), this.importPath).split(path.sep).join("/");
47
+ if (result.startsWith(".")) {
48
+ return result;
49
+ } else {
50
+ return `./${result}`;
51
+ }
52
+ } else {
53
+ return this.importPath;
54
+ }
55
+ };
56
+ }
57
+ export class EnhancedBase extends AbstractImportable {
58
+ raw;
59
+ constructor(common, raw, fullApiName, basePath) {
60
+ super(common, fullApiName, basePath);
61
+ this.raw = raw;
62
+ if (!this.isLocal && !this.sourcePackage) {
63
+ throw new Error(`Expected { ns:'${this.apiNamespace}', shortName: '${this.shortApiName}'} to be in namespace '${common.ontologyApiNamespace}' or in a provided package mapping`);
64
+ }
65
+ }
66
+ }
67
+ export function extractNamespace(fqApiName) {
68
+ const last = fqApiName.lastIndexOf(".");
69
+ if (last === -1) return [undefined, fqApiName];
70
+ return [fqApiName.slice(0, last), fqApiName.slice(last + 1)];
71
+ }
72
+ //# sourceMappingURL=EnhancedBase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnhancedBase.js","names":["path","AbstractImportable","_common","shortApiName","fullApiName","apiNamespace","importPath","uniqueImportName","isLocal","sourcePackage","constructor","common","basePath","extractNamespace","ontologyApiNamespace","apiNamespacePackageMap","importExt","get","undefined","getImportPathRelTo","filePath","startsWith","result","relative","dirname","split","sep","join","EnhancedBase","raw","Error","fqApiName","last","lastIndexOf","slice"],"sources":["EnhancedBase.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as path from \"node:path\";\nexport class AbstractImportable {\n _common;\n shortApiName;\n fullApiName;\n apiNamespace;\n /**\n * Either a path relative to the ourDir (e.g. \"./ontology/objects/foo.js\") or a normal\n * module import (e.g. \"@something/foo\")/\n */\n importPath;\n uniqueImportName;\n isLocal;\n sourcePackage;\n constructor(common, fullApiName, basePath) {\n this._common = common;\n this.fullApiName = fullApiName;\n [this.apiNamespace, this.shortApiName] = extractNamespace(this.fullApiName);\n const { ontologyApiNamespace, apiNamespacePackageMap, importExt } = common;\n this.isLocal = ontologyApiNamespace === this.apiNamespace;\n this.sourcePackage = this.apiNamespace && !this.isLocal\n ? apiNamespacePackageMap.get(this.apiNamespace)\n : undefined;\n this.importPath = this.isLocal\n ? `${basePath}/${this.shortApiName}${importExt}`\n : this.sourcePackage;\n this.uniqueImportName = this.shortApiName;\n }\n getImportPathRelTo = (filePath) => {\n if (this.importPath.startsWith(\".\")) {\n const result = path.relative(path.dirname(filePath), this.importPath)\n .split(path.sep).join(\"/\");\n if (result.startsWith(\".\")) {\n return result;\n }\n else {\n return `./${result}`;\n }\n }\n else {\n return this.importPath;\n }\n };\n}\nexport class EnhancedBase extends AbstractImportable {\n raw;\n constructor(common, raw, fullApiName, basePath) {\n super(common, fullApiName, basePath);\n this.raw = raw;\n if (!this.isLocal && !this.sourcePackage) {\n throw new Error(`Expected { ns:'${this.apiNamespace}', shortName: '${this.shortApiName}'} to be in namespace '${common.ontologyApiNamespace}' or in a provided package mapping`);\n }\n }\n}\nexport function extractNamespace(fqApiName) {\n const last = fqApiName.lastIndexOf(\".\");\n if (last === -1)\n return [undefined, fqApiName];\n return [fqApiName.slice(0, last), fqApiName.slice(last + 1)];\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKA,IAAI,MAAM,WAAW;AACjC,OAAO,MAAMC,kBAAkB,CAAC;EAC5BC,OAAO;EACPC,YAAY;EACZC,WAAW;EACXC,YAAY;EACZ;AACJ;AACA;AACA;EACIC,UAAU;EACVC,gBAAgB;EAChBC,OAAO;EACPC,aAAa;EACbC,WAAWA,CAACC,MAAM,EAAEP,WAAW,EAAEQ,QAAQ,EAAE;IACvC,IAAI,CAACV,OAAO,GAAGS,MAAM;IACrB,IAAI,CAACP,WAAW,GAAGA,WAAW;IAC9B,CAAC,IAAI,CAACC,YAAY,EAAE,IAAI,CAACF,YAAY,CAAC,GAAGU,gBAAgB,CAAC,IAAI,CAACT,WAAW,CAAC;IAC3E,MAAM;MAAEU,oBAAoB;MAAEC,sBAAsB;MAAEC;IAAU,CAAC,GAAGL,MAAM;IAC1E,IAAI,CAACH,OAAO,GAAGM,oBAAoB,KAAK,IAAI,CAACT,YAAY;IACzD,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AI,CAACF,YAAY,0BAA0BQ,MAAM,CAACG,oBAAoB,oCAAoC,CAAC;IACpL;EACJ;AACJ;AACA,OAAO,SAASD,gBAAgBA,CAACkB,SAAS,EAAE;EACxC,MAAMC,IAAI,GAAGD,SAAS,CAACE,WAAW,CAAC,GAAG,CAAC;EACvC,IAAID,IAAI,KAAK,CAAC,CAAC,EACX,OAAO,CAACd,SAAS,EAAEa,SAAS,CAAC;EACjC,OAAO,CAACA,SAAS,CAACG,KAAK,CAAC,CAAC,EAAEF,IAAI,CAAC,EAAED,SAAS,CAACG,KAAK,CAACF,IAAI,GAAG,CAAC,CAAC,CAAC;AAChE","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import type { InterfaceDefinition } from "@osdk/api";
1
+ import type { InterfaceMetadata } from "@osdk/api";
2
2
  import type { InterfaceType } from "@osdk/internal.foundry.core";
3
3
  import type { EnhanceCommon } from "./EnhanceCommon.js";
4
4
  import { EnhancedBase } from "./EnhancedBase.js";
@@ -8,6 +8,6 @@ export declare class EnhancedInterfaceType extends EnhancedBase<InterfaceType> {
8
8
  getDefinitionIdentifier(v2: boolean): string;
9
9
  getImportedDefinitionIdentifier(v2: boolean): string;
10
10
  get properties(): Record<import("@osdk/internal.foundry.core").SharedPropertyTypeApiName, import("@osdk/internal.foundry.core").SharedPropertyType>;
11
- getCleanedUpDefinition(v2: boolean): InterfaceDefinition<any, any>;
11
+ getCleanedUpDefinition(v2: boolean): InterfaceMetadata;
12
12
  }
13
13
  //# sourceMappingURL=EnhancedInterfaceType.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EnhancedInterfaceType.d.ts","sourceRoot":"","sources":["../../../src/GenerateContext/EnhancedInterfaceType.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAErD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,qBAAa,qBAAsB,SAAQ,YAAY,CAAC,aAAa,CAAC;IAC1B,GAAG,EAAE,aAAa;gBAAhD,MAAM,EAAE,aAAa,EAAS,GAAG,EAAE,aAAa;IAI5D,uBAAuB,CAAC,EAAE,EAAE,OAAO;IAInC,+BAA+B,CAAC,EAAE,EAAE,OAAO;IAI3C,IAAI,UAAU,sIAEb;IAED,sBAAsB,CAAC,EAAE,EAAE,OAAO,GAAG,mBAAmB,CAAC,GAAG,EAAE,GAAG,CAAC;CAQnE"}
1
+ {"version":3,"file":"EnhancedInterfaceType.d.ts","sourceRoot":"","sources":["../../../src/GenerateContext/EnhancedInterfaceType.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,qBAAa,qBAAsB,SAAQ,YAAY,CAAC,aAAa,CAAC;IAC1B,GAAG,EAAE,aAAa;gBAAhD,MAAM,EAAE,aAAa,EAAS,GAAG,EAAE,aAAa;IAI5D,uBAAuB,CAAC,EAAE,EAAE,OAAO;IAInC,+BAA+B,CAAC,EAAE,EAAE,OAAO;IAI3C,IAAI,UAAU,sIAEb;IAED,sBAAsB,CAAC,EAAE,EAAE,OAAO,GAAG,iBAAiB;CAQvD"}
@@ -0,0 +1,38 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from "@osdk/generator-converters";
17
+ import { deleteUndefineds } from "../util/deleteUndefineds.js";
18
+ import { EnhancedBase } from "./EnhancedBase.js";
19
+ export class EnhancedInterfaceType extends EnhancedBase {
20
+ raw;
21
+ constructor(common, raw) {
22
+ super(common, raw, raw.apiName, "./ontology/interfaces");
23
+ this.raw = raw;
24
+ }
25
+ getDefinitionIdentifier(v2) {
26
+ return v2 ? this.shortApiName : `${this.shortApiName}Def`;
27
+ }
28
+ getImportedDefinitionIdentifier(v2) {
29
+ return this.getDefinitionIdentifier(v2);
30
+ }
31
+ get properties() {
32
+ return this.raw.properties;
33
+ }
34
+ getCleanedUpDefinition(v2) {
35
+ return deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(this.raw, v2));
36
+ }
37
+ }
38
+ //# sourceMappingURL=EnhancedInterfaceType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnhancedInterfaceType.js","names":["__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition","deleteUndefineds","EnhancedBase","EnhancedInterfaceType","raw","constructor","common","apiName","getDefinitionIdentifier","v2","shortApiName","getImportedDefinitionIdentifier","properties","getCleanedUpDefinition"],"sources":["EnhancedInterfaceType.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from \"@osdk/generator-converters\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedInterfaceType extends EnhancedBase {\n raw;\n constructor(common, raw) {\n super(common, raw, raw.apiName, \"./ontology/interfaces\");\n this.raw = raw;\n }\n getDefinitionIdentifier(v2) {\n return v2 ? this.shortApiName : `${this.shortApiName}Def`;\n }\n getImportedDefinitionIdentifier(v2) {\n return this.getDefinitionIdentifier(v2);\n }\n get properties() {\n return this.raw.properties;\n }\n getCleanedUpDefinition(v2) {\n return deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(this.raw, v2));\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,mDAAmD,QAAQ,4BAA4B;AAChG,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,YAAY,QAAQ,mBAAmB;AAChD,OAAO,MAAMC,qBAAqB,SAASD,YAAY,CAAC;EACpDE,GAAG;EACHC,WAAWA,CAACC,MAAM,EAAEF,GAAG,EAAE;IACrB,KAAK,CAACE,MAAM,EAAEF,GAAG,EAAEA,GAAG,CAACG,OAAO,EAAE,uBAAuB,CAAC;IACxD,IAAI,CAACH,GAAG,GAAGA,GAAG;EAClB;EACAI,uBAAuBA,CAACC,EAAE,EAAE;IACxB,OAAOA,EAAE,GAAG,IAAI,CAACC,YAAY,GAAG,GAAG,IAAI,CAACA,YAAY,KAAK;EAC7D;EACAC,+BAA+BA,CAACF,EAAE,EAAE;IAChC,OAAO,IAAI,CAACD,uBAAuB,CAACC,EAAE,CAAC;EAC3C;EACA,IAAIG,UAAUA,CAAA,EAAG;IACb,OAAO,IAAI,CAACR,GAAG,CAACQ,UAAU;EAC9B;EACAC,sBAAsBA,CAACJ,EAAE,EAAE;IACvB,OAAOR,gBAAgB,CAACD,mDAAmD,CAAC,IAAI,CAACI,GAAG,EAAEK,EAAE,CAAC,CAAC;EAC9F;AACJ","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import type { ObjectTypeDefinition } from "@osdk/api";
1
+ import type { ObjectMetadata } from "@osdk/api";
2
2
  import type { ObjectTypeFullMetadata } from "@osdk/internal.foundry.core";
3
3
  import type { EnhanceCommon } from "./EnhanceCommon.js";
4
4
  import { EnhancedBase } from "./EnhancedBase.js";
@@ -7,6 +7,6 @@ export declare class EnhancedObjectType extends EnhancedBase<ObjectTypeFullMetad
7
7
  constructor(common: EnhanceCommon, raw: ObjectTypeFullMetadata);
8
8
  getDefinitionIdentifier(v2: boolean): string;
9
9
  getImportedDefinitionIdentifier(v2: boolean): string;
10
- getCleanedUpDefinition(v2: boolean): ObjectTypeDefinition<any>;
10
+ getCleanedUpDefinition(v2: boolean): ObjectMetadata;
11
11
  }
12
12
  //# sourceMappingURL=EnhancedObjectType.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EnhancedObjectType.d.ts","sourceRoot":"","sources":["../../../src/GenerateContext/EnhancedObjectType.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,qBAAa,kBAAmB,SAAQ,YAAY,CAAC,sBAAsB,CAAC;IAChC,GAAG,EAAE,sBAAsB;gBAAzD,MAAM,EAAE,aAAa,EAAS,GAAG,EAAE,sBAAsB;IAIrE,uBAAuB,CAAC,EAAE,EAAE,OAAO;IAInC,+BAA+B,CAAC,EAAE,EAAE,OAAO;IAI3C,sBAAsB,CAAC,EAAE,EAAE,OAAO,GAAG,oBAAoB,CAAC,GAAG,CAAC;CAQ/D"}
1
+ {"version":3,"file":"EnhancedObjectType.d.ts","sourceRoot":"","sources":["../../../src/GenerateContext/EnhancedObjectType.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,qBAAa,kBAAmB,SAAQ,YAAY,CAAC,sBAAsB,CAAC;IAChC,GAAG,EAAE,sBAAsB;gBAAzD,MAAM,EAAE,aAAa,EAAS,GAAG,EAAE,sBAAsB;IAIrE,uBAAuB,CAAC,EAAE,EAAE,OAAO;IAInC,+BAA+B,CAAC,EAAE,EAAE,OAAO;IAI3C,sBAAsB,CAAC,EAAE,EAAE,OAAO,GAAG,cAAc;CAQpD"}
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { wireObjectTypeFullMetadataToSdkObjectMetadata } from "@osdk/generator-converters";
17
+ import { deleteUndefineds } from "../util/deleteUndefineds.js";
18
+ import { EnhancedBase } from "./EnhancedBase.js";
19
+ export class EnhancedObjectType extends EnhancedBase {
20
+ raw;
21
+ constructor(common, raw) {
22
+ super(common, raw, raw.objectType.apiName, "./ontology/objects");
23
+ this.raw = raw;
24
+ }
25
+ getDefinitionIdentifier(v2) {
26
+ return v2 ? `${this.shortApiName}` : `${this.shortApiName}Def`;
27
+ }
28
+ getImportedDefinitionIdentifier(v2) {
29
+ return this.getDefinitionIdentifier(v2);
30
+ }
31
+ getCleanedUpDefinition(v2) {
32
+ return deleteUndefineds(wireObjectTypeFullMetadataToSdkObjectMetadata(this.raw, v2));
33
+ }
34
+ }
35
+ //# sourceMappingURL=EnhancedObjectType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnhancedObjectType.js","names":["wireObjectTypeFullMetadataToSdkObjectMetadata","deleteUndefineds","EnhancedBase","EnhancedObjectType","raw","constructor","common","objectType","apiName","getDefinitionIdentifier","v2","shortApiName","getImportedDefinitionIdentifier","getCleanedUpDefinition"],"sources":["EnhancedObjectType.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { wireObjectTypeFullMetadataToSdkObjectMetadata } from \"@osdk/generator-converters\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedObjectType extends EnhancedBase {\n raw;\n constructor(common, raw) {\n super(common, raw, raw.objectType.apiName, \"./ontology/objects\");\n this.raw = raw;\n }\n getDefinitionIdentifier(v2) {\n return v2 ? `${this.shortApiName}` : `${this.shortApiName}Def`;\n }\n getImportedDefinitionIdentifier(v2) {\n return this.getDefinitionIdentifier(v2);\n }\n getCleanedUpDefinition(v2) {\n return deleteUndefineds(wireObjectTypeFullMetadataToSdkObjectMetadata(this.raw, v2));\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,6CAA6C,QAAQ,4BAA4B;AAC1F,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,YAAY,QAAQ,mBAAmB;AAChD,OAAO,MAAMC,kBAAkB,SAASD,YAAY,CAAC;EACjDE,GAAG;EACHC,WAAWA,CAACC,MAAM,EAAEF,GAAG,EAAE;IACrB,KAAK,CAACE,MAAM,EAAEF,GAAG,EAAEA,GAAG,CAACG,UAAU,CAACC,OAAO,EAAE,oBAAoB,CAAC;IAChE,IAAI,CAACJ,GAAG,GAAGA,GAAG;EAClB;EACAK,uBAAuBA,CAACC,EAAE,EAAE;IACxB,OAAOA,EAAE,GAAG,GAAG,IAAI,CAACC,YAAY,EAAE,GAAG,GAAG,IAAI,CAACA,YAAY,KAAK;EAClE;EACAC,+BAA+BA,CAACF,EAAE,EAAE;IAChC,OAAO,IAAI,CAACD,uBAAuB,CAACC,EAAE,CAAC;EAC3C;EACAG,sBAAsBA,CAACH,EAAE,EAAE;IACvB,OAAOT,gBAAgB,CAACD,6CAA6C,CAAC,IAAI,CAACI,GAAG,EAAEM,EAAE,CAAC,CAAC;EACxF;AACJ","ignoreList":[]}