@osdk/client 2.5.2 → 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 (488) hide show
  1. package/CHANGELOG.md +118 -73
  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/actions/applyAction.js +4 -0
  6. package/build/browser/actions/applyAction.js.map +1 -1
  7. package/build/browser/createClient.js +2 -1
  8. package/build/browser/createClient.js.map +1 -1
  9. package/build/browser/createClient.test.js +19 -1
  10. package/build/browser/createClient.test.js.map +1 -1
  11. package/build/browser/createMinimalClient.js +4 -2
  12. package/build/browser/createMinimalClient.js.map +1 -1
  13. package/build/browser/derivedProperties/createWithPropertiesObjectSet.js +19 -1
  14. package/build/browser/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
  15. package/build/browser/fetchMetadata.test.js +11 -0
  16. package/build/browser/fetchMetadata.test.js.map +1 -1
  17. package/build/browser/index.js +2 -2
  18. package/build/browser/index.js.map +1 -1
  19. package/build/browser/internal/conversions/extractNamespace.js +22 -0
  20. package/build/browser/internal/conversions/extractNamespace.js.map +1 -0
  21. package/build/browser/internal/conversions/fullyQualifyPropName.js +26 -0
  22. package/build/browser/internal/conversions/fullyQualifyPropName.js.map +1 -0
  23. package/build/browser/internal/conversions/makeGeoFilterBbox.js +41 -0
  24. package/build/browser/internal/conversions/makeGeoFilterBbox.js.map +1 -0
  25. package/build/browser/internal/conversions/makeGeoFilterIntersects.js +29 -0
  26. package/build/browser/internal/conversions/makeGeoFilterIntersects.js.map +1 -0
  27. package/build/browser/internal/conversions/makeGeoFilterPolygon.js +30 -0
  28. package/build/browser/internal/conversions/makeGeoFilterPolygon.js.map +1 -0
  29. package/build/browser/internal/conversions/makeGeoFilterWithin.js +48 -0
  30. package/build/browser/internal/conversions/makeGeoFilterWithin.js.map +1 -0
  31. package/build/browser/internal/conversions/modernToLegacyWhereClause.js +59 -105
  32. package/build/browser/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
  33. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js +309 -0
  34. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -1
  35. package/build/browser/object/aggregate.js +3 -0
  36. package/build/browser/object/aggregate.js.map +1 -1
  37. package/build/browser/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -1
  38. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -1
  39. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js +5 -1
  40. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  41. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js +10 -0
  42. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  43. package/build/browser/object/convertWireToOsdkObjects.test.js +12 -0
  44. package/build/browser/object/convertWireToOsdkObjects.test.js.map +1 -1
  45. package/build/browser/object/fetchPage.js +13 -6
  46. package/build/browser/object/fetchPage.js.map +1 -1
  47. package/build/browser/object/formatting/applyPropertyFormatter.js +58 -0
  48. package/build/browser/object/formatting/applyPropertyFormatter.js.map +1 -0
  49. package/build/browser/object/formatting/applyPropertyFormatter.test.js +726 -0
  50. package/build/browser/object/formatting/applyPropertyFormatter.test.js.map +1 -0
  51. package/build/browser/object/formatting/formatBoolean.js +23 -0
  52. package/build/browser/object/formatting/formatBoolean.js.map +1 -0
  53. package/build/browser/object/formatting/formatDateTime.js +158 -0
  54. package/build/browser/object/formatting/formatDateTime.js.map +1 -0
  55. package/build/browser/object/formatting/formatNumber.js +242 -0
  56. package/build/browser/object/formatting/formatNumber.js.map +1 -0
  57. package/build/browser/object/formatting/propertyFormattingUtils.js +39 -0
  58. package/build/browser/object/formatting/propertyFormattingUtils.js.map +1 -0
  59. package/build/browser/object/mediaUpload.js +3 -0
  60. package/build/browser/object/mediaUpload.js.map +1 -1
  61. package/build/browser/objectSet/ObjectSetListenerWebsocket.js +17 -0
  62. package/build/browser/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
  63. package/build/browser/objectSet/createObjectSet.js +11 -0
  64. package/build/browser/objectSet/createObjectSet.js.map +1 -1
  65. package/build/browser/observable/ObservableClient.js.map +1 -1
  66. package/build/browser/observable/internal/BulkObjectLoader.js +12 -4
  67. package/build/browser/observable/internal/BulkObjectLoader.js.map +1 -1
  68. package/build/browser/observable/internal/BulkObjectLoader.test.js +48 -0
  69. package/build/browser/observable/internal/BulkObjectLoader.test.js.map +1 -1
  70. package/build/browser/observable/internal/CacheKeys.js +9 -3
  71. package/build/browser/observable/internal/CacheKeys.js.map +1 -1
  72. package/build/browser/observable/internal/Canonicalizer.js +51 -0
  73. package/build/browser/observable/internal/Canonicalizer.js.map +1 -0
  74. package/build/browser/observable/internal/Changes.js.map +1 -1
  75. package/build/browser/observable/internal/IntersectCanonicalizer.js +35 -0
  76. package/build/browser/observable/internal/IntersectCanonicalizer.js.map +1 -0
  77. package/build/browser/observable/internal/KnownCacheKey.js.map +1 -1
  78. package/build/browser/observable/internal/ObservableClientImpl.js +3 -0
  79. package/build/browser/observable/internal/ObservableClientImpl.js.map +1 -1
  80. package/build/browser/observable/internal/OrderByCanonicalizer.js +1 -4
  81. package/build/browser/observable/internal/OrderByCanonicalizer.js.map +1 -1
  82. package/build/browser/observable/internal/PivotCanonicalizer.js +33 -0
  83. package/build/browser/observable/internal/PivotCanonicalizer.js.map +1 -0
  84. package/build/browser/observable/internal/RdpCanonicalizer.js +66 -0
  85. package/build/browser/observable/internal/RdpCanonicalizer.js.map +1 -0
  86. package/build/browser/observable/internal/RdpCanonicalizer.test.js +68 -0
  87. package/build/browser/observable/internal/RdpCanonicalizer.test.js.map +1 -0
  88. package/build/browser/observable/internal/SimpleWhereClause.js.map +1 -1
  89. package/build/browser/observable/internal/Store.js +172 -6
  90. package/build/browser/observable/internal/Store.js.map +1 -1
  91. package/build/browser/observable/internal/WhereClauseCanonicalizer.js +1 -1
  92. package/build/browser/observable/internal/WhereClauseCanonicalizer.js.map +1 -1
  93. package/build/browser/observable/internal/actions/ActionApplication.js +1 -1
  94. package/build/browser/observable/internal/actions/ActionApplication.js.map +1 -1
  95. package/build/browser/observable/internal/actions/OptimisticJob.js +3 -3
  96. package/build/browser/observable/internal/actions/OptimisticJob.js.map +1 -1
  97. package/build/browser/observable/internal/aggregation/AggregationCacheKey.js +22 -0
  98. package/build/browser/observable/internal/aggregation/AggregationCacheKey.js.map +1 -0
  99. package/build/browser/observable/internal/aggregation/AggregationQuery.js +77 -0
  100. package/build/browser/observable/internal/aggregation/AggregationQuery.js.map +1 -0
  101. package/build/browser/observable/internal/aggregation/AggregationsHelper.js +54 -0
  102. package/build/browser/observable/internal/aggregation/AggregationsHelper.js.map +1 -0
  103. package/build/browser/observable/internal/aggregation/ObjectAggregationQuery.js +33 -0
  104. package/build/browser/observable/internal/aggregation/ObjectAggregationQuery.js.map +1 -0
  105. package/build/browser/observable/internal/base-list/BaseListQuery.js +145 -5
  106. package/build/browser/observable/internal/base-list/BaseListQuery.js.map +1 -1
  107. package/build/browser/observable/internal/base-list/createCollectionConnectable.js +0 -5
  108. package/build/browser/observable/internal/base-list/createCollectionConnectable.js.map +1 -1
  109. package/build/browser/observable/internal/base-list/createCollectionConnectable.test.js +26 -13
  110. package/build/browser/observable/internal/base-list/createCollectionConnectable.test.js.map +1 -1
  111. package/build/browser/observable/internal/evaluateFilter.js +61 -0
  112. package/build/browser/observable/internal/evaluateFilter.js.map +1 -0
  113. package/build/browser/observable/internal/links/SpecificLinkCacheKey.js +33 -1
  114. package/build/browser/observable/internal/links/SpecificLinkCacheKey.js.map +1 -1
  115. package/build/browser/observable/internal/list/InterfaceListQuery.js +8 -3
  116. package/build/browser/observable/internal/list/InterfaceListQuery.js.map +1 -1
  117. package/build/browser/observable/internal/list/ListCacheKey.js +24 -1
  118. package/build/browser/observable/internal/list/ListCacheKey.js.map +1 -1
  119. package/build/browser/observable/internal/list/ListQuery.js +35 -62
  120. package/build/browser/observable/internal/list/ListQuery.js.map +1 -1
  121. package/build/browser/observable/internal/list/ListQueryOptions.js.map +1 -1
  122. package/build/browser/observable/internal/list/ListsHelper.js +18 -8
  123. package/build/browser/observable/internal/list/ListsHelper.js.map +1 -1
  124. package/build/browser/observable/internal/list/ObjectListQuery.js +51 -3
  125. package/build/browser/observable/internal/list/ObjectListQuery.js.map +1 -1
  126. package/build/browser/observable/internal/object/ObjectCacheKey.js +20 -1
  127. package/build/browser/observable/internal/object/ObjectCacheKey.js.map +1 -1
  128. package/build/browser/observable/internal/object/ObjectCacheKeyRegistry.js +126 -0
  129. package/build/browser/observable/internal/object/ObjectCacheKeyRegistry.js.map +1 -0
  130. package/build/browser/observable/internal/object/ObjectCacheKeyRegistry.test.js +173 -0
  131. package/build/browser/observable/internal/object/ObjectCacheKeyRegistry.test.js.map +1 -0
  132. package/build/browser/observable/internal/object/ObjectQuery.js +10 -58
  133. package/build/browser/observable/internal/object/ObjectQuery.js.map +1 -1
  134. package/build/browser/observable/internal/object/ObjectsHelper.js +65 -5
  135. package/build/browser/observable/internal/object/ObjectsHelper.js.map +1 -1
  136. package/build/browser/observable/internal/objectMatchesWhereClause.js +3 -37
  137. package/build/browser/observable/internal/objectMatchesWhereClause.js.map +1 -1
  138. package/build/browser/observable/internal/objectMatchesWhereClause.test.js +2 -1
  139. package/build/browser/observable/internal/objectMatchesWhereClause.test.js.map +1 -1
  140. package/build/browser/observable/internal/objectset/ObjectSetHelper.js +5 -1
  141. package/build/browser/observable/internal/objectset/ObjectSetHelper.js.map +1 -1
  142. package/build/browser/observable/internal/objectset/ObjectSetQuery.js +3 -0
  143. package/build/browser/observable/internal/objectset/ObjectSetQuery.js.map +1 -1
  144. package/build/browser/observable/internal/objectset/ObjectSetQueryOptions.js.map +1 -1
  145. package/build/browser/observable/internal/testUtils/invalidateList.js +6 -1
  146. package/build/browser/observable/internal/testUtils/invalidateList.js.map +1 -1
  147. package/build/browser/observable/internal/testUtils.js +5 -3
  148. package/build/browser/observable/internal/testUtils.js.map +1 -1
  149. package/build/browser/observable/internal/types/ObjectUpdate.js +2 -0
  150. package/build/browser/observable/internal/types/ObjectUpdate.js.map +1 -0
  151. package/build/browser/observable/internal/utils/rdpFieldOperations.js +83 -0
  152. package/build/browser/observable/internal/utils/rdpFieldOperations.js.map +1 -0
  153. package/build/browser/ontology/loadActionMetadata.js +3 -1
  154. package/build/browser/ontology/loadActionMetadata.js.map +1 -1
  155. package/build/browser/ontology/loadFullObjectMetadata.js +2 -1
  156. package/build/browser/ontology/loadFullObjectMetadata.js.map +1 -1
  157. package/build/browser/ontology/loadInterfaceMetadata.js +2 -1
  158. package/build/browser/ontology/loadInterfaceMetadata.js.map +1 -1
  159. package/build/browser/public/internal-node.js +18 -0
  160. package/build/browser/public/internal-node.js.map +1 -0
  161. package/build/browser/public/unstable-do-not-use.js.map +1 -1
  162. package/build/browser/queries/applyQuery.js +5 -4
  163. package/build/browser/queries/applyQuery.js.map +1 -1
  164. package/build/browser/util/UserAgent.js +2 -2
  165. package/build/browser/util/UserAgent.js.map +1 -1
  166. package/build/browser/util/extractObjectOrInterfaceType.js +5 -1
  167. package/build/browser/util/extractObjectOrInterfaceType.js.map +1 -1
  168. package/build/browser/util/extractObjectOrInterfaceType.test.js +21 -2
  169. package/build/browser/util/extractObjectOrInterfaceType.test.js.map +1 -1
  170. package/build/browser/util/toDataValue.js +16 -1
  171. package/build/browser/util/toDataValue.js.map +1 -1
  172. package/build/browser/util/toDataValue.test.js +42 -2
  173. package/build/browser/util/toDataValue.test.js.map +1 -1
  174. package/build/cjs/chunk-6SCDLAU2.cjs +57 -0
  175. package/build/cjs/chunk-6SCDLAU2.cjs.map +1 -0
  176. package/build/cjs/{chunk-SDFKR62Z.cjs → chunk-HJX4D4KL.cjs} +627 -63
  177. package/build/cjs/chunk-HJX4D4KL.cjs.map +1 -0
  178. package/build/cjs/{chunk-MEL46GIF.cjs → chunk-RO7XAQOS.cjs} +454 -242
  179. package/build/cjs/chunk-RO7XAQOS.cjs.map +1 -0
  180. package/build/cjs/{createClient-BJo8T7Js.d.cts → createClient-mOlFts15.d.cts} +1 -0
  181. package/build/cjs/{delay-QK4T7RVX.cjs → delay-KIUUJ5NJ.cjs} +4 -3
  182. package/build/cjs/delay-KIUUJ5NJ.cjs.map +1 -0
  183. package/build/cjs/index.cjs +24 -8
  184. package/build/cjs/index.cjs.map +1 -1
  185. package/build/cjs/index.d.cts +10 -3
  186. package/build/cjs/public/internal-node.cjs +193767 -0
  187. package/build/cjs/public/internal-node.cjs.map +1 -0
  188. package/build/cjs/public/internal-node.d.cts +29 -0
  189. package/build/cjs/public/internal.cjs +16 -9
  190. package/build/cjs/public/internal.cjs.map +1 -1
  191. package/build/cjs/public/unstable-do-not-use.cjs +1736 -868
  192. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
  193. package/build/cjs/public/unstable-do-not-use.d.cts +43 -7
  194. package/build/esm/Client.js +1 -1
  195. package/build/esm/Client.js.map +1 -1
  196. package/build/esm/MinimalClientContext.js.map +1 -1
  197. package/build/esm/actions/applyAction.js +4 -0
  198. package/build/esm/actions/applyAction.js.map +1 -1
  199. package/build/esm/createClient.js +2 -1
  200. package/build/esm/createClient.js.map +1 -1
  201. package/build/esm/createClient.test.js +19 -1
  202. package/build/esm/createClient.test.js.map +1 -1
  203. package/build/esm/createMinimalClient.js +4 -2
  204. package/build/esm/createMinimalClient.js.map +1 -1
  205. package/build/esm/derivedProperties/createWithPropertiesObjectSet.js +19 -1
  206. package/build/esm/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
  207. package/build/esm/fetchMetadata.test.js +11 -0
  208. package/build/esm/fetchMetadata.test.js.map +1 -1
  209. package/build/esm/index.js +2 -2
  210. package/build/esm/index.js.map +1 -1
  211. package/build/esm/internal/conversions/extractNamespace.js +22 -0
  212. package/build/esm/internal/conversions/extractNamespace.js.map +1 -0
  213. package/build/esm/internal/conversions/fullyQualifyPropName.js +26 -0
  214. package/build/esm/internal/conversions/fullyQualifyPropName.js.map +1 -0
  215. package/build/esm/internal/conversions/makeGeoFilterBbox.js +41 -0
  216. package/build/esm/internal/conversions/makeGeoFilterBbox.js.map +1 -0
  217. package/build/esm/internal/conversions/makeGeoFilterIntersects.js +29 -0
  218. package/build/esm/internal/conversions/makeGeoFilterIntersects.js.map +1 -0
  219. package/build/esm/internal/conversions/makeGeoFilterPolygon.js +30 -0
  220. package/build/esm/internal/conversions/makeGeoFilterPolygon.js.map +1 -0
  221. package/build/esm/internal/conversions/makeGeoFilterWithin.js +48 -0
  222. package/build/esm/internal/conversions/makeGeoFilterWithin.js.map +1 -0
  223. package/build/esm/internal/conversions/modernToLegacyWhereClause.js +59 -105
  224. package/build/esm/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
  225. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js +309 -0
  226. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -1
  227. package/build/esm/object/aggregate.js +3 -0
  228. package/build/esm/object/aggregate.js.map +1 -1
  229. package/build/esm/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -1
  230. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -1
  231. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js +5 -1
  232. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  233. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js +10 -0
  234. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  235. package/build/esm/object/convertWireToOsdkObjects.test.js +12 -0
  236. package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -1
  237. package/build/esm/object/fetchPage.js +13 -6
  238. package/build/esm/object/fetchPage.js.map +1 -1
  239. package/build/esm/object/formatting/applyPropertyFormatter.js +58 -0
  240. package/build/esm/object/formatting/applyPropertyFormatter.js.map +1 -0
  241. package/build/esm/object/formatting/applyPropertyFormatter.test.js +726 -0
  242. package/build/esm/object/formatting/applyPropertyFormatter.test.js.map +1 -0
  243. package/build/esm/object/formatting/formatBoolean.js +23 -0
  244. package/build/esm/object/formatting/formatBoolean.js.map +1 -0
  245. package/build/esm/object/formatting/formatDateTime.js +158 -0
  246. package/build/esm/object/formatting/formatDateTime.js.map +1 -0
  247. package/build/esm/object/formatting/formatNumber.js +242 -0
  248. package/build/esm/object/formatting/formatNumber.js.map +1 -0
  249. package/build/esm/object/formatting/propertyFormattingUtils.js +39 -0
  250. package/build/esm/object/formatting/propertyFormattingUtils.js.map +1 -0
  251. package/build/esm/object/mediaUpload.js +3 -0
  252. package/build/esm/object/mediaUpload.js.map +1 -1
  253. package/build/esm/objectSet/ObjectSetListenerWebsocket.js +17 -0
  254. package/build/esm/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
  255. package/build/esm/objectSet/createObjectSet.js +11 -0
  256. package/build/esm/objectSet/createObjectSet.js.map +1 -1
  257. package/build/esm/observable/ObservableClient.js.map +1 -1
  258. package/build/esm/observable/internal/BulkObjectLoader.js +12 -4
  259. package/build/esm/observable/internal/BulkObjectLoader.js.map +1 -1
  260. package/build/esm/observable/internal/BulkObjectLoader.test.js +48 -0
  261. package/build/esm/observable/internal/BulkObjectLoader.test.js.map +1 -1
  262. package/build/esm/observable/internal/CacheKeys.js +9 -3
  263. package/build/esm/observable/internal/CacheKeys.js.map +1 -1
  264. package/build/esm/observable/internal/Canonicalizer.js +51 -0
  265. package/build/esm/observable/internal/Canonicalizer.js.map +1 -0
  266. package/build/esm/observable/internal/Changes.js.map +1 -1
  267. package/build/esm/observable/internal/IntersectCanonicalizer.js +35 -0
  268. package/build/esm/observable/internal/IntersectCanonicalizer.js.map +1 -0
  269. package/build/esm/observable/internal/KnownCacheKey.js.map +1 -1
  270. package/build/esm/observable/internal/ObservableClientImpl.js +3 -0
  271. package/build/esm/observable/internal/ObservableClientImpl.js.map +1 -1
  272. package/build/esm/observable/internal/OrderByCanonicalizer.js +1 -4
  273. package/build/esm/observable/internal/OrderByCanonicalizer.js.map +1 -1
  274. package/build/esm/observable/internal/PivotCanonicalizer.js +33 -0
  275. package/build/esm/observable/internal/PivotCanonicalizer.js.map +1 -0
  276. package/build/esm/observable/internal/RdpCanonicalizer.js +66 -0
  277. package/build/esm/observable/internal/RdpCanonicalizer.js.map +1 -0
  278. package/build/esm/observable/internal/RdpCanonicalizer.test.js +68 -0
  279. package/build/esm/observable/internal/RdpCanonicalizer.test.js.map +1 -0
  280. package/build/esm/observable/internal/SimpleWhereClause.js.map +1 -1
  281. package/build/esm/observable/internal/Store.js +172 -6
  282. package/build/esm/observable/internal/Store.js.map +1 -1
  283. package/build/esm/observable/internal/WhereClauseCanonicalizer.js +1 -1
  284. package/build/esm/observable/internal/WhereClauseCanonicalizer.js.map +1 -1
  285. package/build/esm/observable/internal/actions/ActionApplication.js +1 -1
  286. package/build/esm/observable/internal/actions/ActionApplication.js.map +1 -1
  287. package/build/esm/observable/internal/actions/OptimisticJob.js +3 -3
  288. package/build/esm/observable/internal/actions/OptimisticJob.js.map +1 -1
  289. package/build/esm/observable/internal/aggregation/AggregationCacheKey.js +22 -0
  290. package/build/esm/observable/internal/aggregation/AggregationCacheKey.js.map +1 -0
  291. package/build/esm/observable/internal/aggregation/AggregationQuery.js +77 -0
  292. package/build/esm/observable/internal/aggregation/AggregationQuery.js.map +1 -0
  293. package/build/esm/observable/internal/aggregation/AggregationsHelper.js +54 -0
  294. package/build/esm/observable/internal/aggregation/AggregationsHelper.js.map +1 -0
  295. package/build/esm/observable/internal/aggregation/ObjectAggregationQuery.js +33 -0
  296. package/build/esm/observable/internal/aggregation/ObjectAggregationQuery.js.map +1 -0
  297. package/build/esm/observable/internal/base-list/BaseListQuery.js +145 -5
  298. package/build/esm/observable/internal/base-list/BaseListQuery.js.map +1 -1
  299. package/build/esm/observable/internal/base-list/createCollectionConnectable.js +0 -5
  300. package/build/esm/observable/internal/base-list/createCollectionConnectable.js.map +1 -1
  301. package/build/esm/observable/internal/base-list/createCollectionConnectable.test.js +26 -13
  302. package/build/esm/observable/internal/base-list/createCollectionConnectable.test.js.map +1 -1
  303. package/build/esm/observable/internal/evaluateFilter.js +61 -0
  304. package/build/esm/observable/internal/evaluateFilter.js.map +1 -0
  305. package/build/esm/observable/internal/links/SpecificLinkCacheKey.js +33 -1
  306. package/build/esm/observable/internal/links/SpecificLinkCacheKey.js.map +1 -1
  307. package/build/esm/observable/internal/list/InterfaceListQuery.js +8 -3
  308. package/build/esm/observable/internal/list/InterfaceListQuery.js.map +1 -1
  309. package/build/esm/observable/internal/list/ListCacheKey.js +24 -1
  310. package/build/esm/observable/internal/list/ListCacheKey.js.map +1 -1
  311. package/build/esm/observable/internal/list/ListQuery.js +35 -62
  312. package/build/esm/observable/internal/list/ListQuery.js.map +1 -1
  313. package/build/esm/observable/internal/list/ListQueryOptions.js.map +1 -1
  314. package/build/esm/observable/internal/list/ListsHelper.js +18 -8
  315. package/build/esm/observable/internal/list/ListsHelper.js.map +1 -1
  316. package/build/esm/observable/internal/list/ObjectListQuery.js +51 -3
  317. package/build/esm/observable/internal/list/ObjectListQuery.js.map +1 -1
  318. package/build/esm/observable/internal/object/ObjectCacheKey.js +20 -1
  319. package/build/esm/observable/internal/object/ObjectCacheKey.js.map +1 -1
  320. package/build/esm/observable/internal/object/ObjectCacheKeyRegistry.js +126 -0
  321. package/build/esm/observable/internal/object/ObjectCacheKeyRegistry.js.map +1 -0
  322. package/build/esm/observable/internal/object/ObjectCacheKeyRegistry.test.js +173 -0
  323. package/build/esm/observable/internal/object/ObjectCacheKeyRegistry.test.js.map +1 -0
  324. package/build/esm/observable/internal/object/ObjectQuery.js +10 -58
  325. package/build/esm/observable/internal/object/ObjectQuery.js.map +1 -1
  326. package/build/esm/observable/internal/object/ObjectsHelper.js +65 -5
  327. package/build/esm/observable/internal/object/ObjectsHelper.js.map +1 -1
  328. package/build/esm/observable/internal/objectMatchesWhereClause.js +3 -37
  329. package/build/esm/observable/internal/objectMatchesWhereClause.js.map +1 -1
  330. package/build/esm/observable/internal/objectMatchesWhereClause.test.js +2 -1
  331. package/build/esm/observable/internal/objectMatchesWhereClause.test.js.map +1 -1
  332. package/build/esm/observable/internal/objectset/ObjectSetHelper.js +5 -1
  333. package/build/esm/observable/internal/objectset/ObjectSetHelper.js.map +1 -1
  334. package/build/esm/observable/internal/objectset/ObjectSetQuery.js +3 -0
  335. package/build/esm/observable/internal/objectset/ObjectSetQuery.js.map +1 -1
  336. package/build/esm/observable/internal/objectset/ObjectSetQueryOptions.js.map +1 -1
  337. package/build/esm/observable/internal/testUtils/invalidateList.js +6 -1
  338. package/build/esm/observable/internal/testUtils/invalidateList.js.map +1 -1
  339. package/build/esm/observable/internal/testUtils.js +5 -3
  340. package/build/esm/observable/internal/testUtils.js.map +1 -1
  341. package/build/esm/observable/internal/types/ObjectUpdate.js +2 -0
  342. package/build/esm/observable/internal/types/ObjectUpdate.js.map +1 -0
  343. package/build/esm/observable/internal/utils/rdpFieldOperations.js +83 -0
  344. package/build/esm/observable/internal/utils/rdpFieldOperations.js.map +1 -0
  345. package/build/esm/ontology/loadActionMetadata.js +3 -1
  346. package/build/esm/ontology/loadActionMetadata.js.map +1 -1
  347. package/build/esm/ontology/loadFullObjectMetadata.js +2 -1
  348. package/build/esm/ontology/loadFullObjectMetadata.js.map +1 -1
  349. package/build/esm/ontology/loadInterfaceMetadata.js +2 -1
  350. package/build/esm/ontology/loadInterfaceMetadata.js.map +1 -1
  351. package/build/esm/public/internal-node.js +18 -0
  352. package/build/esm/public/internal-node.js.map +1 -0
  353. package/build/esm/public/unstable-do-not-use.js.map +1 -1
  354. package/build/esm/queries/applyQuery.js +5 -4
  355. package/build/esm/queries/applyQuery.js.map +1 -1
  356. package/build/esm/util/UserAgent.js +2 -2
  357. package/build/esm/util/UserAgent.js.map +1 -1
  358. package/build/esm/util/extractObjectOrInterfaceType.js +5 -1
  359. package/build/esm/util/extractObjectOrInterfaceType.js.map +1 -1
  360. package/build/esm/util/extractObjectOrInterfaceType.test.js +21 -2
  361. package/build/esm/util/extractObjectOrInterfaceType.test.js.map +1 -1
  362. package/build/esm/util/toDataValue.js +16 -1
  363. package/build/esm/util/toDataValue.js.map +1 -1
  364. package/build/esm/util/toDataValue.test.js +42 -2
  365. package/build/esm/util/toDataValue.test.js.map +1 -1
  366. package/build/types/Client.d.ts +1 -1
  367. package/build/types/MinimalClientContext.d.ts +3 -1
  368. package/build/types/MinimalClientContext.d.ts.map +1 -1
  369. package/build/types/actions/applyAction.d.ts.map +1 -1
  370. package/build/types/createClient.d.ts +1 -0
  371. package/build/types/createClient.d.ts.map +1 -1
  372. package/build/types/index.d.ts +3 -3
  373. package/build/types/index.d.ts.map +1 -1
  374. package/build/types/internal/conversions/extractNamespace.d.ts +1 -0
  375. package/build/types/internal/conversions/extractNamespace.d.ts.map +1 -0
  376. package/build/types/internal/conversions/fullyQualifyPropName.d.ts +2 -0
  377. package/build/types/internal/conversions/fullyQualifyPropName.d.ts.map +1 -0
  378. package/build/types/internal/conversions/makeGeoFilterBbox.d.ts +3 -0
  379. package/build/types/internal/conversions/makeGeoFilterBbox.d.ts.map +1 -0
  380. package/build/types/internal/conversions/makeGeoFilterIntersects.d.ts +3 -0
  381. package/build/types/internal/conversions/makeGeoFilterIntersects.d.ts.map +1 -0
  382. package/build/types/internal/conversions/makeGeoFilterPolygon.d.ts +3 -0
  383. package/build/types/internal/conversions/makeGeoFilterPolygon.d.ts.map +1 -0
  384. package/build/types/internal/conversions/makeGeoFilterWithin.d.ts +3 -0
  385. package/build/types/internal/conversions/makeGeoFilterWithin.d.ts.map +1 -0
  386. package/build/types/internal/conversions/modernToLegacyWhereClause.d.ts +1 -1
  387. package/build/types/internal/conversions/modernToLegacyWhereClause.d.ts.map +1 -1
  388. package/build/types/object/fetchPage.d.ts.map +1 -1
  389. package/build/types/object/formatting/applyPropertyFormatter.d.ts +18 -0
  390. package/build/types/object/formatting/applyPropertyFormatter.d.ts.map +1 -0
  391. package/build/types/object/formatting/applyPropertyFormatter.test.d.ts +1 -0
  392. package/build/types/object/formatting/applyPropertyFormatter.test.d.ts.map +1 -0
  393. package/build/types/object/formatting/formatBoolean.d.ts +5 -0
  394. package/build/types/object/formatting/formatBoolean.d.ts.map +1 -0
  395. package/build/types/object/formatting/formatDateTime.d.ts +6 -0
  396. package/build/types/object/formatting/formatDateTime.d.ts.map +1 -0
  397. package/build/types/object/formatting/formatNumber.d.ts +15 -0
  398. package/build/types/object/formatting/formatNumber.d.ts.map +1 -0
  399. package/build/types/object/formatting/propertyFormattingUtils.d.ts +10 -0
  400. package/build/types/object/formatting/propertyFormattingUtils.d.ts.map +1 -0
  401. package/build/types/object/mediaUpload.d.ts +2 -1
  402. package/build/types/object/mediaUpload.d.ts.map +1 -1
  403. package/build/types/observable/ObservableClient.d.ts +60 -5
  404. package/build/types/observable/ObservableClient.d.ts.map +1 -1
  405. package/build/types/observable/internal/BulkObjectLoader.d.ts.map +1 -1
  406. package/build/types/observable/internal/CacheKeys.d.ts.map +1 -1
  407. package/build/types/observable/internal/Canonicalizer.d.ts +37 -0
  408. package/build/types/observable/internal/Canonicalizer.d.ts.map +1 -0
  409. package/build/types/observable/internal/Changes.d.ts +4 -3
  410. package/build/types/observable/internal/Changes.d.ts.map +1 -1
  411. package/build/types/observable/internal/IntersectCanonicalizer.d.ts +18 -0
  412. package/build/types/observable/internal/IntersectCanonicalizer.d.ts.map +1 -0
  413. package/build/types/observable/internal/KnownCacheKey.d.ts +2 -1
  414. package/build/types/observable/internal/KnownCacheKey.d.ts.map +1 -1
  415. package/build/types/observable/internal/OrderByCanonicalizer.d.ts.map +1 -1
  416. package/build/types/observable/internal/PivotCanonicalizer.d.ts +10 -0
  417. package/build/types/observable/internal/PivotCanonicalizer.d.ts.map +1 -0
  418. package/build/types/observable/internal/RdpCanonicalizer.d.ts +8 -0
  419. package/build/types/observable/internal/RdpCanonicalizer.d.ts.map +1 -0
  420. package/build/types/observable/internal/RdpCanonicalizer.test.d.ts +1 -0
  421. package/build/types/observable/internal/RdpCanonicalizer.test.d.ts.map +1 -0
  422. package/build/types/observable/internal/SimpleWhereClause.d.ts +6 -2
  423. package/build/types/observable/internal/SimpleWhereClause.d.ts.map +1 -1
  424. package/build/types/observable/internal/Store.d.ts +10 -0
  425. package/build/types/observable/internal/Store.d.ts.map +1 -1
  426. package/build/types/observable/internal/WhereClauseCanonicalizer.d.ts +5 -2
  427. package/build/types/observable/internal/WhereClauseCanonicalizer.d.ts.map +1 -1
  428. package/build/types/observable/internal/actions/ActionApplication.d.ts.map +1 -1
  429. package/build/types/observable/internal/aggregation/AggregationCacheKey.d.ts +12 -0
  430. package/build/types/observable/internal/aggregation/AggregationCacheKey.d.ts.map +1 -0
  431. package/build/types/observable/internal/aggregation/AggregationQuery.d.ts +49 -0
  432. package/build/types/observable/internal/aggregation/AggregationQuery.d.ts.map +1 -0
  433. package/build/types/observable/internal/aggregation/AggregationsHelper.d.ts +37 -0
  434. package/build/types/observable/internal/aggregation/AggregationsHelper.d.ts.map +1 -0
  435. package/build/types/observable/internal/aggregation/ObjectAggregationQuery.d.ts +5 -0
  436. package/build/types/observable/internal/aggregation/ObjectAggregationQuery.d.ts.map +1 -0
  437. package/build/types/observable/internal/base-list/BaseListQuery.d.ts +48 -2
  438. package/build/types/observable/internal/base-list/BaseListQuery.d.ts.map +1 -1
  439. package/build/types/observable/internal/base-list/createCollectionConnectable.d.ts +1 -23
  440. package/build/types/observable/internal/base-list/createCollectionConnectable.d.ts.map +1 -1
  441. package/build/types/observable/internal/evaluateFilter.d.ts +6 -0
  442. package/build/types/observable/internal/evaluateFilter.d.ts.map +1 -0
  443. package/build/types/observable/internal/links/SpecificLinkCacheKey.d.ts +5 -0
  444. package/build/types/observable/internal/links/SpecificLinkCacheKey.d.ts.map +1 -1
  445. package/build/types/observable/internal/list/InterfaceListQuery.d.ts.map +1 -1
  446. package/build/types/observable/internal/list/ListCacheKey.d.ts +10 -1
  447. package/build/types/observable/internal/list/ListCacheKey.d.ts.map +1 -1
  448. package/build/types/observable/internal/list/ListQuery.d.ts +12 -15
  449. package/build/types/observable/internal/list/ListQuery.d.ts.map +1 -1
  450. package/build/types/observable/internal/list/ListQueryOptions.d.ts +9 -1
  451. package/build/types/observable/internal/list/ListQueryOptions.d.ts.map +1 -1
  452. package/build/types/observable/internal/list/ListsHelper.d.ts +7 -1
  453. package/build/types/observable/internal/list/ListsHelper.d.ts.map +1 -1
  454. package/build/types/observable/internal/list/ObjectListQuery.d.ts.map +1 -1
  455. package/build/types/observable/internal/object/ObjectCacheKey.d.ts +6 -1
  456. package/build/types/observable/internal/object/ObjectCacheKey.d.ts.map +1 -1
  457. package/build/types/observable/internal/object/ObjectCacheKeyRegistry.d.ts +60 -0
  458. package/build/types/observable/internal/object/ObjectCacheKeyRegistry.d.ts.map +1 -0
  459. package/build/types/observable/internal/object/ObjectCacheKeyRegistry.test.d.ts +1 -0
  460. package/build/types/observable/internal/object/ObjectCacheKeyRegistry.test.d.ts.map +1 -0
  461. package/build/types/observable/internal/object/ObjectQuery.d.ts +1 -1
  462. package/build/types/observable/internal/object/ObjectQuery.d.ts.map +1 -1
  463. package/build/types/observable/internal/object/ObjectsHelper.d.ts +15 -1
  464. package/build/types/observable/internal/object/ObjectsHelper.d.ts.map +1 -1
  465. package/build/types/observable/internal/objectMatchesWhereClause.d.ts.map +1 -1
  466. package/build/types/observable/internal/objectset/ObjectSetHelper.d.ts.map +1 -1
  467. package/build/types/observable/internal/objectset/ObjectSetQuery.d.ts +2 -1
  468. package/build/types/observable/internal/objectset/ObjectSetQuery.d.ts.map +1 -1
  469. package/build/types/observable/internal/objectset/ObjectSetQueryOptions.d.ts +1 -0
  470. package/build/types/observable/internal/objectset/ObjectSetQueryOptions.d.ts.map +1 -1
  471. package/build/types/observable/internal/testUtils.d.ts +1 -1
  472. package/build/types/observable/internal/testUtils.d.ts.map +1 -1
  473. package/build/types/observable/internal/types/ObjectUpdate.d.ts +11 -0
  474. package/build/types/observable/internal/types/ObjectUpdate.d.ts.map +1 -0
  475. package/build/types/observable/internal/utils/rdpFieldOperations.d.ts +5 -0
  476. package/build/types/observable/internal/utils/rdpFieldOperations.d.ts.map +1 -0
  477. package/build/types/public/internal-node.d.ts +2 -0
  478. package/build/types/public/internal-node.d.ts.map +1 -0
  479. package/build/types/public/unstable-do-not-use.d.ts +1 -1
  480. package/build/types/public/unstable-do-not-use.d.ts.map +1 -1
  481. package/build/types/queries/applyQuery.d.ts.map +1 -1
  482. package/internal-node.d.ts +17 -0
  483. package/package.json +23 -13
  484. package/build/cjs/chunk-MEL46GIF.cjs.map +0 -1
  485. package/build/cjs/chunk-Q7SFCCGT.cjs +0 -11
  486. package/build/cjs/chunk-Q7SFCCGT.cjs.map +0 -1
  487. package/build/cjs/chunk-SDFKR62Z.cjs.map +0 -1
  488. package/build/cjs/delay-QK4T7RVX.cjs.map +0 -1
@@ -85,6 +85,7 @@ describe("FetchMetadata", () => {
85
85
  "multiplicity": false,
86
86
  "nullable": true,
87
87
  "type": "string",
88
+ "valueFormatting": undefined,
88
89
  "valueTypeApiName": undefined,
89
90
  },
90
91
  "employeeId": {
@@ -93,6 +94,7 @@ describe("FetchMetadata", () => {
93
94
  "multiplicity": false,
94
95
  "nullable": false,
95
96
  "type": "integer",
97
+ "valueFormatting": undefined,
96
98
  "valueTypeApiName": undefined,
97
99
  },
98
100
  "employeeLocation": {
@@ -101,6 +103,7 @@ describe("FetchMetadata", () => {
101
103
  "multiplicity": false,
102
104
  "nullable": true,
103
105
  "type": "geotimeSeriesReference",
106
+ "valueFormatting": undefined,
104
107
  "valueTypeApiName": undefined,
105
108
  },
106
109
  "employeeSensor": {
@@ -109,6 +112,7 @@ describe("FetchMetadata", () => {
109
112
  "multiplicity": false,
110
113
  "nullable": true,
111
114
  "type": "sensorTimeseries",
115
+ "valueFormatting": undefined,
112
116
  "valueTypeApiName": undefined,
113
117
  },
114
118
  "employeeStatus": {
@@ -117,6 +121,7 @@ describe("FetchMetadata", () => {
117
121
  "multiplicity": false,
118
122
  "nullable": true,
119
123
  "type": "stringTimeseries",
124
+ "valueFormatting": undefined,
120
125
  "valueTypeApiName": undefined,
121
126
  },
122
127
  "fullName": {
@@ -125,6 +130,7 @@ describe("FetchMetadata", () => {
125
130
  "multiplicity": false,
126
131
  "nullable": true,
127
132
  "type": "string",
133
+ "valueFormatting": undefined,
128
134
  "valueTypeApiName": undefined,
129
135
  },
130
136
  "office": {
@@ -134,6 +140,7 @@ describe("FetchMetadata", () => {
134
140
  "multiplicity": false,
135
141
  "nullable": true,
136
142
  "type": "string",
143
+ "valueFormatting": undefined,
137
144
  "valueTypeApiName": undefined,
138
145
  },
139
146
  "skillSet": {
@@ -142,6 +149,7 @@ describe("FetchMetadata", () => {
142
149
  "multiplicity": false,
143
150
  "nullable": true,
144
151
  "type": "string",
152
+ "valueFormatting": undefined,
145
153
  "valueTypeApiName": undefined,
146
154
  },
147
155
  "skillSetEmbedding": {
@@ -150,6 +158,7 @@ describe("FetchMetadata", () => {
150
158
  "multiplicity": false,
151
159
  "nullable": true,
152
160
  "type": "vector",
161
+ "valueFormatting": undefined,
153
162
  "valueTypeApiName": undefined,
154
163
  },
155
164
  "startDate": {
@@ -158,6 +167,7 @@ describe("FetchMetadata", () => {
158
167
  "multiplicity": false,
159
168
  "nullable": true,
160
169
  "type": "datetime",
170
+ "valueFormatting": undefined,
161
171
  "valueTypeApiName": undefined,
162
172
  },
163
173
  },
@@ -196,6 +206,7 @@ describe("FetchMetadata", () => {
196
206
  "multiplicity": false,
197
207
  "nullable": true,
198
208
  "type": "string",
209
+ "valueFormatting": undefined,
199
210
  "valueTypeApiName": undefined,
200
211
  },
201
212
  },
@@ -1 +1 @@
1
- {"version":3,"file":"fetchMetadata.test.js","names":["$Actions","$Interfaces","$Objects","$Queries","LegacyFauxFoundry","startNodeApiServer","beforeAll","describe","expect","expectTypeOf","it","createClient","client","testSetup","apiServer","close","objectMetadata","fetchMetadata","Employee","toEqualTypeOf","toMatchInlineSnapshot","interfaceMetadata","FooInterface","actionMetadata","moveOffice","queryMetadata","queryAcceptsObject"],"sources":["fetchMetadata.test.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ActionMetadata,\n InterfaceMetadata,\n ObjectMetadata,\n QueryMetadata,\n} from \"@osdk/api\";\nimport {\n $Actions,\n $Interfaces,\n $Objects,\n $Queries,\n} from \"@osdk/client.test.ontology\";\nimport { LegacyFauxFoundry, startNodeApiServer } from \"@osdk/shared.test\";\nimport { beforeAll, describe, expect, expectTypeOf, it } from \"vitest\";\nimport type { Client } from \"./Client.js\";\nimport { createClient } from \"./createClient.js\";\n\ndescribe(\"FetchMetadata\", () => {\n let client: Client;\n\n beforeAll(() => {\n const testSetup = startNodeApiServer(new LegacyFauxFoundry(), createClient);\n ({ client } = testSetup);\n return () => {\n testSetup.apiServer.close();\n };\n });\n\n it(\"fetches object metadata correctly\", async () => {\n const objectMetadata = await client.fetchMetadata($Objects.Employee);\n\n expectTypeOf(objectMetadata).toEqualTypeOf<\n ObjectMetadata\n >();\n\n expect(objectMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"Employee\",\n \"description\": \"A full-time or part-time \n\n employee of our firm\",\n \"displayName\": \"Employee\",\n \"icon\": {\n \"color\": \"blue\",\n \"name\": \"person\",\n \"type\": \"blueprint\",\n },\n \"implements\": [\n \"FooInterface\",\n ],\n \"interfaceMap\": {\n \"FooInterface\": {\n \"fooSpt\": \"fullName\",\n },\n },\n \"inverseInterfaceMap\": {\n \"FooInterface\": {\n \"fullName\": \"fooSpt\",\n },\n },\n \"links\": {\n \"lead\": {\n \"multiplicity\": false,\n \"targetType\": \"Employee\",\n },\n \"officeLink\": {\n \"multiplicity\": false,\n \"targetType\": \"Office\",\n },\n \"peeps\": {\n \"multiplicity\": true,\n \"targetType\": \"Employee\",\n },\n \"visitedOffices\": {\n \"multiplicity\": true,\n \"targetType\": \"Office\",\n },\n },\n \"pluralDisplayName\": \"Employees\",\n \"primaryKeyApiName\": \"employeeId\",\n \"primaryKeyType\": \"integer\",\n \"properties\": {\n \"class\": {\n \"description\": \"\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueTypeApiName\": undefined,\n },\n \"employeeId\": {\n \"description\": undefined,\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": false,\n \"type\": \"integer\",\n \"valueTypeApiName\": undefined,\n },\n \"employeeLocation\": {\n \"description\": \"Geotime series reference of the location of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"geotimeSeriesReference\",\n \"valueTypeApiName\": undefined,\n },\n \"employeeSensor\": {\n \"description\": \"TimeSeries sensor of the status of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"sensorTimeseries\",\n \"valueTypeApiName\": undefined,\n },\n \"employeeStatus\": {\n \"description\": \"TimeSeries of the status of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"stringTimeseries\",\n \"valueTypeApiName\": undefined,\n },\n \"fullName\": {\n \"description\": undefined,\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueTypeApiName\": undefined,\n },\n \"office\": {\n \"description\": \"The unique \"ID\" of the employee's \\\\\"primary\\\\\" assigned office.\n This is some more text.\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueTypeApiName\": undefined,\n },\n \"skillSet\": {\n \"description\": \"The skills of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueTypeApiName\": undefined,\n },\n \"skillSetEmbedding\": {\n \"description\": \"Vectorized skill set\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"vector\",\n \"valueTypeApiName\": undefined,\n },\n \"startDate\": {\n \"description\": \"The date the employee was hired (most recently, if they were re-hired)\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"datetime\",\n \"valueTypeApiName\": undefined,\n },\n },\n \"rid\": \"ri.ontology.main.object-type.401ac022-89eb-4591-8b7e-0a912b9efb44\",\n \"status\": \"ACTIVE\",\n \"titleProperty\": \"fullName\",\n \"type\": \"object\",\n \"visibility\": \"NORMAL\",\n }\n `);\n });\n\n it(\"fetches interface metadata correctly\", async () => {\n const interfaceMetadata = await client.fetchMetadata(\n $Interfaces.FooInterface,\n );\n\n expectTypeOf(interfaceMetadata).toEqualTypeOf<\n InterfaceMetadata\n >();\n\n expect(interfaceMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"FooInterface\",\n \"description\": \"Interface for Foo\",\n \"displayName\": \"Foo Interface\",\n \"implementedBy\": [\n \"Employee\",\n \"Person\",\n ],\n \"implements\": [],\n \"links\": {\n \"toBar\": {\n \"multiplicity\": true,\n \"targetType\": \"interface\",\n \"targetTypeApiName\": \"BarInterface\",\n },\n },\n \"properties\": {\n \"fooSpt\": {\n \"description\": \"A foo\",\n \"displayName\": \"Foo\",\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueTypeApiName\": undefined,\n },\n },\n \"rid\": \"ri.interface.main.interface.1\",\n \"type\": \"interface\",\n }\n `);\n });\n\n it(\"fetches action metadata correctly\", async () => {\n const actionMetadata = await client.fetchMetadata(\n $Actions.moveOffice,\n );\n\n expectTypeOf(actionMetadata).toEqualTypeOf<ActionMetadata>();\n\n expect(actionMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"moveOffice\",\n \"description\": \"Update an office's physical location\",\n \"displayName\": \"move-office\",\n \"modifiedEntities\": {\n \"Office\": {\n \"created\": false,\n \"modified\": true,\n },\n },\n \"parameters\": {\n \"newAddress\": {\n \"description\": \"The office's new physical address (not necessarily shipping address)\",\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n },\n \"newCapacity\": {\n \"description\": \"The maximum seated-at-desk capacity of the new office (maximum fire-safe capacity may be higher)\",\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"integer\",\n },\n \"officeId\": {\n \"description\": undefined,\n \"multiplicity\": false,\n \"nullable\": false,\n \"type\": \"string\",\n },\n \"officeNames\": {\n \"description\": \"A list of all office names\",\n \"multiplicity\": true,\n \"nullable\": true,\n \"type\": \"integer\",\n },\n },\n \"rid\": \"ri.ontology.main.action-type.9f84017d-cf17-4fa8-84c3-8e01e5d594f2\",\n \"status\": \"ACTIVE\",\n \"type\": \"action\",\n }\n `);\n });\n\n it(\"fetches query metadata correctly\", async () => {\n const queryMetadata = await client.fetchMetadata(\n $Queries.queryAcceptsObject,\n );\n\n expectTypeOf(queryMetadata).toEqualTypeOf<QueryMetadata>();\n\n expect(queryMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"queryAcceptsObject\",\n \"description\": \"description of the query that takes object types\",\n \"displayName\": \"QueryAcceptsObject\",\n \"output\": {\n \"nullable\": false,\n \"object\": \"Employee\",\n \"type\": \"object\",\n },\n \"parameters\": {\n \"object\": {\n \"description\": undefined,\n \"nullable\": false,\n \"object\": \"Employee\",\n \"type\": \"object\",\n },\n },\n \"rid\": \"ri.function-registry.main.function.9b55870a-63c7-4d48-8f06-9627c0805968\",\n \"type\": \"query\",\n \"version\": \"0.11.0\",\n }\n `);\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,SACEA,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,QAAQ,QACH,4BAA4B;AACnC,SAASC,iBAAiB,EAAEC,kBAAkB,QAAQ,mBAAmB;AACzE,SAASC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,YAAY,EAAEC,EAAE,QAAQ,QAAQ;AAEtE,SAASC,YAAY,QAAQ,mBAAmB;AAEhDJ,QAAQ,CAAC,eAAe,EAAE,MAAM;EAC9B,IAAIK,MAAc;EAElBN,SAAS,CAAC,MAAM;IACd,MAAMO,SAAS,GAAGR,kBAAkB,CAAC,IAAID,iBAAiB,CAAC,CAAC,EAAEO,YAAY,CAAC;IAC3E,CAAC;MAAEC;IAAO,CAAC,GAAGC,SAAS;IACvB,OAAO,MAAM;MACXA,SAAS,CAACC,SAAS,CAACC,KAAK,CAAC,CAAC;IAC7B,CAAC;EACH,CAAC,CAAC;EAEFL,EAAE,CAAC,mCAAmC,EAAE,YAAY;IAClD,MAAMM,cAAc,GAAG,MAAMJ,MAAM,CAACK,aAAa,CAACf,QAAQ,CAACgB,QAAQ,CAAC;IAEpET,YAAY,CAACO,cAAc,CAAC,CAACG,aAAa,CAExC,CAAC;IAEHX,MAAM,CAACQ,cAAc,CAAC,CAACI,qBAAqB,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;EAEFV,EAAE,CAAC,sCAAsC,EAAE,YAAY;IACrD,MAAMW,iBAAiB,GAAG,MAAMT,MAAM,CAACK,aAAa,CAClDhB,WAAW,CAACqB,YACd,CAAC;IAEDb,YAAY,CAACY,iBAAiB,CAAC,CAACF,aAAa,CAE3C,CAAC;IAEHX,MAAM,CAACa,iBAAiB,CAAC,CAACD,qBAAqB,CAAC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;EAEFV,EAAE,CAAC,mCAAmC,EAAE,YAAY;IAClD,MAAMa,cAAc,GAAG,MAAMX,MAAM,CAACK,aAAa,CAC/CjB,QAAQ,CAACwB,UACX,CAAC;IAEDf,YAAY,CAACc,cAAc,CAAC,CAACJ,aAAa,CAAiB,CAAC;IAE5DX,MAAM,CAACe,cAAc,CAAC,CAACH,qBAAqB,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;EAEFV,EAAE,CAAC,kCAAkC,EAAE,YAAY;IACjD,MAAMe,aAAa,GAAG,MAAMb,MAAM,CAACK,aAAa,CAC9Cd,QAAQ,CAACuB,kBACX,CAAC;IAEDjB,YAAY,CAACgB,aAAa,CAAC,CAACN,aAAa,CAAgB,CAAC;IAE1DX,MAAM,CAACiB,aAAa,CAAC,CAACL,qBAAqB,CAAC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"fetchMetadata.test.js","names":["$Actions","$Interfaces","$Objects","$Queries","LegacyFauxFoundry","startNodeApiServer","beforeAll","describe","expect","expectTypeOf","it","createClient","client","testSetup","apiServer","close","objectMetadata","fetchMetadata","Employee","toEqualTypeOf","toMatchInlineSnapshot","interfaceMetadata","FooInterface","actionMetadata","moveOffice","queryMetadata","queryAcceptsObject"],"sources":["fetchMetadata.test.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ActionMetadata,\n InterfaceMetadata,\n ObjectMetadata,\n QueryMetadata,\n} from \"@osdk/api\";\nimport {\n $Actions,\n $Interfaces,\n $Objects,\n $Queries,\n} from \"@osdk/client.test.ontology\";\nimport { LegacyFauxFoundry, startNodeApiServer } from \"@osdk/shared.test\";\nimport { beforeAll, describe, expect, expectTypeOf, it } from \"vitest\";\nimport type { Client } from \"./Client.js\";\nimport { createClient } from \"./createClient.js\";\n\ndescribe(\"FetchMetadata\", () => {\n let client: Client;\n\n beforeAll(() => {\n const testSetup = startNodeApiServer(new LegacyFauxFoundry(), createClient);\n ({ client } = testSetup);\n return () => {\n testSetup.apiServer.close();\n };\n });\n\n it(\"fetches object metadata correctly\", async () => {\n const objectMetadata = await client.fetchMetadata($Objects.Employee);\n\n expectTypeOf(objectMetadata).toEqualTypeOf<\n ObjectMetadata\n >();\n\n expect(objectMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"Employee\",\n \"description\": \"A full-time or part-time \n\n employee of our firm\",\n \"displayName\": \"Employee\",\n \"icon\": {\n \"color\": \"blue\",\n \"name\": \"person\",\n \"type\": \"blueprint\",\n },\n \"implements\": [\n \"FooInterface\",\n ],\n \"interfaceMap\": {\n \"FooInterface\": {\n \"fooSpt\": \"fullName\",\n },\n },\n \"inverseInterfaceMap\": {\n \"FooInterface\": {\n \"fullName\": \"fooSpt\",\n },\n },\n \"links\": {\n \"lead\": {\n \"multiplicity\": false,\n \"targetType\": \"Employee\",\n },\n \"officeLink\": {\n \"multiplicity\": false,\n \"targetType\": \"Office\",\n },\n \"peeps\": {\n \"multiplicity\": true,\n \"targetType\": \"Employee\",\n },\n \"visitedOffices\": {\n \"multiplicity\": true,\n \"targetType\": \"Office\",\n },\n },\n \"pluralDisplayName\": \"Employees\",\n \"primaryKeyApiName\": \"employeeId\",\n \"primaryKeyType\": \"integer\",\n \"properties\": {\n \"class\": {\n \"description\": \"\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"employeeId\": {\n \"description\": undefined,\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": false,\n \"type\": \"integer\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"employeeLocation\": {\n \"description\": \"Geotime series reference of the location of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"geotimeSeriesReference\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"employeeSensor\": {\n \"description\": \"TimeSeries sensor of the status of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"sensorTimeseries\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"employeeStatus\": {\n \"description\": \"TimeSeries of the status of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"stringTimeseries\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"fullName\": {\n \"description\": undefined,\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"office\": {\n \"description\": \"The unique \"ID\" of the employee's \\\\\"primary\\\\\" assigned office.\n This is some more text.\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"skillSet\": {\n \"description\": \"The skills of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"skillSetEmbedding\": {\n \"description\": \"Vectorized skill set\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"vector\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"startDate\": {\n \"description\": \"The date the employee was hired (most recently, if they were re-hired)\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"datetime\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n },\n \"rid\": \"ri.ontology.main.object-type.401ac022-89eb-4591-8b7e-0a912b9efb44\",\n \"status\": \"ACTIVE\",\n \"titleProperty\": \"fullName\",\n \"type\": \"object\",\n \"visibility\": \"NORMAL\",\n }\n `);\n });\n\n it(\"fetches interface metadata correctly\", async () => {\n const interfaceMetadata = await client.fetchMetadata(\n $Interfaces.FooInterface,\n );\n\n expectTypeOf(interfaceMetadata).toEqualTypeOf<\n InterfaceMetadata\n >();\n\n expect(interfaceMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"FooInterface\",\n \"description\": \"Interface for Foo\",\n \"displayName\": \"Foo Interface\",\n \"implementedBy\": [\n \"Employee\",\n \"Person\",\n ],\n \"implements\": [],\n \"links\": {\n \"toBar\": {\n \"multiplicity\": true,\n \"targetType\": \"interface\",\n \"targetTypeApiName\": \"BarInterface\",\n },\n },\n \"properties\": {\n \"fooSpt\": {\n \"description\": \"A foo\",\n \"displayName\": \"Foo\",\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n },\n \"rid\": \"ri.interface.main.interface.1\",\n \"type\": \"interface\",\n }\n `);\n });\n\n it(\"fetches action metadata correctly\", async () => {\n const actionMetadata = await client.fetchMetadata(\n $Actions.moveOffice,\n );\n\n expectTypeOf(actionMetadata).toEqualTypeOf<ActionMetadata>();\n\n expect(actionMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"moveOffice\",\n \"description\": \"Update an office's physical location\",\n \"displayName\": \"move-office\",\n \"modifiedEntities\": {\n \"Office\": {\n \"created\": false,\n \"modified\": true,\n },\n },\n \"parameters\": {\n \"newAddress\": {\n \"description\": \"The office's new physical address (not necessarily shipping address)\",\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n },\n \"newCapacity\": {\n \"description\": \"The maximum seated-at-desk capacity of the new office (maximum fire-safe capacity may be higher)\",\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"integer\",\n },\n \"officeId\": {\n \"description\": undefined,\n \"multiplicity\": false,\n \"nullable\": false,\n \"type\": \"string\",\n },\n \"officeNames\": {\n \"description\": \"A list of all office names\",\n \"multiplicity\": true,\n \"nullable\": true,\n \"type\": \"integer\",\n },\n },\n \"rid\": \"ri.ontology.main.action-type.9f84017d-cf17-4fa8-84c3-8e01e5d594f2\",\n \"status\": \"ACTIVE\",\n \"type\": \"action\",\n }\n `);\n });\n\n it(\"fetches query metadata correctly\", async () => {\n const queryMetadata = await client.fetchMetadata(\n $Queries.queryAcceptsObject,\n );\n\n expectTypeOf(queryMetadata).toEqualTypeOf<QueryMetadata>();\n\n expect(queryMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"queryAcceptsObject\",\n \"description\": \"description of the query that takes object types\",\n \"displayName\": \"QueryAcceptsObject\",\n \"output\": {\n \"nullable\": false,\n \"object\": \"Employee\",\n \"type\": \"object\",\n },\n \"parameters\": {\n \"object\": {\n \"description\": undefined,\n \"nullable\": false,\n \"object\": \"Employee\",\n \"type\": \"object\",\n },\n },\n \"rid\": \"ri.function-registry.main.function.9b55870a-63c7-4d48-8f06-9627c0805968\",\n \"type\": \"query\",\n \"version\": \"0.11.0\",\n }\n `);\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,SACEA,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,QAAQ,QACH,4BAA4B;AACnC,SAASC,iBAAiB,EAAEC,kBAAkB,QAAQ,mBAAmB;AACzE,SAASC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,YAAY,EAAEC,EAAE,QAAQ,QAAQ;AAEtE,SAASC,YAAY,QAAQ,mBAAmB;AAEhDJ,QAAQ,CAAC,eAAe,EAAE,MAAM;EAC9B,IAAIK,MAAc;EAElBN,SAAS,CAAC,MAAM;IACd,MAAMO,SAAS,GAAGR,kBAAkB,CAAC,IAAID,iBAAiB,CAAC,CAAC,EAAEO,YAAY,CAAC;IAC3E,CAAC;MAAEC;IAAO,CAAC,GAAGC,SAAS;IACvB,OAAO,MAAM;MACXA,SAAS,CAACC,SAAS,CAACC,KAAK,CAAC,CAAC;IAC7B,CAAC;EACH,CAAC,CAAC;EAEFL,EAAE,CAAC,mCAAmC,EAAE,YAAY;IAClD,MAAMM,cAAc,GAAG,MAAMJ,MAAM,CAACK,aAAa,CAACf,QAAQ,CAACgB,QAAQ,CAAC;IAEpET,YAAY,CAACO,cAAc,CAAC,CAACG,aAAa,CAExC,CAAC;IAEHX,MAAM,CAACQ,cAAc,CAAC,CAACI,qBAAqB,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;EAEFV,EAAE,CAAC,sCAAsC,EAAE,YAAY;IACrD,MAAMW,iBAAiB,GAAG,MAAMT,MAAM,CAACK,aAAa,CAClDhB,WAAW,CAACqB,YACd,CAAC;IAEDb,YAAY,CAACY,iBAAiB,CAAC,CAACF,aAAa,CAE3C,CAAC;IAEHX,MAAM,CAACa,iBAAiB,CAAC,CAACD,qBAAqB,CAAC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;EAEFV,EAAE,CAAC,mCAAmC,EAAE,YAAY;IAClD,MAAMa,cAAc,GAAG,MAAMX,MAAM,CAACK,aAAa,CAC/CjB,QAAQ,CAACwB,UACX,CAAC;IAEDf,YAAY,CAACc,cAAc,CAAC,CAACJ,aAAa,CAAiB,CAAC;IAE5DX,MAAM,CAACe,cAAc,CAAC,CAACH,qBAAqB,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;EAEFV,EAAE,CAAC,kCAAkC,EAAE,YAAY;IACjD,MAAMe,aAAa,GAAG,MAAMb,MAAM,CAACK,aAAa,CAC9Cd,QAAQ,CAACuB,kBACX,CAAC;IAEDjB,YAAY,CAACgB,aAAa,CAAC,CAACN,aAAa,CAAgB,CAAC;IAE1DX,MAAM,CAACiB,aAAa,CAAC,CAACL,qBAAqB,CAAC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -16,12 +16,12 @@
16
16
 
17
17
  /* eslint-disable @typescript-eslint/no-deprecated */
18
18
 
19
- export { isOk } from "@osdk/api";
19
+ export { isOk, NULL_VALUE } from "@osdk/api";
20
20
  export { PalantirApiError } from "@osdk/shared.net.errors";
21
21
  export { ActionValidationError } from "./actions/ActionValidationError.js";
22
22
  export { createClient } from "./createClient.js";
23
23
  export { createPlatformClient } from "./createPlatformClient.js";
24
24
  export { createAttachmentUpload } from "./object/AttachmentUpload.js";
25
25
  export { extractDate, extractDateInLocalTime, extractDateInUTC } from "./util/datetimeConverters.js";
26
- export { createObjectSpecifierFromPrimaryKey } from "./util/objectSpecifierUtils.js";
26
+ export { createObjectSpecifierFromPrimaryKey, extractPrimaryKeyFromObjectSpecifier } from "./util/objectSpecifierUtils.js";
27
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["isOk","PalantirApiError","ActionValidationError","createClient","createPlatformClient","createAttachmentUpload","extractDate","extractDateInLocalTime","extractDateInUTC","createObjectSpecifierFromPrimaryKey"],"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 } 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 { createObjectSpecifierFromPrimaryKey } 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,QAAQ,WAAW;AAsChC,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,SAASC,mCAAmC,QAAQ,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":[]}