@osdk/client 2.2.0-beta.9 → 2.3.0-beta.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 (385) hide show
  1. package/CHANGELOG.md +370 -0
  2. package/build/browser/MinimalClientContext.js.map +1 -1
  3. package/build/browser/__unstable/ConjureSupport.js.map +1 -1
  4. package/build/browser/actions/ActionValidationError.js +1 -1
  5. package/build/browser/actions/ActionValidationError.js.map +1 -1
  6. package/build/browser/actions/actions.test.js +134 -89
  7. package/build/browser/actions/actions.test.js.map +1 -1
  8. package/build/browser/actions/applyAction.js.map +1 -1
  9. package/build/browser/createClient.js +5 -1
  10. package/build/browser/createClient.js.map +1 -1
  11. package/build/browser/createClient.test.js +14 -6
  12. package/build/browser/createClient.test.js.map +1 -1
  13. package/build/browser/createMinimalClient.js.map +1 -1
  14. package/build/browser/createMinimalClientHelper.js +25 -0
  15. package/build/browser/createMinimalClientHelper.js.map +1 -0
  16. package/build/browser/derivedProperties/createWithPropertiesObjectSet.js +36 -13
  17. package/build/browser/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
  18. package/build/browser/derivedProperties/createWithPropertiesObjectSet.test.js +133 -0
  19. package/build/browser/derivedProperties/createWithPropertiesObjectSet.test.js.map +1 -1
  20. package/build/browser/derivedProperties/derivedPropertyDefinitionFactory.js +93 -0
  21. package/build/browser/derivedProperties/derivedPropertyDefinitionFactory.js.map +1 -0
  22. package/build/browser/fetchMetadata.js +1 -1
  23. package/build/browser/fetchMetadata.js.map +1 -1
  24. package/build/browser/fetchMetadata.test.js +11 -9
  25. package/build/browser/fetchMetadata.test.js.map +1 -1
  26. package/build/browser/index.js +0 -1
  27. package/build/browser/index.js.map +1 -1
  28. package/build/{esm/util/isOsdkBaseObject.js → browser/intellisense.test.helpers/showsObjectPropertyJsdoc.js} +9 -4
  29. package/build/browser/intellisense.test.helpers/showsObjectPropertyJsdoc.js.map +1 -0
  30. package/build/browser/intellisense.test.js +17 -1
  31. package/build/browser/intellisense.test.js.map +1 -1
  32. package/build/browser/logger/BaseLogger.js +59 -0
  33. package/build/browser/logger/BaseLogger.js.map +1 -0
  34. package/build/browser/logger/BrowserLogger.js +67 -0
  35. package/build/browser/logger/BrowserLogger.js.map +1 -0
  36. package/build/browser/logger/MinimalLogger.js +39 -0
  37. package/build/browser/logger/MinimalLogger.js.map +1 -0
  38. package/build/browser/logger/MinimalLogger.test.js +60 -0
  39. package/build/browser/logger/MinimalLogger.test.js.map +1 -0
  40. package/build/browser/logger/TestLogger.js +56 -0
  41. package/build/browser/logger/TestLogger.js.map +1 -0
  42. package/build/browser/object/attachment.test.js +20 -7
  43. package/build/browser/object/attachment.test.js.map +1 -1
  44. package/build/browser/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -1
  45. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js +4 -0
  46. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  47. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js +44 -33
  48. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  49. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.js.map +1 -1
  50. package/build/browser/object/convertWireToOsdkObjects.js +4 -14
  51. package/build/browser/object/convertWireToOsdkObjects.js.map +1 -1
  52. package/build/browser/object/convertWireToOsdkObjects.test.js +39 -33
  53. package/build/browser/object/convertWireToOsdkObjects.test.js.map +1 -1
  54. package/build/browser/object/fetchPage.js +4 -3
  55. package/build/browser/object/fetchPage.js.map +1 -1
  56. package/build/browser/object/geotimeseriesreference.test.js +56 -134
  57. package/build/browser/object/geotimeseriesreference.test.js.map +1 -1
  58. package/build/browser/object/media.test.js +19 -14
  59. package/build/browser/object/media.test.js.map +1 -1
  60. package/build/browser/object/object.test.js +96 -89
  61. package/build/browser/object/object.test.js.map +1 -1
  62. package/build/browser/object/timeseries.test.js +119 -85
  63. package/build/browser/object/timeseries.test.js.map +1 -1
  64. package/build/browser/objectSet/InterfaceObjectSet.test.js +24 -20
  65. package/build/browser/objectSet/InterfaceObjectSet.test.js.map +1 -1
  66. package/build/browser/objectSet/ObjectSet.test.js +113 -19
  67. package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
  68. package/build/browser/objectSet/ObjectSetListenerWebsocket.js +2 -2
  69. package/build/browser/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
  70. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js +19 -12
  71. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -1
  72. package/build/browser/objectSet/createObjectSet.js +2 -1
  73. package/build/browser/objectSet/createObjectSet.js.map +1 -1
  74. package/build/browser/observable/internal/ActionApplication.js +4 -4
  75. package/build/browser/observable/internal/ActionApplication.js.map +1 -1
  76. package/build/browser/observable/internal/BulkObjectLoader.js +93 -0
  77. package/build/browser/observable/internal/BulkObjectLoader.js.map +1 -0
  78. package/build/browser/observable/internal/BulkObjectLoader.test.js +112 -0
  79. package/build/browser/observable/internal/BulkObjectLoader.test.js.map +1 -0
  80. package/build/browser/observable/internal/ListQuery.js +4 -1
  81. package/build/browser/observable/internal/ListQuery.js.map +1 -1
  82. package/build/browser/observable/internal/ObjectQuery.js +3 -6
  83. package/build/browser/observable/internal/ObjectQuery.js.map +1 -1
  84. package/build/browser/observable/internal/OptimisticJob.js +1 -1
  85. package/build/browser/observable/internal/OptimisticJob.js.map +1 -1
  86. package/build/browser/observable/internal/Query.js.map +1 -1
  87. package/build/browser/observable/internal/Store.js +2 -2
  88. package/build/browser/observable/internal/Store.js.map +1 -1
  89. package/build/browser/observable/internal/Store.test.js +215 -206
  90. package/build/browser/observable/internal/Store.test.js.map +1 -1
  91. package/build/browser/observable/internal/objectMatchesWhereClause.js +0 -2
  92. package/build/browser/observable/internal/objectMatchesWhereClause.js.map +1 -1
  93. package/build/browser/observable/internal/testUtils.js +4 -3
  94. package/build/browser/observable/internal/testUtils.js.map +1 -1
  95. package/build/browser/ontology/OntologyProvider.js.map +1 -1
  96. package/build/browser/ontology/StandardOntologyProvider.js +12 -5
  97. package/build/browser/ontology/StandardOntologyProvider.js.map +1 -1
  98. package/build/browser/ontology/StandardOntologyProvider.test.js +17 -16
  99. package/build/browser/ontology/StandardOntologyProvider.test.js.map +1 -1
  100. package/build/browser/ontology/loadFullObjectMetadata.js +0 -1
  101. package/build/browser/ontology/loadFullObjectMetadata.js.map +1 -1
  102. package/build/browser/ontology/loadQueryMetadata.js +5 -2
  103. package/build/browser/ontology/loadQueryMetadata.js.map +1 -1
  104. package/build/browser/public/internal.js +2 -0
  105. package/build/browser/public/internal.js.map +1 -1
  106. package/build/browser/public/unstable-do-not-use.js +1 -0
  107. package/build/browser/public/unstable-do-not-use.js.map +1 -1
  108. package/build/browser/public-utils/osdkConfig.js +49 -0
  109. package/build/browser/public-utils/osdkConfig.js.map +1 -0
  110. package/build/browser/{object/createObjectSpecifierFromPrimaryKey.js → public-utils/vite-env.d.ts} +2 -3
  111. package/build/browser/queries/applyQuery.js +6 -4
  112. package/build/browser/queries/applyQuery.js.map +1 -1
  113. package/build/browser/queries/queries.test.js +93 -27
  114. package/build/browser/queries/queries.test.js.map +1 -1
  115. package/build/browser/queries/types.js.map +1 -1
  116. package/build/browser/tsserver.js.map +1 -1
  117. package/build/browser/util/UserAgent.js +1 -1
  118. package/build/browser/util/extractRdpDefinition.js +140 -0
  119. package/build/browser/util/extractRdpDefinition.js.map +1 -0
  120. package/build/browser/util/extractRdpDefinition.test.js +233 -0
  121. package/build/browser/util/extractRdpDefinition.test.js.map +1 -0
  122. package/build/browser/util/{isOsdkBaseObject.js → isObjectSpecifiersObject.js} +2 -2
  123. package/build/browser/util/isObjectSpecifiersObject.js.map +1 -0
  124. package/build/browser/util/isPoint.js +20 -0
  125. package/build/browser/util/isPoint.js.map +1 -0
  126. package/build/browser/util/objectSpecifierUtils.js +48 -0
  127. package/build/browser/util/objectSpecifierUtils.js.map +1 -0
  128. package/build/browser/util/objectSpecifierUtils.test.js +42 -0
  129. package/build/browser/util/objectSpecifierUtils.test.js.map +1 -0
  130. package/build/browser/util/toDataValue.js +6 -2
  131. package/build/browser/util/toDataValue.js.map +1 -1
  132. package/build/browser/util/toDataValue.test.js +37 -16
  133. package/build/browser/util/toDataValue.test.js.map +1 -1
  134. package/build/browser/util/toDataValueQueries.js +4 -6
  135. package/build/browser/util/toDataValueQueries.js.map +1 -1
  136. package/build/cjs/{Client-DBTcM9gB.d.cts → Client-CgL2LKN9.d.cts} +6 -7
  137. package/build/cjs/{chunk-MCQVHD2F.cjs → chunk-FKI2LO2O.cjs} +232 -68
  138. package/build/cjs/chunk-FKI2LO2O.cjs.map +1 -0
  139. package/build/cjs/{chunk-EY52J5Z4.cjs → chunk-W5PFESFR.cjs} +163 -34
  140. package/build/cjs/chunk-W5PFESFR.cjs.map +1 -0
  141. package/build/cjs/index.cjs +188 -166
  142. package/build/cjs/index.cjs.map +1 -1
  143. package/build/cjs/index.d.cts +4 -24
  144. package/build/cjs/public/internal.cjs +61 -7
  145. package/build/cjs/public/internal.cjs.map +1 -1
  146. package/build/cjs/public/internal.d.cts +50 -3
  147. package/build/cjs/public/unstable-do-not-use.cjs +224 -103
  148. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
  149. package/build/cjs/public/unstable-do-not-use.d.cts +12 -3
  150. package/build/esm/MinimalClientContext.js.map +1 -1
  151. package/build/esm/__unstable/ConjureSupport.js.map +1 -1
  152. package/build/esm/actions/ActionValidationError.js +1 -1
  153. package/build/esm/actions/ActionValidationError.js.map +1 -1
  154. package/build/esm/actions/actions.test.js +134 -89
  155. package/build/esm/actions/actions.test.js.map +1 -1
  156. package/build/esm/actions/applyAction.js.map +1 -1
  157. package/build/esm/createClient.js +5 -1
  158. package/build/esm/createClient.js.map +1 -1
  159. package/build/esm/createClient.test.js +14 -6
  160. package/build/esm/createClient.test.js.map +1 -1
  161. package/build/esm/createMinimalClient.js.map +1 -1
  162. package/build/esm/createMinimalClientHelper.js +25 -0
  163. package/build/esm/createMinimalClientHelper.js.map +1 -0
  164. package/build/esm/derivedProperties/createWithPropertiesObjectSet.js +36 -13
  165. package/build/esm/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
  166. package/build/esm/derivedProperties/createWithPropertiesObjectSet.test.js +133 -0
  167. package/build/esm/derivedProperties/createWithPropertiesObjectSet.test.js.map +1 -1
  168. package/build/esm/derivedProperties/derivedPropertyDefinitionFactory.js +93 -0
  169. package/build/esm/derivedProperties/derivedPropertyDefinitionFactory.js.map +1 -0
  170. package/build/esm/fetchMetadata.js +1 -1
  171. package/build/esm/fetchMetadata.js.map +1 -1
  172. package/build/esm/fetchMetadata.test.js +11 -9
  173. package/build/esm/fetchMetadata.test.js.map +1 -1
  174. package/build/esm/index.js +0 -1
  175. package/build/esm/index.js.map +1 -1
  176. package/build/esm/{util/isOsdkObject.js → intellisense.test.helpers/showsObjectPropertyJsdoc.js} +9 -4
  177. package/build/esm/intellisense.test.helpers/showsObjectPropertyJsdoc.js.map +1 -0
  178. package/build/esm/intellisense.test.js +17 -1
  179. package/build/esm/intellisense.test.js.map +1 -1
  180. package/build/esm/logger/BaseLogger.js +59 -0
  181. package/build/esm/logger/BaseLogger.js.map +1 -0
  182. package/build/esm/logger/BrowserLogger.js +67 -0
  183. package/build/esm/logger/BrowserLogger.js.map +1 -0
  184. package/build/esm/logger/MinimalLogger.js +39 -0
  185. package/build/esm/logger/MinimalLogger.js.map +1 -0
  186. package/build/esm/logger/MinimalLogger.test.js +60 -0
  187. package/build/esm/logger/MinimalLogger.test.js.map +1 -0
  188. package/build/esm/logger/TestLogger.js +56 -0
  189. package/build/esm/logger/TestLogger.js.map +1 -0
  190. package/build/esm/object/attachment.test.js +20 -7
  191. package/build/esm/object/attachment.test.js.map +1 -1
  192. package/build/esm/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -1
  193. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js +4 -0
  194. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  195. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js +44 -33
  196. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  197. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.js.map +1 -1
  198. package/build/esm/object/convertWireToOsdkObjects.js +4 -14
  199. package/build/esm/object/convertWireToOsdkObjects.js.map +1 -1
  200. package/build/esm/object/convertWireToOsdkObjects.test.js +39 -33
  201. package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -1
  202. package/build/esm/object/fetchPage.js +4 -3
  203. package/build/esm/object/fetchPage.js.map +1 -1
  204. package/build/esm/object/geotimeseriesreference.test.js +56 -134
  205. package/build/esm/object/geotimeseriesreference.test.js.map +1 -1
  206. package/build/esm/object/media.test.js +19 -14
  207. package/build/esm/object/media.test.js.map +1 -1
  208. package/build/esm/object/object.test.js +96 -89
  209. package/build/esm/object/object.test.js.map +1 -1
  210. package/build/esm/object/timeseries.test.js +119 -85
  211. package/build/esm/object/timeseries.test.js.map +1 -1
  212. package/build/esm/objectSet/InterfaceObjectSet.test.js +24 -20
  213. package/build/esm/objectSet/InterfaceObjectSet.test.js.map +1 -1
  214. package/build/esm/objectSet/ObjectSet.test.js +113 -19
  215. package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
  216. package/build/esm/objectSet/ObjectSetListenerWebsocket.js +2 -2
  217. package/build/esm/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
  218. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js +19 -12
  219. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -1
  220. package/build/esm/objectSet/createObjectSet.js +2 -1
  221. package/build/esm/objectSet/createObjectSet.js.map +1 -1
  222. package/build/esm/observable/internal/ActionApplication.js +4 -4
  223. package/build/esm/observable/internal/ActionApplication.js.map +1 -1
  224. package/build/esm/observable/internal/BulkObjectLoader.js +93 -0
  225. package/build/esm/observable/internal/BulkObjectLoader.js.map +1 -0
  226. package/build/esm/observable/internal/BulkObjectLoader.test.js +112 -0
  227. package/build/esm/observable/internal/BulkObjectLoader.test.js.map +1 -0
  228. package/build/esm/observable/internal/ListQuery.js +4 -1
  229. package/build/esm/observable/internal/ListQuery.js.map +1 -1
  230. package/build/esm/observable/internal/ObjectQuery.js +3 -6
  231. package/build/esm/observable/internal/ObjectQuery.js.map +1 -1
  232. package/build/esm/observable/internal/OptimisticJob.js +1 -1
  233. package/build/esm/observable/internal/OptimisticJob.js.map +1 -1
  234. package/build/esm/observable/internal/Query.js.map +1 -1
  235. package/build/esm/observable/internal/Store.js +2 -2
  236. package/build/esm/observable/internal/Store.js.map +1 -1
  237. package/build/esm/observable/internal/Store.test.js +215 -206
  238. package/build/esm/observable/internal/Store.test.js.map +1 -1
  239. package/build/esm/observable/internal/objectMatchesWhereClause.js +0 -2
  240. package/build/esm/observable/internal/objectMatchesWhereClause.js.map +1 -1
  241. package/build/esm/observable/internal/testUtils.js +4 -3
  242. package/build/esm/observable/internal/testUtils.js.map +1 -1
  243. package/build/esm/ontology/OntologyProvider.js.map +1 -1
  244. package/build/esm/ontology/StandardOntologyProvider.js +12 -5
  245. package/build/esm/ontology/StandardOntologyProvider.js.map +1 -1
  246. package/build/esm/ontology/StandardOntologyProvider.test.js +17 -16
  247. package/build/esm/ontology/StandardOntologyProvider.test.js.map +1 -1
  248. package/build/esm/ontology/loadFullObjectMetadata.js +0 -1
  249. package/build/esm/ontology/loadFullObjectMetadata.js.map +1 -1
  250. package/build/esm/ontology/loadQueryMetadata.js +5 -2
  251. package/build/esm/ontology/loadQueryMetadata.js.map +1 -1
  252. package/build/esm/public/internal.js +2 -0
  253. package/build/esm/public/internal.js.map +1 -1
  254. package/build/esm/public/unstable-do-not-use.js +1 -0
  255. package/build/esm/public/unstable-do-not-use.js.map +1 -1
  256. package/build/esm/public-utils/osdkConfig.js +49 -0
  257. package/build/esm/public-utils/osdkConfig.js.map +1 -0
  258. package/build/esm/{object/createObjectSpecifierFromPrimaryKey.js → public-utils/vite-env.d.ts} +2 -3
  259. package/build/esm/queries/applyQuery.js +6 -4
  260. package/build/esm/queries/applyQuery.js.map +1 -1
  261. package/build/esm/queries/queries.test.js +93 -27
  262. package/build/esm/queries/queries.test.js.map +1 -1
  263. package/build/esm/queries/types.js.map +1 -1
  264. package/build/esm/tsserver.js.map +1 -1
  265. package/build/esm/util/UserAgent.js +1 -1
  266. package/build/esm/util/extractRdpDefinition.js +140 -0
  267. package/build/esm/util/extractRdpDefinition.js.map +1 -0
  268. package/build/esm/util/extractRdpDefinition.test.js +233 -0
  269. package/build/esm/util/extractRdpDefinition.test.js.map +1 -0
  270. package/build/{browser/util/isOsdkObject.js → esm/util/isObjectSpecifiersObject.js} +2 -2
  271. package/build/esm/util/isObjectSpecifiersObject.js.map +1 -0
  272. package/build/esm/util/isPoint.js +20 -0
  273. package/build/esm/util/isPoint.js.map +1 -0
  274. package/build/esm/util/objectSpecifierUtils.js +48 -0
  275. package/build/esm/util/objectSpecifierUtils.js.map +1 -0
  276. package/build/esm/util/objectSpecifierUtils.test.js +42 -0
  277. package/build/esm/util/objectSpecifierUtils.test.js.map +1 -0
  278. package/build/esm/util/toDataValue.js +6 -2
  279. package/build/esm/util/toDataValue.js.map +1 -1
  280. package/build/esm/util/toDataValue.test.js +37 -16
  281. package/build/esm/util/toDataValue.test.js.map +1 -1
  282. package/build/esm/util/toDataValueQueries.js +4 -6
  283. package/build/esm/util/toDataValueQueries.js.map +1 -1
  284. package/build/types/MinimalClientContext.d.ts +1 -1
  285. package/build/types/MinimalClientContext.d.ts.map +1 -1
  286. package/build/types/__unstable/ConjureSupport.d.ts +2 -2
  287. package/build/types/actions/applyAction.d.ts +1 -2
  288. package/build/types/actions/applyAction.d.ts.map +1 -1
  289. package/build/types/createClient.d.ts +1 -1
  290. package/build/types/createClient.d.ts.map +1 -1
  291. package/build/types/createClient.test.d.ts +2 -1
  292. package/build/types/createClient.test.d.ts.map +1 -1
  293. package/build/types/createMinimalClientHelper.d.ts +1 -0
  294. package/build/types/createMinimalClientHelper.d.ts.map +1 -0
  295. package/build/types/derivedProperties/derivedPropertyDefinitionFactory.d.ts +1 -0
  296. package/build/types/derivedProperties/derivedPropertyDefinitionFactory.d.ts.map +1 -0
  297. package/build/types/index.d.ts +4 -6
  298. package/build/types/index.d.ts.map +1 -1
  299. package/build/types/intellisense.test.helpers/showsObjectPropertyJsdoc.d.ts +1 -0
  300. package/build/types/intellisense.test.helpers/showsObjectPropertyJsdoc.d.ts.map +1 -0
  301. package/build/types/logger/BaseLogger.d.ts +33 -0
  302. package/build/types/logger/BaseLogger.d.ts.map +1 -0
  303. package/build/types/logger/BrowserLogger.d.ts +9 -0
  304. package/build/types/logger/BrowserLogger.d.ts.map +1 -0
  305. package/build/types/logger/MinimalLogger.d.ts +9 -0
  306. package/build/types/logger/MinimalLogger.d.ts.map +1 -0
  307. package/build/types/logger/MinimalLogger.test.d.ts +1 -0
  308. package/build/types/logger/MinimalLogger.test.d.ts.map +1 -0
  309. package/build/types/logger/TestLogger.d.ts +14 -0
  310. package/build/types/logger/TestLogger.d.ts.map +1 -0
  311. package/build/types/object/convertWireToOsdkObjects.d.ts +4 -4
  312. package/build/types/object/convertWireToOsdkObjects.d.ts.map +1 -1
  313. package/build/types/object/fetchPage.d.ts.map +1 -1
  314. package/build/types/object/object.test.d.ts.map +1 -1
  315. package/build/types/objectSet/ObjectSet.test.d.ts.map +1 -1
  316. package/build/types/observable/internal/ActionApplication.d.ts +2 -2
  317. package/build/types/observable/internal/ActionApplication.d.ts.map +1 -1
  318. package/build/types/observable/internal/BulkObjectLoader.d.ts +8 -0
  319. package/build/types/observable/internal/BulkObjectLoader.d.ts.map +1 -0
  320. package/build/types/observable/internal/BulkObjectLoader.test.d.ts +1 -0
  321. package/build/types/observable/internal/BulkObjectLoader.test.d.ts.map +1 -0
  322. package/build/types/observable/internal/ListQuery.d.ts.map +1 -1
  323. package/build/types/observable/internal/ObjectQuery.d.ts.map +1 -1
  324. package/build/types/observable/internal/OptimisticJob.d.ts.map +1 -1
  325. package/build/types/observable/internal/Query.d.ts +2 -2
  326. package/build/types/observable/internal/Query.d.ts.map +1 -1
  327. package/build/types/observable/internal/Store.d.ts +2 -2
  328. package/build/types/observable/internal/Store.d.ts.map +1 -1
  329. package/build/types/observable/internal/testUtils.d.ts +1 -2
  330. package/build/types/observable/internal/testUtils.d.ts.map +1 -1
  331. package/build/types/ontology/OntologyProvider.d.ts +1 -1
  332. package/build/types/ontology/OntologyProvider.d.ts.map +1 -1
  333. package/build/types/ontology/loadQueryMetadata.d.ts +1 -1
  334. package/build/types/ontology/loadQueryMetadata.d.ts.map +1 -1
  335. package/build/types/public/internal.d.ts +2 -0
  336. package/build/types/public/internal.d.ts.map +1 -1
  337. package/build/types/public/unstable-do-not-use.d.ts +4 -2
  338. package/build/types/public/unstable-do-not-use.d.ts.map +1 -1
  339. package/build/types/public-utils/osdkConfig.d.ts +8 -0
  340. package/build/types/public-utils/osdkConfig.d.ts.map +1 -0
  341. package/build/types/public-utils/vite-env.d.d.ts +3 -0
  342. package/build/types/public-utils/vite-env.d.d.ts.map +1 -0
  343. package/build/types/queries/applyQuery.d.ts +2 -2
  344. package/build/types/queries/applyQuery.d.ts.map +1 -1
  345. package/build/types/queries/types.d.ts +1 -1
  346. package/build/types/queries/types.d.ts.map +1 -1
  347. package/build/types/tsserver.d.ts +1 -1
  348. package/build/types/tsserver.d.ts.map +1 -1
  349. package/build/types/util/extractRdpDefinition.d.ts +4 -0
  350. package/build/types/util/extractRdpDefinition.d.ts.map +1 -0
  351. package/build/types/util/extractRdpDefinition.test.d.ts +1 -0
  352. package/build/types/util/extractRdpDefinition.test.d.ts.map +1 -0
  353. package/build/types/util/isObjectSpecifiersObject.d.ts +5 -0
  354. package/build/types/util/isObjectSpecifiersObject.d.ts.map +1 -0
  355. package/build/types/util/isPoint.d.ts +1 -0
  356. package/build/types/util/isPoint.d.ts.map +1 -0
  357. package/build/types/util/objectSpecifierUtils.d.ts +24 -0
  358. package/build/types/util/objectSpecifierUtils.d.ts.map +1 -0
  359. package/build/types/util/objectSpecifierUtils.test.d.ts +1 -0
  360. package/build/types/util/objectSpecifierUtils.test.d.ts.map +1 -0
  361. package/package.json +19 -18
  362. package/build/browser/Logger.js +0 -2
  363. package/build/browser/Logger.js.map +0 -1
  364. package/build/browser/object/createObjectSpecifierFromPrimaryKey.js.map +0 -1
  365. package/build/browser/util/isOsdkBaseObject.js.map +0 -1
  366. package/build/browser/util/isOsdkObject.js.map +0 -1
  367. package/build/cjs/chunk-EY52J5Z4.cjs.map +0 -1
  368. package/build/cjs/chunk-MCQVHD2F.cjs.map +0 -1
  369. package/build/cjs/chunk-Q7SFCCGT.cjs +0 -11
  370. package/build/cjs/chunk-Q7SFCCGT.cjs.map +0 -1
  371. package/build/cjs/graphql-RGM5SRWV.cjs +0 -10532
  372. package/build/cjs/graphql-RGM5SRWV.cjs.map +0 -1
  373. package/build/esm/Logger.js +0 -2
  374. package/build/esm/Logger.js.map +0 -1
  375. package/build/esm/object/createObjectSpecifierFromPrimaryKey.js.map +0 -1
  376. package/build/esm/util/isOsdkBaseObject.js.map +0 -1
  377. package/build/esm/util/isOsdkObject.js.map +0 -1
  378. package/build/types/Logger.d.ts +0 -17
  379. package/build/types/Logger.d.ts.map +0 -1
  380. package/build/types/object/createObjectSpecifierFromPrimaryKey.d.ts +0 -2
  381. package/build/types/object/createObjectSpecifierFromPrimaryKey.d.ts.map +0 -1
  382. package/build/types/util/isOsdkBaseObject.d.ts +0 -2
  383. package/build/types/util/isOsdkBaseObject.d.ts.map +0 -1
  384. package/build/types/util/isOsdkObject.d.ts +0 -2
  385. package/build/types/util/isOsdkObject.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,198 @@
1
1
  # @osdk/client
2
2
 
3
+ ## 2.2.0-beta.23
4
+
5
+ ### Minor Changes
6
+
7
+ - 4183a55: Refactor OsdkBase to avoid breaks with type not being discoverable
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [4183a55]
12
+ - @osdk/api@2.2.0-beta.23
13
+ - @osdk/generator-converters@2.2.0-beta.23
14
+ - @osdk/client.unstable@2.2.0-beta.23
15
+
16
+ ## 2.2.0-beta.22
17
+
18
+ ### Minor Changes
19
+
20
+ - 18ba34f: Adds the ability to generate and execute functions at pinned versions
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [18ba34f]
25
+ - @osdk/generator-converters@2.2.0-beta.22
26
+ - @osdk/api@2.2.0-beta.22
27
+ - @osdk/client.unstable@2.2.0-beta.22
28
+
29
+ ## 2.2.0-beta.21
30
+
31
+ ### Minor Changes
32
+
33
+ - 317b555: Release
34
+
35
+ ### Patch Changes
36
+
37
+ - Updated dependencies [317b555]
38
+ - @osdk/generator-converters@2.2.0-beta.21
39
+ - @osdk/client.unstable@2.2.0-beta.21
40
+ - @osdk/api@2.2.0-beta.21
41
+
42
+ ## 2.2.0-beta.20
43
+
44
+ ### Minor Changes
45
+
46
+ - 889e84b: Release
47
+
48
+ ### Patch Changes
49
+
50
+ - Updated dependencies [889e84b]
51
+ - @osdk/generator-converters@2.2.0-beta.20
52
+ - @osdk/client.unstable@2.2.0-beta.20
53
+ - @osdk/api@2.2.0-beta.20
54
+
55
+ ## 2.2.0-beta.19
56
+
57
+ ### Minor Changes
58
+
59
+ - 1f6842f: Send a null value for parameters explicitly set to undefined rather than dropping the field
60
+
61
+ ### Patch Changes
62
+
63
+ - @osdk/api@2.2.0-beta.19
64
+ - @osdk/client.unstable@2.2.0-beta.19
65
+ - @osdk/generator-converters@2.2.0-beta.19
66
+
67
+ ## 2.2.0-beta.18
68
+
69
+ ### Minor Changes
70
+
71
+ - 56aa502: Improves exposed APIs
72
+
73
+ ### Patch Changes
74
+
75
+ - Updated dependencies [56aa502]
76
+ - Updated dependencies [6ac8f0b]
77
+ - @osdk/api@2.2.0-beta.18
78
+ - @osdk/client.unstable@2.2.0-beta.18
79
+ - @osdk/generator-converters@2.2.0-beta.18
80
+
81
+ ## 2.2.0-beta.17
82
+
83
+ ### Minor Changes
84
+
85
+ - b61e9f5: Make Query Map Types Optional
86
+ - abe4897: Removes support for boolean primary keys
87
+ - 5a12181: Quick fix for geohash params.
88
+ - 430dee3: JSdoc for object properties are generated
89
+ - 70b4464: Fix types for RDPs
90
+ - 791e655: Add support for geoshape and geohash action parameters.
91
+ - 751e5b3: Use client as peer dep in functions package.
92
+
93
+ ### Patch Changes
94
+
95
+ - Updated dependencies [c6bee50]
96
+ - Updated dependencies [6eeb423]
97
+ - Updated dependencies [abe4897]
98
+ - Updated dependencies [70b4464]
99
+ - Updated dependencies [37f8e60]
100
+ - Updated dependencies [791e655]
101
+ - @osdk/api@2.2.0-beta.17
102
+ - @osdk/client.unstable@2.2.0-beta.17
103
+ - @osdk/generator-converters@2.2.0-beta.17
104
+
105
+ ## 2.2.0-beta.16
106
+
107
+ ### Patch Changes
108
+
109
+ - Updated dependencies [395ae07]
110
+ - @osdk/client.unstable@2.2.0-beta.16
111
+ - @osdk/api@2.2.0-beta.16
112
+ - @osdk/generator-converters@2.2.0-beta.16
113
+
114
+ ## 2.2.0-beta.15
115
+
116
+ ### Minor Changes
117
+
118
+ - ed69666: Update conjure-lite to 0.7.1
119
+ - 1e16dcb: Exposes MinimalLogger and BrowserLogger via @osdk/client/internal
120
+ - 1e16dcb: Default logging is error level only
121
+ - f4370e3: Fixes error when using intersection, subtraction, or union object sets
122
+ - cc380b5: Use the latest Platform APIs
123
+
124
+ ### Patch Changes
125
+
126
+ - Updated dependencies [ed69666]
127
+ - @osdk/client.unstable@2.2.0-beta.15
128
+ - @osdk/api@2.2.0-beta.15
129
+ - @osdk/generator-converters@2.2.0-beta.15
130
+
131
+ ## 2.2.0-beta.14
132
+
133
+ ### Patch Changes
134
+
135
+ - Updated dependencies [a08bdfb]
136
+ - Updated dependencies [6abf078]
137
+ - @osdk/client.unstable@2.2.0-beta.14
138
+ - @osdk/api@2.2.0-beta.14
139
+ - @osdk/generator-converters@2.2.0-beta.14
140
+
141
+ ## 2.2.0-beta.13
142
+
143
+ ### Minor Changes
144
+
145
+ - 2ce3659: Update underlying pagination size for async iter.
146
+ - 488b51c: Add support for using aggregations and GeoJSON types from runtime derived properties
147
+ - e873024: Fixes issues requiring msw and p-defer
148
+ - 88591f7: Small fixes for ObjectSpecifier
149
+
150
+ ### Patch Changes
151
+
152
+ - Updated dependencies [488b51c]
153
+ - Updated dependencies [71462e9]
154
+ - @osdk/api@2.2.0-beta.13
155
+ - @osdk/generator-converters@2.2.0-beta.13
156
+ - @osdk/client.unstable@2.2.0-beta.13
157
+
158
+ ## 2.2.0-beta.12
159
+
160
+ ### Minor Changes
161
+
162
+ - c92fe73: Add OsdkConfig utils to client/unstable
163
+
164
+ ### Patch Changes
165
+
166
+ - @osdk/api@2.2.0-beta.12
167
+ - @osdk/client.unstable@2.2.0-beta.12
168
+ - @osdk/generator-converters@2.2.0-beta.12
169
+
170
+ ## 2.2.0-beta.11
171
+
172
+ ### Patch Changes
173
+
174
+ - Updated dependencies [7170fd1]
175
+ - Updated dependencies [10da391]
176
+ - @osdk/api@2.2.0-beta.11
177
+ - @osdk/client.unstable@2.2.0-beta.11
178
+ - @osdk/generator-converters@2.2.0-beta.11
179
+
180
+ ## 2.2.0-beta.10
181
+
182
+ ### Minor Changes
183
+
184
+ - 81c0d8c: Client will now provide a default logger to console.error if none is provided
185
+ - 81c0d8c: ObservableClient now queues up object loads for bulk processing
186
+
187
+ ### Patch Changes
188
+
189
+ - Updated dependencies [23ea0e4]
190
+ - Updated dependencies [5e8e839]
191
+ - Updated dependencies [46cede4]
192
+ - @osdk/api@2.2.0-beta.10
193
+ - @osdk/client.unstable@2.2.0-beta.10
194
+ - @osdk/generator-converters@2.2.0-beta.10
195
+
3
196
  ## 2.2.0-beta.9
4
197
 
5
198
  ### Minor Changes
@@ -128,6 +321,183 @@
128
321
  - @osdk/generator-converters@2.2.0-beta.2
129
322
  - @osdk/client.unstable@2.2.0-beta.2
130
323
 
324
+ ## 2.1.0
325
+
326
+ ### Minor Changes
327
+
328
+ - 966d408: Rename type for base action parameter types.
329
+ - b773513: Fix onOutOfDate handler from being fired twice
330
+ - cddc196: Try-catches handlers called during subscription
331
+ - d794c19: Adding support for struct action params.
332
+ - 05febf4: Adds Reference Update support in subscribe
333
+ - 55c05f2: Remove runtime derived properties from external types.
334
+ - a06ec35: Fixes the lastFetchedValue on a Geotime Series property from reference updates
335
+ - 0dc40b0: Switch to OSDK.Instance
336
+ - 3703d81: Changed shared context to a version less error prone
337
+ - 6f50516: Fix bug where object return types in a query were not properly mapped when wrapped in a struct.
338
+ - 25fd9f0: Updating package.json to have better entry points to support react native bundlers.
339
+ - 11a05cc: Updated subscribe api to make requesting properties optional
340
+ - 7865cb6: Add support for search on struct properties.
341
+ - e6fbd94: Export Attachment from client
342
+ - 9c4efe6: Support uploading media parameters through actions
343
+ - 0a7c747: Add support for timeseries sensors.
344
+ - 3ea2e79: Creates new export for internal helper functions
345
+ - 1812118: Add geotime support for OSDK.
346
+ - d927a1d: Throws error in createClient when passed an invalid ontology RID
347
+ - bc1761c: Update platform API dependencies.
348
+ - 656f975: Fixes attachment upload inputs sending incorrect in browser contexts
349
+ - f1145ff: Adds support for runtime derived properties
350
+ - 1c59d93: Allows interfaces to be used with subscribe
351
+ - f446d0c: Exposes $clone from OSDK Object instances
352
+ - c80ca45: Add ability to create interfaces through actions now.
353
+ - bb8b219: Use new external packages instead of the internal ones.
354
+ - 44e62f6: Updating fetch for auth and other packages.
355
+ - 03f95eb: Add support for interface params in actions.
356
+ - 91cfa3a: Fixing url parsing for client.
357
+ - 94463b6: Support objects as code
358
+ - 14624f7: Supports custom formatters in browser
359
+ - 1a89f23: Removing support for augmenting interfaces when fetching them.
360
+ - 9d35a1f: Remove unused imports
361
+ - c691c8b: Package now has experimental support for commonjs
362
+ - 749cf69: Remove experimental non null for now.
363
+ - f03e39f: Add a namespace type for listeners.
364
+ - d464009: improves interface api name mapping with api namespaces
365
+ - 11088aa: Fix where clause types so we don't accept more than one key in the clauses.
366
+ - 720218d: OSDK Client no longer uses javascript proxies for its objects. This results in a 13% increase in construction time but at 1kb per object reduction in memory
367
+ - 9298f75: Using new interface APIs for backend.
368
+ - eb27b54: Fix URL for experimental method
369
+ - 7a95618: Generate new OMS APIs
370
+ - f34b3d4: Add ability to fetch by rid, experimentally.
371
+ - d88fdb9: Adds methods to extract date strings from Dates and ISO-8601 strings
372
+ - 8eb2378: Fixes where clauses when objects have an api namespace
373
+ - acbfab9: Fixes where clauses for interfaces with no properties.
374
+ - c9da74c: Improves code quality by fixing linting errors
375
+ - 27f0f77: Interface instances are immutable just like object instances
376
+ - 015279b: Fix use of new interfaces api with preview flag.
377
+ - 62c1d63: Add support for reading media reference property in OSDK.
378
+ - 3c9ac22: Cleaning up where clause types.
379
+ - 91cfa3a: Fixing URL parsing for custom entry points.
380
+ - e86e91d: Internal property of Client is removed from output
381
+ - abfe4b3: Add support for reading struct properties.
382
+ - 27866a8: Removing interface argument for selecting object types. This is not supported in the new apis, and is not being used internally anywhere with the old apis.
383
+ - 0cd1603: Fixes AttachmentUpload for browser contexts
384
+ - a7a4aef: Removes dependency on crypto
385
+ - e5fe7c0: Adds experimental method to convert an object set into RID
386
+ - 1b2e8c9: Adds subscribe feature directly to client
387
+ - 9f3807c: Allows $in to take a readonly array
388
+ - d12c92b: Fixes process.env.NODE_ENV handling
389
+ - 0c56d21: Exposing fuzzy searching.
390
+ - e548b9b: Updates subscribe to return object updates
391
+ - 6671a39: Upgrade execa where used
392
+ - 5e78575: Fix queries that have response types with nested values, like arrays.
393
+ - ee6224b: Explicitly type aggregation types in queries.
394
+ - 1dc0228: Change experimental code style to prevent future breaks
395
+ - fa02ebf: Adds SLS dependency for object-set-watcher API
396
+ - 9af346e: Fixing proxy handlers.
397
+ - d3b3f35: Add's onSuccessfulSubscribe handler to subscribe functionality
398
+ - c682504: Locks dependency version of 3 internal libraries
399
+ - 9018dc2: Updating platform api dependencies.
400
+ - a6c320d: Internal optimization to reduce memory usage for unused interface objects
401
+ - 8026baf: Update interface support for .subscribe
402
+ - 6b6c8a1: Updates gateway endpoints and changes fetchContents for attachments to return a response
403
+ - c537e2d: Remove unused imports.
404
+ - 3fc2ee6: Include more descriptive JS docs for public utils
405
+ - 0d8ac3b: Remove attachment from exports.
406
+ - 73fa373: Exports helper method to construct object sets from RIDs from internal utils
407
+ - 8e6a5f4: Avoid type-fest's IsAny as it doesn't always work
408
+ - 09eaf24: Update to latest platform sdks
409
+ - 71dfb4c: Now export all api shapes from client, so use that dependency instead.
410
+ - 2d5e648: Remove subscribe from experimental gate.
411
+ - c4f88a8: Removes circular dependency that may upset legacy tools like react-native
412
+ - d665147: Update platform sdk deps
413
+ - f19da8e: Remove where clause from aggregate options. This option was never actually doing anything before as it was not passed to the backend for processing, so we are removing it to prevent future confusion.
414
+
415
+ ### Patch Changes
416
+
417
+ - Updated dependencies [966d408]
418
+ - Updated dependencies [cddc196]
419
+ - Updated dependencies [d794c19]
420
+ - Updated dependencies [05febf4]
421
+ - Updated dependencies [55c05f2]
422
+ - Updated dependencies [0dc40b0]
423
+ - Updated dependencies [3703d81]
424
+ - Updated dependencies [25fd9f0]
425
+ - Updated dependencies [1b60b3d]
426
+ - Updated dependencies [11a05cc]
427
+ - Updated dependencies [7865cb6]
428
+ - Updated dependencies [9c4efe6]
429
+ - Updated dependencies [0a7c747]
430
+ - Updated dependencies [f0b519d]
431
+ - Updated dependencies [3ea2e79]
432
+ - Updated dependencies [1812118]
433
+ - Updated dependencies [bc1761c]
434
+ - Updated dependencies [656f975]
435
+ - Updated dependencies [f1145ff]
436
+ - Updated dependencies [f446d0c]
437
+ - Updated dependencies [c80ca45]
438
+ - Updated dependencies [bb8b219]
439
+ - Updated dependencies [44e62f6]
440
+ - Updated dependencies [03f95eb]
441
+ - Updated dependencies [91cfa3a]
442
+ - Updated dependencies [94463b6]
443
+ - Updated dependencies [1a89f23]
444
+ - Updated dependencies [9d35a1f]
445
+ - Updated dependencies [c691c8b]
446
+ - Updated dependencies [749cf69]
447
+ - Updated dependencies [f03e39f]
448
+ - Updated dependencies [11088aa]
449
+ - Updated dependencies [72c1905]
450
+ - Updated dependencies [9298f75]
451
+ - Updated dependencies [7a95618]
452
+ - Updated dependencies [f34b3d4]
453
+ - Updated dependencies [acbfab9]
454
+ - Updated dependencies [c9da74c]
455
+ - Updated dependencies [62c1d63]
456
+ - Updated dependencies [3c9ac22]
457
+ - Updated dependencies [1591f04]
458
+ - Updated dependencies [03e1941]
459
+ - Updated dependencies [963addb]
460
+ - Updated dependencies [abfe4b3]
461
+ - Updated dependencies [b79becf]
462
+ - Updated dependencies [27866a8]
463
+ - Updated dependencies [caf1abc]
464
+ - Updated dependencies [e5fe7c0]
465
+ - Updated dependencies [1b2e8c9]
466
+ - Updated dependencies [81b2fb2]
467
+ - Updated dependencies [9f3807c]
468
+ - Updated dependencies [ecd4aee]
469
+ - Updated dependencies [0c56d21]
470
+ - Updated dependencies [e548b9b]
471
+ - Updated dependencies [83e7ea3]
472
+ - Updated dependencies [ee6224b]
473
+ - Updated dependencies [1dc0228]
474
+ - Updated dependencies [6c60414]
475
+ - Updated dependencies [5fe2c8d]
476
+ - Updated dependencies [7d777eb]
477
+ - Updated dependencies [1132993]
478
+ - Updated dependencies [d3b3f35]
479
+ - Updated dependencies [c682504]
480
+ - Updated dependencies [785f663]
481
+ - Updated dependencies [9018dc2]
482
+ - Updated dependencies [6b6c8a1]
483
+ - Updated dependencies [c537e2d]
484
+ - Updated dependencies [73fa373]
485
+ - Updated dependencies [bf0e3b4]
486
+ - Updated dependencies [8e6a5f4]
487
+ - Updated dependencies [2b35ed4]
488
+ - Updated dependencies [09eaf24]
489
+ - Updated dependencies [2d5e648]
490
+ - Updated dependencies [06e66dc]
491
+ - Updated dependencies [31e7d70]
492
+ - Updated dependencies [d665147]
493
+ - Updated dependencies [f19da8e]
494
+ - @osdk/generator-converters@2.1.0
495
+ - @osdk/api@2.1.0
496
+ - @osdk/shared.client.impl@1.1.0
497
+ - @osdk/client.unstable@2.1.0
498
+ - @osdk/shared.net.errors@2.1.0
499
+ - @osdk/shared.net.fetch@1.1.0
500
+
131
501
  ## 2.1.0-beta.31
132
502
 
133
503
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"MinimalClientContext.js","names":[],"sources":["MinimalClientContext.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { SharedClientContext } from \"@osdk/shared.client2\";\nimport type { Logger } from \"./Logger.js\";\nimport type {\n convertWireToOsdkObjects,\n convertWireToOsdkObjects2,\n} from \"./object/convertWireToOsdkObjects.js\";\nimport type { ObjectSetFactory } from \"./objectSet/ObjectSetFactory.js\";\nimport type { OntologyProvider } from \"./ontology/OntologyProvider.js\";\n\ndeclare const tag: unique symbol;\n\nexport type ClientCacheKey = {} & { readonly [tag]: void };\n\nexport type RequestContext = {\n finalMethodCall?: string;\n};\n\nexport interface MinimalClient extends SharedClientContext {\n ontologyRid: string | Promise<string>;\n ontologyProvider: OntologyProvider;\n logger?: Logger;\n /** @internal */\n objectSetFactory: ObjectSetFactory<any, any>;\n /** @internal */\n objectFactory: typeof convertWireToOsdkObjects;\n /** @internal */\n objectFactory2: typeof convertWireToOsdkObjects2;\n\n clientCacheKey: ClientCacheKey;\n requestContext: RequestContext;\n}\n\nexport type MinimalClientParams = {\n metadata: MinimalClientMetadata;\n provider: OntologyProvider;\n};\n\nexport interface MinimalClientMetadata {\n ontologyRid: string | Promise<string>;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"MinimalClientContext.js","names":[],"sources":["MinimalClientContext.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Logger } from \"@osdk/api\";\nimport type { SharedClientContext } from \"@osdk/shared.client2\";\nimport type {\n convertWireToOsdkObjects,\n convertWireToOsdkObjects2,\n} from \"./object/convertWireToOsdkObjects.js\";\nimport type { ObjectSetFactory } from \"./objectSet/ObjectSetFactory.js\";\nimport type { OntologyProvider } from \"./ontology/OntologyProvider.js\";\n\ndeclare const tag: unique symbol;\n\nexport type ClientCacheKey = {} & { readonly [tag]: void };\n\nexport type RequestContext = {\n finalMethodCall?: string;\n};\n\nexport interface MinimalClient extends SharedClientContext {\n ontologyRid: string | Promise<string>;\n ontologyProvider: OntologyProvider;\n logger?: Logger;\n /** @internal */\n objectSetFactory: ObjectSetFactory<any, any>;\n /** @internal */\n objectFactory: typeof convertWireToOsdkObjects;\n /** @internal */\n objectFactory2: typeof convertWireToOsdkObjects2;\n\n clientCacheKey: ClientCacheKey;\n requestContext: RequestContext;\n}\n\nexport type MinimalClientParams = {\n metadata: MinimalClientMetadata;\n provider: OntologyProvider;\n};\n\nexport interface MinimalClientMetadata {\n ontologyRid: string | Promise<string>;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ConjureSupport.js","names":["bulkLoadOntologyEntities","getLinkTypesForObjectTypes","loadAllOntologies","invariant","createSimpleAsyncCache","createSimpleCache","makeConjureContext","cachedAllOntologies","getOntologyVersionForRid","ctx","ontologyRid","ontologies","process","env","NODE_ENV","currentOntologyVersion","strongMemoSync","fn","Map","get","weakMemoSync","WeakMap","strongMemoAsync","weakMemoAsync","MetadataClient","client","logger","constructor","ontologyProvider","getObjectDefinition","child","mcc","forObjectByRid","rid","Promise","resolve","getPropertyMapping","objectPropertyMapping","bind","getLinkMapping","objectLinkMapping","getRid","getApiName","getConjureObjectType","apiName","forObjectByApiName","objectApiName","objectDef","objectTypeRid","conjureObjectType","createObjectPropertyMapping","linkTypes","includeObjectTypesWithoutSearchableDatasources","loadRedacted","objectTypeBranches","objectTypeVersions","ontologyVersion","ret","l","helper","linkSide","otherObjectType","directedLinkTypeRid","linkTypeRid","definition","type","oneToMany","objectTypeRidManySide","manyToOneLinkMetadata","objectTypeRidOneSide","oneToManyLinkMetadata","manyToMany","objectTypeRidA","objectTypeAToBLinkMetadata","objectTypeRidB","objectTypeBToALinkMetadata","debug","body","datasourceTypes","objectTypes","identifier","versionReference","sharedPropertyTypes","interfaceTypes","typeGroups","includeObjectTypeCount","undefined","includeEntityMetadata","actionTypes","includeTypeGroupEntitiesCount","entityMetadata","entities","objectType","metadataCacheClient","conjureOT","primaryKeys","length","pkRid","pkProperty","Object","values","propertyTypes","find","a","Error","propertyIdToApiNameMapping","fromEntries","map","property","id","propertyApiNameToIdMapping","pk"],"sources":["ConjureSupport.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n DirectedLinkTypeRid,\n LinkTypeMetadata,\n LoadAllOntologiesResponse,\n ObjectType,\n Type,\n} from \"@osdk/client.unstable\";\nimport {\n bulkLoadOntologyEntities,\n getLinkTypesForObjectTypes,\n loadAllOntologies,\n} from \"@osdk/client.unstable\";\nimport type { ConjureContext } from \"conjure-lite\";\nimport invariant from \"tiny-invariant\";\nimport type { MinimalClient } from \"../MinimalClientContext.js\";\nimport {\n createSimpleAsyncCache,\n createSimpleCache,\n} from \"../object/SimpleCache.js\";\nimport { makeConjureContext } from \"../ontology/makeConjureContext.js\";\n\nexport interface ObjectPropertyMapping {\n apiName: string;\n id: string;\n propertyIdToApiNameMapping: Record<string, string>;\n propertyApiNameToIdMapping: Record<string, string>;\n pk: {\n rid: string;\n apiName: string;\n type: Type;\n };\n}\n\ntype ObjectLinkMapping = Record<string, {\n apiName: string;\n directedLinkTypeRid: DirectedLinkTypeRid;\n otherObjectType: string; // rid\n}>;\n\nlet cachedAllOntologies: LoadAllOntologiesResponse | undefined;\nasync function getOntologyVersionForRid(\n ctx: ConjureContext,\n ontologyRid: string,\n) {\n cachedAllOntologies ??= await loadAllOntologies(ctx, {});\n invariant(\n cachedAllOntologies.ontologies[ontologyRid],\n \"ontology should be loaded\",\n );\n\n return cachedAllOntologies.ontologies[ontologyRid].currentOntologyVersion;\n}\n\nconst strongMemoSync = <K, V>(fn: (entry: K) => V) =>\n createSimpleCache<K, V>(new Map(), fn).get;\n\nconst weakMemoSync = <K extends object, V>(fn: (entry: K) => V) =>\n createSimpleCache<K, V>(new WeakMap() as any, fn).get; // FIXME\n\nconst strongMemoAsync = <K, V>(fn: (entry: K) => Promise<V>) =>\n createSimpleAsyncCache<K, V>(\"strong\", fn).get;\n\nconst weakMemoAsync = <K, V>(fn: (entry: K) => Promise<V>) =>\n createSimpleAsyncCache<K, V>(\"weak\", fn).get;\n\nexport class MetadataClient {\n #client: MinimalClient;\n #ctx: ConjureContext;\n #logger: any;\n\n constructor(client: MinimalClient) {\n this.#client = client;\n this.#ctx = makeConjureContext(client, \"ontology-metadata/api\");\n this.#client.ontologyProvider.getObjectDefinition;\n\n this.#logger = this.#client.logger?.child({\n mcc: true,\n });\n }\n\n forObjectByRid: (key: string) => Promise<{\n getPropertyMapping: () => Promise<ObjectPropertyMapping>;\n getLinkMapping: () => Promise<ObjectLinkMapping>;\n getRid: () => string;\n getApiName: () => Promise<string | undefined>;\n }> = strongMemoAsync(async (rid: string) => {\n return Promise.resolve({\n getPropertyMapping: this.#objectPropertyMapping.bind(this, rid),\n getLinkMapping: this.#objectLinkMapping.bind(this, rid),\n getRid: () => rid,\n getApiName: async () => (await this.#getConjureObjectType(rid)).apiName,\n });\n });\n\n forObjectByApiName: (key: string) => Promise<{\n getPropertyMapping: () => Promise<ObjectPropertyMapping>;\n getLinkMapping: () => Promise<ObjectLinkMapping>;\n getRid: () => string;\n getApiName: () => Promise<string | undefined>;\n }> = strongMemoAsync(\n async (objectApiName: string) => {\n const objectDef = await this.#client.ontologyProvider.getObjectDefinition(\n objectApiName,\n );\n return this.forObjectByRid(objectDef.rid);\n },\n );\n\n #objectPropertyMapping = strongMemoAsync(async (objectTypeRid: string) => {\n const conjureObjectType = await this.#getConjureObjectType(objectTypeRid);\n return createObjectPropertyMapping(conjureObjectType);\n });\n\n #objectLinkMapping = strongMemoAsync(async (objectTypeRid: string) => {\n const linkTypes = await getLinkTypesForObjectTypes(this.#ctx, {\n includeObjectTypesWithoutSearchableDatasources: true,\n loadRedacted: false,\n objectTypeBranches: {},\n objectTypeVersions: {\n [objectTypeRid]: await this.ontologyVersion(\"\"),\n },\n });\n invariant(\n linkTypes.linkTypes[objectTypeRid],\n \"link type should be loaded\",\n );\n\n // apiName to content\n const ret: ObjectLinkMapping = {};\n for (const l of linkTypes.linkTypes[objectTypeRid]) {\n const helper = (\n { apiName }: LinkTypeMetadata,\n linkSide: \"SOURCE\" | \"TARGET\",\n otherObjectType: string,\n ) => {\n if (apiName) {\n ret[apiName] = {\n apiName,\n directedLinkTypeRid: {\n linkTypeRid: l.rid,\n linkSide,\n },\n otherObjectType,\n };\n }\n };\n if (l.definition.type === \"oneToMany\") {\n const {\n oneToMany: {\n objectTypeRidManySide,\n manyToOneLinkMetadata,\n objectTypeRidOneSide,\n oneToManyLinkMetadata,\n },\n } = l.definition;\n if (objectTypeRidManySide === objectTypeRid) {\n helper(\n manyToOneLinkMetadata,\n \"TARGET\",\n objectTypeRidOneSide,\n );\n }\n if (objectTypeRidOneSide === objectTypeRid) {\n helper(\n oneToManyLinkMetadata,\n \"SOURCE\",\n objectTypeRidManySide,\n );\n }\n } else if (l.definition.type === \"manyToMany\") {\n const {\n manyToMany: {\n objectTypeRidA,\n objectTypeAToBLinkMetadata,\n objectTypeRidB,\n objectTypeBToALinkMetadata,\n },\n } = l.definition;\n if (objectTypeRidA === objectTypeRid) {\n helper(\n objectTypeAToBLinkMetadata,\n \"SOURCE\",\n objectTypeRidB,\n );\n }\n\n if (objectTypeRidB === objectTypeRid) {\n helper(\n objectTypeBToALinkMetadata,\n \"TARGET\",\n objectTypeRidA,\n );\n }\n }\n }\n\n return ret;\n });\n\n #getConjureObjectType = strongMemoAsync(async (objectTypeRid: string) => {\n this.#logger?.debug(`getConjureObjectType(${objectTypeRid})`);\n const body = {\n datasourceTypes: [],\n objectTypes: [{\n identifier: {\n type: \"objectTypeRid\" as const,\n objectTypeRid: objectTypeRid,\n },\n versionReference: {\n type: \"ontologyVersion\" as const,\n ontologyVersion: await this.ontologyVersion(\"\"),\n },\n }],\n linkTypes: [],\n sharedPropertyTypes: [],\n interfaceTypes: [],\n typeGroups: [],\n loadRedacted: false,\n includeObjectTypeCount: undefined,\n includeObjectTypesWithoutSearchableDatasources: true,\n includeEntityMetadata: undefined,\n actionTypes: [],\n includeTypeGroupEntitiesCount: undefined,\n entityMetadata: undefined,\n };\n const entities = await bulkLoadOntologyEntities(this.#ctx, undefined, body);\n invariant(\n entities.objectTypes[0]?.objectType,\n \"object type should be loaded\",\n );\n return entities.objectTypes[0].objectType;\n });\n\n ontologyVersion: (key: string) => Promise<string> = strongMemoAsync(async (\n _: string,\n ) => getOntologyVersionForRid(this.#ctx, await this.#client.ontologyRid));\n}\n\nexport const metadataCacheClient: (\n key: MinimalClient,\n) => Promise<MetadataClient> = weakMemoAsync(\n (client: MinimalClient) => Promise.resolve(new MetadataClient(client)),\n);\n\nfunction createObjectPropertyMapping(\n conjureOT: ObjectType,\n): ObjectPropertyMapping {\n invariant(\n conjureOT.primaryKeys.length === 1,\n `only one primary key supported, got ${conjureOT.primaryKeys.length}`,\n );\n const pkRid = conjureOT.primaryKeys[0];\n\n const pkProperty = Object.values(conjureOT.propertyTypes).find(a =>\n a.rid === pkRid\n );\n if (!pkProperty) {\n throw new Error(`Could not find PK property by rid: ${pkRid}`);\n }\n\n const propertyIdToApiNameMapping: Record<string, string> = Object\n .fromEntries(\n Object.values(conjureOT.propertyTypes).map(\n property => {\n return [property.id, property.apiName!];\n },\n ),\n );\n\n const propertyApiNameToIdMapping: Record<string, string> = Object\n .fromEntries(\n Object.values(conjureOT.propertyTypes).map(\n property => {\n return [property.apiName!, property.id];\n },\n ),\n );\n\n return {\n apiName: conjureOT.apiName!,\n id: conjureOT.id,\n propertyIdToApiNameMapping,\n propertyApiNameToIdMapping,\n pk: {\n rid: pkRid,\n apiName: pkProperty.apiName!,\n type: pkProperty.type,\n },\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,SACEA,wBAAwB,EACxBC,0BAA0B,EAC1BC,iBAAiB,QACZ,uBAAuB;AAE9B,OAAOC,SAAS,MAAM,gBAAgB;AAEtC,SACEC,sBAAsB,EACtBC,iBAAiB,QACZ,0BAA0B;AACjC,SAASC,kBAAkB,QAAQ,mCAAmC;AAoBtE,IAAIC,mBAA0D;AAC9D,eAAeC,wBAAwBA,CACrCC,GAAmB,EACnBC,WAAmB,EACnB;EACAH,mBAAmB,KAAK,MAAML,iBAAiB,CAACO,GAAG,EAAE,CAAC,CAAC,CAAC;EACxD,CACEF,mBAAmB,CAACI,UAAU,CAACD,WAAW,CAAC,GAAAE,OAAA,CAAAC,GAAA,CAAA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IAAI,EAAEiC,UAAU,CAACjC;IACnB;EACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"file":"ConjureSupport.js","names":["bulkLoadOntologyEntities","getLinkTypesForObjectTypes","loadAllOntologies","invariant","createSimpleAsyncCache","createSimpleCache","makeConjureContext","cachedAllOntologies","getOntologyVersionForRid","ctx","ontologyRid","ontologies","process","env","NODE_ENV","currentOntologyVersion","strongMemoSync","fn","Map","get","weakMemoSync","WeakMap","strongMemoAsync","weakMemoAsync","MetadataClient","client","logger","constructor","ontologyProvider","getObjectDefinition","child","mcc","forObjectByRid","rid","Promise","resolve","getPropertyMapping","objectPropertyMapping","bind","getLinkMapping","objectLinkMapping","getRid","getApiName","getConjureObjectType","apiName","forObjectByApiName","objectApiName","objectDef","objectTypeRid","conjureObjectType","createObjectPropertyMapping","linkTypes","includeObjectTypesWithoutSearchableDatasources","loadRedacted","objectTypeBranches","objectTypeVersions","ontologyVersion","ret","l","helper","linkSide","otherObjectType","directedLinkTypeRid","linkTypeRid","definition","type","oneToMany","objectTypeRidManySide","manyToOneLinkMetadata","objectTypeRidOneSide","oneToManyLinkMetadata","manyToMany","objectTypeRidA","objectTypeAToBLinkMetadata","objectTypeRidB","objectTypeBToALinkMetadata","debug","body","datasourceTypes","objectTypes","identifier","versionReference","sharedPropertyTypes","interfaceTypes","typeGroups","includeObjectTypeCount","undefined","includeEntityMetadata","actionTypes","includeTypeGroupEntitiesCount","entityMetadata","entities","objectType","metadataCacheClient","conjureOT","primaryKeys","length","pkRid","pkProperty","Object","values","propertyTypes","find","a","Error","propertyIdToApiNameMapping","fromEntries","map","property","id","propertyApiNameToIdMapping","pk"],"sources":["ConjureSupport.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n DirectedLinkTypeRid,\n LinkTypeMetadata,\n LoadAllOntologiesResponse,\n ObjectType,\n Type,\n} from \"@osdk/client.unstable\";\nimport {\n bulkLoadOntologyEntities,\n getLinkTypesForObjectTypes,\n loadAllOntologies,\n} from \"@osdk/client.unstable\";\nimport type { ConjureContext } from \"conjure-lite\";\nimport invariant from \"tiny-invariant\";\nimport type { MinimalClient } from \"../MinimalClientContext.js\";\nimport {\n createSimpleAsyncCache,\n createSimpleCache,\n} from \"../object/SimpleCache.js\";\nimport { makeConjureContext } from \"../ontology/makeConjureContext.js\";\n\nexport interface ObjectPropertyMapping {\n apiName: string;\n id: string;\n propertyIdToApiNameMapping: Record<string, string>;\n propertyApiNameToIdMapping: Record<string, string>;\n pk: {\n rid: string;\n apiName: string;\n type: Type;\n };\n}\n\ntype ObjectLinkMapping = Record<string, {\n apiName: string;\n directedLinkTypeRid: DirectedLinkTypeRid;\n otherObjectType: string; // rid\n}>;\n\nlet cachedAllOntologies: LoadAllOntologiesResponse | undefined;\nasync function getOntologyVersionForRid(\n ctx: ConjureContext,\n ontologyRid: string,\n) {\n cachedAllOntologies ??= await loadAllOntologies(ctx, {});\n invariant(\n cachedAllOntologies.ontologies[ontologyRid],\n \"ontology should be loaded\",\n );\n\n return cachedAllOntologies.ontologies[ontologyRid].currentOntologyVersion;\n}\n\nconst strongMemoSync = <K, V>(fn: (entry: K) => V) =>\n createSimpleCache<K, V>(new Map(), fn).get;\n\nconst weakMemoSync = <K extends object, V>(fn: (entry: K) => V) =>\n createSimpleCache<K, V>(new WeakMap() as any, fn).get; // FIXME\n\nconst strongMemoAsync = <K, V>(fn: (entry: K) => Promise<V>) =>\n createSimpleAsyncCache<K, V>(\"strong\", fn).get;\n\nconst weakMemoAsync = <K, V>(fn: (entry: K) => Promise<V>) =>\n createSimpleAsyncCache<K, V>(\"weak\", fn).get;\n\nexport class MetadataClient {\n #client: MinimalClient;\n #ctx: ConjureContext;\n #logger: any;\n\n constructor(client: MinimalClient) {\n this.#client = client;\n this.#ctx = makeConjureContext(client, \"ontology-metadata/api\");\n this.#client.ontologyProvider.getObjectDefinition;\n\n this.#logger = this.#client.logger?.child({\n mcc: true,\n });\n }\n\n forObjectByRid: (key: string) => Promise<{\n getPropertyMapping: () => Promise<ObjectPropertyMapping>;\n getLinkMapping: () => Promise<ObjectLinkMapping>;\n getRid: () => string;\n getApiName: () => Promise<string | null | undefined>;\n }> = strongMemoAsync(async (rid: string) => {\n return Promise.resolve({\n getPropertyMapping: this.#objectPropertyMapping.bind(this, rid),\n getLinkMapping: this.#objectLinkMapping.bind(this, rid),\n getRid: () => rid,\n getApiName: async () => (await this.#getConjureObjectType(rid)).apiName,\n });\n });\n\n forObjectByApiName: (key: string) => Promise<{\n getPropertyMapping: () => Promise<ObjectPropertyMapping>;\n getLinkMapping: () => Promise<ObjectLinkMapping>;\n getRid: () => string;\n getApiName: () => Promise<string | null | undefined>;\n }> = strongMemoAsync(\n async (objectApiName: string) => {\n const objectDef = await this.#client.ontologyProvider.getObjectDefinition(\n objectApiName,\n );\n return this.forObjectByRid(objectDef.rid);\n },\n );\n\n #objectPropertyMapping = strongMemoAsync(async (objectTypeRid: string) => {\n const conjureObjectType = await this.#getConjureObjectType(objectTypeRid);\n return createObjectPropertyMapping(conjureObjectType);\n });\n\n #objectLinkMapping = strongMemoAsync(async (objectTypeRid: string) => {\n const linkTypes = await getLinkTypesForObjectTypes(this.#ctx, {\n includeObjectTypesWithoutSearchableDatasources: true,\n loadRedacted: false,\n objectTypeBranches: {},\n objectTypeVersions: {\n [objectTypeRid]: await this.ontologyVersion(\"\"),\n },\n });\n invariant(\n linkTypes.linkTypes[objectTypeRid],\n \"link type should be loaded\",\n );\n\n // apiName to content\n const ret: ObjectLinkMapping = {};\n for (const l of linkTypes.linkTypes[objectTypeRid]) {\n const helper = (\n { apiName }: LinkTypeMetadata,\n linkSide: \"SOURCE\" | \"TARGET\",\n otherObjectType: string,\n ) => {\n if (apiName) {\n ret[apiName] = {\n apiName,\n directedLinkTypeRid: {\n linkTypeRid: l.rid,\n linkSide,\n },\n otherObjectType,\n };\n }\n };\n if (l.definition.type === \"oneToMany\") {\n const {\n oneToMany: {\n objectTypeRidManySide,\n manyToOneLinkMetadata,\n objectTypeRidOneSide,\n oneToManyLinkMetadata,\n },\n } = l.definition;\n if (objectTypeRidManySide === objectTypeRid) {\n helper(\n manyToOneLinkMetadata,\n \"TARGET\",\n objectTypeRidOneSide,\n );\n }\n if (objectTypeRidOneSide === objectTypeRid) {\n helper(\n oneToManyLinkMetadata,\n \"SOURCE\",\n objectTypeRidManySide,\n );\n }\n } else if (l.definition.type === \"manyToMany\") {\n const {\n manyToMany: {\n objectTypeRidA,\n objectTypeAToBLinkMetadata,\n objectTypeRidB,\n objectTypeBToALinkMetadata,\n },\n } = l.definition;\n if (objectTypeRidA === objectTypeRid) {\n helper(\n objectTypeAToBLinkMetadata,\n \"SOURCE\",\n objectTypeRidB,\n );\n }\n\n if (objectTypeRidB === objectTypeRid) {\n helper(\n objectTypeBToALinkMetadata,\n \"TARGET\",\n objectTypeRidA,\n );\n }\n }\n }\n\n return ret;\n });\n\n #getConjureObjectType = strongMemoAsync(async (objectTypeRid: string) => {\n this.#logger?.debug(`getConjureObjectType(${objectTypeRid})`);\n const body = {\n datasourceTypes: [],\n objectTypes: [{\n identifier: {\n type: \"objectTypeRid\" as const,\n objectTypeRid: objectTypeRid,\n },\n versionReference: {\n type: \"ontologyVersion\" as const,\n ontologyVersion: await this.ontologyVersion(\"\"),\n },\n }],\n linkTypes: [],\n sharedPropertyTypes: [],\n interfaceTypes: [],\n typeGroups: [],\n loadRedacted: false,\n includeObjectTypeCount: undefined,\n includeObjectTypesWithoutSearchableDatasources: true,\n includeEntityMetadata: undefined,\n actionTypes: [],\n includeTypeGroupEntitiesCount: undefined,\n entityMetadata: undefined,\n };\n const entities = await bulkLoadOntologyEntities(this.#ctx, undefined, body);\n invariant(\n entities.objectTypes[0]?.objectType,\n \"object type should be loaded\",\n );\n return entities.objectTypes[0].objectType;\n });\n\n ontologyVersion: (key: string) => Promise<string> = strongMemoAsync(async (\n _: string,\n ) => getOntologyVersionForRid(this.#ctx, await this.#client.ontologyRid));\n}\n\nexport const metadataCacheClient: (\n key: MinimalClient,\n) => Promise<MetadataClient> = weakMemoAsync(\n (client: MinimalClient) => Promise.resolve(new MetadataClient(client)),\n);\n\nfunction createObjectPropertyMapping(\n conjureOT: ObjectType,\n): ObjectPropertyMapping {\n invariant(\n conjureOT.primaryKeys.length === 1,\n `only one primary key supported, got ${conjureOT.primaryKeys.length}`,\n );\n const pkRid = conjureOT.primaryKeys[0];\n\n const pkProperty = Object.values(conjureOT.propertyTypes).find(a =>\n a.rid === pkRid\n );\n if (!pkProperty) {\n throw new Error(`Could not find PK property by rid: ${pkRid}`);\n }\n\n const propertyIdToApiNameMapping: Record<string, string> = Object\n .fromEntries(\n Object.values(conjureOT.propertyTypes).map(\n property => {\n return [property.id, property.apiName!];\n },\n ),\n );\n\n const propertyApiNameToIdMapping: Record<string, string> = Object\n .fromEntries(\n Object.values(conjureOT.propertyTypes).map(\n property => {\n return [property.apiName!, property.id];\n },\n ),\n );\n\n return {\n apiName: conjureOT.apiName!,\n id: conjureOT.id,\n propertyIdToApiNameMapping,\n propertyApiNameToIdMapping,\n pk: {\n rid: pkRid,\n apiName: pkProperty.apiName!,\n type: pkProperty.type,\n },\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,SACEA,wBAAwB,EACxBC,0BAA0B,EAC1BC,iBAAiB,QACZ,uBAAuB;AAE9B,OAAOC,SAAS,MAAM,gBAAgB;AAEtC,SACEC,sBAAsB,EACtBC,iBAAiB,QACZ,0BAA0B;AACjC,SAASC,k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E,CAAC;EACzC,CACF,CACF,CAAC;EAEH,OAAO;IACLjE,OAAO,EAAEkD,SAAS,CAAClD,OAAQ;IAC3BiE,EAAE,EAAEf,SAAS,CAACe,EAAE;IAChBJ,0BAA0B;IAC1BK,0BAA0B;IAC1BC,EAAE,EAAE;MACF9E,GAAG,EAAEgE,KAAK;MACVrD,OAAO,EAAEsD,UAAU,CAACtD,OAAQ;MAC5BqB,IAAI,EAAEiC,UAAU,CAACjC;IACnB;EACF,CAAC;AACH","ignoreList":[]}
@@ -16,7 +16,7 @@
16
16
 
17
17
  export class ActionValidationError extends Error {
18
18
  constructor(validation) {
19
- super("Validation Error");
19
+ super("Validation Error: " + JSON.stringify(validation, null, 2));
20
20
  this.validation = validation;
21
21
  }
22
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ActionValidationError.js","names":["ActionValidationError","Error","constructor","validation"],"sources":["ActionValidationError.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 { ActionValidationResponse } from \"@osdk/api\";\n\nexport class ActionValidationError extends Error {\n constructor(public validation: ActionValidationResponse) {\n super(\"Validation Error\");\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAO,MAAMA,qBAAqB,SAASC,KAAK,CAAC;EAC/CC,WAAWA,CAAQC,UAAoC,EAAE;IACvD,KAAK,CAAC,kBAAkB,CAAC;IAAC,KADTA,UAAoC,GAApCA,UAAoC;EAEvD;AACF","ignoreList":[]}
1
+ {"version":3,"file":"ActionValidationError.js","names":["ActionValidationError","Error","constructor","validation","JSON","stringify"],"sources":["ActionValidationError.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 { ActionValidationResponse } from \"@osdk/api\";\n\nexport class ActionValidationError extends Error {\n constructor(public validation: ActionValidationResponse) {\n super(\"Validation Error: \" + JSON.stringify(validation, null, 2));\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAO,MAAMA,qBAAqB,SAASC,KAAK,CAAC;EAC/CC,WAAWA,CAAQC,UAAoC,EAAE;IACvD,KAAK,CAAC,oBAAoB,GAAGC,IAAI,CAACC,SAAS,CAACF,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAAC,KADjDA,UAAoC,GAApCA,UAAoC;EAEvD;AACF","ignoreList":[]}