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

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