@osdk/client 2.1.0-beta.9 → 2.1.0

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 (1167) hide show
  1. package/CHANGELOG.md +529 -0
  2. package/build/browser/Client.js +7 -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 +8 -2
  17. package/build/browser/__unstable/ConjureSupport.js.map +1 -1
  18. package/build/browser/__unstable/createBulkLinksAsyncIterFactory.js +5 -1
  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 +85 -4
  23. package/build/browser/actions/actions.test.js.map +1 -1
  24. package/build/browser/actions/applyAction.js +2 -1
  25. package/build/browser/actions/applyAction.js.map +1 -1
  26. package/build/browser/createClient.js +37 -26
  27. package/build/browser/createClient.js.map +1 -1
  28. package/build/browser/createClient.test.js +25 -0
  29. package/build/browser/createClient.test.js.map +1 -1
  30. package/build/browser/createGeotimeSeriesProperty.js +5 -3
  31. package/build/browser/createGeotimeSeriesProperty.js.map +1 -1
  32. package/build/browser/createMediaReferenceProperty.js +47 -0
  33. package/build/browser/createMediaReferenceProperty.js.map +1 -0
  34. package/build/browser/createMinimalClient.js +8 -1
  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 +2 -1
  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 +19 -0
  45. package/build/browser/fetchMetadata.test.js.map +1 -1
  46. package/build/browser/index.js +2 -0
  47. package/build/browser/index.js.map +1 -1
  48. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.js +3 -1
  49. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.js.map +1 -1
  50. package/build/browser/intellisense.test.js +4 -1
  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 +67 -18
  59. package/build/browser/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
  60. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js +402 -14
  61. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -1
  62. package/build/browser/object/AttachmentUpload.js +6 -13
  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 +10 -3
  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 +7 -9
  71. package/build/browser/object/aggregate.js.map +1 -1
  72. package/build/browser/object/aggregate.test.js +11 -9
  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 -5
  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 +4 -1
  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 +42 -85
  87. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  88. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.test.js +1 -6
  89. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.test.js.map +1 -1
  90. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js +88 -88
  91. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  92. package/build/browser/object/convertWireToOsdkObjects/getDollarAs.js +9 -3
  93. package/build/browser/object/convertWireToOsdkObjects/getDollarAs.js.map +1 -1
  94. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.js +15 -38
  95. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.js.map +1 -1
  96. package/build/browser/object/convertWireToOsdkObjects.js +51 -4
  97. package/build/browser/object/convertWireToOsdkObjects.js.map +1 -1
  98. package/build/browser/object/convertWireToOsdkObjects.test.js +197 -44
  99. package/build/browser/object/convertWireToOsdkObjects.test.js.map +1 -1
  100. package/build/browser/object/fetchPage.js +42 -24
  101. package/build/browser/object/fetchPage.js.map +1 -1
  102. package/build/browser/object/fetchPage.test.js +80 -1
  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 +55 -0
  109. package/build/browser/object/media.test.js.map +1 -0
  110. package/build/browser/object/mediaUpload.js +20 -0
  111. package/build/browser/object/mediaUpload.js.map +1 -0
  112. package/build/browser/object/object.test.js +203 -10
  113. package/build/browser/object/object.test.js.map +1 -1
  114. package/build/browser/object/timeseries.test.js +11 -0
  115. package/build/browser/object/timeseries.test.js.map +1 -1
  116. package/build/browser/objectSet/InterfaceObjectSet.test.js +65 -0
  117. package/build/browser/objectSet/InterfaceObjectSet.test.js.map +1 -0
  118. package/build/browser/objectSet/ObjectSet.test.js +140 -28
  119. package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
  120. package/build/browser/objectSet/ObjectSetFactory.js +0 -15
  121. package/build/browser/objectSet/ObjectSetFactory.js.map +1 -1
  122. package/build/browser/objectSet/ObjectSetListenerWebsocket.js +117 -37
  123. package/build/browser/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
  124. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js +53 -26
  125. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -1
  126. package/build/browser/objectSet/conjureUnionType.js +1 -0
  127. package/build/browser/objectSet/conjureUnionType.js.map +1 -1
  128. package/build/browser/objectSet/createObjectSet.js +9 -6
  129. package/build/browser/objectSet/createObjectSet.js.map +1 -1
  130. package/build/browser/observable/DebugFlags.js +19 -0
  131. package/build/browser/observable/DebugFlags.js.map +1 -0
  132. package/build/browser/observable/ListPayload.js +2 -0
  133. package/build/browser/observable/ListPayload.js.map +1 -0
  134. package/build/browser/observable/ObjectPayload.js +2 -0
  135. package/build/browser/observable/ObjectPayload.js.map +1 -0
  136. package/build/browser/observable/ObservableClient.js +23 -0
  137. package/build/browser/observable/ObservableClient.js.map +1 -0
  138. package/build/browser/observable/OptimisticBuilder.js +2 -0
  139. package/build/browser/observable/OptimisticBuilder.js.map +1 -0
  140. package/build/browser/observable/internal/CacheKey.js +2 -0
  141. package/build/browser/observable/internal/CacheKey.js.map +1 -0
  142. package/build/browser/observable/internal/CacheKeys.js +60 -0
  143. package/build/browser/observable/internal/CacheKeys.js.map +1 -0
  144. package/build/browser/observable/internal/Canonical.js +2 -0
  145. package/build/browser/observable/internal/Canonical.js.map +1 -0
  146. package/build/browser/observable/internal/ChangedObjects.js +24 -0
  147. package/build/browser/observable/internal/ChangedObjects.js.map +1 -0
  148. package/build/browser/observable/internal/Layer.js +76 -0
  149. package/build/browser/observable/internal/Layer.js.map +1 -0
  150. package/build/browser/observable/internal/ListQuery.js +250 -0
  151. package/build/browser/observable/internal/ListQuery.js.map +1 -0
  152. package/build/browser/observable/internal/ObjectQuery.js +71 -0
  153. package/build/browser/observable/internal/ObjectQuery.js.map +1 -0
  154. package/build/browser/observable/internal/ObservableClientImpl.js +38 -0
  155. package/build/browser/observable/internal/ObservableClientImpl.js.map +1 -0
  156. package/build/browser/observable/internal/OptimisticId.js +30 -0
  157. package/build/browser/observable/internal/OptimisticId.js.map +1 -0
  158. package/build/browser/observable/internal/OptimisticJob.js +91 -0
  159. package/build/browser/observable/internal/OptimisticJob.js.map +1 -0
  160. package/build/browser/observable/internal/Query.js +70 -0
  161. package/build/browser/observable/internal/Query.js.map +1 -0
  162. package/build/browser/observable/internal/RefCounts.js +77 -0
  163. package/build/browser/observable/internal/RefCounts.js.map +1 -0
  164. package/build/browser/observable/internal/Store.js +464 -0
  165. package/build/browser/observable/internal/Store.js.map +1 -0
  166. package/build/browser/observable/internal/Store.test.js +765 -0
  167. package/build/browser/observable/internal/Store.test.js.map +1 -0
  168. package/build/browser/observable/internal/WeakMapWithEntries.js +124 -0
  169. package/build/browser/observable/internal/WeakMapWithEntries.js.map +1 -0
  170. package/build/browser/observable/internal/WhereClauseCanonicalizer.js +83 -0
  171. package/build/browser/observable/internal/WhereClauseCanonicalizer.js.map +1 -0
  172. package/build/browser/observable/internal/WhereClauseCanonicalizer.test.js +131 -0
  173. package/build/browser/observable/internal/WhereClauseCanonicalizer.test.js.map +1 -0
  174. package/build/browser/observable/internal/objectMatchesWhereClause.js +112 -0
  175. package/build/browser/observable/internal/objectMatchesWhereClause.js.map +1 -0
  176. package/build/browser/observable/internal/objectMatchesWhereClause.test.js +121 -0
  177. package/build/browser/observable/internal/objectMatchesWhereClause.test.js.map +1 -0
  178. package/build/browser/observable/internal/testUtils.js +178 -0
  179. package/build/browser/observable/internal/testUtils.js.map +1 -0
  180. package/build/browser/observable/types.js +2 -0
  181. package/build/browser/observable/types.js.map +1 -0
  182. package/build/browser/ontology/OntologyProvider.js +1 -0
  183. package/build/browser/ontology/OntologyProvider.js.map +1 -1
  184. package/build/browser/ontology/StandardOntologyProvider.js +2 -0
  185. package/build/browser/ontology/StandardOntologyProvider.js.map +1 -1
  186. package/build/browser/ontology/StandardOntologyProvider.test.js +2 -0
  187. package/build/browser/ontology/StandardOntologyProvider.test.js.map +1 -1
  188. package/build/browser/ontology/loadActionMetadata.js +2 -1
  189. package/build/browser/ontology/loadActionMetadata.js.map +1 -1
  190. package/build/browser/ontology/loadFullObjectMetadata.js +2 -1
  191. package/build/browser/ontology/loadFullObjectMetadata.js.map +1 -1
  192. package/build/browser/ontology/loadInterfaceMetadata.js +2 -1
  193. package/build/browser/ontology/loadInterfaceMetadata.js.map +1 -1
  194. package/build/browser/ontology/loadQueryMetadata.js +2 -1
  195. package/build/browser/ontology/loadQueryMetadata.js.map +1 -1
  196. package/build/browser/ontology/makeConjureContext.js +1 -0
  197. package/build/browser/ontology/makeConjureContext.js.map +1 -1
  198. package/build/browser/pageRequestAsAsyncIter.js +1 -0
  199. package/build/browser/pageRequestAsAsyncIter.js.map +1 -1
  200. package/build/browser/public/internal.js +20 -0
  201. package/build/browser/public/internal.js.map +1 -0
  202. package/build/browser/public/unstable-do-not-use.js +5 -0
  203. package/build/browser/public/unstable-do-not-use.js.map +1 -1
  204. package/build/browser/public-utils/createAndFetchTempObjectSetRid.js +34 -0
  205. package/build/browser/public-utils/createAndFetchTempObjectSetRid.js.map +1 -0
  206. package/build/browser/public-utils/hydrateAttachmentFromRid.js +45 -0
  207. package/build/browser/public-utils/hydrateAttachmentFromRid.js.map +1 -0
  208. package/build/browser/public-utils/hydrateObjectSetFromRid.js +39 -0
  209. package/build/browser/public-utils/hydrateObjectSetFromRid.js.map +1 -0
  210. package/build/browser/queries/applyQuery.js +5 -5
  211. package/build/browser/queries/applyQuery.js.map +1 -1
  212. package/build/browser/queries/queries.test.js +9 -0
  213. package/build/browser/queries/queries.test.js.map +1 -1
  214. package/build/browser/queries/types.js +0 -15
  215. package/build/browser/queries/types.js.map +1 -1
  216. package/build/browser/tsserver.js +1 -0
  217. package/build/browser/tsserver.js.map +1 -1
  218. package/build/browser/util/ArrayElement.js +0 -15
  219. package/build/browser/util/ArrayElement.js.map +1 -1
  220. package/build/browser/util/NOOP.js +0 -15
  221. package/build/browser/util/NOOP.js.map +1 -1
  222. package/build/browser/util/NullableProps.js +0 -15
  223. package/build/browser/util/NullableProps.js.map +1 -1
  224. package/build/browser/util/UserAgent.js +2 -1
  225. package/build/browser/util/UserAgent.js.map +1 -1
  226. package/build/browser/util/WireObjectSet.js +2 -0
  227. package/build/browser/util/WireObjectSet.js.map +1 -1
  228. package/build/browser/util/addUserAgentAndRequestContextHeaders.js +1 -0
  229. package/build/browser/util/addUserAgentAndRequestContextHeaders.js.map +1 -1
  230. package/build/browser/util/augmentRequestContext.js +1 -0
  231. package/build/browser/util/augmentRequestContext.js.map +1 -1
  232. package/build/browser/util/datetimeConverters.js +60 -0
  233. package/build/browser/util/datetimeConverters.js.map +1 -0
  234. package/build/browser/util/datetimeConverters.test.js +76 -0
  235. package/build/browser/util/datetimeConverters.test.js.map +1 -0
  236. package/build/browser/util/interfaceUtils.js +21 -0
  237. package/build/browser/util/interfaceUtils.js.map +1 -0
  238. package/build/browser/util/isOntologyObjectV2.js +1 -0
  239. package/build/browser/util/isOntologyObjectV2.js.map +1 -1
  240. package/build/browser/util/isOsdkBaseObject.js +1 -0
  241. package/build/browser/util/isOsdkBaseObject.js.map +1 -1
  242. package/build/browser/util/isOsdkObject.js +1 -0
  243. package/build/browser/util/isOsdkObject.js.map +1 -1
  244. package/build/browser/util/objectSetUtils.js +26 -0
  245. package/build/browser/util/objectSetUtils.js.map +1 -0
  246. package/build/browser/util/partialBy.js +0 -15
  247. package/build/browser/util/partialBy.js.map +1 -1
  248. package/build/browser/util/streamutils.js +7 -0
  249. package/build/browser/util/streamutils.js.map +1 -1
  250. package/build/browser/util/timeseriesUtils.js +2 -1
  251. package/build/browser/util/timeseriesUtils.js.map +1 -1
  252. package/build/browser/util/toDataValue.js +28 -2
  253. package/build/browser/util/toDataValue.js.map +1 -1
  254. package/build/browser/util/toDataValue.test.js +14 -1
  255. package/build/browser/util/toDataValue.test.js.map +1 -1
  256. package/build/browser/util/toDataValueQueries.js +10 -1
  257. package/build/browser/util/toDataValueQueries.js.map +1 -1
  258. package/build/cjs/Client-C8K3E1vH.d.cts +67 -0
  259. package/build/cjs/chunk-65QQ6SME.cjs +922 -0
  260. package/build/cjs/chunk-65QQ6SME.cjs.map +1 -0
  261. package/build/cjs/chunk-FEUFIE6T.cjs +465 -0
  262. package/build/cjs/chunk-FEUFIE6T.cjs.map +1 -0
  263. package/build/cjs/chunk-Q7SFCCGT.cjs +11 -0
  264. package/build/cjs/chunk-Q7SFCCGT.cjs.map +1 -0
  265. package/build/cjs/graphql-JJX5MZPQ.cjs +10491 -0
  266. package/build/cjs/graphql-JJX5MZPQ.cjs.map +1 -0
  267. package/build/cjs/index.cjs +1665 -0
  268. package/build/cjs/index.cjs.map +1 -0
  269. package/build/cjs/index.d.cts +85 -0
  270. package/build/cjs/public/internal.cjs +36 -0
  271. package/build/cjs/public/internal.cjs.map +1 -0
  272. package/build/cjs/public/internal.d.cts +33 -0
  273. package/build/cjs/public/unstable-do-not-use.cjs +1248 -0
  274. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -0
  275. package/build/cjs/public/unstable-do-not-use.d.cts +62 -0
  276. package/build/esm/Client.js +7 -0
  277. package/build/esm/Client.js.map +1 -1
  278. package/build/esm/Definitions.test.js +1 -0
  279. package/build/esm/Definitions.test.js.map +1 -1
  280. package/build/esm/Logger.js +0 -15
  281. package/build/esm/Logger.js.map +1 -1
  282. package/build/esm/MinimalClientContext.js +0 -15
  283. package/build/esm/MinimalClientContext.js.map +1 -1
  284. package/build/esm/ResultOrError.js +1 -0
  285. package/build/esm/ResultOrError.js.map +1 -1
  286. package/build/esm/SatisfiesSemver.js +0 -15
  287. package/build/esm/SatisfiesSemver.js.map +1 -1
  288. package/build/esm/SatisfiesSemver.test.js +1 -0
  289. package/build/esm/SatisfiesSemver.test.js.map +1 -1
  290. package/build/esm/__unstable/ConjureSupport.js +8 -2
  291. package/build/esm/__unstable/ConjureSupport.js.map +1 -1
  292. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.js +5 -1
  293. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.js.map +1 -1
  294. package/build/esm/actions/ActionValidationError.js +1 -1
  295. package/build/esm/actions/ActionValidationError.js.map +1 -1
  296. package/build/esm/actions/actions.test.js +85 -4
  297. package/build/esm/actions/actions.test.js.map +1 -1
  298. package/build/esm/actions/applyAction.js +2 -1
  299. package/build/esm/actions/applyAction.js.map +1 -1
  300. package/build/esm/createClient.js +37 -26
  301. package/build/esm/createClient.js.map +1 -1
  302. package/build/esm/createClient.test.js +25 -0
  303. package/build/esm/createClient.test.js.map +1 -1
  304. package/build/esm/createGeotimeSeriesProperty.js +5 -3
  305. package/build/esm/createGeotimeSeriesProperty.js.map +1 -1
  306. package/build/esm/createMediaReferenceProperty.js +47 -0
  307. package/build/esm/createMediaReferenceProperty.js.map +1 -0
  308. package/build/esm/createMinimalClient.js +8 -1
  309. package/build/esm/createMinimalClient.js.map +1 -1
  310. package/build/esm/createPlatformClient.js +1 -0
  311. package/build/esm/createPlatformClient.js.map +1 -1
  312. package/build/esm/createTimeseriesProperty.js +2 -1
  313. package/build/esm/createTimeseriesProperty.js.map +1 -1
  314. package/build/esm/definitions/LinkDefinitions.test.js +4 -0
  315. package/build/esm/definitions/LinkDefinitions.test.js.map +1 -1
  316. package/build/esm/fetchMetadata.js +2 -0
  317. package/build/esm/fetchMetadata.js.map +1 -1
  318. package/build/esm/fetchMetadata.test.js +19 -0
  319. package/build/esm/fetchMetadata.test.js.map +1 -1
  320. package/build/esm/index.js +2 -0
  321. package/build/esm/index.js.map +1 -1
  322. package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.js +3 -1
  323. package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.js.map +1 -1
  324. package/build/esm/intellisense.test.js +4 -1
  325. package/build/esm/intellisense.test.js.map +1 -1
  326. package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.js +2 -0
  327. package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.js.map +1 -1
  328. package/build/esm/internal/conversions/modernToLegacyAggregationClause.js +2 -0
  329. package/build/esm/internal/conversions/modernToLegacyAggregationClause.js.map +1 -1
  330. package/build/esm/internal/conversions/modernToLegacyGroupByClause.js +1 -0
  331. package/build/esm/internal/conversions/modernToLegacyGroupByClause.js.map +1 -1
  332. package/build/esm/internal/conversions/modernToLegacyWhereClause.js +67 -18
  333. package/build/esm/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
  334. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js +402 -14
  335. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -1
  336. package/build/esm/object/AttachmentUpload.js +6 -13
  337. package/build/esm/object/AttachmentUpload.js.map +1 -1
  338. package/build/esm/object/Cache.js +27 -0
  339. package/build/esm/object/Cache.js.map +1 -1
  340. package/build/esm/object/Cache.test.js +10 -3
  341. package/build/esm/object/Cache.test.js.map +1 -1
  342. package/build/esm/object/SimpleCache.js +20 -0
  343. package/build/esm/object/SimpleCache.js.map +1 -1
  344. package/build/esm/object/aggregate.js +7 -9
  345. package/build/esm/object/aggregate.js.map +1 -1
  346. package/build/esm/object/aggregate.test.js +11 -9
  347. package/build/esm/object/aggregate.test.js.map +1 -1
  348. package/build/esm/object/attachment.test.js +1 -0
  349. package/build/esm/object/attachment.test.js.map +1 -1
  350. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js +0 -15
  351. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -1
  352. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.js +4 -5
  353. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.js.map +1 -1
  354. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.js +0 -15
  355. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.js.map +1 -1
  356. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js +4 -1
  357. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js.map +1 -1
  358. package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js +0 -15
  359. package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js.map +1 -1
  360. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js +42 -85
  361. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  362. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.test.js +1 -6
  363. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.test.js.map +1 -1
  364. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js +88 -88
  365. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  366. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.js +9 -3
  367. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.js.map +1 -1
  368. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.js +15 -38
  369. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.js.map +1 -1
  370. package/build/esm/object/convertWireToOsdkObjects.js +51 -4
  371. package/build/esm/object/convertWireToOsdkObjects.js.map +1 -1
  372. package/build/esm/object/convertWireToOsdkObjects.test.js +197 -44
  373. package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -1
  374. package/build/esm/object/fetchPage.js +42 -24
  375. package/build/esm/object/fetchPage.js.map +1 -1
  376. package/build/esm/object/fetchPage.test.js +80 -1
  377. package/build/esm/object/fetchPage.test.js.map +1 -1
  378. package/build/esm/object/fetchSingle.js +3 -0
  379. package/build/esm/object/fetchSingle.js.map +1 -1
  380. package/build/esm/object/geotimeseriesreference.test.js +2 -0
  381. package/build/esm/object/geotimeseriesreference.test.js.map +1 -1
  382. package/build/esm/object/media.test.js +55 -0
  383. package/build/esm/object/media.test.js.map +1 -0
  384. package/build/esm/object/mediaUpload.js +20 -0
  385. package/build/esm/object/mediaUpload.js.map +1 -0
  386. package/build/esm/object/object.test.js +203 -10
  387. package/build/esm/object/object.test.js.map +1 -1
  388. package/build/esm/object/timeseries.test.js +11 -0
  389. package/build/esm/object/timeseries.test.js.map +1 -1
  390. package/build/esm/objectSet/InterfaceObjectSet.test.js +65 -0
  391. package/build/esm/objectSet/InterfaceObjectSet.test.js.map +1 -0
  392. package/build/esm/objectSet/ObjectSet.test.js +140 -28
  393. package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
  394. package/build/esm/objectSet/ObjectSetFactory.js +0 -15
  395. package/build/esm/objectSet/ObjectSetFactory.js.map +1 -1
  396. package/build/esm/objectSet/ObjectSetListenerWebsocket.js +117 -40
  397. package/build/esm/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
  398. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js +53 -26
  399. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -1
  400. package/build/esm/objectSet/conjureUnionType.js +1 -0
  401. package/build/esm/objectSet/conjureUnionType.js.map +1 -1
  402. package/build/esm/objectSet/createObjectSet.js +9 -6
  403. package/build/esm/objectSet/createObjectSet.js.map +1 -1
  404. package/build/esm/observable/DebugFlags.js +19 -0
  405. package/build/esm/observable/DebugFlags.js.map +1 -0
  406. package/build/esm/observable/ListPayload.js +2 -0
  407. package/build/esm/observable/ListPayload.js.map +1 -0
  408. package/build/esm/observable/ObjectPayload.js +2 -0
  409. package/build/esm/observable/ObjectPayload.js.map +1 -0
  410. package/build/esm/observable/ObservableClient.js +23 -0
  411. package/build/esm/observable/ObservableClient.js.map +1 -0
  412. package/build/esm/observable/OptimisticBuilder.js +2 -0
  413. package/build/esm/observable/OptimisticBuilder.js.map +1 -0
  414. package/build/esm/observable/internal/CacheKey.js +2 -0
  415. package/build/esm/observable/internal/CacheKey.js.map +1 -0
  416. package/build/esm/observable/internal/CacheKeys.js +60 -0
  417. package/build/esm/observable/internal/CacheKeys.js.map +1 -0
  418. package/build/esm/observable/internal/Canonical.js +2 -0
  419. package/build/esm/observable/internal/Canonical.js.map +1 -0
  420. package/build/esm/observable/internal/ChangedObjects.js +24 -0
  421. package/build/esm/observable/internal/ChangedObjects.js.map +1 -0
  422. package/build/esm/observable/internal/Layer.js +76 -0
  423. package/build/esm/observable/internal/Layer.js.map +1 -0
  424. package/build/esm/observable/internal/ListQuery.js +250 -0
  425. package/build/esm/observable/internal/ListQuery.js.map +1 -0
  426. package/build/esm/observable/internal/ObjectQuery.js +71 -0
  427. package/build/esm/observable/internal/ObjectQuery.js.map +1 -0
  428. package/build/esm/observable/internal/ObservableClientImpl.js +38 -0
  429. package/build/esm/observable/internal/ObservableClientImpl.js.map +1 -0
  430. package/build/esm/observable/internal/OptimisticId.js +30 -0
  431. package/build/esm/observable/internal/OptimisticId.js.map +1 -0
  432. package/build/esm/observable/internal/OptimisticJob.js +91 -0
  433. package/build/esm/observable/internal/OptimisticJob.js.map +1 -0
  434. package/build/esm/observable/internal/Query.js +70 -0
  435. package/build/esm/observable/internal/Query.js.map +1 -0
  436. package/build/esm/observable/internal/RefCounts.js +77 -0
  437. package/build/esm/observable/internal/RefCounts.js.map +1 -0
  438. package/build/esm/observable/internal/Store.js +464 -0
  439. package/build/esm/observable/internal/Store.js.map +1 -0
  440. package/build/esm/observable/internal/Store.test.js +765 -0
  441. package/build/esm/observable/internal/Store.test.js.map +1 -0
  442. package/build/esm/observable/internal/WeakMapWithEntries.js +124 -0
  443. package/build/esm/observable/internal/WeakMapWithEntries.js.map +1 -0
  444. package/build/esm/observable/internal/WhereClauseCanonicalizer.js +83 -0
  445. package/build/esm/observable/internal/WhereClauseCanonicalizer.js.map +1 -0
  446. package/build/esm/observable/internal/WhereClauseCanonicalizer.test.js +131 -0
  447. package/build/esm/observable/internal/WhereClauseCanonicalizer.test.js.map +1 -0
  448. package/build/esm/observable/internal/objectMatchesWhereClause.js +112 -0
  449. package/build/esm/observable/internal/objectMatchesWhereClause.js.map +1 -0
  450. package/build/esm/observable/internal/objectMatchesWhereClause.test.js +121 -0
  451. package/build/esm/observable/internal/objectMatchesWhereClause.test.js.map +1 -0
  452. package/build/esm/observable/internal/testUtils.js +178 -0
  453. package/build/esm/observable/internal/testUtils.js.map +1 -0
  454. package/build/esm/observable/types.js +2 -0
  455. package/build/esm/observable/types.js.map +1 -0
  456. package/build/esm/ontology/OntologyProvider.js +1 -0
  457. package/build/esm/ontology/OntologyProvider.js.map +1 -1
  458. package/build/esm/ontology/StandardOntologyProvider.js +2 -0
  459. package/build/esm/ontology/StandardOntologyProvider.js.map +1 -1
  460. package/build/esm/ontology/StandardOntologyProvider.test.js +2 -0
  461. package/build/esm/ontology/StandardOntologyProvider.test.js.map +1 -1
  462. package/build/esm/ontology/loadActionMetadata.js +2 -1
  463. package/build/esm/ontology/loadActionMetadata.js.map +1 -1
  464. package/build/esm/ontology/loadFullObjectMetadata.js +2 -1
  465. package/build/esm/ontology/loadFullObjectMetadata.js.map +1 -1
  466. package/build/esm/ontology/loadInterfaceMetadata.js +2 -1
  467. package/build/esm/ontology/loadInterfaceMetadata.js.map +1 -1
  468. package/build/esm/ontology/loadQueryMetadata.js +2 -1
  469. package/build/esm/ontology/loadQueryMetadata.js.map +1 -1
  470. package/build/esm/ontology/makeConjureContext.js +1 -0
  471. package/build/esm/ontology/makeConjureContext.js.map +1 -1
  472. package/build/esm/pageRequestAsAsyncIter.js +1 -0
  473. package/build/esm/pageRequestAsAsyncIter.js.map +1 -1
  474. package/build/esm/public/internal.js +20 -0
  475. package/build/esm/public/internal.js.map +1 -0
  476. package/build/esm/public/unstable-do-not-use.js +5 -0
  477. package/build/esm/public/unstable-do-not-use.js.map +1 -1
  478. package/build/esm/public-utils/createAndFetchTempObjectSetRid.js +34 -0
  479. package/build/esm/public-utils/createAndFetchTempObjectSetRid.js.map +1 -0
  480. package/build/esm/public-utils/hydrateAttachmentFromRid.js +45 -0
  481. package/build/esm/public-utils/hydrateAttachmentFromRid.js.map +1 -0
  482. package/build/esm/public-utils/hydrateObjectSetFromRid.js +39 -0
  483. package/build/esm/public-utils/hydrateObjectSetFromRid.js.map +1 -0
  484. package/build/esm/queries/applyQuery.js +5 -5
  485. package/build/esm/queries/applyQuery.js.map +1 -1
  486. package/build/esm/queries/queries.test.js +9 -0
  487. package/build/esm/queries/queries.test.js.map +1 -1
  488. package/build/esm/queries/types.js +0 -15
  489. package/build/esm/queries/types.js.map +1 -1
  490. package/build/esm/tsserver.js +1 -0
  491. package/build/esm/tsserver.js.map +1 -1
  492. package/build/esm/util/ArrayElement.js +0 -15
  493. package/build/esm/util/ArrayElement.js.map +1 -1
  494. package/build/esm/util/NOOP.js +0 -15
  495. package/build/esm/util/NOOP.js.map +1 -1
  496. package/build/esm/util/NullableProps.js +0 -15
  497. package/build/esm/util/NullableProps.js.map +1 -1
  498. package/build/esm/util/UserAgent.js +2 -1
  499. package/build/esm/util/UserAgent.js.map +1 -1
  500. package/build/esm/util/WireObjectSet.js +2 -0
  501. package/build/esm/util/WireObjectSet.js.map +1 -1
  502. package/build/esm/util/addUserAgentAndRequestContextHeaders.js +1 -0
  503. package/build/esm/util/addUserAgentAndRequestContextHeaders.js.map +1 -1
  504. package/build/esm/util/augmentRequestContext.js +1 -0
  505. package/build/esm/util/augmentRequestContext.js.map +1 -1
  506. package/build/esm/util/datetimeConverters.js +60 -0
  507. package/build/esm/util/datetimeConverters.js.map +1 -0
  508. package/build/esm/util/datetimeConverters.test.js +76 -0
  509. package/build/esm/util/datetimeConverters.test.js.map +1 -0
  510. package/build/esm/util/interfaceUtils.js +21 -0
  511. package/build/esm/util/interfaceUtils.js.map +1 -0
  512. package/build/esm/util/isOntologyObjectV2.js +1 -0
  513. package/build/esm/util/isOntologyObjectV2.js.map +1 -1
  514. package/build/esm/util/isOsdkBaseObject.js +1 -0
  515. package/build/esm/util/isOsdkBaseObject.js.map +1 -1
  516. package/build/esm/util/isOsdkObject.js +1 -0
  517. package/build/esm/util/isOsdkObject.js.map +1 -1
  518. package/build/esm/util/objectSetUtils.js +26 -0
  519. package/build/esm/util/objectSetUtils.js.map +1 -0
  520. package/build/esm/util/partialBy.js +0 -15
  521. package/build/esm/util/partialBy.js.map +1 -1
  522. package/build/esm/util/streamutils.js +7 -0
  523. package/build/esm/util/streamutils.js.map +1 -1
  524. package/build/esm/util/timeseriesUtils.js +2 -1
  525. package/build/esm/util/timeseriesUtils.js.map +1 -1
  526. package/build/esm/util/toDataValue.js +28 -2
  527. package/build/esm/util/toDataValue.js.map +1 -1
  528. package/build/esm/util/toDataValue.test.js +14 -1
  529. package/build/esm/util/toDataValue.test.js.map +1 -1
  530. package/build/esm/util/toDataValueQueries.js +10 -1
  531. package/build/esm/util/toDataValueQueries.js.map +1 -1
  532. package/build/types/Client.d.ts +22 -0
  533. package/build/types/Client.d.ts.map +1 -0
  534. package/build/types/Definitions.test.d.ts +1 -0
  535. package/build/types/Definitions.test.d.ts.map +1 -0
  536. package/build/types/Logger.d.ts +18 -0
  537. package/build/types/Logger.d.ts.map +1 -0
  538. package/build/types/MinimalClientContext.d.ts +25 -0
  539. package/build/types/MinimalClientContext.d.ts.map +1 -0
  540. package/build/types/ResultOrError.d.ts +11 -0
  541. package/build/types/ResultOrError.d.ts.map +1 -0
  542. package/build/types/SatisfiesSemver.d.ts +10 -0
  543. package/build/types/SatisfiesSemver.d.ts.map +1 -0
  544. package/build/types/SatisfiesSemver.test.d.ts +1 -0
  545. package/build/types/SatisfiesSemver.test.d.ts.map +1 -0
  546. package/build/types/__unstable/ConjureSupport.d.ts +37 -0
  547. package/build/types/__unstable/ConjureSupport.d.ts.map +1 -0
  548. package/build/types/__unstable/createBulkLinksAsyncIterFactory.d.ts +4 -0
  549. package/build/types/__unstable/createBulkLinksAsyncIterFactory.d.ts.map +1 -0
  550. package/build/types/actions/ActionValidationError.d.ts +5 -0
  551. package/build/types/actions/ActionValidationError.d.ts.map +1 -0
  552. package/build/types/actions/actions.test.d.ts +1 -0
  553. package/build/types/actions/actions.test.d.ts.map +1 -0
  554. package/build/types/actions/applyAction.d.ts +31 -0
  555. package/build/types/actions/applyAction.d.ts.map +1 -0
  556. package/build/types/createClient.d.ts +5 -0
  557. package/build/types/createClient.d.ts.map +1 -0
  558. package/build/types/createClient.test.d.ts +1 -0
  559. package/build/types/createClient.test.d.ts.map +1 -0
  560. package/build/types/createGeotimeSeriesProperty.d.ts +13 -0
  561. package/build/types/createGeotimeSeriesProperty.d.ts.map +1 -0
  562. package/build/types/createMediaReferenceProperty.d.ts +13 -0
  563. package/build/types/createMediaReferenceProperty.d.ts.map +1 -0
  564. package/build/types/createMinimalClient.d.ts +1 -0
  565. package/build/types/createMinimalClient.d.ts.map +1 -0
  566. package/build/types/createPlatformClient.d.ts +15 -0
  567. package/build/types/createPlatformClient.d.ts.map +1 -0
  568. package/build/types/createTimeseriesProperty.d.ts +13 -0
  569. package/build/types/createTimeseriesProperty.d.ts.map +1 -0
  570. package/build/types/definitions/LinkDefinitions.test.d.ts +1 -0
  571. package/build/types/definitions/LinkDefinitions.test.d.ts.map +1 -0
  572. package/build/types/fetchMetadata.d.ts +1 -0
  573. package/build/types/fetchMetadata.d.ts.map +1 -0
  574. package/build/types/fetchMetadata.test.d.ts +1 -0
  575. package/build/types/fetchMetadata.test.d.ts.map +1 -0
  576. package/build/types/index.d.ts +12 -0
  577. package/build/types/index.d.ts.map +1 -0
  578. package/build/types/intellisense.test.d.ts +1 -0
  579. package/build/types/intellisense.test.d.ts.map +1 -0
  580. package/build/types/intellisense.test.helpers/callsQueryAcceptsObject.d.ts +1 -0
  581. package/build/types/intellisense.test.helpers/callsQueryAcceptsObject.d.ts.map +1 -0
  582. package/build/types/internal/conversions/legacyToModernSingleAggregationResult.d.ts +1 -0
  583. package/build/types/internal/conversions/legacyToModernSingleAggregationResult.d.ts.map +1 -0
  584. package/build/types/internal/conversions/modernToLegacyAggregationClause.d.ts +1 -0
  585. package/build/types/internal/conversions/modernToLegacyAggregationClause.d.ts.map +1 -0
  586. package/build/types/internal/conversions/modernToLegacyGroupByClause.d.ts +1 -0
  587. package/build/types/internal/conversions/modernToLegacyGroupByClause.d.ts.map +1 -0
  588. package/build/types/internal/conversions/modernToLegacyWhereClause.d.ts +1 -0
  589. package/build/types/internal/conversions/modernToLegacyWhereClause.d.ts.map +1 -0
  590. package/build/types/internal/conversions/modernToLegacyWhereClause.test.d.ts +1 -0
  591. package/build/types/internal/conversions/modernToLegacyWhereClause.test.d.ts.map +1 -0
  592. package/build/types/object/AttachmentUpload.d.ts +3 -0
  593. package/build/types/object/AttachmentUpload.d.ts.map +1 -0
  594. package/build/types/object/Cache.d.ts +17 -0
  595. package/build/types/object/Cache.d.ts.map +1 -0
  596. package/build/types/object/Cache.test.d.ts +1 -0
  597. package/build/types/object/Cache.test.d.ts.map +1 -0
  598. package/build/types/object/SimpleCache.d.ts +52 -0
  599. package/build/types/object/SimpleCache.d.ts.map +1 -0
  600. package/build/types/object/aggregate.d.ts +1 -0
  601. package/build/types/object/aggregate.d.ts.map +1 -0
  602. package/build/types/object/aggregate.test.d.ts +1 -0
  603. package/build/types/object/aggregate.test.d.ts.map +1 -0
  604. package/build/types/object/attachment.test.d.ts +1 -0
  605. package/build/types/object/attachment.test.d.ts.map +1 -0
  606. package/build/types/object/convertWireToOsdkObjects/InterfaceHolder.d.ts +1 -0
  607. package/build/types/object/convertWireToOsdkObjects/InterfaceHolder.d.ts.map +1 -0
  608. package/build/types/object/convertWireToOsdkObjects/InternalSymbols.d.ts +6 -0
  609. package/build/types/object/convertWireToOsdkObjects/InternalSymbols.d.ts.map +1 -0
  610. package/build/types/object/convertWireToOsdkObjects/ObjectHolder.d.ts +1 -0
  611. package/build/types/object/convertWireToOsdkObjects/ObjectHolder.d.ts.map +1 -0
  612. package/build/types/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts +17 -0
  613. package/build/types/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts.map +1 -0
  614. package/build/types/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts +5 -0
  615. package/build/types/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts.map +1 -0
  616. package/build/types/object/convertWireToOsdkObjects/createOsdkInterface.d.ts +1 -0
  617. package/build/types/object/convertWireToOsdkObjects/createOsdkInterface.d.ts.map +1 -0
  618. package/build/types/object/convertWireToOsdkObjects/createOsdkInterface.test.d.ts +1 -0
  619. package/build/types/object/convertWireToOsdkObjects/createOsdkInterface.test.d.ts.map +1 -0
  620. package/build/types/object/convertWireToOsdkObjects/createOsdkObject.d.ts +1 -0
  621. package/build/types/object/convertWireToOsdkObjects/createOsdkObject.d.ts.map +1 -0
  622. package/build/types/object/convertWireToOsdkObjects/getDollarAs.d.ts +2 -0
  623. package/build/types/object/convertWireToOsdkObjects/getDollarAs.d.ts.map +1 -0
  624. package/build/types/object/convertWireToOsdkObjects/getDollarLink.d.ts +1 -0
  625. package/build/types/object/convertWireToOsdkObjects/getDollarLink.d.ts.map +1 -0
  626. package/build/types/object/convertWireToOsdkObjects.d.ts +1 -0
  627. package/build/types/object/convertWireToOsdkObjects.d.ts.map +1 -0
  628. package/build/types/object/convertWireToOsdkObjects.test.d.ts +1 -0
  629. package/build/types/object/convertWireToOsdkObjects.test.d.ts.map +1 -0
  630. package/build/types/object/fetchPage.d.ts +5 -0
  631. package/build/types/object/fetchPage.d.ts.map +1 -0
  632. package/build/types/object/fetchPage.test.d.ts +1 -0
  633. package/build/types/object/fetchPage.test.d.ts.map +1 -0
  634. package/build/types/object/fetchSingle.d.ts +1 -0
  635. package/build/types/object/fetchSingle.d.ts.map +1 -0
  636. package/build/types/object/geotimeseriesreference.test.d.ts +1 -0
  637. package/build/types/object/geotimeseriesreference.test.d.ts.map +1 -0
  638. package/build/types/object/media.test.d.ts +1 -0
  639. package/build/types/object/media.test.d.ts.map +1 -0
  640. package/build/types/object/mediaUpload.d.ts +2 -0
  641. package/build/types/object/mediaUpload.d.ts.map +1 -0
  642. package/build/types/object/object.test.d.ts +11 -0
  643. package/build/types/object/object.test.d.ts.map +1 -0
  644. package/build/types/object/timeseries.test.d.ts +1 -0
  645. package/build/types/object/timeseries.test.d.ts.map +1 -0
  646. package/build/types/objectSet/InterfaceObjectSet.test.d.ts +1 -0
  647. package/build/types/objectSet/InterfaceObjectSet.test.d.ts.map +1 -0
  648. package/build/types/objectSet/ObjectSet.test.d.ts +7 -0
  649. package/build/types/objectSet/ObjectSet.test.d.ts.map +1 -0
  650. package/build/types/objectSet/ObjectSetFactory.d.ts +1 -0
  651. package/build/types/objectSet/ObjectSetFactory.d.ts.map +1 -0
  652. package/build/types/objectSet/ObjectSetListenerWebsocket.d.ts +1 -0
  653. package/build/types/objectSet/ObjectSetListenerWebsocket.d.ts.map +1 -0
  654. package/build/types/objectSet/ObjectSetListenerWebsocket.test.d.ts +1 -0
  655. package/build/types/objectSet/ObjectSetListenerWebsocket.test.d.ts.map +1 -0
  656. package/build/types/objectSet/conjureUnionType.d.ts +13 -0
  657. package/build/types/objectSet/conjureUnionType.d.ts.map +1 -0
  658. package/build/types/objectSet/createObjectSet.d.ts +1 -0
  659. package/build/types/objectSet/createObjectSet.d.ts.map +1 -0
  660. package/build/types/observable/DebugFlags.d.ts +2 -0
  661. package/build/types/observable/DebugFlags.d.ts.map +1 -0
  662. package/build/types/observable/ListPayload.d.ts +10 -0
  663. package/build/types/observable/ListPayload.d.ts.map +1 -0
  664. package/build/types/observable/ObjectPayload.d.ts +8 -0
  665. package/build/types/observable/ObjectPayload.d.ts.map +1 -0
  666. package/build/types/observable/ObservableClient.d.ts +36 -0
  667. package/build/types/observable/ObservableClient.d.ts.map +1 -0
  668. package/build/types/observable/OptimisticBuilder.d.ts +5 -0
  669. package/build/types/observable/OptimisticBuilder.d.ts.map +1 -0
  670. package/build/types/observable/internal/CacheKey.d.ts +15 -0
  671. package/build/types/observable/internal/CacheKey.d.ts.map +1 -0
  672. package/build/types/observable/internal/CacheKeys.d.ts +8 -0
  673. package/build/types/observable/internal/CacheKeys.d.ts.map +1 -0
  674. package/build/types/observable/internal/Canonical.d.ts +3 -0
  675. package/build/types/observable/internal/Canonical.d.ts.map +1 -0
  676. package/build/types/observable/internal/ChangedObjects.d.ts +7 -0
  677. package/build/types/observable/internal/ChangedObjects.d.ts.map +1 -0
  678. package/build/types/observable/internal/Layer.d.ts +19 -0
  679. package/build/types/observable/internal/Layer.d.ts.map +1 -0
  680. package/build/types/observable/internal/ListQuery.d.ts +42 -0
  681. package/build/types/observable/internal/ListQuery.d.ts.map +1 -0
  682. package/build/types/observable/internal/ObjectQuery.d.ts +19 -0
  683. package/build/types/observable/internal/ObjectQuery.d.ts.map +1 -0
  684. package/build/types/observable/internal/ObservableClientImpl.d.ts +1 -0
  685. package/build/types/observable/internal/ObservableClientImpl.d.ts.map +1 -0
  686. package/build/types/observable/internal/OptimisticId.d.ts +4 -0
  687. package/build/types/observable/internal/OptimisticId.d.ts.map +1 -0
  688. package/build/types/observable/internal/OptimisticJob.d.ts +11 -0
  689. package/build/types/observable/internal/OptimisticJob.d.ts.map +1 -0
  690. package/build/types/observable/internal/Query.d.ts +29 -0
  691. package/build/types/observable/internal/Query.d.ts.map +1 -0
  692. package/build/types/observable/internal/RefCounts.d.ts +12 -0
  693. package/build/types/observable/internal/RefCounts.d.ts.map +1 -0
  694. package/build/types/observable/internal/Store.d.ts +73 -0
  695. package/build/types/observable/internal/Store.d.ts.map +1 -0
  696. package/build/types/observable/internal/Store.test.d.ts +1 -0
  697. package/build/types/observable/internal/Store.test.d.ts.map +1 -0
  698. package/build/types/observable/internal/WeakMapWithEntries.d.ts +50 -0
  699. package/build/types/observable/internal/WeakMapWithEntries.d.ts.map +1 -0
  700. package/build/types/observable/internal/WhereClauseCanonicalizer.d.ts +6 -0
  701. package/build/types/observable/internal/WhereClauseCanonicalizer.d.ts.map +1 -0
  702. package/build/types/observable/internal/WhereClauseCanonicalizer.test.d.ts +1 -0
  703. package/build/types/observable/internal/WhereClauseCanonicalizer.test.d.ts.map +1 -0
  704. package/build/types/observable/internal/objectMatchesWhereClause.d.ts +2 -0
  705. package/build/types/observable/internal/objectMatchesWhereClause.d.ts.map +1 -0
  706. package/build/types/observable/internal/objectMatchesWhereClause.test.d.ts +1 -0
  707. package/build/types/observable/internal/objectMatchesWhereClause.test.d.ts.map +1 -0
  708. package/build/types/observable/internal/testUtils.d.ts +40 -0
  709. package/build/types/observable/internal/testUtils.d.ts.map +1 -0
  710. package/build/types/observable/types.d.ts +1 -0
  711. package/build/types/observable/types.d.ts.map +1 -0
  712. package/build/types/ontology/OntologyProvider.d.ts +31 -0
  713. package/build/types/ontology/OntologyProvider.d.ts.map +1 -0
  714. package/build/types/ontology/StandardOntologyProvider.d.ts +3 -0
  715. package/build/types/ontology/StandardOntologyProvider.d.ts.map +1 -0
  716. package/build/types/ontology/StandardOntologyProvider.test.d.ts +1 -0
  717. package/build/types/ontology/StandardOntologyProvider.test.d.ts.map +1 -0
  718. package/build/types/ontology/loadActionMetadata.d.ts +3 -0
  719. package/build/types/ontology/loadActionMetadata.d.ts.map +1 -0
  720. package/build/types/ontology/loadFullObjectMetadata.d.ts +5 -0
  721. package/build/types/ontology/loadFullObjectMetadata.d.ts.map +1 -0
  722. package/build/types/ontology/loadInterfaceMetadata.d.ts +3 -0
  723. package/build/types/ontology/loadInterfaceMetadata.d.ts.map +1 -0
  724. package/build/types/ontology/loadQueryMetadata.d.ts +3 -0
  725. package/build/types/ontology/loadQueryMetadata.d.ts.map +1 -0
  726. package/build/types/ontology/makeConjureContext.d.ts +3 -0
  727. package/build/types/ontology/makeConjureContext.d.ts.map +1 -0
  728. package/build/types/pageRequestAsAsyncIter.d.ts +16 -0
  729. package/build/types/pageRequestAsAsyncIter.d.ts.map +1 -0
  730. package/build/types/public/internal.d.ts +3 -0
  731. package/build/types/public/internal.d.ts.map +1 -0
  732. package/build/types/public/unstable-do-not-use.d.ts +7 -0
  733. package/build/types/public/unstable-do-not-use.d.ts.map +1 -0
  734. package/build/types/public-utils/createAndFetchTempObjectSetRid.d.ts +10 -0
  735. package/build/types/public-utils/createAndFetchTempObjectSetRid.d.ts.map +1 -0
  736. package/build/types/public-utils/hydrateAttachmentFromRid.d.ts +9 -0
  737. package/build/types/public-utils/hydrateAttachmentFromRid.d.ts.map +1 -0
  738. package/build/types/public-utils/hydrateObjectSetFromRid.d.ts +10 -0
  739. package/build/types/public-utils/hydrateObjectSetFromRid.d.ts.map +1 -0
  740. package/build/types/queries/applyQuery.d.ts +8 -0
  741. package/build/types/queries/applyQuery.d.ts.map +1 -0
  742. package/build/types/queries/queries.test.d.ts +1 -0
  743. package/build/types/queries/queries.test.d.ts.map +1 -0
  744. package/build/types/queries/types.d.ts +15 -0
  745. package/build/types/queries/types.d.ts.map +1 -0
  746. package/build/types/tsserver.d.ts +34 -0
  747. package/build/types/tsserver.d.ts.map +1 -0
  748. package/build/types/util/ArrayElement.d.ts +1 -0
  749. package/build/types/util/ArrayElement.d.ts.map +1 -0
  750. package/build/types/util/NOOP.d.ts +1 -0
  751. package/build/types/util/NOOP.d.ts.map +1 -0
  752. package/build/types/util/NullableProps.d.ts +3 -0
  753. package/build/types/util/NullableProps.d.ts.map +1 -0
  754. package/build/types/util/UserAgent.d.ts +1 -0
  755. package/build/types/util/UserAgent.d.ts.map +1 -0
  756. package/build/types/util/WireObjectSet.d.ts +1 -0
  757. package/build/types/util/WireObjectSet.d.ts.map +1 -0
  758. package/build/types/util/addUserAgentAndRequestContextHeaders.d.ts +3 -0
  759. package/build/types/util/addUserAgentAndRequestContextHeaders.d.ts.map +1 -0
  760. package/build/types/util/augmentRequestContext.d.ts +31 -0
  761. package/build/types/util/augmentRequestContext.d.ts.map +1 -0
  762. package/build/types/util/datetimeConverters.d.ts +21 -0
  763. package/build/types/util/datetimeConverters.d.ts.map +1 -0
  764. package/build/types/util/datetimeConverters.test.d.ts +1 -0
  765. package/build/types/util/datetimeConverters.test.d.ts.map +1 -0
  766. package/build/types/util/interfaceUtils.d.ts +1 -0
  767. package/build/types/util/interfaceUtils.d.ts.map +1 -0
  768. package/build/types/util/isOntologyObjectV2.d.ts +1 -0
  769. package/build/types/util/isOntologyObjectV2.d.ts.map +1 -0
  770. package/build/types/util/isOsdkBaseObject.d.ts +2 -0
  771. package/build/types/util/isOsdkBaseObject.d.ts.map +1 -0
  772. package/build/types/util/isOsdkObject.d.ts +2 -0
  773. package/build/types/util/isOsdkObject.d.ts.map +1 -0
  774. package/build/types/util/objectSetUtils.d.ts +3 -0
  775. package/build/types/util/objectSetUtils.d.ts.map +1 -0
  776. package/build/types/util/partialBy.d.ts +8 -0
  777. package/build/types/util/partialBy.d.ts.map +1 -0
  778. package/build/types/util/streamutils.d.ts +2 -0
  779. package/build/types/util/streamutils.d.ts.map +1 -0
  780. package/build/types/util/timeseriesUtils.d.ts +7 -0
  781. package/build/types/util/timeseriesUtils.d.ts.map +1 -0
  782. package/build/types/util/toDataValue.d.ts +1 -0
  783. package/build/types/util/toDataValue.d.ts.map +1 -0
  784. package/build/types/util/toDataValue.test.d.ts +1 -0
  785. package/build/types/util/toDataValue.test.d.ts.map +1 -0
  786. package/build/types/util/toDataValueQueries.d.ts +1 -0
  787. package/build/types/util/toDataValueQueries.d.ts.map +1 -0
  788. package/index.d.ts +17 -0
  789. package/internal.d.ts +17 -0
  790. package/package.json +57 -23
  791. package/unstable-do-not-use.d.ts +1 -1
  792. package/build/browser/Client.d.ts +0 -26
  793. package/build/browser/Client.d.ts.map +0 -1
  794. package/build/browser/Definitions.test.d.ts +0 -2
  795. package/build/browser/Definitions.test.d.ts.map +0 -1
  796. package/build/browser/Logger.d.ts +0 -19
  797. package/build/browser/Logger.d.ts.map +0 -1
  798. package/build/browser/MinimalClientContext.d.ts +0 -26
  799. package/build/browser/MinimalClientContext.d.ts.map +0 -1
  800. package/build/browser/ResultOrError.d.ts +0 -12
  801. package/build/browser/ResultOrError.d.ts.map +0 -1
  802. package/build/browser/SatisfiesSemver.d.ts +0 -4
  803. package/build/browser/SatisfiesSemver.d.ts.map +0 -1
  804. package/build/browser/SatisfiesSemver.test.d.ts +0 -2
  805. package/build/browser/SatisfiesSemver.test.d.ts.map +0 -1
  806. package/build/browser/__unstable/ConjureSupport.d.ts +0 -55
  807. package/build/browser/__unstable/ConjureSupport.d.ts.map +0 -1
  808. package/build/browser/__unstable/createBulkLinksAsyncIterFactory.d.ts +0 -5
  809. package/build/browser/__unstable/createBulkLinksAsyncIterFactory.d.ts.map +0 -1
  810. package/build/browser/actions/ActionValidationError.d.ts +0 -6
  811. package/build/browser/actions/ActionValidationError.d.ts.map +0 -1
  812. package/build/browser/actions/actions.test.d.ts +0 -2
  813. package/build/browser/actions/actions.test.d.ts.map +0 -1
  814. package/build/browser/actions/applyAction.d.ts +0 -30
  815. package/build/browser/actions/applyAction.d.ts.map +0 -1
  816. package/build/browser/createAttachmentFromRid.d.ts +0 -10
  817. package/build/browser/createAttachmentFromRid.d.ts.map +0 -1
  818. package/build/browser/createAttachmentFromRid.js +0 -38
  819. package/build/browser/createAttachmentFromRid.js.map +0 -1
  820. package/build/browser/createClient.d.ts +0 -6
  821. package/build/browser/createClient.d.ts.map +0 -1
  822. package/build/browser/createClient.test.d.ts +0 -2
  823. package/build/browser/createClient.test.d.ts.map +0 -1
  824. package/build/browser/createGeotimeSeriesProperty.d.ts +0 -14
  825. package/build/browser/createGeotimeSeriesProperty.d.ts.map +0 -1
  826. package/build/browser/createMinimalClient.d.ts +0 -2
  827. package/build/browser/createMinimalClient.d.ts.map +0 -1
  828. package/build/browser/createPlatformClient.d.ts +0 -17
  829. package/build/browser/createPlatformClient.d.ts.map +0 -1
  830. package/build/browser/createTimeseriesProperty.d.ts +0 -14
  831. package/build/browser/createTimeseriesProperty.d.ts.map +0 -1
  832. package/build/browser/definitions/LinkDefinitions.test.d.ts +0 -2
  833. package/build/browser/definitions/LinkDefinitions.test.d.ts.map +0 -1
  834. package/build/browser/fetchMetadata.d.ts +0 -2
  835. package/build/browser/fetchMetadata.d.ts.map +0 -1
  836. package/build/browser/fetchMetadata.test.d.ts +0 -2
  837. package/build/browser/fetchMetadata.test.d.ts.map +0 -1
  838. package/build/browser/index.d.ts +0 -12
  839. package/build/browser/index.d.ts.map +0 -1
  840. package/build/browser/intellisense.test.d.ts +0 -2
  841. package/build/browser/intellisense.test.d.ts.map +0 -1
  842. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.d.ts +0 -2
  843. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.d.ts.map +0 -1
  844. package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.d.ts +0 -2
  845. package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.d.ts.map +0 -1
  846. package/build/browser/internal/conversions/modernToLegacyAggregationClause.d.ts +0 -2
  847. package/build/browser/internal/conversions/modernToLegacyAggregationClause.d.ts.map +0 -1
  848. package/build/browser/internal/conversions/modernToLegacyGroupByClause.d.ts +0 -2
  849. package/build/browser/internal/conversions/modernToLegacyGroupByClause.d.ts.map +0 -1
  850. package/build/browser/internal/conversions/modernToLegacyWhereClause.d.ts +0 -2
  851. package/build/browser/internal/conversions/modernToLegacyWhereClause.d.ts.map +0 -1
  852. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.d.ts +0 -2
  853. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.d.ts.map +0 -1
  854. package/build/browser/object/AttachmentUpload.d.ts +0 -4
  855. package/build/browser/object/AttachmentUpload.d.ts.map +0 -1
  856. package/build/browser/object/Cache.d.ts +0 -2
  857. package/build/browser/object/Cache.d.ts.map +0 -1
  858. package/build/browser/object/Cache.test.d.ts +0 -11
  859. package/build/browser/object/Cache.test.d.ts.map +0 -1
  860. package/build/browser/object/SimpleCache.d.ts +0 -38
  861. package/build/browser/object/SimpleCache.d.ts.map +0 -1
  862. package/build/browser/object/aggregate.d.ts +0 -2
  863. package/build/browser/object/aggregate.d.ts.map +0 -1
  864. package/build/browser/object/aggregate.test.d.ts +0 -2
  865. package/build/browser/object/aggregate.test.d.ts.map +0 -1
  866. package/build/browser/object/attachment.test.d.ts +0 -2
  867. package/build/browser/object/attachment.test.d.ts.map +0 -1
  868. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.d.ts +0 -2
  869. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.d.ts.map +0 -1
  870. package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.d.ts +0 -7
  871. package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.d.ts.map +0 -1
  872. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.d.ts +0 -2
  873. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.d.ts.map +0 -1
  874. package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts +0 -2
  875. package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts.map +0 -1
  876. package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts +0 -8
  877. package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts.map +0 -1
  878. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.d.ts +0 -2
  879. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.d.ts.map +0 -1
  880. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.test.d.ts +0 -2
  881. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.test.d.ts.map +0 -1
  882. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.d.ts +0 -2
  883. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.d.ts.map +0 -1
  884. package/build/browser/object/convertWireToOsdkObjects/getDollarAs.d.ts +0 -3
  885. package/build/browser/object/convertWireToOsdkObjects/getDollarAs.d.ts.map +0 -1
  886. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.d.ts +0 -2
  887. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.d.ts.map +0 -1
  888. package/build/browser/object/convertWireToOsdkObjects.d.ts +0 -2
  889. package/build/browser/object/convertWireToOsdkObjects.d.ts.map +0 -1
  890. package/build/browser/object/convertWireToOsdkObjects.test.d.ts +0 -2
  891. package/build/browser/object/convertWireToOsdkObjects.test.d.ts.map +0 -1
  892. package/build/browser/object/fetchPage.d.ts +0 -3
  893. package/build/browser/object/fetchPage.d.ts.map +0 -1
  894. package/build/browser/object/fetchPage.test.d.ts +0 -2
  895. package/build/browser/object/fetchPage.test.d.ts.map +0 -1
  896. package/build/browser/object/fetchSingle.d.ts +0 -2
  897. package/build/browser/object/fetchSingle.d.ts.map +0 -1
  898. package/build/browser/object/geotimeseriesreference.test.d.ts +0 -2
  899. package/build/browser/object/geotimeseriesreference.test.d.ts.map +0 -1
  900. package/build/browser/object/object.test.d.ts +0 -12
  901. package/build/browser/object/object.test.d.ts.map +0 -1
  902. package/build/browser/object/timeseries.test.d.ts +0 -2
  903. package/build/browser/object/timeseries.test.d.ts.map +0 -1
  904. package/build/browser/objectSet/ObjectSet.test.d.ts +0 -2
  905. package/build/browser/objectSet/ObjectSet.test.d.ts.map +0 -1
  906. package/build/browser/objectSet/ObjectSetFactory.d.ts +0 -2
  907. package/build/browser/objectSet/ObjectSetFactory.d.ts.map +0 -1
  908. package/build/browser/objectSet/ObjectSetListenerWebsocket.d.ts +0 -2
  909. package/build/browser/objectSet/ObjectSetListenerWebsocket.d.ts.map +0 -1
  910. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.d.ts +0 -2
  911. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.d.ts.map +0 -1
  912. package/build/browser/objectSet/conjureUnionType.d.ts +0 -13
  913. package/build/browser/objectSet/conjureUnionType.d.ts.map +0 -1
  914. package/build/browser/objectSet/createObjectSet.d.ts +0 -2
  915. package/build/browser/objectSet/createObjectSet.d.ts.map +0 -1
  916. package/build/browser/objectSet/toConjureObjectSet.d.ts +0 -2
  917. package/build/browser/objectSet/toConjureObjectSet.d.ts.map +0 -1
  918. package/build/browser/objectSet/toConjureObjectSet.js +0 -165
  919. package/build/browser/objectSet/toConjureObjectSet.js.map +0 -1
  920. package/build/browser/ontology/OntologyProvider.d.ts +0 -32
  921. package/build/browser/ontology/OntologyProvider.d.ts.map +0 -1
  922. package/build/browser/ontology/StandardOntologyProvider.d.ts +0 -5
  923. package/build/browser/ontology/StandardOntologyProvider.d.ts.map +0 -1
  924. package/build/browser/ontology/StandardOntologyProvider.test.d.ts +0 -2
  925. package/build/browser/ontology/StandardOntologyProvider.test.d.ts.map +0 -1
  926. package/build/browser/ontology/loadActionMetadata.d.ts +0 -4
  927. package/build/browser/ontology/loadActionMetadata.d.ts.map +0 -1
  928. package/build/browser/ontology/loadFullObjectMetadata.d.ts +0 -6
  929. package/build/browser/ontology/loadFullObjectMetadata.d.ts.map +0 -1
  930. package/build/browser/ontology/loadInterfaceMetadata.d.ts +0 -4
  931. package/build/browser/ontology/loadInterfaceMetadata.d.ts.map +0 -1
  932. package/build/browser/ontology/loadQueryMetadata.d.ts +0 -4
  933. package/build/browser/ontology/loadQueryMetadata.d.ts.map +0 -1
  934. package/build/browser/ontology/makeConjureContext.d.ts +0 -4
  935. package/build/browser/ontology/makeConjureContext.d.ts.map +0 -1
  936. package/build/browser/pageRequestAsAsyncIter.d.ts +0 -10
  937. package/build/browser/pageRequestAsAsyncIter.d.ts.map +0 -1
  938. package/build/browser/public/unstable-do-not-use.d.ts +0 -2
  939. package/build/browser/public/unstable-do-not-use.d.ts.map +0 -1
  940. package/build/browser/queries/applyQuery.d.ts +0 -6
  941. package/build/browser/queries/applyQuery.d.ts.map +0 -1
  942. package/build/browser/queries/queries.test.d.ts +0 -2
  943. package/build/browser/queries/queries.test.d.ts.map +0 -1
  944. package/build/browser/queries/types.d.ts +0 -20
  945. package/build/browser/queries/types.d.ts.map +0 -1
  946. package/build/browser/tsserver.d.ts +0 -34
  947. package/build/browser/tsserver.d.ts.map +0 -1
  948. package/build/browser/util/ArrayElement.d.ts +0 -2
  949. package/build/browser/util/ArrayElement.d.ts.map +0 -1
  950. package/build/browser/util/NOOP.d.ts +0 -4
  951. package/build/browser/util/NOOP.d.ts.map +0 -1
  952. package/build/browser/util/NullableProps.d.ts +0 -6
  953. package/build/browser/util/NullableProps.d.ts.map +0 -1
  954. package/build/browser/util/UserAgent.d.ts +0 -2
  955. package/build/browser/util/UserAgent.d.ts.map +0 -1
  956. package/build/browser/util/WireObjectSet.d.ts +0 -2
  957. package/build/browser/util/WireObjectSet.d.ts.map +0 -1
  958. package/build/browser/util/addUserAgentAndRequestContextHeaders.d.ts +0 -4
  959. package/build/browser/util/addUserAgentAndRequestContextHeaders.d.ts.map +0 -1
  960. package/build/browser/util/augmentRequestContext.d.ts +0 -32
  961. package/build/browser/util/augmentRequestContext.d.ts.map +0 -1
  962. package/build/browser/util/isOntologyObjectV2.d.ts +0 -2
  963. package/build/browser/util/isOntologyObjectV2.d.ts.map +0 -1
  964. package/build/browser/util/isOsdkBaseObject.d.ts +0 -3
  965. package/build/browser/util/isOsdkBaseObject.d.ts.map +0 -1
  966. package/build/browser/util/isOsdkObject.d.ts +0 -3
  967. package/build/browser/util/isOsdkObject.d.ts.map +0 -1
  968. package/build/browser/util/partialBy.d.ts +0 -3
  969. package/build/browser/util/partialBy.d.ts.map +0 -1
  970. package/build/browser/util/streamutils.d.ts +0 -3
  971. package/build/browser/util/streamutils.d.ts.map +0 -1
  972. package/build/browser/util/timeseriesUtils.d.ts +0 -8
  973. package/build/browser/util/timeseriesUtils.d.ts.map +0 -1
  974. package/build/browser/util/toDataValue.d.ts +0 -2
  975. package/build/browser/util/toDataValue.d.ts.map +0 -1
  976. package/build/browser/util/toDataValue.test.d.ts +0 -2
  977. package/build/browser/util/toDataValue.test.d.ts.map +0 -1
  978. package/build/browser/util/toDataValueQueries.d.ts +0 -2
  979. package/build/browser/util/toDataValueQueries.d.ts.map +0 -1
  980. package/build/esm/Client.d.ts +0 -26
  981. package/build/esm/Client.d.ts.map +0 -1
  982. package/build/esm/Definitions.test.d.ts +0 -2
  983. package/build/esm/Definitions.test.d.ts.map +0 -1
  984. package/build/esm/Logger.d.ts +0 -19
  985. package/build/esm/Logger.d.ts.map +0 -1
  986. package/build/esm/MinimalClientContext.d.ts +0 -26
  987. package/build/esm/MinimalClientContext.d.ts.map +0 -1
  988. package/build/esm/ResultOrError.d.ts +0 -12
  989. package/build/esm/ResultOrError.d.ts.map +0 -1
  990. package/build/esm/SatisfiesSemver.d.ts +0 -4
  991. package/build/esm/SatisfiesSemver.d.ts.map +0 -1
  992. package/build/esm/SatisfiesSemver.test.d.ts +0 -2
  993. package/build/esm/SatisfiesSemver.test.d.ts.map +0 -1
  994. package/build/esm/__unstable/ConjureSupport.d.ts +0 -55
  995. package/build/esm/__unstable/ConjureSupport.d.ts.map +0 -1
  996. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.d.ts +0 -5
  997. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.d.ts.map +0 -1
  998. package/build/esm/actions/ActionValidationError.d.ts +0 -6
  999. package/build/esm/actions/ActionValidationError.d.ts.map +0 -1
  1000. package/build/esm/actions/actions.test.d.ts +0 -2
  1001. package/build/esm/actions/actions.test.d.ts.map +0 -1
  1002. package/build/esm/actions/applyAction.d.ts +0 -30
  1003. package/build/esm/actions/applyAction.d.ts.map +0 -1
  1004. package/build/esm/createAttachmentFromRid.d.ts +0 -10
  1005. package/build/esm/createAttachmentFromRid.d.ts.map +0 -1
  1006. package/build/esm/createAttachmentFromRid.js +0 -38
  1007. package/build/esm/createAttachmentFromRid.js.map +0 -1
  1008. package/build/esm/createClient.d.ts +0 -6
  1009. package/build/esm/createClient.d.ts.map +0 -1
  1010. package/build/esm/createClient.test.d.ts +0 -2
  1011. package/build/esm/createClient.test.d.ts.map +0 -1
  1012. package/build/esm/createGeotimeSeriesProperty.d.ts +0 -14
  1013. package/build/esm/createGeotimeSeriesProperty.d.ts.map +0 -1
  1014. package/build/esm/createMinimalClient.d.ts +0 -2
  1015. package/build/esm/createMinimalClient.d.ts.map +0 -1
  1016. package/build/esm/createPlatformClient.d.ts +0 -17
  1017. package/build/esm/createPlatformClient.d.ts.map +0 -1
  1018. package/build/esm/createTimeseriesProperty.d.ts +0 -14
  1019. package/build/esm/createTimeseriesProperty.d.ts.map +0 -1
  1020. package/build/esm/definitions/LinkDefinitions.test.d.ts +0 -2
  1021. package/build/esm/definitions/LinkDefinitions.test.d.ts.map +0 -1
  1022. package/build/esm/fetchMetadata.d.ts +0 -2
  1023. package/build/esm/fetchMetadata.d.ts.map +0 -1
  1024. package/build/esm/fetchMetadata.test.d.ts +0 -2
  1025. package/build/esm/fetchMetadata.test.d.ts.map +0 -1
  1026. package/build/esm/index.d.ts +0 -12
  1027. package/build/esm/index.d.ts.map +0 -1
  1028. package/build/esm/intellisense.test.d.ts +0 -2
  1029. package/build/esm/intellisense.test.d.ts.map +0 -1
  1030. package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.d.ts +0 -2
  1031. package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.d.ts.map +0 -1
  1032. package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.d.ts +0 -2
  1033. package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.d.ts.map +0 -1
  1034. package/build/esm/internal/conversions/modernToLegacyAggregationClause.d.ts +0 -2
  1035. package/build/esm/internal/conversions/modernToLegacyAggregationClause.d.ts.map +0 -1
  1036. package/build/esm/internal/conversions/modernToLegacyGroupByClause.d.ts +0 -2
  1037. package/build/esm/internal/conversions/modernToLegacyGroupByClause.d.ts.map +0 -1
  1038. package/build/esm/internal/conversions/modernToLegacyWhereClause.d.ts +0 -2
  1039. package/build/esm/internal/conversions/modernToLegacyWhereClause.d.ts.map +0 -1
  1040. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.d.ts +0 -2
  1041. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.d.ts.map +0 -1
  1042. package/build/esm/object/AttachmentUpload.d.ts +0 -4
  1043. package/build/esm/object/AttachmentUpload.d.ts.map +0 -1
  1044. package/build/esm/object/Cache.d.ts +0 -2
  1045. package/build/esm/object/Cache.d.ts.map +0 -1
  1046. package/build/esm/object/Cache.test.d.ts +0 -11
  1047. package/build/esm/object/Cache.test.d.ts.map +0 -1
  1048. package/build/esm/object/SimpleCache.d.ts +0 -38
  1049. package/build/esm/object/SimpleCache.d.ts.map +0 -1
  1050. package/build/esm/object/aggregate.d.ts +0 -2
  1051. package/build/esm/object/aggregate.d.ts.map +0 -1
  1052. package/build/esm/object/aggregate.test.d.ts +0 -2
  1053. package/build/esm/object/aggregate.test.d.ts.map +0 -1
  1054. package/build/esm/object/attachment.test.d.ts +0 -2
  1055. package/build/esm/object/attachment.test.d.ts.map +0 -1
  1056. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.d.ts +0 -2
  1057. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.d.ts.map +0 -1
  1058. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.d.ts +0 -7
  1059. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.d.ts.map +0 -1
  1060. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.d.ts +0 -2
  1061. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.d.ts.map +0 -1
  1062. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts +0 -2
  1063. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts.map +0 -1
  1064. package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts +0 -8
  1065. package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts.map +0 -1
  1066. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.d.ts +0 -2
  1067. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.d.ts.map +0 -1
  1068. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.test.d.ts +0 -2
  1069. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.test.d.ts.map +0 -1
  1070. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.d.ts +0 -2
  1071. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.d.ts.map +0 -1
  1072. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.d.ts +0 -3
  1073. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.d.ts.map +0 -1
  1074. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.d.ts +0 -2
  1075. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.d.ts.map +0 -1
  1076. package/build/esm/object/convertWireToOsdkObjects.d.ts +0 -2
  1077. package/build/esm/object/convertWireToOsdkObjects.d.ts.map +0 -1
  1078. package/build/esm/object/convertWireToOsdkObjects.test.d.ts +0 -2
  1079. package/build/esm/object/convertWireToOsdkObjects.test.d.ts.map +0 -1
  1080. package/build/esm/object/fetchPage.d.ts +0 -3
  1081. package/build/esm/object/fetchPage.d.ts.map +0 -1
  1082. package/build/esm/object/fetchPage.test.d.ts +0 -2
  1083. package/build/esm/object/fetchPage.test.d.ts.map +0 -1
  1084. package/build/esm/object/fetchSingle.d.ts +0 -2
  1085. package/build/esm/object/fetchSingle.d.ts.map +0 -1
  1086. package/build/esm/object/geotimeseriesreference.test.d.ts +0 -2
  1087. package/build/esm/object/geotimeseriesreference.test.d.ts.map +0 -1
  1088. package/build/esm/object/object.test.d.ts +0 -12
  1089. package/build/esm/object/object.test.d.ts.map +0 -1
  1090. package/build/esm/object/timeseries.test.d.ts +0 -2
  1091. package/build/esm/object/timeseries.test.d.ts.map +0 -1
  1092. package/build/esm/objectSet/ObjectSet.test.d.ts +0 -2
  1093. package/build/esm/objectSet/ObjectSet.test.d.ts.map +0 -1
  1094. package/build/esm/objectSet/ObjectSetFactory.d.ts +0 -2
  1095. package/build/esm/objectSet/ObjectSetFactory.d.ts.map +0 -1
  1096. package/build/esm/objectSet/ObjectSetListenerWebsocket.d.ts +0 -2
  1097. package/build/esm/objectSet/ObjectSetListenerWebsocket.d.ts.map +0 -1
  1098. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.d.ts +0 -2
  1099. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.d.ts.map +0 -1
  1100. package/build/esm/objectSet/conjureUnionType.d.ts +0 -13
  1101. package/build/esm/objectSet/conjureUnionType.d.ts.map +0 -1
  1102. package/build/esm/objectSet/createObjectSet.d.ts +0 -2
  1103. package/build/esm/objectSet/createObjectSet.d.ts.map +0 -1
  1104. package/build/esm/objectSet/toConjureObjectSet.d.ts +0 -2
  1105. package/build/esm/objectSet/toConjureObjectSet.d.ts.map +0 -1
  1106. package/build/esm/objectSet/toConjureObjectSet.js +0 -165
  1107. package/build/esm/objectSet/toConjureObjectSet.js.map +0 -1
  1108. package/build/esm/ontology/OntologyProvider.d.ts +0 -32
  1109. package/build/esm/ontology/OntologyProvider.d.ts.map +0 -1
  1110. package/build/esm/ontology/StandardOntologyProvider.d.ts +0 -5
  1111. package/build/esm/ontology/StandardOntologyProvider.d.ts.map +0 -1
  1112. package/build/esm/ontology/StandardOntologyProvider.test.d.ts +0 -2
  1113. package/build/esm/ontology/StandardOntologyProvider.test.d.ts.map +0 -1
  1114. package/build/esm/ontology/loadActionMetadata.d.ts +0 -4
  1115. package/build/esm/ontology/loadActionMetadata.d.ts.map +0 -1
  1116. package/build/esm/ontology/loadFullObjectMetadata.d.ts +0 -6
  1117. package/build/esm/ontology/loadFullObjectMetadata.d.ts.map +0 -1
  1118. package/build/esm/ontology/loadInterfaceMetadata.d.ts +0 -4
  1119. package/build/esm/ontology/loadInterfaceMetadata.d.ts.map +0 -1
  1120. package/build/esm/ontology/loadQueryMetadata.d.ts +0 -4
  1121. package/build/esm/ontology/loadQueryMetadata.d.ts.map +0 -1
  1122. package/build/esm/ontology/makeConjureContext.d.ts +0 -4
  1123. package/build/esm/ontology/makeConjureContext.d.ts.map +0 -1
  1124. package/build/esm/pageRequestAsAsyncIter.d.ts +0 -10
  1125. package/build/esm/pageRequestAsAsyncIter.d.ts.map +0 -1
  1126. package/build/esm/public/unstable-do-not-use.d.ts +0 -2
  1127. package/build/esm/public/unstable-do-not-use.d.ts.map +0 -1
  1128. package/build/esm/queries/applyQuery.d.ts +0 -6
  1129. package/build/esm/queries/applyQuery.d.ts.map +0 -1
  1130. package/build/esm/queries/queries.test.d.ts +0 -2
  1131. package/build/esm/queries/queries.test.d.ts.map +0 -1
  1132. package/build/esm/queries/types.d.ts +0 -20
  1133. package/build/esm/queries/types.d.ts.map +0 -1
  1134. package/build/esm/tsserver.d.ts +0 -34
  1135. package/build/esm/tsserver.d.ts.map +0 -1
  1136. package/build/esm/util/ArrayElement.d.ts +0 -2
  1137. package/build/esm/util/ArrayElement.d.ts.map +0 -1
  1138. package/build/esm/util/NOOP.d.ts +0 -4
  1139. package/build/esm/util/NOOP.d.ts.map +0 -1
  1140. package/build/esm/util/NullableProps.d.ts +0 -6
  1141. package/build/esm/util/NullableProps.d.ts.map +0 -1
  1142. package/build/esm/util/UserAgent.d.ts +0 -2
  1143. package/build/esm/util/UserAgent.d.ts.map +0 -1
  1144. package/build/esm/util/WireObjectSet.d.ts +0 -2
  1145. package/build/esm/util/WireObjectSet.d.ts.map +0 -1
  1146. package/build/esm/util/addUserAgentAndRequestContextHeaders.d.ts +0 -4
  1147. package/build/esm/util/addUserAgentAndRequestContextHeaders.d.ts.map +0 -1
  1148. package/build/esm/util/augmentRequestContext.d.ts +0 -32
  1149. package/build/esm/util/augmentRequestContext.d.ts.map +0 -1
  1150. package/build/esm/util/isOntologyObjectV2.d.ts +0 -2
  1151. package/build/esm/util/isOntologyObjectV2.d.ts.map +0 -1
  1152. package/build/esm/util/isOsdkBaseObject.d.ts +0 -3
  1153. package/build/esm/util/isOsdkBaseObject.d.ts.map +0 -1
  1154. package/build/esm/util/isOsdkObject.d.ts +0 -3
  1155. package/build/esm/util/isOsdkObject.d.ts.map +0 -1
  1156. package/build/esm/util/partialBy.d.ts +0 -3
  1157. package/build/esm/util/partialBy.d.ts.map +0 -1
  1158. package/build/esm/util/streamutils.d.ts +0 -3
  1159. package/build/esm/util/streamutils.d.ts.map +0 -1
  1160. package/build/esm/util/timeseriesUtils.d.ts +0 -8
  1161. package/build/esm/util/timeseriesUtils.d.ts.map +0 -1
  1162. package/build/esm/util/toDataValue.d.ts +0 -2
  1163. package/build/esm/util/toDataValue.d.ts.map +0 -1
  1164. package/build/esm/util/toDataValue.test.d.ts +0 -2
  1165. package/build/esm/util/toDataValue.test.d.ts.map +0 -1
  1166. package/build/esm/util/toDataValueQueries.d.ts +0 -2
  1167. package/build/esm/util/toDataValueQueries.d.ts.map +0 -1
@@ -13,20 +13,25 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import * as OntologiesV2 from "@osdk/internal.foundry.ontologiesv2";
16
+
17
+ import * as OntologiesV2 from "@osdk/foundry.ontologies";
17
18
  import { addUserAgentAndRequestContextHeaders } from "../util/addUserAgentAndRequestContextHeaders.js";
18
- import { convertWireToOsdkObjects } from "./convertWireToOsdkObjects.js";
19
+ import { resolveBaseObjectSetType } from "../util/objectSetUtils.js";
19
20
  export function augment(type, ...properties) {
20
21
  return {
21
22
  [type.apiName]: properties
22
23
  };
23
24
  }
25
+
24
26
  /** @internal */
25
27
  export function objectSetToSearchJsonV2(objectSet, expectedApiName, existingWhere = undefined) {
26
- if (objectSet.type === "base") {
27
- if (objectSet.objectType !== expectedApiName) {
28
+ if (objectSet.type === "base" || objectSet.type === "interfaceBase") {
29
+ if (objectSet.type === "base" && objectSet.objectType !== expectedApiName) {
28
30
  throw new Error(`Expected objectSet.objectType to be ${expectedApiName}, but got ${objectSet.objectType}`);
29
31
  }
32
+ if (objectSet.type === "interfaceBase" && objectSet.interfaceType !== expectedApiName) {
33
+ throw new Error(`Expected objectSet.objectType to be ${expectedApiName}, but got ${objectSet.interfaceType}`);
34
+ }
30
35
  return existingWhere;
31
36
  }
32
37
  if (objectSet.type === "filter") {
@@ -38,21 +43,36 @@ export function objectSetToSearchJsonV2(objectSet, expectedApiName, existingWher
38
43
  throw new Error(`Unsupported objectSet type: ${objectSet.type}`);
39
44
  }
40
45
  async function fetchInterfacePage(client, interfaceType, args, objectSet) {
41
- const result = await OntologiesV2.OntologyInterfaces.search(addUserAgentAndRequestContextHeaders(client, interfaceType), await client.ontologyRid, interfaceType.apiName, applyFetchArgs(args, {
42
- augmentedProperties: {},
43
- augmentedSharedPropertyTypes: {},
44
- otherInterfaceTypes: [],
45
- selectedObjectTypes: [],
46
- selectedSharedPropertyTypes: args.$select ?? [],
47
- where: objectSetToSearchJsonV2(objectSet, interfaceType.apiName)
46
+ if (args.$__UNSTABLE_useOldInterfaceApis) {
47
+ const result = await OntologiesV2.OntologyInterfaces.search(addUserAgentAndRequestContextHeaders(client, interfaceType), await client.ontologyRid, interfaceType.apiName, applyFetchArgs(args, {
48
+ augmentedProperties: {},
49
+ augmentedSharedPropertyTypes: {},
50
+ otherInterfaceTypes: [],
51
+ selectedObjectTypes: [],
52
+ selectedSharedPropertyTypes: args.$select ?? [],
53
+ where: objectSetToSearchJsonV2(objectSet, interfaceType.apiName)
54
+ }), {
55
+ preview: true
56
+ });
57
+ result.data = await client.objectFactory(client, result.data,
58
+ // drop readonly
59
+ interfaceType.apiName, !args.$includeRid);
60
+ return result;
61
+ }
62
+ const result = await OntologiesV2.OntologyObjectSets.loadMultipleObjectTypes(addUserAgentAndRequestContextHeaders(client, interfaceType), await client.ontologyRid, applyFetchArgs(args, {
63
+ objectSet,
64
+ select: args?.$select ?? [],
65
+ excludeRid: !args?.$includeRid
48
66
  }), {
49
67
  preview: true
50
68
  });
51
- result.data = await convertWireToOsdkObjects(client, result.data,
52
- // drop readonly
53
- interfaceType.apiName, !args.$includeRid);
54
- return result;
69
+ return Promise.resolve({
70
+ data: await client.objectFactory2(client, result.data, interfaceType.apiName, !args.$includeRid, args.$select, false, result.interfaceToObjectTypeMappings),
71
+ nextPageToken: result.nextPageToken,
72
+ totalCount: result.totalCount
73
+ });
55
74
  }
75
+
56
76
  /** @internal */
57
77
  export async function fetchPageInternal(client, objectType, objectSet, args = {}) {
58
78
  if (objectType.type === "interface") {
@@ -61,6 +81,7 @@ export async function fetchPageInternal(client, objectType, objectSet, args = {}
61
81
  return await fetchObjectPage(client, objectType, args, objectSet); // fixme
62
82
  }
63
83
  }
84
+
64
85
  /** @internal */
65
86
  export async function fetchPageWithErrorsInternal(client, objectType, objectSet, args = {}) {
66
87
  try {
@@ -79,6 +100,7 @@ export async function fetchPageWithErrorsInternal(client, objectType, objectSet,
79
100
  };
80
101
  }
81
102
  }
103
+
82
104
  /**
83
105
  * @param client
84
106
  * @param objectType
@@ -87,17 +109,12 @@ export async function fetchPageWithErrorsInternal(client, objectType, objectSet,
87
109
  * @returns
88
110
  * @internal
89
111
  */
90
- export async function fetchPage(client, objectType, args, objectSet = {
91
- type: "base",
92
- objectType: objectType["apiName"]
93
- }) {
112
+ export async function fetchPage(client, objectType, args, objectSet = resolveBaseObjectSetType(objectType)) {
94
113
  return fetchPageInternal(client, objectType, objectSet, args);
95
114
  }
115
+
96
116
  /** @internal */
97
- export async function fetchPageWithErrors(client, objectType, args, objectSet = {
98
- type: "base",
99
- objectType: objectType["apiName"]
100
- }) {
117
+ export async function fetchPageWithErrors(client, objectType, args, objectSet = resolveBaseObjectSetType(objectType)) {
101
118
  return fetchPageWithErrorsInternal(client, objectType, objectSet, args);
102
119
  }
103
120
  function applyFetchArgs(args, body) {
@@ -117,6 +134,7 @@ function applyFetchArgs(args, body) {
117
134
  }
118
135
  return body;
119
136
  }
137
+
120
138
  /** @internal */
121
139
  export async function fetchObjectPage(client, objectType, args, objectSet) {
122
140
  const r = await OntologiesV2.OntologyObjectSets.load(addUserAgentAndRequestContextHeaders(client, objectType), await client.ontologyRid, applyFetchArgs(args, {
@@ -127,7 +145,7 @@ export async function fetchObjectPage(client, objectType, args, objectSet) {
127
145
  excludeRid: !args?.$includeRid
128
146
  }));
129
147
  return Promise.resolve({
130
- data: await convertWireToOsdkObjects(client, r.data, undefined, undefined, args.$select),
148
+ data: await client.objectFactory(client, r.data, undefined, undefined, args.$select),
131
149
  nextPageToken: r.nextPageToken,
132
150
  totalCount: r.totalCount
133
151
  });
@@ -1 +1 @@
1
- {"version":3,"file":"fetchPage.js","names":["OntologiesV2","addUserAgentAndRequestContextHeaders","convertWireToOsdkObjects","augment","type","properties","apiName","objectSetToSearchJsonV2","objectSet","expectedApiName","existingWhere","undefined","objectType","Error","where","value","fetchInterfacePage","client","interfaceType","args","result","OntologyInterfaces","search","ontologyRid","applyFetchArgs","augmentedProperties","augmentedSharedPropertyTypes","otherInterfaceTypes","selectedObjectTypes","selectedSharedPropertyTypes","$select","preview","data","$includeRid","fetchPageInternal","fetchObjectPage","fetchPageWithErrorsInternal","e","error","fetchPage","fetchPageWithErrors","body","$nextPageToken","pageToken","$pageSize","pageSize","$orderBy","orderBy","fields","Object","entries","map","field","direction","r","OntologyObjectSets","load","select","excludeRid","Promise","resolve","nextPageToken","totalCount"],"sources":["fetchPage.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 * as OntologiesV2 from \"@osdk/internal.foundry.ontologiesv2\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { convertWireToOsdkObjects } from \"./convertWireToOsdkObjects.js\";\nexport function augment(type, ...properties) {\n return { [type.apiName]: properties };\n}\n/** @internal */\nexport function objectSetToSearchJsonV2(objectSet, expectedApiName, existingWhere = undefined) {\n if (objectSet.type === \"base\") {\n if (objectSet.objectType !== expectedApiName) {\n throw new Error(`Expected objectSet.objectType to be ${expectedApiName}, but got ${objectSet.objectType}`);\n }\n return existingWhere;\n }\n if (objectSet.type === \"filter\") {\n return objectSetToSearchJsonV2(objectSet.objectSet, expectedApiName, existingWhere == null ? objectSet.where : {\n type: \"and\",\n value: [existingWhere, objectSet.where],\n });\n }\n throw new Error(`Unsupported objectSet type: ${objectSet.type}`);\n}\nasync function fetchInterfacePage(client, interfaceType, args, objectSet) {\n const result = await OntologiesV2.OntologyInterfaces\n .search(addUserAgentAndRequestContextHeaders(client, interfaceType), await client.ontologyRid, interfaceType.apiName, applyFetchArgs(args, {\n augmentedProperties: {},\n augmentedSharedPropertyTypes: {},\n otherInterfaceTypes: [],\n selectedObjectTypes: [],\n selectedSharedPropertyTypes: args.$select ?? [],\n where: objectSetToSearchJsonV2(objectSet, interfaceType.apiName),\n }), { preview: true });\n result.data = await convertWireToOsdkObjects(client, result.data, // drop readonly\n interfaceType.apiName, !args.$includeRid);\n return result;\n}\n/** @internal */\nexport async function fetchPageInternal(client, objectType, objectSet, args = {}) {\n if (objectType.type === \"interface\") {\n return await fetchInterfacePage(client, objectType, args, objectSet); // fixme\n }\n else {\n return await fetchObjectPage(client, objectType, args, objectSet); // fixme\n }\n}\n/** @internal */\nexport async function fetchPageWithErrorsInternal(client, objectType, objectSet, args = {}) {\n try {\n const result = await fetchPageInternal(client, objectType, objectSet, args);\n return { value: result };\n }\n catch (e) {\n if (e instanceof Error) {\n return { error: e };\n }\n return { error: e };\n }\n}\n/**\n * @param client\n * @param objectType\n * @param args\n * @param objectSet\n * @returns\n * @internal\n */\nexport async function fetchPage(client, objectType, args, objectSet = {\n type: \"base\",\n objectType: objectType[\"apiName\"],\n}) {\n return fetchPageInternal(client, objectType, objectSet, args);\n}\n/** @internal */\nexport async function fetchPageWithErrors(client, objectType, args, objectSet = {\n type: \"base\",\n objectType: objectType[\"apiName\"],\n}) {\n return fetchPageWithErrorsInternal(client, objectType, objectSet, args);\n}\nfunction applyFetchArgs(args, body) {\n if (args?.$nextPageToken) {\n body.pageToken = args.$nextPageToken;\n }\n if (args?.$pageSize != null) {\n body.pageSize = args.$pageSize;\n }\n if (args?.$orderBy != null) {\n body.orderBy = {\n fields: Object.entries(args.$orderBy).map(([field, direction]) => ({\n field,\n direction,\n })),\n };\n }\n return body;\n}\n/** @internal */\nexport async function fetchObjectPage(client, objectType, args, objectSet) {\n const r = await OntologiesV2.OntologyObjectSets.load(addUserAgentAndRequestContextHeaders(client, objectType), await client.ontologyRid, applyFetchArgs(args, {\n objectSet,\n // We have to do the following case because LoadObjectSetRequestV2 isn't readonly\n select: (args?.$select ?? []), // FIXME?\n excludeRid: !args?.$includeRid,\n }));\n return Promise.resolve({\n data: await convertWireToOsdkObjects(client, r.data, undefined, undefined, args.$select),\n nextPageToken: r.nextPageToken,\n totalCount: r.totalCount,\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKA,YAAY,MAAM,qCAAqC;AACnE,SAASC,oCAAoC,QAAQ,iDAAiD;AACtG,SAASC,wBAAwB,QAAQ,+BAA+B;AACxE,OAAO,SAASC,OAAOA,CAACC,IAAI,EAAE,GAAGC,UAAU,EAAE;EACzC,OAAO;IAAE,CAACD,IAAI,CAACE,OAAO,GAAGD;EAAW,CAAC;AACzC;AACA;AACA,OAAO,SAASE,uBAAuBA,CAACC,SAAS,EAAEC,eAAe,EAAEC,aAAa,GAAGC,SAAS,EAAE;EAC3F,IAAIH,SAAS,CAACJ,IAAI,KAAK,MAAM,EAAE;IAC3B,IAAII,SAAS,CAACI,UAAU,KAAKH,eAAe,EAAE;MAC1C,MAAM,IAAII,KAAK,CAAC,uCAAuCJ,eAAe,aAAaD,SAAS,CAACI,UAAU,EAAE,CAAC;IAC9G;IACA,OAAOF,aAAa;EACxB;EACA,IAAIF,SAAS,CAACJ,IAAI,KAAK,QAAQ,EAAE;IAC7B,OAAOG,uBAAuB,CAACC,SAAS,CAACA,SAAS,EAAEC,eAAe,EAAEC,aAAa,IAAI,IAAI,GAAGF,SAAS,CAACM,KAAK,GAAG;MAC3GV,IAAI,EAAE,KAAK;MACXW,KAAK,EAAE,CAACL,aAAa,EAAEF,SAAS,CAACM,KAAK;IAC1C,CAAC,CAAC;EACN;EACA,MAAM,IAAID,KAAK,CAAC,+BAA+BL,SAAS,CAACJ,IAAI,EAAE,CAAC;AACpE;AACA,eAAeY,kBAAkBA,CAACC,MAAM,EAAEC,aAAa,EAAEC,IAAI,EAAEX,SAAS,EAAE;EACtE,MAAMY,MAAM,GAAG,MAAMpB,YAAY,CAACqB,kBAAkB,CAC/CC,MAAM,CAACrB,oCAAoC,CAACgB,MAAM,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C,MAAM;QAC/DD,KAAK;QACLC;MACJ,CAAC,CAAC;IACN,CAAC;EACL;EACA,OAAOZ,IAAI;AACf;AACA;AACA,OAAO,eAAeN,eAAeA,CAAClB,MAAM,EAAEL,UAAU,EAAEO,IAAI,EAAEX,SAAS,EAAE;EACvE,MAAM8C,CAAC,GAAG,MAAMtD,YAAY,CAACuD,kBAAkB,CAACC,IAAI,CAACvD,oCAAoC,CAACgB,MAAM,EAAEL,UAAU,CAAC,EAAE,MAAMK,MAAM,CAACM,WAAW,EAAEC,cAAc,CAACL,IAAI,EAAE;IAC1JX,SAAS;IACT;IACAiD,MAAM,EAAGtC,IAAI,EAAEW,OAAO,IAAI,EAAG;IAAE;IAC/B4B,UAAU,EAAE,CAACvC,IAAI,EAAEc;EACvB,CAAC,CAAC,CAAC;EACH,OAAO0B,OAAO,CAACC,OAAO,CAAC;IACnB5B,IAAI,EAAE,MAAM9B,wBAAwB,CAACe,MAAM,EAAEqC,CAAC,CAACtB,IAAI,EAAErB,SAAS,EAAEA,SAAS,EAAEQ,IAAI,CAACW,OAAO,CAAC;IACxF+B,aAAa,EAAEP,CAAC,CAACO,aAAa;IAC9BC,UAAU,EAAER,CAAC,CAACQ;EAClB,CAAC,CAAC;AACN","ignoreList":[]}
1
+ {"version":3,"file":"fetchPage.js","names":["OntologiesV2","addUserAgentAndRequestContextHeaders","resolveBaseObjectSetType","augment","type","properties","apiName","objectSetToSearchJsonV2","objectSet","expectedApiName","existingWhere","undefined","objectType","Error","interfaceType","where","value","fetchInterfacePage","client","args","$__UNSTABLE_useOldInterfaceApis","result","OntologyInterfaces","search","ontologyRid","applyFetchArgs","augmentedProperties","augmentedSharedPropertyTypes","otherInterfaceTypes","selectedObjectTypes","selectedSharedPropertyTypes","$select","preview","data","objectFactory","$includeRid","OntologyObjectSets","loadMultipleObjectTypes","select","excludeRid","Promise","resolve","objectFactory2","interfaceToObjectTypeMappings","nextPageToken","totalCount","fetchPageInternal","fetchObjectPage","fetchPageWithErrorsInternal","e","error","fetchPage","fetchPageWithErrors","body","$nextPageToken","pageToken","$pageSize","pageSize","$orderBy","orderBy","fields","Object","entries","map","field","direction","r","load"],"sources":["fetchPage.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 Augment,\n Augments,\n FetchPageArgs,\n FetchPageResult,\n InterfaceDefinition,\n NullabilityAdherence,\n ObjectOrInterfaceDefinition,\n ObjectTypeDefinition,\n PropertyKeys,\n Result,\n} from \"@osdk/api\";\nimport type { PageSize, PageToken } from \"@osdk/foundry.core\";\nimport type {\n LoadObjectSetRequestV2,\n LoadObjectSetV2MultipleObjectTypesRequest,\n ObjectSet,\n OntologyObjectV2,\n SearchJsonQueryV2,\n SearchObjectsForInterfaceRequest,\n SearchOrderByV2,\n} from \"@osdk/foundry.ontologies\";\nimport * as OntologiesV2 from \"@osdk/foundry.ontologies\";\nimport type { MinimalClient } from \"../MinimalClientContext.js\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { resolveBaseObjectSetType } from \"../util/objectSetUtils.js\";\n\nexport function augment<\n Q extends ObjectOrInterfaceDefinition,\n T extends PropertyKeys<Q>,\n>(\n type: Q,\n ...properties: T[]\n): Augment<Q, T> {\n return { [type.apiName]: properties } as any;\n}\n\n/** @internal */\nexport function objectSetToSearchJsonV2(\n objectSet: ObjectSet,\n expectedApiName: string,\n existingWhere: SearchJsonQueryV2 | undefined = undefined,\n): SearchJsonQueryV2 | undefined {\n if (objectSet.type === \"base\" || objectSet.type === \"interfaceBase\") {\n if (objectSet.type === \"base\" && objectSet.objectType !== expectedApiName) {\n throw new Error(\n `Expected objectSet.objectType to be ${expectedApiName}, but got ${objectSet.objectType}`,\n );\n }\n if (\n objectSet.type === \"interfaceBase\"\n && objectSet.interfaceType !== expectedApiName\n ) {\n throw new Error(\n `Expected objectSet.objectType to be ${expectedApiName}, but got ${objectSet.interfaceType}`,\n );\n }\n\n return existingWhere;\n }\n\n if (objectSet.type === \"filter\") {\n return objectSetToSearchJsonV2(\n objectSet.objectSet,\n expectedApiName,\n existingWhere == null ? objectSet.where : {\n type: \"and\",\n value: [existingWhere, objectSet.where],\n },\n );\n }\n\n throw new Error(`Unsupported objectSet type: ${objectSet.type}`);\n}\n\nasync function fetchInterfacePage<\n Q extends InterfaceDefinition,\n L extends PropertyKeys<Q>,\n R extends boolean,\n S extends NullabilityAdherence,\n>(\n client: MinimalClient,\n interfaceType: Q,\n args: FetchPageArgs<Q, L, R, any, S>,\n objectSet: ObjectSet,\n): Promise<FetchPageResult<Q, L, R, S>> {\n if (args.$__UNSTABLE_useOldInterfaceApis) {\n const result = await OntologiesV2.OntologyInterfaces\n .search(\n addUserAgentAndRequestContextHeaders(client, interfaceType),\n await client.ontologyRid,\n interfaceType.apiName,\n applyFetchArgs<SearchObjectsForInterfaceRequest>(args, {\n augmentedProperties: {},\n augmentedSharedPropertyTypes: {},\n otherInterfaceTypes: [],\n selectedObjectTypes: [],\n selectedSharedPropertyTypes: args.$select as undefined | string[]\n ?? [],\n where: objectSetToSearchJsonV2(objectSet, interfaceType.apiName),\n }),\n { preview: true },\n );\n\n result.data = await client.objectFactory(\n client,\n result.data as OntologyObjectV2[], // drop readonly\n interfaceType.apiName,\n !args.$includeRid,\n );\n return result as any;\n }\n const result = await OntologiesV2.OntologyObjectSets.loadMultipleObjectTypes(\n addUserAgentAndRequestContextHeaders(client, interfaceType),\n await client.ontologyRid,\n applyFetchArgs<LoadObjectSetV2MultipleObjectTypesRequest>(args, {\n objectSet,\n select: ((args?.$select as string[] | undefined) ?? []),\n excludeRid: !args?.$includeRid,\n }),\n { preview: true },\n );\n return Promise.resolve({\n data: await client.objectFactory2(\n client,\n result.data,\n interfaceType.apiName,\n !args.$includeRid,\n args.$select,\n false,\n result.interfaceToObjectTypeMappings,\n ),\n nextPageToken: result.nextPageToken,\n totalCount: result.totalCount,\n }) as unknown as Promise<FetchPageResult<Q, L, R, S>>;\n}\n\n/** @internal */\nexport async function fetchPageInternal<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q>,\n R extends boolean,\n A extends Augments,\n S extends NullabilityAdherence,\n>(\n client: MinimalClient,\n objectType: Q,\n objectSet: ObjectSet,\n args: FetchPageArgs<Q, L, R, A, S> = {},\n): Promise<FetchPageResult<Q, L, R, S>> {\n if (objectType.type === \"interface\") {\n return await fetchInterfacePage(\n client,\n objectType,\n args,\n objectSet,\n ) as any; // fixme\n } else {\n return await fetchObjectPage(\n client,\n objectType,\n args,\n objectSet,\n ) as any; // fixme\n }\n}\n\n/** @internal */\nexport async function fetchPageWithErrorsInternal<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q>,\n R extends boolean,\n A extends Augments,\n S extends NullabilityAdherence,\n>(\n client: MinimalClient,\n objectType: Q,\n objectSet: ObjectSet,\n args: FetchPageArgs<Q, L, R, A, S> = {},\n): Promise<Result<FetchPageResult<Q, L, R, S>>> {\n try {\n const result = await fetchPageInternal(client, objectType, objectSet, args);\n return { value: result };\n } catch (e) {\n if (e instanceof Error) {\n return { error: e };\n }\n return { error: e as Error };\n }\n}\n\n/**\n * @param client\n * @param objectType\n * @param args\n * @param objectSet\n * @returns\n * @internal\n */\nexport async function fetchPage<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q>,\n R extends boolean,\n S extends NullabilityAdherence,\n>(\n client: MinimalClient,\n objectType: Q,\n args: FetchPageArgs<Q, L, R, any, S>,\n objectSet: ObjectSet = resolveBaseObjectSetType(objectType),\n): Promise<FetchPageResult<Q, L, R, S>> {\n return fetchPageInternal(client, objectType, objectSet, args);\n}\n\n/** @internal */\nexport async function fetchPageWithErrors<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q>,\n R extends boolean,\n S extends NullabilityAdherence,\n>(\n client: MinimalClient,\n objectType: Q,\n args: FetchPageArgs<Q, L, R, any, S>,\n objectSet: ObjectSet = resolveBaseObjectSetType(objectType),\n): Promise<Result<FetchPageResult<Q, L, R, S>>> {\n return fetchPageWithErrorsInternal(client, objectType, objectSet, args);\n}\n\nfunction applyFetchArgs<\n X extends {\n orderBy?: SearchOrderByV2;\n pageToken?: PageToken;\n pageSize?: PageSize;\n },\n>(\n args: FetchPageArgs<any, any, any, any, any>,\n body: X,\n): X {\n if (args?.$nextPageToken) {\n body.pageToken = args.$nextPageToken;\n }\n\n if (args?.$pageSize != null) {\n body.pageSize = args.$pageSize;\n }\n\n if (args?.$orderBy != null) {\n body.orderBy = {\n fields: Object.entries(args.$orderBy).map(([field, direction]) => ({\n field,\n direction,\n })),\n };\n }\n\n return body;\n}\n\n/** @internal */\nexport async function fetchObjectPage<\n Q extends ObjectTypeDefinition,\n L extends PropertyKeys<Q>,\n R extends boolean,\n S extends NullabilityAdherence,\n>(\n client: MinimalClient,\n objectType: Q,\n args: FetchPageArgs<Q, L, R, Augments, S>,\n objectSet: ObjectSet,\n): Promise<FetchPageResult<Q, L, R, S>> {\n const r = await OntologiesV2.OntologyObjectSets.load(\n addUserAgentAndRequestContextHeaders(client, objectType),\n await client.ontologyRid,\n applyFetchArgs<LoadObjectSetRequestV2>(args, {\n objectSet,\n // We have to do the following case because LoadObjectSetRequestV2 isn't readonly\n select: ((args?.$select as string[] | undefined) ?? []), // FIXME?\n excludeRid: !args?.$includeRid,\n }),\n );\n\n return Promise.resolve({\n data: await client.objectFactory(\n client,\n r.data as OntologyObjectV2[],\n undefined,\n undefined,\n args.$select,\n ),\n nextPageToken: r.nextPageToken,\n totalCount: r.totalCount,\n }) as unknown as Prom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AACM,WAAW,EACxBC,cAAc,CAAyBN,IAAI,EAAE;IAC3CX,SAAS;IACT;IACA8B,MAAM,EAAInB,IAAI,EAAEY,OAAO,IAA6B,EAAG;IAAE;IACzDQ,UAAU,EAAE,CAACpB,IAAI,EAAEgB;EACrB,CAAC,CACH,CAAC;EAED,OAAOK,OAAO,CAACC,OAAO,CAAC;IACrBR,IAAI,EAAE,MAAMf,MAAM,CAACgB,aAAa,CAC9BhB,MAAM,EACNgD,CAAC,CAACjC,IAAI,EACNtB,SAAS,EACTA,SAAS,EACTQ,IAAI,CAACY,OACP,CAAC;IACDa,aAAa,EAAEsB,CAAC,CAACtB,aAAa;IAC9BC,UAAU,EAAEqB,CAAC,CAACrB;EAChB,CAAC,CAAC;AACJ","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 { Todo } from "@osdk/client.test.ontology";
16
+
17
+ import { Employee, Todo } from "@osdk/client.test.ontology";
17
18
  import { describe, expect, expectTypeOf, it } from "vitest";
18
19
  import { createMinimalClient } from "../createMinimalClient.js";
19
20
  import { fetchPage, objectSetToSearchJsonV2 } from "../object/fetchPage.js";
@@ -26,10 +27,13 @@ describe(fetchPage, () => {
26
27
  // this helper lets us get return types of functions that are generic
27
28
 
28
29
  expectTypeOf().branded.toEqualTypeOf();
30
+
29
31
  // e.g. fetchPage({ select: [] });
30
32
  expectTypeOf().branded.toEqualTypeOf();
33
+
31
34
  // e.g. fetchPage()
32
35
  expectTypeOf().branded.toEqualTypeOf();
36
+
33
37
  // e.g. fetchPage({ $select: ["text"]}
34
38
  expectTypeOf().branded.toEqualTypeOf();
35
39
  });
@@ -89,6 +93,81 @@ describe(fetchPage, () => {
89
93
  }]
90
94
  });
91
95
  });
96
+ it("where clause keys correctly typed", () => {
97
+ const client = createMinimalClient(metadata, "https://foo", async () => "");
98
+ const objectSet = createObjectSet(Todo, client);
99
+ const objectSetWithSpecialPropertyTypes = createObjectSet(Employee, client);
100
+ expectTypeOf(objectSet.where).toBeCallableWith({
101
+ $and: [{
102
+ id: {
103
+ $gt: 2
104
+ }
105
+ }, {
106
+ id: {
107
+ $lte: 2
108
+ }
109
+ }]
110
+ });
111
+ expectTypeOf(objectSet.where).toBeCallableWith({
112
+ // @ts-expect-error
113
+ id: {
114
+ $gt: 2,
115
+ $lte: 2
116
+ }
117
+ });
118
+
119
+ // We used to default to number filters for other types, like geotimeseries reference and timeseries. These tests will make sure
120
+ // we don't do that anymore
121
+ expectTypeOf(objectSetWithSpecialPropertyTypes.where).toBeCallableWith({
122
+ $and: [{
123
+ employeeLocation: {
124
+ $eq: "myLocation"
125
+ }
126
+ }, {
127
+ employeeLocation: {
128
+ $ne: "notMyLocation"
129
+ }
130
+ }, {
131
+ employeeLocation: {
132
+ $isNull: false
133
+ }
134
+ },
135
+ // @ts-expect-error
136
+ {
137
+ employeeLocation: {
138
+ $isNull: false,
139
+ $eq: "myLocation"
140
+ }
141
+ },
142
+ // @ts-expect-error
143
+ {
144
+ employeeLocation: {
145
+ $gt: 5
146
+ }
147
+ }]
148
+ });
149
+ expectTypeOf(objectSetWithSpecialPropertyTypes.where).toBeCallableWith({
150
+ $and: [{
151
+ employeeStatus: {
152
+ $eq: "myStatus"
153
+ }
154
+ }, {
155
+ employeeLocation: {
156
+ $ne: "notMyStatus"
157
+ }
158
+ }, {
159
+ employeeLocation: {
160
+ $isNull: false
161
+ }
162
+ },
163
+ // @ts-expect-error
164
+ {
165
+ employeeLocation: {
166
+ $lte: 5
167
+ }
168
+ }]
169
+ });
170
+ });
92
171
  describe("includeRid", () => {
93
172
  it("properly returns the correct string for includeRid", () => {
94
173
  expectTypeOf().toEqualTypeOf();
@@ -1 +1 @@
1
- {"version":3,"file":"fetchPage.test.js","names":["Todo","describe","expect","expectTypeOf","it","createMinimalClient","fetchPage","objectSetToSearchJsonV2","createObjectSet","getWireObjectSet","metadata","ontologyRid","branded","toEqualTypeOf","type","objectSet","objectType","where","field","value","undefined","toEqual","client","text","id","$gt","wireObjectSet"],"sources":["fetchPage.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 { Todo } from \"@osdk/client.test.ontology\";\nimport { describe, expect, expectTypeOf, it } from \"vitest\";\nimport { createMinimalClient } from \"../createMinimalClient.js\";\nimport { fetchPage, objectSetToSearchJsonV2 } from \"../object/fetchPage.js\";\nimport { createObjectSet, getWireObjectSet, } from \"../objectSet/createObjectSet.js\";\nconst metadata = {\n ontologyRid: \"asdf\",\n};\ndescribe(fetchPage, () => {\n it(\"infers select properly\", () => {\n // this helper lets us get return types of functions that are generic\n class Helper {\n fetchPage() {\n return fetchPage({}, {}, {});\n }\n }\n expectTypeOf()\n .branded\n .toEqualTypeOf();\n // e.g. fetchPage({ select: [] });\n expectTypeOf()\n .branded\n .toEqualTypeOf();\n // e.g. fetchPage()\n expectTypeOf()\n .branded\n .toEqualTypeOf();\n // e.g. fetchPage({ $select: [\"text\"]}\n expectTypeOf()\n .branded\n .toEqualTypeOf();\n });\n it(\"converts interface objectsets to search properly\", () => {\n expect(objectSetToSearchJsonV2({\n type: \"filter\",\n objectSet: {\n type: \"filter\",\n objectSet: {\n type: \"base\",\n objectType: \"Todo\",\n },\n where: {\n type: \"eq\",\n field: \"text\",\n value: \"hello\",\n },\n },\n where: {\n type: \"gt\",\n field: \"id\",\n value: 2,\n },\n }, \"Todo\", undefined)).toEqual({\n type: \"and\",\n value: [\n {\n type: \"gt\",\n field: \"id\",\n value: 2,\n },\n {\n type: \"eq\",\n field: \"text\",\n value: \"hello\",\n },\n ],\n });\n });\n it(\"converts interface objectsets to search properly part 2\", () => {\n const client = createMinimalClient(metadata, \"https://foo\", async () => \"\");\n const objectSet = createObjectSet(Todo, client).where({\n text: \"hello\",\n }).where({\n id: { $gt: 2 },\n });\n const wireObjectSet = getWireObjectSet(objectSet);\n expect(objectSetToSearchJsonV2(wireObjectSet, \"Todo\", undefined)).toEqual({\n type: \"and\",\n value: [\n {\n type: \"gt\",\n field: \"id\",\n value: 2,\n },\n {\n type: \"eq\",\n field: \"text\",\n value: \"hello\",\n },\n ],\n });\n });\n describe(\"includeRid\", () => {\n it(\"properly returns the correct string for includeRid\", () => {\n expectTypeOf()\n .toEqualTypeOf();\n expectTypeOf()\n .branded\n .toEqualTypeOf();\n });\n it(\"works with $all\", () => {\n expectTypeOf().branded\n .toEqualTypeOf();\n expectTypeOf()\n .branded\n .toEqualTypeOf();\n expectTypeOf()\n .branded\n .toEqualTypeOf();\n expectTypeOf()\n .branded\n .toEqualTypeOf();\n expectTypeOf()\n .branded\n .toEqualTypeOf();\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,4BAA4B;AACjD,SAASC,QAAQ,EAAEC,MAAM,EAAEC,YAAY,EAAEC,EAAE,QAAQ,QAAQ;AAC3D,SAASC,mBAAmB,QAAQ,2BAA2B;AAC/D,SAASC,SAAS,EAAEC,uBAAuB,QAAQ,wBAAwB;AAC3E,SAASC,eAAe,EAAEC,gBAAgB,QAAS,iCAAiC;AACpF,MAAMC,QAAQ,GAAG;EACbC,WAAW,EAAE;AACjB,CAAC;AACDV,QAAQ,CAACK,SAAS,EAAE,MAAM;EACtBF,EAAE,CAAC,wBAAwB,EAAE,MAAM;IAC/B;;IAMAD,YAAY,CAAC,CAAC,CACTS,OAAO,CACPC,aAAa,CAAC,CAAC;IACpB;IACAV,YAAY,CAAC,CAAC,CACTS,OAAO,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GAAGjB,gBAAgB,CAACM,SAAS,CAAC;IACjDb,MAAM,CAACK,uBAAuB,CAACmB,aAAa,EAAE,MAAM,EAAEN,SAAS,CAAC,CAAC,CAACC,OAAO,CAAC;MACtEP,IAAI,EAAE,KAAK;MACXK,KAAK,EAAE,CACH;QACIL,IAAI,EAAE,IAAI;QACVI,KAAK,EAAE,IAAI;QACXC,KAAK,EAAE;MACX,CAAC,EACD;QACIL,IAAI,EAAE,IAAI;QACVI,KAAK,EAAE,MAAM;QACbC,KAAK,EAAE;MACX,CAAC;IAET,CAAC,CAAC;EACN,CAAC,CAAC;EACFlB,QAAQ,CAAC,YAAY,EAAE,MAAM;IACzBG,EAAE,CAAC,oDAAoD,EAAE,MAAM;MAC3DD,YAAY,CAAC,CAAC,CACTU,aAAa,CAAC,CAAC;MACpBV,YAAY,CAAC,CAAC,CACTS,OAAO,CACPC,aAAa,CAAC,CAAC;IACxB,CAAC,CAAC;IACFT,EAAE,CAAC,iBAAiB,EAAE,MAAM;MACxBD,YAAY,CAAC,CAAC,CAACS,OAAO,CACjBC,aAAa,CAAC,CAAC;MACpBV,YAAY,CAAC,CAAC,CACTS,OAAO,CACPC,aAAa,CAAC,CAAC;MACpBV,YAAY,CAAC,CAAC,CACTS,OAAO,CACPC,aAAa,CAAC,CAAC;MACpBV,YAAY,CAAC,CAAC,CACTS,OAAO,CACPC,aAAa,CAAC,CAAC;MACpBV,YAAY,CAAC,CAAC,CACTS,OAAO,CACPC,aAAa,CAAC,CAAC;IACxB,CAAC,CAAC;EACN,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"fetchPage.test.js","names":["Employee","Todo","describe","expect","expectTypeOf","it","createMinimalClient","fetchPage","objectSetToSearchJsonV2","createObjectSet","getWireObjectSet","metadata","ontologyRid","branded","toEqualTypeOf","type","objectSet","objectType","where","field","value","undefined","toEqual","client","text","id","$gt","wireObjectSet","objectSetWithSpecialPropertyTypes","toBeCallableWith","$and","$lte","employeeLocation","$eq","$ne","$isNull","employeeStatus"],"sources":["fetchPage.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 type {\n FetchPageArgs,\n FetchPageResult,\n ObjectTypeDefinition,\n Osdk,\n PageResult,\n PropertyKeys,\n SelectArgToKeys,\n} from \"@osdk/api\";\nimport type { FooInterface } from \"@osdk/client.test.ontology\";\nimport { Employee, Todo } from \"@osdk/client.test.ontology\";\nimport type { SearchJsonQueryV2 } from \"@osdk/foundry.ontologies\";\nimport { describe, expect, expectTypeOf, it } from \"vitest\";\nimport { createMinimalClient } from \"../createMinimalClient.js\";\nimport { fetchPage, objectSetToSearchJsonV2 } from \"../object/fetchPage.js\";\nimport {\n createObjectSet,\n getWireObjectSet,\n} from \"../objectSet/createObjectSet.js\";\n\nconst metadata = {\n ontologyRid: \"asdf\",\n};\ntype TodoDef = Todo;\n\ndescribe(fetchPage, () => {\n it(\"infers select properly\", () => {\n // this helper lets us get return types of functions that are generic\n class Helper<\n T extends ObjectTypeDefinition,\n const A extends FetchPageArgs<T>,\n > {\n public fetchPage<\n L extends SelectArgToKeys<T, A>,\n R extends A[\"$includeRid\"] extends true ? true : false,\n >() {\n return fetchPage<\n T,\n L & PropertyKeys<T>,\n R,\n \"drop\"\n >({} as any, {} as any, {} as any);\n }\n }\n\n expectTypeOf<Awaited<ReturnType<Helper<TodoDef, {}>[\"fetchPage\"]>>>()\n .branded\n .toEqualTypeOf<PageResult<Osdk<TodoDef, \"$all\">>>();\n\n // e.g. fetchPage({ select: [] });\n expectTypeOf<\n Awaited<ReturnType<Helper<TodoDef, { $select: [] }>[\"fetchPage\"]>>\n >()\n .branded\n .toEqualTypeOf<PageResult<Osdk<TodoDef, \"$all\">>>();\n\n // e.g. fetchPage()\n expectTypeOf<\n Awaited<\n ReturnType<\n Helper<TodoDef, FetchPageArgs<TodoDef>>[\"fetchPage\"]\n >\n >\n >()\n .branded\n .toEqualTypeOf<PageResult<Osdk<TodoDef, \"$all\">>>();\n\n // e.g. fetchPage({ $select: [\"text\"]}\n expectTypeOf<\n Awaited<\n ReturnType<Helper<TodoDef, { $select: [\"text\"] }>[\"fetchPage\"]>\n >\n >()\n .branded\n .toEqualTypeOf<PageResult<Osdk<TodoDef, \"text\">>>();\n });\n\n it(\"converts interface objectsets to search properly\", () => {\n expect(objectSetToSearchJsonV2(\n {\n type: \"filter\",\n objectSet: {\n type: \"filter\",\n objectSet: {\n type: \"base\",\n objectType: \"Todo\",\n },\n where: {\n type: \"eq\",\n field: \"text\",\n value: \"hello\",\n },\n },\n\n where: {\n type: \"gt\",\n field: \"id\",\n value: 2,\n },\n },\n \"Todo\",\n undefined,\n )).toEqual(\n {\n type: \"and\",\n value: [\n {\n type: \"gt\",\n field: \"id\",\n value: 2,\n },\n {\n type: \"eq\",\n field: \"text\",\n value: \"hello\",\n },\n ],\n } satisfies SearchJsonQueryV2,\n );\n });\n\n it(\"converts interface objectsets to search properly part 2\", () => {\n const client = createMinimalClient(\n metadata,\n \"https://foo\",\n async () => \"\",\n );\n const objectSet = createObjectSet(Todo, client).where({\n text: \"hello\",\n }).where({\n id: { $gt: 2 },\n });\n\n const wireObjectSet = getWireObjectSet(objectSet);\n\n expect(objectSetToSearchJsonV2(wireObjectSet, \"Todo\", undefined)).toEqual(\n {\n type: \"and\",\n value: [\n {\n type: \"gt\",\n field: \"id\",\n value: 2,\n },\n {\n type: \"eq\",\n field: \"text\",\n value: \"hello\",\n },\n ],\n } satisfies SearchJsonQueryV2,\n );\n });\n\n it(\"where clause keys correctly typed\", () => {\n const client = createMinimalClient(\n metadata,\n \"https://foo\",\n async () => \"\",\n );\n const objectSet = createObjectSet(Todo, client);\n const objectSetWithSpecialPropertyTypes = createObjectSet(Employee, client);\n\n expectTypeOf(objectSet.where).toBeCallableWith({\n $and: [{ id: { $gt: 2 } }, { id: { $lte: 2 } }],\n });\n expectTypeOf(objectSet.where).toBeCallableWith({\n // @ts-expect-error\n id: { $gt: 2, $lte: 2 },\n });\n\n // We used to default to number filters for other types, like geotimeseries reference and timeseries. These tests will make sure\n // we don't do that anymore\n expectTypeOf(objectSetWithSpecialPropertyTypes.where).toBeCallableWith({\n $and: [\n { employeeLocation: { $eq: \"myLocation\" } },\n {\n employeeLocation: { $ne: \"notMyLocation\" },\n },\n { employeeLocation: { $isNull: false } },\n // @ts-expect-error\n { employeeLocation: { $isNull: false, $eq: \"myLocation\" } },\n // @ts-expect-error\n { employeeLocation: { $gt: 5 } },\n ],\n });\n\n expectTypeOf(objectSetWithSpecialPropertyTypes.where).toBeCallableWith({\n $and: [\n { employeeStatus: { $eq: \"myStatus\" } },\n {\n employeeLocation: { $ne: \"notMyStatus\" },\n },\n { employeeLocation: { $isNull: false } },\n // @ts-expect-error\n { employeeLocation: { $lte: 5 } },\n ],\n });\n });\n\n describe(\"includeRid\", () => {\n it(\"properly returns the correct string for includeRid\", () => {\n expectTypeOf<Awaited<FetchPageResult<TodoDef, \"text\", false, \"throw\">>>()\n .toEqualTypeOf<{\n data: Osdk<TodoDef, \"text\">[];\n nextPageToken: string | undefined;\n totalCount: string;\n }>();\n\n expectTypeOf<Awaited<FetchPageResult<TodoDef, \"text\", true, false>>>()\n .branded\n .toEqualTypeOf<{\n data: Osdk<TodoDef, \"text\" | \"$rid\" | \"$notStrict\">[];\n nextPageToken: string | undefined;\n totalCount: string;\n }>();\n });\n\n it(\"works with $all\", () => {\n expectTypeOf<\n Awaited<FetchPageResult<TodoDef, \"text\" | \"id\", false, \"drop\">>\n >().branded\n .toEqualTypeOf<{\n data: Osdk<TodoDef>[];\n nextPageToken: string | undefined;\n totalCount: string;\n }>();\n\n expectTypeOf<\n Awaited<FetchPageResult<TodoDef, \"text\" | \"id\", true, \"drop\">>\n >()\n .branded\n .toEqualTypeOf<{\n data: Osdk<TodoDef, \"$all\" | \"$rid\">[];\n nextPageToken: string | undefined;\n totalCount: string;\n }>();\n\n expectTypeOf<\n Awaited<FetchPageResult<TodoDef, \"text\" | \"id\", true, \"drop\">>\n >()\n .branded\n .toEqualTypeOf<{\n data: Osdk<TodoDef, \"$all\" | \"$rid\">[];\n nextPageToken: string | undefined;\n totalCount: string;\n }>();\n\n expectTypeOf<\n Awaited<FetchPageResult<FooInterface, \"fooSpt\", true, \"drop\">>\n >()\n .branded\n .toEqualTypeOf<{\n data: Osdk<FooInterface, \"$all\" | \"$rid\">[];\n nextPageToken: string | undefined;\n totalCount: string;\n }>();\n\n expectTypeOf<\n Awaited<FetchPageResult<FooInterface, \"fooSpt\", true, \"drop\">>\n >()\n .branded\n .toEqualTypeOf<{\n data: Osdk<FooInterface, \"$all\" | \"$rid\">[];\n nextPageToken: string | undefined;\n totalCount: string;\n }>();\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA,SAASA,QAAQ,EAAEC,IAAI,QAAQ,4BAA4B;AAE3D,SAASC,QAAQ,EAAEC,MAAM,EAAEC,YAAY,EAAEC,EAAE,QAAQ,QAAQ;AAC3D,SAASC,mBAAmB,QAAQ,2BAA2B;AAC/D,SAASC,SAAS,EAAEC,uBAAuB,QAAQ,wBAAwB;AAC3E,SACEC,eAAe,EACfC,gBAAgB,QACX,iCAAiC;AAExC,MAAMC,QAAQ,GAAG;EACfC,WAAW,EAAE;AACf,CAAC;AAGDV,QAAQ,CAACK,SAAS,EAAE,MAAM;EACxBF,EAAE,CAAC,wBAAwB,EAAE,MAAM;IACjC;;IAkBAD,YAAY,CAAwD,CAAC,CAClES,OAAO,CACPC,aAAa,CA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AAa,CAIX,CAAC;IACR,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -13,8 +13,10 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { PalantirApiError } from "@osdk/shared.net.errors";
17
18
  import { fetchPage } from "./fetchPage.js";
19
+
18
20
  /** @internal */
19
21
  export async function fetchSingle(client, objectType, args, objectSet) {
20
22
  const result = await fetchPage(client, objectType, {
@@ -26,6 +28,7 @@ export async function fetchSingle(client, objectType, args, objectSet) {
26
28
  }
27
29
  return result.data[0];
28
30
  }
31
+
29
32
  /** @internal */
30
33
  export async function fetchSingleWithErrors(client, objectType, args, objectSet) {
31
34
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"fetchSingle.js","names":["PalantirApiError","fetchPage","fetchSingle","client","objectType","args","objectSet","result","$pageSize","data","length","nextPageToken","fetchSingleWithErrors","value","e","Error","error"],"sources":["fetchSingle.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 { PalantirApiError } from \"@osdk/shared.net.errors\";\nimport { fetchPage } from \"./fetchPage.js\";\n/** @internal */\nexport async function fetchSingle(client, objectType, args, objectSet) {\n const result = await fetchPage(client, objectType, { ...args, $pageSize: 1 }, objectSet);\n if (result.data.length !== 1 || result.nextPageToken != null) {\n throw new PalantirApiError(`Expected a single result but got ${result.data.length} instead${result.nextPageToken != null ? \" with nextPageToken set\" : \"\"}`);\n }\n return result.data[0];\n}\n/** @internal */\nexport async function fetchSingleWithErrors(client, objectType, args, objectSet) {\n try {\n const result = await fetchSingle(client, objectType, args, objectSet);\n return { value: result };\n }\n catch (e) {\n if (e instanceof Error) {\n return { error: e };\n }\n return { error: e };\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,gBAAgB,QAAQ,yBAAyB;AAC1D,SAASC,SAAS,QAAQ,gBAAgB;AAC1C;AACA,OAAO,eAAeC,WAAWA,CAACC,MAAM,EAAEC,UAAU,EAAEC,IAAI,EAAEC,SAAS,EAAE;EACnE,MAAMC,MAAM,GAAG,MAAMN,SAAS,CAACE,MAAM,EAAEC,UAAU,EAAE;IAAE,GAAGC,IAAI;IAAEG,SAAS,EAAE;EAAE,CAAC,EAAEF,SAAS,CAAC;EACxF,IAAIC,MAAM,CAACE,IAAI,CAACC,MAAM,KAAK,CAAC,IAAIH,MAAM,CAACI,aAAa,IAAI,IAAI,EAAE;IAC1D,MAAM,IAAIX,gBAAgB,CAAC,oCAAoCO,MAAM,CAACE,IAAI,CAACC,MAAM,WAAWH,MAAM,CAACI,aAAa,IAAI,IAAI,GAAG,yBAAyB,GAAG,EAAE,EAAE,CAAC;EAChK;EACA,OAAOJ,MAAM,CAACE,IAAI,CAAC,CAAC,CAAC;AACzB;AACA;AACA,OAAO,eAAeG,qBAAqBA,CAACT,MAAM,EAAEC,UAAU,EAAEC,IAAI,EAAEC,SAAS,EAAE;EAC7E,IAAI;IACA,MAAMC,MAAM,GAAG,MAAML,WAAW,CAACC,MAAM,EAAEC,UAAU,EAAEC,IAAI,EAAEC,SAAS,CAAC;IACrE,OAAO;MAAEO,KAAK,EAAEN;IAAO,CAAC;EAC5B,CAAC,CACD,OAAOO,CAAC,EAAE;IACN,IAAIA,CAAC,YAAYC,KAAK,EAAE;MACpB,OAAO;QAAEC,KAAK,EAAEF;MAAE,CAAC;IACvB;IACA,OAAO;MAAEE,KAAK,EAAEF;IAAE,CAAC;EACvB;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"fetchSingle.js","names":["PalantirApiError","fetchPage","fetchSingle","client","objectType","args","objectSet","result","$pageSize","data","length","nextPageToken","fetchSingleWithErrors","value","e","Error","error"],"sources":["fetchSingle.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 FetchPageArgs,\n ObjectOrInterfaceDefinition,\n Result,\n SingleOsdkResult,\n} from \"@osdk/api\";\nimport type { ObjectSet } from \"@osdk/foundry.ontologies\";\nimport { PalantirApiError } from \"@osdk/shared.net.errors\";\nimport type { MinimalClient } from \"../MinimalClientContext.js\";\nimport { fetchPage } from \"./fetchPage.js\";\n\n/** @internal */\nexport async function fetchSingle<\n Q extends ObjectOrInterfaceDefinition,\n const A extends FetchPageArgs<Q, any, any>,\n>(\n client: MinimalClient,\n objectType: Q,\n args: A,\n objectSet: ObjectSet,\n): Promise<\n A extends FetchPageArgs<Q, infer L, infer R, any, infer S>\n ? SingleOsdkResult<Q, L, R, S>\n : SingleOsdkResult<Q, any, any, any>\n> {\n const result = await fetchPage(\n client,\n objectType,\n { ...args, $pageSize: 1 },\n objectSet,\n );\n\n if (result.data.length !== 1 || result.nextPageToken != null) {\n throw new PalantirApiError(\n `Expected a single result but got ${result.data.length} instead${\n result.nextPageToken != null ? \" with nextPageToken set\" : \"\"\n }`,\n );\n }\n\n return result.data[0] as any;\n}\n\n/** @internal */\nexport async function fetchSingleWithErrors<\n Q extends ObjectOrInterfaceDefinition,\n const A extends FetchPageArgs<Q, any, any>,\n>(\n client: MinimalClient,\n objectType: Q,\n args: A,\n objectSet: ObjectSet,\n): Promise<\n Result<\n A extends FetchPageArgs<Q, infer L, infer R, any, infer S>\n ? SingleOsdkResult<Q, L, R, S>\n : SingleOsdkResult<Q, any, any, any>\n >\n> {\n try {\n const result = await fetchSingle(client, objectType, args, objectSet);\n return { value: result as any };\n } catch (e) {\n if (e instanceof Error) {\n return { error: e };\n }\n return { error: e as Error };\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,SAASA,gBAAgB,QAAQ,yBAAyB;AAE1D,SAASC,SAAS,QAAQ,gBAAgB;;AAE1C;AACA,OAAO,eAAeC,WAAWA,CAI/BC,MAAqB,EACrBC,UAAa,EACbC,IAAO,EACPC,SAAoB,EAKpB;EACA,MAAMC,MAAM,GAAG,MAAMN,SAAS,CAC5BE,MAAM,EACNC,UAAU,EACV;IAAE,GAAGC,IAAI;IAAEG,SAAS,EAAE;EAAE,CAAC,EACzBF,SACF,CAAC;EAED,IAAIC,MAAM,CAACE,IAAI,CAACC,MAAM,KAAK,CAAC,IAAIH,MAAM,CAACI,aAAa,IAAI,IAAI,EAAE;IAC5D,MAAM,IAAIX,gBAAgB,CACxB,oCAAoCO,MAAM,CAACE,IAAI,CAACC,MAAM,WACpDH,MAAM,CAACI,aAAa,IAAI,IAAI,GAAG,yBAAyB,GAAG,EAAE,EAEjE,CAAC;EACH;EAEA,OAAOJ,MAAM,CAACE,IAAI,CAAC,CAAC,CAAC;AACvB;;AAEA;AACA,OAAO,eAAeG,qBAAqBA,CAIzCT,MAAqB,EACrBC,UAAa,EACbC,IAAO,EACPC,SAAoB,EAOpB;EACA,IAAI;IACF,MAAMC,MAAM,GAAG,MAAML,WAAW,CAACC,MAAM,EAAEC,UAAU,EAAEC,IAAI,EAAEC,SAAS,CAAC;IACrE,OAAO;MAAEO,KAAK,EAAEN;IAAc,CAAC;EACjC,CAAC,CAAC,OAAOO,CAAC,EAAE;IACV,IAAIA,CAAC,YAAYC,KAAK,EAAE;MACtB,OAAO;QAAEC,KAAK,EAAEF;MAAE,CAAC;IACrB;IACA,OAAO;MAAEE,KAAK,EAAEF;IAAW,CAAC;EAC9B;AACF","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 { $ontologyRid, Employee } from "@osdk/client.test.ontology";
17
18
  import { apiServer } from "@osdk/shared.test";
18
19
  import { afterAll, beforeAll, describe, expect, it } from "vitest";
@@ -49,6 +50,7 @@ describe("Timeseries", () => {
49
50
  type: "Point",
50
51
  coordinates: [3.3, 3.3]
51
52
  });
53
+
52
54
  // Making sure caching working as expected
53
55
  const initialPointEmployee2 = employee2.employeeLocation?.lastFetchedValue;
54
56
  expect(initialPointEmployee2).toBeUndefined();
@@ -1 +1 @@
1
- {"version":3,"file":"geotimeseriesreference.test.js","names":["$ontologyRid","Employee","apiServer","afterAll","beforeAll","describe","expect","it","createClient","client","listen","close","employee","fetchOne","employee2","$primaryKey","toEqual","location","employeeLocation","toBeDefined","initialLastPoint","lastFetchedValue","toBeUndefined","fetchedPoint","getLatestValue","nextLastPoint","time","value","type","coordinates","initialPointEmployee2","fetchedPoint2","nextLastPoint2","points","getAllValues","$before","$unit","$after","$startTime","$endTime","pointsIter","asyncIterValues","point","push"],"sources":["geotimeseriesreference.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 { $ontologyRid, Employee } from \"@osdk/client.test.ontology\";\nimport { apiServer } from \"@osdk/shared.test\";\nimport { afterAll, beforeAll, describe, expect, it } from \"vitest\";\nimport { createClient } from \"../createClient.js\";\ndescribe(\"Timeseries\", () => {\n let client;\n beforeAll(async () => {\n apiServer.listen();\n client = createClient(\"https://stack.palantir.com\", $ontologyRid, async () => \"myAccessToken\");\n });\n afterAll(() => {\n apiServer.close();\n });\n it(\"get latest value works\", async () => {\n const employee = await client(Employee).fetchOne(50030);\n const employee2 = await client(Employee).fetchOne(50031);\n expect(employee.$primaryKey).toEqual(50030);\n expect(employee2.$primaryKey).toEqual(50031);\n const location = employee.employeeLocation;\n expect(location).toBeDefined();\n const initialLastPoint = employee.employeeLocation?.lastFetchedValue;\n expect(initialLastPoint).toBeUndefined();\n const fetchedPoint = await employee.employeeLocation?.getLatestValue();\n const nextLastPoint = employee.employeeLocation?.lastFetchedValue;\n expect(employee.employeeLocation?.lastFetchedValue).toBeDefined();\n expect(nextLastPoint).toEqual(fetchedPoint);\n expect(nextLastPoint?.time).toEqual(\"2014-04-14\");\n expect(nextLastPoint?.value).toEqual({\n type: \"Point\",\n coordinates: [3.3, 3.3],\n });\n expect(fetchedPoint?.time).toEqual(\"2014-04-14\");\n expect(fetchedPoint?.value).toEqual({\n type: \"Point\",\n coordinates: [3.3, 3.3],\n });\n // Making sure caching working as expected\n const initialPointEmployee2 = employee2.employeeLocation?.lastFetchedValue;\n expect(initialPointEmployee2).toBeUndefined();\n const fetchedPoint2 = await employee2.employeeLocation?.getLatestValue();\n const nextLastPoint2 = employee2.employeeLocation?.lastFetchedValue;\n expect(employee2.employeeLocation?.lastFetchedValue).toBeDefined();\n expect(nextLastPoint2).toEqual(fetchedPoint2);\n expect(nextLastPoint2?.time).toEqual(\"2013-03-13\");\n expect(nextLastPoint2?.value).toEqual({\n type: \"Point\",\n coordinates: [2.2, 2.2],\n });\n expect(fetchedPoint2?.time).toEqual(\"2013-03-13\");\n expect(fetchedPoint2?.value).toEqual({\n type: \"Point\",\n coordinates: [2.2, 2.2],\n });\n });\n it(\"getAll values with before works\", async () => {\n const employee = await client(Employee).fetchOne(50030);\n expect(employee.$primaryKey).toEqual(50030);\n const points = await employee.employeeLocation?.getAllValues({\n $before: 1,\n $unit: \"month\",\n });\n expect(points).toBeDefined();\n expect(points).toEqual([{\n time: \"2012-02-12\",\n value: { type: \"Point\", coordinates: [1.1, 1.1] },\n }, {\n time: \"2013-03-13\",\n value: { type: \"Point\", coordinates: [2.2, 2.2] },\n }, {\n time: \"2014-04-14\",\n value: { type: \"Point\", coordinates: [3.3, 3.3] },\n }]);\n });\n it(\"getAll values with after works\", async () => {\n const employee = await client(Employee).fetchOne(50030);\n expect(employee.$primaryKey).toEqual(50030);\n const points = await employee.employeeLocation?.getAllValues({\n $after: 1,\n $unit: \"month\",\n });\n expect(points).toBeDefined();\n expect(points).toEqual([{\n time: \"2012-02-12\",\n value: { type: \"Point\", coordinates: [1.1, 1.1] },\n }, {\n time: \"2014-04-14\",\n value: { type: \"Point\", coordinates: [3.3, 3.3] },\n }]);\n });\n it(\"getAll points with absolute range works\", async () => {\n const employee = await client(Employee).fetchOne(50030);\n expect(employee.$primaryKey).toEqual(50030);\n const points = await employee.employeeLocation?.getAllValues({\n $startTime: \"2013-03-12T12:00:00.000Z\",\n $endTime: \"2014-04-14T12:00:00.000Z\",\n });\n expect(points).toBeDefined();\n expect(points).toEqual([{\n time: \"2013-03-13\",\n value: { type: \"Point\", coordinates: [2.2, 2.2] },\n }, {\n time: \"2014-04-14\",\n value: { type: \"Point\", coordinates: [3.3, 3.3] },\n }]);\n });\n it(\"getAll points with no query works\", async () => {\n const employee = await client(Employee).fetchOne(50030);\n expect(employee.$primaryKey).toEqual(50030);\n const points = await employee.employeeLocation?.getAllValues();\n expect(points).toBeDefined();\n expect(points).toEqual([\n { time: \"2012-02-12\", value: { type: \"Point\", coordinates: [1.1, 1.1] } },\n { time: \"2012-02-12\", value: { type: \"Point\", coordinates: [1.1, 1.1] } },\n {\n time: \"2013-03-13\",\n value: { type: \"Point\", coordinates: [2.2, 2.2] },\n },\n { time: \"2014-04-14\", value: { type: \"Point\", coordinates: [3.3, 3.3] } },\n { time: \"2014-04-14\", value: { type: \"Point\", coordinates: [3.3, 3.3] } },\n ]);\n });\n it(\"getAll points with no data works\", async () => {\n const employee = await client(Employee).fetchOne(50030);\n expect(employee.$primaryKey).toEqual(50030);\n const points = await employee.employeeLocation?.getAllValues({\n $startTime: \"2021-03-12T12:00:00.000Z\",\n $endTime: \"2022-04-14T12:00:00.000Z\",\n });\n expect(points).toBeDefined();\n expect(points).toEqual([]);\n });\n it(\"async iter points with absolute range works\", async () => {\n const employee = await client(Employee).fetchOne(50030);\n expect(employee.$primaryKey).toEqual(50030);\n const pointsIter = employee.employeeLocation?.asyncIterValues({\n $startTime: \"2013-03-12T12:00:00.000Z\",\n $endTime: \"2014-04-14T12:00:00.000Z\",\n });\n const points = [];\n for await (const point of pointsIter) {\n points.push(point);\n }\n expect(points).toBeDefined();\n expect(points).toEqual([{\n time: \"2013-03-13\",\n value: { type: \"Point\", coordinates: [2.2, 2.2] },\n }, {\n time: \"2014-04-14\",\n value: { type: \"Point\", coordinates: [3.3, 3.3] },\n }]);\n });\n it(\"async iter points with no query\", async () => {\n const employee = await client(Employee).fetchOne(50030);\n expect(employee.$primaryKey).toEqual(50030);\n const pointsIter = employee.employeeLocation?.asyncIterValues();\n const points = [];\n for await (const point of pointsIter) {\n points.push(point);\n }\n expect(points).toBeDefined();\n expect(points).toEqual([\n { time: \"2012-02-12\", value: { type: \"Point\", coordinates: [1.1, 1.1] } },\n { time: \"2012-02-12\", value: { type: \"Point\", coordinates: [1.1, 1.1] } },\n {\n time: \"2013-03-13\",\n value: { type: \"Point\", coordinates: [2.2, 2.2] },\n },\n { time: \"2014-04-14\", value: { type: \"Point\", coordinates: [3.3, 3.3] } },\n { time: \"2014-04-14\", value: { type: \"Point\", coordinates: [3.3, 3.3] } },\n ]);\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;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G;MAAE;IACpD,CAAC,EACD;MAAEH,IAAI,EAAE,YAAY;MAAEC,KAAK,EAAE;QAAEC,IAAI,EAAE,OAAO;QAAEC,WAAW,EAAE,CAAC,GAAG,EAAE,GAAG;MAAE;IAAE,CAAC,EACzE;MAAEH,IAAI,EAAE,YAAY;MAAEC,KAAK,EAAE;QAAEC,IAAI,EAAE,OAAO;QAAEC,WAAW,EAAE,CAAC,GAAG,EAAE,GAAG;MAAE;IAAE,CAAC,CAC5E,CAAC;EACN,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"geotimeseriesreference.test.js","names":["$ontologyRid","Employee","apiServer","afterAll","beforeAll","describe","expect","it","createClient","client","listen","close","employee","fetchOne","employee2","$primaryKey","toEqual","location","employeeLocation","toBeDefined","initialLastPoint","lastFetchedValue","toBeUndefined","fetchedPoint","getLatestValue","nextLastPoint","time","value","type","coordinates","initialPointEmployee2","fetchedPoint2","nextLastPoint2","points","getAllValues","$before","$unit","$after","$startTime","$endTime","pointsIter","asyncIterValues","point","push"],"sources":["geotimeseriesreference.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 { TimeSeriesPoint } from \"@osdk/api\";\nimport { $ontologyRid, Employee } from \"@osdk/client.test.ontology\";\nimport { apiServer } from \"@osdk/shared.test\";\nimport { afterAll, beforeAll, describe, expect, it } from \"vitest\";\nimport type { Client } from \"../Client.js\";\nimport { createClient } from \"../createClient.js\";\n\ndescribe(\"Timeseries\", () => {\n let client: Client;\n\n beforeAll(async () => {\n apiServer.listen();\n client = createClient(\n \"https://stack.palantir.com\",\n $ontologyRid,\n async () => \"myAccessToken\",\n );\n });\n\n afterAll(() => {\n apiServer.close();\n });\n\n it(\"get latest value works\", async () => {\n const employee = await client(Employee).fetchOne(50030);\n const employee2 = await client(Employee).fetchOne(50031);\n expect(employee.$primaryKey).toEqual(50030);\n expect(employee2.$primaryKey).toEqual(50031);\n const location = employee.employeeLocation;\n\n expect(location).toBeDefined();\n\n const initialLastPoint = employee.employeeLocation?.lastFetchedValue;\n expect(initialLastPoint).toBeUndefined();\n\n const fetchedPoint = await employee.employeeLocation?.getLatestValue();\n const nextLastPoint = employee.employeeLocation?.lastFetchedValue;\n expect(employee.employeeLocation?.lastFetchedValue).toBeDefined();\n\n expect(nextLastPoint).toEqual(fetchedPoint);\n expect(nextLastPoint?.time).toEqual(\"2014-04-14\");\n expect(nextLastPoint?.value).toEqual({\n type: \"Point\",\n coordinates: [3.3, 3.3],\n });\n\n expect(fetchedPoint?.time).toEqual(\"2014-04-14\");\n expect(fetchedPoint?.value).toEqual({\n type: \"Point\",\n coordinates: [3.3, 3.3],\n });\n\n // Making sure caching working as expected\n const initialPointEmployee2 = employee2.employeeLocation?.lastFetchedValue;\n expect(initialPointEmployee2).toBeUndefined();\n\n const fetchedPoint2 = await employee2.employeeLocation?.getLatestValue();\n const nextLastPoint2 = employee2.employeeLocation?.lastFetchedValue;\n expect(employee2.employeeLocation?.lastFetchedValue).toBeDefined();\n\n expect(nextLastPoint2).toEqual(fetchedPoint2);\n expect(nextLastPoint2?.time).toEqual(\"2013-03-13\");\n expect(nextLastPoint2?.value).toEqual({\n type: \"Point\",\n coordinates: [2.2, 2.2],\n });\n\n expect(fetchedPoint2?.time).toEqual(\"2013-03-13\");\n expect(fetchedPoint2?.value).toEqual({\n type: \"Point\",\n coordinates: [2.2, 2.2],\n });\n });\n\n it(\"getAll values with before works\", async () => {\n const employee = await client(Employee).fetchOne(50030);\n expect(employee.$primaryKey).toEqual(50030);\n const points = await employee.employeeLocation?.getAllValues({\n $before: 1,\n $unit: \"month\",\n });\n expect(points).toBeDefined();\n expect(points!).toEqual([{\n time: \"2012-02-12\",\n value: { type: \"Point\", coordinates: [1.1, 1.1] },\n }, {\n time: \"2013-03-13\",\n value: { type: \"Point\", coordinates: [2.2, 2.2] },\n }, {\n time: \"2014-04-14\",\n value: { type: \"Point\", coordinates: [3.3, 3.3] },\n }]);\n });\n\n it(\"getAll values with after works\", async () => {\n const employee = await client(Employee).fetchOne(50030);\n expect(employee.$primaryKey).toEqual(50030);\n const points = await employee.employeeLocation?.getAllValues({\n $after: 1,\n $unit: \"month\",\n });\n expect(points).toBeDefined();\n expect(points!).toEqual([{\n time: \"2012-02-12\",\n value: { type: \"Point\", coordinates: [1.1, 1.1] },\n }, {\n time: \"2014-04-14\",\n value: { type: \"Point\", coordinates: [3.3, 3.3] },\n }]);\n });\n\n it(\"getAll points with absolute range works\", async () => {\n const employee = await client(Employee).fetchOne(50030);\n expect(employee.$primaryKey).toEqual(50030);\n const points = await employee.employeeLocation?.getAllValues({\n $startTime: \"2013-03-12T12:00:00.000Z\",\n $endTime: \"2014-04-14T12:00:00.000Z\",\n });\n expect(points).toBeDefined();\n expect(points!).toEqual([{\n time: \"2013-03-13\",\n value: { type: \"Point\", coordinates: [2.2, 2.2] },\n }, {\n time: \"2014-04-14\",\n value: { type: \"Point\", coordinates: [3.3, 3.3] },\n }]);\n });\n\n it(\"getAll points with no query works\", async () => {\n const employee = await client(Employee).fetchOne(50030);\n expect(employee.$primaryKey).toEqual(50030);\n const points = await employee.employeeLocation?.getAllValues();\n expect(points).toBeDefined();\n expect(points!).toEqual([\n { time: \"2012-02-12\", value: { type: \"Point\", coordinates: [1.1, 1.1] } },\n { time: \"2012-02-12\", value: { type: \"Point\", coordinates: [1.1, 1.1] } },\n {\n time: \"2013-03-13\",\n value: { type: \"Point\", coordinates: [2.2, 2.2] },\n },\n { time: \"2014-04-14\", value: { type: \"Point\", coordinates: [3.3, 3.3] } },\n { time: \"2014-04-14\", value: { type: \"Point\", coordinates: [3.3, 3.3] } },\n ]);\n });\n\n it(\"getAll points with no data works\", async () => {\n const employee = await client(Employee).fetchOne(50030);\n expect(employee.$primaryKey).toEqual(50030);\n const points = await employee.employeeLocation?.getAllValues({\n $startTime: \"2021-03-12T12:00:00.000Z\",\n $endTime: \"2022-04-14T12:00:00.000Z\",\n });\n expect(points).toBeDefined();\n expect(points!).toEqual([]);\n });\n\n it(\"async iter points with absolute range works\", async () => {\n const employee = await client(Employee).fetchOne(50030);\n expect(employee.$primaryKey).toEqual(50030);\n const pointsIter = employee.employeeLocation?.asyncIterValues({\n $startTime: \"2013-03-12T12:00:00.000Z\",\n $endTime: \"2014-04-14T12:00:00.000Z\",\n });\n\n const points: TimeSeriesPoint<GeoJSON.Point>[] = [];\n for await (const point of pointsIter!) {\n points.push(point);\n }\n expect(points).toBeDefined();\n expect(points!).toEqual([{\n time: \"2013-03-13\",\n value: { type: \"Point\", coordinates: [2.2, 2.2] },\n }, {\n time: \"2014-04-14\",\n value: { type: \"Point\", coordinates: [3.3, 3.3] },\n }]);\n });\n\n it(\"async iter points with no query\", async () => {\n const employee = await client(Employee).fetchOne(50030);\n expect(employee.$primaryKey).toEqual(50030);\n const pointsIter = employee.employeeLocation?.asyncIterValues();\n\n const points: TimeSeriesPoint<GeoJSON.Point>[] = [];\n for await (const point of pointsIter!) {\n points.push(point);\n }\n expect(points).toBeDefined();\n expect(points!).toEqual([\n { time: \"2012-02-12\", value: { type: \"Point\", coordinates: [1.1, 1.1] } },\n { time: \"2012-02-12\", value: { type: \"Point\", coordinates: [1.1, 1.1] } },\n {\n time: \"2013-03-13\",\n value: { type: \"Point\", coordinates: [2.2, 2.2] },\n },\n { time: \"2014-04-14\", value: { type: \"Point\", coordinates: [3.3, 3.3] } },\n { time: \"2014-04-14\", value: { type: \"Point\", coordinates: [3.3, 3.3] } },\n ]);\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA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GAAG,EAAE,GAAG;MAAE;IAClD,CAAC,EACD;MAAEH,IAAI,EAAE,YAAY;MAAEC,KAAK,EAAE;QAAEC,IAAI,EAAE,OAAO;QAAEC,WAAW,EAAE,CAAC,GAAG,EAAE,GAAG;MAAE;IAAE,CAAC,EACzE;MAAEH,IAAI,EAAE,YAAY;MAAEC,KAAK,EAAE;QAAEC,IAAI,EAAE,OAAO;QAAEC,WAAW,EAAE,CAAC,GAAG,EAAE,GAAG;MAAE;IAAE,CAAC,CAC1E,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,55 @@
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
+
17
+ import { $ontologyRid, objectTypeWithAllPropertyTypes } from "@osdk/client.test.ontology";
18
+ import { apiServer, stubData } from "@osdk/shared.test";
19
+ import { afterAll, beforeAll, describe, expect, it } from "vitest";
20
+ import { createClient } from "../createClient.js";
21
+ describe("media", () => {
22
+ let client;
23
+ beforeAll(async () => {
24
+ apiServer.listen();
25
+ client = createClient("https://stack.palantir.com", $ontologyRid, async () => "myAccessToken");
26
+ });
27
+ afterAll(() => {
28
+ apiServer.close();
29
+ });
30
+ it("reads media metadata successfully", async () => {
31
+ const result = await client(objectTypeWithAllPropertyTypes).where({
32
+ id: stubData.objectWithAllPropertyTypes1.id
33
+ }).fetchPage();
34
+ const object1 = result.data[0];
35
+ expect(object1.mediaReference).toBeDefined();
36
+ const mediaMetadata = await object1.mediaReference?.fetchMetadata();
37
+ expect(mediaMetadata).toBeDefined();
38
+ expect(mediaMetadata?.path).toEqual("file1.txt");
39
+ expect(mediaMetadata?.mediaType).toEqual("application/json");
40
+ expect(mediaMetadata?.sizeBytes).toEqual(20);
41
+ });
42
+ it("reads media content successfully", async () => {
43
+ const result = await client(objectTypeWithAllPropertyTypes).where({
44
+ id: stubData.objectWithAllPropertyTypes1.id
45
+ }).fetchPage();
46
+ const object1 = result.data[0];
47
+ expect(object1.mediaReference).toBeDefined();
48
+ const mediaContent = await object1?.mediaReference?.fetchContents();
49
+ const mediaText = await mediaContent.text();
50
+ expect(JSON.parse(mediaText)).toEqual({
51
+ content: "Hello World"
52
+ });
53
+ });
54
+ });
55
+ //# sourceMappingURL=media.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media.test.js","names":["$ontologyRid","objectTypeWithAllPropertyTypes","apiServer","stubData","afterAll","beforeAll","describe","expect","it","createClient","client","listen","close","result","where","id","objectWithAllPropertyTypes1","fetchPage","object1","data","mediaReference","toBeDefined","mediaMetadata","fetchMetadata","path","toEqual","mediaType","sizeBytes","mediaContent","fetchContents","mediaText","text","JSON","parse","content"],"sources":["media.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 {\n $ontologyRid,\n objectTypeWithAllPropertyTypes,\n} from \"@osdk/client.test.ontology\";\nimport { apiServer, stubData } from \"@osdk/shared.test\";\nimport { afterAll, beforeAll, describe, expect, it } from \"vitest\";\nimport type { Client } from \"../Client.js\";\nimport { createClient } from \"../createClient.js\";\n\ndescribe(\"media\", () => {\n let client: Client;\n\n beforeAll(async () => {\n apiServer.listen();\n client = createClient(\n \"https://stack.palantir.com\",\n $ontologyRid,\n async () => \"myAccessToken\",\n );\n });\n\n afterAll(() => {\n apiServer.close();\n });\n\n it(\"reads media metadata successfully\", async () => {\n const result = await client(\n objectTypeWithAllPropertyTypes,\n )\n .where({ id: stubData.objectWithAllPropertyTypes1.id }).fetchPage();\n\n const object1 = result.data[0];\n expect(object1.mediaReference).toBeDefined();\n const mediaMetadata = await object1.mediaReference?.fetchMetadata();\n expect(mediaMetadata).toBeDefined();\n expect(mediaMetadata?.path).toEqual(\"file1.txt\");\n expect(mediaMetadata?.mediaType).toEqual(\"application/json\");\n expect(mediaMetadata?.sizeBytes).toEqual(20);\n });\n\n it(\"reads media content successfully\", async () => {\n const result = await client(objectTypeWithAllPropertyTypes)\n .where({ id: stubData.objectWithAllPropertyTypes1.id }).fetchPage();\n\n const object1 = result.data[0];\n expect(object1.mediaReference).toBeDefined();\n const mediaContent = await object1?.mediaReference?.fetchContents();\n const mediaText = await mediaContent!.text();\n expect(JSON.parse(mediaText)).toEqual({\n content: \"Hello World\",\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,YAAY,EACZC,8BAA8B,QACzB,4BAA4B;AACnC,SAASC,SAAS,EAAEC,QAAQ,QAAQ,mBAAmB;AACvD,SAASC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AAElE,SAASC,YAAY,QAAQ,oBAAoB;AAEjDH,QAAQ,CAAC,OAAO,EAAE,MAAM;EACtB,IAAII,MAAc;EAElBL,SAAS,CAAC,YAAY;IACpBH,SAAS,CAACS,MAAM,CAAC,CAAC;IAClBD,MAAM,GAAGD,YAAY,CACnB,4BAA4B,EAC5BT,YAAY,EACZ,YAAY,eACd,CAAC;E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C,CAAC;IACnE,MAAMC,SAAS,GAAG,MAAMF,YAAY,CAAEG,IAAI,CAAC,CAAC;IAC5CxB,MAAM,CAACyB,IAAI,CAACC,KAAK,CAACH,SAAS,CAAC,CAAC,CAACL,OAAO,CAAC;MACpCS,OAAO,EAAE;IACX,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Copyright 2025 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
+
17
+ export function isMediaReference(o) {
18
+ return typeof o === `object` && typeof o.mimeType === "string" && "reference" in o && typeof o.reference === "object" && o.reference.type === "mediaSetViewItem" && "mediaSetViewItem" in o.reference && typeof o.reference.mediaSetViewItem === "object" && typeof o.reference.mediaSetViewItem.mediaSetRid === "string" && typeof o.reference.mediaSetViewItem.mediaSetViewRid === "string" && typeof o.reference.mediaSetViewItem.mediaItemRid === "string";
19
+ }
20
+ //# sourceMappingURL=mediaUpload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mediaUpload.js","names":["isMediaReference","o","mimeType","reference","type","mediaSetViewItem","mediaSetRid","mediaSetViewRid","mediaItemRid"],"sources":["mediaUpload.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { MediaReference } from \"@osdk/api\";\n\nexport function isMediaReference(o: any): o is MediaReference {\n return typeof o === `object`\n && typeof o.mimeType === \"string\"\n && \"reference\" in o\n && typeof o.reference === \"object\"\n && o.reference.type === \"mediaSetViewItem\"\n && \"mediaSetViewItem\" in o.reference\n && typeof o.reference.mediaSetViewItem === \"object\"\n && typeof o.reference.mediaSetViewItem.mediaSetRid === \"string\"\n && typeof o.reference.mediaSetViewItem.mediaSetViewRid === \"string\"\n && typeof o.reference.mediaSetViewItem.mediaItemRid === \"string\";\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAO,SAASA,gBAAgBA,CAACC,CAAM,EAAuB;EAC5D,OAAO,OAAOA,CAAC,KAAK,QAAQ,IACvB,OAAOA,CAAC,CAACC,QAAQ,KAAK,QAAQ,IAC9B,WAAW,IAAID,CAAC,IAChB,OAAOA,CAAC,CAACE,SAAS,KAAK,QAAQ,IAC/BF,CAAC,CAACE,SAAS,CAACC,IAAI,KAAK,kBAAkB,IACvC,kBAAkB,IAAIH,CAAC,CAACE,SAAS,IACjC,OAAOF,CAAC,CAACE,SAAS,CAACE,gBAAgB,KAAK,QAAQ,IAChD,OAAOJ,CAAC,CAACE,SAAS,CAACE,gBAAgB,CAACC,WAAW,KAAK,QAAQ,IAC5D,OAAOL,CAAC,CAACE,SAAS,CAACE,gBAAgB,CAACE,eAAe,KAAK,QAAQ,IAChE,OAAON,CAAC,CAACE,SAAS,CAACE,gBAAgB,CAACG,YAAY,KAAK,QAAQ;AACpE","ignoreList":[]}