@osdk/client 2.2.0-beta.9 → 2.2.0-rc.24

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 (381) hide show
  1. package/CHANGELOG.md +383 -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 +4 -21
  17. package/build/browser/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
  18. package/build/browser/derivedProperties/createWithPropertiesObjectSet.test.js +14 -14
  19. package/build/browser/derivedProperties/createWithPropertiesObjectSet.test.js.map +1 -1
  20. package/build/browser/fetchMetadata.js +1 -1
  21. package/build/browser/fetchMetadata.js.map +1 -1
  22. package/build/browser/fetchMetadata.test.js +11 -9
  23. package/build/browser/fetchMetadata.test.js.map +1 -1
  24. package/build/browser/index.js +0 -1
  25. package/build/browser/index.js.map +1 -1
  26. package/build/{esm/util/isOsdkBaseObject.js → browser/intellisense.test.helpers/showsObjectPropertyJsdoc.js} +9 -4
  27. package/build/browser/intellisense.test.helpers/showsObjectPropertyJsdoc.js.map +1 -0
  28. package/build/browser/intellisense.test.js +17 -1
  29. package/build/browser/intellisense.test.js.map +1 -1
  30. package/build/browser/logger/BaseLogger.js +59 -0
  31. package/build/browser/logger/BaseLogger.js.map +1 -0
  32. package/build/browser/logger/BrowserLogger.js +67 -0
  33. package/build/browser/logger/BrowserLogger.js.map +1 -0
  34. package/build/browser/logger/MinimalLogger.js +39 -0
  35. package/build/browser/logger/MinimalLogger.js.map +1 -0
  36. package/build/browser/logger/MinimalLogger.test.js +60 -0
  37. package/build/browser/logger/MinimalLogger.test.js.map +1 -0
  38. package/build/browser/logger/TestLogger.js +56 -0
  39. package/build/browser/logger/TestLogger.js.map +1 -0
  40. package/build/browser/object/attachment.test.js +20 -7
  41. package/build/browser/object/attachment.test.js.map +1 -1
  42. package/build/browser/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -1
  43. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js +4 -0
  44. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  45. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js +44 -33
  46. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  47. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.js.map +1 -1
  48. package/build/browser/object/convertWireToOsdkObjects.js +4 -14
  49. package/build/browser/object/convertWireToOsdkObjects.js.map +1 -1
  50. package/build/browser/object/convertWireToOsdkObjects.test.js +39 -33
  51. package/build/browser/object/convertWireToOsdkObjects.test.js.map +1 -1
  52. package/build/browser/object/fetchPage.js +4 -3
  53. package/build/browser/object/fetchPage.js.map +1 -1
  54. package/build/browser/object/geotimeseriesreference.test.js +56 -134
  55. package/build/browser/object/geotimeseriesreference.test.js.map +1 -1
  56. package/build/browser/object/media.test.js +19 -14
  57. package/build/browser/object/media.test.js.map +1 -1
  58. package/build/browser/object/object.test.js +96 -89
  59. package/build/browser/object/object.test.js.map +1 -1
  60. package/build/browser/object/timeseries.test.js +119 -85
  61. package/build/browser/object/timeseries.test.js.map +1 -1
  62. package/build/browser/objectSet/InterfaceObjectSet.test.js +24 -20
  63. package/build/browser/objectSet/InterfaceObjectSet.test.js.map +1 -1
  64. package/build/browser/objectSet/ObjectSet.test.js +181 -66
  65. package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
  66. package/build/browser/objectSet/ObjectSetListenerWebsocket.js +2 -2
  67. package/build/browser/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
  68. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js +19 -12
  69. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -1
  70. package/build/browser/objectSet/createObjectSet.js +2 -1
  71. package/build/browser/objectSet/createObjectSet.js.map +1 -1
  72. package/build/browser/observable/internal/ActionApplication.js +4 -4
  73. package/build/browser/observable/internal/ActionApplication.js.map +1 -1
  74. package/build/browser/observable/internal/BulkObjectLoader.js +93 -0
  75. package/build/browser/observable/internal/BulkObjectLoader.js.map +1 -0
  76. package/build/browser/observable/internal/BulkObjectLoader.test.js +112 -0
  77. package/build/browser/observable/internal/BulkObjectLoader.test.js.map +1 -0
  78. package/build/browser/observable/internal/ListQuery.js +4 -1
  79. package/build/browser/observable/internal/ListQuery.js.map +1 -1
  80. package/build/browser/observable/internal/ObjectQuery.js +3 -6
  81. package/build/browser/observable/internal/ObjectQuery.js.map +1 -1
  82. package/build/browser/observable/internal/OptimisticJob.js +1 -1
  83. package/build/browser/observable/internal/OptimisticJob.js.map +1 -1
  84. package/build/browser/observable/internal/Query.js.map +1 -1
  85. package/build/browser/observable/internal/Store.js +2 -2
  86. package/build/browser/observable/internal/Store.js.map +1 -1
  87. package/build/browser/observable/internal/Store.test.js +215 -206
  88. package/build/browser/observable/internal/Store.test.js.map +1 -1
  89. package/build/browser/observable/internal/objectMatchesWhereClause.js +0 -2
  90. package/build/browser/observable/internal/objectMatchesWhereClause.js.map +1 -1
  91. package/build/browser/observable/internal/testUtils.js +4 -3
  92. package/build/browser/observable/internal/testUtils.js.map +1 -1
  93. package/build/browser/ontology/OntologyProvider.js.map +1 -1
  94. package/build/browser/ontology/StandardOntologyProvider.js +12 -5
  95. package/build/browser/ontology/StandardOntologyProvider.js.map +1 -1
  96. package/build/browser/ontology/StandardOntologyProvider.test.js +17 -16
  97. package/build/browser/ontology/StandardOntologyProvider.test.js.map +1 -1
  98. package/build/browser/ontology/loadFullObjectMetadata.js +0 -1
  99. package/build/browser/ontology/loadFullObjectMetadata.js.map +1 -1
  100. package/build/browser/ontology/loadQueryMetadata.js +5 -2
  101. package/build/browser/ontology/loadQueryMetadata.js.map +1 -1
  102. package/build/browser/public/internal.js +2 -0
  103. package/build/browser/public/internal.js.map +1 -1
  104. package/build/browser/public/unstable-do-not-use.js +1 -0
  105. package/build/browser/public/unstable-do-not-use.js.map +1 -1
  106. package/build/browser/public-utils/osdkConfig.js +49 -0
  107. package/build/browser/public-utils/osdkConfig.js.map +1 -0
  108. package/build/browser/{object/createObjectSpecifierFromPrimaryKey.js → public-utils/vite-env.d.ts} +2 -3
  109. package/build/browser/queries/applyQuery.js +6 -4
  110. package/build/browser/queries/applyQuery.js.map +1 -1
  111. package/build/browser/queries/queries.test.js +93 -27
  112. package/build/browser/queries/queries.test.js.map +1 -1
  113. package/build/browser/queries/types.js.map +1 -1
  114. package/build/browser/tsserver.js.map +1 -1
  115. package/build/browser/util/UserAgent.js +1 -1
  116. package/build/browser/util/UserAgent.js.map +1 -1
  117. package/build/browser/util/extractRdpDefinition.js +140 -0
  118. package/build/browser/util/extractRdpDefinition.js.map +1 -0
  119. package/build/browser/util/extractRdpDefinition.test.js +233 -0
  120. package/build/browser/util/extractRdpDefinition.test.js.map +1 -0
  121. package/build/browser/util/{isOsdkBaseObject.js → isObjectSpecifiersObject.js} +2 -2
  122. package/build/browser/util/isObjectSpecifiersObject.js.map +1 -0
  123. package/build/browser/util/isPoint.js +20 -0
  124. package/build/browser/util/isPoint.js.map +1 -0
  125. package/build/browser/util/objectSpecifierUtils.js +48 -0
  126. package/build/browser/util/objectSpecifierUtils.js.map +1 -0
  127. package/build/browser/util/objectSpecifierUtils.test.js +42 -0
  128. package/build/browser/util/objectSpecifierUtils.test.js.map +1 -0
  129. package/build/browser/util/toDataValue.js +6 -2
  130. package/build/browser/util/toDataValue.js.map +1 -1
  131. package/build/browser/util/toDataValue.test.js +37 -16
  132. package/build/browser/util/toDataValue.test.js.map +1 -1
  133. package/build/browser/util/toDataValueQueries.js +4 -6
  134. package/build/browser/util/toDataValueQueries.js.map +1 -1
  135. package/build/cjs/{Client-DBTcM9gB.d.cts → Client-CgL2LKN9.d.cts} +6 -7
  136. package/build/cjs/{chunk-MCQVHD2F.cjs → chunk-GTDO4U7H.cjs} +124 -72
  137. package/build/cjs/chunk-GTDO4U7H.cjs.map +1 -0
  138. package/build/cjs/{chunk-EY52J5Z4.cjs → chunk-W5PFESFR.cjs} +163 -34
  139. package/build/cjs/chunk-W5PFESFR.cjs.map +1 -0
  140. package/build/cjs/index.cjs +188 -166
  141. package/build/cjs/index.cjs.map +1 -1
  142. package/build/cjs/index.d.cts +4 -24
  143. package/build/cjs/public/internal.cjs +61 -7
  144. package/build/cjs/public/internal.cjs.map +1 -1
  145. package/build/cjs/public/internal.d.cts +50 -3
  146. package/build/cjs/public/unstable-do-not-use.cjs +224 -103
  147. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
  148. package/build/cjs/public/unstable-do-not-use.d.cts +12 -3
  149. package/build/esm/MinimalClientContext.js.map +1 -1
  150. package/build/esm/__unstable/ConjureSupport.js.map +1 -1
  151. package/build/esm/actions/ActionValidationError.js +1 -1
  152. package/build/esm/actions/ActionValidationError.js.map +1 -1
  153. package/build/esm/actions/actions.test.js +134 -89
  154. package/build/esm/actions/actions.test.js.map +1 -1
  155. package/build/esm/actions/applyAction.js.map +1 -1
  156. package/build/esm/createClient.js +5 -1
  157. package/build/esm/createClient.js.map +1 -1
  158. package/build/esm/createClient.test.js +14 -6
  159. package/build/esm/createClient.test.js.map +1 -1
  160. package/build/esm/createMinimalClient.js.map +1 -1
  161. package/build/esm/createMinimalClientHelper.js +25 -0
  162. package/build/esm/createMinimalClientHelper.js.map +1 -0
  163. package/build/esm/derivedProperties/createWithPropertiesObjectSet.js +4 -21
  164. package/build/esm/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
  165. package/build/esm/derivedProperties/createWithPropertiesObjectSet.test.js +14 -14
  166. package/build/esm/derivedProperties/createWithPropertiesObjectSet.test.js.map +1 -1
  167. package/build/esm/fetchMetadata.js +1 -1
  168. package/build/esm/fetchMetadata.js.map +1 -1
  169. package/build/esm/fetchMetadata.test.js +11 -9
  170. package/build/esm/fetchMetadata.test.js.map +1 -1
  171. package/build/esm/index.js +0 -1
  172. package/build/esm/index.js.map +1 -1
  173. package/build/esm/{util/isOsdkObject.js → intellisense.test.helpers/showsObjectPropertyJsdoc.js} +9 -4
  174. package/build/esm/intellisense.test.helpers/showsObjectPropertyJsdoc.js.map +1 -0
  175. package/build/esm/intellisense.test.js +17 -1
  176. package/build/esm/intellisense.test.js.map +1 -1
  177. package/build/esm/logger/BaseLogger.js +59 -0
  178. package/build/esm/logger/BaseLogger.js.map +1 -0
  179. package/build/esm/logger/BrowserLogger.js +67 -0
  180. package/build/esm/logger/BrowserLogger.js.map +1 -0
  181. package/build/esm/logger/MinimalLogger.js +39 -0
  182. package/build/esm/logger/MinimalLogger.js.map +1 -0
  183. package/build/esm/logger/MinimalLogger.test.js +60 -0
  184. package/build/esm/logger/MinimalLogger.test.js.map +1 -0
  185. package/build/esm/logger/TestLogger.js +56 -0
  186. package/build/esm/logger/TestLogger.js.map +1 -0
  187. package/build/esm/object/attachment.test.js +20 -7
  188. package/build/esm/object/attachment.test.js.map +1 -1
  189. package/build/esm/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -1
  190. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js +4 -0
  191. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  192. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js +44 -33
  193. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  194. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.js.map +1 -1
  195. package/build/esm/object/convertWireToOsdkObjects.js +4 -14
  196. package/build/esm/object/convertWireToOsdkObjects.js.map +1 -1
  197. package/build/esm/object/convertWireToOsdkObjects.test.js +39 -33
  198. package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -1
  199. package/build/esm/object/fetchPage.js +4 -3
  200. package/build/esm/object/fetchPage.js.map +1 -1
  201. package/build/esm/object/geotimeseriesreference.test.js +56 -134
  202. package/build/esm/object/geotimeseriesreference.test.js.map +1 -1
  203. package/build/esm/object/media.test.js +19 -14
  204. package/build/esm/object/media.test.js.map +1 -1
  205. package/build/esm/object/object.test.js +96 -89
  206. package/build/esm/object/object.test.js.map +1 -1
  207. package/build/esm/object/timeseries.test.js +119 -85
  208. package/build/esm/object/timeseries.test.js.map +1 -1
  209. package/build/esm/objectSet/InterfaceObjectSet.test.js +24 -20
  210. package/build/esm/objectSet/InterfaceObjectSet.test.js.map +1 -1
  211. package/build/esm/objectSet/ObjectSet.test.js +181 -66
  212. package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
  213. package/build/esm/objectSet/ObjectSetListenerWebsocket.js +2 -2
  214. package/build/esm/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
  215. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js +19 -12
  216. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -1
  217. package/build/esm/objectSet/createObjectSet.js +2 -1
  218. package/build/esm/objectSet/createObjectSet.js.map +1 -1
  219. package/build/esm/observable/internal/ActionApplication.js +4 -4
  220. package/build/esm/observable/internal/ActionApplication.js.map +1 -1
  221. package/build/esm/observable/internal/BulkObjectLoader.js +93 -0
  222. package/build/esm/observable/internal/BulkObjectLoader.js.map +1 -0
  223. package/build/esm/observable/internal/BulkObjectLoader.test.js +112 -0
  224. package/build/esm/observable/internal/BulkObjectLoader.test.js.map +1 -0
  225. package/build/esm/observable/internal/ListQuery.js +4 -1
  226. package/build/esm/observable/internal/ListQuery.js.map +1 -1
  227. package/build/esm/observable/internal/ObjectQuery.js +3 -6
  228. package/build/esm/observable/internal/ObjectQuery.js.map +1 -1
  229. package/build/esm/observable/internal/OptimisticJob.js +1 -1
  230. package/build/esm/observable/internal/OptimisticJob.js.map +1 -1
  231. package/build/esm/observable/internal/Query.js.map +1 -1
  232. package/build/esm/observable/internal/Store.js +2 -2
  233. package/build/esm/observable/internal/Store.js.map +1 -1
  234. package/build/esm/observable/internal/Store.test.js +215 -206
  235. package/build/esm/observable/internal/Store.test.js.map +1 -1
  236. package/build/esm/observable/internal/objectMatchesWhereClause.js +0 -2
  237. package/build/esm/observable/internal/objectMatchesWhereClause.js.map +1 -1
  238. package/build/esm/observable/internal/testUtils.js +4 -3
  239. package/build/esm/observable/internal/testUtils.js.map +1 -1
  240. package/build/esm/ontology/OntologyProvider.js.map +1 -1
  241. package/build/esm/ontology/StandardOntologyProvider.js +12 -5
  242. package/build/esm/ontology/StandardOntologyProvider.js.map +1 -1
  243. package/build/esm/ontology/StandardOntologyProvider.test.js +17 -16
  244. package/build/esm/ontology/StandardOntologyProvider.test.js.map +1 -1
  245. package/build/esm/ontology/loadFullObjectMetadata.js +0 -1
  246. package/build/esm/ontology/loadFullObjectMetadata.js.map +1 -1
  247. package/build/esm/ontology/loadQueryMetadata.js +5 -2
  248. package/build/esm/ontology/loadQueryMetadata.js.map +1 -1
  249. package/build/esm/public/internal.js +2 -0
  250. package/build/esm/public/internal.js.map +1 -1
  251. package/build/esm/public/unstable-do-not-use.js +1 -0
  252. package/build/esm/public/unstable-do-not-use.js.map +1 -1
  253. package/build/esm/public-utils/osdkConfig.js +49 -0
  254. package/build/esm/public-utils/osdkConfig.js.map +1 -0
  255. package/build/esm/{object/createObjectSpecifierFromPrimaryKey.js → public-utils/vite-env.d.ts} +2 -3
  256. package/build/esm/queries/applyQuery.js +6 -4
  257. package/build/esm/queries/applyQuery.js.map +1 -1
  258. package/build/esm/queries/queries.test.js +93 -27
  259. package/build/esm/queries/queries.test.js.map +1 -1
  260. package/build/esm/queries/types.js.map +1 -1
  261. package/build/esm/tsserver.js.map +1 -1
  262. package/build/esm/util/UserAgent.js +1 -1
  263. package/build/esm/util/UserAgent.js.map +1 -1
  264. package/build/esm/util/extractRdpDefinition.js +140 -0
  265. package/build/esm/util/extractRdpDefinition.js.map +1 -0
  266. package/build/esm/util/extractRdpDefinition.test.js +233 -0
  267. package/build/esm/util/extractRdpDefinition.test.js.map +1 -0
  268. package/build/{browser/util/isOsdkObject.js → esm/util/isObjectSpecifiersObject.js} +2 -2
  269. package/build/esm/util/isObjectSpecifiersObject.js.map +1 -0
  270. package/build/esm/util/isPoint.js +20 -0
  271. package/build/esm/util/isPoint.js.map +1 -0
  272. package/build/esm/util/objectSpecifierUtils.js +48 -0
  273. package/build/esm/util/objectSpecifierUtils.js.map +1 -0
  274. package/build/esm/util/objectSpecifierUtils.test.js +42 -0
  275. package/build/esm/util/objectSpecifierUtils.test.js.map +1 -0
  276. package/build/esm/util/toDataValue.js +6 -2
  277. package/build/esm/util/toDataValue.js.map +1 -1
  278. package/build/esm/util/toDataValue.test.js +37 -16
  279. package/build/esm/util/toDataValue.test.js.map +1 -1
  280. package/build/esm/util/toDataValueQueries.js +4 -6
  281. package/build/esm/util/toDataValueQueries.js.map +1 -1
  282. package/build/types/MinimalClientContext.d.ts +1 -1
  283. package/build/types/MinimalClientContext.d.ts.map +1 -1
  284. package/build/types/__unstable/ConjureSupport.d.ts +2 -2
  285. package/build/types/actions/applyAction.d.ts +1 -2
  286. package/build/types/actions/applyAction.d.ts.map +1 -1
  287. package/build/types/createClient.d.ts +1 -1
  288. package/build/types/createClient.d.ts.map +1 -1
  289. package/build/types/createClient.test.d.ts +2 -1
  290. package/build/types/createClient.test.d.ts.map +1 -1
  291. package/build/types/createMinimalClientHelper.d.ts +1 -0
  292. package/build/types/createMinimalClientHelper.d.ts.map +1 -0
  293. package/build/types/index.d.ts +4 -6
  294. package/build/types/index.d.ts.map +1 -1
  295. package/build/types/intellisense.test.helpers/showsObjectPropertyJsdoc.d.ts +1 -0
  296. package/build/types/intellisense.test.helpers/showsObjectPropertyJsdoc.d.ts.map +1 -0
  297. package/build/types/logger/BaseLogger.d.ts +33 -0
  298. package/build/types/logger/BaseLogger.d.ts.map +1 -0
  299. package/build/types/logger/BrowserLogger.d.ts +9 -0
  300. package/build/types/logger/BrowserLogger.d.ts.map +1 -0
  301. package/build/types/logger/MinimalLogger.d.ts +9 -0
  302. package/build/types/logger/MinimalLogger.d.ts.map +1 -0
  303. package/build/types/logger/MinimalLogger.test.d.ts +1 -0
  304. package/build/types/logger/MinimalLogger.test.d.ts.map +1 -0
  305. package/build/types/logger/TestLogger.d.ts +14 -0
  306. package/build/types/logger/TestLogger.d.ts.map +1 -0
  307. package/build/types/object/convertWireToOsdkObjects.d.ts +4 -4
  308. package/build/types/object/convertWireToOsdkObjects.d.ts.map +1 -1
  309. package/build/types/object/fetchPage.d.ts.map +1 -1
  310. package/build/types/object/object.test.d.ts.map +1 -1
  311. package/build/types/objectSet/ObjectSet.test.d.ts.map +1 -1
  312. package/build/types/observable/internal/ActionApplication.d.ts +2 -2
  313. package/build/types/observable/internal/ActionApplication.d.ts.map +1 -1
  314. package/build/types/observable/internal/BulkObjectLoader.d.ts +8 -0
  315. package/build/types/observable/internal/BulkObjectLoader.d.ts.map +1 -0
  316. package/build/types/observable/internal/BulkObjectLoader.test.d.ts +1 -0
  317. package/build/types/observable/internal/BulkObjectLoader.test.d.ts.map +1 -0
  318. package/build/types/observable/internal/ListQuery.d.ts.map +1 -1
  319. package/build/types/observable/internal/ObjectQuery.d.ts.map +1 -1
  320. package/build/types/observable/internal/OptimisticJob.d.ts.map +1 -1
  321. package/build/types/observable/internal/Query.d.ts +2 -2
  322. package/build/types/observable/internal/Query.d.ts.map +1 -1
  323. package/build/types/observable/internal/Store.d.ts +2 -2
  324. package/build/types/observable/internal/Store.d.ts.map +1 -1
  325. package/build/types/observable/internal/testUtils.d.ts +1 -2
  326. package/build/types/observable/internal/testUtils.d.ts.map +1 -1
  327. package/build/types/ontology/OntologyProvider.d.ts +1 -1
  328. package/build/types/ontology/OntologyProvider.d.ts.map +1 -1
  329. package/build/types/ontology/loadQueryMetadata.d.ts +1 -1
  330. package/build/types/ontology/loadQueryMetadata.d.ts.map +1 -1
  331. package/build/types/public/internal.d.ts +2 -0
  332. package/build/types/public/internal.d.ts.map +1 -1
  333. package/build/types/public/unstable-do-not-use.d.ts +4 -2
  334. package/build/types/public/unstable-do-not-use.d.ts.map +1 -1
  335. package/build/types/public-utils/osdkConfig.d.ts +8 -0
  336. package/build/types/public-utils/osdkConfig.d.ts.map +1 -0
  337. package/build/types/public-utils/vite-env.d.d.ts +3 -0
  338. package/build/types/public-utils/vite-env.d.d.ts.map +1 -0
  339. package/build/types/queries/applyQuery.d.ts +2 -2
  340. package/build/types/queries/applyQuery.d.ts.map +1 -1
  341. package/build/types/queries/types.d.ts +1 -1
  342. package/build/types/queries/types.d.ts.map +1 -1
  343. package/build/types/tsserver.d.ts +1 -1
  344. package/build/types/tsserver.d.ts.map +1 -1
  345. package/build/types/util/extractRdpDefinition.d.ts +4 -0
  346. package/build/types/util/extractRdpDefinition.d.ts.map +1 -0
  347. package/build/types/util/extractRdpDefinition.test.d.ts +1 -0
  348. package/build/types/util/extractRdpDefinition.test.d.ts.map +1 -0
  349. package/build/types/util/isObjectSpecifiersObject.d.ts +5 -0
  350. package/build/types/util/isObjectSpecifiersObject.d.ts.map +1 -0
  351. package/build/types/util/isPoint.d.ts +1 -0
  352. package/build/types/util/isPoint.d.ts.map +1 -0
  353. package/build/types/util/objectSpecifierUtils.d.ts +24 -0
  354. package/build/types/util/objectSpecifierUtils.d.ts.map +1 -0
  355. package/build/types/util/objectSpecifierUtils.test.d.ts +1 -0
  356. package/build/types/util/objectSpecifierUtils.test.d.ts.map +1 -0
  357. package/package.json +16 -15
  358. package/build/browser/Logger.js +0 -2
  359. package/build/browser/Logger.js.map +0 -1
  360. package/build/browser/object/createObjectSpecifierFromPrimaryKey.js.map +0 -1
  361. package/build/browser/util/isOsdkBaseObject.js.map +0 -1
  362. package/build/browser/util/isOsdkObject.js.map +0 -1
  363. package/build/cjs/chunk-EY52J5Z4.cjs.map +0 -1
  364. package/build/cjs/chunk-MCQVHD2F.cjs.map +0 -1
  365. package/build/cjs/chunk-Q7SFCCGT.cjs +0 -11
  366. package/build/cjs/chunk-Q7SFCCGT.cjs.map +0 -1
  367. package/build/cjs/graphql-RGM5SRWV.cjs +0 -10532
  368. package/build/cjs/graphql-RGM5SRWV.cjs.map +0 -1
  369. package/build/esm/Logger.js +0 -2
  370. package/build/esm/Logger.js.map +0 -1
  371. package/build/esm/object/createObjectSpecifierFromPrimaryKey.js.map +0 -1
  372. package/build/esm/util/isOsdkBaseObject.js.map +0 -1
  373. package/build/esm/util/isOsdkObject.js.map +0 -1
  374. package/build/types/Logger.d.ts +0 -17
  375. package/build/types/Logger.d.ts.map +0 -1
  376. package/build/types/object/createObjectSpecifierFromPrimaryKey.d.ts +0 -2
  377. package/build/types/object/createObjectSpecifierFromPrimaryKey.d.ts.map +0 -1
  378. package/build/types/util/isOsdkBaseObject.d.ts +0 -2
  379. package/build/types/util/isOsdkBaseObject.d.ts.map +0 -1
  380. package/build/types/util/isOsdkObject.d.ts +0 -2
  381. package/build/types/util/isOsdkObject.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,211 @@
1
1
  # @osdk/client
2
2
 
3
+ ## 2.2.0-rc.24
4
+
5
+ ### Patch Changes
6
+
7
+ - cdd3154: Revert allowing explicitly passing undefined values to reset on actions
8
+ - 5665b18: Remove selection RDPs from the API
9
+ - a146ce4: Cleanup RDP API
10
+ - Updated dependencies [5665b18]
11
+ - Updated dependencies [a146ce4]
12
+ - @osdk/api@2.2.0-rc.24
13
+ - @osdk/generator-converters@2.2.0-rc.24
14
+ - @osdk/client.unstable@2.2.0-rc.24
15
+
16
+ ## 2.2.0-beta.23
17
+
18
+ ### Minor Changes
19
+
20
+ - 4183a55: Refactor OsdkBase to avoid breaks with type not being discoverable
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [4183a55]
25
+ - @osdk/api@2.2.0-beta.23
26
+ - @osdk/generator-converters@2.2.0-beta.23
27
+ - @osdk/client.unstable@2.2.0-beta.23
28
+
29
+ ## 2.2.0-beta.22
30
+
31
+ ### Minor Changes
32
+
33
+ - 18ba34f: Adds the ability to generate and execute functions at pinned versions
34
+
35
+ ### Patch Changes
36
+
37
+ - Updated dependencies [18ba34f]
38
+ - @osdk/generator-converters@2.2.0-beta.22
39
+ - @osdk/api@2.2.0-beta.22
40
+ - @osdk/client.unstable@2.2.0-beta.22
41
+
42
+ ## 2.2.0-beta.21
43
+
44
+ ### Minor Changes
45
+
46
+ - 317b555: Release
47
+
48
+ ### Patch Changes
49
+
50
+ - Updated dependencies [317b555]
51
+ - @osdk/generator-converters@2.2.0-beta.21
52
+ - @osdk/client.unstable@2.2.0-beta.21
53
+ - @osdk/api@2.2.0-beta.21
54
+
55
+ ## 2.2.0-beta.20
56
+
57
+ ### Minor Changes
58
+
59
+ - 889e84b: Release
60
+
61
+ ### Patch Changes
62
+
63
+ - Updated dependencies [889e84b]
64
+ - @osdk/generator-converters@2.2.0-beta.20
65
+ - @osdk/client.unstable@2.2.0-beta.20
66
+ - @osdk/api@2.2.0-beta.20
67
+
68
+ ## 2.2.0-beta.19
69
+
70
+ ### Minor Changes
71
+
72
+ - 1f6842f: Send a null value for parameters explicitly set to undefined rather than dropping the field
73
+
74
+ ### Patch Changes
75
+
76
+ - @osdk/api@2.2.0-beta.19
77
+ - @osdk/client.unstable@2.2.0-beta.19
78
+ - @osdk/generator-converters@2.2.0-beta.19
79
+
80
+ ## 2.2.0-beta.18
81
+
82
+ ### Minor Changes
83
+
84
+ - 56aa502: Improves exposed APIs
85
+
86
+ ### Patch Changes
87
+
88
+ - Updated dependencies [56aa502]
89
+ - Updated dependencies [6ac8f0b]
90
+ - @osdk/api@2.2.0-beta.18
91
+ - @osdk/client.unstable@2.2.0-beta.18
92
+ - @osdk/generator-converters@2.2.0-beta.18
93
+
94
+ ## 2.2.0-beta.17
95
+
96
+ ### Minor Changes
97
+
98
+ - b61e9f5: Make Query Map Types Optional
99
+ - abe4897: Removes support for boolean primary keys
100
+ - 5a12181: Quick fix for geohash params.
101
+ - 430dee3: JSdoc for object properties are generated
102
+ - 70b4464: Fix types for RDPs
103
+ - 791e655: Add support for geoshape and geohash action parameters.
104
+ - 751e5b3: Use client as peer dep in functions package.
105
+
106
+ ### Patch Changes
107
+
108
+ - Updated dependencies [c6bee50]
109
+ - Updated dependencies [6eeb423]
110
+ - Updated dependencies [abe4897]
111
+ - Updated dependencies [70b4464]
112
+ - Updated dependencies [37f8e60]
113
+ - Updated dependencies [791e655]
114
+ - @osdk/api@2.2.0-beta.17
115
+ - @osdk/client.unstable@2.2.0-beta.17
116
+ - @osdk/generator-converters@2.2.0-beta.17
117
+
118
+ ## 2.2.0-beta.16
119
+
120
+ ### Patch Changes
121
+
122
+ - Updated dependencies [395ae07]
123
+ - @osdk/client.unstable@2.2.0-beta.16
124
+ - @osdk/api@2.2.0-beta.16
125
+ - @osdk/generator-converters@2.2.0-beta.16
126
+
127
+ ## 2.2.0-beta.15
128
+
129
+ ### Minor Changes
130
+
131
+ - ed69666: Update conjure-lite to 0.7.1
132
+ - 1e16dcb: Exposes MinimalLogger and BrowserLogger via @osdk/client/internal
133
+ - 1e16dcb: Default logging is error level only
134
+ - f4370e3: Fixes error when using intersection, subtraction, or union object sets
135
+ - cc380b5: Use the latest Platform APIs
136
+
137
+ ### Patch Changes
138
+
139
+ - Updated dependencies [ed69666]
140
+ - @osdk/client.unstable@2.2.0-beta.15
141
+ - @osdk/api@2.2.0-beta.15
142
+ - @osdk/generator-converters@2.2.0-beta.15
143
+
144
+ ## 2.2.0-beta.14
145
+
146
+ ### Patch Changes
147
+
148
+ - Updated dependencies [a08bdfb]
149
+ - Updated dependencies [6abf078]
150
+ - @osdk/client.unstable@2.2.0-beta.14
151
+ - @osdk/api@2.2.0-beta.14
152
+ - @osdk/generator-converters@2.2.0-beta.14
153
+
154
+ ## 2.2.0-beta.13
155
+
156
+ ### Minor Changes
157
+
158
+ - 2ce3659: Update underlying pagination size for async iter.
159
+ - 488b51c: Add support for using aggregations and GeoJSON types from runtime derived properties
160
+ - e873024: Fixes issues requiring msw and p-defer
161
+ - 88591f7: Small fixes for ObjectSpecifier
162
+
163
+ ### Patch Changes
164
+
165
+ - Updated dependencies [488b51c]
166
+ - Updated dependencies [71462e9]
167
+ - @osdk/api@2.2.0-beta.13
168
+ - @osdk/generator-converters@2.2.0-beta.13
169
+ - @osdk/client.unstable@2.2.0-beta.13
170
+
171
+ ## 2.2.0-beta.12
172
+
173
+ ### Minor Changes
174
+
175
+ - c92fe73: Add OsdkConfig utils to client/unstable
176
+
177
+ ### Patch Changes
178
+
179
+ - @osdk/api@2.2.0-beta.12
180
+ - @osdk/client.unstable@2.2.0-beta.12
181
+ - @osdk/generator-converters@2.2.0-beta.12
182
+
183
+ ## 2.2.0-beta.11
184
+
185
+ ### Patch Changes
186
+
187
+ - Updated dependencies [7170fd1]
188
+ - Updated dependencies [10da391]
189
+ - @osdk/api@2.2.0-beta.11
190
+ - @osdk/client.unstable@2.2.0-beta.11
191
+ - @osdk/generator-converters@2.2.0-beta.11
192
+
193
+ ## 2.2.0-beta.10
194
+
195
+ ### Minor Changes
196
+
197
+ - 81c0d8c: Client will now provide a default logger to console.error if none is provided
198
+ - 81c0d8c: ObservableClient now queues up object loads for bulk processing
199
+
200
+ ### Patch Changes
201
+
202
+ - Updated dependencies [23ea0e4]
203
+ - Updated dependencies [5e8e839]
204
+ - Updated dependencies [46cede4]
205
+ - @osdk/api@2.2.0-beta.10
206
+ - @osdk/client.unstable@2.2.0-beta.10
207
+ - @osdk/generator-converters@2.2.0-beta.10
208
+
3
209
  ## 2.2.0-beta.9
4
210
 
5
211
  ### Minor Changes
@@ -128,6 +334,183 @@
128
334
  - @osdk/generator-converters@2.2.0-beta.2
129
335
  - @osdk/client.unstable@2.2.0-beta.2
130
336
 
337
+ ## 2.1.0
338
+
339
+ ### Minor Changes
340
+
341
+ - 966d408: Rename type for base action parameter types.
342
+ - b773513: Fix onOutOfDate handler from being fired twice
343
+ - cddc196: Try-catches handlers called during subscription
344
+ - d794c19: Adding support for struct action params.
345
+ - 05febf4: Adds Reference Update support in subscribe
346
+ - 55c05f2: Remove runtime derived properties from external types.
347
+ - a06ec35: Fixes the lastFetchedValue on a Geotime Series property from reference updates
348
+ - 0dc40b0: Switch to OSDK.Instance
349
+ - 3703d81: Changed shared context to a version less error prone
350
+ - 6f50516: Fix bug where object return types in a query were not properly mapped when wrapped in a struct.
351
+ - 25fd9f0: Updating package.json to have better entry points to support react native bundlers.
352
+ - 11a05cc: Updated subscribe api to make requesting properties optional
353
+ - 7865cb6: Add support for search on struct properties.
354
+ - e6fbd94: Export Attachment from client
355
+ - 9c4efe6: Support uploading media parameters through actions
356
+ - 0a7c747: Add support for timeseries sensors.
357
+ - 3ea2e79: Creates new export for internal helper functions
358
+ - 1812118: Add geotime support for OSDK.
359
+ - d927a1d: Throws error in createClient when passed an invalid ontology RID
360
+ - bc1761c: Update platform API dependencies.
361
+ - 656f975: Fixes attachment upload inputs sending incorrect in browser contexts
362
+ - f1145ff: Adds support for runtime derived properties
363
+ - 1c59d93: Allows interfaces to be used with subscribe
364
+ - f446d0c: Exposes $clone from OSDK Object instances
365
+ - c80ca45: Add ability to create interfaces through actions now.
366
+ - bb8b219: Use new external packages instead of the internal ones.
367
+ - 44e62f6: Updating fetch for auth and other packages.
368
+ - 03f95eb: Add support for interface params in actions.
369
+ - 91cfa3a: Fixing url parsing for client.
370
+ - 94463b6: Support objects as code
371
+ - 14624f7: Supports custom formatters in browser
372
+ - 1a89f23: Removing support for augmenting interfaces when fetching them.
373
+ - 9d35a1f: Remove unused imports
374
+ - c691c8b: Package now has experimental support for commonjs
375
+ - 749cf69: Remove experimental non null for now.
376
+ - f03e39f: Add a namespace type for listeners.
377
+ - d464009: improves interface api name mapping with api namespaces
378
+ - 11088aa: Fix where clause types so we don't accept more than one key in the clauses.
379
+ - 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
380
+ - 9298f75: Using new interface APIs for backend.
381
+ - eb27b54: Fix URL for experimental method
382
+ - 7a95618: Generate new OMS APIs
383
+ - f34b3d4: Add ability to fetch by rid, experimentally.
384
+ - d88fdb9: Adds methods to extract date strings from Dates and ISO-8601 strings
385
+ - 8eb2378: Fixes where clauses when objects have an api namespace
386
+ - acbfab9: Fixes where clauses for interfaces with no properties.
387
+ - c9da74c: Improves code quality by fixing linting errors
388
+ - 27f0f77: Interface instances are immutable just like object instances
389
+ - 015279b: Fix use of new interfaces api with preview flag.
390
+ - 62c1d63: Add support for reading media reference property in OSDK.
391
+ - 3c9ac22: Cleaning up where clause types.
392
+ - 91cfa3a: Fixing URL parsing for custom entry points.
393
+ - e86e91d: Internal property of Client is removed from output
394
+ - abfe4b3: Add support for reading struct properties.
395
+ - 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.
396
+ - 0cd1603: Fixes AttachmentUpload for browser contexts
397
+ - a7a4aef: Removes dependency on crypto
398
+ - e5fe7c0: Adds experimental method to convert an object set into RID
399
+ - 1b2e8c9: Adds subscribe feature directly to client
400
+ - 9f3807c: Allows $in to take a readonly array
401
+ - d12c92b: Fixes process.env.NODE_ENV handling
402
+ - 0c56d21: Exposing fuzzy searching.
403
+ - e548b9b: Updates subscribe to return object updates
404
+ - 6671a39: Upgrade execa where used
405
+ - 5e78575: Fix queries that have response types with nested values, like arrays.
406
+ - ee6224b: Explicitly type aggregation types in queries.
407
+ - 1dc0228: Change experimental code style to prevent future breaks
408
+ - fa02ebf: Adds SLS dependency for object-set-watcher API
409
+ - 9af346e: Fixing proxy handlers.
410
+ - d3b3f35: Add's onSuccessfulSubscribe handler to subscribe functionality
411
+ - c682504: Locks dependency version of 3 internal libraries
412
+ - 9018dc2: Updating platform api dependencies.
413
+ - a6c320d: Internal optimization to reduce memory usage for unused interface objects
414
+ - 8026baf: Update interface support for .subscribe
415
+ - 6b6c8a1: Updates gateway endpoints and changes fetchContents for attachments to return a response
416
+ - c537e2d: Remove unused imports.
417
+ - 3fc2ee6: Include more descriptive JS docs for public utils
418
+ - 0d8ac3b: Remove attachment from exports.
419
+ - 73fa373: Exports helper method to construct object sets from RIDs from internal utils
420
+ - 8e6a5f4: Avoid type-fest's IsAny as it doesn't always work
421
+ - 09eaf24: Update to latest platform sdks
422
+ - 71dfb4c: Now export all api shapes from client, so use that dependency instead.
423
+ - 2d5e648: Remove subscribe from experimental gate.
424
+ - c4f88a8: Removes circular dependency that may upset legacy tools like react-native
425
+ - d665147: Update platform sdk deps
426
+ - 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.
427
+
428
+ ### Patch Changes
429
+
430
+ - Updated dependencies [966d408]
431
+ - Updated dependencies [cddc196]
432
+ - Updated dependencies [d794c19]
433
+ - Updated dependencies [05febf4]
434
+ - Updated dependencies [55c05f2]
435
+ - Updated dependencies [0dc40b0]
436
+ - Updated dependencies [3703d81]
437
+ - Updated dependencies [25fd9f0]
438
+ - Updated dependencies [1b60b3d]
439
+ - Updated dependencies [11a05cc]
440
+ - Updated dependencies [7865cb6]
441
+ - Updated dependencies [9c4efe6]
442
+ - Updated dependencies [0a7c747]
443
+ - Updated dependencies [f0b519d]
444
+ - Updated dependencies [3ea2e79]
445
+ - Updated dependencies [1812118]
446
+ - Updated dependencies [bc1761c]
447
+ - Updated dependencies [656f975]
448
+ - Updated dependencies [f1145ff]
449
+ - Updated dependencies [f446d0c]
450
+ - Updated dependencies [c80ca45]
451
+ - Updated dependencies [bb8b219]
452
+ - Updated dependencies [44e62f6]
453
+ - Updated dependencies [03f95eb]
454
+ - Updated dependencies [91cfa3a]
455
+ - Updated dependencies [94463b6]
456
+ - Updated dependencies [1a89f23]
457
+ - Updated dependencies [9d35a1f]
458
+ - Updated dependencies [c691c8b]
459
+ - Updated dependencies [749cf69]
460
+ - Updated dependencies [f03e39f]
461
+ - Updated dependencies [11088aa]
462
+ - Updated dependencies [72c1905]
463
+ - Updated dependencies [9298f75]
464
+ - Updated dependencies [7a95618]
465
+ - Updated dependencies [f34b3d4]
466
+ - Updated dependencies [acbfab9]
467
+ - Updated dependencies [c9da74c]
468
+ - Updated dependencies [62c1d63]
469
+ - Updated dependencies [3c9ac22]
470
+ - Updated dependencies [1591f04]
471
+ - Updated dependencies [03e1941]
472
+ - Updated dependencies [963addb]
473
+ - Updated dependencies [abfe4b3]
474
+ - Updated dependencies [b79becf]
475
+ - Updated dependencies [27866a8]
476
+ - Updated dependencies [caf1abc]
477
+ - Updated dependencies [e5fe7c0]
478
+ - Updated dependencies [1b2e8c9]
479
+ - Updated dependencies [81b2fb2]
480
+ - Updated dependencies [9f3807c]
481
+ - Updated dependencies [ecd4aee]
482
+ - Updated dependencies [0c56d21]
483
+ - Updated dependencies [e548b9b]
484
+ - Updated dependencies [83e7ea3]
485
+ - Updated dependencies [ee6224b]
486
+ - Updated dependencies [1dc0228]
487
+ - Updated dependencies [6c60414]
488
+ - Updated dependencies [5fe2c8d]
489
+ - Updated dependencies [7d777eb]
490
+ - Updated dependencies [1132993]
491
+ - Updated dependencies [d3b3f35]
492
+ - Updated dependencies [c682504]
493
+ - Updated dependencies [785f663]
494
+ - Updated dependencies [9018dc2]
495
+ - Updated dependencies [6b6c8a1]
496
+ - Updated dependencies [c537e2d]
497
+ - Updated dependencies [73fa373]
498
+ - Updated dependencies [bf0e3b4]
499
+ - Updated dependencies [8e6a5f4]
500
+ - Updated dependencies [2b35ed4]
501
+ - Updated dependencies [09eaf24]
502
+ - Updated dependencies [2d5e648]
503
+ - Updated dependencies [06e66dc]
504
+ - Updated dependencies [31e7d70]
505
+ - Updated dependencies [d665147]
506
+ - Updated dependencies [f19da8e]
507
+ - @osdk/generator-converters@2.1.0
508
+ - @osdk/api@2.1.0
509
+ - @osdk/shared.client.impl@1.1.0
510
+ - @osdk/client.unstable@2.1.0
511
+ - @osdk/shared.net.errors@2.1.0
512
+ - @osdk/shared.net.fetch@1.1.0
513
+
131
514
  ## 2.1.0-beta.31
132
515
 
133
516
  ### 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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ACVrD,OAAO,EAAEsD,UAAU,CAACtD,OAAQ;MAC5BqB,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,s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AACA,QAAQ,CAAChE,OAAO,EAAGgE,QAAQ,CAACC,EAAE,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":[]}