@osdk/client 2.1.0-beta.23 → 2.1.0-beta.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 (894) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/build/browser/Client.js +6 -0
  3. package/build/browser/Client.js.map +1 -1
  4. package/build/browser/Definitions.test.js +1 -0
  5. package/build/browser/Definitions.test.js.map +1 -1
  6. package/build/browser/Logger.js +0 -15
  7. package/build/browser/Logger.js.map +1 -1
  8. package/build/browser/MinimalClientContext.js +0 -15
  9. package/build/browser/MinimalClientContext.js.map +1 -1
  10. package/build/browser/ResultOrError.js +1 -0
  11. package/build/browser/ResultOrError.js.map +1 -1
  12. package/build/browser/SatisfiesSemver.js +0 -15
  13. package/build/browser/SatisfiesSemver.js.map +1 -1
  14. package/build/browser/SatisfiesSemver.test.js +1 -0
  15. package/build/browser/SatisfiesSemver.test.js.map +1 -1
  16. package/build/browser/__unstable/ConjureSupport.js +3 -0
  17. package/build/browser/__unstable/ConjureSupport.js.map +1 -1
  18. package/build/browser/__unstable/createBulkLinksAsyncIterFactory.js +4 -0
  19. package/build/browser/__unstable/createBulkLinksAsyncIterFactory.js.map +1 -1
  20. package/build/browser/actions/ActionValidationError.js +1 -1
  21. package/build/browser/actions/ActionValidationError.js.map +1 -1
  22. package/build/browser/actions/actions.test.js +30 -2
  23. package/build/browser/actions/actions.test.js.map +1 -1
  24. package/build/browser/actions/applyAction.js +1 -0
  25. package/build/browser/actions/applyAction.js.map +1 -1
  26. package/build/browser/createClient.js +10 -5
  27. package/build/browser/createClient.js.map +1 -1
  28. package/build/browser/createClient.test.js +1 -0
  29. package/build/browser/createClient.test.js.map +1 -1
  30. package/build/browser/createGeotimeSeriesProperty.js +1 -1
  31. package/build/browser/createGeotimeSeriesProperty.js.map +1 -1
  32. package/build/browser/createMediaReferenceProperty.js +1 -0
  33. package/build/browser/createMediaReferenceProperty.js.map +1 -1
  34. package/build/browser/createMinimalClient.js +2 -0
  35. package/build/browser/createMinimalClient.js.map +1 -1
  36. package/build/browser/createPlatformClient.js +1 -0
  37. package/build/browser/createPlatformClient.js.map +1 -1
  38. package/build/browser/createTimeseriesProperty.js +1 -0
  39. package/build/browser/createTimeseriesProperty.js.map +1 -1
  40. package/build/browser/definitions/LinkDefinitions.test.js +4 -0
  41. package/build/browser/definitions/LinkDefinitions.test.js.map +1 -1
  42. package/build/browser/fetchMetadata.js +2 -0
  43. package/build/browser/fetchMetadata.js.map +1 -1
  44. package/build/browser/fetchMetadata.test.js +5 -0
  45. package/build/browser/fetchMetadata.test.js.map +1 -1
  46. package/build/browser/index.js +1 -0
  47. package/build/browser/index.js.map +1 -1
  48. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.js +2 -0
  49. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.js.map +1 -1
  50. package/build/browser/intellisense.test.js +3 -0
  51. package/build/browser/intellisense.test.js.map +1 -1
  52. package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.js +2 -0
  53. package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.js.map +1 -1
  54. package/build/browser/internal/conversions/modernToLegacyAggregationClause.js +2 -0
  55. package/build/browser/internal/conversions/modernToLegacyAggregationClause.js.map +1 -1
  56. package/build/browser/internal/conversions/modernToLegacyGroupByClause.js +1 -0
  57. package/build/browser/internal/conversions/modernToLegacyGroupByClause.js.map +1 -1
  58. package/build/browser/internal/conversions/modernToLegacyWhereClause.js +3 -0
  59. package/build/browser/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
  60. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js +1 -0
  61. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -1
  62. package/build/browser/object/AttachmentUpload.js +1 -0
  63. package/build/browser/object/AttachmentUpload.js.map +1 -1
  64. package/build/browser/object/Cache.js +27 -0
  65. package/build/browser/object/Cache.js.map +1 -1
  66. package/build/browser/object/Cache.test.js +9 -0
  67. package/build/browser/object/Cache.test.js.map +1 -1
  68. package/build/browser/object/SimpleCache.js +20 -0
  69. package/build/browser/object/SimpleCache.js.map +1 -1
  70. package/build/browser/object/aggregate.js +3 -0
  71. package/build/browser/object/aggregate.js.map +1 -1
  72. package/build/browser/object/aggregate.test.js +5 -0
  73. package/build/browser/object/aggregate.test.js.map +1 -1
  74. package/build/browser/object/attachment.test.js +1 -0
  75. package/build/browser/object/attachment.test.js.map +1 -1
  76. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.js +0 -15
  77. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -1
  78. package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.js +4 -0
  79. package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.js.map +1 -1
  80. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.js +0 -15
  81. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.js.map +1 -1
  82. package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js +2 -0
  83. package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js.map +1 -1
  84. package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js +0 -15
  85. package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js.map +1 -1
  86. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js +1 -0
  87. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  88. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.test.js +1 -0
  89. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.test.js.map +1 -1
  90. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js +4 -0
  91. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  92. package/build/browser/object/convertWireToOsdkObjects/getDollarAs.js +6 -0
  93. package/build/browser/object/convertWireToOsdkObjects/getDollarAs.js.map +1 -1
  94. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.js +1 -0
  95. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.js.map +1 -1
  96. package/build/browser/object/convertWireToOsdkObjects.js +11 -0
  97. package/build/browser/object/convertWireToOsdkObjects.js.map +1 -1
  98. package/build/browser/object/convertWireToOsdkObjects.test.js +3 -0
  99. package/build/browser/object/convertWireToOsdkObjects.test.js.map +1 -1
  100. package/build/browser/object/fetchPage.js +7 -0
  101. package/build/browser/object/fetchPage.js.map +1 -1
  102. package/build/browser/object/fetchPage.test.js +5 -0
  103. package/build/browser/object/fetchPage.test.js.map +1 -1
  104. package/build/browser/object/fetchSingle.js +3 -0
  105. package/build/browser/object/fetchSingle.js.map +1 -1
  106. package/build/browser/object/geotimeseriesreference.test.js +2 -0
  107. package/build/browser/object/geotimeseriesreference.test.js.map +1 -1
  108. package/build/browser/object/media.test.js +1 -0
  109. package/build/browser/object/media.test.js.map +1 -1
  110. package/build/browser/object/object.test.js +8 -0
  111. package/build/browser/object/object.test.js.map +1 -1
  112. package/build/browser/object/timeseries.test.js +1 -0
  113. package/build/browser/object/timeseries.test.js.map +1 -1
  114. package/build/browser/objectSet/InterfaceObjectSet.test.js +4 -0
  115. package/build/browser/objectSet/InterfaceObjectSet.test.js.map +1 -1
  116. package/build/browser/objectSet/ObjectSet.test.js +13 -0
  117. package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
  118. package/build/browser/objectSet/ObjectSetFactory.js +0 -15
  119. package/build/browser/objectSet/ObjectSetFactory.js.map +1 -1
  120. package/build/browser/objectSet/ObjectSetListenerWebsocket.js +18 -1
  121. package/build/browser/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
  122. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js +8 -1
  123. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -1
  124. package/build/browser/objectSet/conjureUnionType.js +1 -0
  125. package/build/browser/objectSet/conjureUnionType.js.map +1 -1
  126. package/build/browser/objectSet/createObjectSet.js +5 -0
  127. package/build/browser/objectSet/createObjectSet.js.map +1 -1
  128. package/build/browser/ontology/OntologyProvider.js +1 -0
  129. package/build/browser/ontology/OntologyProvider.js.map +1 -1
  130. package/build/browser/ontology/StandardOntologyProvider.js +2 -0
  131. package/build/browser/ontology/StandardOntologyProvider.js.map +1 -1
  132. package/build/browser/ontology/StandardOntologyProvider.test.js +2 -0
  133. package/build/browser/ontology/StandardOntologyProvider.test.js.map +1 -1
  134. package/build/browser/ontology/loadActionMetadata.js +1 -0
  135. package/build/browser/ontology/loadActionMetadata.js.map +1 -1
  136. package/build/browser/ontology/loadFullObjectMetadata.js +1 -0
  137. package/build/browser/ontology/loadFullObjectMetadata.js.map +1 -1
  138. package/build/browser/ontology/loadInterfaceMetadata.js +1 -0
  139. package/build/browser/ontology/loadInterfaceMetadata.js.map +1 -1
  140. package/build/browser/ontology/loadQueryMetadata.js +1 -0
  141. package/build/browser/ontology/loadQueryMetadata.js.map +1 -1
  142. package/build/browser/ontology/makeConjureContext.js +1 -0
  143. package/build/browser/ontology/makeConjureContext.js.map +1 -1
  144. package/build/browser/pageRequestAsAsyncIter.js +1 -0
  145. package/build/browser/pageRequestAsAsyncIter.js.map +1 -1
  146. package/build/browser/public/internal.js +1 -0
  147. package/build/browser/public/internal.js.map +1 -1
  148. package/build/browser/public/unstable-do-not-use.js +1 -0
  149. package/build/browser/public/unstable-do-not-use.js.map +1 -1
  150. package/build/browser/public-utils/createAndFetchTempObjectSetRid.js +2 -0
  151. package/build/browser/public-utils/createAndFetchTempObjectSetRid.js.map +1 -1
  152. package/build/browser/public-utils/hydrateAttachmentFromRid.js +2 -0
  153. package/build/browser/public-utils/hydrateAttachmentFromRid.js.map +1 -1
  154. package/build/browser/public-utils/hydrateObjectSetFromRid.js +2 -0
  155. package/build/browser/public-utils/hydrateObjectSetFromRid.js.map +1 -1
  156. package/build/browser/queries/applyQuery.js +1 -0
  157. package/build/browser/queries/applyQuery.js.map +1 -1
  158. package/build/browser/queries/queries.test.js +2 -0
  159. package/build/browser/queries/queries.test.js.map +1 -1
  160. package/build/browser/queries/types.js +0 -15
  161. package/build/browser/queries/types.js.map +1 -1
  162. package/build/browser/tsserver.js +1 -0
  163. package/build/browser/tsserver.js.map +1 -1
  164. package/build/browser/util/ArrayElement.js +0 -15
  165. package/build/browser/util/ArrayElement.js.map +1 -1
  166. package/build/browser/util/NOOP.js +0 -15
  167. package/build/browser/util/NOOP.js.map +1 -1
  168. package/build/browser/util/NullableProps.js +0 -15
  169. package/build/browser/util/NullableProps.js.map +1 -1
  170. package/build/browser/util/UserAgent.js +2 -1
  171. package/build/browser/util/UserAgent.js.map +1 -1
  172. package/build/browser/util/WireObjectSet.js +2 -0
  173. package/build/browser/util/WireObjectSet.js.map +1 -1
  174. package/build/browser/util/addUserAgentAndRequestContextHeaders.js +1 -0
  175. package/build/browser/util/addUserAgentAndRequestContextHeaders.js.map +1 -1
  176. package/build/browser/util/augmentRequestContext.js +1 -0
  177. package/build/browser/util/augmentRequestContext.js.map +1 -1
  178. package/build/browser/util/datetimeConverters.js +5 -0
  179. package/build/browser/util/datetimeConverters.js.map +1 -1
  180. package/build/browser/util/datetimeConverters.test.js +1 -0
  181. package/build/browser/util/datetimeConverters.test.js.map +1 -1
  182. package/build/browser/util/interfaceUtils.js +21 -0
  183. package/build/browser/util/interfaceUtils.js.map +1 -0
  184. package/build/browser/util/isOntologyObjectV2.js +1 -0
  185. package/build/browser/util/isOntologyObjectV2.js.map +1 -1
  186. package/build/browser/util/isOsdkBaseObject.js +1 -0
  187. package/build/browser/util/isOsdkBaseObject.js.map +1 -1
  188. package/build/browser/util/isOsdkObject.js +1 -0
  189. package/build/browser/util/isOsdkObject.js.map +1 -1
  190. package/build/browser/util/objectSetUtils.js +1 -0
  191. package/build/browser/util/objectSetUtils.js.map +1 -1
  192. package/build/browser/util/partialBy.js +0 -15
  193. package/build/browser/util/partialBy.js.map +1 -1
  194. package/build/browser/util/streamutils.js +7 -0
  195. package/build/browser/util/streamutils.js.map +1 -1
  196. package/build/browser/util/timeseriesUtils.js +1 -0
  197. package/build/browser/util/timeseriesUtils.js.map +1 -1
  198. package/build/browser/util/toDataValue.js +17 -1
  199. package/build/browser/util/toDataValue.js.map +1 -1
  200. package/build/browser/util/toDataValue.test.js +1 -0
  201. package/build/browser/util/toDataValue.test.js.map +1 -1
  202. package/build/browser/util/toDataValueQueries.js +3 -0
  203. package/build/browser/util/toDataValueQueries.js.map +1 -1
  204. package/build/cjs/Client-BZcoRu7n.d.cts +67 -0
  205. package/build/cjs/chunk-Q4BVHDNO.cjs +460 -0
  206. package/build/cjs/chunk-Q4BVHDNO.cjs.map +1 -0
  207. package/build/cjs/chunk-RWHJNRHF.cjs +887 -0
  208. package/build/cjs/chunk-RWHJNRHF.cjs.map +1 -0
  209. package/build/cjs/index.cjs +1628 -0
  210. package/build/cjs/index.cjs.map +1 -0
  211. package/build/cjs/index.d.cts +85 -0
  212. package/build/cjs/public/internal.cjs +35 -0
  213. package/build/cjs/public/internal.cjs.map +1 -0
  214. package/build/cjs/public/internal.d.cts +33 -0
  215. package/build/cjs/public/unstable-do-not-use.cjs +12 -0
  216. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -0
  217. package/build/cjs/public/unstable-do-not-use.d.cts +5 -0
  218. package/build/esm/Client.js +6 -0
  219. package/build/esm/Client.js.map +1 -1
  220. package/build/esm/Definitions.test.js +1 -0
  221. package/build/esm/Definitions.test.js.map +1 -1
  222. package/build/esm/Logger.js +0 -15
  223. package/build/esm/Logger.js.map +1 -1
  224. package/build/esm/MinimalClientContext.js +0 -15
  225. package/build/esm/MinimalClientContext.js.map +1 -1
  226. package/build/esm/ResultOrError.js +1 -0
  227. package/build/esm/ResultOrError.js.map +1 -1
  228. package/build/esm/SatisfiesSemver.js +0 -15
  229. package/build/esm/SatisfiesSemver.js.map +1 -1
  230. package/build/esm/SatisfiesSemver.test.js +1 -0
  231. package/build/esm/SatisfiesSemver.test.js.map +1 -1
  232. package/build/esm/__unstable/ConjureSupport.js +3 -0
  233. package/build/esm/__unstable/ConjureSupport.js.map +1 -1
  234. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.js +4 -0
  235. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.js.map +1 -1
  236. package/build/esm/actions/ActionValidationError.js +1 -1
  237. package/build/esm/actions/ActionValidationError.js.map +1 -1
  238. package/build/esm/actions/actions.test.js +30 -2
  239. package/build/esm/actions/actions.test.js.map +1 -1
  240. package/build/esm/actions/applyAction.js +1 -0
  241. package/build/esm/actions/applyAction.js.map +1 -1
  242. package/build/esm/createClient.js +10 -5
  243. package/build/esm/createClient.js.map +1 -1
  244. package/build/esm/createClient.test.js +1 -0
  245. package/build/esm/createClient.test.js.map +1 -1
  246. package/build/esm/createGeotimeSeriesProperty.js +1 -1
  247. package/build/esm/createGeotimeSeriesProperty.js.map +1 -1
  248. package/build/esm/createMediaReferenceProperty.js +1 -0
  249. package/build/esm/createMediaReferenceProperty.js.map +1 -1
  250. package/build/esm/createMinimalClient.js +2 -0
  251. package/build/esm/createMinimalClient.js.map +1 -1
  252. package/build/esm/createPlatformClient.js +1 -0
  253. package/build/esm/createPlatformClient.js.map +1 -1
  254. package/build/esm/createTimeseriesProperty.js +1 -0
  255. package/build/esm/createTimeseriesProperty.js.map +1 -1
  256. package/build/esm/definitions/LinkDefinitions.test.js +4 -0
  257. package/build/esm/definitions/LinkDefinitions.test.js.map +1 -1
  258. package/build/esm/fetchMetadata.js +2 -0
  259. package/build/esm/fetchMetadata.js.map +1 -1
  260. package/build/esm/fetchMetadata.test.js +5 -0
  261. package/build/esm/fetchMetadata.test.js.map +1 -1
  262. package/build/esm/index.js +1 -0
  263. package/build/esm/index.js.map +1 -1
  264. package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.js +2 -0
  265. package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.js.map +1 -1
  266. package/build/esm/intellisense.test.js +3 -0
  267. package/build/esm/intellisense.test.js.map +1 -1
  268. package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.js +2 -0
  269. package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.js.map +1 -1
  270. package/build/esm/internal/conversions/modernToLegacyAggregationClause.js +2 -0
  271. package/build/esm/internal/conversions/modernToLegacyAggregationClause.js.map +1 -1
  272. package/build/esm/internal/conversions/modernToLegacyGroupByClause.js +1 -0
  273. package/build/esm/internal/conversions/modernToLegacyGroupByClause.js.map +1 -1
  274. package/build/esm/internal/conversions/modernToLegacyWhereClause.js +3 -0
  275. package/build/esm/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
  276. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js +1 -0
  277. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -1
  278. package/build/esm/object/AttachmentUpload.js +1 -0
  279. package/build/esm/object/AttachmentUpload.js.map +1 -1
  280. package/build/esm/object/Cache.js +27 -0
  281. package/build/esm/object/Cache.js.map +1 -1
  282. package/build/esm/object/Cache.test.js +9 -0
  283. package/build/esm/object/Cache.test.js.map +1 -1
  284. package/build/esm/object/SimpleCache.js +20 -0
  285. package/build/esm/object/SimpleCache.js.map +1 -1
  286. package/build/esm/object/aggregate.js +3 -0
  287. package/build/esm/object/aggregate.js.map +1 -1
  288. package/build/esm/object/aggregate.test.js +5 -0
  289. package/build/esm/object/aggregate.test.js.map +1 -1
  290. package/build/esm/object/attachment.test.js +1 -0
  291. package/build/esm/object/attachment.test.js.map +1 -1
  292. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js +0 -15
  293. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -1
  294. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.js +4 -0
  295. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.js.map +1 -1
  296. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.js +0 -15
  297. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.js.map +1 -1
  298. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js +2 -0
  299. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js.map +1 -1
  300. package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js +0 -15
  301. package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js.map +1 -1
  302. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js +1 -0
  303. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  304. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.test.js +1 -0
  305. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.test.js.map +1 -1
  306. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js +4 -0
  307. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  308. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.js +6 -0
  309. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.js.map +1 -1
  310. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.js +1 -0
  311. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.js.map +1 -1
  312. package/build/esm/object/convertWireToOsdkObjects.js +11 -0
  313. package/build/esm/object/convertWireToOsdkObjects.js.map +1 -1
  314. package/build/esm/object/convertWireToOsdkObjects.test.js +3 -0
  315. package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -1
  316. package/build/esm/object/fetchPage.js +7 -0
  317. package/build/esm/object/fetchPage.js.map +1 -1
  318. package/build/esm/object/fetchPage.test.js +5 -0
  319. package/build/esm/object/fetchPage.test.js.map +1 -1
  320. package/build/esm/object/fetchSingle.js +3 -0
  321. package/build/esm/object/fetchSingle.js.map +1 -1
  322. package/build/esm/object/geotimeseriesreference.test.js +2 -0
  323. package/build/esm/object/geotimeseriesreference.test.js.map +1 -1
  324. package/build/esm/object/media.test.js +1 -0
  325. package/build/esm/object/media.test.js.map +1 -1
  326. package/build/esm/object/object.test.js +8 -0
  327. package/build/esm/object/object.test.js.map +1 -1
  328. package/build/esm/object/timeseries.test.js +1 -0
  329. package/build/esm/object/timeseries.test.js.map +1 -1
  330. package/build/esm/objectSet/InterfaceObjectSet.test.js +4 -0
  331. package/build/esm/objectSet/InterfaceObjectSet.test.js.map +1 -1
  332. package/build/esm/objectSet/ObjectSet.test.js +13 -0
  333. package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
  334. package/build/esm/objectSet/ObjectSetFactory.js +0 -15
  335. package/build/esm/objectSet/ObjectSetFactory.js.map +1 -1
  336. package/build/esm/objectSet/ObjectSetListenerWebsocket.js +18 -1
  337. package/build/esm/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
  338. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js +8 -1
  339. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -1
  340. package/build/esm/objectSet/conjureUnionType.js +1 -0
  341. package/build/esm/objectSet/conjureUnionType.js.map +1 -1
  342. package/build/esm/objectSet/createObjectSet.js +5 -0
  343. package/build/esm/objectSet/createObjectSet.js.map +1 -1
  344. package/build/esm/ontology/OntologyProvider.js +1 -0
  345. package/build/esm/ontology/OntologyProvider.js.map +1 -1
  346. package/build/esm/ontology/StandardOntologyProvider.js +2 -0
  347. package/build/esm/ontology/StandardOntologyProvider.js.map +1 -1
  348. package/build/esm/ontology/StandardOntologyProvider.test.js +2 -0
  349. package/build/esm/ontology/StandardOntologyProvider.test.js.map +1 -1
  350. package/build/esm/ontology/loadActionMetadata.js +1 -0
  351. package/build/esm/ontology/loadActionMetadata.js.map +1 -1
  352. package/build/esm/ontology/loadFullObjectMetadata.js +1 -0
  353. package/build/esm/ontology/loadFullObjectMetadata.js.map +1 -1
  354. package/build/esm/ontology/loadInterfaceMetadata.js +1 -0
  355. package/build/esm/ontology/loadInterfaceMetadata.js.map +1 -1
  356. package/build/esm/ontology/loadQueryMetadata.js +1 -0
  357. package/build/esm/ontology/loadQueryMetadata.js.map +1 -1
  358. package/build/esm/ontology/makeConjureContext.js +1 -0
  359. package/build/esm/ontology/makeConjureContext.js.map +1 -1
  360. package/build/esm/pageRequestAsAsyncIter.js +1 -0
  361. package/build/esm/pageRequestAsAsyncIter.js.map +1 -1
  362. package/build/esm/public/internal.js +1 -0
  363. package/build/esm/public/internal.js.map +1 -1
  364. package/build/esm/public/unstable-do-not-use.js +1 -0
  365. package/build/esm/public/unstable-do-not-use.js.map +1 -1
  366. package/build/esm/public-utils/createAndFetchTempObjectSetRid.js +2 -0
  367. package/build/esm/public-utils/createAndFetchTempObjectSetRid.js.map +1 -1
  368. package/build/esm/public-utils/hydrateAttachmentFromRid.js +2 -0
  369. package/build/esm/public-utils/hydrateAttachmentFromRid.js.map +1 -1
  370. package/build/esm/public-utils/hydrateObjectSetFromRid.js +2 -0
  371. package/build/esm/public-utils/hydrateObjectSetFromRid.js.map +1 -1
  372. package/build/esm/queries/applyQuery.js +1 -0
  373. package/build/esm/queries/applyQuery.js.map +1 -1
  374. package/build/esm/queries/queries.test.js +2 -0
  375. package/build/esm/queries/queries.test.js.map +1 -1
  376. package/build/esm/queries/types.js +0 -15
  377. package/build/esm/queries/types.js.map +1 -1
  378. package/build/esm/tsserver.js +1 -0
  379. package/build/esm/tsserver.js.map +1 -1
  380. package/build/esm/util/ArrayElement.js +0 -15
  381. package/build/esm/util/ArrayElement.js.map +1 -1
  382. package/build/esm/util/NOOP.js +0 -15
  383. package/build/esm/util/NOOP.js.map +1 -1
  384. package/build/esm/util/NullableProps.js +0 -15
  385. package/build/esm/util/NullableProps.js.map +1 -1
  386. package/build/esm/util/UserAgent.js +2 -1
  387. package/build/esm/util/UserAgent.js.map +1 -1
  388. package/build/esm/util/WireObjectSet.js +2 -0
  389. package/build/esm/util/WireObjectSet.js.map +1 -1
  390. package/build/esm/util/addUserAgentAndRequestContextHeaders.js +1 -0
  391. package/build/esm/util/addUserAgentAndRequestContextHeaders.js.map +1 -1
  392. package/build/esm/util/augmentRequestContext.js +1 -0
  393. package/build/esm/util/augmentRequestContext.js.map +1 -1
  394. package/build/esm/util/datetimeConverters.js +5 -0
  395. package/build/esm/util/datetimeConverters.js.map +1 -1
  396. package/build/esm/util/datetimeConverters.test.js +1 -0
  397. package/build/esm/util/datetimeConverters.test.js.map +1 -1
  398. package/build/esm/util/interfaceUtils.js +21 -0
  399. package/build/esm/util/interfaceUtils.js.map +1 -0
  400. package/build/esm/util/isOntologyObjectV2.js +1 -0
  401. package/build/esm/util/isOntologyObjectV2.js.map +1 -1
  402. package/build/esm/util/isOsdkBaseObject.js +1 -0
  403. package/build/esm/util/isOsdkBaseObject.js.map +1 -1
  404. package/build/esm/util/isOsdkObject.js +1 -0
  405. package/build/esm/util/isOsdkObject.js.map +1 -1
  406. package/build/esm/util/objectSetUtils.js +1 -0
  407. package/build/esm/util/objectSetUtils.js.map +1 -1
  408. package/build/esm/util/partialBy.js +0 -15
  409. package/build/esm/util/partialBy.js.map +1 -1
  410. package/build/esm/util/streamutils.js +7 -0
  411. package/build/esm/util/streamutils.js.map +1 -1
  412. package/build/esm/util/timeseriesUtils.js +1 -0
  413. package/build/esm/util/timeseriesUtils.js.map +1 -1
  414. package/build/esm/util/toDataValue.js +17 -1
  415. package/build/esm/util/toDataValue.js.map +1 -1
  416. package/build/esm/util/toDataValue.test.js +1 -0
  417. package/build/esm/util/toDataValue.test.js.map +1 -1
  418. package/build/esm/util/toDataValueQueries.js +3 -0
  419. package/build/esm/util/toDataValueQueries.js.map +1 -1
  420. package/build/types/Client.d.ts +20 -0
  421. package/build/types/Definitions.test.d.ts +1 -0
  422. package/build/types/Logger.d.ts +18 -0
  423. package/build/types/MinimalClientContext.d.ts +21 -0
  424. package/build/types/ResultOrError.d.ts +9 -0
  425. package/build/types/SatisfiesSemver.d.ts +10 -0
  426. package/build/types/SatisfiesSemver.test.d.ts +1 -0
  427. package/build/types/__unstable/ConjureSupport.d.ts +37 -0
  428. package/build/{browser → types}/__unstable/createBulkLinksAsyncIterFactory.d.ts +0 -1
  429. package/build/types/actions/ActionValidationError.d.ts +5 -0
  430. package/build/types/actions/actions.test.d.ts +1 -0
  431. package/build/{esm → types}/actions/applyAction.d.ts +16 -15
  432. package/build/{browser → types}/createClient.d.ts +1 -4
  433. package/build/types/createClient.test.d.ts +1 -0
  434. package/build/types/createGeotimeSeriesProperty.d.ts +13 -0
  435. package/build/types/createMediaReferenceProperty.d.ts +13 -0
  436. package/build/types/createMinimalClient.d.ts +1 -0
  437. package/build/types/createPlatformClient.d.ts +15 -0
  438. package/build/types/createTimeseriesProperty.d.ts +13 -0
  439. package/build/types/definitions/LinkDefinitions.test.d.ts +1 -0
  440. package/build/types/fetchMetadata.d.ts +1 -0
  441. package/build/types/fetchMetadata.test.d.ts +1 -0
  442. package/build/types/index.d.ts +12 -0
  443. package/build/types/intellisense.test.d.ts +1 -0
  444. package/build/types/intellisense.test.helpers/callsQueryAcceptsObject.d.ts +1 -0
  445. package/build/types/internal/conversions/legacyToModernSingleAggregationResult.d.ts +1 -0
  446. package/build/types/internal/conversions/modernToLegacyAggregationClause.d.ts +1 -0
  447. package/build/types/internal/conversions/modernToLegacyGroupByClause.d.ts +1 -0
  448. package/build/{browser → types}/internal/conversions/modernToLegacyWhereClause.d.ts +0 -1
  449. package/build/types/internal/conversions/modernToLegacyWhereClause.test.d.ts +1 -0
  450. package/build/{browser → types}/object/AttachmentUpload.d.ts +0 -1
  451. package/build/types/object/Cache.d.ts +17 -0
  452. package/build/types/object/Cache.test.d.ts +8 -0
  453. package/build/types/object/SimpleCache.d.ts +52 -0
  454. package/build/types/object/aggregate.d.ts +1 -0
  455. package/build/types/object/aggregate.test.d.ts +1 -0
  456. package/build/types/object/attachment.test.d.ts +1 -0
  457. package/build/types/object/convertWireToOsdkObjects/InterfaceHolder.d.ts +1 -0
  458. package/build/{browser → types}/object/convertWireToOsdkObjects/InternalSymbols.d.ts +3 -4
  459. package/build/types/object/convertWireToOsdkObjects/ObjectHolder.d.ts +1 -0
  460. package/build/{esm → types}/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts +8 -11
  461. package/build/types/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts +5 -0
  462. package/build/types/object/convertWireToOsdkObjects/createOsdkInterface.d.ts +1 -0
  463. package/build/types/object/convertWireToOsdkObjects/createOsdkInterface.test.d.ts +1 -0
  464. package/build/types/object/convertWireToOsdkObjects/createOsdkObject.d.ts +1 -0
  465. package/build/{browser → types}/object/convertWireToOsdkObjects/getDollarAs.d.ts +0 -1
  466. package/build/types/object/convertWireToOsdkObjects/getDollarLink.d.ts +1 -0
  467. package/build/types/object/convertWireToOsdkObjects.d.ts +1 -0
  468. package/build/types/object/convertWireToOsdkObjects.test.d.ts +1 -0
  469. package/build/types/object/fetchPage.d.ts +5 -0
  470. package/build/types/object/fetchPage.test.d.ts +1 -0
  471. package/build/types/object/fetchSingle.d.ts +1 -0
  472. package/build/types/object/geotimeseriesreference.test.d.ts +1 -0
  473. package/build/types/object/media.test.d.ts +1 -0
  474. package/build/{esm → types}/object/object.test.d.ts +0 -1
  475. package/build/types/object/timeseries.test.d.ts +1 -0
  476. package/build/types/objectSet/InterfaceObjectSet.test.d.ts +1 -0
  477. package/build/types/objectSet/ObjectSet.test.d.ts +7 -0
  478. package/build/types/objectSet/ObjectSetFactory.d.ts +1 -0
  479. package/build/types/objectSet/ObjectSetListenerWebsocket.d.ts +1 -0
  480. package/build/types/objectSet/ObjectSetListenerWebsocket.test.d.ts +1 -0
  481. package/build/types/objectSet/conjureUnionType.d.ts +11 -0
  482. package/build/types/objectSet/createObjectSet.d.ts +1 -0
  483. package/build/types/ontology/OntologyProvider.d.ts +27 -0
  484. package/build/{browser → types}/ontology/StandardOntologyProvider.d.ts +1 -3
  485. package/build/types/ontology/StandardOntologyProvider.test.d.ts +1 -0
  486. package/build/{browser → types}/ontology/loadActionMetadata.d.ts +0 -1
  487. package/build/{esm → types}/ontology/loadFullObjectMetadata.d.ts +1 -4
  488. package/build/{esm → types}/ontology/loadInterfaceMetadata.d.ts +0 -1
  489. package/build/{browser → types}/ontology/loadQueryMetadata.d.ts +0 -1
  490. package/build/{browser → types}/ontology/makeConjureContext.d.ts +0 -1
  491. package/build/types/pageRequestAsAsyncIter.d.ts +10 -0
  492. package/build/{browser → types}/public/internal.d.ts +0 -1
  493. package/build/{browser → types}/public/unstable-do-not-use.d.ts +0 -1
  494. package/build/{esm → types}/public-utils/createAndFetchTempObjectSetRid.d.ts +6 -7
  495. package/build/types/public-utils/hydrateAttachmentFromRid.d.ts +9 -0
  496. package/build/types/public-utils/hydrateObjectSetFromRid.d.ts +10 -0
  497. package/build/{browser → types}/queries/applyQuery.d.ts +4 -2
  498. package/build/types/queries/queries.test.d.ts +1 -0
  499. package/build/{esm → types}/queries/types.d.ts +3 -12
  500. package/build/{browser → types}/tsserver.d.ts +18 -18
  501. package/build/{browser → types}/util/ArrayElement.d.ts +0 -1
  502. package/build/types/util/NOOP.d.ts +1 -0
  503. package/build/types/util/NullableProps.d.ts +1 -0
  504. package/build/{browser → types}/util/UserAgent.d.ts +0 -1
  505. package/build/types/util/WireObjectSet.d.ts +1 -0
  506. package/build/{esm → types}/util/addUserAgentAndRequestContextHeaders.d.ts +0 -1
  507. package/build/{browser → types}/util/augmentRequestContext.d.ts +6 -7
  508. package/build/types/util/datetimeConverters.d.ts +21 -0
  509. package/build/types/util/datetimeConverters.test.d.ts +1 -0
  510. package/build/types/util/interfaceUtils.d.ts +1 -0
  511. package/build/types/util/isOntologyObjectV2.d.ts +1 -0
  512. package/build/{esm/util/isOsdkObject.d.ts → types/util/isOsdkBaseObject.d.ts} +0 -1
  513. package/build/{browser → types}/util/isOsdkObject.d.ts +0 -1
  514. package/build/{browser → types}/util/objectSetUtils.d.ts +0 -1
  515. package/build/types/util/partialBy.d.ts +8 -0
  516. package/build/{browser → types}/util/streamutils.d.ts +0 -1
  517. package/build/{browser → types}/util/timeseriesUtils.d.ts +2 -3
  518. package/build/types/util/toDataValue.d.ts +1 -0
  519. package/build/types/util/toDataValue.test.d.ts +1 -0
  520. package/build/types/util/toDataValueQueries.d.ts +1 -0
  521. package/index.d.ts +17 -0
  522. package/internal.d.ts +17 -0
  523. package/package.json +47 -16
  524. package/unstable-do-not-use.d.ts +1 -1
  525. package/build/browser/Client.d.ts +0 -23
  526. package/build/browser/Client.d.ts.map +0 -1
  527. package/build/browser/Definitions.test.d.ts +0 -2
  528. package/build/browser/Definitions.test.d.ts.map +0 -1
  529. package/build/browser/Logger.d.ts +0 -19
  530. package/build/browser/Logger.d.ts.map +0 -1
  531. package/build/browser/MinimalClientContext.d.ts +0 -26
  532. package/build/browser/MinimalClientContext.d.ts.map +0 -1
  533. package/build/browser/ResultOrError.d.ts +0 -12
  534. package/build/browser/ResultOrError.d.ts.map +0 -1
  535. package/build/browser/SatisfiesSemver.d.ts +0 -4
  536. package/build/browser/SatisfiesSemver.d.ts.map +0 -1
  537. package/build/browser/SatisfiesSemver.test.d.ts +0 -2
  538. package/build/browser/SatisfiesSemver.test.d.ts.map +0 -1
  539. package/build/browser/__unstable/ConjureSupport.d.ts +0 -38
  540. package/build/browser/__unstable/ConjureSupport.d.ts.map +0 -1
  541. package/build/browser/__unstable/createBulkLinksAsyncIterFactory.d.ts.map +0 -1
  542. package/build/browser/actions/ActionValidationError.d.ts +0 -6
  543. package/build/browser/actions/ActionValidationError.d.ts.map +0 -1
  544. package/build/browser/actions/actions.test.d.ts +0 -2
  545. package/build/browser/actions/actions.test.d.ts.map +0 -1
  546. package/build/browser/actions/applyAction.d.ts +0 -30
  547. package/build/browser/actions/applyAction.d.ts.map +0 -1
  548. package/build/browser/createClient.d.ts.map +0 -1
  549. package/build/browser/createClient.test.d.ts +0 -2
  550. package/build/browser/createClient.test.d.ts.map +0 -1
  551. package/build/browser/createGeotimeSeriesProperty.d.ts +0 -14
  552. package/build/browser/createGeotimeSeriesProperty.d.ts.map +0 -1
  553. package/build/browser/createMediaReferenceProperty.d.ts +0 -14
  554. package/build/browser/createMediaReferenceProperty.d.ts.map +0 -1
  555. package/build/browser/createMinimalClient.d.ts +0 -2
  556. package/build/browser/createMinimalClient.d.ts.map +0 -1
  557. package/build/browser/createPlatformClient.d.ts +0 -17
  558. package/build/browser/createPlatformClient.d.ts.map +0 -1
  559. package/build/browser/createTimeseriesProperty.d.ts +0 -14
  560. package/build/browser/createTimeseriesProperty.d.ts.map +0 -1
  561. package/build/browser/definitions/LinkDefinitions.test.d.ts +0 -2
  562. package/build/browser/definitions/LinkDefinitions.test.d.ts.map +0 -1
  563. package/build/browser/fetchMetadata.d.ts +0 -2
  564. package/build/browser/fetchMetadata.d.ts.map +0 -1
  565. package/build/browser/fetchMetadata.test.d.ts +0 -2
  566. package/build/browser/fetchMetadata.test.d.ts.map +0 -1
  567. package/build/browser/index.d.ts +0 -13
  568. package/build/browser/index.d.ts.map +0 -1
  569. package/build/browser/intellisense.test.d.ts +0 -2
  570. package/build/browser/intellisense.test.d.ts.map +0 -1
  571. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.d.ts +0 -2
  572. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.d.ts.map +0 -1
  573. package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.d.ts +0 -2
  574. package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.d.ts.map +0 -1
  575. package/build/browser/internal/conversions/modernToLegacyAggregationClause.d.ts +0 -2
  576. package/build/browser/internal/conversions/modernToLegacyAggregationClause.d.ts.map +0 -1
  577. package/build/browser/internal/conversions/modernToLegacyGroupByClause.d.ts +0 -2
  578. package/build/browser/internal/conversions/modernToLegacyGroupByClause.d.ts.map +0 -1
  579. package/build/browser/internal/conversions/modernToLegacyWhereClause.d.ts.map +0 -1
  580. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.d.ts +0 -2
  581. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.d.ts.map +0 -1
  582. package/build/browser/object/AttachmentUpload.d.ts.map +0 -1
  583. package/build/browser/object/Cache.d.ts +0 -2
  584. package/build/browser/object/Cache.d.ts.map +0 -1
  585. package/build/browser/object/Cache.test.d.ts +0 -11
  586. package/build/browser/object/Cache.test.d.ts.map +0 -1
  587. package/build/browser/object/SimpleCache.d.ts +0 -38
  588. package/build/browser/object/SimpleCache.d.ts.map +0 -1
  589. package/build/browser/object/aggregate.d.ts +0 -2
  590. package/build/browser/object/aggregate.d.ts.map +0 -1
  591. package/build/browser/object/aggregate.test.d.ts +0 -2
  592. package/build/browser/object/aggregate.test.d.ts.map +0 -1
  593. package/build/browser/object/attachment.test.d.ts +0 -2
  594. package/build/browser/object/attachment.test.d.ts.map +0 -1
  595. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.d.ts +0 -2
  596. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.d.ts.map +0 -1
  597. package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.d.ts.map +0 -1
  598. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.d.ts +0 -2
  599. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.d.ts.map +0 -1
  600. package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts +0 -18
  601. package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts.map +0 -1
  602. package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts +0 -8
  603. package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts.map +0 -1
  604. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.d.ts +0 -2
  605. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.d.ts.map +0 -1
  606. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.test.d.ts +0 -2
  607. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.test.d.ts.map +0 -1
  608. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.d.ts +0 -2
  609. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.d.ts.map +0 -1
  610. package/build/browser/object/convertWireToOsdkObjects/getDollarAs.d.ts.map +0 -1
  611. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.d.ts +0 -2
  612. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.d.ts.map +0 -1
  613. package/build/browser/object/convertWireToOsdkObjects.d.ts +0 -2
  614. package/build/browser/object/convertWireToOsdkObjects.d.ts.map +0 -1
  615. package/build/browser/object/convertWireToOsdkObjects.test.d.ts +0 -2
  616. package/build/browser/object/convertWireToOsdkObjects.test.d.ts.map +0 -1
  617. package/build/browser/object/fetchPage.d.ts +0 -3
  618. package/build/browser/object/fetchPage.d.ts.map +0 -1
  619. package/build/browser/object/fetchPage.test.d.ts +0 -2
  620. package/build/browser/object/fetchPage.test.d.ts.map +0 -1
  621. package/build/browser/object/fetchSingle.d.ts +0 -2
  622. package/build/browser/object/fetchSingle.d.ts.map +0 -1
  623. package/build/browser/object/geotimeseriesreference.test.d.ts +0 -2
  624. package/build/browser/object/geotimeseriesreference.test.d.ts.map +0 -1
  625. package/build/browser/object/media.test.d.ts +0 -2
  626. package/build/browser/object/media.test.d.ts.map +0 -1
  627. package/build/browser/object/object.test.d.ts +0 -12
  628. package/build/browser/object/object.test.d.ts.map +0 -1
  629. package/build/browser/object/timeseries.test.d.ts +0 -2
  630. package/build/browser/object/timeseries.test.d.ts.map +0 -1
  631. package/build/browser/objectSet/InterfaceObjectSet.test.d.ts +0 -2
  632. package/build/browser/objectSet/InterfaceObjectSet.test.d.ts.map +0 -1
  633. package/build/browser/objectSet/ObjectSet.test.d.ts +0 -2
  634. package/build/browser/objectSet/ObjectSet.test.d.ts.map +0 -1
  635. package/build/browser/objectSet/ObjectSetFactory.d.ts +0 -2
  636. package/build/browser/objectSet/ObjectSetFactory.d.ts.map +0 -1
  637. package/build/browser/objectSet/ObjectSetListenerWebsocket.d.ts +0 -2
  638. package/build/browser/objectSet/ObjectSetListenerWebsocket.d.ts.map +0 -1
  639. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.d.ts +0 -2
  640. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.d.ts.map +0 -1
  641. package/build/browser/objectSet/conjureUnionType.d.ts +0 -13
  642. package/build/browser/objectSet/conjureUnionType.d.ts.map +0 -1
  643. package/build/browser/objectSet/createObjectSet.d.ts +0 -2
  644. package/build/browser/objectSet/createObjectSet.d.ts.map +0 -1
  645. package/build/browser/ontology/OntologyProvider.d.ts +0 -32
  646. package/build/browser/ontology/OntologyProvider.d.ts.map +0 -1
  647. package/build/browser/ontology/StandardOntologyProvider.d.ts.map +0 -1
  648. package/build/browser/ontology/StandardOntologyProvider.test.d.ts +0 -2
  649. package/build/browser/ontology/StandardOntologyProvider.test.d.ts.map +0 -1
  650. package/build/browser/ontology/loadActionMetadata.d.ts.map +0 -1
  651. package/build/browser/ontology/loadFullObjectMetadata.d.ts +0 -6
  652. package/build/browser/ontology/loadFullObjectMetadata.d.ts.map +0 -1
  653. package/build/browser/ontology/loadInterfaceMetadata.d.ts +0 -4
  654. package/build/browser/ontology/loadInterfaceMetadata.d.ts.map +0 -1
  655. package/build/browser/ontology/loadQueryMetadata.d.ts.map +0 -1
  656. package/build/browser/ontology/makeConjureContext.d.ts.map +0 -1
  657. package/build/browser/pageRequestAsAsyncIter.d.ts +0 -10
  658. package/build/browser/pageRequestAsAsyncIter.d.ts.map +0 -1
  659. package/build/browser/public/internal.d.ts.map +0 -1
  660. package/build/browser/public/unstable-do-not-use.d.ts.map +0 -1
  661. package/build/browser/public-utils/createAndFetchTempObjectSetRid.d.ts +0 -11
  662. package/build/browser/public-utils/createAndFetchTempObjectSetRid.d.ts.map +0 -1
  663. package/build/browser/public-utils/hydrateAttachmentFromRid.d.ts +0 -10
  664. package/build/browser/public-utils/hydrateAttachmentFromRid.d.ts.map +0 -1
  665. package/build/browser/public-utils/hydrateObjectSetFromRid.d.ts +0 -11
  666. package/build/browser/public-utils/hydrateObjectSetFromRid.d.ts.map +0 -1
  667. package/build/browser/queries/applyQuery.d.ts.map +0 -1
  668. package/build/browser/queries/queries.test.d.ts +0 -2
  669. package/build/browser/queries/queries.test.d.ts.map +0 -1
  670. package/build/browser/queries/types.d.ts +0 -20
  671. package/build/browser/queries/types.d.ts.map +0 -1
  672. package/build/browser/tsserver.d.ts.map +0 -1
  673. package/build/browser/util/ArrayElement.d.ts.map +0 -1
  674. package/build/browser/util/NOOP.d.ts +0 -4
  675. package/build/browser/util/NOOP.d.ts.map +0 -1
  676. package/build/browser/util/NullableProps.d.ts +0 -6
  677. package/build/browser/util/NullableProps.d.ts.map +0 -1
  678. package/build/browser/util/UserAgent.d.ts.map +0 -1
  679. package/build/browser/util/WireObjectSet.d.ts +0 -2
  680. package/build/browser/util/WireObjectSet.d.ts.map +0 -1
  681. package/build/browser/util/addUserAgentAndRequestContextHeaders.d.ts +0 -4
  682. package/build/browser/util/addUserAgentAndRequestContextHeaders.d.ts.map +0 -1
  683. package/build/browser/util/augmentRequestContext.d.ts.map +0 -1
  684. package/build/browser/util/datetimeConverters.d.ts +0 -22
  685. package/build/browser/util/datetimeConverters.d.ts.map +0 -1
  686. package/build/browser/util/datetimeConverters.test.d.ts +0 -2
  687. package/build/browser/util/datetimeConverters.test.d.ts.map +0 -1
  688. package/build/browser/util/isOntologyObjectV2.d.ts +0 -2
  689. package/build/browser/util/isOntologyObjectV2.d.ts.map +0 -1
  690. package/build/browser/util/isOsdkBaseObject.d.ts +0 -3
  691. package/build/browser/util/isOsdkBaseObject.d.ts.map +0 -1
  692. package/build/browser/util/isOsdkObject.d.ts.map +0 -1
  693. package/build/browser/util/objectSetUtils.d.ts.map +0 -1
  694. package/build/browser/util/partialBy.d.ts +0 -3
  695. package/build/browser/util/partialBy.d.ts.map +0 -1
  696. package/build/browser/util/streamutils.d.ts.map +0 -1
  697. package/build/browser/util/timeseriesUtils.d.ts.map +0 -1
  698. package/build/browser/util/toDataValue.d.ts +0 -2
  699. package/build/browser/util/toDataValue.d.ts.map +0 -1
  700. package/build/browser/util/toDataValue.test.d.ts +0 -2
  701. package/build/browser/util/toDataValue.test.d.ts.map +0 -1
  702. package/build/browser/util/toDataValueQueries.d.ts +0 -2
  703. package/build/browser/util/toDataValueQueries.d.ts.map +0 -1
  704. package/build/esm/Client.d.ts +0 -23
  705. package/build/esm/Client.d.ts.map +0 -1
  706. package/build/esm/Definitions.test.d.ts +0 -2
  707. package/build/esm/Definitions.test.d.ts.map +0 -1
  708. package/build/esm/Logger.d.ts +0 -19
  709. package/build/esm/Logger.d.ts.map +0 -1
  710. package/build/esm/MinimalClientContext.d.ts +0 -26
  711. package/build/esm/MinimalClientContext.d.ts.map +0 -1
  712. package/build/esm/ResultOrError.d.ts +0 -12
  713. package/build/esm/ResultOrError.d.ts.map +0 -1
  714. package/build/esm/SatisfiesSemver.d.ts +0 -4
  715. package/build/esm/SatisfiesSemver.d.ts.map +0 -1
  716. package/build/esm/SatisfiesSemver.test.d.ts +0 -2
  717. package/build/esm/SatisfiesSemver.test.d.ts.map +0 -1
  718. package/build/esm/__unstable/ConjureSupport.d.ts +0 -38
  719. package/build/esm/__unstable/ConjureSupport.d.ts.map +0 -1
  720. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.d.ts +0 -5
  721. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.d.ts.map +0 -1
  722. package/build/esm/actions/ActionValidationError.d.ts +0 -6
  723. package/build/esm/actions/ActionValidationError.d.ts.map +0 -1
  724. package/build/esm/actions/actions.test.d.ts +0 -2
  725. package/build/esm/actions/actions.test.d.ts.map +0 -1
  726. package/build/esm/actions/applyAction.d.ts.map +0 -1
  727. package/build/esm/createClient.d.ts +0 -6
  728. package/build/esm/createClient.d.ts.map +0 -1
  729. package/build/esm/createClient.test.d.ts +0 -2
  730. package/build/esm/createClient.test.d.ts.map +0 -1
  731. package/build/esm/createGeotimeSeriesProperty.d.ts +0 -14
  732. package/build/esm/createGeotimeSeriesProperty.d.ts.map +0 -1
  733. package/build/esm/createMediaReferenceProperty.d.ts +0 -14
  734. package/build/esm/createMediaReferenceProperty.d.ts.map +0 -1
  735. package/build/esm/createMinimalClient.d.ts +0 -2
  736. package/build/esm/createMinimalClient.d.ts.map +0 -1
  737. package/build/esm/createPlatformClient.d.ts +0 -17
  738. package/build/esm/createPlatformClient.d.ts.map +0 -1
  739. package/build/esm/createTimeseriesProperty.d.ts +0 -14
  740. package/build/esm/createTimeseriesProperty.d.ts.map +0 -1
  741. package/build/esm/definitions/LinkDefinitions.test.d.ts +0 -2
  742. package/build/esm/definitions/LinkDefinitions.test.d.ts.map +0 -1
  743. package/build/esm/fetchMetadata.d.ts +0 -2
  744. package/build/esm/fetchMetadata.d.ts.map +0 -1
  745. package/build/esm/fetchMetadata.test.d.ts +0 -2
  746. package/build/esm/fetchMetadata.test.d.ts.map +0 -1
  747. package/build/esm/index.d.ts +0 -13
  748. package/build/esm/index.d.ts.map +0 -1
  749. package/build/esm/intellisense.test.d.ts +0 -2
  750. package/build/esm/intellisense.test.d.ts.map +0 -1
  751. package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.d.ts +0 -2
  752. package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.d.ts.map +0 -1
  753. package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.d.ts +0 -2
  754. package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.d.ts.map +0 -1
  755. package/build/esm/internal/conversions/modernToLegacyAggregationClause.d.ts +0 -2
  756. package/build/esm/internal/conversions/modernToLegacyAggregationClause.d.ts.map +0 -1
  757. package/build/esm/internal/conversions/modernToLegacyGroupByClause.d.ts +0 -2
  758. package/build/esm/internal/conversions/modernToLegacyGroupByClause.d.ts.map +0 -1
  759. package/build/esm/internal/conversions/modernToLegacyWhereClause.d.ts +0 -2
  760. package/build/esm/internal/conversions/modernToLegacyWhereClause.d.ts.map +0 -1
  761. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.d.ts +0 -2
  762. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.d.ts.map +0 -1
  763. package/build/esm/object/AttachmentUpload.d.ts +0 -4
  764. package/build/esm/object/AttachmentUpload.d.ts.map +0 -1
  765. package/build/esm/object/Cache.d.ts +0 -2
  766. package/build/esm/object/Cache.d.ts.map +0 -1
  767. package/build/esm/object/Cache.test.d.ts +0 -11
  768. package/build/esm/object/Cache.test.d.ts.map +0 -1
  769. package/build/esm/object/SimpleCache.d.ts +0 -38
  770. package/build/esm/object/SimpleCache.d.ts.map +0 -1
  771. package/build/esm/object/aggregate.d.ts +0 -2
  772. package/build/esm/object/aggregate.d.ts.map +0 -1
  773. package/build/esm/object/aggregate.test.d.ts +0 -2
  774. package/build/esm/object/aggregate.test.d.ts.map +0 -1
  775. package/build/esm/object/attachment.test.d.ts +0 -2
  776. package/build/esm/object/attachment.test.d.ts.map +0 -1
  777. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.d.ts +0 -2
  778. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.d.ts.map +0 -1
  779. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.d.ts +0 -7
  780. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.d.ts.map +0 -1
  781. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.d.ts +0 -2
  782. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.d.ts.map +0 -1
  783. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts.map +0 -1
  784. package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts +0 -8
  785. package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts.map +0 -1
  786. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.d.ts +0 -2
  787. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.d.ts.map +0 -1
  788. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.test.d.ts +0 -2
  789. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.test.d.ts.map +0 -1
  790. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.d.ts +0 -2
  791. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.d.ts.map +0 -1
  792. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.d.ts +0 -3
  793. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.d.ts.map +0 -1
  794. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.d.ts +0 -2
  795. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.d.ts.map +0 -1
  796. package/build/esm/object/convertWireToOsdkObjects.d.ts +0 -2
  797. package/build/esm/object/convertWireToOsdkObjects.d.ts.map +0 -1
  798. package/build/esm/object/convertWireToOsdkObjects.test.d.ts +0 -2
  799. package/build/esm/object/convertWireToOsdkObjects.test.d.ts.map +0 -1
  800. package/build/esm/object/fetchPage.d.ts +0 -3
  801. package/build/esm/object/fetchPage.d.ts.map +0 -1
  802. package/build/esm/object/fetchPage.test.d.ts +0 -2
  803. package/build/esm/object/fetchPage.test.d.ts.map +0 -1
  804. package/build/esm/object/fetchSingle.d.ts +0 -2
  805. package/build/esm/object/fetchSingle.d.ts.map +0 -1
  806. package/build/esm/object/geotimeseriesreference.test.d.ts +0 -2
  807. package/build/esm/object/geotimeseriesreference.test.d.ts.map +0 -1
  808. package/build/esm/object/media.test.d.ts +0 -2
  809. package/build/esm/object/media.test.d.ts.map +0 -1
  810. package/build/esm/object/object.test.d.ts.map +0 -1
  811. package/build/esm/object/timeseries.test.d.ts +0 -2
  812. package/build/esm/object/timeseries.test.d.ts.map +0 -1
  813. package/build/esm/objectSet/InterfaceObjectSet.test.d.ts +0 -2
  814. package/build/esm/objectSet/InterfaceObjectSet.test.d.ts.map +0 -1
  815. package/build/esm/objectSet/ObjectSet.test.d.ts +0 -2
  816. package/build/esm/objectSet/ObjectSet.test.d.ts.map +0 -1
  817. package/build/esm/objectSet/ObjectSetFactory.d.ts +0 -2
  818. package/build/esm/objectSet/ObjectSetFactory.d.ts.map +0 -1
  819. package/build/esm/objectSet/ObjectSetListenerWebsocket.d.ts +0 -2
  820. package/build/esm/objectSet/ObjectSetListenerWebsocket.d.ts.map +0 -1
  821. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.d.ts +0 -2
  822. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.d.ts.map +0 -1
  823. package/build/esm/objectSet/conjureUnionType.d.ts +0 -13
  824. package/build/esm/objectSet/conjureUnionType.d.ts.map +0 -1
  825. package/build/esm/objectSet/createObjectSet.d.ts +0 -2
  826. package/build/esm/objectSet/createObjectSet.d.ts.map +0 -1
  827. package/build/esm/ontology/OntologyProvider.d.ts +0 -32
  828. package/build/esm/ontology/OntologyProvider.d.ts.map +0 -1
  829. package/build/esm/ontology/StandardOntologyProvider.d.ts +0 -5
  830. package/build/esm/ontology/StandardOntologyProvider.d.ts.map +0 -1
  831. package/build/esm/ontology/StandardOntologyProvider.test.d.ts +0 -2
  832. package/build/esm/ontology/StandardOntologyProvider.test.d.ts.map +0 -1
  833. package/build/esm/ontology/loadActionMetadata.d.ts +0 -4
  834. package/build/esm/ontology/loadActionMetadata.d.ts.map +0 -1
  835. package/build/esm/ontology/loadFullObjectMetadata.d.ts.map +0 -1
  836. package/build/esm/ontology/loadInterfaceMetadata.d.ts.map +0 -1
  837. package/build/esm/ontology/loadQueryMetadata.d.ts +0 -4
  838. package/build/esm/ontology/loadQueryMetadata.d.ts.map +0 -1
  839. package/build/esm/ontology/makeConjureContext.d.ts +0 -4
  840. package/build/esm/ontology/makeConjureContext.d.ts.map +0 -1
  841. package/build/esm/pageRequestAsAsyncIter.d.ts +0 -10
  842. package/build/esm/pageRequestAsAsyncIter.d.ts.map +0 -1
  843. package/build/esm/public/internal.d.ts +0 -4
  844. package/build/esm/public/internal.d.ts.map +0 -1
  845. package/build/esm/public/unstable-do-not-use.d.ts +0 -2
  846. package/build/esm/public/unstable-do-not-use.d.ts.map +0 -1
  847. package/build/esm/public-utils/createAndFetchTempObjectSetRid.d.ts.map +0 -1
  848. package/build/esm/public-utils/hydrateAttachmentFromRid.d.ts +0 -10
  849. package/build/esm/public-utils/hydrateAttachmentFromRid.d.ts.map +0 -1
  850. package/build/esm/public-utils/hydrateObjectSetFromRid.d.ts +0 -11
  851. package/build/esm/public-utils/hydrateObjectSetFromRid.d.ts.map +0 -1
  852. package/build/esm/queries/applyQuery.d.ts +0 -6
  853. package/build/esm/queries/applyQuery.d.ts.map +0 -1
  854. package/build/esm/queries/queries.test.d.ts +0 -2
  855. package/build/esm/queries/queries.test.d.ts.map +0 -1
  856. package/build/esm/queries/types.d.ts.map +0 -1
  857. package/build/esm/tsserver.d.ts +0 -32
  858. package/build/esm/tsserver.d.ts.map +0 -1
  859. package/build/esm/util/ArrayElement.d.ts +0 -2
  860. package/build/esm/util/ArrayElement.d.ts.map +0 -1
  861. package/build/esm/util/NOOP.d.ts +0 -4
  862. package/build/esm/util/NOOP.d.ts.map +0 -1
  863. package/build/esm/util/NullableProps.d.ts +0 -6
  864. package/build/esm/util/NullableProps.d.ts.map +0 -1
  865. package/build/esm/util/UserAgent.d.ts +0 -2
  866. package/build/esm/util/UserAgent.d.ts.map +0 -1
  867. package/build/esm/util/WireObjectSet.d.ts +0 -2
  868. package/build/esm/util/WireObjectSet.d.ts.map +0 -1
  869. package/build/esm/util/addUserAgentAndRequestContextHeaders.d.ts.map +0 -1
  870. package/build/esm/util/augmentRequestContext.d.ts +0 -32
  871. package/build/esm/util/augmentRequestContext.d.ts.map +0 -1
  872. package/build/esm/util/datetimeConverters.d.ts +0 -22
  873. package/build/esm/util/datetimeConverters.d.ts.map +0 -1
  874. package/build/esm/util/datetimeConverters.test.d.ts +0 -2
  875. package/build/esm/util/datetimeConverters.test.d.ts.map +0 -1
  876. package/build/esm/util/isOntologyObjectV2.d.ts +0 -2
  877. package/build/esm/util/isOntologyObjectV2.d.ts.map +0 -1
  878. package/build/esm/util/isOsdkBaseObject.d.ts +0 -3
  879. package/build/esm/util/isOsdkBaseObject.d.ts.map +0 -1
  880. package/build/esm/util/isOsdkObject.d.ts.map +0 -1
  881. package/build/esm/util/objectSetUtils.d.ts +0 -4
  882. package/build/esm/util/objectSetUtils.d.ts.map +0 -1
  883. package/build/esm/util/partialBy.d.ts +0 -3
  884. package/build/esm/util/partialBy.d.ts.map +0 -1
  885. package/build/esm/util/streamutils.d.ts +0 -3
  886. package/build/esm/util/streamutils.d.ts.map +0 -1
  887. package/build/esm/util/timeseriesUtils.d.ts +0 -8
  888. package/build/esm/util/timeseriesUtils.d.ts.map +0 -1
  889. package/build/esm/util/toDataValue.d.ts +0 -2
  890. package/build/esm/util/toDataValue.d.ts.map +0 -1
  891. package/build/esm/util/toDataValue.test.d.ts +0 -2
  892. package/build/esm/util/toDataValue.test.d.ts.map +0 -1
  893. package/build/esm/util/toDataValueQueries.d.ts +0 -2
  894. package/build/esm/util/toDataValueQueries.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # @osdk/client
2
2
 
3
+ ## 2.1.0-beta.25
4
+
5
+ ### Minor Changes
6
+
7
+ - c80ca45: Add ability to create interfaces through actions now.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [c80ca45]
12
+ - @osdk/generator-converters@2.1.0-beta.25
13
+ - @osdk/api@2.1.0-beta.25
14
+ - @osdk/client.unstable@2.1.0-beta.25
15
+
16
+ ## 2.1.0-beta.24
17
+
18
+ ### Minor Changes
19
+
20
+ - 03f95eb: Add support for interface params in actions.
21
+ - c691c8b: Package now has experimental support for commonjs
22
+ - 3c9ac22: Cleaning up where clause types.
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies [03f95eb]
27
+ - Updated dependencies [c691c8b]
28
+ - Updated dependencies [3c9ac22]
29
+ - @osdk/generator-converters@2.1.0-beta.24
30
+ - @osdk/api@2.1.0-beta.24
31
+ - @osdk/shared.client.impl@1.1.0-beta.5
32
+ - @osdk/shared.net.errors@2.1.0-beta.2
33
+ - @osdk/shared.net.fetch@1.1.0-beta.3
34
+ - @osdk/client.unstable@2.1.0-beta.24
35
+
3
36
  ## 2.1.0-beta.23
4
37
 
5
38
  ### Minor Changes
@@ -13,10 +13,16 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
17
+ // eslint-disable-next-line @typescript-eslint/consistent-type-imports
18
+
16
19
  // DO NOT EXPORT FROM PACKAGE
17
20
  /** @internal */
18
21
  export const additionalContext = Symbol("additionalContext");
22
+
19
23
  // BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.
20
24
  const MaxOsdkVersion = "2.1.0";
25
+ // END: THIS IS GENERATED CODE. DO NOT EDIT.
26
+
21
27
  const ErrorMessage = Symbol("ErrorMessage");
22
28
  //# sourceMappingURL=Client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Client.js","names":["additionalContext","Symbol","MaxOsdkVersion","ErrorMessage"],"sources":["Client.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// DO NOT EXPORT FROM PACKAGE\n/** @internal */\nexport const additionalContext = Symbol(\"additionalContext\");\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst MaxOsdkVersion = \"2.1.0\";\nconst ErrorMessage = Symbol(\"ErrorMessage\");\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,iBAAiB,GAAGC,MAAM,CAAC,mBAAmB,CAAC;AAC5D;AACA,MAAMC,cAAc,GAAG,OAAO;AAC9B,MAAMC,YAAY,GAAGF,MAAM,CAAC,cAAc,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"Client.js","names":["additionalContext","Symbol","MaxOsdkVersion","ErrorMessage"],"sources":["Client.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 {\n ActionDefinition,\n ActionMetadata,\n CompileTimeMetadata,\n InterfaceDefinition,\n InterfaceMetadata,\n ObjectMetadata,\n ObjectSet,\n ObjectTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n VersionBound,\n} from \"@osdk/api\";\nimport type {\n Experiment,\n ExperimentFns,\n MinimalObjectSet,\n} from \"@osdk/api/unstable\";\nimport type { SharedClient } from \"@osdk/shared.client2\";\nimport type { ActionSignatureFromDef } from \"./actions/applyAction.js\";\nimport type { MinimalClient } from \"./MinimalClientContext.js\";\nimport type { QuerySignatureFromDef } from \"./queries/types.js\";\nimport type { SatisfiesSemver } from \"./SatisfiesSemver.js\";\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\ntype OldSharedClient = import(\"@osdk/shared.client\").SharedClient;\n\nexport type CheckVersionBound<Q> = Q extends VersionBound<infer V> ? (\n SatisfiesSemver<V, MaxOsdkVersion> extends true ? Q\n : Q & {\n [ErrorMessage]:\n `Your SDK requires a semver compatible version with ${V}. You have ${MaxOsdkVersion}. Update your package.json`;\n }\n )\n : Q;\n\nexport interface Client extends SharedClient, OldSharedClient {\n <Q extends ObjectTypeDefinition>(\n o: Q,\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"] ? ObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n <Q extends (InterfaceDefinition)>(\n o: Q,\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"] ? MinimalObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n <Q extends ActionDefinition<any>>(\n o: Q,\n ): ActionSignatureFromDef<Q>;\n\n <Q extends QueryDefinition<any>>(\n o: Q,\n ): QuerySignatureFromDef<Q>;\n\n <Q extends Experiment<\"2.0.8\"> | Experiment<\"2.1.0\">>(\n experiment: Q,\n ): ExperimentFns<Q>;\n\n fetchMetadata<\n Q extends (\n | ObjectTypeDefinition\n | InterfaceDefinition\n | ActionDefinition<any>\n | QueryDefinition<any>\n ),\n >(o: Q): Promise<\n Q extends ObjectTypeDefinition ? ObjectMetadata\n : Q extends InterfaceDefinition ? InterfaceMetadata\n : Q extends ActionDefinition<any> ? ActionMetadata\n : Q extends QueryDefinition<any> ? QueryMetadata\n : never\n >;\n\n /** @internal */\n [additionalContext]: MinimalClient;\n}\n\n// DO NOT EXPORT FROM PACKAGE\n/** @internal */\nexport const additionalContext: unique symbol = Symbol(\"additionalContext\");\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst MaxOsdkVersion = \"2.1.0\";\n// END: THIS IS GENERATED CODE. DO NOT EDIT.\nexport type MaxOsdkVersion = typeof MaxOsdkVersion;\nconst ErrorMessage: unique symbol = Symbol(\"ErrorMessage\");\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA0BA;;AAsDA;AACA;AACA,OAAO,MAAMA,iBAAgC,GAAGC,MAAM,CAAC,mBAAmB,CAAC;;AAE3E;AACA,MAAMC,cAAc,GAAG,OAAO;AAC9B;;AAEA,MAAMC,YAA2B,GAAGF,MAAM,CAAC,cAAc,CAAC","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { describe, expectTypeOf, it } from "vitest";
17
18
  describe("OsdkObjectPropertyType", () => {
18
19
  describe("{ nullable: false } property", () => {
@@ -1 +1 @@
1
- {"version":3,"file":"Definitions.test.js","names":["describe","expectTypeOf","it","toEqualTypeOf"],"sources":["Definitions.test.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { describe, expectTypeOf, it } from \"vitest\";\ndescribe(\"OsdkObjectPropertyType\", () => {\n describe(\"{ nullable: false } property\", () => {\n const nonNullDef = {\n type: \"string\",\n nullable: false,\n };\n it(\"is `| undefined` for `false`\", () => {\n expectTypeOf()\n .toEqualTypeOf();\n });\n it(\"is not `| undefined` for `true`\", () => {\n expectTypeOf()\n .toEqualTypeOf();\n });\n });\n describe(\"{ nullable: true } property\", () => {\n const nullableDef = {\n type: \"string\",\n nullable: true,\n };\n it(\"is | undefined for `false`\", () => {\n expectTypeOf()\n .toEqualTypeOf();\n });\n it(\"is `| undefined` for `true`\", () => {\n expectTypeOf()\n .toEqualTypeOf();\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,EAAE,QAAQ,QAAQ;AACnDF,QAAQ,CAAC,wBAAwB,EAAE,MAAM;EACrCA,QAAQ,CAAC,8BAA8B,EAAE,MAAM;IAK3CE,EAAE,CAAC,8BAA8B,EAAE,MAAM;MACrCD,YAAY,CAAC,CAAC,CACTE,aAAa,CAAC,CAAC;IACxB,CAAC,CAAC;IACFD,EAAE,CAAC,iCAAiC,EAAE,MAAM;MACxCD,YAAY,CAAC,CAAC,CACTE,aAAa,CAAC,CAAC;IACxB,CAAC,CAAC;EACN,CAAC,CAAC;EACFH,QAAQ,CAAC,6BAA6B,EAAE,MAAM;IAK1CE,EAAE,CAAC,4BAA4B,EAAE,MAAM;MACnCD,YAAY,CAAC,CAAC,CACTE,aAAa,CAAC,CAAC;IACxB,CAAC,CAAC;IACFD,EAAE,CAAC,6BAA6B,EAAE,MAAM;MACpCD,YAAY,CAAC,CAAC,CACTE,aAAa,CAAC,CAAC;IACxB,CAAC,CAAC;EACN,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"Definitions.test.js","names":["describe","expectTypeOf","it","toEqualTypeOf"],"sources":["Definitions.test.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 { ObjectMetadata, OsdkObjectPropertyType } from \"@osdk/api\";\nimport { describe, expectTypeOf, it } from \"vitest\";\n\ndescribe(\"OsdkObjectPropertyType\", () => {\n describe(\"{ nullable: false } property\", () => {\n const nonNullDef = {\n type: \"string\",\n nullable: false,\n } satisfies ObjectMetadata.Property;\n\n it(\"is `| undefined` for `false`\", () => {\n expectTypeOf<OsdkObjectPropertyType<typeof nonNullDef, false>>()\n .toEqualTypeOf<string | undefined>();\n });\n\n it(\"is not `| undefined` for `true`\", () => {\n expectTypeOf<OsdkObjectPropertyType<typeof nonNullDef, true>>()\n .toEqualTypeOf<string>();\n });\n });\n\n describe(\"{ nullable: true } property\", () => {\n const nullableDef = {\n type: \"string\",\n nullable: true,\n } satisfies ObjectMetadata.Property;\n\n it(\"is | undefined for `false`\", () => {\n expectTypeOf<OsdkObjectPropertyType<typeof nullableDef, false>>()\n .toEqualTypeOf<string | undefined>();\n });\n\n it(\"is `| undefined` for `true`\", () => {\n expectTypeOf<OsdkObjectPropertyType<typeof nullableDef, true>>()\n .toEqualTypeOf<string | undefined>();\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,EAAE,QAAQ,QAAQ;AAEnDF,QAAQ,CAAC,wBAAwB,EAAE,MAAM;EACvCA,QAAQ,CAAC,8BAA8B,EAAE,MAAM;IAM7CE,EAAE,CAAC,8BAA8B,EAAE,MAAM;MACvCD,YAAY,CAAmD,CAAC,CAC7DE,aAAa,CAAqB,CAAC;IACxC,CAAC,CAAC;IAEFD,EAAE,CAAC,iCAAiC,EAAE,MAAM;MAC1CD,YAAY,CAAkD,CAAC,CAC5DE,aAAa,CAAS,CAAC;IAC5B,CAAC,CAAC;EACJ,CAAC,CAAC;EAEFH,QAAQ,CAAC,6BAA6B,EAAE,MAAM;IAM5CE,EAAE,CAAC,4BAA4B,EAAE,MAAM;MACrCD,YAAY,CAAoD,CAAC,CAC9DE,aAAa,CAAqB,CAAC;IACxC,CAAC,CAAC;IAEFD,EAAE,CAAC,6BAA6B,EAAE,MAAM;MACtCD,YAAY,CAAmD,CAAC,CAC7DE,aAAa,CAAqB,CAAC;IACxC,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1,17 +1,2 @@
1
- /*
2
- * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
1
  export {};
17
2
  //# sourceMappingURL=Logger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Logger.js","names":[],"sources":["Logger.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"file":"Logger.js","names":[],"sources":["Logger.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface Logger {\n trace: LogFn;\n debug: LogFn;\n fatal: LogFn;\n error: LogFn;\n warn: LogFn;\n info: LogFn;\n\n isLevelEnabled(level: string): boolean;\n\n child(\n bindings: Record<string, any>,\n options?: { level?: string; msgPrefix?: string },\n ): Logger;\n}\n\ninterface LogFn {\n (obj: unknown, msg?: string, ...args: any[]): void;\n (msg: string, ...args: any[]): void;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,17 +1,2 @@
1
- /*
2
- * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
1
  export {};
17
2
  //# sourceMappingURL=MinimalClientContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MinimalClientContext.js","names":[],"sources":["MinimalClientContext.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
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":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  export function isOk(result) {
17
18
  return result.type === "ok";
18
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ResultOrError.js","names":["isOk","result","type"],"sources":["ResultOrError.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport function isOk(result) {\n return result.type === \"ok\";\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,IAAIA,CAACC,MAAM,EAAE;EACzB,OAAOA,MAAM,CAACC,IAAI,KAAK,IAAI;AAC/B","ignoreList":[]}
1
+ {"version":3,"file":"ResultOrError.js","names":["isOk","result","type"],"sources":["ResultOrError.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport type ResultOrError<T extends object> =\n | ({ type: \"ok\"; err?: never } & T)\n | { type: \"err\"; data?: never; err?: unknown };\n\nexport function isOk(result: ResultOrError<any>): result is { type: \"ok\" } {\n return result.type === \"ok\";\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA,OAAO,SAASA,IAAIA,CAACC,MAA0B,EAA4B;EACzE,OAAOA,MAAM,CAACC,IAAI,KAAK,IAAI;AAC7B","ignoreList":[]}
@@ -1,17 +1,2 @@
1
- /*
2
- * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
1
  export {};
17
2
  //# sourceMappingURL=SatisfiesSemver.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SatisfiesSemver.js","names":[],"sources":["SatisfiesSemver.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"file":"SatisfiesSemver.js","names":[],"sources":["SatisfiesSemver.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 GreaterThan,\n GreaterThanOrEqual,\n IsEqual,\n LessThan,\n} from \"type-fest\";\n\nexport type VersionString<\n Major extends number,\n Minor extends number,\n Patch extends number,\n> = `${Major}.${Minor}.${Patch}`;\n\nexport type SatisfiesSemver<\n E extends VersionString<any, any, any>,\n C extends VersionString<any, any, any>,\n> = E extends VersionString<infer ExpMajor, infer ExpMinor, infer ExpPatch>\n ? C extends VersionString<infer CurMajor, infer CurMinor, infer CurPatch> ? (\n IsEqual<CurMajor, ExpMajor> extends false ? false\n : LessThan<CurMinor, ExpMinor> extends true ? false\n : GreaterThan<CurMinor, ExpMinor> extends true ? true\n : GreaterThanOrEqual<CurPatch, ExpPatch>\n )\n : false\n : false;\n"],"mappings":"","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { describe, expectTypeOf, it } from "vitest";
17
18
  describe("SatisfiesSemver", () => {
18
19
  describe("SatisfiesSemver type alias", () => {
@@ -1 +1 @@
1
- {"version":3,"file":"SatisfiesSemver.test.js","names":["describe","expectTypeOf","it","toEqualTypeOf"],"sources":["SatisfiesSemver.test.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { describe, expectTypeOf, it } from \"vitest\";\ndescribe(\"SatisfiesSemver\", () => {\n describe(\"SatisfiesSemver type alias\", () => {\n it(\"has simple examples to review\", () => {\n expectTypeOf().toEqualTypeOf(true);\n expectTypeOf().toEqualTypeOf(true);\n expectTypeOf().toEqualTypeOf(true);\n expectTypeOf().toEqualTypeOf(false);\n expectTypeOf().toEqualTypeOf(false);\n });\n it(\"is true eq major, eq minor, eq patch\", () => {\n expectTypeOf().toEqualTypeOf(true);\n expectTypeOf().toEqualTypeOf(true);\n expectTypeOf().toEqualTypeOf(true);\n expectTypeOf().toEqualTypeOf(true);\n });\n it(\"is true for eq major, eq minor, gt patch\", () => {\n expectTypeOf().toEqualTypeOf(true);\n });\n it(\"is true for eq major, gt minor, any patch\", () => {\n expectTypeOf().toEqualTypeOf(true);\n expectTypeOf().toEqualTypeOf(true);\n expectTypeOf().toEqualTypeOf(true);\n });\n it(\"is false for eq major, lt minor, any patch\", () => {\n expectTypeOf().toEqualTypeOf(false);\n expectTypeOf().toEqualTypeOf(false);\n expectTypeOf().toEqualTypeOf(false);\n });\n it(\"is false for gt major, any minor, any patch\", () => {\n expectTypeOf().toEqualTypeOf(false);\n expectTypeOf().toEqualTypeOf(false);\n expectTypeOf().toEqualTypeOf(false);\n expectTypeOf().toEqualTypeOf(false);\n expectTypeOf().toEqualTypeOf(false);\n expectTypeOf().toEqualTypeOf(false);\n expectTypeOf().toEqualTypeOf(false);\n expectTypeOf().toEqualTypeOf(false);\n expectTypeOf().toEqualTypeOf(false);\n });\n it(\"is false for lt major, any minor, any patch\", () => {\n expectTypeOf().toEqualTypeOf(false);\n expectTypeOf().toEqualTypeOf(false);\n expectTypeOf().toEqualTypeOf(false);\n expectTypeOf().toEqualTypeOf(false);\n expectTypeOf().toEqualTypeOf(false);\n expectTypeOf().toEqualTypeOf(false);\n expectTypeOf().toEqualTypeOf(false);\n expectTypeOf().toEqualTypeOf(false);\n expectTypeOf().toEqualTypeOf(false);\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,EAAE,QAAQ,QAAQ;AACnDF,QAAQ,CAAC,iBAAiB,EAAE,MAAM;EAC9BA,QAAQ,CAAC,4BAA4B,EAAE,MAAM;IACzCE,EAAE,CAAC,+BAA+B,EAAE,MAAM;MACtCD,YAAY,CAAC,CAAC,CAACE,aAAa,CAAC,IAAI,CAAC;MAClCF,YAAY,CAAC,CAAC,CAACE,aAAa,CAAC,IAAI,CAAC;MAClCF,YAAY,CAAC,CAAC,CAACE,aAAa,CAAC,IAAI,CAAC;MAClCF,YAAY,CAAC,CAAC,CAACE,aAAa,CAA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,CAAC;MACnCF,YAAY,CAAC,CAAC,CAACE,aAAa,CAAC,KAAK,CAAC;MACnCF,YAAY,CAAC,CAAC,CAACE,aAAa,CAAC,KAAK,CAAC;MACnCF,YAAY,CAAC,CAAC,CAACE,aAAa,CAAC,KAAK,CAAC;MACnCF,YAAY,CAAC,CAAC,CAACE,aAAa,CAAC,KAAK,CAAC;IACvC,CAAC,CAAC;IACFD,EAAE,CAAC,6CAA6C,EAAE,MAAM;MACpDD,YAAY,CAAC,CAAC,CAACE,aAAa,CAAC,KAAK,CAAC;MACnCF,YAAY,CAAC,CAAC,CAACE,aAAa,CAAC,KAAK,CAAC;MACnCF,YAAY,CAAC,CAAC,CAACE,aAAa,CAAC,KAAK,CAAC;MACnCF,YAAY,CAAC,CAAC,CAACE,aAAa,CAAC,KAAK,CAAC;MACnCF,YAAY,CAAC,CAAC,CAACE,aAAa,CAAC,KAAK,CAAC;MACnCF,YAAY,CAAC,CAAC,CAACE,aAAa,CAAC,KAAK,CAAC;MACnCF,YAAY,CAAC,CAAC,CAACE,aAAa,CAAC,KAAK,CAAC;MACnCF,YAAY,CAAC,CAAC,CAACE,aAAa,CAAC,KAAK,CAAC;MACnCF,YAAY,CAAC,CAAC,CAACE,aAAa,CAAC,KAAK,CAAC;IACvC,CAAC,CAAC;EACN,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"SatisfiesSemver.test.js","names":["describe","expectTypeOf","it","toEqualTypeOf"],"sources":["SatisfiesSemver.test.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 { describe, expectTypeOf, it } from \"vitest\";\nimport type { SatisfiesSemver } from \"./SatisfiesSemver.js\";\n\ndescribe(\"SatisfiesSemver\", () => {\n describe(\"SatisfiesSemver type alias\", () => {\n it(\"has simple examples to review\", () => {\n expectTypeOf<SatisfiesSemver<\"0.0.0\", \"0.0.0\">>().toEqualTypeOf(true);\n expectTypeOf<SatisfiesSemver<\"1.0.0\", \"1.1.0\">>().toEqualTypeOf(true);\n expectTypeOf<SatisfiesSemver<\"1.1.0\", \"1.1.1\">>().toEqualTypeOf(true);\n expectTypeOf<SatisfiesSemver<\"1.5.0\", \"1.4.0\">>().toEqualTypeOf(false);\n expectTypeOf<SatisfiesSemver<\"1.0.0\", \"2.0.0\">>().toEqualTypeOf(false);\n });\n\n it(\"is true eq major, eq minor, eq patch\", () => {\n expectTypeOf<SatisfiesSemver<\"0.0.0\", \"0.0.0\">>().toEqualTypeOf(true);\n expectTypeOf<SatisfiesSemver<\"1.0.0\", \"1.0.0\">>().toEqualTypeOf(true);\n expectTypeOf<SatisfiesSemver<\"2.2.0\", \"2.2.0\">>().toEqualTypeOf(true);\n expectTypeOf<SatisfiesSemver<\"3.3.3\", \"3.3.3\">>().toEqualTypeOf(true);\n });\n\n it(\"is true for eq major, eq minor, gt patch\", () => {\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"5.5.6\">>().toEqualTypeOf(true);\n });\n\n it(\"is true for eq major, gt minor, any patch\", () => {\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"5.6.4\">>().toEqualTypeOf(true);\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"5.6.5\">>().toEqualTypeOf(true);\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"5.6.6\">>().toEqualTypeOf(true);\n });\n\n it(\"is false for eq major, lt minor, any patch\", () => {\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"5.4.4\">>().toEqualTypeOf(false);\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"5.4.5\">>().toEqualTypeOf(false);\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"5.4.6\">>().toEqualTypeOf(false);\n });\n\n it(\"is false for gt major, any minor, any patch\", () => {\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"6.4.4\">>().toEqualTypeOf(false);\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"6.4.5\">>().toEqualTypeOf(false);\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"6.4.6\">>().toEqualTypeOf(false);\n\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"6.5.4\">>().toEqualTypeOf(false);\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"6.5.5\">>().toEqualTypeOf(false);\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"6.5.6\">>().toEqualTypeOf(false);\n\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"6.6.4\">>().toEqualTypeOf(false);\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"6.6.5\">>().toEqualTypeOf(false);\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"6.6.6\">>().toEqualTypeOf(false);\n });\n\n it(\"is false for lt major, any minor, any patch\", () => {\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"4.4.4\">>().toEqualTypeOf(false);\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"4.4.5\">>().toEqualTypeOf(false);\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"4.4.6\">>().toEqualTypeOf(false);\n\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"4.5.4\">>().toEqualTypeOf(false);\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"4.5.5\">>().toEqualTypeOf(false);\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"4.5.6\">>().toEqualTypeOf(false);\n\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"4.6.4\">>().toEqualTypeOf(false);\n expectTypeOf<SatisfiesSemver<\"5.5.5\", \"4.6.5\">>().toEqualTypeOf(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,CAAoC,CAAC,CAACE,aAAa,CAAC,KAAK,CAAC;MACtEF,YAAY,CAAoC,CAAC,CAACE,aAAa,CAAC,KAAK,CAAC;MACtEF,YAAY,CAAoC,CAAC,CAACE,aAAa,CAAC,KAAK,CAAC;IACxE,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { bulkLoadOntologyEntities, getLinkTypesForObjectTypes, loadAllOntologies } from "@osdk/client.unstable";
17
18
  import invariant from "tiny-invariant";
18
19
  import { createSimpleAsyncCache, createSimpleCache } from "../object/SimpleCache.js";
@@ -25,6 +26,7 @@ async function getOntologyVersionForRid(ctx, ontologyRid) {
25
26
  }
26
27
  const strongMemoSync = fn => createSimpleCache(new Map(), fn).get;
27
28
  const weakMemoSync = fn => createSimpleCache(new WeakMap(), fn).get; // FIXME
29
+
28
30
  const strongMemoAsync = fn => createSimpleAsyncCache("strong", fn).get;
29
31
  const weakMemoAsync = fn => createSimpleAsyncCache("weak", fn).get;
30
32
  export class MetadataClient {
@@ -65,6 +67,7 @@ export class MetadataClient {
65
67
  }
66
68
  });
67
69
  !linkTypes.linkTypes[objectTypeRid] ? process.env.NODE_ENV !== "production" ? invariant(false, "link type should be loaded") : invariant(false) : void 0;
70
+
68
71
  // apiName to content
69
72
  const ret = {};
70
73
  for (const l of linkTypes.linkTypes[objectTypeRid]) {
@@ -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.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { bulkLoadOntologyEntities, getLinkTypesForObjectTypes, loadAllOntologies, } from \"@osdk/client.unstable\";\nimport invariant from \"tiny-invariant\";\nimport { createSimpleAsyncCache, createSimpleCache, } from \"../object/SimpleCache.js\";\nimport { makeConjureContext } from \"../ontology/makeConjureContext.js\";\nlet cachedAllOntologies;\nasync function getOntologyVersionForRid(ctx, ontologyRid) {\n cachedAllOntologies ??= await loadAllOntologies(ctx, {});\n invariant(cachedAllOntologies.ontologies[ontologyRid], \"ontology should be loaded\");\n return cachedAllOntologies.ontologies[ontologyRid].currentOntologyVersion;\n}\nconst strongMemoSync = (fn) => createSimpleCache(new Map(), fn).get;\nconst weakMemoSync = (fn) => createSimpleCache(new WeakMap(), fn).get; // FIXME\nconst strongMemoAsync = (fn) => createSimpleAsyncCache(\"strong\", fn).get;\nconst weakMemoAsync = (fn) => createSimpleAsyncCache(\"weak\", fn).get;\nexport class MetadataClient {\n #client;\n #ctx;\n #logger;\n constructor(client) {\n this.#client = client;\n this.#ctx = makeConjureContext(client, \"ontology-metadata/api\");\n this.#client.ontologyProvider.getObjectDefinition;\n this.#logger = this.#client.logger?.child({\n mcc: true,\n });\n }\n forObjectByRid = strongMemoAsync(async (rid) => {\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 forObjectByApiName = strongMemoAsync(async (objectApiName) => {\n const objectDef = await this.#client.ontologyProvider.getObjectDefinition(objectApiName);\n return this.forObjectByRid(objectDef.rid);\n });\n #objectPropertyMapping = strongMemoAsync(async (objectTypeRid) => {\n const conjureObjectType = await this.#getConjureObjectType(objectTypeRid);\n return createObjectPropertyMapping(conjureObjectType);\n });\n #objectLinkMapping = strongMemoAsync(async (objectTypeRid) => {\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(linkTypes.linkTypes[objectTypeRid], \"link type should be loaded\");\n // apiName to content\n const ret = {};\n for (const l of linkTypes.linkTypes[objectTypeRid]) {\n const helper = ({ apiName }, linkSide, otherObjectType) => {\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 { oneToMany: { objectTypeRidManySide, manyToOneLinkMetadata, objectTypeRidOneSide, oneToManyLinkMetadata, }, } = l.definition;\n if (objectTypeRidManySide === objectTypeRid) {\n helper(manyToOneLinkMetadata, \"TARGET\", objectTypeRidOneSide);\n }\n if (objectTypeRidOneSide === objectTypeRid) {\n helper(oneToManyLinkMetadata, \"SOURCE\", objectTypeRidManySide);\n }\n }\n else if (l.definition.type === \"manyToMany\") {\n const { manyToMany: { objectTypeRidA, objectTypeAToBLinkMetadata, objectTypeRidB, objectTypeBToALinkMetadata, }, } = l.definition;\n if (objectTypeRidA === objectTypeRid) {\n helper(objectTypeAToBLinkMetadata, \"SOURCE\", objectTypeRidB);\n }\n if (objectTypeRidB === objectTypeRid) {\n helper(objectTypeBToALinkMetadata, \"TARGET\", objectTypeRidA);\n }\n }\n }\n return ret;\n });\n #getConjureObjectType = strongMemoAsync(async (objectTypeRid) => {\n this.#logger?.debug(`getConjureObjectType(${objectTypeRid})`);\n const body = {\n datasourceTypes: [],\n objectTypes: [{\n identifier: {\n type: \"objectTypeRid\",\n objectTypeRid: objectTypeRid,\n },\n versionReference: {\n type: \"ontologyVersion\",\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(entities.objectTypes[0]?.objectType, \"object type should be loaded\");\n return entities.objectTypes[0].objectType;\n });\n ontologyVersion = strongMemoAsync(async (_) => getOntologyVersionForRid(this.#ctx, await this.#client.ontologyRid));\n}\nexport const metadataCacheClient = weakMemoAsync((client) => Promise.resolve(new MetadataClient(client)));\nfunction createObjectPropertyMapping(conjureOT) {\n invariant(conjureOT.primaryKeys.length === 1, `only one primary key supported, got ${conjureOT.primaryKeys.length}`);\n const pkRid = conjureOT.primaryKeys[0];\n const pkProperty = Object.values(conjureOT.propertyTypes).find(a => a.rid === pkRid);\n if (!pkProperty) {\n throw new Error(`Could not find PK property by rid: ${pkRid}`);\n }\n const propertyIdToApiNameMapping = Object\n .fromEntries(Object.values(conjureOT.propertyTypes).map(property => {\n return [property.id, property.apiName];\n }));\n const propertyApiNameToIdMapping = Object\n .fromEntries(Object.values(conjureOT.propertyTypes).map(property => {\n return [property.apiName, property.id];\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;AACA,SAASA,wBAAwB,EAAEC,0BAA0B,EAAEC,iBAAiB,QAAS,uBAAuB;AAChH,OAAOC,SAAS,MAAM,gBAAgB;AACtC,SAASC,sBAAsB,EAAEC,iBAAiB,QAAS,0BAA0B;AACrF,SAASC,kBAAkB,QAAQ,mCAAmC;AACtE,IAAIC,mBAAmB;AACvB,eAAeC,wBAAwBA,CAACC,GAAG,EAAEC,WAAW,EAAE;EACtDH,mBAAmB,KAAK,MAAML,iBAAiB,CAACO,GAAG,EAAE,CAAC,CAAC,CAAC;EACxD,CAAUF,mBAAmB,CAACI,UAAU,CAACD,WAAW,CAAC,GAAAE,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAArDX,SAAS,QAA8C,2BAA2B,IAAlFA,SAAS;EACT,OAAOI,mBAAmB,CAACI,UAAU,CAACD,WAAW,CAAC,CAACK,sBAAsB;AAC7E;AACA,MAAMC,cAAc,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AAC,QAAA,oBAA5CX,SAAS,QAAqC,uCAAuC2F,SAAS,CAACC,WAAW,CAACC,MAAM,EAAE,IAAnH7F,SAAS;EACT,MAAM8F,KAAK,GAAGH,SAAS,CAACC,WAAW,CAAC,CAAC,CAAC;EACtC,MAAMG,UAAU,GAAGC,MAAM,CAACC,MAAM,CAACN,SAAS,CAACO,aAAa,CAAC,CAACC,IAAI,CAACC,CAAC,IAAIA,CAAC,CAACtE,GAAG,KAAKgE,KAAK,CAAC;EACpF,IAAI,CAACC,UAAU,EAAE;IACb,MAAM,IAAIM,KAAK,CAAC,sCAAsCP,KAAK,EAAE,CAAC;EAClE;EACA,MAAMQ,0BAA0B,GAAGN,MAAM,CACpCO,WAAW,CAACP,MAAM,CAACC,MAAM,CAACN,SAAS,CAACO,aAAa,CAAC,CAACM,GAAG,CAACC,QAAQ,IAAI;IACpE,OAAO,CAACA,QAAQ,CAACC,EAAE,EAAED,QAAQ,CAAChE,OAAO,CAAC;EAC1C,CAAC,CAAC,CAAC;EACH,MAAMkE,0BAA0B,GAAGX,MAAM,CACpCO,WAAW,CAACP,MAAM,CAACC,MAAM,CAACN,SAAS,CAACO,aAAa,CAAC,CAACM,GAAG,CAACC,QAAQ,IAAI;IACpE,OAAO,CAACA,QAAQ,CAAChE,OAAO,EAAEgE,QAAQ,CAACC,EAAE,CAAC;EAC1C,CAAC,CAAC,CAAC;EACH,OAAO;IACHjE,OAAO,EAAEkD,SAAS,CAAClD,OAAO;IAC1BiE,EAAE,EAAEf,SAAS,CAACe,EAAE;IAChBJ,0BAA0B;IAC1BK,0BAA0B;IAC1BC,EAAE,EAAE;MACA9E,GAAG,EAAEgE,KAAK;MACVrD,OAAO,EAAEsD,UAAU,CAACtD,OAAO;MAC3BqB,IAAI,EAAEiC,UAAU,CAACjC;IACrB;EACJ,CAAC;AACL","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 | 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,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AA0B;IAC1BC,EAAE,EAAE;MACF9E,GAAG,EAAEgE,KAAK;MACVrD,OAAO,EAAEsD,UAAU,CAACtD,OAAQ;MAC5BqB,IAAI,EAAEiC,UAAU,CAACjC;IACnB;EACF,CAAC;AACH","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { getBulkLinksPage } from "@osdk/client.unstable";
17
18
  import invariant from "tiny-invariant";
18
19
  import { conjureUnionType } from "../objectSet/conjureUnionType.js";
@@ -25,12 +26,14 @@ export function createBulkLinksAsyncIterFactory(ctx) {
25
26
  return;
26
27
  }
27
28
  ctx.logger?.debug("Preparing to fetch bulk links");
29
+
28
30
  // require all objects to be the same type for now
29
31
  !objs.every(a => a.$objectType === objs[0].$objectType) ? process.env.NODE_ENV !== "production" ? invariant(false) : invariant(false) : void 0;
30
32
  const mcc = await metadataCacheClient(ctx);
31
33
  const helper = await mcc.forObjectByApiName(objs[0].$objectType);
32
34
  const [objectTypeRid, propertyMapping, fullLinkMapping] = await Promise.all([helper.getRid(), helper.getPropertyMapping(), helper.getLinkMapping()]);
33
35
  const linkMapping = Object.fromEntries(Object.entries(fullLinkMapping).filter(([apiName]) => linkTypes.includes(apiName)));
36
+
34
37
  // make sure the link being requested exists
35
38
  for (const linkType of linkTypes) {
36
39
  if (linkMapping[linkType] == null) {
@@ -78,6 +81,7 @@ export function createBulkLinksAsyncIterFactory(ctx) {
78
81
  const otherObjectApiName = await (await mcc.forObjectByRid(pk.objectTypeRid)).getApiName();
79
82
  const mappedLink = Object.values(linkMapping).find(a => a.directedLinkTypeRid.linkTypeRid === link.link.linkTypeRid && a.directedLinkTypeRid.linkSide === link.linkSide);
80
83
  if (!mappedLink) throw new Error("Could not find link type"); // should not happens
84
+
81
85
  yield {
82
86
  object: obj,
83
87
  linkApiName: mappedLink.apiName,
@@ -1 +1 @@
1
- {"version":3,"file":"createBulkLinksAsyncIterFactory.js","names":["getBulkLinksPage","invariant","conjureUnionType","makeConjureContext","applyPageToken","getResults","pageRequestAsAsyncIter","metadataCacheClient","createBulkLinksAsyncIterFactory","ctx","objs","linkTypes","length","logger","debug","every","a","$objectType","process","env","NODE_ENV","mcc","helper","forObjectByApiName","objectTypeRid","propertyMapping","fullLinkMapping","Promise","all","getRid","getPropertyMapping","getLinkMapping","linkMapping","Object","fromEntries","entries","filter","apiName","includes","linkType","req","objectSetContext","forkRid","undefined","objectSetFilterContext","parameterOverrides","ontologyBranchRid","owningRid","reportUsage","workstateRid","responseOptions","includeObjectSetEntities","includeUsageCost","pageSize","pageToken","linksRequests","directedLinkTypes","values","map","directedLinkTypeRid","objects","o","objectPrimaryKey","pk","rid","type","$primaryKey","bulkLinksIter","bind","item","objectIdentifier","obj","findObject","link","links","ref","linkSide","getPrimaryKeyOrThrow","otherObjectApiName","forObjectByRid","getApiName","mappedLink","find","linkTypeRid","Error","object","linkApiName","otherObjectPk","pkValue","pks","objectLocatorV2"],"sources":["createBulkLinksAsyncIterFactory.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getBulkLinksPage } from \"@osdk/client.unstable\";\nimport invariant from \"tiny-invariant\";\nimport { conjureUnionType } from \"../objectSet/conjureUnionType.js\";\nimport { makeConjureContext } from \"../ontology/makeConjureContext.js\";\nimport { applyPageToken, getResults, pageRequestAsAsyncIter, } from \"../pageRequestAsAsyncIter.js\";\nimport { metadataCacheClient } from \"./ConjureSupport.js\";\nexport function createBulkLinksAsyncIterFactory(ctx) {\n return async function* (objs, linkTypes) {\n if (objs.length === 0) {\n return;\n }\n ctx.logger?.debug(\"Preparing to fetch bulk links\");\n // require all objects to be the same type for now\n invariant(objs.every(a => a.$objectType === objs[0].$objectType));\n const mcc = await metadataCacheClient(ctx);\n const helper = await mcc.forObjectByApiName(objs[0].$objectType);\n const [objectTypeRid, propertyMapping, fullLinkMapping] = await Promise.all([\n helper.getRid(),\n helper.getPropertyMapping(),\n helper.getLinkMapping(),\n ]);\n const linkMapping = Object.fromEntries(Object.entries(fullLinkMapping)\n .filter(([apiName]) => linkTypes.includes(apiName)));\n // make sure the link being requested exists\n for (const linkType of linkTypes) {\n if (linkMapping[linkType] == null) {\n throw \"Unable to find link type: \" + linkType;\n }\n }\n const req = {\n objectSetContext: {\n forkRid: undefined,\n objectSetFilterContext: { parameterOverrides: {} },\n ontologyBranchRid: undefined,\n owningRid: undefined,\n reportUsage: undefined,\n workstateRid: undefined,\n },\n responseOptions: {\n includeObjectSetEntities: true,\n includeUsageCost: false,\n },\n pageSize: 1000,\n pageToken: undefined,\n linksRequests: [{\n directedLinkTypes: Object.values(linkMapping)\n .map(({ directedLinkTypeRid }) => directedLinkTypeRid),\n objects: conjureUnionType(\"objects\", objs.map(o => conjureUnionType(\"objectLocatorV2\", {\n objectTypeRid,\n objectPrimaryKey: {\n [propertyMapping.pk.rid]: conjureUnionType(propertyMapping.pk.type.type, o.$primaryKey),\n },\n }))),\n }],\n };\n const bulkLinksIter = pageRequestAsAsyncIter(getBulkLinksPage.bind(undefined, makeConjureContext(ctx, \"object-set-service/api\")), getResults, applyPageToken, req);\n for await (const item of bulkLinksIter) {\n const { objectIdentifier } = item;\n const obj = findObject(objectIdentifier, objs);\n for (const link of item.links) {\n const ref = link.link[link.linkSide === \"SOURCE\"\n ? \"objectSideB\"\n : \"objectSideA\"];\n const pk = getPrimaryKeyOrThrow(ref);\n const otherObjectApiName = await (await mcc.forObjectByRid(pk.objectTypeRid))\n .getApiName();\n const mappedLink = Object.values(linkMapping).find(a => a.directedLinkTypeRid.linkTypeRid === link.link.linkTypeRid\n && a.directedLinkTypeRid.linkSide === link.linkSide);\n if (!mappedLink)\n throw new Error(\"Could not find link type\"); // should not happens\n yield {\n object: obj,\n linkApiName: mappedLink.apiName,\n otherObjectApiName: otherObjectApiName,\n otherObjectPk: pk.pkValue,\n };\n }\n }\n };\n}\nfunction findObject(objectIdentifier, objs) {\n const { pkValue } = getPrimaryKeyOrThrow(objectIdentifier);\n const obj = objs.find(o => o.$primaryKey === pkValue);\n if (obj == null) {\n throw new Error(`Needed to find object with pk ${pkValue}} and could not`);\n }\n return obj;\n}\nfunction getPrimaryKeyOrThrow(ref) {\n if (\"type\" in ref && ref.type !== \"objectLocatorV2\") {\n throw new Error(\"We do not support looking up object by rid\");\n }\n const pks = Object.entries(ref.objectLocatorV2.objectPrimaryKey);\n if (pks.length !== 1) {\n throw new Error(\"Unable to support this request due to multiple pks\");\n }\n return {\n objectTypeRid: ref.objectLocatorV2.objectTypeRid,\n pkValue: pks[0][1][pks[0][1].type],\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,gBAAgB,QAAQ,uBAAuB;AACxD,OAAOC,SAAS,MAAM,gBAAgB;AACtC,SAASC,gBAAgB,QAAQ,kCAAkC;AACnE,SAASC,kBAAkB,QAAQ,mCAAmC;AACtE,SAASC,cAAc,EAAEC,UAAU,EAAEC,sBAAsB,QAAS,8BAA8B;AAClG,SAASC,mBAAmB,QAAQ,qBAAqB;AACzD,OAAO,SAASC,+BAA+BA,CAACC,GAAG,EAAE;EACjD,OAAO,iBAAiBC,IAAI,EAAEC,SAAS,EAAE;IACrC,IAAID,IAAI,CAACE,MAAM,KAAK,CAAC,EAAE;MACnB;IACJ;IACAH,GAAG,CAACI,MAAM,EAAEC,KAAK,CAAC,+BAA+B,CAAC;IAClD;IACA,CAAUJ,IAAI,CAACK,KAAK,CAACC,CAAC,IAAIA,CAAC,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a,EAAEmD,GAAG,CAACe,eAAe,CAAClE,aAAa;IAChDgE,OAAO,EAAEC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACA,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACxB,IAAI;EACrC,CAAC;AACL","ignoreList":[]}
1
+ {"version":3,"file":"createBulkLinksAsyncIterFactory.js","names":["getBulkLinksPage","invariant","conjureUnionType","makeConjureContext","applyPageToken","getResults","pageRequestAsAsyncIter","metadataCacheClient","createBulkLinksAsyncIterFactory","ctx","objs","linkTypes","length","logger","debug","every","a","$objectType","process","env","NODE_ENV","mcc","helper","forObjectByApiName","objectTypeRid","propertyMapping","fullLinkMapping","Promise","all","getRid","getPropertyMapping","getLinkMapping","linkMapping","Object","fromEntries","entries","filter","apiName","includes","linkType","req","objectSetContext","forkRid","undefined","objectSetFilterContext","parameterOverrides","ontologyBranchRid","owningRid","reportUsage","workstateRid","responseOptions","includeObjectSetEntities","includeUsageCost","pageSize","pageToken","linksRequests","directedLinkTypes","values","map","directedLinkTypeRid","objects","o","objectPrimaryKey","pk","rid","type","$primaryKey","bulkLinksIter","bind","item","objectIdentifier","obj","findObject","link","links","ref","linkSide","getPrimaryKeyOrThrow","otherObjectApiName","forObjectByRid","getApiName","mappedLink","find","linkTypeRid","Error","object","linkApiName","otherObjectPk","pkValue","pks","objectLocatorV2"],"sources":["createBulkLinksAsyncIterFactory.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 { OsdkBase } from \"@osdk/api\";\nimport type { EXPERIMENTAL_BulkLinkResult as BulkLinkResult } from \"@osdk/api/unstable\";\nimport type {\n DirectedLinkTypeRid,\n FoundryObjectReference,\n GetBulkLinksPageRequest,\n ObjectIdentifier,\n} from \"@osdk/client.unstable\";\nimport { getBulkLinksPage } from \"@osdk/client.unstable\";\nimport invariant from \"tiny-invariant\";\nimport type { MinimalClient } from \"../MinimalClientContext.js\";\nimport { conjureUnionType } from \"../objectSet/conjureUnionType.js\";\nimport { makeConjureContext } from \"../ontology/makeConjureContext.js\";\nimport {\n applyPageToken,\n getResults,\n pageRequestAsAsyncIter,\n} from \"../pageRequestAsAsyncIter.js\";\nimport { metadataCacheClient } from \"./ConjureSupport.js\";\n\nexport function createBulkLinksAsyncIterFactory(ctx: MinimalClient) {\n return async function*(\n objs: Array<OsdkBase<any>>,\n linkTypes: string[],\n ): AsyncGenerator<BulkLinkResult, void, unknown> {\n if (objs.length === 0) {\n return;\n }\n\n ctx.logger?.debug(\"Preparing to fetch bulk links\");\n\n // require all objects to be the same type for now\n invariant(objs.every(a => a.$objectType === objs[0].$objectType));\n\n const mcc = await metadataCacheClient(ctx);\n const helper = await mcc.forObjectByApiName(objs[0].$objectType);\n\n const [objectTypeRid, propertyMapping, fullLinkMapping] = await Promise.all(\n [\n helper.getRid(),\n helper.getPropertyMapping(),\n helper.getLinkMapping(),\n ],\n );\n\n const linkMapping = Object.fromEntries(\n Object.entries(fullLinkMapping)\n .filter(([apiName]) => linkTypes.includes(apiName)),\n );\n\n // make sure the link being requested exists\n for (const linkType of linkTypes) {\n if (linkMapping[linkType] == null) {\n throw \"Unable to find link type: \" + linkType;\n }\n }\n\n const req: GetBulkLinksPageRequest = {\n objectSetContext: {\n forkRid: undefined,\n objectSetFilterContext: { parameterOverrides: {} },\n ontologyBranchRid: undefined,\n owningRid: undefined,\n reportUsage: undefined,\n workstateRid: undefined,\n },\n responseOptions: {\n includeObjectSetEntities: true,\n includeUsageCost: false,\n },\n pageSize: 1000,\n pageToken: undefined,\n linksRequests: [{\n directedLinkTypes: Object.values(linkMapping)\n .map<DirectedLinkTypeRid>(({ directedLinkTypeRid }) =>\n directedLinkTypeRid\n ),\n objects: conjureUnionType(\n \"objects\",\n objs.map<ObjectIdentifier>(o =>\n conjureUnionType(\"objectLocatorV2\", {\n objectTypeRid,\n objectPrimaryKey: {\n [propertyMapping.pk.rid]: conjureUnionType(\n propertyMapping.pk.type.type as \"string\",\n o.$primaryKey as string,\n ),\n },\n })\n ),\n ),\n }],\n };\n\n const bulkLinksIter = pageRequestAsAsyncIter(\n getBulkLinksPage.bind(\n undefined,\n makeConjureContext(ctx, \"object-set-service/api\"),\n ),\n getResults,\n applyPageToken,\n req,\n );\n\n for await (const item of bulkLinksIter) {\n const { objectIdentifier } = item;\n const obj = findObject(objectIdentifier, objs);\n\n for (const link of item.links) {\n const ref = link.link[\n link.linkSide === \"SOURCE\"\n ? \"objectSideB\"\n : \"objectSideA\"\n ];\n const pk = getPrimaryKeyOrThrow(ref);\n const otherObjectApiName =\n await (await mcc.forObjectByRid(pk.objectTypeRid))\n .getApiName();\n\n const mappedLink = Object.values(linkMapping).find(a =>\n a.directedLinkTypeRid.linkTypeRid === link.link.linkTypeRid\n && a.directedLinkTypeRid.linkSide === link.linkSide\n );\n if (!mappedLink) throw new Error(\"Could not find link type\"); // should not happens\n\n yield {\n object: obj,\n linkApiName: mappedLink.apiName,\n otherObjectApiName: otherObjectApiName,\n otherObjectPk: pk.pkValue,\n };\n }\n }\n };\n}\n\nfunction findObject(\n objectIdentifier: ObjectIdentifier,\n objs: (OsdkBase<any>)[],\n) {\n const { pkValue } = getPrimaryKeyOrThrow(objectIdentifier);\n\n const obj = objs.find(o => o.$primaryKey === pkValue);\n if (obj == null) {\n throw new Error(\n `Needed to find object with pk ${pkValue}} and could not`,\n );\n }\n return obj;\n}\n\nfunction getPrimaryKeyOrThrow(\n ref: FoundryObjectReference | ObjectIdentifier,\n) {\n if (\"type\" in ref && ref.type !== \"objectLocatorV2\") {\n throw new Error(\"We do not support looking up object by rid\");\n }\n\n const pks = Object.entries(ref.objectLocatorV2.objectPrimaryKey);\n if (pks.length !== 1) {\n throw new Error(\n \"Unable to support this request due to multiple pks\",\n );\n }\n\n return {\n objectTypeRid: ref.objectLocatorV2.objectTypeRid,\n pkValue: (pks[0][1] as any)[pks[0][1].type] as unknown,\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,SAASA,gBAAgB,QAAQ,uBAAuB;AACxD,OAAOC,SAAS,MAAM,gBAAgB;AAEtC,SAASC,gBAAgB,QAAQ,kCAAkC;AACnE,SAASC,kBAAkB,QAAQ,mCAAmC;AACtE,SACEC,cAAc,EACdC,UAAU,EACVC,sBAAsB,QACjB,8BAA8B;AACrC,SAASC,mBAAmB,QAAQ,qBAAqB;AAEzD,OAAO,SAASC,+BAA+BA,CAACC,GAAkB,EAAE;EAClE,OAAO,iBACLC,IAA0B,EAC1BC,SAAmB,EAC4B;IAC/C,IAAID,IAAI,CAACE,MAAM,KAAK,CAAC,EAAE;MACrB;IACF;IAEAH,GAAG,CAACI,MAAM,EAAEC,KAAK,CAAC,+BAA+B,CAAC;;IAElD;IACA,CAAUJ,IAAI,CAACK,KAAK,CAACC,CAAC,IAAIA,CAAC,CAACC,WAAW,KAAKP,IAAI,CAAC,CAAC,CAAC,CAACO,WAAW,CAAC,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAhEnB,SAAS,UAATA,SAAS;IAET,MAAMoB,GAAG,GAAG,MAAMd,mBAAmB,CAACE,GAAG,CAAC;IAC1C,MAAMa,MAAM,GAAG,MAAMD,GAAG,CAACE,kBAAkB,CAACb,IAAI,CAAC,CAAC,CAAC,CAACO,WAAW,CAAC;IAEhE,MAAM,CAACO,aAAa,EAAEC,eAAe,EAAEC,eAAe,CAAC,GAAG,MAAMC,OAAO,CAACC,GAAG,CACzE,CACEN,MAAM,CAACO,MAAM,CAA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ACtCS,aAAa,EAAExB,EAAE,CAACyB;QACpB,CAAC;MACH;IACF;EACF,CAAC;AACH;AAEA,SAAShB,UAAUA,CACjBF,gBAAkC,EAClC5D,IAAuB,EACvB;EACA,MAAM;IAAE8E;EAAQ,CAAC,GAAGX,oBAAoB,CAACP,gBAAgB,CAAC;EAE1D,MAAMC,GAAG,GAAG7D,IAAI,CAACwE,IAAI,CAACrB,CAAC,IAAIA,CAAC,CAACK,WAAW,KAAKsB,OAAO,CAAC;EACrD,IAAIjB,GAAG,IAAI,IAAI,EAAE;IACf,MAAM,IAAIa,KAAK,CACb,iCAAiCI,OAAO,iBAC1C,CAAC;EACH;EACA,OAAOjB,GAAG;AACZ;AAEA,SAASM,oBAAoBA,CAC3BF,GAA8C,EAC9C;EACA,IAAI,MAAM,IAAIA,GAAG,IAAIA,GAAG,CAACV,IAAI,KAAK,iBAAiB,EAAE;IACnD,MAAM,IAAImB,KAAK,CAAC,4CAA4C,CAAC;EAC/D;EAEA,MAAMK,GAAG,GAAGxD,MAAM,CAACE,OAAO,CAACwC,GAAG,CAACe,eAAe,CAAC5B,gBAAgB,CAAC;EAChE,IAAI2B,GAAG,CAAC7E,MAAM,KAAK,CAAC,EAAE;IACpB,MAAM,IAAIwE,KAAK,CACb,oDACF,CAAC;EACH;EAEA,OAAO;IACL5D,aAAa,EAAEmD,GAAG,CAACe,eAAe,CAAClE,aAAa;IAChDgE,OAAO,EAAGC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAASA,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACxB,IAAI;EAC5C,CAAC;AACH","ignoreList":[]}
@@ -13,8 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  export class ActionValidationError extends Error {
17
- validation;
18
18
  constructor(validation) {
19
19
  super("Validation Error");
20
20
  this.validation = validation;
@@ -1 +1 @@
1
- {"version":3,"file":"ActionValidationError.js","names":["ActionValidationError","Error","validation","constructor"],"sources":["ActionValidationError.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class ActionValidationError extends Error {\n validation;\n constructor(validation) {\n super(\"Validation Error\");\n this.validation = validation;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,qBAAqB,SAASC,KAAK,CAAC;EAC7CC,UAAU;EACVC,WAAWA,CAACD,UAAU,EAAE;IACpB,KAAK,CAAC,kBAAkB,CAAC;IACzB,IAAI,CAACA,UAAU,GAAGA,UAAU;EAChC;AACJ","ignoreList":[]}
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":[]}
@@ -13,7 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { $Actions, $ontologyRid, actionTakesAttachment, createOffice, createStructPerson, moveOffice } from "@osdk/client.test.ontology";
16
+
17
+ import { $Actions, $ontologyRid, actionTakesAttachment, createFooInterface, createOffice, createStructPerson, deleteFooInterface, moveOffice } from "@osdk/client.test.ontology";
17
18
  import { apiServer, stubData } from "@osdk/shared.test";
18
19
  import { afterAll, beforeAll, describe, expect, expectTypeOf, it, vi } from "vitest";
19
20
  import { createClient } from "../createClient.js";
@@ -58,6 +59,7 @@ describe("actions", () => {
58
59
  "type": "edits",
59
60
  }
60
61
  `);
62
+
61
63
  // eslint-disable-next-line @typescript-eslint/no-confusing-void-expression
62
64
  const undefinedResult = await client(createOffice).applyAction({
63
65
  officeId: "NYC",
@@ -163,6 +165,7 @@ describe("actions", () => {
163
165
  expectTypeOf().toMatchTypeOf();
164
166
  const blob = stubData.attachmentUploadRequestBody[stubData.localAttachment1.filename];
165
167
  const attachment = createAttachmentUpload(blob, "file1.txt");
168
+
166
169
  // Mimics the Web file API (https://developer.mozilla.org/en-US/docs/Web/API/File). The File constructor is only available in Node 19.2.0 and above
167
170
  const fileAttachment = Object.assign(blob, {
168
171
  name: "file1.txt"
@@ -178,6 +181,31 @@ describe("actions", () => {
178
181
  expectTypeOf().toEqualTypeOf();
179
182
  expect(result2).toBeUndefined();
180
183
  });
184
+ it("Accepts interfaces", async () => {
185
+ client(deleteFooInterface).applyAction;
186
+ expectTypeOf().toMatchTypeOf();
187
+ client(deleteFooInterface).batchApplyAction;
188
+ expectTypeOf().toMatchTypeOf();
189
+ const result = await client(deleteFooInterface).applyAction({
190
+ deletedInterface: {
191
+ $objectType: "Employee",
192
+ $primaryKey: 1
193
+ }
194
+ });
195
+ expectTypeOf().toEqualTypeOf();
196
+ expect(result).toBeUndefined();
197
+ });
198
+ it("Accepts object type refs", async () => {
199
+ client(createFooInterface).applyAction;
200
+ expectTypeOf().toMatchTypeOf();
201
+ client(createFooInterface).batchApplyAction;
202
+ expectTypeOf().toMatchTypeOf();
203
+ const result = await client(createFooInterface).applyAction({
204
+ createdInterface: "UnderlyingObject"
205
+ });
206
+ expectTypeOf().toEqualTypeOf();
207
+ expect(result).toBeUndefined();
208
+ });
181
209
  it("conditionally returns edits in batch mode", async () => {
182
210
  const result = await client(moveOffice).batchApplyAction([{
183
211
  officeId: "SEA",
@@ -361,7 +389,7 @@ describe("ActionResponse remapping", () => {
361
389
  });
362
390
  it("actions are enumerable", async () => {
363
391
  const actions = Object.keys($Actions);
364
- expect(actions).toStrictEqual(["actionTakesAttachment", "actionTakesObjectSet", "createOffice", "createOfficeAndEmployee", "createStructPerson", "moveOffice", "promoteEmployee", "promoteEmployeeObject"]);
392
+ expect(actions).toStrictEqual(["actionTakesAttachment", "actionTakesObjectSet", "createFooInterface", "createOffice", "createOfficeAndEmployee", "createStructPerson", "deleteFooInterface", "moveOffice", "promoteEmployee", "promoteEmployeeObject"]);
365
393
  });
366
394
  });
367
395
  //# sourceMappingURL=actions.test.js.map