@osdk/client 2.1.0-beta.3 → 2.1.0-beta.31

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 (888) hide show
  1. package/CHANGELOG.md +441 -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 +12 -6
  17. package/build/browser/__unstable/ConjureSupport.js.map +1 -1
  18. package/build/browser/__unstable/createBulkLinksAsyncIterFactory.js +6 -2
  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 +3 -2
  25. package/build/browser/actions/applyAction.js.map +1 -1
  26. package/build/browser/createClient.js +50 -23
  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 +9 -2
  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/derivedProperties/createWithPropertiesObjectSet.js +106 -0
  43. package/build/browser/derivedProperties/createWithPropertiesObjectSet.js.map +1 -0
  44. package/build/browser/derivedProperties/createWithPropertiesObjectSet.test.js +100 -0
  45. package/build/browser/derivedProperties/createWithPropertiesObjectSet.test.js.map +1 -0
  46. package/build/browser/fetchMetadata.js +2 -0
  47. package/build/browser/fetchMetadata.js.map +1 -1
  48. package/build/browser/fetchMetadata.test.js +19 -0
  49. package/build/browser/fetchMetadata.test.js.map +1 -1
  50. package/build/browser/index.js +2 -1
  51. package/build/browser/index.js.map +1 -1
  52. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.js +3 -1
  53. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.js.map +1 -1
  54. package/build/browser/intellisense.test.js +5 -2
  55. package/build/browser/intellisense.test.js.map +1 -1
  56. package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.js +3 -1
  57. package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.js.map +1 -1
  58. package/build/browser/internal/conversions/modernToLegacyAggregationClause.js +2 -0
  59. package/build/browser/internal/conversions/modernToLegacyAggregationClause.js.map +1 -1
  60. package/build/browser/internal/conversions/modernToLegacyGroupByClause.js +1 -0
  61. package/build/browser/internal/conversions/modernToLegacyGroupByClause.js.map +1 -1
  62. package/build/browser/internal/conversions/modernToLegacyWhereClause.js +70 -21
  63. package/build/browser/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
  64. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js +402 -14
  65. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -1
  66. package/build/browser/object/AttachmentUpload.js +6 -7
  67. package/build/browser/object/AttachmentUpload.js.map +1 -1
  68. package/build/browser/object/Cache.js +27 -0
  69. package/build/browser/object/Cache.js.map +1 -1
  70. package/build/browser/object/Cache.test.js +10 -3
  71. package/build/browser/object/Cache.test.js.map +1 -1
  72. package/build/browser/object/SimpleCache.js +20 -0
  73. package/build/browser/object/SimpleCache.js.map +1 -1
  74. package/build/browser/object/aggregate.js +8 -10
  75. package/build/browser/object/aggregate.js.map +1 -1
  76. package/build/browser/object/aggregate.test.js +11 -9
  77. package/build/browser/object/aggregate.test.js.map +1 -1
  78. package/build/browser/object/attachment.test.js +1 -0
  79. package/build/browser/object/attachment.test.js.map +1 -1
  80. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.js +0 -15
  81. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -1
  82. package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.js +8 -3
  83. package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.js.map +1 -1
  84. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.js +0 -15
  85. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.js.map +1 -1
  86. package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js +4 -1
  87. package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js.map +1 -1
  88. package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js +0 -15
  89. package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js.map +1 -1
  90. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js +42 -85
  91. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  92. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.test.js +1 -6
  93. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.test.js.map +1 -1
  94. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js +88 -88
  95. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  96. package/build/browser/object/convertWireToOsdkObjects/getDollarAs.js +9 -3
  97. package/build/browser/object/convertWireToOsdkObjects/getDollarAs.js.map +1 -1
  98. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.js +15 -38
  99. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.js.map +1 -1
  100. package/build/browser/object/convertWireToOsdkObjects.js +53 -6
  101. package/build/browser/object/convertWireToOsdkObjects.js.map +1 -1
  102. package/build/browser/object/convertWireToOsdkObjects.test.js +197 -44
  103. package/build/browser/object/convertWireToOsdkObjects.test.js.map +1 -1
  104. package/build/browser/object/fetchPage.js +42 -24
  105. package/build/browser/object/fetchPage.js.map +1 -1
  106. package/build/browser/object/fetchPage.test.js +80 -1
  107. package/build/browser/object/fetchPage.test.js.map +1 -1
  108. package/build/browser/object/fetchSingle.js +3 -0
  109. package/build/browser/object/fetchSingle.js.map +1 -1
  110. package/build/browser/object/geotimeseriesreference.test.js +2 -0
  111. package/build/browser/object/geotimeseriesreference.test.js.map +1 -1
  112. package/build/browser/object/media.test.js +55 -0
  113. package/build/browser/object/media.test.js.map +1 -0
  114. package/build/browser/object/mediaUpload.js +20 -0
  115. package/build/browser/object/mediaUpload.js.map +1 -0
  116. package/build/browser/object/object.test.js +203 -10
  117. package/build/browser/object/object.test.js.map +1 -1
  118. package/build/browser/object/timeseries.test.js +11 -0
  119. package/build/browser/object/timeseries.test.js.map +1 -1
  120. package/build/browser/objectSet/InterfaceObjectSet.test.js +65 -0
  121. package/build/browser/objectSet/InterfaceObjectSet.test.js.map +1 -0
  122. package/build/browser/objectSet/ObjectSet.test.js +400 -46
  123. package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
  124. package/build/browser/objectSet/ObjectSetFactory.js +0 -15
  125. package/build/browser/objectSet/ObjectSetFactory.js.map +1 -1
  126. package/build/browser/objectSet/ObjectSetListenerWebsocket.js +137 -80
  127. package/build/browser/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
  128. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js +59 -29
  129. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -1
  130. package/build/browser/objectSet/conjureUnionType.js +1 -0
  131. package/build/browser/objectSet/conjureUnionType.js.map +1 -1
  132. package/build/browser/objectSet/createObjectSet.js +31 -8
  133. package/build/browser/objectSet/createObjectSet.js.map +1 -1
  134. package/build/browser/ontology/OntologyProvider.js +1 -0
  135. package/build/browser/ontology/OntologyProvider.js.map +1 -1
  136. package/build/browser/ontology/StandardOntologyProvider.js +2 -0
  137. package/build/browser/ontology/StandardOntologyProvider.js.map +1 -1
  138. package/build/browser/ontology/StandardOntologyProvider.test.js +2 -0
  139. package/build/browser/ontology/StandardOntologyProvider.test.js.map +1 -1
  140. package/build/browser/ontology/loadActionMetadata.js +2 -1
  141. package/build/browser/ontology/loadActionMetadata.js.map +1 -1
  142. package/build/browser/ontology/loadFullObjectMetadata.js +2 -1
  143. package/build/browser/ontology/loadFullObjectMetadata.js.map +1 -1
  144. package/build/browser/ontology/loadInterfaceMetadata.js +2 -1
  145. package/build/browser/ontology/loadInterfaceMetadata.js.map +1 -1
  146. package/build/browser/ontology/loadQueryMetadata.js +2 -1
  147. package/build/browser/ontology/loadQueryMetadata.js.map +1 -1
  148. package/build/browser/ontology/makeConjureContext.js +1 -0
  149. package/build/browser/ontology/makeConjureContext.js.map +1 -1
  150. package/build/browser/pageRequestAsAsyncIter.js +1 -0
  151. package/build/browser/pageRequestAsAsyncIter.js.map +1 -1
  152. package/build/browser/public/internal.js +20 -0
  153. package/build/browser/public/internal.js.map +1 -0
  154. package/build/browser/public/unstable-do-not-use.js +1 -0
  155. package/build/browser/public/unstable-do-not-use.js.map +1 -1
  156. package/build/browser/public-utils/createAndFetchTempObjectSetRid.js +34 -0
  157. package/build/browser/public-utils/createAndFetchTempObjectSetRid.js.map +1 -0
  158. package/build/{esm/createAttachmentFromRid.js → browser/public-utils/hydrateAttachmentFromRid.js} +13 -6
  159. package/build/browser/public-utils/hydrateAttachmentFromRid.js.map +1 -0
  160. package/build/browser/public-utils/hydrateObjectSetFromRid.js +39 -0
  161. package/build/browser/public-utils/hydrateObjectSetFromRid.js.map +1 -0
  162. package/build/browser/queries/applyQuery.js +5 -5
  163. package/build/browser/queries/applyQuery.js.map +1 -1
  164. package/build/browser/queries/queries.test.js +9 -0
  165. package/build/browser/queries/queries.test.js.map +1 -1
  166. package/build/browser/queries/types.js +0 -15
  167. package/build/browser/queries/types.js.map +1 -1
  168. package/build/browser/tsserver.js +2 -1
  169. package/build/browser/tsserver.js.map +1 -1
  170. package/build/browser/util/ArrayElement.js +0 -15
  171. package/build/browser/util/ArrayElement.js.map +1 -1
  172. package/build/browser/util/NOOP.js +0 -15
  173. package/build/browser/util/NOOP.js.map +1 -1
  174. package/build/browser/util/NullableProps.js +0 -15
  175. package/build/browser/util/NullableProps.js.map +1 -1
  176. package/build/browser/util/UserAgent.js +2 -1
  177. package/build/browser/util/UserAgent.js.map +1 -1
  178. package/build/browser/util/WireObjectSet.js +2 -0
  179. package/build/browser/util/WireObjectSet.js.map +1 -1
  180. package/build/browser/util/addUserAgentAndRequestContextHeaders.js +1 -0
  181. package/build/browser/util/addUserAgentAndRequestContextHeaders.js.map +1 -1
  182. package/build/browser/util/augmentRequestContext.js +1 -0
  183. package/build/browser/util/augmentRequestContext.js.map +1 -1
  184. package/build/browser/util/datetimeConverters.js +60 -0
  185. package/build/browser/util/datetimeConverters.js.map +1 -0
  186. package/build/browser/util/datetimeConverters.test.js +76 -0
  187. package/build/browser/util/datetimeConverters.test.js.map +1 -0
  188. package/build/browser/util/interfaceUtils.js +21 -0
  189. package/build/browser/util/interfaceUtils.js.map +1 -0
  190. package/build/browser/util/isOntologyObjectV2.js +1 -0
  191. package/build/browser/util/isOntologyObjectV2.js.map +1 -1
  192. package/build/browser/util/isOsdkBaseObject.js +1 -0
  193. package/build/browser/util/isOsdkBaseObject.js.map +1 -1
  194. package/build/browser/util/isOsdkObject.js +1 -0
  195. package/build/browser/util/isOsdkObject.js.map +1 -1
  196. package/build/browser/util/objectSetUtils.js +26 -0
  197. package/build/browser/util/objectSetUtils.js.map +1 -0
  198. package/build/browser/util/partialBy.js +0 -15
  199. package/build/browser/util/partialBy.js.map +1 -1
  200. package/build/browser/util/streamutils.js +7 -0
  201. package/build/browser/util/streamutils.js.map +1 -1
  202. package/build/browser/util/timeseriesUtils.js +2 -1
  203. package/build/browser/util/timeseriesUtils.js.map +1 -1
  204. package/build/browser/util/toDataValue.js +28 -2
  205. package/build/browser/util/toDataValue.js.map +1 -1
  206. package/build/browser/util/toDataValue.test.js +14 -1
  207. package/build/browser/util/toDataValue.test.js.map +1 -1
  208. package/build/browser/util/toDataValueQueries.js +10 -1
  209. package/build/browser/util/toDataValueQueries.js.map +1 -1
  210. package/build/cjs/Client-BZcoRu7n.d.cts +67 -0
  211. package/build/cjs/chunk-L454XQQ7.cjs +1028 -0
  212. package/build/cjs/chunk-L454XQQ7.cjs.map +1 -0
  213. package/build/cjs/chunk-RDXQTUTR.cjs +466 -0
  214. package/build/cjs/chunk-RDXQTUTR.cjs.map +1 -0
  215. package/build/cjs/index.cjs +1664 -0
  216. package/build/cjs/index.cjs.map +1 -0
  217. package/build/cjs/index.d.cts +85 -0
  218. package/build/cjs/public/internal.cjs +35 -0
  219. package/build/cjs/public/internal.cjs.map +1 -0
  220. package/build/cjs/public/internal.d.cts +33 -0
  221. package/build/cjs/public/unstable-do-not-use.cjs +12 -0
  222. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -0
  223. package/build/cjs/public/unstable-do-not-use.d.cts +5 -0
  224. package/build/esm/Client.js +7 -0
  225. package/build/esm/Client.js.map +1 -1
  226. package/build/esm/Definitions.test.js +1 -0
  227. package/build/esm/Definitions.test.js.map +1 -1
  228. package/build/esm/Logger.js +0 -15
  229. package/build/esm/Logger.js.map +1 -1
  230. package/build/esm/MinimalClientContext.js +0 -15
  231. package/build/esm/MinimalClientContext.js.map +1 -1
  232. package/build/esm/ResultOrError.js +1 -0
  233. package/build/esm/ResultOrError.js.map +1 -1
  234. package/build/esm/SatisfiesSemver.js +0 -15
  235. package/build/esm/SatisfiesSemver.js.map +1 -1
  236. package/build/esm/SatisfiesSemver.test.js +1 -0
  237. package/build/esm/SatisfiesSemver.test.js.map +1 -1
  238. package/build/esm/__unstable/ConjureSupport.js +12 -6
  239. package/build/esm/__unstable/ConjureSupport.js.map +1 -1
  240. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.js +6 -2
  241. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.js.map +1 -1
  242. package/build/esm/actions/ActionValidationError.js +1 -1
  243. package/build/esm/actions/ActionValidationError.js.map +1 -1
  244. package/build/esm/actions/actions.test.js +85 -4
  245. package/build/esm/actions/actions.test.js.map +1 -1
  246. package/build/esm/actions/applyAction.js +3 -2
  247. package/build/esm/actions/applyAction.js.map +1 -1
  248. package/build/esm/createClient.js +50 -23
  249. package/build/esm/createClient.js.map +1 -1
  250. package/build/esm/createClient.test.js +25 -0
  251. package/build/esm/createClient.test.js.map +1 -1
  252. package/build/esm/createGeotimeSeriesProperty.js +5 -3
  253. package/build/esm/createGeotimeSeriesProperty.js.map +1 -1
  254. package/build/esm/createMediaReferenceProperty.js +47 -0
  255. package/build/esm/createMediaReferenceProperty.js.map +1 -0
  256. package/build/esm/createMinimalClient.js +9 -2
  257. package/build/esm/createMinimalClient.js.map +1 -1
  258. package/build/esm/createPlatformClient.js +1 -0
  259. package/build/esm/createPlatformClient.js.map +1 -1
  260. package/build/esm/createTimeseriesProperty.js +2 -1
  261. package/build/esm/createTimeseriesProperty.js.map +1 -1
  262. package/build/esm/definitions/LinkDefinitions.test.js +4 -0
  263. package/build/esm/definitions/LinkDefinitions.test.js.map +1 -1
  264. package/build/esm/derivedProperties/createWithPropertiesObjectSet.js +106 -0
  265. package/build/esm/derivedProperties/createWithPropertiesObjectSet.js.map +1 -0
  266. package/build/esm/derivedProperties/createWithPropertiesObjectSet.test.js +100 -0
  267. package/build/esm/derivedProperties/createWithPropertiesObjectSet.test.js.map +1 -0
  268. package/build/esm/fetchMetadata.js +2 -0
  269. package/build/esm/fetchMetadata.js.map +1 -1
  270. package/build/esm/fetchMetadata.test.js +19 -0
  271. package/build/esm/fetchMetadata.test.js.map +1 -1
  272. package/build/esm/index.js +2 -1
  273. package/build/esm/index.js.map +1 -1
  274. package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.js +3 -1
  275. package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.js.map +1 -1
  276. package/build/esm/intellisense.test.js +5 -2
  277. package/build/esm/intellisense.test.js.map +1 -1
  278. package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.js +3 -1
  279. package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.js.map +1 -1
  280. package/build/esm/internal/conversions/modernToLegacyAggregationClause.js +2 -0
  281. package/build/esm/internal/conversions/modernToLegacyAggregationClause.js.map +1 -1
  282. package/build/esm/internal/conversions/modernToLegacyGroupByClause.js +1 -0
  283. package/build/esm/internal/conversions/modernToLegacyGroupByClause.js.map +1 -1
  284. package/build/esm/internal/conversions/modernToLegacyWhereClause.js +70 -21
  285. package/build/esm/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
  286. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js +402 -14
  287. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -1
  288. package/build/esm/object/AttachmentUpload.js +6 -7
  289. package/build/esm/object/AttachmentUpload.js.map +1 -1
  290. package/build/esm/object/Cache.js +27 -0
  291. package/build/esm/object/Cache.js.map +1 -1
  292. package/build/esm/object/Cache.test.js +10 -3
  293. package/build/esm/object/Cache.test.js.map +1 -1
  294. package/build/esm/object/SimpleCache.js +20 -0
  295. package/build/esm/object/SimpleCache.js.map +1 -1
  296. package/build/esm/object/aggregate.js +8 -10
  297. package/build/esm/object/aggregate.js.map +1 -1
  298. package/build/esm/object/aggregate.test.js +11 -9
  299. package/build/esm/object/aggregate.test.js.map +1 -1
  300. package/build/esm/object/attachment.test.js +1 -0
  301. package/build/esm/object/attachment.test.js.map +1 -1
  302. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js +0 -15
  303. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -1
  304. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.js +8 -3
  305. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.js.map +1 -1
  306. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.js +0 -15
  307. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.js.map +1 -1
  308. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js +4 -1
  309. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js.map +1 -1
  310. package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js +0 -15
  311. package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js.map +1 -1
  312. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js +42 -85
  313. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  314. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.test.js +1 -6
  315. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.test.js.map +1 -1
  316. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js +88 -88
  317. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  318. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.js +9 -3
  319. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.js.map +1 -1
  320. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.js +15 -38
  321. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.js.map +1 -1
  322. package/build/esm/object/convertWireToOsdkObjects.js +53 -6
  323. package/build/esm/object/convertWireToOsdkObjects.js.map +1 -1
  324. package/build/esm/object/convertWireToOsdkObjects.test.js +197 -44
  325. package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -1
  326. package/build/esm/object/fetchPage.js +42 -24
  327. package/build/esm/object/fetchPage.js.map +1 -1
  328. package/build/esm/object/fetchPage.test.js +80 -1
  329. package/build/esm/object/fetchPage.test.js.map +1 -1
  330. package/build/esm/object/fetchSingle.js +3 -0
  331. package/build/esm/object/fetchSingle.js.map +1 -1
  332. package/build/esm/object/geotimeseriesreference.test.js +2 -0
  333. package/build/esm/object/geotimeseriesreference.test.js.map +1 -1
  334. package/build/esm/object/media.test.js +55 -0
  335. package/build/esm/object/media.test.js.map +1 -0
  336. package/build/esm/object/mediaUpload.js +20 -0
  337. package/build/esm/object/mediaUpload.js.map +1 -0
  338. package/build/esm/object/object.test.js +203 -10
  339. package/build/esm/object/object.test.js.map +1 -1
  340. package/build/esm/object/timeseries.test.js +11 -0
  341. package/build/esm/object/timeseries.test.js.map +1 -1
  342. package/build/esm/objectSet/InterfaceObjectSet.test.js +65 -0
  343. package/build/esm/objectSet/InterfaceObjectSet.test.js.map +1 -0
  344. package/build/esm/objectSet/ObjectSet.test.js +400 -46
  345. package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
  346. package/build/esm/objectSet/ObjectSetFactory.js +0 -15
  347. package/build/esm/objectSet/ObjectSetFactory.js.map +1 -1
  348. package/build/esm/objectSet/ObjectSetListenerWebsocket.js +137 -83
  349. package/build/esm/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
  350. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js +59 -29
  351. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -1
  352. package/build/esm/objectSet/conjureUnionType.js +1 -0
  353. package/build/esm/objectSet/conjureUnionType.js.map +1 -1
  354. package/build/esm/objectSet/createObjectSet.js +31 -8
  355. package/build/esm/objectSet/createObjectSet.js.map +1 -1
  356. package/build/esm/ontology/OntologyProvider.js +1 -0
  357. package/build/esm/ontology/OntologyProvider.js.map +1 -1
  358. package/build/esm/ontology/StandardOntologyProvider.js +2 -0
  359. package/build/esm/ontology/StandardOntologyProvider.js.map +1 -1
  360. package/build/esm/ontology/StandardOntologyProvider.test.js +2 -0
  361. package/build/esm/ontology/StandardOntologyProvider.test.js.map +1 -1
  362. package/build/esm/ontology/loadActionMetadata.js +2 -1
  363. package/build/esm/ontology/loadActionMetadata.js.map +1 -1
  364. package/build/esm/ontology/loadFullObjectMetadata.js +2 -1
  365. package/build/esm/ontology/loadFullObjectMetadata.js.map +1 -1
  366. package/build/esm/ontology/loadInterfaceMetadata.js +2 -1
  367. package/build/esm/ontology/loadInterfaceMetadata.js.map +1 -1
  368. package/build/esm/ontology/loadQueryMetadata.js +2 -1
  369. package/build/esm/ontology/loadQueryMetadata.js.map +1 -1
  370. package/build/esm/ontology/makeConjureContext.js +1 -0
  371. package/build/esm/ontology/makeConjureContext.js.map +1 -1
  372. package/build/esm/pageRequestAsAsyncIter.js +1 -0
  373. package/build/esm/pageRequestAsAsyncIter.js.map +1 -1
  374. package/build/esm/public/internal.js +20 -0
  375. package/build/esm/public/internal.js.map +1 -0
  376. package/build/esm/public/unstable-do-not-use.js +1 -0
  377. package/build/esm/public/unstable-do-not-use.js.map +1 -1
  378. package/build/esm/public-utils/createAndFetchTempObjectSetRid.js +34 -0
  379. package/build/esm/public-utils/createAndFetchTempObjectSetRid.js.map +1 -0
  380. package/build/{browser/createAttachmentFromRid.js → esm/public-utils/hydrateAttachmentFromRid.js} +13 -6
  381. package/build/esm/public-utils/hydrateAttachmentFromRid.js.map +1 -0
  382. package/build/esm/public-utils/hydrateObjectSetFromRid.js +39 -0
  383. package/build/esm/public-utils/hydrateObjectSetFromRid.js.map +1 -0
  384. package/build/esm/queries/applyQuery.js +5 -5
  385. package/build/esm/queries/applyQuery.js.map +1 -1
  386. package/build/esm/queries/queries.test.js +9 -0
  387. package/build/esm/queries/queries.test.js.map +1 -1
  388. package/build/esm/queries/types.js +0 -15
  389. package/build/esm/queries/types.js.map +1 -1
  390. package/build/esm/tsserver.js +2 -1
  391. package/build/esm/tsserver.js.map +1 -1
  392. package/build/esm/util/ArrayElement.js +0 -15
  393. package/build/esm/util/ArrayElement.js.map +1 -1
  394. package/build/esm/util/NOOP.js +0 -15
  395. package/build/esm/util/NOOP.js.map +1 -1
  396. package/build/esm/util/NullableProps.js +0 -15
  397. package/build/esm/util/NullableProps.js.map +1 -1
  398. package/build/esm/util/UserAgent.js +2 -1
  399. package/build/esm/util/UserAgent.js.map +1 -1
  400. package/build/esm/util/WireObjectSet.js +2 -0
  401. package/build/esm/util/WireObjectSet.js.map +1 -1
  402. package/build/esm/util/addUserAgentAndRequestContextHeaders.js +1 -0
  403. package/build/esm/util/addUserAgentAndRequestContextHeaders.js.map +1 -1
  404. package/build/esm/util/augmentRequestContext.js +1 -0
  405. package/build/esm/util/augmentRequestContext.js.map +1 -1
  406. package/build/esm/util/datetimeConverters.js +60 -0
  407. package/build/esm/util/datetimeConverters.js.map +1 -0
  408. package/build/esm/util/datetimeConverters.test.js +76 -0
  409. package/build/esm/util/datetimeConverters.test.js.map +1 -0
  410. package/build/esm/util/interfaceUtils.js +21 -0
  411. package/build/esm/util/interfaceUtils.js.map +1 -0
  412. package/build/esm/util/isOntologyObjectV2.js +1 -0
  413. package/build/esm/util/isOntologyObjectV2.js.map +1 -1
  414. package/build/esm/util/isOsdkBaseObject.js +1 -0
  415. package/build/esm/util/isOsdkBaseObject.js.map +1 -1
  416. package/build/esm/util/isOsdkObject.js +1 -0
  417. package/build/esm/util/isOsdkObject.js.map +1 -1
  418. package/build/esm/util/objectSetUtils.js +26 -0
  419. package/build/esm/util/objectSetUtils.js.map +1 -0
  420. package/build/esm/util/partialBy.js +0 -15
  421. package/build/esm/util/partialBy.js.map +1 -1
  422. package/build/esm/util/streamutils.js +7 -0
  423. package/build/esm/util/streamutils.js.map +1 -1
  424. package/build/esm/util/timeseriesUtils.js +2 -1
  425. package/build/esm/util/timeseriesUtils.js.map +1 -1
  426. package/build/esm/util/toDataValue.js +28 -2
  427. package/build/esm/util/toDataValue.js.map +1 -1
  428. package/build/esm/util/toDataValue.test.js +14 -1
  429. package/build/esm/util/toDataValue.test.js.map +1 -1
  430. package/build/esm/util/toDataValueQueries.js +10 -1
  431. package/build/esm/util/toDataValueQueries.js.map +1 -1
  432. package/build/types/Client.d.ts +20 -0
  433. package/build/types/Definitions.test.d.ts +1 -0
  434. package/build/types/Logger.d.ts +18 -0
  435. package/build/types/MinimalClientContext.d.ts +21 -0
  436. package/build/types/ResultOrError.d.ts +9 -0
  437. package/build/types/SatisfiesSemver.d.ts +10 -0
  438. package/build/types/SatisfiesSemver.test.d.ts +1 -0
  439. package/build/types/__unstable/ConjureSupport.d.ts +37 -0
  440. package/build/{browser → types}/__unstable/createBulkLinksAsyncIterFactory.d.ts +1 -7
  441. package/build/types/actions/ActionValidationError.d.ts +5 -0
  442. package/build/types/actions/actions.test.d.ts +1 -0
  443. package/build/{esm → types}/actions/applyAction.d.ts +18 -17
  444. package/build/{browser → types}/createClient.d.ts +1 -4
  445. package/build/types/createClient.test.d.ts +1 -0
  446. package/build/types/createGeotimeSeriesProperty.d.ts +13 -0
  447. package/build/types/createMediaReferenceProperty.d.ts +13 -0
  448. package/build/types/createMinimalClient.d.ts +1 -0
  449. package/build/types/createPlatformClient.d.ts +15 -0
  450. package/build/types/createTimeseriesProperty.d.ts +13 -0
  451. package/build/types/definitions/LinkDefinitions.test.d.ts +1 -0
  452. package/build/types/derivedProperties/createWithPropertiesObjectSet.d.ts +1 -0
  453. package/build/types/derivedProperties/createWithPropertiesObjectSet.test.d.ts +1 -0
  454. package/build/types/fetchMetadata.d.ts +1 -0
  455. package/build/types/fetchMetadata.test.d.ts +1 -0
  456. package/build/types/index.d.ts +12 -0
  457. package/build/types/intellisense.test.d.ts +1 -0
  458. package/build/types/intellisense.test.helpers/callsQueryAcceptsObject.d.ts +1 -0
  459. package/build/types/internal/conversions/legacyToModernSingleAggregationResult.d.ts +1 -0
  460. package/build/types/internal/conversions/modernToLegacyAggregationClause.d.ts +1 -0
  461. package/build/types/internal/conversions/modernToLegacyGroupByClause.d.ts +1 -0
  462. package/build/{browser → types}/internal/conversions/modernToLegacyWhereClause.d.ts +0 -1
  463. package/build/types/internal/conversions/modernToLegacyWhereClause.test.d.ts +1 -0
  464. package/build/{browser → types}/object/AttachmentUpload.d.ts +0 -1
  465. package/build/types/object/Cache.d.ts +17 -0
  466. package/build/types/object/Cache.test.d.ts +1 -0
  467. package/build/types/object/SimpleCache.d.ts +52 -0
  468. package/build/types/object/aggregate.d.ts +1 -0
  469. package/build/types/object/aggregate.test.d.ts +1 -0
  470. package/build/types/object/attachment.test.d.ts +1 -0
  471. package/build/types/object/convertWireToOsdkObjects/InterfaceHolder.d.ts +1 -0
  472. package/build/types/object/convertWireToOsdkObjects/InternalSymbols.d.ts +6 -0
  473. package/build/types/object/convertWireToOsdkObjects/ObjectHolder.d.ts +1 -0
  474. package/build/types/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts +15 -0
  475. package/build/types/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts +5 -0
  476. package/build/types/object/convertWireToOsdkObjects/createOsdkInterface.d.ts +1 -0
  477. package/build/types/object/convertWireToOsdkObjects/createOsdkInterface.test.d.ts +1 -0
  478. package/build/types/object/convertWireToOsdkObjects/createOsdkObject.d.ts +1 -0
  479. package/build/{browser → types}/object/convertWireToOsdkObjects/getDollarAs.d.ts +0 -1
  480. package/build/types/object/convertWireToOsdkObjects/getDollarLink.d.ts +1 -0
  481. package/build/types/object/convertWireToOsdkObjects.d.ts +1 -0
  482. package/build/types/object/convertWireToOsdkObjects.test.d.ts +1 -0
  483. package/build/types/object/fetchPage.d.ts +5 -0
  484. package/build/types/object/fetchPage.test.d.ts +1 -0
  485. package/build/types/object/fetchSingle.d.ts +1 -0
  486. package/build/types/object/geotimeseriesreference.test.d.ts +1 -0
  487. package/build/types/object/media.test.d.ts +1 -0
  488. package/build/types/object/mediaUpload.d.ts +2 -0
  489. package/build/{esm → types}/object/object.test.d.ts +1 -2
  490. package/build/types/object/timeseries.test.d.ts +1 -0
  491. package/build/types/objectSet/InterfaceObjectSet.test.d.ts +1 -0
  492. package/build/types/objectSet/ObjectSet.test.d.ts +7 -0
  493. package/build/types/objectSet/ObjectSetFactory.d.ts +1 -0
  494. package/build/types/objectSet/ObjectSetListenerWebsocket.d.ts +1 -0
  495. package/build/types/objectSet/ObjectSetListenerWebsocket.test.d.ts +1 -0
  496. package/build/types/objectSet/conjureUnionType.d.ts +11 -0
  497. package/build/types/objectSet/createObjectSet.d.ts +1 -0
  498. package/build/types/ontology/OntologyProvider.d.ts +27 -0
  499. package/build/{browser → types}/ontology/StandardOntologyProvider.d.ts +1 -3
  500. package/build/types/ontology/StandardOntologyProvider.test.d.ts +1 -0
  501. package/build/{browser → types}/ontology/loadActionMetadata.d.ts +0 -1
  502. package/build/{esm → types}/ontology/loadFullObjectMetadata.d.ts +1 -4
  503. package/build/{esm → types}/ontology/loadInterfaceMetadata.d.ts +0 -1
  504. package/build/{esm → types}/ontology/loadQueryMetadata.d.ts +0 -1
  505. package/build/{browser → types}/ontology/makeConjureContext.d.ts +0 -1
  506. package/build/types/pageRequestAsAsyncIter.d.ts +10 -0
  507. package/build/types/public/internal.d.ts +3 -0
  508. package/build/{browser → types}/public/unstable-do-not-use.d.ts +0 -1
  509. package/build/types/public-utils/createAndFetchTempObjectSetRid.d.ts +10 -0
  510. package/build/types/public-utils/hydrateAttachmentFromRid.d.ts +9 -0
  511. package/build/types/public-utils/hydrateObjectSetFromRid.d.ts +10 -0
  512. package/build/{esm → types}/queries/applyQuery.d.ts +4 -2
  513. package/build/types/queries/queries.test.d.ts +1 -0
  514. package/build/{esm → types}/queries/types.d.ts +3 -12
  515. package/build/{esm → types}/tsserver.d.ts +19 -21
  516. package/build/{browser → types}/util/ArrayElement.d.ts +0 -1
  517. package/build/types/util/NOOP.d.ts +1 -0
  518. package/build/types/util/NullableProps.d.ts +1 -0
  519. package/build/{browser → types}/util/UserAgent.d.ts +0 -1
  520. package/build/types/util/WireObjectSet.d.ts +1 -0
  521. package/build/{esm → types}/util/addUserAgentAndRequestContextHeaders.d.ts +0 -1
  522. package/build/{browser → types}/util/augmentRequestContext.d.ts +6 -7
  523. package/build/types/util/datetimeConverters.d.ts +21 -0
  524. package/build/types/util/datetimeConverters.test.d.ts +1 -0
  525. package/build/types/util/interfaceUtils.d.ts +1 -0
  526. package/build/types/util/isOntologyObjectV2.d.ts +1 -0
  527. package/build/{esm/util/isOsdkObject.d.ts → types/util/isOsdkBaseObject.d.ts} +0 -1
  528. package/build/{browser → types}/util/isOsdkObject.d.ts +0 -1
  529. package/build/types/util/objectSetUtils.d.ts +3 -0
  530. package/build/types/util/partialBy.d.ts +8 -0
  531. package/build/{browser → types}/util/streamutils.d.ts +0 -1
  532. package/build/{browser → types}/util/timeseriesUtils.d.ts +4 -5
  533. package/build/types/util/toDataValue.d.ts +1 -0
  534. package/build/types/util/toDataValue.test.d.ts +1 -0
  535. package/build/types/util/toDataValueQueries.d.ts +1 -0
  536. package/index.d.ts +17 -0
  537. package/internal.d.ts +17 -0
  538. package/package.json +59 -26
  539. package/unstable-do-not-use.d.ts +1 -1
  540. package/build/browser/Client.d.ts +0 -42
  541. package/build/browser/Client.d.ts.map +0 -1
  542. package/build/browser/Definitions.test.d.ts +0 -2
  543. package/build/browser/Definitions.test.d.ts.map +0 -1
  544. package/build/browser/Logger.d.ts +0 -19
  545. package/build/browser/Logger.d.ts.map +0 -1
  546. package/build/browser/MinimalClientContext.d.ts +0 -26
  547. package/build/browser/MinimalClientContext.d.ts.map +0 -1
  548. package/build/browser/ResultOrError.d.ts +0 -12
  549. package/build/browser/ResultOrError.d.ts.map +0 -1
  550. package/build/browser/SatisfiesSemver.d.ts +0 -4
  551. package/build/browser/SatisfiesSemver.d.ts.map +0 -1
  552. package/build/browser/SatisfiesSemver.test.d.ts +0 -2
  553. package/build/browser/SatisfiesSemver.test.d.ts.map +0 -1
  554. package/build/browser/__unstable/ConjureSupport.d.ts +0 -55
  555. package/build/browser/__unstable/ConjureSupport.d.ts.map +0 -1
  556. package/build/browser/__unstable/createBulkLinksAsyncIterFactory.d.ts.map +0 -1
  557. package/build/browser/actions/ActionValidationError.d.ts +0 -6
  558. package/build/browser/actions/ActionValidationError.d.ts.map +0 -1
  559. package/build/browser/actions/actions.test.d.ts +0 -2
  560. package/build/browser/actions/actions.test.d.ts.map +0 -1
  561. package/build/browser/actions/applyAction.d.ts +0 -30
  562. package/build/browser/actions/applyAction.d.ts.map +0 -1
  563. package/build/browser/createAttachmentFromRid.d.ts +0 -10
  564. package/build/browser/createAttachmentFromRid.d.ts.map +0 -1
  565. package/build/browser/createAttachmentFromRid.js.map +0 -1
  566. package/build/browser/createClient.d.ts.map +0 -1
  567. package/build/browser/createClient.test.d.ts +0 -2
  568. package/build/browser/createClient.test.d.ts.map +0 -1
  569. package/build/browser/createGeotimeSeriesProperty.d.ts +0 -14
  570. package/build/browser/createGeotimeSeriesProperty.d.ts.map +0 -1
  571. package/build/browser/createMinimalClient.d.ts +0 -2
  572. package/build/browser/createMinimalClient.d.ts.map +0 -1
  573. package/build/browser/createPlatformClient.d.ts +0 -17
  574. package/build/browser/createPlatformClient.d.ts.map +0 -1
  575. package/build/browser/createTimeseriesProperty.d.ts +0 -14
  576. package/build/browser/createTimeseriesProperty.d.ts.map +0 -1
  577. package/build/browser/definitions/LinkDefinitions.test.d.ts +0 -2
  578. package/build/browser/definitions/LinkDefinitions.test.d.ts.map +0 -1
  579. package/build/browser/fetchMetadata.d.ts +0 -2
  580. package/build/browser/fetchMetadata.d.ts.map +0 -1
  581. package/build/browser/fetchMetadata.test.d.ts +0 -2
  582. package/build/browser/fetchMetadata.test.d.ts.map +0 -1
  583. package/build/browser/index.d.ts +0 -13
  584. package/build/browser/index.d.ts.map +0 -1
  585. package/build/browser/intellisense.test.d.ts +0 -2
  586. package/build/browser/intellisense.test.d.ts.map +0 -1
  587. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.d.ts +0 -2
  588. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.d.ts.map +0 -1
  589. package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.d.ts +0 -2
  590. package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.d.ts.map +0 -1
  591. package/build/browser/internal/conversions/modernToLegacyAggregationClause.d.ts +0 -2
  592. package/build/browser/internal/conversions/modernToLegacyAggregationClause.d.ts.map +0 -1
  593. package/build/browser/internal/conversions/modernToLegacyGroupByClause.d.ts +0 -2
  594. package/build/browser/internal/conversions/modernToLegacyGroupByClause.d.ts.map +0 -1
  595. package/build/browser/internal/conversions/modernToLegacyWhereClause.d.ts.map +0 -1
  596. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.d.ts +0 -2
  597. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.d.ts.map +0 -1
  598. package/build/browser/object/AttachmentUpload.d.ts.map +0 -1
  599. package/build/browser/object/Cache.d.ts +0 -2
  600. package/build/browser/object/Cache.d.ts.map +0 -1
  601. package/build/browser/object/Cache.test.d.ts +0 -11
  602. package/build/browser/object/Cache.test.d.ts.map +0 -1
  603. package/build/browser/object/SimpleCache.d.ts +0 -38
  604. package/build/browser/object/SimpleCache.d.ts.map +0 -1
  605. package/build/browser/object/aggregate.d.ts +0 -2
  606. package/build/browser/object/aggregate.d.ts.map +0 -1
  607. package/build/browser/object/aggregate.test.d.ts +0 -2
  608. package/build/browser/object/aggregate.test.d.ts.map +0 -1
  609. package/build/browser/object/attachment.test.d.ts +0 -2
  610. package/build/browser/object/attachment.test.d.ts.map +0 -1
  611. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.d.ts +0 -11
  612. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.d.ts.map +0 -1
  613. package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.d.ts +0 -14
  614. package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.d.ts.map +0 -1
  615. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.d.ts +0 -2
  616. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.d.ts.map +0 -1
  617. package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts +0 -2
  618. package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts.map +0 -1
  619. package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts +0 -8
  620. package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts.map +0 -1
  621. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.d.ts +0 -2
  622. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.d.ts.map +0 -1
  623. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.test.d.ts +0 -2
  624. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.test.d.ts.map +0 -1
  625. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.d.ts +0 -2
  626. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.d.ts.map +0 -1
  627. package/build/browser/object/convertWireToOsdkObjects/getDollarAs.d.ts.map +0 -1
  628. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.d.ts +0 -2
  629. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.d.ts.map +0 -1
  630. package/build/browser/object/convertWireToOsdkObjects.d.ts +0 -2
  631. package/build/browser/object/convertWireToOsdkObjects.d.ts.map +0 -1
  632. package/build/browser/object/convertWireToOsdkObjects.test.d.ts +0 -2
  633. package/build/browser/object/convertWireToOsdkObjects.test.d.ts.map +0 -1
  634. package/build/browser/object/fetchPage.d.ts +0 -3
  635. package/build/browser/object/fetchPage.d.ts.map +0 -1
  636. package/build/browser/object/fetchPage.test.d.ts +0 -2
  637. package/build/browser/object/fetchPage.test.d.ts.map +0 -1
  638. package/build/browser/object/fetchSingle.d.ts +0 -2
  639. package/build/browser/object/fetchSingle.d.ts.map +0 -1
  640. package/build/browser/object/geotimeseriesreference.test.d.ts +0 -2
  641. package/build/browser/object/geotimeseriesreference.test.d.ts.map +0 -1
  642. package/build/browser/object/object.test.d.ts +0 -12
  643. package/build/browser/object/object.test.d.ts.map +0 -1
  644. package/build/browser/object/timeseries.test.d.ts +0 -2
  645. package/build/browser/object/timeseries.test.d.ts.map +0 -1
  646. package/build/browser/objectSet/ObjectSet.test.d.ts +0 -2
  647. package/build/browser/objectSet/ObjectSet.test.d.ts.map +0 -1
  648. package/build/browser/objectSet/ObjectSetFactory.d.ts +0 -2
  649. package/build/browser/objectSet/ObjectSetFactory.d.ts.map +0 -1
  650. package/build/browser/objectSet/ObjectSetListenerWebsocket.d.ts +0 -2
  651. package/build/browser/objectSet/ObjectSetListenerWebsocket.d.ts.map +0 -1
  652. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.d.ts +0 -2
  653. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.d.ts.map +0 -1
  654. package/build/browser/objectSet/conjureUnionType.d.ts +0 -13
  655. package/build/browser/objectSet/conjureUnionType.d.ts.map +0 -1
  656. package/build/browser/objectSet/createObjectSet.d.ts +0 -2
  657. package/build/browser/objectSet/createObjectSet.d.ts.map +0 -1
  658. package/build/browser/objectSet/toConjureObjectSet.d.ts +0 -2
  659. package/build/browser/objectSet/toConjureObjectSet.d.ts.map +0 -1
  660. package/build/browser/objectSet/toConjureObjectSet.js +0 -165
  661. package/build/browser/objectSet/toConjureObjectSet.js.map +0 -1
  662. package/build/browser/ontology/OntologyProvider.d.ts +0 -32
  663. package/build/browser/ontology/OntologyProvider.d.ts.map +0 -1
  664. package/build/browser/ontology/StandardOntologyProvider.d.ts.map +0 -1
  665. package/build/browser/ontology/StandardOntologyProvider.test.d.ts +0 -2
  666. package/build/browser/ontology/StandardOntologyProvider.test.d.ts.map +0 -1
  667. package/build/browser/ontology/loadActionMetadata.d.ts.map +0 -1
  668. package/build/browser/ontology/loadFullObjectMetadata.d.ts +0 -6
  669. package/build/browser/ontology/loadFullObjectMetadata.d.ts.map +0 -1
  670. package/build/browser/ontology/loadInterfaceMetadata.d.ts +0 -4
  671. package/build/browser/ontology/loadInterfaceMetadata.d.ts.map +0 -1
  672. package/build/browser/ontology/loadQueryMetadata.d.ts +0 -4
  673. package/build/browser/ontology/loadQueryMetadata.d.ts.map +0 -1
  674. package/build/browser/ontology/makeConjureContext.d.ts.map +0 -1
  675. package/build/browser/pageRequestAsAsyncIter.d.ts +0 -10
  676. package/build/browser/pageRequestAsAsyncIter.d.ts.map +0 -1
  677. package/build/browser/public/unstable-do-not-use.d.ts.map +0 -1
  678. package/build/browser/queries/applyQuery.d.ts +0 -6
  679. package/build/browser/queries/applyQuery.d.ts.map +0 -1
  680. package/build/browser/queries/queries.test.d.ts +0 -2
  681. package/build/browser/queries/queries.test.d.ts.map +0 -1
  682. package/build/browser/queries/types.d.ts +0 -20
  683. package/build/browser/queries/types.d.ts.map +0 -1
  684. package/build/browser/tsserver.d.ts +0 -34
  685. package/build/browser/tsserver.d.ts.map +0 -1
  686. package/build/browser/util/ArrayElement.d.ts.map +0 -1
  687. package/build/browser/util/NOOP.d.ts +0 -4
  688. package/build/browser/util/NOOP.d.ts.map +0 -1
  689. package/build/browser/util/NullableProps.d.ts +0 -6
  690. package/build/browser/util/NullableProps.d.ts.map +0 -1
  691. package/build/browser/util/UserAgent.d.ts.map +0 -1
  692. package/build/browser/util/WireObjectSet.d.ts +0 -2
  693. package/build/browser/util/WireObjectSet.d.ts.map +0 -1
  694. package/build/browser/util/addUserAgentAndRequestContextHeaders.d.ts +0 -4
  695. package/build/browser/util/addUserAgentAndRequestContextHeaders.d.ts.map +0 -1
  696. package/build/browser/util/augmentRequestContext.d.ts.map +0 -1
  697. package/build/browser/util/isOntologyObjectV2.d.ts +0 -2
  698. package/build/browser/util/isOntologyObjectV2.d.ts.map +0 -1
  699. package/build/browser/util/isOsdkBaseObject.d.ts +0 -3
  700. package/build/browser/util/isOsdkBaseObject.d.ts.map +0 -1
  701. package/build/browser/util/isOsdkObject.d.ts.map +0 -1
  702. package/build/browser/util/partialBy.d.ts +0 -3
  703. package/build/browser/util/partialBy.d.ts.map +0 -1
  704. package/build/browser/util/streamutils.d.ts.map +0 -1
  705. package/build/browser/util/timeseriesUtils.d.ts.map +0 -1
  706. package/build/browser/util/toDataValue.d.ts +0 -2
  707. package/build/browser/util/toDataValue.d.ts.map +0 -1
  708. package/build/browser/util/toDataValue.test.d.ts +0 -2
  709. package/build/browser/util/toDataValue.test.d.ts.map +0 -1
  710. package/build/browser/util/toDataValueQueries.d.ts +0 -2
  711. package/build/browser/util/toDataValueQueries.d.ts.map +0 -1
  712. package/build/esm/Client.d.ts +0 -42
  713. package/build/esm/Client.d.ts.map +0 -1
  714. package/build/esm/Definitions.test.d.ts +0 -2
  715. package/build/esm/Definitions.test.d.ts.map +0 -1
  716. package/build/esm/Logger.d.ts +0 -19
  717. package/build/esm/Logger.d.ts.map +0 -1
  718. package/build/esm/MinimalClientContext.d.ts +0 -26
  719. package/build/esm/MinimalClientContext.d.ts.map +0 -1
  720. package/build/esm/ResultOrError.d.ts +0 -12
  721. package/build/esm/ResultOrError.d.ts.map +0 -1
  722. package/build/esm/SatisfiesSemver.d.ts +0 -4
  723. package/build/esm/SatisfiesSemver.d.ts.map +0 -1
  724. package/build/esm/SatisfiesSemver.test.d.ts +0 -2
  725. package/build/esm/SatisfiesSemver.test.d.ts.map +0 -1
  726. package/build/esm/__unstable/ConjureSupport.d.ts +0 -55
  727. package/build/esm/__unstable/ConjureSupport.d.ts.map +0 -1
  728. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.d.ts +0 -10
  729. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.d.ts.map +0 -1
  730. package/build/esm/actions/ActionValidationError.d.ts +0 -6
  731. package/build/esm/actions/ActionValidationError.d.ts.map +0 -1
  732. package/build/esm/actions/actions.test.d.ts +0 -2
  733. package/build/esm/actions/actions.test.d.ts.map +0 -1
  734. package/build/esm/actions/applyAction.d.ts.map +0 -1
  735. package/build/esm/createAttachmentFromRid.d.ts +0 -10
  736. package/build/esm/createAttachmentFromRid.d.ts.map +0 -1
  737. package/build/esm/createAttachmentFromRid.js.map +0 -1
  738. package/build/esm/createClient.d.ts +0 -6
  739. package/build/esm/createClient.d.ts.map +0 -1
  740. package/build/esm/createClient.test.d.ts +0 -2
  741. package/build/esm/createClient.test.d.ts.map +0 -1
  742. package/build/esm/createGeotimeSeriesProperty.d.ts +0 -14
  743. package/build/esm/createGeotimeSeriesProperty.d.ts.map +0 -1
  744. package/build/esm/createMinimalClient.d.ts +0 -2
  745. package/build/esm/createMinimalClient.d.ts.map +0 -1
  746. package/build/esm/createPlatformClient.d.ts +0 -17
  747. package/build/esm/createPlatformClient.d.ts.map +0 -1
  748. package/build/esm/createTimeseriesProperty.d.ts +0 -14
  749. package/build/esm/createTimeseriesProperty.d.ts.map +0 -1
  750. package/build/esm/definitions/LinkDefinitions.test.d.ts +0 -2
  751. package/build/esm/definitions/LinkDefinitions.test.d.ts.map +0 -1
  752. package/build/esm/fetchMetadata.d.ts +0 -2
  753. package/build/esm/fetchMetadata.d.ts.map +0 -1
  754. package/build/esm/fetchMetadata.test.d.ts +0 -2
  755. package/build/esm/fetchMetadata.test.d.ts.map +0 -1
  756. package/build/esm/index.d.ts +0 -13
  757. package/build/esm/index.d.ts.map +0 -1
  758. package/build/esm/intellisense.test.d.ts +0 -2
  759. package/build/esm/intellisense.test.d.ts.map +0 -1
  760. package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.d.ts +0 -2
  761. package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.d.ts.map +0 -1
  762. package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.d.ts +0 -2
  763. package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.d.ts.map +0 -1
  764. package/build/esm/internal/conversions/modernToLegacyAggregationClause.d.ts +0 -2
  765. package/build/esm/internal/conversions/modernToLegacyAggregationClause.d.ts.map +0 -1
  766. package/build/esm/internal/conversions/modernToLegacyGroupByClause.d.ts +0 -2
  767. package/build/esm/internal/conversions/modernToLegacyGroupByClause.d.ts.map +0 -1
  768. package/build/esm/internal/conversions/modernToLegacyWhereClause.d.ts +0 -2
  769. package/build/esm/internal/conversions/modernToLegacyWhereClause.d.ts.map +0 -1
  770. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.d.ts +0 -2
  771. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.d.ts.map +0 -1
  772. package/build/esm/object/AttachmentUpload.d.ts +0 -4
  773. package/build/esm/object/AttachmentUpload.d.ts.map +0 -1
  774. package/build/esm/object/Cache.d.ts +0 -2
  775. package/build/esm/object/Cache.d.ts.map +0 -1
  776. package/build/esm/object/Cache.test.d.ts +0 -11
  777. package/build/esm/object/Cache.test.d.ts.map +0 -1
  778. package/build/esm/object/SimpleCache.d.ts +0 -38
  779. package/build/esm/object/SimpleCache.d.ts.map +0 -1
  780. package/build/esm/object/aggregate.d.ts +0 -2
  781. package/build/esm/object/aggregate.d.ts.map +0 -1
  782. package/build/esm/object/aggregate.test.d.ts +0 -2
  783. package/build/esm/object/aggregate.test.d.ts.map +0 -1
  784. package/build/esm/object/attachment.test.d.ts +0 -2
  785. package/build/esm/object/attachment.test.d.ts.map +0 -1
  786. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.d.ts +0 -11
  787. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.d.ts.map +0 -1
  788. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.d.ts +0 -14
  789. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.d.ts.map +0 -1
  790. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.d.ts +0 -2
  791. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.d.ts.map +0 -1
  792. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts +0 -2
  793. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts.map +0 -1
  794. package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts +0 -8
  795. package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts.map +0 -1
  796. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.d.ts +0 -2
  797. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.d.ts.map +0 -1
  798. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.test.d.ts +0 -2
  799. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.test.d.ts.map +0 -1
  800. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.d.ts +0 -2
  801. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.d.ts.map +0 -1
  802. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.d.ts +0 -3
  803. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.d.ts.map +0 -1
  804. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.d.ts +0 -2
  805. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.d.ts.map +0 -1
  806. package/build/esm/object/convertWireToOsdkObjects.d.ts +0 -2
  807. package/build/esm/object/convertWireToOsdkObjects.d.ts.map +0 -1
  808. package/build/esm/object/convertWireToOsdkObjects.test.d.ts +0 -2
  809. package/build/esm/object/convertWireToOsdkObjects.test.d.ts.map +0 -1
  810. package/build/esm/object/fetchPage.d.ts +0 -3
  811. package/build/esm/object/fetchPage.d.ts.map +0 -1
  812. package/build/esm/object/fetchPage.test.d.ts +0 -2
  813. package/build/esm/object/fetchPage.test.d.ts.map +0 -1
  814. package/build/esm/object/fetchSingle.d.ts +0 -2
  815. package/build/esm/object/fetchSingle.d.ts.map +0 -1
  816. package/build/esm/object/geotimeseriesreference.test.d.ts +0 -2
  817. package/build/esm/object/geotimeseriesreference.test.d.ts.map +0 -1
  818. package/build/esm/object/object.test.d.ts.map +0 -1
  819. package/build/esm/object/timeseries.test.d.ts +0 -2
  820. package/build/esm/object/timeseries.test.d.ts.map +0 -1
  821. package/build/esm/objectSet/ObjectSet.test.d.ts +0 -2
  822. package/build/esm/objectSet/ObjectSet.test.d.ts.map +0 -1
  823. package/build/esm/objectSet/ObjectSetFactory.d.ts +0 -2
  824. package/build/esm/objectSet/ObjectSetFactory.d.ts.map +0 -1
  825. package/build/esm/objectSet/ObjectSetListenerWebsocket.d.ts +0 -2
  826. package/build/esm/objectSet/ObjectSetListenerWebsocket.d.ts.map +0 -1
  827. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.d.ts +0 -2
  828. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.d.ts.map +0 -1
  829. package/build/esm/objectSet/conjureUnionType.d.ts +0 -13
  830. package/build/esm/objectSet/conjureUnionType.d.ts.map +0 -1
  831. package/build/esm/objectSet/createObjectSet.d.ts +0 -2
  832. package/build/esm/objectSet/createObjectSet.d.ts.map +0 -1
  833. package/build/esm/objectSet/toConjureObjectSet.d.ts +0 -2
  834. package/build/esm/objectSet/toConjureObjectSet.d.ts.map +0 -1
  835. package/build/esm/objectSet/toConjureObjectSet.js +0 -165
  836. package/build/esm/objectSet/toConjureObjectSet.js.map +0 -1
  837. package/build/esm/ontology/OntologyProvider.d.ts +0 -32
  838. package/build/esm/ontology/OntologyProvider.d.ts.map +0 -1
  839. package/build/esm/ontology/StandardOntologyProvider.d.ts +0 -5
  840. package/build/esm/ontology/StandardOntologyProvider.d.ts.map +0 -1
  841. package/build/esm/ontology/StandardOntologyProvider.test.d.ts +0 -2
  842. package/build/esm/ontology/StandardOntologyProvider.test.d.ts.map +0 -1
  843. package/build/esm/ontology/loadActionMetadata.d.ts +0 -4
  844. package/build/esm/ontology/loadActionMetadata.d.ts.map +0 -1
  845. package/build/esm/ontology/loadFullObjectMetadata.d.ts.map +0 -1
  846. package/build/esm/ontology/loadInterfaceMetadata.d.ts.map +0 -1
  847. package/build/esm/ontology/loadQueryMetadata.d.ts.map +0 -1
  848. package/build/esm/ontology/makeConjureContext.d.ts +0 -4
  849. package/build/esm/ontology/makeConjureContext.d.ts.map +0 -1
  850. package/build/esm/pageRequestAsAsyncIter.d.ts +0 -10
  851. package/build/esm/pageRequestAsAsyncIter.d.ts.map +0 -1
  852. package/build/esm/public/unstable-do-not-use.d.ts +0 -2
  853. package/build/esm/public/unstable-do-not-use.d.ts.map +0 -1
  854. package/build/esm/queries/applyQuery.d.ts.map +0 -1
  855. package/build/esm/queries/queries.test.d.ts +0 -2
  856. package/build/esm/queries/queries.test.d.ts.map +0 -1
  857. package/build/esm/queries/types.d.ts.map +0 -1
  858. package/build/esm/tsserver.d.ts.map +0 -1
  859. package/build/esm/util/ArrayElement.d.ts +0 -2
  860. package/build/esm/util/ArrayElement.d.ts.map +0 -1
  861. package/build/esm/util/NOOP.d.ts +0 -4
  862. package/build/esm/util/NOOP.d.ts.map +0 -1
  863. package/build/esm/util/NullableProps.d.ts +0 -6
  864. package/build/esm/util/NullableProps.d.ts.map +0 -1
  865. package/build/esm/util/UserAgent.d.ts +0 -2
  866. package/build/esm/util/UserAgent.d.ts.map +0 -1
  867. package/build/esm/util/WireObjectSet.d.ts +0 -2
  868. package/build/esm/util/WireObjectSet.d.ts.map +0 -1
  869. package/build/esm/util/addUserAgentAndRequestContextHeaders.d.ts.map +0 -1
  870. package/build/esm/util/augmentRequestContext.d.ts +0 -32
  871. package/build/esm/util/augmentRequestContext.d.ts.map +0 -1
  872. package/build/esm/util/isOntologyObjectV2.d.ts +0 -2
  873. package/build/esm/util/isOntologyObjectV2.d.ts.map +0 -1
  874. package/build/esm/util/isOsdkBaseObject.d.ts +0 -3
  875. package/build/esm/util/isOsdkBaseObject.d.ts.map +0 -1
  876. package/build/esm/util/isOsdkObject.d.ts.map +0 -1
  877. package/build/esm/util/partialBy.d.ts +0 -3
  878. package/build/esm/util/partialBy.d.ts.map +0 -1
  879. package/build/esm/util/streamutils.d.ts +0 -3
  880. package/build/esm/util/streamutils.d.ts.map +0 -1
  881. package/build/esm/util/timeseriesUtils.d.ts +0 -8
  882. package/build/esm/util/timeseriesUtils.d.ts.map +0 -1
  883. package/build/esm/util/toDataValue.d.ts +0 -2
  884. package/build/esm/util/toDataValue.d.ts.map +0 -1
  885. package/build/esm/util/toDataValue.test.d.ts +0 -2
  886. package/build/esm/util/toDataValue.test.d.ts.map +0 -1
  887. package/build/esm/util/toDataValueQueries.d.ts +0 -2
  888. package/build/esm/util/toDataValueQueries.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"modernToLegacyAggregationClause.js","names":["directionFieldMap","dir","undefined","modernToLegacyAggregationClause","select","Object","entries","flatMap","propAndMetric","aggregationType","type","name","direction","colonPos","lastIndexOf","property","slice","metric","field"],"sources":["modernToLegacyAggregationClause.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 */\nconst directionFieldMap = (dir) => dir === \"asc\" ? \"ASC\" : dir === \"desc\" ? \"DESC\" : undefined;\n/** @internal */\nexport function modernToLegacyAggregationClause(select) {\n return Object.entries(select).flatMap(([propAndMetric, aggregationType]) => {\n if (propAndMetric === \"$count\") {\n return {\n type: \"count\",\n name: \"count\",\n direction: directionFieldMap(aggregationType),\n };\n }\n const colonPos = propAndMetric.lastIndexOf(\":\");\n const property = propAndMetric.slice(0, colonPos);\n const metric = propAndMetric.slice(colonPos + 1);\n return [\n {\n type: metric,\n name: `${property}.${metric}`,\n direction: directionFieldMap(aggregationType),\n field: property,\n },\n ];\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,iBAAiB,GAAIC,GAAG,IAAKA,GAAG,KAAK,KAAK,GAAG,KAAK,GAAGA,GAAG,KAAK,MAAM,GAAG,MAAM,GAAGC,SAAS;AAC9F;AACA,OAAO,SAASC,+BAA+BA,CAACC,MAAM,EAAE;EACpD,OAAOC,MAAM,CAACC,OAAO,CAACF,MAAM,CAAC,CAACG,OAAO,CAAC,CAAC,CAACC,aAAa,EAAEC,eAAe,CAAC,KAAK;IACxE,IAAID,aAAa,KAAK,QAAQ,EAAE;MAC5B,OAAO;QACHE,IAAI,EAAE,OAAO;QACbC,IAAI,EAAE,OAAO;QACbC,SAAS,EAAEZ,iBAAiB,CAACS,eAAe;MAChD,CAAC;IACL;IACA,MAAMI,QAAQ,GAAGL,aAAa,CAACM,WAAW,CAAC,GAAG,CAAC;IAC/C,MAAMC,QAAQ,GAAGP,aAAa,CAACQ,KAAK,CAAC,CAAC,EAAEH,QAAQ,CAAC;IACjD,MAAMI,MAAM,GAAGT,aAAa,CAACQ,KAAK,CAACH,QAAQ,GAAG,CAAC,CAAC;IAChD,OAAO,CACH;MACIH,IAAI,EAAEO,MAAM;MACZN,IAAI,EAAE,GAAGI,QAAQ,IAAIE,MAAM,EAAE;MAC7BL,SAAS,EAAEZ,iBAAiB,CAACS,eAAe,CAAC;MAC7CS,KAAK,EAAEH;IACX,CAAC,CACJ;EACL,CAAC,CAAC;AACN","ignoreList":[]}
1
+ {"version":3,"file":"modernToLegacyAggregationClause.js","names":["directionFieldMap","dir","undefined","modernToLegacyAggregationClause","select","Object","entries","flatMap","propAndMetric","aggregationType","type","name","direction","colonPos","lastIndexOf","property","slice","metric","field"],"sources":["modernToLegacyAggregationClause.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 { AggregationClause } from \"@osdk/api\";\nimport type { AggregationV2 } from \"@osdk/foundry.ontologies\";\n\nconst directionFieldMap = (dir?: \"asc\" | \"desc\" | \"unordered\") =>\n dir === \"asc\" ? \"ASC\" : dir === \"desc\" ? \"DESC\" : undefined;\n\n/** @internal */\nexport function modernToLegacyAggregationClause<\n AC extends AggregationClause<any>,\n>(select: AC) {\n return Object.entries(select).flatMap<AggregationV2>(\n ([propAndMetric, aggregationType]) => {\n if (propAndMetric === \"$count\") {\n return {\n type: \"count\",\n name: \"count\",\n direction: directionFieldMap(aggregationType),\n };\n }\n\n const colonPos = propAndMetric.lastIndexOf(\":\");\n const property = propAndMetric.slice(0, colonPos);\n const metric = propAndMetric.slice(colonPos + 1);\n\n return [\n {\n type: metric as\n | \"approximateDistinct\"\n | \"exactDistinct\"\n | \"min\"\n | \"max\"\n | \"sum\"\n | \"avg\"\n | \"approximateDistinct\"\n | \"exactDistinct\",\n name: `${property}.${metric}`,\n direction: directionFieldMap(aggregationType),\n field: property,\n },\n ];\n },\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,MAAMA,iBAAiB,GAAIC,GAAkC,IAC3DA,GAAG,KAAK,KAAK,GAAG,KAAK,GAAGA,GAAG,KAAK,MAAM,GAAG,MAAM,GAAGC,SAAS;;AAE7D;AACA,OAAO,SAASC,+BAA+BA,CAE7CC,MAAU,EAAE;EACZ,OAAOC,MAAM,CAACC,OAAO,CAACF,MAAM,CAAC,CAACG,OAAO,CACnC,CAAC,CAACC,aAAa,EAAEC,eAAe,CAAC,KAAK;IACpC,IAAID,aAAa,KAAK,QAAQ,EAAE;MAC9B,OAAO;QACLE,IAAI,EAAE,OAAO;QACbC,IAAI,EAAE,OAAO;QACbC,SAAS,EAAEZ,iBAAiB,CAACS,eAAe;MAC9C,CAAC;IACH;IAEA,MAAMI,QAAQ,GAAGL,aAAa,CAACM,WAAW,CAAC,GAAG,CAAC;IAC/C,MAAMC,QAAQ,GAAGP,aAAa,CAACQ,KAAK,CAAC,CAAC,EAAEH,QAAQ,CAAC;IACjD,MAAMI,MAAM,GAAGT,aAAa,CAACQ,KAAK,CAACH,QAAQ,GAAG,CAAC,CAAC;IAEhD,OAAO,CACL;MACEH,IAAI,EAAEO,MAQa;MACnBN,IAAI,EAAE,GAAGI,QAAQ,IAAIE,MAAM,EAAE;MAC7BL,SAAS,EAAEZ,iBAAiB,CAACS,eAAe,CAAC;MAC7CS,KAAK,EAAEH;IACT,CAAC,CACF;EACH,CACF,CAAC;AACH","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { DurationMapping } from "@osdk/api";
17
18
  /** @internal */
18
19
  export function modernToLegacyGroupByClause(groupByClause) {
@@ -1 +1 @@
1
- {"version":3,"file":"modernToLegacyGroupByClause.js","names":["DurationMapping","modernToLegacyGroupByClause","groupByClause","Object","entries","flatMap","field","type","maxGroupCount","$exactWithLimit","fixedWidth","$fixedWidth","ranges","$ranges","map","range","convertRange","value","$duration","unit","startValue","endValue"],"sources":["modernToLegacyGroupByClause.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 { DurationMapping } from \"@osdk/api\";\n/** @internal */\nexport function modernToLegacyGroupByClause(groupByClause) {\n if (!groupByClause)\n return [];\n return Object.entries(groupByClause).flatMap(([field, type]) => {\n if (type === \"exact\") {\n return [{ type, field }];\n }\n else if (\"$exactWithLimit\" in type) {\n {\n return [\n {\n type: \"exact\",\n field,\n maxGroupCount: type.$exactWithLimit,\n },\n ];\n }\n }\n else if (\"$fixedWidth\" in type) {\n return [{\n type: \"fixedWidth\",\n field,\n fixedWidth: type.$fixedWidth,\n }];\n }\n else if (\"$ranges\" in type) {\n return [{\n type: \"ranges\",\n field,\n ranges: type.$ranges.map(range => convertRange(range)),\n }];\n }\n else if (\"$duration\" in type) {\n return [{\n type: \"duration\",\n field,\n value: type.$duration[0],\n unit: DurationMapping[type.$duration[1]],\n }];\n }\n else\n return [];\n });\n}\nfunction convertRange(range) {\n return { startValue: range[0], endValue: range[1] };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,WAAW;AAC3C;AACA,OAAO,SAASC,2BAA2BA,CAACC,aAAa,EAAE;EACvD,IAAI,CAACA,aAAa,EACd,OAAO,EAAE;EACb,OAAOC,MAAM,CAACC,OAAO,CAACF,aAAa,CAAC,CAACG,OAAO,CAAC,CAAC,CAACC,KAAK,EAAEC,IAAI,CAAC,KAAK;IAC5D,IAAIA,IAAI,KAAK,OAAO,EAAE;MAClB,OAAO,CAAC;QAAEA,IAAI;QAAED;MAAM,CAAC,CAAC;IAC5B,CAAC,MACI,IAAI,iBAAiB,IAAIC,IAAI,EAAE;MAChC;QACI,OAAO,CACH;UACIA,IAAI,EAAE,OAAO;UACbD,KAAK;UACLE,aAAa,EAAED,IAAI,CAACE;QACxB,CAAC,CACJ;MACL;IACJ,CAAC,MACI,IAAI,aAAa,IAAIF,IAAI,EAAE;MAC5B,OAAO,CAAC;QACAA,IAAI,EAAE,YAAY;QAClBD,KAAK;QACLI,UAAU,EAAEH,IAAI,CAACI;MACrB,CAAC,CAAC;IACV,CAAC,MACI,IAAI,SAAS,IAAIJ,IAAI,EAAE;MACxB,OAAO,CAAC;QACAA,IAAI,EAAE,QAAQ;QACdD,KAAK;QACLM,MAAM,EAAEL,IAAI,CAACM,OAAO,CAACC,GAAG,CAACC,KAAK,IAAIC,YAAY,CAACD,KAAK,CAAC;MACzD,CAAC,CAAC;IACV,CAAC,MACI,IAAI,WAAW,IAAIR,IAAI,EAAE;MAC1B,OAAO,CAAC;QACAA,IAAI,EAAE,UAAU;QAChBD,KAAK;QACLW,KAAK,EAAEV,IAAI,CAACW,SAAS,CAAC,CAAC,CAAC;QACxBC,IAAI,EAAEnB,eAAe,CAACO,IAAI,CAACW,SAAS,CAAC,CAAC,CAAC;MAC3C,CAAC,CAAC;IACV,CAAC,MAEG,OAAO,EAAE;EACjB,CAAC,CAAC;AACN;AACA,SAASF,YAAYA,CAACD,KAAK,EAAE;EACzB,OAAO;IAAEK,UAAU,EAAEL,KAAK,CAAC,CAAC,CAAC;IAAEM,QAAQ,EAAEN,KAAK,CAAC,CAAC;EAAE,CAAC;AACvD","ignoreList":[]}
1
+ {"version":3,"file":"modernToLegacyGroupByClause.js","names":["DurationMapping","modernToLegacyGroupByClause","groupByClause","Object","entries","flatMap","field","type","maxGroupCount","$exactWithLimit","fixedWidth","$fixedWidth","ranges","$ranges","map","range","convertRange","value","$duration","unit","startValue","endValue"],"sources":["modernToLegacyGroupByClause.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 { AllGroupByValues, GroupByClause, GroupByRange } from \"@osdk/api\";\nimport { DurationMapping } from \"@osdk/api\";\nimport type {\n AggregationGroupByV2,\n AggregationRangeV2,\n} from \"@osdk/foundry.ontologies\";\n\n/** @internal */\nexport function modernToLegacyGroupByClause(\n groupByClause: GroupByClause<any> | undefined,\n) {\n if (!groupByClause) return [];\n\n return Object.entries(\n groupByClause as Record<string, AllGroupByValues>,\n ).flatMap<AggregationGroupByV2>(([field, type]) => {\n if (type === \"exact\") {\n return [{ type, field }];\n } else if (\"$exactWithLimit\" in type) {\n {\n return [\n {\n type: \"exact\",\n field,\n maxGroupCount: type.$exactWithLimit,\n },\n ];\n }\n } else if (\"$fixedWidth\" in type) {\n return [{\n type: \"fixedWidth\",\n field,\n fixedWidth: type.$fixedWidth,\n }];\n } else if (\"$ranges\" in type) {\n return [{\n type: \"ranges\",\n field,\n ranges: type.$ranges.map(range => convertRange(range)),\n }];\n } else if (\"$duration\" in type) {\n return [{\n type: \"duration\",\n field,\n value: type.$duration[0],\n unit: DurationMapping[type.$duration[1]],\n }];\n } else return [];\n });\n}\n\nfunction convertRange(\n range: GroupByRange<number | string>,\n): AggregationRangeV2 {\n return { startValue: range[0], endValue: range[1] };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,eAAe,QAAQ,WAAW;AAM3C;AACA,OAAO,SAASC,2BAA2BA,CACzCC,aAA6C,EAC7C;EACA,IAAI,CAACA,aAAa,EAAE,OAAO,EAAE;EAE7B,OAAOC,MAAM,CAACC,OAAO,CACnBF,aACF,CAAC,CAACG,OAAO,CAAuB,CAAC,CAACC,KAAK,EAAEC,IAAI,CAAC,KAAK;IACjD,IAAIA,IAAI,KAAK,OAAO,EAAE;MACpB,OAAO,CAAC;QAAEA,IAAI;QAAED;MAAM,CAAC,CAAC;IAC1B,CAAC,MAAM,IAAI,iBAAiB,IAAIC,IAAI,EAAE;MACpC;QACE,OAAO,CACL;UACEA,IAAI,EAAE,OAAO;UACbD,KAAK;UACLE,aAAa,EAAED,IAAI,CAACE;QACtB,CAAC,CACF;MACH;IACF,CAAC,MAAM,IAAI,aAAa,IAAIF,IAAI,EAAE;MAChC,OAAO,CAAC;QACNA,IAAI,EAAE,YAAY;QAClBD,KAAK;QACLI,UAAU,EAAEH,IAAI,CAACI;MACnB,CAAC,CAAC;IACJ,CAAC,MAAM,IAAI,SAAS,IAAIJ,IAAI,EAAE;MAC5B,OAAO,CAAC;QACNA,IAAI,EAAE,QAAQ;QACdD,KAAK;QACLM,MAAM,EAAEL,IAAI,CAACM,OAAO,CAACC,GAAG,CAACC,KAAK,IAAIC,YAAY,CAACD,KAAK,CAAC;MACvD,CAAC,CAAC;IACJ,CAAC,MAAM,IAAI,WAAW,IAAIR,IAAI,EAAE;MAC9B,OAAO,CAAC;QACNA,IAAI,EAAE,UAAU;QAChBD,KAAK;QACLW,KAAK,EAAEV,IAAI,CAACW,SAAS,CAAC,CAAC,CAAC;QACxBC,IAAI,EAAEnB,eAAe,CAACO,IAAI,CAACW,SAAS,CAAC,CAAC,CAAC;MACzC,CAAC,CAAC;IACJ,CAAC,MAAM,OAAO,EAAE;EAClB,CAAC,CAAC;AACJ;AAEA,SAASF,YAAYA,CACnBD,KAAoC,EAChB;EACpB,OAAO;IAAEK,UAAU,EAAEL,KAAK,CAAC,CAAC,CAAC;IAAEM,QAAQ,EAAEN,KAAK,CAAC,CAAC;EAAE,CAAC;AACrD","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 { DistanceUnitMapping } from "@osdk/api";
17
18
  import invariant from "tiny-invariant";
18
19
  export function extractNamespace(fqApiName) {
@@ -20,6 +21,7 @@ export function extractNamespace(fqApiName) {
20
21
  if (last === -1) return [undefined, fqApiName];
21
22
  return [fqApiName.slice(0, last), fqApiName.slice(last + 1)];
22
23
  }
24
+
23
25
  /** @internal */
24
26
  export function modernToLegacyWhereClause(whereClause, objectOrInterface) {
25
27
  if ("$and" in whereClause) {
@@ -47,9 +49,17 @@ export function modernToLegacyWhereClause(whereClause, objectOrInterface) {
47
49
  value: parts.map(v => handleWherePair(v, objectOrInterface))
48
50
  };
49
51
  }
50
- function makeGeoFilterBbox(field, bbox, filterType) {
52
+ function makeGeoFilterBbox(bbox, filterType, propertyIdentifier, field) {
51
53
  return {
52
54
  type: filterType === "$within" ? "withinBoundingBox" : "intersectsBoundingBox",
55
+ /**
56
+ * This is a bit ugly, but did this so that propertyIdentifier only shows up in the return object if its defined,
57
+ * this makes it so we don't need to go update our entire test bed either to include a field which may change in near future.
58
+ * Once we solidify that this is the way forward, I can remove field and clean this up
59
+ */
60
+ ...(propertyIdentifier != null && {
61
+ propertyIdentifier
62
+ }),
53
63
  field,
54
64
  value: {
55
65
  topLeft: {
@@ -63,9 +73,12 @@ function makeGeoFilterBbox(field, bbox, filterType) {
63
73
  }
64
74
  };
65
75
  }
66
- function makeGeoFilterPolygon(field, coordinates, filterType) {
76
+ function makeGeoFilterPolygon(coordinates, filterType, propertyIdentifier, field) {
67
77
  return {
68
78
  type: filterType,
79
+ ...(propertyIdentifier != null && {
80
+ propertyIdentifier
81
+ }),
69
82
  field,
70
83
  value: {
71
84
  type: "Polygon",
@@ -73,38 +86,49 @@ function makeGeoFilterPolygon(field, coordinates, filterType) {
73
86
  }
74
87
  };
75
88
  }
76
- function handleWherePair([field, filter], objectOrInterface) {
77
- !(filter != null) ? invariant(false, "Defined key values are only allowed when they are not undefined.") : void 0;
89
+ function handleWherePair([fieldName, filter], objectOrInterface, structFieldSelector) {
90
+ !(filter != null) ? process.env.NODE_ENV !== "production" ? invariant(false, "Defined key values are only allowed when they are not undefined.") : invariant(false) : void 0;
91
+ const propertyIdentifier = structFieldSelector != null ? {
92
+ type: "structField",
93
+ ...structFieldSelector,
94
+ propertyApiName: fullyQualifyPropName(structFieldSelector.propertyApiName, objectOrInterface)
95
+ } : undefined;
96
+ const field = structFieldSelector == null ? fullyQualifyPropName(fieldName, objectOrInterface) : undefined;
78
97
  if (typeof filter === "string" || typeof filter === "number" || typeof filter === "boolean") {
79
- if (objectOrInterface.type === "interface") {
80
- const [objApiNamespace] = extractNamespace(objectOrInterface.apiName);
81
- const [fieldApiNamespace, fieldShortName] = extractNamespace(field);
82
- if (fieldApiNamespace == null && objApiNamespace != null) {
83
- field = `${objApiNamespace}.${fieldShortName}`;
84
- }
85
- }
86
98
  return {
87
99
  type: "eq",
100
+ ...(propertyIdentifier != null && {
101
+ propertyIdentifier
102
+ }),
88
103
  field,
89
104
  value: filter
90
105
  };
91
106
  }
92
107
  const keysOfFilter = Object.keys(filter);
108
+
93
109
  // If any of the keys start with `$` then they must be the only one.
94
110
  // e.g. `where({ name: { $eq: "foo", $ne: "bar" } })` is invalid currently
95
111
  const hasDollarSign = keysOfFilter.some(key => key.startsWith("$"));
96
- !(!hasDollarSign || keysOfFilter.length === 1) ? invariant(false, "WhereClause Filter with multiple clauses isn't allowed") : void 0;
112
+ !(!hasDollarSign || keysOfFilter.length === 1) ? process.env.NODE_ENV !== "production" ? invariant(false, "WhereClause Filter with multiple clauses isn't allowed") : invariant(false) : void 0;
97
113
  if (!hasDollarSign) {
98
- // Future case for structs
99
- throw new Error(`Unsupported filter. Did you forget to use a $-prefixed filter? (${JSON.stringify(filter)})`);
114
+ const structFilter = Object.entries(filter);
115
+ !(structFilter.length === 1) ? process.env.NODE_ENV !== "production" ? invariant(false, "Cannot filter on more than one struct field in the same clause, need to use an and clause") : invariant(false) : void 0;
116
+ const structFieldApiName = keysOfFilter[0];
117
+ return handleWherePair(Object.entries(filter)[0], objectOrInterface, {
118
+ propertyApiName: fieldName,
119
+ structFieldApiName
120
+ });
100
121
  }
101
122
  const firstKey = keysOfFilter[0];
102
- !(filter[firstKey] != null) ? invariant(false) : void 0;
123
+ !(filter[firstKey] != null) ? process.env.NODE_ENV !== "production" ? invariant(false) : invariant(false) : void 0;
103
124
  if (firstKey === "$ne") {
104
125
  return {
105
126
  type: "not",
106
127
  value: {
107
128
  type: "eq",
129
+ ...(propertyIdentifier != null && {
130
+ propertyIdentifier
131
+ }),
108
132
  field,
109
133
  value: filter[firstKey]
110
134
  }
@@ -113,12 +137,15 @@ function handleWherePair([field, filter], objectOrInterface) {
113
137
  if (firstKey === "$within") {
114
138
  const withinBody = filter[firstKey];
115
139
  if (Array.isArray(withinBody)) {
116
- return makeGeoFilterBbox(field, withinBody, firstKey);
140
+ return makeGeoFilterBbox(withinBody, firstKey, propertyIdentifier, field);
117
141
  } else if ("$bbox" in withinBody && withinBody.$bbox != null) {
118
- return makeGeoFilterBbox(field, withinBody.$bbox, firstKey);
142
+ return makeGeoFilterBbox(withinBody.$bbox, firstKey, propertyIdentifier, field);
119
143
  } else if ("$distance" in withinBody && "$of" in withinBody && withinBody.$distance != null && withinBody.$of != null) {
120
144
  return {
121
145
  type: "withinDistanceOf",
146
+ ...(propertyIdentifier != null && {
147
+ propertyIdentifier
148
+ }),
122
149
  field,
123
150
  value: {
124
151
  center: Array.isArray(withinBody.$of) ? {
@@ -133,24 +160,46 @@ function handleWherePair([field, filter], objectOrInterface) {
133
160
  };
134
161
  } else {
135
162
  const coordinates = "$polygon" in withinBody ? withinBody.$polygon : withinBody.coordinates;
136
- return makeGeoFilterPolygon(field, coordinates, "withinPolygon");
163
+ return makeGeoFilterPolygon(coordinates, "withinPolygon", propertyIdentifier, fieldName);
137
164
  }
138
165
  }
139
166
  if (firstKey === "$intersects") {
140
167
  const intersectsBody = filter[firstKey];
141
168
  if (Array.isArray(intersectsBody)) {
142
- return makeGeoFilterBbox(field, intersectsBody, firstKey);
169
+ return makeGeoFilterBbox(intersectsBody, firstKey, propertyIdentifier, field);
143
170
  } else if ("$bbox" in intersectsBody && intersectsBody.$bbox != null) {
144
- return makeGeoFilterBbox(field, intersectsBody.$bbox, firstKey);
171
+ return makeGeoFilterBbox(intersectsBody.$bbox, firstKey, propertyIdentifier, field);
145
172
  } else {
146
173
  const coordinates = "$polygon" in intersectsBody ? intersectsBody.$polygon : intersectsBody.coordinates;
147
- return makeGeoFilterPolygon(field, coordinates, "intersectsPolygon");
174
+ return makeGeoFilterPolygon(coordinates, "intersectsPolygon", propertyIdentifier, field);
148
175
  }
149
176
  }
177
+ if (firstKey === "$containsAllTerms" || firstKey === "$containsAnyTerm") {
178
+ return {
179
+ type: firstKey.substring(1),
180
+ ...(propertyIdentifier != null && {
181
+ propertyIdentifier
182
+ }),
183
+ field,
184
+ value: typeof filter[firstKey] === "string" ? filter[firstKey] : filter[firstKey]["term"],
185
+ fuzzy: typeof filter[firstKey] === "string" ? false : filter[firstKey]["fuzzySearch"] ?? false
186
+ };
187
+ }
150
188
  return {
151
189
  type: firstKey.substring(1),
190
+ ...(propertyIdentifier != null && {
191
+ propertyIdentifier
192
+ }),
152
193
  field,
153
194
  value: filter[firstKey]
154
195
  };
155
196
  }
197
+ function fullyQualifyPropName(fieldName, objectOrInterface) {
198
+ if (objectOrInterface.type === "interface") {
199
+ const [objApiNamespace] = extractNamespace(objectOrInterface.apiName);
200
+ const [fieldApiNamespace, fieldShortName] = extractNamespace(fieldName);
201
+ return fieldApiNamespace == null && objApiNamespace != null ? `${objApiNamespace}.${fieldShortName}` : fieldName;
202
+ }
203
+ return fieldName;
204
+ }
156
205
  //# sourceMappingURL=modernToLegacyWhereClause.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"modernToLegacyWhereClause.js","names":["DistanceUnitMapping","invariant","extractNamespace","fqApiName","last","lastIndexOf","undefined","slice","modernToLegacyWhereClause","whereClause","objectOrInterface","type","value","$and","map","clause","$or","$not","parts","Object","entries","length","handleWherePair","v","makeGeoFilterBbox","field","bbox","filterType","topLeft","coordinates","bottomRight","makeGeoFilterPolygon","filter","objApiNamespace","apiName","fieldApiNamespace","fieldShortName","keysOfFilter","keys","hasDollarSign","some","key","startsWith","Error","JSON","stringify","firstKey","withinBody","Array","isArray","$bbox","$distance","$of","center","distance","unit","$polygon","intersectsBody","substring"],"sources":["modernToLegacyWhereClause.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 { DistanceUnitMapping } from \"@osdk/api\";\nimport invariant from \"tiny-invariant\";\nexport function extractNamespace(fqApiName) {\n const last = fqApiName.lastIndexOf(\".\");\n if (last === -1)\n return [undefined, fqApiName];\n return [fqApiName.slice(0, last), fqApiName.slice(last + 1)];\n}\n/** @internal */\nexport function modernToLegacyWhereClause(whereClause, objectOrInterface) {\n if (\"$and\" in whereClause) {\n return {\n type: \"and\",\n value: whereClause.$and.map((clause) => modernToLegacyWhereClause(clause, objectOrInterface)),\n };\n }\n else if (\"$or\" in whereClause) {\n return {\n type: \"or\",\n value: whereClause.$or.map((clause) => modernToLegacyWhereClause(clause, objectOrInterface)),\n };\n }\n else if (\"$not\" in whereClause) {\n return {\n type: \"not\",\n value: modernToLegacyWhereClause(whereClause.$not, objectOrInterface),\n };\n }\n const parts = Object.entries(whereClause);\n if (parts.length === 1) {\n return handleWherePair(parts[0], objectOrInterface);\n }\n return {\n type: \"and\",\n value: parts.map(v => handleWherePair(v, objectOrInterface)),\n };\n}\nfunction makeGeoFilterBbox(field, bbox, filterType) {\n return {\n type: filterType === \"$within\"\n ? \"withinBoundingBox\"\n : \"intersectsBoundingBox\",\n field,\n value: {\n topLeft: {\n type: \"Point\",\n coordinates: [bbox[0], bbox[3]],\n },\n bottomRight: {\n type: \"Point\",\n coordinates: [bbox[2], bbox[1]],\n },\n },\n };\n}\nfunction makeGeoFilterPolygon(field, coordinates, filterType) {\n return {\n type: filterType,\n field,\n value: {\n type: \"Polygon\",\n coordinates,\n },\n };\n}\nfunction handleWherePair([field, filter], objectOrInterface) {\n invariant(filter != null, \"Defined key values are only allowed when they are not undefined.\");\n if (typeof filter === \"string\" || typeof filter === \"number\"\n || typeof filter === \"boolean\") {\n if (objectOrInterface.type === \"interface\") {\n const [objApiNamespace] = extractNamespace(objectOrInterface.apiName);\n const [fieldApiNamespace, fieldShortName] = extractNamespace(field);\n if (fieldApiNamespace == null && objApiNamespace != null) {\n field = `${objApiNamespace}.${fieldShortName}`;\n }\n }\n return {\n type: \"eq\",\n field,\n value: filter,\n };\n }\n const keysOfFilter = Object.keys(filter);\n // If any of the keys start with `$` then they must be the only one.\n // e.g. `where({ name: { $eq: \"foo\", $ne: \"bar\" } })` is invalid currently\n const hasDollarSign = keysOfFilter.some((key) => key.startsWith(\"$\"));\n invariant(!hasDollarSign\n || keysOfFilter.length === 1, \"WhereClause Filter with multiple clauses isn't allowed\");\n if (!hasDollarSign) {\n // Future case for structs\n throw new Error(`Unsupported filter. Did you forget to use a $-prefixed filter? (${JSON.stringify(filter)})`);\n }\n const firstKey = keysOfFilter[0];\n invariant(filter[firstKey] != null);\n if (firstKey === \"$ne\") {\n return {\n type: \"not\",\n value: {\n type: \"eq\",\n field,\n value: filter[firstKey],\n },\n };\n }\n if (firstKey === \"$within\") {\n const withinBody = filter[firstKey];\n if (Array.isArray(withinBody)) {\n return makeGeoFilterBbox(field, withinBody, firstKey);\n }\n else if (\"$bbox\" in withinBody && withinBody.$bbox != null) {\n return makeGeoFilterBbox(field, withinBody.$bbox, firstKey);\n }\n else if ((\"$distance\" in withinBody && \"$of\" in withinBody)\n && withinBody.$distance != null\n && withinBody.$of != null) {\n return {\n type: \"withinDistanceOf\",\n field,\n value: {\n center: Array.isArray(withinBody.$of)\n ? {\n type: \"Point\",\n coordinates: withinBody.$of,\n }\n : withinBody.$of,\n distance: {\n value: withinBody.$distance[0],\n unit: DistanceUnitMapping[withinBody.$distance[1]],\n },\n },\n };\n }\n else {\n const coordinates = (\"$polygon\" in withinBody)\n ? withinBody.$polygon\n : withinBody.coordinates;\n return makeGeoFilterPolygon(field, coordinates, \"withinPolygon\");\n }\n }\n if (firstKey === \"$intersects\") {\n const intersectsBody = filter[firstKey];\n if (Array.isArray(intersectsBody)) {\n return makeGeoFilterBbox(field, intersectsBody, firstKey);\n }\n else if (\"$bbox\" in intersectsBody && intersectsBody.$bbox != null) {\n return makeGeoFilterBbox(field, intersectsBody.$bbox, firstKey);\n }\n else {\n const coordinates = (\"$polygon\" in intersectsBody)\n ? intersectsBody.$polygon\n : intersectsBody.coordinates;\n return makeGeoFilterPolygon(field, coordinates, \"intersectsPolygon\");\n }\n }\n return {\n type: firstKey.substring(1),\n field,\n value: filter[firstKey],\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,mBAAmB,QAAQ,WAAW;AAC/C,OAAOC,SAAS,MAAM,gBAAgB;AACtC,OAAO,SAASC,gBAAgBA,CAACC,SAAS,EAAE;EACxC,MAAMC,IAAI,GAAGD,SAAS,CAACE,WAAW,CAAC,GAAG,CAAC;EACvC,IAAID,IAAI,KAAK,CAAC,CAAC,EACX,OAAO,CAACE,SAAS,EAAEH,SAAS,CAAC;EACjC,OAAO,CAACA,SAAS,CAACI,KAAK,CAAC,CAAC,EAAEH,IAAI,CAAC,EAAED,SAAS,CAACI,KAAK,CAACH,IAAI,GAAG,CAAC,CAAC,CAAC;AAChE;AACA;AACA,OAAO,SAASI,yBAAyBA,CAACC,WAAW,EAAEC,iBAAiB,EAAE;EACtE,IAAI,MAAM,IAAID,WAAW,EAAE;IACvB,OAAO;MACHE,IAAI,EAAE,KAAK;MACXC,KAAK,EAAEH,WAAW,CAACI,IAAI,CAACC,GAAG,CAAEC,MAAM,IAAKP,yBAAyB,CAACO,MAAM,EAAEL,iBAAiB,CAAC;IAChG,CAAC;EACL,CAAC,MACI,IAAI,KAAK,IAAID,WAAW,EA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,MACI;MACD,MAAMtB,WAAW,GAAI,UAAU,IAAIkB,UAAU,GACvCA,UAAU,CAACS,QAAQ,GACnBT,UAAU,CAAClB,WAAW;MAC5B,OAAOE,oBAAoB,CAACN,KAAK,EAAEI,WAAW,EAAE,eAAe,CAAC;IACpE;EACJ;EACA,IAAIiB,QAAQ,KAAK,aAAa,EAAE;IAC5B,MAAMW,cAAc,GAAGzB,MAAM,CAACc,QAAQ,CAAC;IACvC,IAAIE,KAAK,CAACC,OAAO,CAACQ,cAAc,CAAC,EAAE;MAC/B,OAAOjC,iBAAiB,CAACC,KAAK,EAAEgC,cAAc,EAAEX,QAAQ,CAAC;IAC7D,CAAC,MACI,IAAI,OAAO,IAAIW,cAAc,IAAIA,cAAc,CAACP,KAAK,IAAI,IAAI,EAAE;MAChE,OAAO1B,iBAAiB,CAACC,KAAK,EAAEgC,cAAc,CAACP,KAAK,EAAEJ,QAAQ,CAAC;IACnE,CAAC,MACI;MACD,MAAMjB,WAAW,GAAI,UAAU,IAAI4B,cAAc,GAC3CA,cAAc,CAACD,QAAQ,GACvBC,cAAc,CAAC5B,WAAW;MAChC,OAAOE,oBAAoB,CAACN,KAAK,EAAEI,WAAW,EAAE,mBAAmB,CAAC;IACxE;EACJ;EACA,OAAO;IACHlB,IAAI,EAAEmC,QAAQ,CAACY,SAAS,CAAC,CAAC,CAAC;IAC3BjC,KAAK;IACLb,KAAK,EAAEoB,MAAM,CAACc,QAAQ;EAC1B,CAAC;AACL","ignoreList":[]}
1
+ {"version":3,"file":"modernToLegacyWhereClause.js","names":["DistanceUnitMapping","invariant","extractNamespace","fqApiName","last","lastIndexOf","undefined","slice","modernToLegacyWhereClause","whereClause","objectOrInterface","type","value","$and","map","clause","$or","$not","parts","Object","entries","length","handleWherePair","v","makeGeoFilterBbox","bbox","filterType","propertyIdentifier","field","topLeft","coordinates","bottomRight","makeGeoFilterPolygon","fieldName","filter","structFieldSelector","process","env","NODE_ENV","propertyApiName","fullyQualifyPropName","keysOfFilter","keys","hasDollarSign","some","key","startsWith","structFilter","structFieldApiName","firstKey","withinBody","Array","isArray","$bbox","$distance","$of","center","distance","unit","$polygon","intersectsBody","substring","fuzzy","objApiNamespace","apiName","fieldApiNamespace","fieldShortName"],"sources":["modernToLegacyWhereClause.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 GeoFilterOptions,\n ObjectOrInterfaceDefinition,\n PossibleWhereClauseFilters,\n WhereClause,\n} from \"@osdk/api\";\nimport { DistanceUnitMapping } from \"@osdk/api\";\n\nimport type {\n PropertyIdentifier,\n SearchJsonQueryV2,\n} from \"@osdk/foundry.ontologies\";\nimport type { BBox, Position } from \"geojson\";\nimport invariant from \"tiny-invariant\";\n\nexport function extractNamespace(\n fqApiName: string,\n): [string | undefined, string] {\n const last = fqApiName.lastIndexOf(\".\");\n if (last === -1) return [undefined, fqApiName];\n return [fqApiName.slice(0, last), fqApiName.slice(last + 1)];\n}\n\n/** @internal */\nexport function modernToLegacyWhereClause<\n T extends ObjectOrInterfaceDefinition,\n>(\n whereClause: WhereClause<T>,\n objectOrInterface: T,\n): SearchJsonQueryV2 {\n if (\"$and\" in whereClause) {\n return {\n type: \"and\",\n value: (whereClause.$and as WhereClause<T>[]).map(\n (clause) => modernToLegacyWhereClause(clause, objectOrInterface),\n ),\n };\n } else if (\"$or\" in whereClause) {\n return {\n type: \"or\",\n value: (whereClause.$or as WhereClause<T>[]).map(\n (clause) => modernToLegacyWhereClause(clause, objectOrInterface),\n ),\n };\n } else if (\"$not\" in whereClause) {\n return {\n type: \"not\",\n value: modernToLegacyWhereClause(\n whereClause.$not as WhereClause<T>,\n objectOrInterface,\n ),\n };\n }\n\n const parts = Object.entries(whereClause);\n\n if (parts.length === 1) {\n return handleWherePair(parts[0], objectOrInterface);\n }\n\n return {\n type: \"and\",\n value: parts.map<SearchJsonQueryV2>(\n v => handleWherePair(v, objectOrInterface),\n ),\n };\n}\n\nfunction makeGeoFilterBbox(\n bbox: BBox,\n filterType: \"$within\" | \"$intersects\",\n propertyIdentifier?: PropertyIdentifier,\n field?: string,\n): SearchJsonQueryV2 {\n return {\n type: filterType === \"$within\"\n ? \"withinBoundingBox\"\n : \"intersectsBoundingBox\",\n /**\n * This is a bit ugly, but did this so that propertyIdentifier only shows up in the return object if its defined,\n * this makes it so we don't need to go update our entire test bed either to include a field which may change in near future.\n * Once we solidify that this is the way forward, I can remove field and clean this up\n */\n ...(propertyIdentifier != null && { propertyIdentifier }),\n field,\n value: {\n topLeft: {\n type: \"Point\",\n coordinates: [bbox[0], bbox[3]],\n },\n bottomRight: {\n type: \"Point\",\n coordinates: [bbox[2], bbox[1]],\n },\n },\n };\n}\n\nfunction makeGeoFilterPolygon(\n coordinates: Position[][],\n filterType: \"intersectsPolygon\" | \"withinPolygon\",\n propertyIdentifier?: PropertyIdentifier,\n field?: string,\n): SearchJsonQueryV2 {\n return {\n type: filterType,\n ...(propertyIdentifier != null && { propertyIdentifier }),\n field,\n value: {\n type: \"Polygon\",\n coordinates,\n },\n };\n}\n\nfunction handleWherePair(\n [fieldName, filter]: [string, any],\n objectOrInterface: ObjectOrInterfaceDefinition,\n structFieldSelector?: { propertyApiName: string; structFieldApiName: string },\n): SearchJsonQueryV2 {\n invariant(\n filter != null,\n \"Defined key values are only allowed when they are not undefined.\",\n );\n\n const propertyIdentifier: PropertyIdentifier | undefined =\n structFieldSelector != null\n ? {\n type: \"structField\",\n ...structFieldSelector,\n propertyApiName: fullyQualifyPropName(\n structFieldSelector.propertyApiName,\n objectOrInterface,\n ),\n }\n : undefined;\n const field = structFieldSelector == null\n ? fullyQualifyPropName(fieldName, objectOrInterface)\n : undefined;\n\n if (\n typeof filter === \"string\" || typeof filter === \"number\"\n || typeof filter === \"boolean\"\n ) {\n propertyIdentifier;\n return {\n type: \"eq\",\n ...(propertyIdentifier != null\n && { propertyIdentifier }),\n field,\n value: filter,\n };\n }\n\n const keysOfFilter = Object.keys(filter);\n\n // If any of the keys start with `$` then they must be the only one.\n // e.g. `where({ name: { $eq: \"foo\", $ne: \"bar\" } })` is invalid currently\n const hasDollarSign = keysOfFilter.some((key) => key.startsWith(\"$\"));\n invariant(\n !hasDollarSign\n || keysOfFilter.length === 1,\n \"WhereClause Filter with multiple clauses isn't allowed\",\n );\n\n if (!hasDollarSign) {\n const structFilter = Object.entries(filter);\n invariant(\n structFilter.length === 1,\n \"Cannot filter on more than one struct field in the same clause, need to use an and clause\",\n );\n const structFieldApiName = keysOfFilter[0];\n return handleWherePair(Object.entries(filter)[0], objectOrInterface, {\n propertyApiName: fieldName,\n structFieldApiName,\n });\n }\n\n const firstKey = keysOfFilter[0] as PossibleWhereClauseFilters;\n invariant(filter[firstKey] != null);\n\n if (firstKey === \"$ne\") {\n return {\n type: \"not\",\n value: {\n type: \"eq\",\n ...(propertyIdentifier != null && { propertyIdentifier }),\n field,\n value: filter[firstKey],\n },\n };\n }\n\n if (firstKey === \"$within\") {\n const withinBody = filter[firstKey] as GeoFilterOptions[\"$within\"];\n\n if (Array.isArray(withinBody)) {\n return makeGeoFilterBbox(withinBody, firstKey, propertyIdentifier, field);\n } else if (\"$bbox\" in withinBody && withinBody.$bbox != null) {\n return makeGeoFilterBbox(\n withinBody.$bbox,\n firstKey,\n propertyIdentifier,\n field,\n );\n } else if (\n (\"$distance\" in withinBody && \"$of\" in withinBody)\n && withinBody.$distance != null\n && withinBody.$of != null\n ) {\n return {\n type: \"withinDistanceOf\",\n ...(propertyIdentifier != null && { propertyIdentifier }),\n field,\n value: {\n center: Array.isArray(withinBody.$of)\n ? {\n type: \"Point\",\n coordinates: withinBody.$of,\n }\n : withinBody.$of,\n distance: {\n value: withinBody.$distance[0],\n unit: DistanceUnitMapping[withinBody.$distance[1]],\n },\n },\n };\n } else {\n const coordinates = (\"$polygon\" in withinBody)\n ? withinBody.$polygon\n : withinBody.coordinates;\n return makeGeoFilterPolygon(\n coordinates,\n \"withinPolygon\",\n propertyIdentifier,\n fieldName,\n );\n }\n }\n if (firstKey === \"$intersects\") {\n const intersectsBody = filter[firstKey] as GeoFilterOptions[\"$intersects\"];\n if (Array.isArray(intersectsBody)) {\n return makeGeoFilterBbox(\n intersectsBody,\n firstKey,\n propertyIdentifier,\n field,\n );\n } else if (\"$bbox\" in intersectsBody && intersectsBody.$bbox != null) {\n return makeGeoFilterBbox(\n intersectsBody.$bbox,\n firstKey,\n propertyIdentifier,\n field,\n );\n } else {\n const coordinates = (\"$polygon\" in intersectsBody)\n ? intersectsBody.$polygon\n : intersectsBody.coordinates;\n return makeGeoFilterPolygon(\n coordinates,\n \"intersectsPolygon\",\n propertyIdentifier,\n field,\n );\n }\n }\n\n if (firstKey === \"$containsAllTerms\" || firstKey === \"$containsAnyTerm\") {\n return {\n type: firstKey.substring(1) as DropDollarSign<typeof firstKey>,\n ...(propertyIdentifier != null && { propertyIdentifier }),\n field,\n value: typeof filter[firstKey] === \"string\"\n ? filter[firstKey]\n : filter[firstKey][\"term\"],\n fuzzy: typeof filter[firstKey] === \"string\"\n ? false\n : filter[firstKey][\"fuzzySearch\"] ?? false,\n };\n }\n\n return {\n type: firstKey.substring(1) as DropDollarSign<typeof firstKey>,\n ...(propertyIdentifier != null && { propertyIdentifier }),\n field,\n value: filter[firstKey] as any,\n };\n}\n\ntype DropDollarSign<T extends `$${string}`> = T extends `$${infer U}` ? U\n : never;\n\nfunction fullyQualifyPropName(\n fieldName: string,\n objectOrInterface: ObjectOrInterfaceDefinition,\n) {\n if (objectOrInterface.type === \"interface\") {\n const [objApiNamespace] = extractNamespace(objectOrInterface.apiName);\n const [fieldApiNamespace, fieldShortName] = extractNamespace(fieldName);\n return (fieldApiNamespace == null && objApiNamespace != null)\n ? `${objApiNamespace}.${fieldShortName}`\n : fieldName;\n }\n return fieldName;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,SAASA,mBAAmB,QAAQ,WAAW;AAO/C,OAAOC,SAAS,MAAM,gBAAgB;AAEtC,OAAO,SAASC,gBAAgBA,CAC9BC,SAAiB,EACa;EAC9B,MAAMC,IAAI,GAAGD,SAAS,CAACE,WAAW,CAAC,GAAG,CAAC;EACvC,IAAID,IAAI,KAAK,CAAC,CAAC,EAAE,OAAO,CAACE,SAAS,EAAEH,SAAS,CAAC;EAC9C,OAAO,CAACA,SAAS,CAACI,KAAK,CAAC,CAAC,EAAEH,IAAI,CAAC,EAAED,SAAS,CAACI,KAAK,CAACH,IAAI,GAAG,CAAC,CAAC,CAAC;AAC9D;;AAEA;AACA,OAAO,SAASI,yBAAyBA,CAGvCC,WAA2B,EAC3BC,iBAAoB,EACD;EACnB,IAAI,MAAM,IAAID,WAAW,EAAE;IACzB,OAAO;MACLE,IAAI,EAAE,KAAK;MACXC,KAAK,EAAGH,WAAW,CAACI,IAAI,CAAsBC,GAAG,CAC9CC,MAAM,IAAKP,yBAAyB,CAACO,MAAM,EAAEL,iBAAiB,CACjE;IACF,CAAC;EACH,CAAC,MAAM,IAAI,KAAK,IAAID,WAAW,EAAE;IAC/B,OAAO;MACLE,IAAI,EAAE,IAAI;MACVC,KAAK,EAAGH,WAAW,CAACO,GAAG,CAAsBF,GAAG,CAC7CC,MAAM,IAAKP,yBAAyB,CAACO,MAAM,EAAEL,iBAAiB,CACjE;IACF,CAAC;EACH,CAAC,MAAM,IAAI,MAAM,IAAID,WAAW,EAAE;IAChC,OAAO;MACLE,IAAI,EAAE,KAAK;MACXC,KAAK,EAAEJ,yBAAyB,CAC9BC,WAAW,CAACQ,IAAI,EAChBP,iBACF;I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