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

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