@osdk/client 2.6.0-beta.1 → 2.6.0-beta.10

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 (450) hide show
  1. package/CHANGELOG.md +122 -0
  2. package/build/browser/Client.js +1 -1
  3. package/build/browser/Client.js.map +1 -1
  4. package/build/browser/MinimalClientContext.js.map +1 -1
  5. package/build/browser/createClient.js +1 -1
  6. package/build/browser/createClient.js.map +1 -1
  7. package/build/browser/createClient.test.js +19 -1
  8. package/build/browser/createClient.test.js.map +1 -1
  9. package/build/browser/createMinimalClient.js +1 -1
  10. package/build/browser/createMinimalClient.js.map +1 -1
  11. package/build/browser/derivedProperties/createWithPropertiesObjectSet.js +2 -1
  12. package/build/browser/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
  13. package/build/browser/fetchMetadata.test.js +11 -0
  14. package/build/browser/fetchMetadata.test.js.map +1 -1
  15. package/build/browser/index.js.map +1 -1
  16. package/build/browser/internal/conversions/extractNamespace.js +22 -0
  17. package/build/browser/internal/conversions/extractNamespace.js.map +1 -0
  18. package/build/browser/internal/conversions/fullyQualifyPropName.js +26 -0
  19. package/build/browser/internal/conversions/fullyQualifyPropName.js.map +1 -0
  20. package/build/browser/internal/conversions/makeGeoFilterBbox.js +41 -0
  21. package/build/browser/internal/conversions/makeGeoFilterBbox.js.map +1 -0
  22. package/build/browser/internal/conversions/makeGeoFilterIntersects.js +29 -0
  23. package/build/browser/internal/conversions/makeGeoFilterIntersects.js.map +1 -0
  24. package/build/browser/internal/conversions/makeGeoFilterPolygon.js +30 -0
  25. package/build/browser/internal/conversions/makeGeoFilterPolygon.js.map +1 -0
  26. package/build/browser/internal/conversions/makeGeoFilterWithin.js +48 -0
  27. package/build/browser/internal/conversions/makeGeoFilterWithin.js.map +1 -0
  28. package/build/browser/internal/conversions/modernToLegacyWhereClause.js +59 -105
  29. package/build/browser/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
  30. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js +309 -0
  31. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -1
  32. package/build/browser/object/aggregate.js +2 -1
  33. package/build/browser/object/aggregate.js.map +1 -1
  34. package/build/browser/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -1
  35. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -1
  36. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js +5 -1
  37. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  38. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js +10 -0
  39. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  40. package/build/browser/object/convertWireToOsdkObjects.test.js +12 -0
  41. package/build/browser/object/convertWireToOsdkObjects.test.js.map +1 -1
  42. package/build/browser/object/fetchPage.js +7 -4
  43. package/build/browser/object/fetchPage.js.map +1 -1
  44. package/build/browser/object/formatting/applyPropertyFormatter.js +58 -0
  45. package/build/browser/object/formatting/applyPropertyFormatter.js.map +1 -0
  46. package/build/browser/object/formatting/applyPropertyFormatter.test.js +726 -0
  47. package/build/browser/object/formatting/applyPropertyFormatter.test.js.map +1 -0
  48. package/build/browser/object/formatting/formatBoolean.js +23 -0
  49. package/build/browser/object/formatting/formatBoolean.js.map +1 -0
  50. package/build/browser/object/formatting/formatDateTime.js +158 -0
  51. package/build/browser/object/formatting/formatDateTime.js.map +1 -0
  52. package/build/browser/object/formatting/formatNumber.js +242 -0
  53. package/build/browser/object/formatting/formatNumber.js.map +1 -0
  54. package/build/browser/object/formatting/propertyFormattingUtils.js +39 -0
  55. package/build/browser/object/formatting/propertyFormattingUtils.js.map +1 -0
  56. package/build/browser/object/mediaUpload.js +1 -1
  57. package/build/browser/object/mediaUpload.js.map +1 -1
  58. package/build/browser/objectSet/ObjectSetListenerWebsocket.js +17 -0
  59. package/build/browser/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
  60. package/build/browser/observable/ObservableClient.js.map +1 -1
  61. package/build/browser/observable/internal/BulkObjectLoader.js +12 -4
  62. package/build/browser/observable/internal/BulkObjectLoader.js.map +1 -1
  63. package/build/browser/observable/internal/BulkObjectLoader.test.js +48 -0
  64. package/build/browser/observable/internal/BulkObjectLoader.test.js.map +1 -1
  65. package/build/browser/observable/internal/CacheKeys.js +9 -3
  66. package/build/browser/observable/internal/CacheKeys.js.map +1 -1
  67. package/build/browser/observable/internal/Canonicalizer.js +51 -0
  68. package/build/browser/observable/internal/Canonicalizer.js.map +1 -0
  69. package/build/browser/observable/internal/Changes.js.map +1 -1
  70. package/build/browser/observable/internal/IntersectCanonicalizer.js +35 -0
  71. package/build/browser/observable/internal/IntersectCanonicalizer.js.map +1 -0
  72. package/build/browser/observable/internal/KnownCacheKey.js.map +1 -1
  73. package/build/browser/observable/internal/ObservableClientImpl.js +3 -0
  74. package/build/browser/observable/internal/ObservableClientImpl.js.map +1 -1
  75. package/build/browser/observable/internal/OrderByCanonicalizer.js +1 -4
  76. package/build/browser/observable/internal/OrderByCanonicalizer.js.map +1 -1
  77. package/build/browser/observable/internal/PivotCanonicalizer.js +33 -0
  78. package/build/browser/observable/internal/PivotCanonicalizer.js.map +1 -0
  79. package/build/browser/observable/internal/RdpCanonicalizer.js +66 -0
  80. package/build/browser/observable/internal/RdpCanonicalizer.js.map +1 -0
  81. package/build/browser/observable/internal/RdpCanonicalizer.test.js +68 -0
  82. package/build/browser/observable/internal/RdpCanonicalizer.test.js.map +1 -0
  83. package/build/browser/observable/internal/SimpleWhereClause.js.map +1 -1
  84. package/build/browser/observable/internal/Store.js +172 -6
  85. package/build/browser/observable/internal/Store.js.map +1 -1
  86. package/build/browser/observable/internal/WhereClauseCanonicalizer.js +1 -1
  87. package/build/browser/observable/internal/WhereClauseCanonicalizer.js.map +1 -1
  88. package/build/browser/observable/internal/actions/ActionApplication.js +1 -1
  89. package/build/browser/observable/internal/actions/ActionApplication.js.map +1 -1
  90. package/build/browser/observable/internal/actions/OptimisticJob.js +3 -3
  91. package/build/browser/observable/internal/actions/OptimisticJob.js.map +1 -1
  92. package/build/browser/observable/internal/aggregation/AggregationCacheKey.js +22 -0
  93. package/build/browser/observable/internal/aggregation/AggregationCacheKey.js.map +1 -0
  94. package/build/browser/observable/internal/aggregation/AggregationQuery.js +77 -0
  95. package/build/browser/observable/internal/aggregation/AggregationQuery.js.map +1 -0
  96. package/build/browser/observable/internal/aggregation/AggregationsHelper.js +54 -0
  97. package/build/browser/observable/internal/aggregation/AggregationsHelper.js.map +1 -0
  98. package/build/browser/observable/internal/aggregation/ObjectAggregationQuery.js +33 -0
  99. package/build/browser/observable/internal/aggregation/ObjectAggregationQuery.js.map +1 -0
  100. package/build/browser/observable/internal/base-list/BaseListQuery.js +145 -5
  101. package/build/browser/observable/internal/base-list/BaseListQuery.js.map +1 -1
  102. package/build/browser/observable/internal/base-list/createCollectionConnectable.js +0 -5
  103. package/build/browser/observable/internal/base-list/createCollectionConnectable.js.map +1 -1
  104. package/build/browser/observable/internal/base-list/createCollectionConnectable.test.js +26 -13
  105. package/build/browser/observable/internal/base-list/createCollectionConnectable.test.js.map +1 -1
  106. package/build/browser/observable/internal/evaluateFilter.js +61 -0
  107. package/build/browser/observable/internal/evaluateFilter.js.map +1 -0
  108. package/build/browser/observable/internal/links/SpecificLinkCacheKey.js +33 -1
  109. package/build/browser/observable/internal/links/SpecificLinkCacheKey.js.map +1 -1
  110. package/build/browser/observable/internal/list/InterfaceListQuery.js +8 -3
  111. package/build/browser/observable/internal/list/InterfaceListQuery.js.map +1 -1
  112. package/build/browser/observable/internal/list/ListCacheKey.js +24 -1
  113. package/build/browser/observable/internal/list/ListCacheKey.js.map +1 -1
  114. package/build/browser/observable/internal/list/ListQuery.js +35 -62
  115. package/build/browser/observable/internal/list/ListQuery.js.map +1 -1
  116. package/build/browser/observable/internal/list/ListQueryOptions.js.map +1 -1
  117. package/build/browser/observable/internal/list/ListsHelper.js +18 -8
  118. package/build/browser/observable/internal/list/ListsHelper.js.map +1 -1
  119. package/build/browser/observable/internal/list/ObjectListQuery.js +51 -3
  120. package/build/browser/observable/internal/list/ObjectListQuery.js.map +1 -1
  121. package/build/browser/observable/internal/object/ObjectCacheKey.js +20 -1
  122. package/build/browser/observable/internal/object/ObjectCacheKey.js.map +1 -1
  123. package/build/browser/observable/internal/object/ObjectCacheKeyRegistry.js +126 -0
  124. package/build/browser/observable/internal/object/ObjectCacheKeyRegistry.js.map +1 -0
  125. package/build/browser/observable/internal/object/ObjectCacheKeyRegistry.test.js +173 -0
  126. package/build/browser/observable/internal/object/ObjectCacheKeyRegistry.test.js.map +1 -0
  127. package/build/browser/observable/internal/object/ObjectQuery.js +10 -58
  128. package/build/browser/observable/internal/object/ObjectQuery.js.map +1 -1
  129. package/build/browser/observable/internal/object/ObjectsHelper.js +65 -5
  130. package/build/browser/observable/internal/object/ObjectsHelper.js.map +1 -1
  131. package/build/browser/observable/internal/objectMatchesWhereClause.js +3 -37
  132. package/build/browser/observable/internal/objectMatchesWhereClause.js.map +1 -1
  133. package/build/browser/observable/internal/objectset/ObjectSetHelper.js +5 -1
  134. package/build/browser/observable/internal/objectset/ObjectSetHelper.js.map +1 -1
  135. package/build/browser/observable/internal/objectset/ObjectSetQuery.js +3 -0
  136. package/build/browser/observable/internal/objectset/ObjectSetQuery.js.map +1 -1
  137. package/build/browser/observable/internal/objectset/ObjectSetQueryOptions.js.map +1 -1
  138. package/build/browser/observable/internal/testUtils/invalidateList.js +6 -1
  139. package/build/browser/observable/internal/testUtils/invalidateList.js.map +1 -1
  140. package/build/browser/observable/internal/testUtils.js +3 -2
  141. package/build/browser/observable/internal/testUtils.js.map +1 -1
  142. package/build/browser/observable/internal/types/ObjectUpdate.js +2 -0
  143. package/build/browser/observable/internal/types/ObjectUpdate.js.map +1 -0
  144. package/build/browser/observable/internal/utils/rdpFieldOperations.js +83 -0
  145. package/build/browser/observable/internal/utils/rdpFieldOperations.js.map +1 -0
  146. package/build/browser/public/internal-node.js +18 -0
  147. package/build/browser/public/internal-node.js.map +1 -0
  148. package/build/browser/public/unstable-do-not-use.js.map +1 -1
  149. package/build/browser/queries/applyQuery.js +2 -0
  150. package/build/browser/queries/applyQuery.js.map +1 -1
  151. package/build/browser/util/UserAgent.js +2 -2
  152. package/build/browser/util/UserAgent.js.map +1 -1
  153. package/build/browser/util/toDataValue.js +3 -2
  154. package/build/browser/util/toDataValue.js.map +1 -1
  155. package/build/browser/util/toDataValue.test.js +1 -1
  156. package/build/browser/util/toDataValue.test.js.map +1 -1
  157. package/build/browser/util/toDataValueQueries.js +2 -2
  158. package/build/browser/util/toDataValueQueries.js.map +1 -1
  159. package/build/cjs/chunk-6SCDLAU2.cjs +57 -0
  160. package/build/cjs/chunk-6SCDLAU2.cjs.map +1 -0
  161. package/build/cjs/{chunk-BP7BR5FZ.cjs → chunk-HJX4D4KL.cjs} +610 -71
  162. package/build/cjs/chunk-HJX4D4KL.cjs.map +1 -0
  163. package/build/cjs/{chunk-DCEFUXFS.cjs → chunk-RO7XAQOS.cjs} +421 -246
  164. package/build/cjs/chunk-RO7XAQOS.cjs.map +1 -0
  165. package/build/cjs/{delay-QK4T7RVX.cjs → delay-KIUUJ5NJ.cjs} +4 -3
  166. package/build/cjs/delay-KIUUJ5NJ.cjs.map +1 -0
  167. package/build/cjs/index.cjs +17 -9
  168. package/build/cjs/index.cjs.map +1 -1
  169. package/build/cjs/index.d.cts +1 -1
  170. package/build/cjs/public/internal-node.cjs +193767 -0
  171. package/build/cjs/public/internal-node.cjs.map +1 -0
  172. package/build/cjs/public/internal-node.d.cts +29 -0
  173. package/build/cjs/public/internal.cjs +16 -9
  174. package/build/cjs/public/internal.cjs.map +1 -1
  175. package/build/cjs/public/unstable-do-not-use.cjs +1736 -868
  176. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
  177. package/build/cjs/public/unstable-do-not-use.d.cts +42 -6
  178. package/build/esm/Client.js +1 -1
  179. package/build/esm/Client.js.map +1 -1
  180. package/build/esm/MinimalClientContext.js.map +1 -1
  181. package/build/esm/createClient.js +1 -1
  182. package/build/esm/createClient.js.map +1 -1
  183. package/build/esm/createClient.test.js +19 -1
  184. package/build/esm/createClient.test.js.map +1 -1
  185. package/build/esm/createMinimalClient.js +1 -1
  186. package/build/esm/createMinimalClient.js.map +1 -1
  187. package/build/esm/derivedProperties/createWithPropertiesObjectSet.js +2 -1
  188. package/build/esm/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
  189. package/build/esm/fetchMetadata.test.js +11 -0
  190. package/build/esm/fetchMetadata.test.js.map +1 -1
  191. package/build/esm/index.js.map +1 -1
  192. package/build/esm/internal/conversions/extractNamespace.js +22 -0
  193. package/build/esm/internal/conversions/extractNamespace.js.map +1 -0
  194. package/build/esm/internal/conversions/fullyQualifyPropName.js +26 -0
  195. package/build/esm/internal/conversions/fullyQualifyPropName.js.map +1 -0
  196. package/build/esm/internal/conversions/makeGeoFilterBbox.js +41 -0
  197. package/build/esm/internal/conversions/makeGeoFilterBbox.js.map +1 -0
  198. package/build/esm/internal/conversions/makeGeoFilterIntersects.js +29 -0
  199. package/build/esm/internal/conversions/makeGeoFilterIntersects.js.map +1 -0
  200. package/build/esm/internal/conversions/makeGeoFilterPolygon.js +30 -0
  201. package/build/esm/internal/conversions/makeGeoFilterPolygon.js.map +1 -0
  202. package/build/esm/internal/conversions/makeGeoFilterWithin.js +48 -0
  203. package/build/esm/internal/conversions/makeGeoFilterWithin.js.map +1 -0
  204. package/build/esm/internal/conversions/modernToLegacyWhereClause.js +59 -105
  205. package/build/esm/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
  206. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js +309 -0
  207. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -1
  208. package/build/esm/object/aggregate.js +2 -1
  209. package/build/esm/object/aggregate.js.map +1 -1
  210. package/build/esm/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -1
  211. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -1
  212. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js +5 -1
  213. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  214. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js +10 -0
  215. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  216. package/build/esm/object/convertWireToOsdkObjects.test.js +12 -0
  217. package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -1
  218. package/build/esm/object/fetchPage.js +7 -4
  219. package/build/esm/object/fetchPage.js.map +1 -1
  220. package/build/esm/object/formatting/applyPropertyFormatter.js +58 -0
  221. package/build/esm/object/formatting/applyPropertyFormatter.js.map +1 -0
  222. package/build/esm/object/formatting/applyPropertyFormatter.test.js +726 -0
  223. package/build/esm/object/formatting/applyPropertyFormatter.test.js.map +1 -0
  224. package/build/esm/object/formatting/formatBoolean.js +23 -0
  225. package/build/esm/object/formatting/formatBoolean.js.map +1 -0
  226. package/build/esm/object/formatting/formatDateTime.js +158 -0
  227. package/build/esm/object/formatting/formatDateTime.js.map +1 -0
  228. package/build/esm/object/formatting/formatNumber.js +242 -0
  229. package/build/esm/object/formatting/formatNumber.js.map +1 -0
  230. package/build/esm/object/formatting/propertyFormattingUtils.js +39 -0
  231. package/build/esm/object/formatting/propertyFormattingUtils.js.map +1 -0
  232. package/build/esm/object/mediaUpload.js +1 -1
  233. package/build/esm/object/mediaUpload.js.map +1 -1
  234. package/build/esm/objectSet/ObjectSetListenerWebsocket.js +17 -0
  235. package/build/esm/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
  236. package/build/esm/observable/ObservableClient.js.map +1 -1
  237. package/build/esm/observable/internal/BulkObjectLoader.js +12 -4
  238. package/build/esm/observable/internal/BulkObjectLoader.js.map +1 -1
  239. package/build/esm/observable/internal/BulkObjectLoader.test.js +48 -0
  240. package/build/esm/observable/internal/BulkObjectLoader.test.js.map +1 -1
  241. package/build/esm/observable/internal/CacheKeys.js +9 -3
  242. package/build/esm/observable/internal/CacheKeys.js.map +1 -1
  243. package/build/esm/observable/internal/Canonicalizer.js +51 -0
  244. package/build/esm/observable/internal/Canonicalizer.js.map +1 -0
  245. package/build/esm/observable/internal/Changes.js.map +1 -1
  246. package/build/esm/observable/internal/IntersectCanonicalizer.js +35 -0
  247. package/build/esm/observable/internal/IntersectCanonicalizer.js.map +1 -0
  248. package/build/esm/observable/internal/KnownCacheKey.js.map +1 -1
  249. package/build/esm/observable/internal/ObservableClientImpl.js +3 -0
  250. package/build/esm/observable/internal/ObservableClientImpl.js.map +1 -1
  251. package/build/esm/observable/internal/OrderByCanonicalizer.js +1 -4
  252. package/build/esm/observable/internal/OrderByCanonicalizer.js.map +1 -1
  253. package/build/esm/observable/internal/PivotCanonicalizer.js +33 -0
  254. package/build/esm/observable/internal/PivotCanonicalizer.js.map +1 -0
  255. package/build/esm/observable/internal/RdpCanonicalizer.js +66 -0
  256. package/build/esm/observable/internal/RdpCanonicalizer.js.map +1 -0
  257. package/build/esm/observable/internal/RdpCanonicalizer.test.js +68 -0
  258. package/build/esm/observable/internal/RdpCanonicalizer.test.js.map +1 -0
  259. package/build/esm/observable/internal/SimpleWhereClause.js.map +1 -1
  260. package/build/esm/observable/internal/Store.js +172 -6
  261. package/build/esm/observable/internal/Store.js.map +1 -1
  262. package/build/esm/observable/internal/WhereClauseCanonicalizer.js +1 -1
  263. package/build/esm/observable/internal/WhereClauseCanonicalizer.js.map +1 -1
  264. package/build/esm/observable/internal/actions/ActionApplication.js +1 -1
  265. package/build/esm/observable/internal/actions/ActionApplication.js.map +1 -1
  266. package/build/esm/observable/internal/actions/OptimisticJob.js +3 -3
  267. package/build/esm/observable/internal/actions/OptimisticJob.js.map +1 -1
  268. package/build/esm/observable/internal/aggregation/AggregationCacheKey.js +22 -0
  269. package/build/esm/observable/internal/aggregation/AggregationCacheKey.js.map +1 -0
  270. package/build/esm/observable/internal/aggregation/AggregationQuery.js +77 -0
  271. package/build/esm/observable/internal/aggregation/AggregationQuery.js.map +1 -0
  272. package/build/esm/observable/internal/aggregation/AggregationsHelper.js +54 -0
  273. package/build/esm/observable/internal/aggregation/AggregationsHelper.js.map +1 -0
  274. package/build/esm/observable/internal/aggregation/ObjectAggregationQuery.js +33 -0
  275. package/build/esm/observable/internal/aggregation/ObjectAggregationQuery.js.map +1 -0
  276. package/build/esm/observable/internal/base-list/BaseListQuery.js +145 -5
  277. package/build/esm/observable/internal/base-list/BaseListQuery.js.map +1 -1
  278. package/build/esm/observable/internal/base-list/createCollectionConnectable.js +0 -5
  279. package/build/esm/observable/internal/base-list/createCollectionConnectable.js.map +1 -1
  280. package/build/esm/observable/internal/base-list/createCollectionConnectable.test.js +26 -13
  281. package/build/esm/observable/internal/base-list/createCollectionConnectable.test.js.map +1 -1
  282. package/build/esm/observable/internal/evaluateFilter.js +61 -0
  283. package/build/esm/observable/internal/evaluateFilter.js.map +1 -0
  284. package/build/esm/observable/internal/links/SpecificLinkCacheKey.js +33 -1
  285. package/build/esm/observable/internal/links/SpecificLinkCacheKey.js.map +1 -1
  286. package/build/esm/observable/internal/list/InterfaceListQuery.js +8 -3
  287. package/build/esm/observable/internal/list/InterfaceListQuery.js.map +1 -1
  288. package/build/esm/observable/internal/list/ListCacheKey.js +24 -1
  289. package/build/esm/observable/internal/list/ListCacheKey.js.map +1 -1
  290. package/build/esm/observable/internal/list/ListQuery.js +35 -62
  291. package/build/esm/observable/internal/list/ListQuery.js.map +1 -1
  292. package/build/esm/observable/internal/list/ListQueryOptions.js.map +1 -1
  293. package/build/esm/observable/internal/list/ListsHelper.js +18 -8
  294. package/build/esm/observable/internal/list/ListsHelper.js.map +1 -1
  295. package/build/esm/observable/internal/list/ObjectListQuery.js +51 -3
  296. package/build/esm/observable/internal/list/ObjectListQuery.js.map +1 -1
  297. package/build/esm/observable/internal/object/ObjectCacheKey.js +20 -1
  298. package/build/esm/observable/internal/object/ObjectCacheKey.js.map +1 -1
  299. package/build/esm/observable/internal/object/ObjectCacheKeyRegistry.js +126 -0
  300. package/build/esm/observable/internal/object/ObjectCacheKeyRegistry.js.map +1 -0
  301. package/build/esm/observable/internal/object/ObjectCacheKeyRegistry.test.js +173 -0
  302. package/build/esm/observable/internal/object/ObjectCacheKeyRegistry.test.js.map +1 -0
  303. package/build/esm/observable/internal/object/ObjectQuery.js +10 -58
  304. package/build/esm/observable/internal/object/ObjectQuery.js.map +1 -1
  305. package/build/esm/observable/internal/object/ObjectsHelper.js +65 -5
  306. package/build/esm/observable/internal/object/ObjectsHelper.js.map +1 -1
  307. package/build/esm/observable/internal/objectMatchesWhereClause.js +3 -37
  308. package/build/esm/observable/internal/objectMatchesWhereClause.js.map +1 -1
  309. package/build/esm/observable/internal/objectset/ObjectSetHelper.js +5 -1
  310. package/build/esm/observable/internal/objectset/ObjectSetHelper.js.map +1 -1
  311. package/build/esm/observable/internal/objectset/ObjectSetQuery.js +3 -0
  312. package/build/esm/observable/internal/objectset/ObjectSetQuery.js.map +1 -1
  313. package/build/esm/observable/internal/objectset/ObjectSetQueryOptions.js.map +1 -1
  314. package/build/esm/observable/internal/testUtils/invalidateList.js +6 -1
  315. package/build/esm/observable/internal/testUtils/invalidateList.js.map +1 -1
  316. package/build/esm/observable/internal/testUtils.js +3 -2
  317. package/build/esm/observable/internal/testUtils.js.map +1 -1
  318. package/build/esm/observable/internal/types/ObjectUpdate.js +2 -0
  319. package/build/esm/observable/internal/types/ObjectUpdate.js.map +1 -0
  320. package/build/esm/observable/internal/utils/rdpFieldOperations.js +83 -0
  321. package/build/esm/observable/internal/utils/rdpFieldOperations.js.map +1 -0
  322. package/build/esm/public/internal-node.js +18 -0
  323. package/build/esm/public/internal-node.js.map +1 -0
  324. package/build/esm/public/unstable-do-not-use.js.map +1 -1
  325. package/build/esm/queries/applyQuery.js +2 -0
  326. package/build/esm/queries/applyQuery.js.map +1 -1
  327. package/build/esm/util/UserAgent.js +2 -2
  328. package/build/esm/util/UserAgent.js.map +1 -1
  329. package/build/esm/util/toDataValue.js +3 -2
  330. package/build/esm/util/toDataValue.js.map +1 -1
  331. package/build/esm/util/toDataValue.test.js +1 -1
  332. package/build/esm/util/toDataValue.test.js.map +1 -1
  333. package/build/esm/util/toDataValueQueries.js +2 -2
  334. package/build/esm/util/toDataValueQueries.js.map +1 -1
  335. package/build/types/Client.d.ts +1 -1
  336. package/build/types/MinimalClientContext.d.ts +1 -1
  337. package/build/types/index.d.ts +1 -1
  338. package/build/types/index.d.ts.map +1 -1
  339. package/build/types/internal/conversions/extractNamespace.d.ts +1 -0
  340. package/build/types/internal/conversions/extractNamespace.d.ts.map +1 -0
  341. package/build/types/internal/conversions/fullyQualifyPropName.d.ts +2 -0
  342. package/build/types/internal/conversions/fullyQualifyPropName.d.ts.map +1 -0
  343. package/build/types/internal/conversions/makeGeoFilterBbox.d.ts +3 -0
  344. package/build/types/internal/conversions/makeGeoFilterBbox.d.ts.map +1 -0
  345. package/build/types/internal/conversions/makeGeoFilterIntersects.d.ts +3 -0
  346. package/build/types/internal/conversions/makeGeoFilterIntersects.d.ts.map +1 -0
  347. package/build/types/internal/conversions/makeGeoFilterPolygon.d.ts +3 -0
  348. package/build/types/internal/conversions/makeGeoFilterPolygon.d.ts.map +1 -0
  349. package/build/types/internal/conversions/makeGeoFilterWithin.d.ts +3 -0
  350. package/build/types/internal/conversions/makeGeoFilterWithin.d.ts.map +1 -0
  351. package/build/types/internal/conversions/modernToLegacyWhereClause.d.ts +1 -1
  352. package/build/types/internal/conversions/modernToLegacyWhereClause.d.ts.map +1 -1
  353. package/build/types/object/formatting/applyPropertyFormatter.d.ts +18 -0
  354. package/build/types/object/formatting/applyPropertyFormatter.d.ts.map +1 -0
  355. package/build/types/object/formatting/applyPropertyFormatter.test.d.ts +1 -0
  356. package/build/types/object/formatting/applyPropertyFormatter.test.d.ts.map +1 -0
  357. package/build/types/object/formatting/formatBoolean.d.ts +5 -0
  358. package/build/types/object/formatting/formatBoolean.d.ts.map +1 -0
  359. package/build/types/object/formatting/formatDateTime.d.ts +6 -0
  360. package/build/types/object/formatting/formatDateTime.d.ts.map +1 -0
  361. package/build/types/object/formatting/formatNumber.d.ts +15 -0
  362. package/build/types/object/formatting/formatNumber.d.ts.map +1 -0
  363. package/build/types/object/formatting/propertyFormattingUtils.d.ts +10 -0
  364. package/build/types/object/formatting/propertyFormattingUtils.d.ts.map +1 -0
  365. package/build/types/observable/ObservableClient.d.ts +60 -5
  366. package/build/types/observable/ObservableClient.d.ts.map +1 -1
  367. package/build/types/observable/internal/BulkObjectLoader.d.ts.map +1 -1
  368. package/build/types/observable/internal/CacheKeys.d.ts.map +1 -1
  369. package/build/types/observable/internal/Canonicalizer.d.ts +37 -0
  370. package/build/types/observable/internal/Canonicalizer.d.ts.map +1 -0
  371. package/build/types/observable/internal/Changes.d.ts +4 -3
  372. package/build/types/observable/internal/Changes.d.ts.map +1 -1
  373. package/build/types/observable/internal/IntersectCanonicalizer.d.ts +18 -0
  374. package/build/types/observable/internal/IntersectCanonicalizer.d.ts.map +1 -0
  375. package/build/types/observable/internal/KnownCacheKey.d.ts +2 -1
  376. package/build/types/observable/internal/KnownCacheKey.d.ts.map +1 -1
  377. package/build/types/observable/internal/OrderByCanonicalizer.d.ts.map +1 -1
  378. package/build/types/observable/internal/PivotCanonicalizer.d.ts +10 -0
  379. package/build/types/observable/internal/PivotCanonicalizer.d.ts.map +1 -0
  380. package/build/types/observable/internal/RdpCanonicalizer.d.ts +8 -0
  381. package/build/types/observable/internal/RdpCanonicalizer.d.ts.map +1 -0
  382. package/build/types/observable/internal/RdpCanonicalizer.test.d.ts +1 -0
  383. package/build/types/observable/internal/RdpCanonicalizer.test.d.ts.map +1 -0
  384. package/build/types/observable/internal/SimpleWhereClause.d.ts +6 -2
  385. package/build/types/observable/internal/SimpleWhereClause.d.ts.map +1 -1
  386. package/build/types/observable/internal/Store.d.ts +10 -0
  387. package/build/types/observable/internal/Store.d.ts.map +1 -1
  388. package/build/types/observable/internal/WhereClauseCanonicalizer.d.ts +5 -2
  389. package/build/types/observable/internal/WhereClauseCanonicalizer.d.ts.map +1 -1
  390. package/build/types/observable/internal/actions/ActionApplication.d.ts.map +1 -1
  391. package/build/types/observable/internal/aggregation/AggregationCacheKey.d.ts +12 -0
  392. package/build/types/observable/internal/aggregation/AggregationCacheKey.d.ts.map +1 -0
  393. package/build/types/observable/internal/aggregation/AggregationQuery.d.ts +49 -0
  394. package/build/types/observable/internal/aggregation/AggregationQuery.d.ts.map +1 -0
  395. package/build/types/observable/internal/aggregation/AggregationsHelper.d.ts +37 -0
  396. package/build/types/observable/internal/aggregation/AggregationsHelper.d.ts.map +1 -0
  397. package/build/types/observable/internal/aggregation/ObjectAggregationQuery.d.ts +5 -0
  398. package/build/types/observable/internal/aggregation/ObjectAggregationQuery.d.ts.map +1 -0
  399. package/build/types/observable/internal/base-list/BaseListQuery.d.ts +48 -2
  400. package/build/types/observable/internal/base-list/BaseListQuery.d.ts.map +1 -1
  401. package/build/types/observable/internal/base-list/createCollectionConnectable.d.ts +1 -23
  402. package/build/types/observable/internal/base-list/createCollectionConnectable.d.ts.map +1 -1
  403. package/build/types/observable/internal/evaluateFilter.d.ts +6 -0
  404. package/build/types/observable/internal/evaluateFilter.d.ts.map +1 -0
  405. package/build/types/observable/internal/links/SpecificLinkCacheKey.d.ts +5 -0
  406. package/build/types/observable/internal/links/SpecificLinkCacheKey.d.ts.map +1 -1
  407. package/build/types/observable/internal/list/InterfaceListQuery.d.ts.map +1 -1
  408. package/build/types/observable/internal/list/ListCacheKey.d.ts +10 -1
  409. package/build/types/observable/internal/list/ListCacheKey.d.ts.map +1 -1
  410. package/build/types/observable/internal/list/ListQuery.d.ts +12 -15
  411. package/build/types/observable/internal/list/ListQuery.d.ts.map +1 -1
  412. package/build/types/observable/internal/list/ListQueryOptions.d.ts +9 -1
  413. package/build/types/observable/internal/list/ListQueryOptions.d.ts.map +1 -1
  414. package/build/types/observable/internal/list/ListsHelper.d.ts +7 -1
  415. package/build/types/observable/internal/list/ListsHelper.d.ts.map +1 -1
  416. package/build/types/observable/internal/list/ObjectListQuery.d.ts.map +1 -1
  417. package/build/types/observable/internal/object/ObjectCacheKey.d.ts +6 -1
  418. package/build/types/observable/internal/object/ObjectCacheKey.d.ts.map +1 -1
  419. package/build/types/observable/internal/object/ObjectCacheKeyRegistry.d.ts +60 -0
  420. package/build/types/observable/internal/object/ObjectCacheKeyRegistry.d.ts.map +1 -0
  421. package/build/types/observable/internal/object/ObjectCacheKeyRegistry.test.d.ts +1 -0
  422. package/build/types/observable/internal/object/ObjectCacheKeyRegistry.test.d.ts.map +1 -0
  423. package/build/types/observable/internal/object/ObjectQuery.d.ts +1 -1
  424. package/build/types/observable/internal/object/ObjectQuery.d.ts.map +1 -1
  425. package/build/types/observable/internal/object/ObjectsHelper.d.ts +15 -1
  426. package/build/types/observable/internal/object/ObjectsHelper.d.ts.map +1 -1
  427. package/build/types/observable/internal/objectMatchesWhereClause.d.ts.map +1 -1
  428. package/build/types/observable/internal/objectset/ObjectSetHelper.d.ts.map +1 -1
  429. package/build/types/observable/internal/objectset/ObjectSetQuery.d.ts +2 -1
  430. package/build/types/observable/internal/objectset/ObjectSetQuery.d.ts.map +1 -1
  431. package/build/types/observable/internal/objectset/ObjectSetQueryOptions.d.ts +1 -0
  432. package/build/types/observable/internal/objectset/ObjectSetQueryOptions.d.ts.map +1 -1
  433. package/build/types/observable/internal/testUtils.d.ts +1 -1
  434. package/build/types/observable/internal/testUtils.d.ts.map +1 -1
  435. package/build/types/observable/internal/types/ObjectUpdate.d.ts +11 -0
  436. package/build/types/observable/internal/types/ObjectUpdate.d.ts.map +1 -0
  437. package/build/types/observable/internal/utils/rdpFieldOperations.d.ts +5 -0
  438. package/build/types/observable/internal/utils/rdpFieldOperations.d.ts.map +1 -0
  439. package/build/types/public/internal-node.d.ts +2 -0
  440. package/build/types/public/internal-node.d.ts.map +1 -0
  441. package/build/types/public/unstable-do-not-use.d.ts +1 -1
  442. package/build/types/public/unstable-do-not-use.d.ts.map +1 -1
  443. package/build/types/queries/applyQuery.d.ts.map +1 -1
  444. package/internal-node.d.ts +17 -0
  445. package/package.json +21 -11
  446. package/build/cjs/chunk-BP7BR5FZ.cjs.map +0 -1
  447. package/build/cjs/chunk-DCEFUXFS.cjs.map +0 -1
  448. package/build/cjs/chunk-Q7SFCCGT.cjs +0 -11
  449. package/build/cjs/chunk-Q7SFCCGT.cjs.map +0 -1
  450. package/build/cjs/delay-QK4T7RVX.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["isOk","NULL_VALUE","PalantirApiError","ActionValidationError","createClient","createPlatformClient","createAttachmentUpload","extractDate","extractDateInLocalTime","extractDateInUTC","createObjectSpecifierFromPrimaryKey","extractPrimaryKeyFromObjectSpecifier"],"sources":["index.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\n/* eslint-disable @typescript-eslint/no-deprecated */\n\nexport { isOk, NULL_VALUE } from \"@osdk/api\";\nexport type {\n ActionDefinition,\n ActionEditResponse,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n Attachment,\n CompileTimeMetadata,\n InterfaceDefinition,\n InterfaceMetadata,\n Logger,\n ObjectMetadata,\n ObjectSet,\n ObjectSpecifier,\n ObjectTypeDefinition,\n Osdk,\n OsdkObject,\n OsdkObjectCreatePropertyType,\n OsdkObjectPropertyType,\n PageResult,\n PropertyDef,\n PropertyKeys,\n PropertyValueWireToClient,\n QueryDefinition,\n QueryParam,\n QueryResult,\n Range,\n Result,\n SingleLinkAccessor,\n ThreeDimensionalAggregation,\n TwoDimensionalAggregation,\n VersionBound,\n WhereClause,\n} from \"@osdk/api\";\nexport { PalantirApiError } from \"@osdk/shared.net.errors\";\n\nexport { ActionValidationError } from \"./actions/ActionValidationError.js\";\nexport type { Client } from \"./Client.js\";\nexport { createClient } from \"./createClient.js\";\nexport { createPlatformClient } from \"./createPlatformClient.js\";\nexport type { PlatformClient } from \"./createPlatformClient.js\";\nexport { createAttachmentUpload } from \"./object/AttachmentUpload.js\";\nexport type { ResultOrError } from \"./ResultOrError.js\";\n\nexport {\n extractDate,\n extractDateInLocalTime,\n extractDateInUTC,\n} from \"./util/datetimeConverters.js\";\n\nexport {\n createObjectSpecifierFromPrimaryKey,\n extractPrimaryKeyFromObjectSpecifier,\n} from \"./util/objectSpecifierUtils.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,SAASA,IAAI,EAAEC,UAAU,QAAQ,WAAW;AAsC5C,SAASC,gBAAgB,QAAQ,yBAAyB;AAE1D,SAASC,qBAAqB,QAAQ,oCAAoC;AAE1E,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE,SAASC,sBAAsB,QAAQ,8BAA8B;AAGrE,SACEC,WAAW,EACXC,sBAAsB,EACtBC,gBAAgB,QACX,8BAA8B;AAErC,SACEC,mCAAmC,EACnCC,oCAAoC,QAC/B,gCAAgC","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["isOk","NULL_VALUE","PalantirApiError","ActionValidationError","createClient","createPlatformClient","createAttachmentUpload","extractDate","extractDateInLocalTime","extractDateInUTC","createObjectSpecifierFromPrimaryKey","extractPrimaryKeyFromObjectSpecifier"],"sources":["index.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\n/* eslint-disable @typescript-eslint/no-deprecated */\n\nexport { isOk, NULL_VALUE } from \"@osdk/api\";\nexport type {\n ActionDefinition,\n ActionEditResponse,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n Attachment,\n CompileTimeMetadata,\n DerivedProperty,\n InterfaceDefinition,\n InterfaceMetadata,\n Logger,\n MediaReference,\n MediaUpload,\n ObjectMetadata,\n ObjectSet,\n ObjectSpecifier,\n ObjectTypeDefinition,\n Osdk,\n OsdkObject,\n OsdkObjectCreatePropertyType,\n OsdkObjectPropertyType,\n PageResult,\n PropertyDef,\n PropertyKeys,\n PropertyValueWireToClient,\n QueryDefinition,\n QueryParam,\n QueryResult,\n Range,\n Result,\n SingleLinkAccessor,\n ThreeDimensionalAggregation,\n TwoDimensionalAggregation,\n VersionBound,\n WhereClause,\n} from \"@osdk/api\";\nexport { PalantirApiError } from \"@osdk/shared.net.errors\";\n\nexport { ActionValidationError } from \"./actions/ActionValidationError.js\";\nexport type { Client } from \"./Client.js\";\nexport { createClient } from \"./createClient.js\";\nexport { createPlatformClient } from \"./createPlatformClient.js\";\nexport type { PlatformClient } from \"./createPlatformClient.js\";\nexport { createAttachmentUpload } from \"./object/AttachmentUpload.js\";\nexport type { ResultOrError } from \"./ResultOrError.js\";\n\nexport {\n extractDate,\n extractDateInLocalTime,\n extractDateInUTC,\n} from \"./util/datetimeConverters.js\";\n\nexport {\n createObjectSpecifierFromPrimaryKey,\n extractPrimaryKeyFromObjectSpecifier,\n} from \"./util/objectSpecifierUtils.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,SAASA,IAAI,EAAEC,UAAU,QAAQ,WAAW;AAyC5C,SAASC,gBAAgB,QAAQ,yBAAyB;AAE1D,SAASC,qBAAqB,QAAQ,oCAAoC;AAE1E,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE,SAASC,sBAAsB,QAAQ,8BAA8B;AAGrE,SACEC,WAAW,EACXC,sBAAsB,EACtBC,gBAAgB,QACX,8BAA8B;AAErC,SACEC,mCAAmC,EACnCC,oCAAoC,QAC/B,gCAAgC","ignoreList":[]}
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ export function extractNamespace(fqApiName) {
18
+ const last = fqApiName.lastIndexOf(".");
19
+ if (last === -1) return [undefined, fqApiName];
20
+ return [fqApiName.slice(0, last), fqApiName.slice(last + 1)];
21
+ }
22
+ //# sourceMappingURL=extractNamespace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extractNamespace.js","names":["extractNamespace","fqApiName","last","lastIndexOf","undefined","slice"],"sources":["extractNamespace.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\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"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASA,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","ignoreList":[]}
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { extractNamespace } from "./extractNamespace.js";
18
+ export function fullyQualifyPropName(fieldName, objectOrInterface) {
19
+ if (objectOrInterface.type === "interface") {
20
+ const [objApiNamespace] = extractNamespace(objectOrInterface.apiName);
21
+ const [fieldApiNamespace, fieldShortName] = extractNamespace(fieldName);
22
+ return fieldApiNamespace == null && objApiNamespace != null ? `${objApiNamespace}.${fieldShortName}` : fieldName;
23
+ }
24
+ return fieldName;
25
+ }
26
+ //# sourceMappingURL=fullyQualifyPropName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fullyQualifyPropName.js","names":["extractNamespace","fullyQualifyPropName","fieldName","objectOrInterface","type","objApiNamespace","apiName","fieldApiNamespace","fieldShortName"],"sources":["fullyQualifyPropName.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ObjectOrInterfaceDefinition } from \"@osdk/api\";\nimport { extractNamespace } from \"./extractNamespace.js\";\n\nexport function fullyQualifyPropName(\n fieldName: string,\n objectOrInterface: ObjectOrInterfaceDefinition,\n): string {\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;;AAGA,SAASA,gBAAgB,QAAQ,uBAAuB;AAExD,OAAO,SAASC,oBAAoBA,CAClCC,SAAiB,EACjBC,iBAA8C,EACtC;EACR,IAAIA,iBAAiB,CAACC,IAAI,KAAK,WAAW,EAAE;IAC1C,MAAM,CAACC,eAAe,CAAC,GAAGL,gBAAgB,CAACG,iBAAiB,CAACG,OAAO,CAAC;IACrE,MAAM,CAACC,iBAAiB,EAAEC,cAAc,CAAC,GAAGR,gBAAgB,CAACE,SAAS,CAAC;IACvE,OAAQK,iBAAiB,IAAI,IAAI,IAAIF,eAAe,IAAI,IAAI,GACxD,GAAGA,eAAe,IAAIG,cAAc,EAAE,GACtCN,SAAS;EACf;EACA,OAAOA,SAAS;AAClB","ignoreList":[]}
@@ -0,0 +1,41 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ export function makeGeoFilterBbox(bbox, filterType, propertyIdentifier, field) {
18
+ return {
19
+ type: filterType === "$within" ? "withinBoundingBox" : "intersectsBoundingBox",
20
+ /**
21
+ * This is a bit ugly, but did this so that propertyIdentifier only shows up in the return object if its defined,
22
+ * 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.
23
+ * Once we solidify that this is the way forward, I can remove field and clean this up
24
+ */
25
+ ...(propertyIdentifier != null && {
26
+ propertyIdentifier
27
+ }),
28
+ field,
29
+ value: {
30
+ topLeft: {
31
+ type: "Point",
32
+ coordinates: [bbox[0], bbox[3]]
33
+ },
34
+ bottomRight: {
35
+ type: "Point",
36
+ coordinates: [bbox[2], bbox[1]]
37
+ }
38
+ }
39
+ };
40
+ }
41
+ //# sourceMappingURL=makeGeoFilterBbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"makeGeoFilterBbox.js","names":["makeGeoFilterBbox","bbox","filterType","propertyIdentifier","field","type","value","topLeft","coordinates","bottomRight"],"sources":["makeGeoFilterBbox.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n PropertyIdentifier,\n SearchJsonQueryV2,\n} from \"@osdk/foundry.ontologies\";\nimport type { BBox } from \"geojson\";\n\nexport function 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"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,OAAO,SAASA,iBAAiBA,CAC/BC,IAAU,EACVC,UAAqC,EACrCC,kBAAuC,EACvCC,KAAc,EACK;EACnB,OAAO;IACLC,IAAI,EAAEH,UAAU,KAAK,SAAS,GAC1B,mBAAmB,GACnB,uBAAuB;IAC3B;AACJ;AACA;AACA;AACA;IACI,IAAIC,kBAAkB,IAAI,IAAI,IAAI;MAAEA;IAAmB,CAAC,CAAC;IACzDC,KAAK;IACLE,KAAK,EAAE;MACLC,OAAO,EAAE;QACPF,IAAI,EAAE,OAAO;QACbG,WAAW,EAAE,CAACP,IAAI,CAAC,CAAC,CAAC,EAAEA,IAAI,CAAC,CAAC,CAAC;MAChC,CAAC;MACDQ,WAAW,EAAE;QACXJ,IAAI,EAAE,OAAO;QACbG,WAAW,EAAE,CAACP,IAAI,CAAC,CAAC,CAAC,EAAEA,IAAI,CAAC,CAAC,CAAC;MAChC;IACF;EACF,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,29 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { makeGeoFilterBbox } from "./makeGeoFilterBbox.js";
18
+ import { makeGeoFilterPolygon } from "./makeGeoFilterPolygon.js";
19
+ export function makeGeoFilterIntersects(intersectsBody, propertyIdentifier, field) {
20
+ if (Array.isArray(intersectsBody)) {
21
+ return makeGeoFilterBbox(intersectsBody, "$intersects", propertyIdentifier, field);
22
+ } else if ("$bbox" in intersectsBody && intersectsBody.$bbox != null) {
23
+ return makeGeoFilterBbox(intersectsBody.$bbox, "$intersects", propertyIdentifier, field);
24
+ } else {
25
+ const coordinates = "$polygon" in intersectsBody ? intersectsBody.$polygon : intersectsBody.coordinates;
26
+ return makeGeoFilterPolygon(coordinates, "intersectsPolygon", propertyIdentifier, field);
27
+ }
28
+ }
29
+ //# sourceMappingURL=makeGeoFilterIntersects.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"makeGeoFilterIntersects.js","names":["makeGeoFilterBbox","makeGeoFilterPolygon","makeGeoFilterIntersects","intersectsBody","propertyIdentifier","field","Array","isArray","$bbox","coordinates","$polygon"],"sources":["makeGeoFilterIntersects.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { GeoFilterOptions } from \"@osdk/api\";\nimport type {\n PropertyIdentifier,\n SearchJsonQueryV2,\n} from \"@osdk/foundry.ontologies\";\nimport { makeGeoFilterBbox } from \"./makeGeoFilterBbox.js\";\nimport { makeGeoFilterPolygon } from \"./makeGeoFilterPolygon.js\";\n\nexport function makeGeoFilterIntersects(\n intersectsBody: GeoFilterOptions[\"$intersects\"],\n propertyIdentifier?: PropertyIdentifier,\n field?: string,\n): SearchJsonQueryV2 {\n if (Array.isArray(intersectsBody)) {\n return makeGeoFilterBbox(\n intersectsBody,\n \"$intersects\",\n propertyIdentifier,\n field,\n );\n } else if (\"$bbox\" in intersectsBody && intersectsBody.$bbox != null) {\n return makeGeoFilterBbox(\n intersectsBody.$bbox,\n \"$intersects\",\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"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,SAASA,iBAAiB,QAAQ,wBAAwB;AAC1D,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE,OAAO,SAASC,uBAAuBA,CACrCC,cAA+C,EAC/CC,kBAAuC,EACvCC,KAAc,EACK;EACnB,IAAIC,KAAK,CAACC,OAAO,CAACJ,cAAc,CAAC,EAAE;IACjC,OAAOH,iBAAiB,CACtBG,cAAc,EACd,aAAa,EACbC,kBAAkB,EAClBC,KACF,CAAC;EACH,CAAC,MAAM,IAAI,OAAO,IAAIF,cAAc,IAAIA,cAAc,CAACK,KAAK,IAAI,IAAI,EAAE;IACpE,OAAOR,iBAAiB,CACtBG,cAAc,CAACK,KAAK,EACpB,aAAa,EACbJ,kBAAkB,EAClBC,KACF,CAAC;EACH,CAAC,MAAM;IACL,MAAMI,WAAW,GAAI,UAAU,IAAIN,cAAc,GAC7CA,cAAc,CAACO,QAAQ,GACvBP,cAAc,CAACM,WAAW;IAC9B,OAAOR,oBAAoB,CACzBQ,WAAW,EACX,mBAAmB,EACnBL,kBAAkB,EAClBC,KACF,CAAC;EACH;AACF","ignoreList":[]}
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ export function makeGeoFilterPolygon(coordinates, filterType, propertyIdentifier, field) {
18
+ return {
19
+ type: filterType,
20
+ ...(propertyIdentifier != null && {
21
+ propertyIdentifier
22
+ }),
23
+ field,
24
+ value: {
25
+ type: "Polygon",
26
+ coordinates
27
+ }
28
+ };
29
+ }
30
+ //# sourceMappingURL=makeGeoFilterPolygon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"makeGeoFilterPolygon.js","names":["makeGeoFilterPolygon","coordinates","filterType","propertyIdentifier","field","type","value"],"sources":["makeGeoFilterPolygon.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n PropertyIdentifier,\n SearchJsonQueryV2,\n} from \"@osdk/foundry.ontologies\";\nimport type { Position } from \"geojson\";\n\nexport function 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"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,OAAO,SAASA,oBAAoBA,CAClCC,WAAyB,EACzBC,UAAiD,EACjDC,kBAAuC,EACvCC,KAAc,EACK;EACnB,OAAO;IACLC,IAAI,EAAEH,UAAU;IAChB,IAAIC,kBAAkB,IAAI,IAAI,IAAI;MAAEA;IAAmB,CAAC,CAAC;IACzDC,KAAK;IACLE,KAAK,EAAE;MACLD,IAAI,EAAE,SAAS;MACfJ;IACF;EACF,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,48 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { DistanceUnitMapping } from "@osdk/api";
18
+ import { makeGeoFilterBbox } from "./makeGeoFilterBbox.js";
19
+ import { makeGeoFilterPolygon } from "./makeGeoFilterPolygon.js";
20
+ export function makeGeoFilterWithin(withinBody, propertyIdentifier, field) {
21
+ if (Array.isArray(withinBody)) {
22
+ return makeGeoFilterBbox(withinBody, "$within", propertyIdentifier, field);
23
+ } else if ("$bbox" in withinBody && withinBody.$bbox != null) {
24
+ return makeGeoFilterBbox(withinBody.$bbox, "$within", propertyIdentifier, field);
25
+ } else if ("$distance" in withinBody && "$of" in withinBody && withinBody.$distance != null && withinBody.$of != null) {
26
+ return {
27
+ type: "withinDistanceOf",
28
+ ...(propertyIdentifier != null && {
29
+ propertyIdentifier
30
+ }),
31
+ field,
32
+ value: {
33
+ center: Array.isArray(withinBody.$of) ? {
34
+ type: "Point",
35
+ coordinates: withinBody.$of
36
+ } : withinBody.$of,
37
+ distance: {
38
+ value: withinBody.$distance[0],
39
+ unit: DistanceUnitMapping[withinBody.$distance[1]]
40
+ }
41
+ }
42
+ };
43
+ } else {
44
+ const coordinates = "$polygon" in withinBody ? withinBody.$polygon : withinBody.coordinates;
45
+ return makeGeoFilterPolygon(coordinates, "withinPolygon", propertyIdentifier, field);
46
+ }
47
+ }
48
+ //# sourceMappingURL=makeGeoFilterWithin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"makeGeoFilterWithin.js","names":["DistanceUnitMapping","makeGeoFilterBbox","makeGeoFilterPolygon","makeGeoFilterWithin","withinBody","propertyIdentifier","field","Array","isArray","$bbox","$distance","$of","type","value","center","coordinates","distance","unit","$polygon"],"sources":["makeGeoFilterWithin.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { GeoFilterOptions } from \"@osdk/api\";\nimport { DistanceUnitMapping } from \"@osdk/api\";\nimport type {\n PropertyIdentifier,\n SearchJsonQueryV2,\n} from \"@osdk/foundry.ontologies\";\nimport { makeGeoFilterBbox } from \"./makeGeoFilterBbox.js\";\nimport { makeGeoFilterPolygon } from \"./makeGeoFilterPolygon.js\";\n\nexport function makeGeoFilterWithin(\n withinBody: GeoFilterOptions[\"$within\"],\n propertyIdentifier?: PropertyIdentifier,\n field?: string,\n): SearchJsonQueryV2 {\n if (Array.isArray(withinBody)) {\n return makeGeoFilterBbox(withinBody, \"$within\", propertyIdentifier, field);\n } else if (\"$bbox\" in withinBody && withinBody.$bbox != null) {\n return makeGeoFilterBbox(\n withinBody.$bbox,\n \"$within\",\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 field,\n );\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,mBAAmB,QAAQ,WAAW;AAK/C,SAASC,iBAAiB,QAAQ,wBAAwB;AAC1D,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE,OAAO,SAASC,mBAAmBA,CACjCC,UAAuC,EACvCC,kBAAuC,EACvCC,KAAc,EACK;EACnB,IAAIC,KAAK,CAACC,OAAO,CAACJ,UAAU,CAAC,EAAE;IAC7B,OAAOH,iBAAiB,CAACG,UAAU,EAAE,SAAS,EAAEC,kBAAkB,EAAEC,KAAK,CAAC;EAC5E,CAAC,MAAM,IAAI,OAAO,IAAIF,UAAU,IAAIA,UAAU,CAACK,KAAK,IAAI,IAAI,EAAE;IAC5D,OAAOR,iBAAiB,CACtBG,UAAU,CAACK,KAAK,EAChB,SAAS,EACTJ,kBAAkB,EAClBC,KACF,CAAC;EACH,CAAC,MAAM,IACJ,WAAW,IAAIF,UAAU,IAAI,KAAK,IAAIA,UAAU,IAC9CA,UAAU,CAACM,SAAS,IAAI,IAAI,IAC5BN,UAAU,CAACO,GAAG,IAAI,IAAI,EACzB;IACA,OAAO;MACLC,IAAI,EAAE,kBAAkB;MACxB,IAAIP,kBAAkB,IAAI,IAAI,IAAI;QAAEA;MAAmB,CAAC,CAAC;MACzDC,KAAK;MACLO,KAAK,EAAE;QACLC,MAAM,EAAEP,KAAK,CAACC,OAAO,CAACJ,UAAU,CAACO,GAAG,CAAC,GACjC;UACAC,IAAI,EAAE,OAAO;UACbG,WAAW,EAAEX,UAAU,CAACO;QAC1B,CAAC,GACCP,UAAU,CAACO,GAAG;QAClBK,QAAQ,EAAE;UACRH,KAAK,EAAET,UAAU,CAACM,SAAS,CAAC,CAAC,CAAC;UAC9BO,IAAI,EAAEjB,mBAAmB,CAACI,UAAU,CAACM,SAAS,CAAC,CAAC,CAAC;QACnD;MACF;IACF,CAAC;EACH,CAAC,MAAM;IACL,MAAMK,WAAW,GAAI,UAAU,IAAIX,UAAU,GACzCA,UAAU,CAACc,QAAQ,GACnBd,UAAU,CAACW,WAAW;IAC1B,OAAOb,oBAAoB,CACzBa,WAAW,EACX,eAAe,EACfV,kBAAkB,EAClBC,KACF,CAAC;EACH;AACF","ignoreList":[]}
@@ -14,86 +14,69 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { DistanceUnitMapping } from "@osdk/api";
18
17
  import invariant from "tiny-invariant";
19
- export function extractNamespace(fqApiName) {
20
- const last = fqApiName.lastIndexOf(".");
21
- if (last === -1) return [undefined, fqApiName];
22
- return [fqApiName.slice(0, last), fqApiName.slice(last + 1)];
18
+ import { fullyQualifyPropName } from "./fullyQualifyPropName.js";
19
+ import { makeGeoFilterIntersects } from "./makeGeoFilterIntersects.js";
20
+ import { makeGeoFilterWithin } from "./makeGeoFilterWithin.js";
21
+ function isAndClause(whereClause) {
22
+ return "$and" in whereClause && whereClause.$and !== undefined;
23
+ }
24
+ function isOrClause(whereClause) {
25
+ return "$or" in whereClause && whereClause.$or !== undefined;
26
+ }
27
+ function isNotClause(whereClause) {
28
+ return "$not" in whereClause && whereClause.$not !== undefined;
29
+ }
30
+
31
+ /** @internal */
32
+ export function modernToLegacyWhereClause(whereClause, objectOrInterface, rdpNames) {
33
+ const parts = Object.entries(whereClause).map(([key, value]) => ({
34
+ [key]: value
35
+ }));
36
+ if (parts.length === 1) {
37
+ return modernToLegacyWhereClauseInner(whereClause, objectOrInterface, rdpNames);
38
+ }
39
+ return {
40
+ type: "and",
41
+ value: parts.map(v => modernToLegacyWhereClauseInner(v, objectOrInterface, rdpNames))
42
+ };
23
43
  }
24
44
 
25
45
  /** @internal */
26
- export function modernToLegacyWhereClause(whereClause, objectOrInterface) {
27
- if ("$and" in whereClause) {
46
+ export function modernToLegacyWhereClauseInner(whereClause, objectOrInterface, rdpNames) {
47
+ const parts = Object.entries(whereClause);
48
+ !(parts.length === 1) ? process.env.NODE_ENV !== "production" ? invariant(false, "Invalid where clause provided.") : invariant(false) : void 0;
49
+ if (isAndClause(whereClause)) {
28
50
  return {
29
51
  type: "and",
30
- value: whereClause.$and.map(clause => modernToLegacyWhereClause(clause, objectOrInterface))
52
+ value: whereClause.$and.map(clause => modernToLegacyWhereClause(clause, objectOrInterface, rdpNames))
31
53
  };
32
- } else if ("$or" in whereClause) {
54
+ } else if (isOrClause(whereClause)) {
33
55
  return {
34
56
  type: "or",
35
- value: whereClause.$or.map(clause => modernToLegacyWhereClause(clause, objectOrInterface))
57
+ value: whereClause.$or.map(clause => modernToLegacyWhereClause(clause, objectOrInterface, rdpNames))
36
58
  };
37
- } else if ("$not" in whereClause) {
59
+ } else if (isNotClause(whereClause)) {
38
60
  return {
39
61
  type: "not",
40
- value: modernToLegacyWhereClause(whereClause.$not, objectOrInterface)
62
+ value: modernToLegacyWhereClause(whereClause.$not, objectOrInterface, rdpNames)
41
63
  };
42
64
  }
43
- const parts = Object.entries(whereClause);
44
- if (parts.length === 1) {
45
- return handleWherePair(parts[0], objectOrInterface);
46
- }
47
- return {
48
- type: "and",
49
- value: parts.map(v => handleWherePair(v, objectOrInterface))
50
- };
51
- }
52
- function makeGeoFilterBbox(bbox, filterType, propertyIdentifier, field) {
53
- return {
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
- }),
63
- field,
64
- value: {
65
- topLeft: {
66
- type: "Point",
67
- coordinates: [bbox[0], bbox[3]]
68
- },
69
- bottomRight: {
70
- type: "Point",
71
- coordinates: [bbox[2], bbox[1]]
72
- }
73
- }
74
- };
75
- }
76
- function makeGeoFilterPolygon(coordinates, filterType, propertyIdentifier, field) {
77
- return {
78
- type: filterType,
79
- ...(propertyIdentifier != null && {
80
- propertyIdentifier
81
- }),
82
- field,
83
- value: {
84
- type: "Polygon",
85
- coordinates
86
- }
87
- };
65
+ return handleWherePair(parts[0], objectOrInterface, undefined, rdpNames);
88
66
  }
89
- function handleWherePair([fieldName, filter], objectOrInterface, structFieldSelector) {
67
+ function handleWherePair([fieldName, filter], objectOrInterface, structFieldSelector, rdpNames) {
90
68
  !(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 ? {
69
+ const isRdp = !structFieldSelector && rdpNames?.has(fieldName);
70
+ const propertyIdentifier = isRdp ? {
71
+ type: "property",
72
+ apiName: fieldName
73
+ } : structFieldSelector != null ? {
92
74
  type: "structField",
93
75
  ...structFieldSelector,
94
76
  propertyApiName: fullyQualifyPropName(structFieldSelector.propertyApiName, objectOrInterface)
95
77
  } : undefined;
96
- const field = structFieldSelector == null ? fullyQualifyPropName(fieldName, objectOrInterface) : undefined;
78
+ const field = !isRdp && structFieldSelector == null ? fullyQualifyPropName(fieldName, objectOrInterface) : undefined;
79
+ !(field == null || propertyIdentifier == null && (field != null || isRdp != null)) ? process.env.NODE_ENV !== "production" ? invariant(false, "Encountered error constructing where clause: field and propertyIdentifier cannot both be defined") : invariant(false) : void 0;
97
80
  if (typeof filter === "string" || typeof filter === "number" || typeof filter === "boolean") {
98
81
  return {
99
82
  type: "eq",
@@ -110,6 +93,8 @@ function handleWherePair([fieldName, filter], objectOrInterface, structFieldSele
110
93
  // e.g. `where({ name: { $eq: "foo", $ne: "bar" } })` is invalid currently
111
94
  const hasDollarSign = keysOfFilter.some(key => key.startsWith("$"));
112
95
  !(!hasDollarSign || keysOfFilter.length === 1) ? process.env.NODE_ENV !== "production" ? invariant(false, "A WhereClause Filter with multiple clauses/fields is not allowed. Instead, use an 'or'/'and' clause to combine multiple filters.") : invariant(false) : void 0;
96
+
97
+ // Struct
113
98
  if (!hasDollarSign) {
114
99
  const structFilter = Object.entries(filter);
115
100
  !(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;
@@ -117,10 +102,21 @@ function handleWherePair([fieldName, filter], objectOrInterface, structFieldSele
117
102
  return handleWherePair(Object.entries(filter)[0], objectOrInterface, {
118
103
  propertyApiName: fieldName,
119
104
  structFieldApiName
120
- });
105
+ }, rdpNames);
121
106
  }
122
107
  const firstKey = keysOfFilter[0];
123
108
  !(filter[firstKey] != null) ? process.env.NODE_ENV !== "production" ? invariant(false) : invariant(false) : void 0;
109
+
110
+ // Struct array
111
+ if (firstKey === "$contains" && filter[firstKey] instanceof Object) {
112
+ const structFilter = Object.entries(filter[firstKey]);
113
+ !(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;
114
+ const structFieldApiName = structFilter[0][0];
115
+ return handleWherePair(structFilter[0], objectOrInterface, {
116
+ propertyApiName: fieldName,
117
+ structFieldApiName
118
+ });
119
+ }
124
120
  if (firstKey === "$ne") {
125
121
  return {
126
122
  type: "not",
@@ -135,44 +131,10 @@ function handleWherePair([fieldName, filter], objectOrInterface, structFieldSele
135
131
  };
136
132
  }
137
133
  if (firstKey === "$within") {
138
- const withinBody = filter[firstKey];
139
- if (Array.isArray(withinBody)) {
140
- return makeGeoFilterBbox(withinBody, firstKey, propertyIdentifier, field);
141
- } else if ("$bbox" in withinBody && withinBody.$bbox != null) {
142
- return makeGeoFilterBbox(withinBody.$bbox, firstKey, propertyIdentifier, field);
143
- } else if ("$distance" in withinBody && "$of" in withinBody && withinBody.$distance != null && withinBody.$of != null) {
144
- return {
145
- type: "withinDistanceOf",
146
- ...(propertyIdentifier != null && {
147
- propertyIdentifier
148
- }),
149
- field,
150
- value: {
151
- center: Array.isArray(withinBody.$of) ? {
152
- type: "Point",
153
- coordinates: withinBody.$of
154
- } : withinBody.$of,
155
- distance: {
156
- value: withinBody.$distance[0],
157
- unit: DistanceUnitMapping[withinBody.$distance[1]]
158
- }
159
- }
160
- };
161
- } else {
162
- const coordinates = "$polygon" in withinBody ? withinBody.$polygon : withinBody.coordinates;
163
- return makeGeoFilterPolygon(coordinates, "withinPolygon", propertyIdentifier, fieldName);
164
- }
134
+ return makeGeoFilterWithin(filter[firstKey], propertyIdentifier, field);
165
135
  }
166
136
  if (firstKey === "$intersects") {
167
- const intersectsBody = filter[firstKey];
168
- if (Array.isArray(intersectsBody)) {
169
- return makeGeoFilterBbox(intersectsBody, firstKey, propertyIdentifier, field);
170
- } else if ("$bbox" in intersectsBody && intersectsBody.$bbox != null) {
171
- return makeGeoFilterBbox(intersectsBody.$bbox, firstKey, propertyIdentifier, field);
172
- } else {
173
- const coordinates = "$polygon" in intersectsBody ? intersectsBody.$polygon : intersectsBody.coordinates;
174
- return makeGeoFilterPolygon(coordinates, "intersectsPolygon", propertyIdentifier, field);
175
- }
137
+ return makeGeoFilterIntersects(filter[firstKey], propertyIdentifier, field);
176
138
  }
177
139
  if (firstKey === "$containsAllTerms" || firstKey === "$containsAnyTerm") {
178
140
  return {
@@ -194,12 +156,4 @@ function handleWherePair([fieldName, filter], objectOrInterface, structFieldSele
194
156
  value: filter[firstKey]
195
157
  };
196
158
  }
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
- }
205
159
  //# 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","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 \"A WhereClause Filter with multiple clauses/fields is not allowed. Instead, use an 'or'/'and' clause to combine multiple filters.\",\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/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,oBAAoBA,CAC3BP,SAAiB,EACjBvB,iBAA8C,EAC9C;EACA,IAAIA,iBAAiB,CAACC,IAAI,KAAK,WAAW,EAAE;IAC1C,MAAM,CAACoD,eAAe,CAAC,GAAG7D,gBAAgB,CAACQ,iBAAiB,CAACsD,OAAO,CAAC;IACrE,MAAM,CAACC,iBAAiB,EAAEC,cAAc,CAAC,GAAGhE,gBAAgB,CAAC+B,SAAS,CAAC;IACvE,OAAQgC,iBAAiB,IAAI,IAAI,IAAIF,eAAe,IAAI,IAAI,GACxD,GAAGA,eAAe,IAAIG,cAAc,EAAE,GACtCjC,SAAS;EACf;EACA,OAAOA,SAAS;AAClB","ignoreList":[]}
1
+ {"version":3,"file":"modernToLegacyWhereClause.js","names":["invariant","fullyQualifyPropName","makeGeoFilterIntersects","makeGeoFilterWithin","isAndClause","whereClause","$and","undefined","isOrClause","$or","isNotClause","$not","modernToLegacyWhereClause","objectOrInterface","rdpNames","parts","Object","entries","map","key","value","length","modernToLegacyWhereClauseInner","type","v","process","env","NODE_ENV","clause","handleWherePair","fieldName","filter","structFieldSelector","isRdp","has","propertyIdentifier","apiName","propertyApiName","field","keysOfFilter","keys","hasDollarSign","some","startsWith","structFilter","structFieldApiName","firstKey","substring","fuzzy"],"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 AndWhereClause,\n NotWhereClause,\n ObjectOrInterfaceDefinition,\n OrWhereClause,\n PossibleWhereClauseFilters,\n SimplePropertyDef,\n WhereClause,\n} from \"@osdk/api\";\n\nimport type {\n PropertyIdentifier,\n SearchJsonQueryV2,\n} from \"@osdk/foundry.ontologies\";\nimport invariant from \"tiny-invariant\";\nimport { fullyQualifyPropName } from \"./fullyQualifyPropName.js\";\nimport { makeGeoFilterIntersects } from \"./makeGeoFilterIntersects.js\";\nimport { makeGeoFilterWithin } from \"./makeGeoFilterWithin.js\";\n\ntype DropDollarSign<T extends `$${string}`> = T extends `$${infer U}` ? U\n : never;\n\nfunction isAndClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n>(\n whereClause: WhereClause<T, RDPs>,\n): whereClause is AndWhereClause<T, RDPs> {\n return \"$and\" in whereClause && whereClause.$and !== undefined;\n}\n\nfunction isOrClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n>(\n whereClause: WhereClause<T, RDPs>,\n): whereClause is OrWhereClause<T, RDPs> {\n return \"$or\" in whereClause && whereClause.$or !== undefined;\n}\n\nfunction isNotClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n>(\n whereClause: WhereClause<T, RDPs>,\n): whereClause is NotWhereClause<T, RDPs> {\n return \"$not\" in whereClause && whereClause.$not !== undefined;\n}\n\n/** @internal */\nexport function modernToLegacyWhereClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n>(\n whereClause: WhereClause<T, RDPs>,\n objectOrInterface: T,\n rdpNames?: Set<string>,\n): SearchJsonQueryV2 {\n const parts = Object.entries(whereClause).map(([key, value]) => ({\n [key]: value,\n })) as WhereClause<T, RDPs>[];\n if (parts.length === 1) {\n return modernToLegacyWhereClauseInner(\n whereClause,\n objectOrInterface,\n rdpNames,\n );\n }\n return {\n type: \"and\",\n value: parts.map<SearchJsonQueryV2>(\n v => modernToLegacyWhereClauseInner(v, objectOrInterface, rdpNames),\n ),\n };\n}\n\n/** @internal */\nexport function modernToLegacyWhereClauseInner<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n>(\n whereClause: WhereClause<T, RDPs>,\n objectOrInterface: T,\n rdpNames?: Set<string>,\n): SearchJsonQueryV2 {\n const parts = Object.entries(whereClause);\n\n invariant(parts.length === 1, \"Invalid where clause provided.\");\n\n if (isAndClause(whereClause)) {\n return {\n type: \"and\",\n value: (whereClause.$and as WhereClause<T, RDPs>[]).map(\n (clause) =>\n modernToLegacyWhereClause(clause, objectOrInterface, rdpNames),\n ),\n };\n } else if (isOrClause(whereClause)) {\n return {\n type: \"or\",\n value: (whereClause.$or as WhereClause<T, RDPs>[]).map(\n (clause) =>\n modernToLegacyWhereClause(clause, objectOrInterface, rdpNames),\n ),\n };\n } else if (isNotClause(whereClause)) {\n return {\n type: \"not\",\n value: modernToLegacyWhereClause(\n whereClause.$not as WhereClause<T, RDPs>,\n objectOrInterface,\n rdpNames,\n ),\n };\n }\n\n return handleWherePair(parts[0], objectOrInterface, undefined, rdpNames);\n}\n\nfunction handleWherePair(\n [fieldName, filter]: [string, any],\n objectOrInterface: ObjectOrInterfaceDefinition,\n structFieldSelector?: { propertyApiName: string; structFieldApiName: string },\n rdpNames?: Set<string>,\n): SearchJsonQueryV2 {\n invariant(\n filter != null,\n \"Defined key values are only allowed when they are not undefined.\",\n );\n\n const isRdp = !structFieldSelector && rdpNames?.has(fieldName);\n\n const propertyIdentifier: PropertyIdentifier | undefined = isRdp\n ? {\n type: \"property\",\n apiName: fieldName,\n }\n : structFieldSelector != null\n ? {\n type: \"structField\",\n ...structFieldSelector,\n propertyApiName: fullyQualifyPropName(\n structFieldSelector.propertyApiName,\n objectOrInterface,\n ),\n }\n : undefined;\n\n const field = !isRdp && structFieldSelector == null\n ? fullyQualifyPropName(fieldName, objectOrInterface)\n : undefined;\n\n invariant(\n field == null\n || propertyIdentifier == null && (field != null || isRdp != null),\n \"Encountered error constructing where clause: field and propertyIdentifier cannot both be defined\",\n );\n\n if (\n typeof filter === \"string\" || typeof filter === \"number\"\n || typeof filter === \"boolean\"\n ) {\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 \"A WhereClause Filter with multiple clauses/fields is not allowed. Instead, use an 'or'/'and' clause to combine multiple filters.\",\n );\n\n // Struct\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 }, rdpNames);\n }\n\n const firstKey = keysOfFilter[0] as PossibleWhereClauseFilters;\n invariant(filter[firstKey] != null);\n\n // Struct array\n if (firstKey === \"$contains\" && filter[firstKey] instanceof Object) {\n const structFilter: [string, any][] = Object.entries(filter[firstKey]);\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 = structFilter[0][0];\n\n return handleWherePair(structFilter[0], objectOrInterface, {\n propertyApiName: fieldName,\n structFieldApiName,\n });\n }\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 return makeGeoFilterWithin(filter[firstKey], propertyIdentifier, field);\n }\n if (firstKey === \"$intersects\") {\n return makeGeoFilterIntersects(filter[firstKey], propertyIdentifier, field);\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"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA,OAAOA,SAAS,MAAM,gBAAgB;AACtC,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,uBAAuB,QAAQ,8BAA8B;AACtE,SAASC,mBAAmB,QAAQ,0BAA0B;AAK9D,SAASC,WAAWA,CAIlBC,WAAiC,EACO;EACxC,OAAO,MAAM,IAAIA,WAAW,IAAIA,WAAW,CAACC,IAAI,KAAKC,SAAS;AAChE;AAEA,SAASC,UAAUA,CAIjBH,WAAiC,EACM;EACvC,OAAO,KAAK,IAAIA,WAAW,IAAIA,WAAW,CAACI,GAAG,KAAKF,SAAS;AAC9D;AAEA,SAASG,WAAWA,CAIlBL,WAAiC,EACO;EACxC,OAAO,MAAM,IAAIA,WAAW,IAAIA,WAAW,CAACM,IAAI,KAAKJ,SAAS;AAChE;;AAEA;AACA,OAAO,SAASK,yBAAyBA,CAIvCP,WAAiC,EACjCQ,iBAAoB,EACpBC,QAAsB,EACH;EACnB,MAAMC,KAAK,GAAGC,MAAM,CAACC,OAAO,CAACZ,WAAW,CAAC,CAACa,GAAG,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,MAAM;IAC/D,CAACD,GAAG,GAAGC;EACT,CAAC,CAAC,CAA2B;EAC7B,IAAIL,KAAK,CAACM,MAAM,KAAK,CAAC,EAAE;IACtB,OAAOC,8BAA8B,CACnCjB,WAAW,EACXQ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