@osdk/client 2.1.0-beta.23 → 2.1.0-beta.25

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 (894) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/build/browser/Client.js +6 -0
  3. package/build/browser/Client.js.map +1 -1
  4. package/build/browser/Definitions.test.js +1 -0
  5. package/build/browser/Definitions.test.js.map +1 -1
  6. package/build/browser/Logger.js +0 -15
  7. package/build/browser/Logger.js.map +1 -1
  8. package/build/browser/MinimalClientContext.js +0 -15
  9. package/build/browser/MinimalClientContext.js.map +1 -1
  10. package/build/browser/ResultOrError.js +1 -0
  11. package/build/browser/ResultOrError.js.map +1 -1
  12. package/build/browser/SatisfiesSemver.js +0 -15
  13. package/build/browser/SatisfiesSemver.js.map +1 -1
  14. package/build/browser/SatisfiesSemver.test.js +1 -0
  15. package/build/browser/SatisfiesSemver.test.js.map +1 -1
  16. package/build/browser/__unstable/ConjureSupport.js +3 -0
  17. package/build/browser/__unstable/ConjureSupport.js.map +1 -1
  18. package/build/browser/__unstable/createBulkLinksAsyncIterFactory.js +4 -0
  19. package/build/browser/__unstable/createBulkLinksAsyncIterFactory.js.map +1 -1
  20. package/build/browser/actions/ActionValidationError.js +1 -1
  21. package/build/browser/actions/ActionValidationError.js.map +1 -1
  22. package/build/browser/actions/actions.test.js +30 -2
  23. package/build/browser/actions/actions.test.js.map +1 -1
  24. package/build/browser/actions/applyAction.js +1 -0
  25. package/build/browser/actions/applyAction.js.map +1 -1
  26. package/build/browser/createClient.js +10 -5
  27. package/build/browser/createClient.js.map +1 -1
  28. package/build/browser/createClient.test.js +1 -0
  29. package/build/browser/createClient.test.js.map +1 -1
  30. package/build/browser/createGeotimeSeriesProperty.js +1 -1
  31. package/build/browser/createGeotimeSeriesProperty.js.map +1 -1
  32. package/build/browser/createMediaReferenceProperty.js +1 -0
  33. package/build/browser/createMediaReferenceProperty.js.map +1 -1
  34. package/build/browser/createMinimalClient.js +2 -0
  35. package/build/browser/createMinimalClient.js.map +1 -1
  36. package/build/browser/createPlatformClient.js +1 -0
  37. package/build/browser/createPlatformClient.js.map +1 -1
  38. package/build/browser/createTimeseriesProperty.js +1 -0
  39. package/build/browser/createTimeseriesProperty.js.map +1 -1
  40. package/build/browser/definitions/LinkDefinitions.test.js +4 -0
  41. package/build/browser/definitions/LinkDefinitions.test.js.map +1 -1
  42. package/build/browser/fetchMetadata.js +2 -0
  43. package/build/browser/fetchMetadata.js.map +1 -1
  44. package/build/browser/fetchMetadata.test.js +5 -0
  45. package/build/browser/fetchMetadata.test.js.map +1 -1
  46. package/build/browser/index.js +1 -0
  47. package/build/browser/index.js.map +1 -1
  48. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.js +2 -0
  49. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.js.map +1 -1
  50. package/build/browser/intellisense.test.js +3 -0
  51. package/build/browser/intellisense.test.js.map +1 -1
  52. package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.js +2 -0
  53. package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.js.map +1 -1
  54. package/build/browser/internal/conversions/modernToLegacyAggregationClause.js +2 -0
  55. package/build/browser/internal/conversions/modernToLegacyAggregationClause.js.map +1 -1
  56. package/build/browser/internal/conversions/modernToLegacyGroupByClause.js +1 -0
  57. package/build/browser/internal/conversions/modernToLegacyGroupByClause.js.map +1 -1
  58. package/build/browser/internal/conversions/modernToLegacyWhereClause.js +3 -0
  59. package/build/browser/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
  60. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js +1 -0
  61. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -1
  62. package/build/browser/object/AttachmentUpload.js +1 -0
  63. package/build/browser/object/AttachmentUpload.js.map +1 -1
  64. package/build/browser/object/Cache.js +27 -0
  65. package/build/browser/object/Cache.js.map +1 -1
  66. package/build/browser/object/Cache.test.js +9 -0
  67. package/build/browser/object/Cache.test.js.map +1 -1
  68. package/build/browser/object/SimpleCache.js +20 -0
  69. package/build/browser/object/SimpleCache.js.map +1 -1
  70. package/build/browser/object/aggregate.js +3 -0
  71. package/build/browser/object/aggregate.js.map +1 -1
  72. package/build/browser/object/aggregate.test.js +5 -0
  73. package/build/browser/object/aggregate.test.js.map +1 -1
  74. package/build/browser/object/attachment.test.js +1 -0
  75. package/build/browser/object/attachment.test.js.map +1 -1
  76. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.js +0 -15
  77. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -1
  78. package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.js +4 -0
  79. package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.js.map +1 -1
  80. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.js +0 -15
  81. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.js.map +1 -1
  82. package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js +2 -0
  83. package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js.map +1 -1
  84. package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js +0 -15
  85. package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js.map +1 -1
  86. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js +1 -0
  87. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  88. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.test.js +1 -0
  89. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.test.js.map +1 -1
  90. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js +4 -0
  91. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  92. package/build/browser/object/convertWireToOsdkObjects/getDollarAs.js +6 -0
  93. package/build/browser/object/convertWireToOsdkObjects/getDollarAs.js.map +1 -1
  94. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.js +1 -0
  95. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.js.map +1 -1
  96. package/build/browser/object/convertWireToOsdkObjects.js +11 -0
  97. package/build/browser/object/convertWireToOsdkObjects.js.map +1 -1
  98. package/build/browser/object/convertWireToOsdkObjects.test.js +3 -0
  99. package/build/browser/object/convertWireToOsdkObjects.test.js.map +1 -1
  100. package/build/browser/object/fetchPage.js +7 -0
  101. package/build/browser/object/fetchPage.js.map +1 -1
  102. package/build/browser/object/fetchPage.test.js +5 -0
  103. package/build/browser/object/fetchPage.test.js.map +1 -1
  104. package/build/browser/object/fetchSingle.js +3 -0
  105. package/build/browser/object/fetchSingle.js.map +1 -1
  106. package/build/browser/object/geotimeseriesreference.test.js +2 -0
  107. package/build/browser/object/geotimeseriesreference.test.js.map +1 -1
  108. package/build/browser/object/media.test.js +1 -0
  109. package/build/browser/object/media.test.js.map +1 -1
  110. package/build/browser/object/object.test.js +8 -0
  111. package/build/browser/object/object.test.js.map +1 -1
  112. package/build/browser/object/timeseries.test.js +1 -0
  113. package/build/browser/object/timeseries.test.js.map +1 -1
  114. package/build/browser/objectSet/InterfaceObjectSet.test.js +4 -0
  115. package/build/browser/objectSet/InterfaceObjectSet.test.js.map +1 -1
  116. package/build/browser/objectSet/ObjectSet.test.js +13 -0
  117. package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
  118. package/build/browser/objectSet/ObjectSetFactory.js +0 -15
  119. package/build/browser/objectSet/ObjectSetFactory.js.map +1 -1
  120. package/build/browser/objectSet/ObjectSetListenerWebsocket.js +18 -1
  121. package/build/browser/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
  122. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js +8 -1
  123. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -1
  124. package/build/browser/objectSet/conjureUnionType.js +1 -0
  125. package/build/browser/objectSet/conjureUnionType.js.map +1 -1
  126. package/build/browser/objectSet/createObjectSet.js +5 -0
  127. package/build/browser/objectSet/createObjectSet.js.map +1 -1
  128. package/build/browser/ontology/OntologyProvider.js +1 -0
  129. package/build/browser/ontology/OntologyProvider.js.map +1 -1
  130. package/build/browser/ontology/StandardOntologyProvider.js +2 -0
  131. package/build/browser/ontology/StandardOntologyProvider.js.map +1 -1
  132. package/build/browser/ontology/StandardOntologyProvider.test.js +2 -0
  133. package/build/browser/ontology/StandardOntologyProvider.test.js.map +1 -1
  134. package/build/browser/ontology/loadActionMetadata.js +1 -0
  135. package/build/browser/ontology/loadActionMetadata.js.map +1 -1
  136. package/build/browser/ontology/loadFullObjectMetadata.js +1 -0
  137. package/build/browser/ontology/loadFullObjectMetadata.js.map +1 -1
  138. package/build/browser/ontology/loadInterfaceMetadata.js +1 -0
  139. package/build/browser/ontology/loadInterfaceMetadata.js.map +1 -1
  140. package/build/browser/ontology/loadQueryMetadata.js +1 -0
  141. package/build/browser/ontology/loadQueryMetadata.js.map +1 -1
  142. package/build/browser/ontology/makeConjureContext.js +1 -0
  143. package/build/browser/ontology/makeConjureContext.js.map +1 -1
  144. package/build/browser/pageRequestAsAsyncIter.js +1 -0
  145. package/build/browser/pageRequestAsAsyncIter.js.map +1 -1
  146. package/build/browser/public/internal.js +1 -0
  147. package/build/browser/public/internal.js.map +1 -1
  148. package/build/browser/public/unstable-do-not-use.js +1 -0
  149. package/build/browser/public/unstable-do-not-use.js.map +1 -1
  150. package/build/browser/public-utils/createAndFetchTempObjectSetRid.js +2 -0
  151. package/build/browser/public-utils/createAndFetchTempObjectSetRid.js.map +1 -1
  152. package/build/browser/public-utils/hydrateAttachmentFromRid.js +2 -0
  153. package/build/browser/public-utils/hydrateAttachmentFromRid.js.map +1 -1
  154. package/build/browser/public-utils/hydrateObjectSetFromRid.js +2 -0
  155. package/build/browser/public-utils/hydrateObjectSetFromRid.js.map +1 -1
  156. package/build/browser/queries/applyQuery.js +1 -0
  157. package/build/browser/queries/applyQuery.js.map +1 -1
  158. package/build/browser/queries/queries.test.js +2 -0
  159. package/build/browser/queries/queries.test.js.map +1 -1
  160. package/build/browser/queries/types.js +0 -15
  161. package/build/browser/queries/types.js.map +1 -1
  162. package/build/browser/tsserver.js +1 -0
  163. package/build/browser/tsserver.js.map +1 -1
  164. package/build/browser/util/ArrayElement.js +0 -15
  165. package/build/browser/util/ArrayElement.js.map +1 -1
  166. package/build/browser/util/NOOP.js +0 -15
  167. package/build/browser/util/NOOP.js.map +1 -1
  168. package/build/browser/util/NullableProps.js +0 -15
  169. package/build/browser/util/NullableProps.js.map +1 -1
  170. package/build/browser/util/UserAgent.js +2 -1
  171. package/build/browser/util/UserAgent.js.map +1 -1
  172. package/build/browser/util/WireObjectSet.js +2 -0
  173. package/build/browser/util/WireObjectSet.js.map +1 -1
  174. package/build/browser/util/addUserAgentAndRequestContextHeaders.js +1 -0
  175. package/build/browser/util/addUserAgentAndRequestContextHeaders.js.map +1 -1
  176. package/build/browser/util/augmentRequestContext.js +1 -0
  177. package/build/browser/util/augmentRequestContext.js.map +1 -1
  178. package/build/browser/util/datetimeConverters.js +5 -0
  179. package/build/browser/util/datetimeConverters.js.map +1 -1
  180. package/build/browser/util/datetimeConverters.test.js +1 -0
  181. package/build/browser/util/datetimeConverters.test.js.map +1 -1
  182. package/build/browser/util/interfaceUtils.js +21 -0
  183. package/build/browser/util/interfaceUtils.js.map +1 -0
  184. package/build/browser/util/isOntologyObjectV2.js +1 -0
  185. package/build/browser/util/isOntologyObjectV2.js.map +1 -1
  186. package/build/browser/util/isOsdkBaseObject.js +1 -0
  187. package/build/browser/util/isOsdkBaseObject.js.map +1 -1
  188. package/build/browser/util/isOsdkObject.js +1 -0
  189. package/build/browser/util/isOsdkObject.js.map +1 -1
  190. package/build/browser/util/objectSetUtils.js +1 -0
  191. package/build/browser/util/objectSetUtils.js.map +1 -1
  192. package/build/browser/util/partialBy.js +0 -15
  193. package/build/browser/util/partialBy.js.map +1 -1
  194. package/build/browser/util/streamutils.js +7 -0
  195. package/build/browser/util/streamutils.js.map +1 -1
  196. package/build/browser/util/timeseriesUtils.js +1 -0
  197. package/build/browser/util/timeseriesUtils.js.map +1 -1
  198. package/build/browser/util/toDataValue.js +17 -1
  199. package/build/browser/util/toDataValue.js.map +1 -1
  200. package/build/browser/util/toDataValue.test.js +1 -0
  201. package/build/browser/util/toDataValue.test.js.map +1 -1
  202. package/build/browser/util/toDataValueQueries.js +3 -0
  203. package/build/browser/util/toDataValueQueries.js.map +1 -1
  204. package/build/cjs/Client-BZcoRu7n.d.cts +67 -0
  205. package/build/cjs/chunk-Q4BVHDNO.cjs +460 -0
  206. package/build/cjs/chunk-Q4BVHDNO.cjs.map +1 -0
  207. package/build/cjs/chunk-RWHJNRHF.cjs +887 -0
  208. package/build/cjs/chunk-RWHJNRHF.cjs.map +1 -0
  209. package/build/cjs/index.cjs +1628 -0
  210. package/build/cjs/index.cjs.map +1 -0
  211. package/build/cjs/index.d.cts +85 -0
  212. package/build/cjs/public/internal.cjs +35 -0
  213. package/build/cjs/public/internal.cjs.map +1 -0
  214. package/build/cjs/public/internal.d.cts +33 -0
  215. package/build/cjs/public/unstable-do-not-use.cjs +12 -0
  216. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -0
  217. package/build/cjs/public/unstable-do-not-use.d.cts +5 -0
  218. package/build/esm/Client.js +6 -0
  219. package/build/esm/Client.js.map +1 -1
  220. package/build/esm/Definitions.test.js +1 -0
  221. package/build/esm/Definitions.test.js.map +1 -1
  222. package/build/esm/Logger.js +0 -15
  223. package/build/esm/Logger.js.map +1 -1
  224. package/build/esm/MinimalClientContext.js +0 -15
  225. package/build/esm/MinimalClientContext.js.map +1 -1
  226. package/build/esm/ResultOrError.js +1 -0
  227. package/build/esm/ResultOrError.js.map +1 -1
  228. package/build/esm/SatisfiesSemver.js +0 -15
  229. package/build/esm/SatisfiesSemver.js.map +1 -1
  230. package/build/esm/SatisfiesSemver.test.js +1 -0
  231. package/build/esm/SatisfiesSemver.test.js.map +1 -1
  232. package/build/esm/__unstable/ConjureSupport.js +3 -0
  233. package/build/esm/__unstable/ConjureSupport.js.map +1 -1
  234. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.js +4 -0
  235. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.js.map +1 -1
  236. package/build/esm/actions/ActionValidationError.js +1 -1
  237. package/build/esm/actions/ActionValidationError.js.map +1 -1
  238. package/build/esm/actions/actions.test.js +30 -2
  239. package/build/esm/actions/actions.test.js.map +1 -1
  240. package/build/esm/actions/applyAction.js +1 -0
  241. package/build/esm/actions/applyAction.js.map +1 -1
  242. package/build/esm/createClient.js +10 -5
  243. package/build/esm/createClient.js.map +1 -1
  244. package/build/esm/createClient.test.js +1 -0
  245. package/build/esm/createClient.test.js.map +1 -1
  246. package/build/esm/createGeotimeSeriesProperty.js +1 -1
  247. package/build/esm/createGeotimeSeriesProperty.js.map +1 -1
  248. package/build/esm/createMediaReferenceProperty.js +1 -0
  249. package/build/esm/createMediaReferenceProperty.js.map +1 -1
  250. package/build/esm/createMinimalClient.js +2 -0
  251. package/build/esm/createMinimalClient.js.map +1 -1
  252. package/build/esm/createPlatformClient.js +1 -0
  253. package/build/esm/createPlatformClient.js.map +1 -1
  254. package/build/esm/createTimeseriesProperty.js +1 -0
  255. package/build/esm/createTimeseriesProperty.js.map +1 -1
  256. package/build/esm/definitions/LinkDefinitions.test.js +4 -0
  257. package/build/esm/definitions/LinkDefinitions.test.js.map +1 -1
  258. package/build/esm/fetchMetadata.js +2 -0
  259. package/build/esm/fetchMetadata.js.map +1 -1
  260. package/build/esm/fetchMetadata.test.js +5 -0
  261. package/build/esm/fetchMetadata.test.js.map +1 -1
  262. package/build/esm/index.js +1 -0
  263. package/build/esm/index.js.map +1 -1
  264. package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.js +2 -0
  265. package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.js.map +1 -1
  266. package/build/esm/intellisense.test.js +3 -0
  267. package/build/esm/intellisense.test.js.map +1 -1
  268. package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.js +2 -0
  269. package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.js.map +1 -1
  270. package/build/esm/internal/conversions/modernToLegacyAggregationClause.js +2 -0
  271. package/build/esm/internal/conversions/modernToLegacyAggregationClause.js.map +1 -1
  272. package/build/esm/internal/conversions/modernToLegacyGroupByClause.js +1 -0
  273. package/build/esm/internal/conversions/modernToLegacyGroupByClause.js.map +1 -1
  274. package/build/esm/internal/conversions/modernToLegacyWhereClause.js +3 -0
  275. package/build/esm/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
  276. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js +1 -0
  277. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -1
  278. package/build/esm/object/AttachmentUpload.js +1 -0
  279. package/build/esm/object/AttachmentUpload.js.map +1 -1
  280. package/build/esm/object/Cache.js +27 -0
  281. package/build/esm/object/Cache.js.map +1 -1
  282. package/build/esm/object/Cache.test.js +9 -0
  283. package/build/esm/object/Cache.test.js.map +1 -1
  284. package/build/esm/object/SimpleCache.js +20 -0
  285. package/build/esm/object/SimpleCache.js.map +1 -1
  286. package/build/esm/object/aggregate.js +3 -0
  287. package/build/esm/object/aggregate.js.map +1 -1
  288. package/build/esm/object/aggregate.test.js +5 -0
  289. package/build/esm/object/aggregate.test.js.map +1 -1
  290. package/build/esm/object/attachment.test.js +1 -0
  291. package/build/esm/object/attachment.test.js.map +1 -1
  292. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js +0 -15
  293. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -1
  294. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.js +4 -0
  295. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.js.map +1 -1
  296. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.js +0 -15
  297. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.js.map +1 -1
  298. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js +2 -0
  299. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js.map +1 -1
  300. package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js +0 -15
  301. package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js.map +1 -1
  302. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js +1 -0
  303. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  304. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.test.js +1 -0
  305. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.test.js.map +1 -1
  306. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js +4 -0
  307. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  308. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.js +6 -0
  309. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.js.map +1 -1
  310. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.js +1 -0
  311. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.js.map +1 -1
  312. package/build/esm/object/convertWireToOsdkObjects.js +11 -0
  313. package/build/esm/object/convertWireToOsdkObjects.js.map +1 -1
  314. package/build/esm/object/convertWireToOsdkObjects.test.js +3 -0
  315. package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -1
  316. package/build/esm/object/fetchPage.js +7 -0
  317. package/build/esm/object/fetchPage.js.map +1 -1
  318. package/build/esm/object/fetchPage.test.js +5 -0
  319. package/build/esm/object/fetchPage.test.js.map +1 -1
  320. package/build/esm/object/fetchSingle.js +3 -0
  321. package/build/esm/object/fetchSingle.js.map +1 -1
  322. package/build/esm/object/geotimeseriesreference.test.js +2 -0
  323. package/build/esm/object/geotimeseriesreference.test.js.map +1 -1
  324. package/build/esm/object/media.test.js +1 -0
  325. package/build/esm/object/media.test.js.map +1 -1
  326. package/build/esm/object/object.test.js +8 -0
  327. package/build/esm/object/object.test.js.map +1 -1
  328. package/build/esm/object/timeseries.test.js +1 -0
  329. package/build/esm/object/timeseries.test.js.map +1 -1
  330. package/build/esm/objectSet/InterfaceObjectSet.test.js +4 -0
  331. package/build/esm/objectSet/InterfaceObjectSet.test.js.map +1 -1
  332. package/build/esm/objectSet/ObjectSet.test.js +13 -0
  333. package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
  334. package/build/esm/objectSet/ObjectSetFactory.js +0 -15
  335. package/build/esm/objectSet/ObjectSetFactory.js.map +1 -1
  336. package/build/esm/objectSet/ObjectSetListenerWebsocket.js +18 -1
  337. package/build/esm/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
  338. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js +8 -1
  339. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -1
  340. package/build/esm/objectSet/conjureUnionType.js +1 -0
  341. package/build/esm/objectSet/conjureUnionType.js.map +1 -1
  342. package/build/esm/objectSet/createObjectSet.js +5 -0
  343. package/build/esm/objectSet/createObjectSet.js.map +1 -1
  344. package/build/esm/ontology/OntologyProvider.js +1 -0
  345. package/build/esm/ontology/OntologyProvider.js.map +1 -1
  346. package/build/esm/ontology/StandardOntologyProvider.js +2 -0
  347. package/build/esm/ontology/StandardOntologyProvider.js.map +1 -1
  348. package/build/esm/ontology/StandardOntologyProvider.test.js +2 -0
  349. package/build/esm/ontology/StandardOntologyProvider.test.js.map +1 -1
  350. package/build/esm/ontology/loadActionMetadata.js +1 -0
  351. package/build/esm/ontology/loadActionMetadata.js.map +1 -1
  352. package/build/esm/ontology/loadFullObjectMetadata.js +1 -0
  353. package/build/esm/ontology/loadFullObjectMetadata.js.map +1 -1
  354. package/build/esm/ontology/loadInterfaceMetadata.js +1 -0
  355. package/build/esm/ontology/loadInterfaceMetadata.js.map +1 -1
  356. package/build/esm/ontology/loadQueryMetadata.js +1 -0
  357. package/build/esm/ontology/loadQueryMetadata.js.map +1 -1
  358. package/build/esm/ontology/makeConjureContext.js +1 -0
  359. package/build/esm/ontology/makeConjureContext.js.map +1 -1
  360. package/build/esm/pageRequestAsAsyncIter.js +1 -0
  361. package/build/esm/pageRequestAsAsyncIter.js.map +1 -1
  362. package/build/esm/public/internal.js +1 -0
  363. package/build/esm/public/internal.js.map +1 -1
  364. package/build/esm/public/unstable-do-not-use.js +1 -0
  365. package/build/esm/public/unstable-do-not-use.js.map +1 -1
  366. package/build/esm/public-utils/createAndFetchTempObjectSetRid.js +2 -0
  367. package/build/esm/public-utils/createAndFetchTempObjectSetRid.js.map +1 -1
  368. package/build/esm/public-utils/hydrateAttachmentFromRid.js +2 -0
  369. package/build/esm/public-utils/hydrateAttachmentFromRid.js.map +1 -1
  370. package/build/esm/public-utils/hydrateObjectSetFromRid.js +2 -0
  371. package/build/esm/public-utils/hydrateObjectSetFromRid.js.map +1 -1
  372. package/build/esm/queries/applyQuery.js +1 -0
  373. package/build/esm/queries/applyQuery.js.map +1 -1
  374. package/build/esm/queries/queries.test.js +2 -0
  375. package/build/esm/queries/queries.test.js.map +1 -1
  376. package/build/esm/queries/types.js +0 -15
  377. package/build/esm/queries/types.js.map +1 -1
  378. package/build/esm/tsserver.js +1 -0
  379. package/build/esm/tsserver.js.map +1 -1
  380. package/build/esm/util/ArrayElement.js +0 -15
  381. package/build/esm/util/ArrayElement.js.map +1 -1
  382. package/build/esm/util/NOOP.js +0 -15
  383. package/build/esm/util/NOOP.js.map +1 -1
  384. package/build/esm/util/NullableProps.js +0 -15
  385. package/build/esm/util/NullableProps.js.map +1 -1
  386. package/build/esm/util/UserAgent.js +2 -1
  387. package/build/esm/util/UserAgent.js.map +1 -1
  388. package/build/esm/util/WireObjectSet.js +2 -0
  389. package/build/esm/util/WireObjectSet.js.map +1 -1
  390. package/build/esm/util/addUserAgentAndRequestContextHeaders.js +1 -0
  391. package/build/esm/util/addUserAgentAndRequestContextHeaders.js.map +1 -1
  392. package/build/esm/util/augmentRequestContext.js +1 -0
  393. package/build/esm/util/augmentRequestContext.js.map +1 -1
  394. package/build/esm/util/datetimeConverters.js +5 -0
  395. package/build/esm/util/datetimeConverters.js.map +1 -1
  396. package/build/esm/util/datetimeConverters.test.js +1 -0
  397. package/build/esm/util/datetimeConverters.test.js.map +1 -1
  398. package/build/esm/util/interfaceUtils.js +21 -0
  399. package/build/esm/util/interfaceUtils.js.map +1 -0
  400. package/build/esm/util/isOntologyObjectV2.js +1 -0
  401. package/build/esm/util/isOntologyObjectV2.js.map +1 -1
  402. package/build/esm/util/isOsdkBaseObject.js +1 -0
  403. package/build/esm/util/isOsdkBaseObject.js.map +1 -1
  404. package/build/esm/util/isOsdkObject.js +1 -0
  405. package/build/esm/util/isOsdkObject.js.map +1 -1
  406. package/build/esm/util/objectSetUtils.js +1 -0
  407. package/build/esm/util/objectSetUtils.js.map +1 -1
  408. package/build/esm/util/partialBy.js +0 -15
  409. package/build/esm/util/partialBy.js.map +1 -1
  410. package/build/esm/util/streamutils.js +7 -0
  411. package/build/esm/util/streamutils.js.map +1 -1
  412. package/build/esm/util/timeseriesUtils.js +1 -0
  413. package/build/esm/util/timeseriesUtils.js.map +1 -1
  414. package/build/esm/util/toDataValue.js +17 -1
  415. package/build/esm/util/toDataValue.js.map +1 -1
  416. package/build/esm/util/toDataValue.test.js +1 -0
  417. package/build/esm/util/toDataValue.test.js.map +1 -1
  418. package/build/esm/util/toDataValueQueries.js +3 -0
  419. package/build/esm/util/toDataValueQueries.js.map +1 -1
  420. package/build/types/Client.d.ts +20 -0
  421. package/build/types/Definitions.test.d.ts +1 -0
  422. package/build/types/Logger.d.ts +18 -0
  423. package/build/types/MinimalClientContext.d.ts +21 -0
  424. package/build/types/ResultOrError.d.ts +9 -0
  425. package/build/types/SatisfiesSemver.d.ts +10 -0
  426. package/build/types/SatisfiesSemver.test.d.ts +1 -0
  427. package/build/types/__unstable/ConjureSupport.d.ts +37 -0
  428. package/build/{browser → types}/__unstable/createBulkLinksAsyncIterFactory.d.ts +0 -1
  429. package/build/types/actions/ActionValidationError.d.ts +5 -0
  430. package/build/types/actions/actions.test.d.ts +1 -0
  431. package/build/{esm → types}/actions/applyAction.d.ts +16 -15
  432. package/build/{browser → types}/createClient.d.ts +1 -4
  433. package/build/types/createClient.test.d.ts +1 -0
  434. package/build/types/createGeotimeSeriesProperty.d.ts +13 -0
  435. package/build/types/createMediaReferenceProperty.d.ts +13 -0
  436. package/build/types/createMinimalClient.d.ts +1 -0
  437. package/build/types/createPlatformClient.d.ts +15 -0
  438. package/build/types/createTimeseriesProperty.d.ts +13 -0
  439. package/build/types/definitions/LinkDefinitions.test.d.ts +1 -0
  440. package/build/types/fetchMetadata.d.ts +1 -0
  441. package/build/types/fetchMetadata.test.d.ts +1 -0
  442. package/build/types/index.d.ts +12 -0
  443. package/build/types/intellisense.test.d.ts +1 -0
  444. package/build/types/intellisense.test.helpers/callsQueryAcceptsObject.d.ts +1 -0
  445. package/build/types/internal/conversions/legacyToModernSingleAggregationResult.d.ts +1 -0
  446. package/build/types/internal/conversions/modernToLegacyAggregationClause.d.ts +1 -0
  447. package/build/types/internal/conversions/modernToLegacyGroupByClause.d.ts +1 -0
  448. package/build/{browser → types}/internal/conversions/modernToLegacyWhereClause.d.ts +0 -1
  449. package/build/types/internal/conversions/modernToLegacyWhereClause.test.d.ts +1 -0
  450. package/build/{browser → types}/object/AttachmentUpload.d.ts +0 -1
  451. package/build/types/object/Cache.d.ts +17 -0
  452. package/build/types/object/Cache.test.d.ts +8 -0
  453. package/build/types/object/SimpleCache.d.ts +52 -0
  454. package/build/types/object/aggregate.d.ts +1 -0
  455. package/build/types/object/aggregate.test.d.ts +1 -0
  456. package/build/types/object/attachment.test.d.ts +1 -0
  457. package/build/types/object/convertWireToOsdkObjects/InterfaceHolder.d.ts +1 -0
  458. package/build/{browser → types}/object/convertWireToOsdkObjects/InternalSymbols.d.ts +3 -4
  459. package/build/types/object/convertWireToOsdkObjects/ObjectHolder.d.ts +1 -0
  460. package/build/{esm → types}/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts +8 -11
  461. package/build/types/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts +5 -0
  462. package/build/types/object/convertWireToOsdkObjects/createOsdkInterface.d.ts +1 -0
  463. package/build/types/object/convertWireToOsdkObjects/createOsdkInterface.test.d.ts +1 -0
  464. package/build/types/object/convertWireToOsdkObjects/createOsdkObject.d.ts +1 -0
  465. package/build/{browser → types}/object/convertWireToOsdkObjects/getDollarAs.d.ts +0 -1
  466. package/build/types/object/convertWireToOsdkObjects/getDollarLink.d.ts +1 -0
  467. package/build/types/object/convertWireToOsdkObjects.d.ts +1 -0
  468. package/build/types/object/convertWireToOsdkObjects.test.d.ts +1 -0
  469. package/build/types/object/fetchPage.d.ts +5 -0
  470. package/build/types/object/fetchPage.test.d.ts +1 -0
  471. package/build/types/object/fetchSingle.d.ts +1 -0
  472. package/build/types/object/geotimeseriesreference.test.d.ts +1 -0
  473. package/build/types/object/media.test.d.ts +1 -0
  474. package/build/{esm → types}/object/object.test.d.ts +0 -1
  475. package/build/types/object/timeseries.test.d.ts +1 -0
  476. package/build/types/objectSet/InterfaceObjectSet.test.d.ts +1 -0
  477. package/build/types/objectSet/ObjectSet.test.d.ts +7 -0
  478. package/build/types/objectSet/ObjectSetFactory.d.ts +1 -0
  479. package/build/types/objectSet/ObjectSetListenerWebsocket.d.ts +1 -0
  480. package/build/types/objectSet/ObjectSetListenerWebsocket.test.d.ts +1 -0
  481. package/build/types/objectSet/conjureUnionType.d.ts +11 -0
  482. package/build/types/objectSet/createObjectSet.d.ts +1 -0
  483. package/build/types/ontology/OntologyProvider.d.ts +27 -0
  484. package/build/{browser → types}/ontology/StandardOntologyProvider.d.ts +1 -3
  485. package/build/types/ontology/StandardOntologyProvider.test.d.ts +1 -0
  486. package/build/{browser → types}/ontology/loadActionMetadata.d.ts +0 -1
  487. package/build/{esm → types}/ontology/loadFullObjectMetadata.d.ts +1 -4
  488. package/build/{esm → types}/ontology/loadInterfaceMetadata.d.ts +0 -1
  489. package/build/{browser → types}/ontology/loadQueryMetadata.d.ts +0 -1
  490. package/build/{browser → types}/ontology/makeConjureContext.d.ts +0 -1
  491. package/build/types/pageRequestAsAsyncIter.d.ts +10 -0
  492. package/build/{browser → types}/public/internal.d.ts +0 -1
  493. package/build/{browser → types}/public/unstable-do-not-use.d.ts +0 -1
  494. package/build/{esm → types}/public-utils/createAndFetchTempObjectSetRid.d.ts +6 -7
  495. package/build/types/public-utils/hydrateAttachmentFromRid.d.ts +9 -0
  496. package/build/types/public-utils/hydrateObjectSetFromRid.d.ts +10 -0
  497. package/build/{browser → types}/queries/applyQuery.d.ts +4 -2
  498. package/build/types/queries/queries.test.d.ts +1 -0
  499. package/build/{esm → types}/queries/types.d.ts +3 -12
  500. package/build/{browser → types}/tsserver.d.ts +18 -18
  501. package/build/{browser → types}/util/ArrayElement.d.ts +0 -1
  502. package/build/types/util/NOOP.d.ts +1 -0
  503. package/build/types/util/NullableProps.d.ts +1 -0
  504. package/build/{browser → types}/util/UserAgent.d.ts +0 -1
  505. package/build/types/util/WireObjectSet.d.ts +1 -0
  506. package/build/{esm → types}/util/addUserAgentAndRequestContextHeaders.d.ts +0 -1
  507. package/build/{browser → types}/util/augmentRequestContext.d.ts +6 -7
  508. package/build/types/util/datetimeConverters.d.ts +21 -0
  509. package/build/types/util/datetimeConverters.test.d.ts +1 -0
  510. package/build/types/util/interfaceUtils.d.ts +1 -0
  511. package/build/types/util/isOntologyObjectV2.d.ts +1 -0
  512. package/build/{esm/util/isOsdkObject.d.ts → types/util/isOsdkBaseObject.d.ts} +0 -1
  513. package/build/{browser → types}/util/isOsdkObject.d.ts +0 -1
  514. package/build/{browser → types}/util/objectSetUtils.d.ts +0 -1
  515. package/build/types/util/partialBy.d.ts +8 -0
  516. package/build/{browser → types}/util/streamutils.d.ts +0 -1
  517. package/build/{browser → types}/util/timeseriesUtils.d.ts +2 -3
  518. package/build/types/util/toDataValue.d.ts +1 -0
  519. package/build/types/util/toDataValue.test.d.ts +1 -0
  520. package/build/types/util/toDataValueQueries.d.ts +1 -0
  521. package/index.d.ts +17 -0
  522. package/internal.d.ts +17 -0
  523. package/package.json +47 -16
  524. package/unstable-do-not-use.d.ts +1 -1
  525. package/build/browser/Client.d.ts +0 -23
  526. package/build/browser/Client.d.ts.map +0 -1
  527. package/build/browser/Definitions.test.d.ts +0 -2
  528. package/build/browser/Definitions.test.d.ts.map +0 -1
  529. package/build/browser/Logger.d.ts +0 -19
  530. package/build/browser/Logger.d.ts.map +0 -1
  531. package/build/browser/MinimalClientContext.d.ts +0 -26
  532. package/build/browser/MinimalClientContext.d.ts.map +0 -1
  533. package/build/browser/ResultOrError.d.ts +0 -12
  534. package/build/browser/ResultOrError.d.ts.map +0 -1
  535. package/build/browser/SatisfiesSemver.d.ts +0 -4
  536. package/build/browser/SatisfiesSemver.d.ts.map +0 -1
  537. package/build/browser/SatisfiesSemver.test.d.ts +0 -2
  538. package/build/browser/SatisfiesSemver.test.d.ts.map +0 -1
  539. package/build/browser/__unstable/ConjureSupport.d.ts +0 -38
  540. package/build/browser/__unstable/ConjureSupport.d.ts.map +0 -1
  541. package/build/browser/__unstable/createBulkLinksAsyncIterFactory.d.ts.map +0 -1
  542. package/build/browser/actions/ActionValidationError.d.ts +0 -6
  543. package/build/browser/actions/ActionValidationError.d.ts.map +0 -1
  544. package/build/browser/actions/actions.test.d.ts +0 -2
  545. package/build/browser/actions/actions.test.d.ts.map +0 -1
  546. package/build/browser/actions/applyAction.d.ts +0 -30
  547. package/build/browser/actions/applyAction.d.ts.map +0 -1
  548. package/build/browser/createClient.d.ts.map +0 -1
  549. package/build/browser/createClient.test.d.ts +0 -2
  550. package/build/browser/createClient.test.d.ts.map +0 -1
  551. package/build/browser/createGeotimeSeriesProperty.d.ts +0 -14
  552. package/build/browser/createGeotimeSeriesProperty.d.ts.map +0 -1
  553. package/build/browser/createMediaReferenceProperty.d.ts +0 -14
  554. package/build/browser/createMediaReferenceProperty.d.ts.map +0 -1
  555. package/build/browser/createMinimalClient.d.ts +0 -2
  556. package/build/browser/createMinimalClient.d.ts.map +0 -1
  557. package/build/browser/createPlatformClient.d.ts +0 -17
  558. package/build/browser/createPlatformClient.d.ts.map +0 -1
  559. package/build/browser/createTimeseriesProperty.d.ts +0 -14
  560. package/build/browser/createTimeseriesProperty.d.ts.map +0 -1
  561. package/build/browser/definitions/LinkDefinitions.test.d.ts +0 -2
  562. package/build/browser/definitions/LinkDefinitions.test.d.ts.map +0 -1
  563. package/build/browser/fetchMetadata.d.ts +0 -2
  564. package/build/browser/fetchMetadata.d.ts.map +0 -1
  565. package/build/browser/fetchMetadata.test.d.ts +0 -2
  566. package/build/browser/fetchMetadata.test.d.ts.map +0 -1
  567. package/build/browser/index.d.ts +0 -13
  568. package/build/browser/index.d.ts.map +0 -1
  569. package/build/browser/intellisense.test.d.ts +0 -2
  570. package/build/browser/intellisense.test.d.ts.map +0 -1
  571. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.d.ts +0 -2
  572. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.d.ts.map +0 -1
  573. package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.d.ts +0 -2
  574. package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.d.ts.map +0 -1
  575. package/build/browser/internal/conversions/modernToLegacyAggregationClause.d.ts +0 -2
  576. package/build/browser/internal/conversions/modernToLegacyAggregationClause.d.ts.map +0 -1
  577. package/build/browser/internal/conversions/modernToLegacyGroupByClause.d.ts +0 -2
  578. package/build/browser/internal/conversions/modernToLegacyGroupByClause.d.ts.map +0 -1
  579. package/build/browser/internal/conversions/modernToLegacyWhereClause.d.ts.map +0 -1
  580. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.d.ts +0 -2
  581. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.d.ts.map +0 -1
  582. package/build/browser/object/AttachmentUpload.d.ts.map +0 -1
  583. package/build/browser/object/Cache.d.ts +0 -2
  584. package/build/browser/object/Cache.d.ts.map +0 -1
  585. package/build/browser/object/Cache.test.d.ts +0 -11
  586. package/build/browser/object/Cache.test.d.ts.map +0 -1
  587. package/build/browser/object/SimpleCache.d.ts +0 -38
  588. package/build/browser/object/SimpleCache.d.ts.map +0 -1
  589. package/build/browser/object/aggregate.d.ts +0 -2
  590. package/build/browser/object/aggregate.d.ts.map +0 -1
  591. package/build/browser/object/aggregate.test.d.ts +0 -2
  592. package/build/browser/object/aggregate.test.d.ts.map +0 -1
  593. package/build/browser/object/attachment.test.d.ts +0 -2
  594. package/build/browser/object/attachment.test.d.ts.map +0 -1
  595. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.d.ts +0 -2
  596. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.d.ts.map +0 -1
  597. package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.d.ts.map +0 -1
  598. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.d.ts +0 -2
  599. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.d.ts.map +0 -1
  600. package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts +0 -18
  601. package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts.map +0 -1
  602. package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts +0 -8
  603. package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts.map +0 -1
  604. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.d.ts +0 -2
  605. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.d.ts.map +0 -1
  606. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.test.d.ts +0 -2
  607. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.test.d.ts.map +0 -1
  608. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.d.ts +0 -2
  609. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.d.ts.map +0 -1
  610. package/build/browser/object/convertWireToOsdkObjects/getDollarAs.d.ts.map +0 -1
  611. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.d.ts +0 -2
  612. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.d.ts.map +0 -1
  613. package/build/browser/object/convertWireToOsdkObjects.d.ts +0 -2
  614. package/build/browser/object/convertWireToOsdkObjects.d.ts.map +0 -1
  615. package/build/browser/object/convertWireToOsdkObjects.test.d.ts +0 -2
  616. package/build/browser/object/convertWireToOsdkObjects.test.d.ts.map +0 -1
  617. package/build/browser/object/fetchPage.d.ts +0 -3
  618. package/build/browser/object/fetchPage.d.ts.map +0 -1
  619. package/build/browser/object/fetchPage.test.d.ts +0 -2
  620. package/build/browser/object/fetchPage.test.d.ts.map +0 -1
  621. package/build/browser/object/fetchSingle.d.ts +0 -2
  622. package/build/browser/object/fetchSingle.d.ts.map +0 -1
  623. package/build/browser/object/geotimeseriesreference.test.d.ts +0 -2
  624. package/build/browser/object/geotimeseriesreference.test.d.ts.map +0 -1
  625. package/build/browser/object/media.test.d.ts +0 -2
  626. package/build/browser/object/media.test.d.ts.map +0 -1
  627. package/build/browser/object/object.test.d.ts +0 -12
  628. package/build/browser/object/object.test.d.ts.map +0 -1
  629. package/build/browser/object/timeseries.test.d.ts +0 -2
  630. package/build/browser/object/timeseries.test.d.ts.map +0 -1
  631. package/build/browser/objectSet/InterfaceObjectSet.test.d.ts +0 -2
  632. package/build/browser/objectSet/InterfaceObjectSet.test.d.ts.map +0 -1
  633. package/build/browser/objectSet/ObjectSet.test.d.ts +0 -2
  634. package/build/browser/objectSet/ObjectSet.test.d.ts.map +0 -1
  635. package/build/browser/objectSet/ObjectSetFactory.d.ts +0 -2
  636. package/build/browser/objectSet/ObjectSetFactory.d.ts.map +0 -1
  637. package/build/browser/objectSet/ObjectSetListenerWebsocket.d.ts +0 -2
  638. package/build/browser/objectSet/ObjectSetListenerWebsocket.d.ts.map +0 -1
  639. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.d.ts +0 -2
  640. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.d.ts.map +0 -1
  641. package/build/browser/objectSet/conjureUnionType.d.ts +0 -13
  642. package/build/browser/objectSet/conjureUnionType.d.ts.map +0 -1
  643. package/build/browser/objectSet/createObjectSet.d.ts +0 -2
  644. package/build/browser/objectSet/createObjectSet.d.ts.map +0 -1
  645. package/build/browser/ontology/OntologyProvider.d.ts +0 -32
  646. package/build/browser/ontology/OntologyProvider.d.ts.map +0 -1
  647. package/build/browser/ontology/StandardOntologyProvider.d.ts.map +0 -1
  648. package/build/browser/ontology/StandardOntologyProvider.test.d.ts +0 -2
  649. package/build/browser/ontology/StandardOntologyProvider.test.d.ts.map +0 -1
  650. package/build/browser/ontology/loadActionMetadata.d.ts.map +0 -1
  651. package/build/browser/ontology/loadFullObjectMetadata.d.ts +0 -6
  652. package/build/browser/ontology/loadFullObjectMetadata.d.ts.map +0 -1
  653. package/build/browser/ontology/loadInterfaceMetadata.d.ts +0 -4
  654. package/build/browser/ontology/loadInterfaceMetadata.d.ts.map +0 -1
  655. package/build/browser/ontology/loadQueryMetadata.d.ts.map +0 -1
  656. package/build/browser/ontology/makeConjureContext.d.ts.map +0 -1
  657. package/build/browser/pageRequestAsAsyncIter.d.ts +0 -10
  658. package/build/browser/pageRequestAsAsyncIter.d.ts.map +0 -1
  659. package/build/browser/public/internal.d.ts.map +0 -1
  660. package/build/browser/public/unstable-do-not-use.d.ts.map +0 -1
  661. package/build/browser/public-utils/createAndFetchTempObjectSetRid.d.ts +0 -11
  662. package/build/browser/public-utils/createAndFetchTempObjectSetRid.d.ts.map +0 -1
  663. package/build/browser/public-utils/hydrateAttachmentFromRid.d.ts +0 -10
  664. package/build/browser/public-utils/hydrateAttachmentFromRid.d.ts.map +0 -1
  665. package/build/browser/public-utils/hydrateObjectSetFromRid.d.ts +0 -11
  666. package/build/browser/public-utils/hydrateObjectSetFromRid.d.ts.map +0 -1
  667. package/build/browser/queries/applyQuery.d.ts.map +0 -1
  668. package/build/browser/queries/queries.test.d.ts +0 -2
  669. package/build/browser/queries/queries.test.d.ts.map +0 -1
  670. package/build/browser/queries/types.d.ts +0 -20
  671. package/build/browser/queries/types.d.ts.map +0 -1
  672. package/build/browser/tsserver.d.ts.map +0 -1
  673. package/build/browser/util/ArrayElement.d.ts.map +0 -1
  674. package/build/browser/util/NOOP.d.ts +0 -4
  675. package/build/browser/util/NOOP.d.ts.map +0 -1
  676. package/build/browser/util/NullableProps.d.ts +0 -6
  677. package/build/browser/util/NullableProps.d.ts.map +0 -1
  678. package/build/browser/util/UserAgent.d.ts.map +0 -1
  679. package/build/browser/util/WireObjectSet.d.ts +0 -2
  680. package/build/browser/util/WireObjectSet.d.ts.map +0 -1
  681. package/build/browser/util/addUserAgentAndRequestContextHeaders.d.ts +0 -4
  682. package/build/browser/util/addUserAgentAndRequestContextHeaders.d.ts.map +0 -1
  683. package/build/browser/util/augmentRequestContext.d.ts.map +0 -1
  684. package/build/browser/util/datetimeConverters.d.ts +0 -22
  685. package/build/browser/util/datetimeConverters.d.ts.map +0 -1
  686. package/build/browser/util/datetimeConverters.test.d.ts +0 -2
  687. package/build/browser/util/datetimeConverters.test.d.ts.map +0 -1
  688. package/build/browser/util/isOntologyObjectV2.d.ts +0 -2
  689. package/build/browser/util/isOntologyObjectV2.d.ts.map +0 -1
  690. package/build/browser/util/isOsdkBaseObject.d.ts +0 -3
  691. package/build/browser/util/isOsdkBaseObject.d.ts.map +0 -1
  692. package/build/browser/util/isOsdkObject.d.ts.map +0 -1
  693. package/build/browser/util/objectSetUtils.d.ts.map +0 -1
  694. package/build/browser/util/partialBy.d.ts +0 -3
  695. package/build/browser/util/partialBy.d.ts.map +0 -1
  696. package/build/browser/util/streamutils.d.ts.map +0 -1
  697. package/build/browser/util/timeseriesUtils.d.ts.map +0 -1
  698. package/build/browser/util/toDataValue.d.ts +0 -2
  699. package/build/browser/util/toDataValue.d.ts.map +0 -1
  700. package/build/browser/util/toDataValue.test.d.ts +0 -2
  701. package/build/browser/util/toDataValue.test.d.ts.map +0 -1
  702. package/build/browser/util/toDataValueQueries.d.ts +0 -2
  703. package/build/browser/util/toDataValueQueries.d.ts.map +0 -1
  704. package/build/esm/Client.d.ts +0 -23
  705. package/build/esm/Client.d.ts.map +0 -1
  706. package/build/esm/Definitions.test.d.ts +0 -2
  707. package/build/esm/Definitions.test.d.ts.map +0 -1
  708. package/build/esm/Logger.d.ts +0 -19
  709. package/build/esm/Logger.d.ts.map +0 -1
  710. package/build/esm/MinimalClientContext.d.ts +0 -26
  711. package/build/esm/MinimalClientContext.d.ts.map +0 -1
  712. package/build/esm/ResultOrError.d.ts +0 -12
  713. package/build/esm/ResultOrError.d.ts.map +0 -1
  714. package/build/esm/SatisfiesSemver.d.ts +0 -4
  715. package/build/esm/SatisfiesSemver.d.ts.map +0 -1
  716. package/build/esm/SatisfiesSemver.test.d.ts +0 -2
  717. package/build/esm/SatisfiesSemver.test.d.ts.map +0 -1
  718. package/build/esm/__unstable/ConjureSupport.d.ts +0 -38
  719. package/build/esm/__unstable/ConjureSupport.d.ts.map +0 -1
  720. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.d.ts +0 -5
  721. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.d.ts.map +0 -1
  722. package/build/esm/actions/ActionValidationError.d.ts +0 -6
  723. package/build/esm/actions/ActionValidationError.d.ts.map +0 -1
  724. package/build/esm/actions/actions.test.d.ts +0 -2
  725. package/build/esm/actions/actions.test.d.ts.map +0 -1
  726. package/build/esm/actions/applyAction.d.ts.map +0 -1
  727. package/build/esm/createClient.d.ts +0 -6
  728. package/build/esm/createClient.d.ts.map +0 -1
  729. package/build/esm/createClient.test.d.ts +0 -2
  730. package/build/esm/createClient.test.d.ts.map +0 -1
  731. package/build/esm/createGeotimeSeriesProperty.d.ts +0 -14
  732. package/build/esm/createGeotimeSeriesProperty.d.ts.map +0 -1
  733. package/build/esm/createMediaReferenceProperty.d.ts +0 -14
  734. package/build/esm/createMediaReferenceProperty.d.ts.map +0 -1
  735. package/build/esm/createMinimalClient.d.ts +0 -2
  736. package/build/esm/createMinimalClient.d.ts.map +0 -1
  737. package/build/esm/createPlatformClient.d.ts +0 -17
  738. package/build/esm/createPlatformClient.d.ts.map +0 -1
  739. package/build/esm/createTimeseriesProperty.d.ts +0 -14
  740. package/build/esm/createTimeseriesProperty.d.ts.map +0 -1
  741. package/build/esm/definitions/LinkDefinitions.test.d.ts +0 -2
  742. package/build/esm/definitions/LinkDefinitions.test.d.ts.map +0 -1
  743. package/build/esm/fetchMetadata.d.ts +0 -2
  744. package/build/esm/fetchMetadata.d.ts.map +0 -1
  745. package/build/esm/fetchMetadata.test.d.ts +0 -2
  746. package/build/esm/fetchMetadata.test.d.ts.map +0 -1
  747. package/build/esm/index.d.ts +0 -13
  748. package/build/esm/index.d.ts.map +0 -1
  749. package/build/esm/intellisense.test.d.ts +0 -2
  750. package/build/esm/intellisense.test.d.ts.map +0 -1
  751. package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.d.ts +0 -2
  752. package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.d.ts.map +0 -1
  753. package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.d.ts +0 -2
  754. package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.d.ts.map +0 -1
  755. package/build/esm/internal/conversions/modernToLegacyAggregationClause.d.ts +0 -2
  756. package/build/esm/internal/conversions/modernToLegacyAggregationClause.d.ts.map +0 -1
  757. package/build/esm/internal/conversions/modernToLegacyGroupByClause.d.ts +0 -2
  758. package/build/esm/internal/conversions/modernToLegacyGroupByClause.d.ts.map +0 -1
  759. package/build/esm/internal/conversions/modernToLegacyWhereClause.d.ts +0 -2
  760. package/build/esm/internal/conversions/modernToLegacyWhereClause.d.ts.map +0 -1
  761. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.d.ts +0 -2
  762. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.d.ts.map +0 -1
  763. package/build/esm/object/AttachmentUpload.d.ts +0 -4
  764. package/build/esm/object/AttachmentUpload.d.ts.map +0 -1
  765. package/build/esm/object/Cache.d.ts +0 -2
  766. package/build/esm/object/Cache.d.ts.map +0 -1
  767. package/build/esm/object/Cache.test.d.ts +0 -11
  768. package/build/esm/object/Cache.test.d.ts.map +0 -1
  769. package/build/esm/object/SimpleCache.d.ts +0 -38
  770. package/build/esm/object/SimpleCache.d.ts.map +0 -1
  771. package/build/esm/object/aggregate.d.ts +0 -2
  772. package/build/esm/object/aggregate.d.ts.map +0 -1
  773. package/build/esm/object/aggregate.test.d.ts +0 -2
  774. package/build/esm/object/aggregate.test.d.ts.map +0 -1
  775. package/build/esm/object/attachment.test.d.ts +0 -2
  776. package/build/esm/object/attachment.test.d.ts.map +0 -1
  777. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.d.ts +0 -2
  778. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.d.ts.map +0 -1
  779. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.d.ts +0 -7
  780. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.d.ts.map +0 -1
  781. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.d.ts +0 -2
  782. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.d.ts.map +0 -1
  783. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts.map +0 -1
  784. package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts +0 -8
  785. package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts.map +0 -1
  786. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.d.ts +0 -2
  787. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.d.ts.map +0 -1
  788. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.test.d.ts +0 -2
  789. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.test.d.ts.map +0 -1
  790. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.d.ts +0 -2
  791. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.d.ts.map +0 -1
  792. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.d.ts +0 -3
  793. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.d.ts.map +0 -1
  794. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.d.ts +0 -2
  795. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.d.ts.map +0 -1
  796. package/build/esm/object/convertWireToOsdkObjects.d.ts +0 -2
  797. package/build/esm/object/convertWireToOsdkObjects.d.ts.map +0 -1
  798. package/build/esm/object/convertWireToOsdkObjects.test.d.ts +0 -2
  799. package/build/esm/object/convertWireToOsdkObjects.test.d.ts.map +0 -1
  800. package/build/esm/object/fetchPage.d.ts +0 -3
  801. package/build/esm/object/fetchPage.d.ts.map +0 -1
  802. package/build/esm/object/fetchPage.test.d.ts +0 -2
  803. package/build/esm/object/fetchPage.test.d.ts.map +0 -1
  804. package/build/esm/object/fetchSingle.d.ts +0 -2
  805. package/build/esm/object/fetchSingle.d.ts.map +0 -1
  806. package/build/esm/object/geotimeseriesreference.test.d.ts +0 -2
  807. package/build/esm/object/geotimeseriesreference.test.d.ts.map +0 -1
  808. package/build/esm/object/media.test.d.ts +0 -2
  809. package/build/esm/object/media.test.d.ts.map +0 -1
  810. package/build/esm/object/object.test.d.ts.map +0 -1
  811. package/build/esm/object/timeseries.test.d.ts +0 -2
  812. package/build/esm/object/timeseries.test.d.ts.map +0 -1
  813. package/build/esm/objectSet/InterfaceObjectSet.test.d.ts +0 -2
  814. package/build/esm/objectSet/InterfaceObjectSet.test.d.ts.map +0 -1
  815. package/build/esm/objectSet/ObjectSet.test.d.ts +0 -2
  816. package/build/esm/objectSet/ObjectSet.test.d.ts.map +0 -1
  817. package/build/esm/objectSet/ObjectSetFactory.d.ts +0 -2
  818. package/build/esm/objectSet/ObjectSetFactory.d.ts.map +0 -1
  819. package/build/esm/objectSet/ObjectSetListenerWebsocket.d.ts +0 -2
  820. package/build/esm/objectSet/ObjectSetListenerWebsocket.d.ts.map +0 -1
  821. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.d.ts +0 -2
  822. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.d.ts.map +0 -1
  823. package/build/esm/objectSet/conjureUnionType.d.ts +0 -13
  824. package/build/esm/objectSet/conjureUnionType.d.ts.map +0 -1
  825. package/build/esm/objectSet/createObjectSet.d.ts +0 -2
  826. package/build/esm/objectSet/createObjectSet.d.ts.map +0 -1
  827. package/build/esm/ontology/OntologyProvider.d.ts +0 -32
  828. package/build/esm/ontology/OntologyProvider.d.ts.map +0 -1
  829. package/build/esm/ontology/StandardOntologyProvider.d.ts +0 -5
  830. package/build/esm/ontology/StandardOntologyProvider.d.ts.map +0 -1
  831. package/build/esm/ontology/StandardOntologyProvider.test.d.ts +0 -2
  832. package/build/esm/ontology/StandardOntologyProvider.test.d.ts.map +0 -1
  833. package/build/esm/ontology/loadActionMetadata.d.ts +0 -4
  834. package/build/esm/ontology/loadActionMetadata.d.ts.map +0 -1
  835. package/build/esm/ontology/loadFullObjectMetadata.d.ts.map +0 -1
  836. package/build/esm/ontology/loadInterfaceMetadata.d.ts.map +0 -1
  837. package/build/esm/ontology/loadQueryMetadata.d.ts +0 -4
  838. package/build/esm/ontology/loadQueryMetadata.d.ts.map +0 -1
  839. package/build/esm/ontology/makeConjureContext.d.ts +0 -4
  840. package/build/esm/ontology/makeConjureContext.d.ts.map +0 -1
  841. package/build/esm/pageRequestAsAsyncIter.d.ts +0 -10
  842. package/build/esm/pageRequestAsAsyncIter.d.ts.map +0 -1
  843. package/build/esm/public/internal.d.ts +0 -4
  844. package/build/esm/public/internal.d.ts.map +0 -1
  845. package/build/esm/public/unstable-do-not-use.d.ts +0 -2
  846. package/build/esm/public/unstable-do-not-use.d.ts.map +0 -1
  847. package/build/esm/public-utils/createAndFetchTempObjectSetRid.d.ts.map +0 -1
  848. package/build/esm/public-utils/hydrateAttachmentFromRid.d.ts +0 -10
  849. package/build/esm/public-utils/hydrateAttachmentFromRid.d.ts.map +0 -1
  850. package/build/esm/public-utils/hydrateObjectSetFromRid.d.ts +0 -11
  851. package/build/esm/public-utils/hydrateObjectSetFromRid.d.ts.map +0 -1
  852. package/build/esm/queries/applyQuery.d.ts +0 -6
  853. package/build/esm/queries/applyQuery.d.ts.map +0 -1
  854. package/build/esm/queries/queries.test.d.ts +0 -2
  855. package/build/esm/queries/queries.test.d.ts.map +0 -1
  856. package/build/esm/queries/types.d.ts.map +0 -1
  857. package/build/esm/tsserver.d.ts +0 -32
  858. package/build/esm/tsserver.d.ts.map +0 -1
  859. package/build/esm/util/ArrayElement.d.ts +0 -2
  860. package/build/esm/util/ArrayElement.d.ts.map +0 -1
  861. package/build/esm/util/NOOP.d.ts +0 -4
  862. package/build/esm/util/NOOP.d.ts.map +0 -1
  863. package/build/esm/util/NullableProps.d.ts +0 -6
  864. package/build/esm/util/NullableProps.d.ts.map +0 -1
  865. package/build/esm/util/UserAgent.d.ts +0 -2
  866. package/build/esm/util/UserAgent.d.ts.map +0 -1
  867. package/build/esm/util/WireObjectSet.d.ts +0 -2
  868. package/build/esm/util/WireObjectSet.d.ts.map +0 -1
  869. package/build/esm/util/addUserAgentAndRequestContextHeaders.d.ts.map +0 -1
  870. package/build/esm/util/augmentRequestContext.d.ts +0 -32
  871. package/build/esm/util/augmentRequestContext.d.ts.map +0 -1
  872. package/build/esm/util/datetimeConverters.d.ts +0 -22
  873. package/build/esm/util/datetimeConverters.d.ts.map +0 -1
  874. package/build/esm/util/datetimeConverters.test.d.ts +0 -2
  875. package/build/esm/util/datetimeConverters.test.d.ts.map +0 -1
  876. package/build/esm/util/isOntologyObjectV2.d.ts +0 -2
  877. package/build/esm/util/isOntologyObjectV2.d.ts.map +0 -1
  878. package/build/esm/util/isOsdkBaseObject.d.ts +0 -3
  879. package/build/esm/util/isOsdkBaseObject.d.ts.map +0 -1
  880. package/build/esm/util/isOsdkObject.d.ts.map +0 -1
  881. package/build/esm/util/objectSetUtils.d.ts +0 -4
  882. package/build/esm/util/objectSetUtils.d.ts.map +0 -1
  883. package/build/esm/util/partialBy.d.ts +0 -3
  884. package/build/esm/util/partialBy.d.ts.map +0 -1
  885. package/build/esm/util/streamutils.d.ts +0 -3
  886. package/build/esm/util/streamutils.d.ts.map +0 -1
  887. package/build/esm/util/timeseriesUtils.d.ts +0 -8
  888. package/build/esm/util/timeseriesUtils.d.ts.map +0 -1
  889. package/build/esm/util/toDataValue.d.ts +0 -2
  890. package/build/esm/util/toDataValue.d.ts.map +0 -1
  891. package/build/esm/util/toDataValue.test.d.ts +0 -2
  892. package/build/esm/util/toDataValue.test.d.ts.map +0 -1
  893. package/build/esm/util/toDataValueQueries.d.ts +0 -2
  894. package/build/esm/util/toDataValueQueries.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"LinkDefinitions.test.js","names":["describe","expectTypeOf","it","toEqualTypeOf","branded"],"sources":["LinkDefinitions.test.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { describe, expectTypeOf, it } from \"vitest\";\ndescribe(\"LinkDefinitions\", () => {\n describe(\"OsdkObjectLinkObject\", () => {\n it(\"is correctly absent on types with no links\", () => {\n expectTypeOf()\n .toEqualTypeOf();\n });\n it(\"populates on types with links\", () => {\n expectTypeOf()\n .toEqualTypeOf();\n });\n describe(\"SingletonLinkAccessor\", () => {\n it(\"infers select properly\", () => {\n // this helper lets us get return types of functions that are generic\n class Helper {\n accessor;\n constructor(accessor) {\n this.accessor = accessor;\n }\n fetchOne() {\n return this.accessor.fetchOne();\n }\n }\n // // e.g. .lead.fetchOne({});\n expectTypeOf()\n .branded.toEqualTypeOf();\n // e.g. .lead.fetchOne();\n expectTypeOf().branded\n .toEqualTypeOf();\n // e.g. .lead.fetchOne({ select: [] });\n expectTypeOf().branded\n .toEqualTypeOf();\n // e.g. .lead.fetchOne({ select: [\"name\"] });\n expectTypeOf()\n .toEqualTypeOf();\n });\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,EAAE,QAAQ,QAAQ;AACnDF,QAAQ,CAAC,iBAAiB,EAAE,MAAM;EAC9BA,QAAQ,CAAC,sBAAsB,EAAE,MAAM;IACnCE,EAAE,CAAC,4CAA4C,EAAE,MAAM;MACnDD,YAAY,CAAC,CAAC,CACTE,aAAa,CAAC,CAAC;IACxB,CAAC,CAAC;IACFD,EAAE,CAAC,+BAA+B,EAAE,MAAM;MACtCD,YAAY,CAAC,CAAC,CACTE,aAAa,CAAC,CAAC;IACxB,CAAC,CAAC;IACFH,QAAQ,CAAC,uBAAuB,EAAE,MAAM;MACpCE,EAAE,CAAC,wBAAwB,EAAE,MAAM;QAC/B;;QAUA;QACAD,YAAY,CAAC,CAAC,CACTG,OAAO,CAACD,aAAa,CAAC,CAAC;QAC5B;QACAF,YAAY,CAAC,CAAC,CAACG,OAAO,CACjBD,aAAa,CAAC,CAAC;QACpB;QACAF,YAAY,CAAC,CAAC,CAACG,OAAO,CACjBD,aAAa,CAAC,CAAC;QACpB;QACAF,YAAY,CAAC,CAAC,CACTE,aAAa,CAAC,CAAC;MACxB,CAAC,CAAC;IACN,CAAC,CAAC;EACN,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"LinkDefinitions.test.js","names":["describe","expectTypeOf","it","toEqualTypeOf","branded"],"sources":["LinkDefinitions.test.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectSet,\n ObjectTypeDefinition,\n Osdk,\n OsdkObjectLinksObject,\n SelectArg,\n SingleLinkAccessor,\n} from \"@osdk/api\";\nimport type {\n Employee,\n equipment,\n Office,\n Person,\n} from \"@osdk/client.test.ontology\";\nimport { describe, expectTypeOf, it } from \"vitest\";\n\ndescribe(\"LinkDefinitions\", () => {\n describe(\"OsdkObjectLinkObject\", () => {\n it(\"is correctly absent on types with no links\", () => {\n expectTypeOf<OsdkObjectLinksObject<equipment>>()\n .toEqualTypeOf<never>();\n });\n\n it(\"populates on types with links\", () => {\n expectTypeOf<OsdkObjectLinksObject<Employee>>()\n .toEqualTypeOf<\n {\n readonly lead: SingleLinkAccessor<Employee>;\n readonly officeLink: SingleLinkAccessor<Office>;\n readonly peeps: ObjectSet<Employee>;\n }\n >();\n });\n\n describe(\"SingletonLinkAccessor\", () => {\n it(\"infers select properly\", () => {\n // this helper lets us get return types of functions that are generic\n class Helper<\n T extends ObjectTypeDefinition,\n const A extends SelectArg<T>,\n > {\n constructor(private accessor: SingleLinkAccessor<T>) {}\n\n public fetchOne() {\n return this.accessor.fetchOne<A>();\n }\n }\n\n type PersonDef = Person;\n\n // // e.g. .lead.fetchOne({});\n expectTypeOf<Awaited<ReturnType<Helper<PersonDef, {}>[\"fetchOne\"]>>>()\n .branded.toEqualTypeOf<Osdk<PersonDef>>();\n\n // e.g. .lead.fetchOne();\n expectTypeOf<\n Awaited<\n ReturnType<Helper<PersonDef, SelectArg<PersonDef>>[\"fetchOne\"]>\n >\n >().branded\n .toEqualTypeOf<Osdk<PersonDef>>();\n\n // e.g. .lead.fetchOne({ select: [] });\n expectTypeOf<\n Awaited<\n ReturnType<Helper<PersonDef, { $select: [] }>[\"fetchOne\"]>\n >\n >().branded\n .toEqualTypeOf<Osdk<PersonDef>>();\n\n // e.g. .lead.fetchOne({ select: [\"name\"] });\n expectTypeOf<\n Awaited<\n ReturnType<Helper<PersonDef, { $select: [\"name\"] }>[\"fetchOne\"]>\n >\n >()\n .toEqualTypeOf<Osdk<PersonDef, \"name\">>();\n });\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,EAAE,QAAQ,QAAQ;AAEnDF,QAAQ,CAAC,iBAAiB,EAAE,MAAM;EAChCA,QAAQ,CAAC,sBAAsB,EAAE,MAAM;IACrCE,EAAE,CAAC,4CAA4C,EAAE,MAAM;MACrDD,YAAY,CAAmC,CAAC,CAC7CE,aAAa,CAAQ,CAAC;IAC3B,CAAC,CAAC;IAEFD,EAAE,CAAC,+BAA+B,EAAE,MAAM;MACxCD,YAAY,CAAkC,CAAC,CAC5CE,aAAa,CAMZ,CAAC;IACP,CAAC,CAAC;IAEFH,QAAQ,CAAC,uBAAuB,EAAE,MAAM;MACtCE,EAAE,CAAC,wBAAwB,EAAE,MAAM;QACjC;;QAcA;QACAD,YAAY,CAAyD,CAAC,CACnEG,OAAO,CAACD,aAAa,CAAkB,CAAC;;QAE3C;QACAF,YAAY,CAIV,CAAC,CAACG,OAAO,CACRD,aAAa,CAAkB,CAAC;;QAEnC;QACAF,YAAY,CAIV,CAAC,CAACG,OAAO,CACRD,aAAa,CAAkB,CAAC;;QAEnC;QACAF,YAAY,CAIV,CAAC,CACAE,aAAa,CAA0B,CAAC;MAC7C,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -13,7 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { InterfaceDefinitions } from "./ontology/OntologyProvider.js";
18
+
17
19
  /** @internal */
18
20
  export const fetchMetadataInternal = async (client, definition) => {
19
21
  if (definition.type === "object") {
@@ -1 +1 @@
1
- {"version":3,"file":"fetchMetadata.js","names":["InterfaceDefinitions","fetchMetadataInternal","client","definition","type","interfaceDefs","objectTypeDef","ontologyProvider","getObjectDefinition","apiName","getInterfaceDefinition","getActionDefinition","getQueryDefinition","Error"],"sources":["fetchMetadata.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { InterfaceDefinitions } from \"./ontology/OntologyProvider.js\";\n/** @internal */\nexport const fetchMetadataInternal = async (client, definition) => {\n if (definition.type === \"object\") {\n const { [InterfaceDefinitions]: interfaceDefs, ...objectTypeDef } = await client.ontologyProvider\n .getObjectDefinition(definition.apiName);\n return objectTypeDef;\n }\n else if (definition.type === \"interface\") {\n return client.ontologyProvider.getInterfaceDefinition(definition.apiName);\n }\n else if (definition.type === \"action\") {\n return client.ontologyProvider.getActionDefinition(definition.apiName);\n }\n else if (definition.type === \"query\") {\n return client.ontologyProvider.getQueryDefinition(definition.apiName);\n }\n else {\n throw new Error(\"Not implemented for given definition\");\n }\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,oBAAoB,QAAQ,gCAAgC;AACrE;AACA,OAAO,MAAMC,qBAAqB,GAAG,MAAAA,CAAOC,MAAM,EAAEC,UAAU,KAAK;EAC/D,IAAIA,UAAU,CAACC,IAAI,KAAK,QAAQ,EAAE;IAC9B,MAAM;MAAE,CAACJ,oBAAoB,GAAGK,aAAa;MAAE,GAAGC;IAAc,CAAC,GAAG,MAAMJ,MAAM,CAACK,gBAAgB,CAC5FC,mBAAmB,CAACL,UAAU,CAACM,OAAO,CAAC;IAC5C,OAAOH,aAAa;EACxB,CAAC,MACI,IAAIH,UAAU,CAACC,IAAI,KAAK,WAAW,EAAE;IACtC,OAAOF,MAAM,CAACK,gBAAgB,CAACG,sBAAsB,CAACP,UAAU,CAACM,OAAO,CAAC;EAC7E,CAAC,MACI,IAAIN,UAAU,CAACC,IAAI,KAAK,QAAQ,EAAE;IACnC,OAAOF,MAAM,CAACK,gBAAgB,CAACI,mBAAmB,CAACR,UAAU,CAACM,OAAO,CAAC;EAC1E,CAAC,MACI,IAAIN,UAAU,CAACC,IAAI,KAAK,OAAO,EAAE;IAClC,OAAOF,MAAM,CAACK,gBAAgB,CAACK,kBAAkB,CAACT,UAAU,CAACM,OAAO,CAAC;EACzE,CAAC,MACI;IACD,MAAM,IAAII,KAAK,CAAC,sCAAsC,CAAC;EAC3D;AACJ,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"fetchMetadata.js","names":["InterfaceDefinitions","fetchMetadataInternal","client","definition","type","interfaceDefs","objectTypeDef","ontologyProvider","getObjectDefinition","apiName","getInterfaceDefinition","getActionDefinition","getQueryDefinition","Error"],"sources":["fetchMetadata.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 ActionDefinition,\n ActionMetadata,\n InterfaceDefinition,\n InterfaceMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n} from \"@osdk/api\";\nimport type { MinimalClient } from \"./MinimalClientContext.js\";\nimport { InterfaceDefinitions } from \"./ontology/OntologyProvider.js\";\n\n/** @internal */\nexport const fetchMetadataInternal = async <\n Q extends (\n | ObjectTypeDefinition\n | InterfaceDefinition\n | ActionDefinition<any>\n | QueryDefinition<any>\n ),\n>(\n client: MinimalClient,\n definition: Q,\n): Promise<\n Q extends ObjectTypeDefinition ? ObjectMetadata\n : Q extends InterfaceDefinition ? InterfaceMetadata\n : Q extends ActionDefinition<any> ? ActionMetadata\n : Q extends QueryDefinition<any> ? QueryMetadata\n : never\n> => {\n if (definition.type === \"object\") {\n const { [InterfaceDefinitions]: interfaceDefs, ...objectTypeDef } =\n await client.ontologyProvider\n .getObjectDefinition(definition.apiName);\n return objectTypeDef as any;\n } else if (definition.type === \"interface\") {\n return client.ontologyProvider.getInterfaceDefinition(\n definition.apiName,\n ) as any;\n } else if (definition.type === \"action\") {\n return client.ontologyProvider.getActionDefinition(\n definition.apiName,\n ) as any;\n } else if (definition.type === \"query\") {\n return client.ontologyProvider.getQueryDefinition(\n definition.apiName,\n ) as any;\n } else {\n throw new Error(\"Not implemented for given definition\");\n }\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAaA,SAASA,oBAAoB,QAAQ,gCAAgC;;AAErE;AACA,OAAO,MAAMC,qBAAqB,GAAG,MAAAA,CAQnCC,MAAqB,EACrBC,UAAa,KAOV;EACH,IAAIA,UAAU,CAACC,IAAI,KAAK,QAAQ,EAAE;IAChC,MAAM;MAAE,CAACJ,oBAAoB,GAAGK,aAAa;MAAE,GAAGC;IAAc,CAAC,GAC/D,MAAMJ,MAAM,CAACK,gBAAgB,CAC1BC,mBAAmB,CAACL,UAAU,CAACM,OAAO,CAAC;IAC5C,OAAOH,aAAa;EACtB,CAAC,MAAM,IAAIH,UAAU,CAACC,IAAI,KAAK,WAAW,EAAE;IAC1C,OAAOF,MAAM,CAACK,gBAAgB,CAACG,sBAAsB,CACnDP,UAAU,CAACM,OACb,CAAC;EACH,CAAC,MAAM,IAAIN,UAAU,CAACC,IAAI,KAAK,QAAQ,EAAE;IACvC,OAAOF,MAAM,CAACK,gBAAgB,CAACI,mBAAmB,CAChDR,UAAU,CAACM,OACb,CAAC;EACH,CAAC,MAAM,IAAIN,UAAU,CAACC,IAAI,KAAK,OAAO,EAAE;IACtC,OAAOF,MAAM,CAACK,gBAAgB,CAACK,kBAAkB,CAC/CT,UAAU,CAACM,OACb,CAAC;EACH,CAAC,MAAM;IACL,MAAM,IAAII,KAAK,CAAC,sCAAsC,CAAC;EACzD;AACF,CAAC","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { $Actions, $Interfaces, $Objects, $ontologyRid, $Queries } from "@osdk/client.test.ontology";
17
18
  import { apiServer } from "@osdk/shared.test";
18
19
  import { afterAll, beforeAll, describe, expect, expectTypeOf, it } from "vitest";
@@ -146,6 +147,10 @@ describe("FetchMetadata", () => {
146
147
  "apiName": "FooInterface",
147
148
  "description": "Interface for Foo",
148
149
  "displayName": "Foo Interface",
150
+ "implementedBy": [
151
+ "Employee",
152
+ "Person",
153
+ ],
149
154
  "implements": [],
150
155
  "links": {},
151
156
  "properties": {
@@ -1 +1 @@
1
- {"version":3,"file":"fetchMetadata.test.js","names":["$Actions","$Interfaces","$Objects","$ontologyRid","$Queries","apiServer","afterAll","beforeAll","describe","expect","expectTypeOf","it","createClient","client","listen","close","objectMetadata","fetchMetadata","Employee","toEqualTypeOf","toMatchInlineSnapshot","interfaceMetadata","FooInterface","actionMetadata","moveOffice","queryMetadata","queryAcceptsObject"],"sources":["fetchMetadata.test.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { $Actions, $Interfaces, $Objects, $ontologyRid, $Queries, } from \"@osdk/client.test.ontology\";\nimport { apiServer } from \"@osdk/shared.test\";\nimport { afterAll, beforeAll, describe, expect, expectTypeOf, it, } from \"vitest\";\nimport { createClient } from \"./createClient.js\";\ndescribe(\"FetchMetadata\", () => {\n let client;\n beforeAll(async () => {\n apiServer.listen();\n client = createClient(\"https://stack.palantir.com\", $ontologyRid, async () => \"myAccessToken\");\n });\n afterAll(() => {\n apiServer.close();\n });\n it(\"fetches object metadata correctly\", async () => {\n const objectMetadata = await client.fetchMetadata($Objects.Employee);\n expectTypeOf(objectMetadata).toEqualTypeOf();\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 },\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 },\n \"employeeId\": {\n \"description\": undefined,\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": false,\n \"type\": \"integer\",\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 },\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 },\n \"employeeStatus\": {\n \"description\": \"TimeSeries of the status of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"stringTimeseries\",\n },\n \"fullName\": {\n \"description\": undefined,\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\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 },\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 },\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 it(\"fetches interface metadata correctly\", async () => {\n const interfaceMetadata = await client.fetchMetadata($Interfaces.FooInterface);\n expectTypeOf(interfaceMetadata).toEqualTypeOf();\n expect(interfaceMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"FooInterface\",\n \"description\": \"Interface for Foo\",\n \"displayName\": \"Foo Interface\",\n \"implements\": [],\n \"links\": {},\n \"properties\": {\n \"fooSpt\": {\n \"description\": \"A foo\",\n \"displayName\": \"Foo\",\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n },\n },\n \"rid\": \"ri.interface.main.interface.1\",\n \"type\": \"interface\",\n }\n `);\n });\n it(\"fetches action metadata correctly\", async () => {\n const actionMetadata = await client.fetchMetadata($Actions.moveOffice);\n expectTypeOf(actionMetadata).toEqualTypeOf();\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 it(\"fetches query metadata correctly\", async () => {\n const queryMetadata = await client.fetchMetadata($Queries.queryAcceptsObject);\n expectTypeOf(queryMetadata).toEqualTypeOf();\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;AACA,SAASA,QAAQ,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,YAAY,EAAEC,QAAQ,QAAS,4BAA4B;AACrG,SAASC,SAAS,QAAQ,mBAAmB;AAC7C,SAASC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,YAAY,EAAEC,EAAE,QAAS,QAAQ;AACjF,SAASC,YAAY,QAAQ,mBAAmB;AAChDJ,QAAQ,CAAC,eAAe,EAAE,MAAM;EAC5B,IAAIK,MAAM;EACVN,SAAS,CAAC,YAAY;IAClBF,SAAS,CAACS,MAAM,CAAC,CAAC;IAClBD,MAAM,GAAGD,YAAY,CAAC,4BAA4B,EAAET,YAAY,EAAE,YAAY,eAAe,CAAC;EAClG,CAAC,CAAC;EACFG,QAAQ,CAAC,MAAM;IACXD,SAAS,CAACU,KAAK,CAAC,CAAC;EACrB,CAAC,CAAC;EACFJ,EAAE,CAAC,mCAAmC,EAAE,YAAY;IAChD,MAAMK,cAAc,GAAG,MAAMH,MAAM,CAACI,aAAa,CAACf,QAAQ,CAACgB,QAAQ,CAAC;IACpER,YAAY,CAACM,cAAc,CAAC,CAACG,aAAa,CAAC,CAAC;IAC5CV,MAAM,CAACO,cAAc,CAAC,CAACI,qBAAqB,CAAC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;EACF,CAAC,CAAC;EACFT,EAAE,CAAC,sCAAsC,EAAE,YAAY;IACnD,MAAMU,iBAAiB,GAAG,MAAMR,MAAM,CAACI,aAAa,CAAChB,WAAW,CAACqB,YAAY,CAAC;IAC9EZ,YAAY,CAACW,iBAAiB,CAAC,CAACF,aAAa,CAAC,CAAC;IAC/CV,MAAM,CAACY,iBAAiB,CAAC,CAACD,qBAAqB,CAAC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACF,CAAC,CAAC;EACFT,EAAE,CAAC,mCAAmC,EAAE,YAAY;IAChD,MAAMY,cAAc,GAAG,MAAMV,MAAM,CAACI,aAAa,CAACjB,QAAQ,CAACwB,UAAU,CAAC;IACtEd,YAAY,CAACa,cAAc,CAAC,CAACJ,aAAa,CAAC,CAAC;IAC5CV,MAAM,CAACc,cAAc,CAAC,CAACH,qBAAqB,CAAC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;EACF,CAAC,CAAC;EACFT,EAAE,CAAC,kCAAkC,EAAE,YAAY;IAC/C,MAAMc,aAAa,GAAG,MAAMZ,MAAM,CAACI,aAAa,CAACb,QAAQ,CAACsB,kBAAkB,CAAC;IAC7EhB,YAAY,CAACe,aAAa,CAAC,CAACN,aAAa,CAAC,CAAC;IAC3CV,MAAM,CAACgB,aAAa,CAAC,CAACL,qBAAqB,CAAC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACF,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"fetchMetadata.test.js","names":["$Actions","$Interfaces","$Objects","$ontologyRid","$Queries","apiServer","afterAll","beforeAll","describe","expect","expectTypeOf","it","createClient","client","listen","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 $ontologyRid,\n $Queries,\n} from \"@osdk/client.test.ontology\";\nimport { apiServer } from \"@osdk/shared.test\";\nimport {\n afterAll,\n beforeAll,\n describe,\n expect,\n expectTypeOf,\n it,\n} from \"vitest\";\nimport type { Client } from \"./Client.js\";\nimport { createClient } from \"./createClient.js\";\n\ndescribe(\"FetchMetadata\", () => {\n let client: Client;\n\n beforeAll(async () => {\n apiServer.listen();\n client = createClient(\n \"https://stack.palantir.com\",\n $ontologyRid,\n async () => \"myAccessToken\",\n );\n });\n\n afterAll(() => {\n apiServer.close();\n });\n\n it(\"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 },\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 },\n \"employeeId\": {\n \"description\": undefined,\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": false,\n \"type\": \"integer\",\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 },\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 },\n \"employeeStatus\": {\n \"description\": \"TimeSeries of the status of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"stringTimeseries\",\n },\n \"fullName\": {\n \"description\": undefined,\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\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 },\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 },\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 \"properties\": {\n \"fooSpt\": {\n \"description\": \"A foo\",\n \"displayName\": \"Foo\",\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\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,YAAY,EACZC,QAAQ,QACH,4BAA4B;AACnC,SAASC,SAAS,QAAQ,mBAAmB;AAC7C,SACEC,QAAQ,EACRC,SAAS,EACTC,QAAQ,EACRC,MAAM,EACNC,YAAY,EACZC,EAAE,QACG,QAAQ;AAEf,SAASC,YAAY,QAAQ,mBAAmB;AAEhDJ,QAAQ,CAAC,eAAe,EAAE,MAAM;EAC9B,IAAIK,MAAc;EAElBN,SAAS,CAAC,YAAY;IACpBF,SAAS,CAACS,MAAM,CAAC,CAAC;IAClBD,MAAM,GAAGD,YAAY,CACnB,4BAA4B,EAC5BT,YAAY,EACZ,YAAY,eACd,CAAC;EACH,CAAC,CAAC;EAEFG,QAAQ,CAAC,MAAM;IACbD,SAAS,CAACU,KAAK,CAAC,CAAC;EACnB,CAAC,CAAC;EAEFJ,EAAE,CAAC,mCAAmC,EAAE,YAAY;IAClD,MAAMK,cAAc,GAAG,MAAMH,MAAM,CAACI,aAAa,CAACf,QAAQ,CAACgB,QAAQ,CAAC;IAEpER,YAAY,CAACM,cAAc,CAAC,CAACG,aAAa,CAExC,CAAC;IAEHV,MAAM,CAACO,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,KAAK,CAAC;EACJ,CAAC,CAAC;EAEFT,EAAE,CAAC,sCAAsC,EAAE,YAAY;IACrD,MAAMU,iBAAiB,GAAG,MAAMR,MAAM,CAACI,aAAa,CAClDhB,WAAW,CAACqB,YACd,CAAC;IAEDZ,YAAY,CAACW,iBAAiB,CAAC,CAACF,aAAa,CAE3C,CAAC;IAEHV,MAAM,CAACY,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,KAAK,CAAC;EACJ,CAAC,CAAC;EAEFT,EAAE,CAAC,mCAAmC,EAAE,YAAY;IAClD,MAAMY,cAAc,GAAG,MAAMV,MAAM,CAACI,aAAa,CAC/CjB,QAAQ,CAACwB,UACX,CAAC;IAEDd,YAAY,CAACa,cAAc,CAAC,CAACJ,aAAa,CAAiB,CAAC;IAE5DV,MAAM,CAACc,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;EAEFT,EAAE,CAAC,kCAAkC,EAAE,YAAY;IACjD,MAAMc,aAAa,GAAG,MAAMZ,MAAM,CAACI,aAAa,CAC9Cb,QAAQ,CAACsB,kBACX,CAAC;IAEDhB,YAAY,CAACe,aAAa,CAAC,CAACN,aAAa,CAAgB,CAAC;IAE1DV,MAAM,CAACgB,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":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  export { isOk } from "@osdk/api";
17
18
  export { PalantirApiError } from "@osdk/shared.net.errors";
18
19
  export { ActionValidationError } from "./actions/ActionValidationError.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["isOk","PalantirApiError","ActionValidationError","createClient","createPlatformClient","createAttachmentUpload","extractDate","extractDateInLocalTime","extractDateInUTC"],"sources":["index.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport { isOk } from \"@osdk/api\";\nexport { PalantirApiError } from \"@osdk/shared.net.errors\";\nexport { ActionValidationError } from \"./actions/ActionValidationError.js\";\nexport { createClient } from \"./createClient.js\";\nexport { createPlatformClient } from \"./createPlatformClient.js\";\nexport { createAttachmentUpload } from \"./object/AttachmentUpload.js\";\nexport { extractDate, extractDateInLocalTime, extractDateInUTC, } from \"./util/datetimeConverters.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,WAAW;AAChC,SAASC,gBAAgB,QAAQ,yBAAyB;AAC1D,SAASC,qBAAqB,QAAQ,oCAAoC;AAC1E,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE,SAASC,WAAW,EAAEC,sBAAsB,EAAEC,gBAAgB,QAAS,8BAA8B","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["isOk","PalantirApiError","ActionValidationError","createClient","createPlatformClient","createAttachmentUpload","extractDate","extractDateInLocalTime","extractDateInUTC"],"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\nexport type {\n ActionDefinition,\n ActionEditResponse,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n InterfaceDefinition,\n ObjectMetadata,\n ObjectSet,\n ObjectTypeDefinition,\n Osdk,\n OsdkObject,\n PageResult,\n PropertyDef,\n PropertyKeys,\n PropertyValueWireToClient,\n QueryDefinition,\n QueryParam,\n QueryResult,\n Result,\n SingleLinkAccessor,\n VersionBound,\n WhereClause,\n} from \"@osdk/api\";\nexport { isOk } 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 type { Logger } from \"./Logger.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"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA6BA,SAASA,IAAI,QAAQ,WAAW;AAChC,SAASC,gBAAgB,QAAQ,yBAAyB;AAE1D,SAASC,qBAAqB,QAAQ,oCAAoC;AAE1E,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,oBAAoB,QAAQ,2BAA2B;AAGhE,SAASC,sBAAsB,QAAQ,8BAA8B;AAGrE,SACEC,WAAW,EACXC,sBAAsB,EACtBC,gBAAgB,QACX,8BAA8B","ignoreList":[]}
@@ -13,10 +13,12 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  // WARNING!
17
18
  // WARNING!
18
19
  // This file is used for tests that check intellisense. Editing this file by hand will likely
19
20
  // break tests that have hard coded line numbers and line offsets.
21
+
20
22
  import { queryAcceptsObject } from "@osdk/client.test.ontology";
21
23
  const client = {};
22
24
  void client(queryAcceptsObject).executeFunction({
@@ -1 +1 @@
1
- {"version":3,"file":"callsQueryAcceptsObject.js","names":["queryAcceptsObject","client","executeFunction","object","undefined"],"sources":["callsQueryAcceptsObject.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// WARNING!\n// WARNING!\n// This file is used for tests that check intellisense. Editing this file by hand will likely\n// break tests that have hard coded line numbers and line offsets.\nimport { queryAcceptsObject } from \"@osdk/client.test.ontology\";\nconst client = {};\nvoid client(queryAcceptsObject).executeFunction({\n object: undefined,\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,kBAAkB,QAAQ,4BAA4B;AAC/D,MAAMC,MAAM,GAAG,CAAC,CAAC;AACjB,KAAKA,MAAM,CAACD,kBAAkB,CAAC,CAACE,eAAe,CAAC;EAC5CC,MAAM,EAAEC;AACZ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"callsQueryAcceptsObject.js","names":["queryAcceptsObject","client","executeFunction","object","undefined"],"sources":["callsQueryAcceptsObject.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\n// WARNING!\n// WARNING!\n// This file is used for tests that check intellisense. Editing this file by hand will likely\n// break tests that have hard coded line numbers and line offsets.\n\nimport { queryAcceptsObject } from \"@osdk/client.test.ontology\";\nimport type { Client } from \"../Client.js\";\n\nconst client: Client = {} as any;\nvoid client(queryAcceptsObject).executeFunction({\n object: undefined as any,\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,SAASA,kBAAkB,QAAQ,4BAA4B;AAG/D,MAAMC,MAAc,GAAG,CAAC,CAAQ;AAChC,KAAKA,MAAM,CAACD,kBAAkB,CAAC,CAACE,eAAe,CAAC;EAC9CC,MAAM,EAAEC;AACV,CAAC,CAAC","ignoreList":[]}
@@ -13,12 +13,14 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { findUpSync } from "find-up";
17
18
  import * as path from "node:path";
18
19
  import invariant from "tiny-invariant";
19
20
  import * as ts from "typescript";
20
21
  import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
21
22
  import { startTsServer } from "./tsserver.js";
23
+
22
24
  // it needs to be hoisted because its referenced from our mocked WebSocket
23
25
  // which must be hoisted to work
24
26
  const rootLogger = await vi.hoisted(async () => {
@@ -39,6 +41,7 @@ const rootLogger = await vi.hoisted(async () => {
39
41
  write(a) {
40
42
  // remove trailing newline since console.log adds one
41
43
  if (a.at(-1) === "\n") a = a.slice(0, -1);
44
+
42
45
  // This lets the test framework aggregate the logs per test, whereas direct to stdout does not
43
46
  console.log(a);
44
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"intellisense.test.js","names":["findUpSync","path","invariant","ts","afterEach","beforeAll","beforeEach","describe","expect","it","vi","startTsServer","rootLogger","hoisted","pino","pinoPretty","EventEmitter","Promise","resolve","level","build","sync","timestampKey","undefined","errorLikeObjectKeys","errorProps","ignore","destination","write","a","at","slice","console","log","packagesDir","clientPackagePath","clientsPackageJson","cwd","import","meta","url","process","env","NODE_ENV","join","dirname","tsServer","intellisenseFilePath","task","name","sys","fileExists","toBeTruthy","sendOpenRequest","file","stop","timeout","resp","sendQuickInfoRequest","line","offset","body","documentation","toMatchInlineSnapshot"],"sources":["intellisense.test.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { findUpSync } from \"find-up\";\nimport * as path from \"node:path\";\nimport invariant from \"tiny-invariant\";\nimport * as ts from \"typescript\";\nimport { afterEach, beforeAll, beforeEach, describe, expect, it, vi, } from \"vitest\";\nimport { startTsServer } from \"./tsserver.js\";\n// it needs to be hoisted because its referenced from our mocked WebSocket\n// which must be hoisted to work\nconst rootLogger = await vi.hoisted(async () => {\n const pino = (await import(\"pino\")).pino;\n const pinoPretty = await import(\"pino-pretty\");\n const { EventEmitter } = await import(\"node:events\");\n class PinoConsoleLogDestination extends EventEmitter {\n write(a) {\n // remove trailing newline since console.log adds one\n if (a.at(-1) === \"\\n\")\n a = a.slice(0, -1);\n // This lets the test framework aggregate the logs per test, whereas direct to stdout does not\n console.log(a);\n }\n }\n return Promise.resolve(pino({ level: \"info\" }, (pinoPretty.build)({\n sync: true,\n timestampKey: undefined,\n errorLikeObjectKeys: [\"error\", \"err\", \"exception\"],\n errorProps: \"stack,cause,properties\",\n ignore: \"time,hostname,pid\",\n destination: new PinoConsoleLogDestination(),\n })));\n});\ndescribe(\"intellisense\", () => {\n let packagesDir;\n let clientPackagePath;\n beforeAll(() => {\n const clientsPackageJson = findUpSync(\"package.json\", {\n cwd: import.meta.url,\n });\n invariant(clientsPackageJson != null);\n packagesDir = path.join(path.dirname(clientsPackageJson), \"..\");\n clientPackagePath = path.join(packagesDir, \"client\");\n });\n let tsServer;\n let intellisenseFilePath;\n beforeEach(async (a) => {\n intellisenseFilePath = path.join(clientPackagePath, \"src\", \"intellisense.test.helpers\", `${a.task.name}.ts`);\n expect(ts.sys.fileExists(intellisenseFilePath)).toBeTruthy();\n tsServer = await startTsServer(rootLogger);\n await tsServer.sendOpenRequest({ file: intellisenseFilePath });\n });\n afterEach(async () => {\n tsServer.stop();\n tsServer = undefined;\n });\n it(\"callsQueryAcceptsObject\", { timeout: 40_000 }, async () => {\n const { resp } = await tsServer.sendQuickInfoRequest({\n file: intellisenseFilePath,\n line: 27,\n offset: 6,\n });\n expect(resp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,CAAC,yBAAyB,EAAE;IAAE+C,OAAO,EAAE;EAAO,CAAC,EAAE,YAAY;IAC3D,MAAM;MAAEC;IAAK,CAAC,GAAG,MAAMX,QAAQ,CAACY,oBAAoB,CAAC;MACjDJ,IAAI,EAAEP,oBAAoB;MAC1BY,IAAI,EAAE,EAAE;MACRC,MAAM,EAAE;IACZ,CAAC,CAAC;IACFpD,MAAM,CAACiD,IAAI,CAACI,IAAI,EAAEC,aAAa,CAAC,CAACC,qBAAqB,CAAC,0BAA0B,CAAC;EACtF,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"intellisense.test.js","names":["findUpSync","path","invariant","ts","afterEach","beforeAll","beforeEach","describe","expect","it","vi","startTsServer","rootLogger","hoisted","pino","pinoPretty","EventEmitter","Promise","resolve","level","build","sync","timestampKey","undefined","errorLikeObjectKeys","errorProps","ignore","destination","write","a","at","slice","console","log","packagesDir","clientPackagePath","clientsPackageJson","cwd","import","meta","url","process","env","NODE_ENV","join","dirname","tsServer","intellisenseFilePath","task","name","sys","fileExists","toBeTruthy","sendOpenRequest","file","stop","timeout","resp","sendQuickInfoRequest","line","offset","body","documentation","toMatchInlineSnapshot"],"sources":["intellisense.test.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { findUpSync } from \"find-up\";\nimport * as path from \"node:path\";\nimport invariant from \"tiny-invariant\";\nimport * as ts from \"typescript\";\nimport {\n afterEach,\n beforeAll,\n beforeEach,\n describe,\n expect,\n it,\n vi,\n} from \"vitest\";\nimport type { Logger } from \"./Logger.js\";\nimport type { TsServer } from \"./tsserver.js\";\nimport { startTsServer } from \"./tsserver.js\";\n\n// it needs to be hoisted because its referenced from our mocked WebSocket\n// which must be hoisted to work\nconst rootLogger = await vi.hoisted(async (): Promise<Logger> => {\n const pino = (await import(\"pino\")).pino;\n const pinoPretty = await import(\"pino-pretty\");\n const { EventEmitter } = await import(\"node:events\");\n class PinoConsoleLogDestination extends EventEmitter {\n write(a: string) {\n // remove trailing newline since console.log adds one\n if (a.at(-1) === \"\\n\") a = a.slice(0, -1);\n\n // This lets the test framework aggregate the logs per test, whereas direct to stdout does not\n console.log(a);\n }\n }\n return Promise.resolve(pino(\n { level: \"info\" },\n (pinoPretty.build)({\n sync: true,\n timestampKey: undefined,\n errorLikeObjectKeys: [\"error\", \"err\", \"exception\"],\n errorProps: \"stack,cause,properties\",\n ignore: \"time,hostname,pid\",\n destination: new PinoConsoleLogDestination(),\n }),\n ));\n});\n\ndescribe(\"intellisense\", () => {\n let packagesDir: string;\n let clientPackagePath: string;\n\n beforeAll(() => {\n const clientsPackageJson = findUpSync(\"package.json\", {\n cwd: import.meta.url,\n });\n invariant(clientsPackageJson != null);\n packagesDir = path.join(\n path.dirname(clientsPackageJson),\n \"..\",\n );\n\n clientPackagePath = path.join(packagesDir, \"client\");\n });\n\n let tsServer: TsServer;\n let intellisenseFilePath: string;\n\n beforeEach(async (a) => {\n intellisenseFilePath = path.join(\n clientPackagePath,\n \"src\",\n \"intellisense.test.helpers\",\n `${a.task.name}.ts`,\n );\n\n expect(ts.sys.fileExists(intellisenseFilePath)).toBeTruthy();\n\n tsServer = await startTsServer(rootLogger);\n await tsServer.sendOpenRequest({ file: intellisenseFilePath });\n });\n\n afterEach(async () => {\n tsServer.stop();\n tsServer = undefined as any;\n });\n\n it(\"callsQueryAcceptsObject\", { timeout: 40_000 }, async () => {\n const { resp } = await tsServer.sendQuickInfoRequest({\n file: intellisenseFilePath,\n line: 27,\n offset: 6,\n });\n expect(resp.body?.docum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,EAAE,CAAC,yBAAyB,EAAE;IAAE+C,OAAO,EAAE;EAAO,CAAC,EAAE,YAAY;IAC7D,MAAM;MAAEC;IAAK,CAAC,GAAG,MAAMX,QAAQ,CAACY,oBAAoB,CAAC;MACnDJ,IAAI,EAAEP,oBAAoB;MAC1BY,IAAI,EAAE,EAAE;MACRC,MAAM,EAAE;IACV,CAAC,CAAC;IACFpD,MAAM,CAACiD,IAAI,CAACI,IAAI,EAAEC,aAAa,CAAC,CAACC,qBAAqB,CACpD,0BACF,CAAC;EACH,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import invariant from "tiny-invariant";
17
18
  /** @internal */
18
19
  export function legacyToModernSingleAggregationResult(entry) {
@@ -28,6 +29,7 @@ export function legacyToModernSingleAggregationResult(entry) {
28
29
  accumulator[property] = {}; // fixme?
29
30
  }
30
31
  accumulator[property][metricType] = curValue.value; // fixme?
32
+
31
33
  return accumulator;
32
34
  }, {});
33
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"legacyToModernSingleAggregationResult.js","names":["invariant","legacyToModernSingleAggregationResult","entry","metrics","reduce","accumulator","curValue","parts","name","split","length","process","env","NODE_ENV","property","metricType","value"],"sources":["legacyToModernSingleAggregationResult.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport invariant from \"tiny-invariant\";\n/** @internal */\nexport function legacyToModernSingleAggregationResult(entry) {\n return entry.metrics.reduce((accumulator, curValue) => {\n const parts = curValue.name.split(\".\");\n if (parts[0] === \"count\") {\n return accumulator;\n }\n invariant(parts.length === 2, \"assumed we were getting a `${key}.${type}`\");\n const property = parts[0];\n const metricType = parts[1];\n if (!(property in accumulator)) {\n accumulator[property] = {}; // fixme?\n }\n accumulator[property][metricType] = curValue.value; // fixme?\n return accumulator;\n }, {});\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,SAAS,MAAM,gBAAgB;AACtC;AACA,OAAO,SAASC,qCAAqCA,CAACC,KAAK,EAAE;EACzD,OAAOA,KAAK,CAACC,OAAO,CAACC,MAAM,CAAC,CAACC,WAAW,EAAEC,QAAQ,KAAK;IACnD,MAAMC,KAAK,GAAGD,QAAQ,CAACE,IAAI,CAACC,KAAK,CAAC,GAAG,CAAC;IACtC,IAAIF,KAAK,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE;MACtB,OAAOF,WAAW;IACtB;IACA,EAAUE,KAAK,CAACG,MAAM,KAAK,CAAC,IAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAA5Bb,SAAS,QAAqB,4CAA4C,IAA1EA,SAAS;IACT,MAAMc,QAAQ,GAAGP,KAAK,CAAC,CAAC,CAAC;IACzB,MAAMQ,UAAU,GAAGR,KAAK,CAAC,CAAC,CAAC;IAC3B,IAAI,EAAEO,QAAQ,IAAIT,WAAW,CAAC,EAAE;MAC5BA,WAAW,CAACS,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAChC;IACAT,WAAW,CAACS,QAAQ,CAAC,CAACC,UAAU,CAAC,GAAGT,QAAQ,CAACU,KAAK,CAAC,CAAC;IACpD,OAAOX,WAAW;EACtB,CAAC,EAAE,CAAC,CAAC,CAAC;AACV","ignoreList":[]}
1
+ {"version":3,"file":"legacyToModernSingleAggregationResult.js","names":["invariant","legacyToModernSingleAggregationResult","entry","metrics","reduce","accumulator","curValue","parts","name","split","length","process","env","NODE_ENV","property","metricType","value"],"sources":["legacyToModernSingleAggregationResult.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n AggregationClause,\n AggregationResultsWithoutGroups,\n ObjectOrInterfaceDefinition,\n} from \"@osdk/api\";\nimport type { AggregateObjectsResponseV2 } from \"@osdk/internal.foundry.core\";\nimport invariant from \"tiny-invariant\";\nimport type { ArrayElement } from \"../../util/ArrayElement.js\";\n\n/** @internal */\nexport function legacyToModernSingleAggregationResult<\n Q extends ObjectOrInterfaceDefinition,\n AC extends AggregationClause<Q>,\n>(\n entry: ArrayElement<AggregateObjectsResponseV2[\"data\"]>,\n): AggregationResultsWithoutGroups<Q, AC> {\n return entry.metrics.reduce(\n (accumulator: AggregationResultsWithoutGroups<Q, AC>, curValue) => {\n const parts = curValue.name.split(\".\");\n if (parts[0] === \"count\") {\n return accumulator;\n }\n invariant(\n parts.length === 2,\n \"assumed we were getting a `${key}.${type}`\",\n );\n const property = parts[0] as keyof AggregationResultsWithoutGroups<Q, AC>;\n const metricType = parts[1];\n if (!(property in accumulator)) {\n accumulator[property] = {} as any; // fixme?\n }\n (accumulator[property] as any)[metricType] = curValue.value; // fixme?\n\n return accumulator;\n },\n {} as AggregationResultsWithoutGroups<Q, AC>,\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,OAAOA,SAAS,MAAM,gBAAgB;AAGtC;AACA,OAAO,SAASC,qCAAqCA,CAInDC,KAAuD,EACf;EACxC,OAAOA,KAAK,CAACC,OAAO,CAACC,MAAM,CACzB,CAACC,WAAmD,EAAEC,QAAQ,KAAK;IACjE,MAAMC,KAAK,GAAGD,QAAQ,CAACE,IAAI,CAACC,KAAK,CAAC,GAAG,CAAC;IACtC,IAAIF,KAAK,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE;MACxB,OAAOF,WAAW;IACpB;IACA,EACEE,KAAK,CAACG,MAAM,KAAK,CAAC,IAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBADpBb,SAAS,QAEP,4CAA4C,IAF9CA,SAAS;IAIT,MAAMc,QAAQ,GAAGP,KAAK,CAAC,CAAC,CAAiD;IACzE,MAAMQ,UAAU,GAAGR,KAAK,CAAC,CAAC,CAAC;IAC3B,IAAI,EAAEO,QAAQ,IAAIT,WAAW,CAAC,EAAE;MAC9BA,WAAW,CAACS,QAAQ,CAAC,GAAG,CAAC,CAAQ,CAAC,CAAC;IACrC;IACCT,WAAW,CAACS,QAAQ,CAAC,CAASC,UAAU,CAAC,GAAGT,QAAQ,CAACU,KAAK,CAAC,CAAC;;IAE7D,OAAOX,WAAW;EACpB,CAAC,EACD,CAAC,CACH,CAAC;AACH","ignoreList":[]}
@@ -13,7 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  const directionFieldMap = dir => dir === "asc" ? "ASC" : dir === "desc" ? "DESC" : undefined;
18
+
17
19
  /** @internal */
18
20
  export function modernToLegacyAggregationClause(select) {
19
21
  return Object.entries(select).flatMap(([propAndMetric, aggregationType]) => {
@@ -1 +1 @@
1
- {"version":3,"file":"modernToLegacyAggregationClause.js","names":["directionFieldMap","dir","undefined","modernToLegacyAggregationClause","select","Object","entries","flatMap","propAndMetric","aggregationType","type","name","direction","colonPos","lastIndexOf","property","slice","metric","field"],"sources":["modernToLegacyAggregationClause.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst directionFieldMap = (dir) => dir === \"asc\" ? \"ASC\" : dir === \"desc\" ? \"DESC\" : undefined;\n/** @internal */\nexport function modernToLegacyAggregationClause(select) {\n return Object.entries(select).flatMap(([propAndMetric, aggregationType]) => {\n if (propAndMetric === \"$count\") {\n return {\n type: \"count\",\n name: \"count\",\n direction: directionFieldMap(aggregationType),\n };\n }\n const colonPos = propAndMetric.lastIndexOf(\":\");\n const property = propAndMetric.slice(0, colonPos);\n const metric = propAndMetric.slice(colonPos + 1);\n return [\n {\n type: metric,\n name: `${property}.${metric}`,\n direction: directionFieldMap(aggregationType),\n field: property,\n },\n ];\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,iBAAiB,GAAIC,GAAG,IAAKA,GAAG,KAAK,KAAK,GAAG,KAAK,GAAGA,GAAG,KAAK,MAAM,GAAG,MAAM,GAAGC,SAAS;AAC9F;AACA,OAAO,SAASC,+BAA+BA,CAACC,MAAM,EAAE;EACpD,OAAOC,MAAM,CAACC,OAAO,CAACF,MAAM,CAAC,CAACG,OAAO,CAAC,CAAC,CAACC,aAAa,EAAEC,eAAe,CAAC,KAAK;IACxE,IAAID,aAAa,KAAK,QAAQ,EAAE;MAC5B,OAAO;QACHE,IAAI,EAAE,OAAO;QACbC,IAAI,EAAE,OAAO;QACbC,SAAS,EAAEZ,iBAAiB,CAACS,eAAe;MAChD,CAAC;IACL;IACA,MAAMI,QAAQ,GAAGL,aAAa,CAACM,WAAW,CAAC,GAAG,CAAC;IAC/C,MAAMC,QAAQ,GAAGP,aAAa,CAACQ,KAAK,CAAC,CAAC,EAAEH,QAAQ,CAAC;IACjD,MAAMI,MAAM,GAAGT,aAAa,CAACQ,KAAK,CAACH,QAAQ,GAAG,CAAC,CAAC;IAChD,OAAO,CACH;MACIH,IAAI,EAAEO,MAAM;MACZN,IAAI,EAAE,GAAGI,QAAQ,IAAIE,MAAM,EAAE;MAC7BL,SAAS,EAAEZ,iBAAiB,CAACS,eAAe,CAAC;MAC7CS,KAAK,EAAEH;IACX,CAAC,CACJ;EACL,CAAC,CAAC;AACN","ignoreList":[]}
1
+ {"version":3,"file":"modernToLegacyAggregationClause.js","names":["directionFieldMap","dir","undefined","modernToLegacyAggregationClause","select","Object","entries","flatMap","propAndMetric","aggregationType","type","name","direction","colonPos","lastIndexOf","property","slice","metric","field"],"sources":["modernToLegacyAggregationClause.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { AggregationClause } from \"@osdk/api\";\nimport type { AggregationV2 } from \"@osdk/internal.foundry.core\";\n\nconst directionFieldMap = (dir?: \"asc\" | \"desc\" | \"unordered\") =>\n dir === \"asc\" ? \"ASC\" : dir === \"desc\" ? \"DESC\" : undefined;\n\n/** @internal */\nexport function modernToLegacyAggregationClause<\n AC extends AggregationClause<any>,\n>(select: AC) {\n return Object.entries(select).flatMap<AggregationV2>(\n ([propAndMetric, aggregationType]) => {\n if (propAndMetric === \"$count\") {\n return {\n type: \"count\",\n name: \"count\",\n direction: directionFieldMap(aggregationType),\n };\n }\n\n const colonPos = propAndMetric.lastIndexOf(\":\");\n const property = propAndMetric.slice(0, colonPos);\n const metric = propAndMetric.slice(colonPos + 1);\n\n return [\n {\n type: metric as\n | \"approximateDistinct\"\n | \"exactDistinct\"\n | \"min\"\n | \"max\"\n | \"sum\"\n | \"avg\"\n | \"approximateDistinct\"\n | \"exactDistinct\",\n name: `${property}.${metric}`,\n direction: directionFieldMap(aggregationType),\n field: property,\n },\n ];\n },\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,MAAMA,iBAAiB,GAAIC,GAAkC,IAC3DA,GAAG,KAAK,KAAK,GAAG,KAAK,GAAGA,GAAG,KAAK,MAAM,GAAG,MAAM,GAAGC,SAAS;;AAE7D;AACA,OAAO,SAASC,+BAA+BA,CAE7CC,MAAU,EAAE;EACZ,OAAOC,MAAM,CAACC,OAAO,CAACF,MAAM,CAAC,CAACG,OAAO,CACnC,CAAC,CAACC,aAAa,EAAEC,eAAe,CAAC,KAAK;IACpC,IAAID,aAAa,KAAK,QAAQ,EAAE;MAC9B,OAAO;QACLE,IAAI,EAAE,OAAO;QACbC,IAAI,EAAE,OAAO;QACbC,SAAS,EAAEZ,iBAAiB,CAACS,eAAe;MAC9C,CAAC;IACH;IAEA,MAAMI,QAAQ,GAAGL,aAAa,CAACM,WAAW,CAAC,GAAG,CAAC;IAC/C,MAAMC,QAAQ,GAAGP,aAAa,CAACQ,KAAK,CAAC,CAAC,EAAEH,QAAQ,CAAC;IACjD,MAAMI,MAAM,GAAGT,aAAa,CAACQ,KAAK,CAACH,QAAQ,GAAG,CAAC,CAAC;IAEhD,OAAO,CACL;MACEH,IAAI,EAAEO,MAQa;MACnBN,IAAI,EAAE,GAAGI,QAAQ,IAAIE,MAAM,EAAE;MAC7BL,SAAS,EAAEZ,iBAAiB,CAACS,eAAe,CAAC;MAC7CS,KAAK,EAAEH;IACT,CAAC,CACF;EACH,CACF,CAAC;AACH","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { DurationMapping } from "@osdk/api";
17
18
  /** @internal */
18
19
  export function modernToLegacyGroupByClause(groupByClause) {
@@ -1 +1 @@
1
- {"version":3,"file":"modernToLegacyGroupByClause.js","names":["DurationMapping","modernToLegacyGroupByClause","groupByClause","Object","entries","flatMap","field","type","maxGroupCount","$exactWithLimit","fixedWidth","$fixedWidth","ranges","$ranges","map","range","convertRange","value","$duration","unit","startValue","endValue"],"sources":["modernToLegacyGroupByClause.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DurationMapping } from \"@osdk/api\";\n/** @internal */\nexport function modernToLegacyGroupByClause(groupByClause) {\n if (!groupByClause)\n return [];\n return Object.entries(groupByClause).flatMap(([field, type]) => {\n if (type === \"exact\") {\n return [{ type, field }];\n }\n else if (\"$exactWithLimit\" in type) {\n {\n return [\n {\n type: \"exact\",\n field,\n maxGroupCount: type.$exactWithLimit,\n },\n ];\n }\n }\n else if (\"$fixedWidth\" in type) {\n return [{\n type: \"fixedWidth\",\n field,\n fixedWidth: type.$fixedWidth,\n }];\n }\n else if (\"$ranges\" in type) {\n return [{\n type: \"ranges\",\n field,\n ranges: type.$ranges.map(range => convertRange(range)),\n }];\n }\n else if (\"$duration\" in type) {\n return [{\n type: \"duration\",\n field,\n value: type.$duration[0],\n unit: DurationMapping[type.$duration[1]],\n }];\n }\n else\n return [];\n });\n}\nfunction convertRange(range) {\n return { startValue: range[0], endValue: range[1] };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,WAAW;AAC3C;AACA,OAAO,SAASC,2BAA2BA,CAACC,aAAa,EAAE;EACvD,IAAI,CAACA,aAAa,EACd,OAAO,EAAE;EACb,OAAOC,MAAM,CAACC,OAAO,CAACF,aAAa,CAAC,CAACG,OAAO,CAAC,CAAC,CAACC,KAAK,EAAEC,IAAI,CAAC,KAAK;IAC5D,IAAIA,IAAI,KAAK,OAAO,EAAE;MAClB,OAAO,CAAC;QAAEA,IAAI;QAAED;MAAM,CAAC,CAAC;IAC5B,CAAC,MACI,IAAI,iBAAiB,IAAIC,IAAI,EAAE;MAChC;QACI,OAAO,CACH;UACIA,IAAI,EAAE,OAAO;UACbD,KAAK;UACLE,aAAa,EAAED,IAAI,CAACE;QACxB,CAAC,CACJ;MACL;IACJ,CAAC,MACI,IAAI,aAAa,IAAIF,IAAI,EAAE;MAC5B,OAAO,CAAC;QACAA,IAAI,EAAE,YAAY;QAClBD,KAAK;QACLI,UAAU,EAAEH,IAAI,CAACI;MACrB,CAAC,CAAC;IACV,CAAC,MACI,IAAI,SAAS,IAAIJ,IAAI,EAAE;MACxB,OAAO,CAAC;QACAA,IAAI,EAAE,QAAQ;QACdD,KAAK;QACLM,MAAM,EAAEL,IAAI,CAACM,OAAO,CAACC,GAAG,CAACC,KAAK,IAAIC,YAAY,CAACD,KAAK,CAAC;MACzD,CAAC,CAAC;IACV,CAAC,MACI,IAAI,WAAW,IAAIR,IAAI,EAAE;MAC1B,OAAO,CAAC;QACAA,IAAI,EAAE,UAAU;QAChBD,KAAK;QACLW,KAAK,EAAEV,IAAI,CAACW,SAAS,CAAC,CAAC,CAAC;QACxBC,IAAI,EAAEnB,eAAe,CAACO,IAAI,CAACW,SAAS,CAAC,CAAC,CAAC;MAC3C,CAAC,CAAC;IACV,CAAC,MAEG,OAAO,EAAE;EACjB,CAAC,CAAC;AACN;AACA,SAASF,YAAYA,CAACD,KAAK,EAAE;EACzB,OAAO;IAAEK,UAAU,EAAEL,KAAK,CAAC,CAAC,CAAC;IAAEM,QAAQ,EAAEN,KAAK,CAAC,CAAC;EAAE,CAAC;AACvD","ignoreList":[]}
1
+ {"version":3,"file":"modernToLegacyGroupByClause.js","names":["DurationMapping","modernToLegacyGroupByClause","groupByClause","Object","entries","flatMap","field","type","maxGroupCount","$exactWithLimit","fixedWidth","$fixedWidth","ranges","$ranges","map","range","convertRange","value","$duration","unit","startValue","endValue"],"sources":["modernToLegacyGroupByClause.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { AllGroupByValues, GroupByClause, GroupByRange } from \"@osdk/api\";\nimport { DurationMapping } from \"@osdk/api\";\nimport type {\n AggregationGroupByV2,\n AggregationRangeV2,\n} from \"@osdk/internal.foundry.core\";\n\n/** @internal */\nexport function modernToLegacyGroupByClause(\n groupByClause: GroupByClause<any> | undefined,\n) {\n if (!groupByClause) return [];\n\n return Object.entries(\n groupByClause as Record<string, AllGroupByValues>,\n ).flatMap<AggregationGroupByV2>(([field, type]) => {\n if (type === \"exact\") {\n return [{ type, field }];\n } else if (\"$exactWithLimit\" in type) {\n {\n return [\n {\n type: \"exact\",\n field,\n maxGroupCount: type.$exactWithLimit,\n },\n ];\n }\n } else if (\"$fixedWidth\" in type) {\n return [{\n type: \"fixedWidth\",\n field,\n fixedWidth: type.$fixedWidth,\n }];\n } else if (\"$ranges\" in type) {\n return [{\n type: \"ranges\",\n field,\n ranges: type.$ranges.map(range => convertRange(range)),\n }];\n } else if (\"$duration\" in type) {\n return [{\n type: \"duration\",\n field,\n value: type.$duration[0],\n unit: DurationMapping[type.$duration[1]],\n }];\n } else return [];\n });\n}\n\nfunction convertRange(\n range: GroupByRange<number | string>,\n): AggregationRangeV2 {\n return { startValue: range[0], endValue: range[1] };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,eAAe,QAAQ,WAAW;AAM3C;AACA,OAAO,SAASC,2BAA2BA,CACzCC,aAA6C,EAC7C;EACA,IAAI,CAACA,aAAa,EAAE,OAAO,EAAE;EAE7B,OAAOC,MAAM,CAACC,OAAO,CACnBF,aACF,CAAC,CAACG,OAAO,CAAuB,CAAC,CAACC,KAAK,EAAEC,IAAI,CAAC,KAAK;IACjD,IAAIA,IAAI,KAAK,OAAO,EAAE;MACpB,OAAO,CAAC;QAAEA,IAAI;QAAED;MAAM,CAAC,CAAC;IAC1B,CAAC,MAAM,IAAI,iBAAiB,IAAIC,IAAI,EAAE;MACpC;QACE,OAAO,CACL;UACEA,IAAI,EAAE,OAAO;UACbD,KAAK;UACLE,aAAa,EAAED,IAAI,CAACE;QACtB,CAAC,CACF;MACH;IACF,CAAC,MAAM,IAAI,aAAa,IAAIF,IAAI,EAAE;MAChC,OAAO,CAAC;QACNA,IAAI,EAAE,YAAY;QAClBD,KAAK;QACLI,UAAU,EAAEH,IAAI,CAACI;MACnB,CAAC,CAAC;IACJ,CAAC,MAAM,IAAI,SAAS,IAAIJ,IAAI,EAAE;MAC5B,OAAO,CAAC;QACNA,IAAI,EAAE,QAAQ;QACdD,KAAK;QACLM,MAAM,EAAEL,IAAI,CAACM,OAAO,CAACC,GAAG,CAACC,KAAK,IAAIC,YAAY,CAACD,KAAK,CAAC;MACvD,CAAC,CAAC;IACJ,CAAC,MAAM,IAAI,WAAW,IAAIR,IAAI,EAAE;MAC9B,OAAO,CAAC;QACNA,IAAI,EAAE,UAAU;QAChBD,KAAK;QACLW,KAAK,EAAEV,IAAI,CAACW,SAAS,CAAC,CAAC,CAAC;QACxBC,IAAI,EAAEnB,eAAe,CAACO,IAAI,CAACW,SAAS,CAAC,CAAC,CAAC;MACzC,CAAC,CAAC;IACJ,CAAC,MAAM,OAAO,EAAE;EAClB,CAAC,CAAC;AACJ;AAEA,SAASF,YAAYA,CACnBD,KAAoC,EAChB;EACpB,OAAO;IAAEK,UAAU,EAAEL,KAAK,CAAC,CAAC,CAAC;IAAEM,QAAQ,EAAEN,KAAK,CAAC,CAAC;EAAE,CAAC;AACrD","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { DistanceUnitMapping } from "@osdk/api";
17
18
  import invariant from "tiny-invariant";
18
19
  export function extractNamespace(fqApiName) {
@@ -20,6 +21,7 @@ export function extractNamespace(fqApiName) {
20
21
  if (last === -1) return [undefined, fqApiName];
21
22
  return [fqApiName.slice(0, last), fqApiName.slice(last + 1)];
22
23
  }
24
+
23
25
  /** @internal */
24
26
  export function modernToLegacyWhereClause(whereClause, objectOrInterface) {
25
27
  if ("$and" in whereClause) {
@@ -90,6 +92,7 @@ function handleWherePair([field, filter], objectOrInterface) {
90
92
  };
91
93
  }
92
94
  const keysOfFilter = Object.keys(filter);
95
+
93
96
  // If any of the keys start with `$` then they must be the only one.
94
97
  // e.g. `where({ name: { $eq: "foo", $ne: "bar" } })` is invalid currently
95
98
  const hasDollarSign = keysOfFilter.some(key => key.startsWith("$"));
@@ -1 +1 @@
1
- {"version":3,"file":"modernToLegacyWhereClause.js","names":["DistanceUnitMapping","invariant","extractNamespace","fqApiName","last","lastIndexOf","undefined","slice","modernToLegacyWhereClause","whereClause","objectOrInterface","type","value","$and","map","clause","$or","$not","parts","Object","entries","length","handleWherePair","v","makeGeoFilterBbox","field","bbox","filterType","topLeft","coordinates","bottomRight","makeGeoFilterPolygon","filter","process","env","NODE_ENV","objApiNamespace","apiName","fieldApiNamespace","fieldShortName","keysOfFilter","keys","hasDollarSign","some","key","startsWith","Error","JSON","stringify","firstKey","withinBody","Array","isArray","$bbox","$distance","$of","center","distance","unit","$polygon","intersectsBody","substring","fuzzy"],"sources":["modernToLegacyWhereClause.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DistanceUnitMapping } from \"@osdk/api\";\nimport invariant from \"tiny-invariant\";\nexport function extractNamespace(fqApiName) {\n const last = fqApiName.lastIndexOf(\".\");\n if (last === -1)\n return [undefined, fqApiName];\n return [fqApiName.slice(0, last), fqApiName.slice(last + 1)];\n}\n/** @internal */\nexport function modernToLegacyWhereClause(whereClause, objectOrInterface) {\n if (\"$and\" in whereClause) {\n return {\n type: \"and\",\n value: whereClause.$and.map((clause) => modernToLegacyWhereClause(clause, objectOrInterface)),\n };\n }\n else if (\"$or\" in whereClause) {\n return {\n type: \"or\",\n value: whereClause.$or.map((clause) => modernToLegacyWhereClause(clause, objectOrInterface)),\n };\n }\n else if (\"$not\" in whereClause) {\n return {\n type: \"not\",\n value: modernToLegacyWhereClause(whereClause.$not, objectOrInterface),\n };\n }\n const parts = Object.entries(whereClause);\n if (parts.length === 1) {\n return handleWherePair(parts[0], objectOrInterface);\n }\n return {\n type: \"and\",\n value: parts.map(v => handleWherePair(v, objectOrInterface)),\n };\n}\nfunction makeGeoFilterBbox(field, bbox, filterType) {\n return {\n type: filterType === \"$within\"\n ? \"withinBoundingBox\"\n : \"intersectsBoundingBox\",\n field,\n value: {\n topLeft: {\n type: \"Point\",\n coordinates: [bbox[0], bbox[3]],\n },\n bottomRight: {\n type: \"Point\",\n coordinates: [bbox[2], bbox[1]],\n },\n },\n };\n}\nfunction makeGeoFilterPolygon(field, coordinates, filterType) {\n return {\n type: filterType,\n field,\n value: {\n type: \"Polygon\",\n coordinates,\n },\n };\n}\nfunction handleWherePair([field, filter], objectOrInterface) {\n invariant(filter != null, \"Defined key values are only allowed when they are not undefined.\");\n if (typeof filter === \"string\" || typeof filter === \"number\"\n || typeof filter === \"boolean\") {\n if (objectOrInterface.type === \"interface\") {\n const [objApiNamespace] = extractNamespace(objectOrInterface.apiName);\n const [fieldApiNamespace, fieldShortName] = extractNamespace(field);\n if (fieldApiNamespace == null && objApiNamespace != null) {\n field = `${objApiNamespace}.${fieldShortName}`;\n }\n }\n return {\n type: \"eq\",\n field,\n value: filter,\n };\n }\n const keysOfFilter = Object.keys(filter);\n // If any of the keys start with `$` then they must be the only one.\n // e.g. `where({ name: { $eq: \"foo\", $ne: \"bar\" } })` is invalid currently\n const hasDollarSign = keysOfFilter.some((key) => key.startsWith(\"$\"));\n invariant(!hasDollarSign\n || keysOfFilter.length === 1, \"WhereClause Filter with multiple clauses isn't allowed\");\n if (!hasDollarSign) {\n // Future case for structs\n throw new Error(`Unsupported filter. Did you forget to use a $-prefixed filter? (${JSON.stringify(filter)})`);\n }\n const firstKey = keysOfFilter[0];\n invariant(filter[firstKey] != null);\n if (firstKey === \"$ne\") {\n return {\n type: \"not\",\n value: {\n type: \"eq\",\n field,\n value: filter[firstKey],\n },\n };\n }\n if (firstKey === \"$within\") {\n const withinBody = filter[firstKey];\n if (Array.isArray(withinBody)) {\n return makeGeoFilterBbox(field, withinBody, firstKey);\n }\n else if (\"$bbox\" in withinBody && withinBody.$bbox != null) {\n return makeGeoFilterBbox(field, withinBody.$bbox, firstKey);\n }\n else if ((\"$distance\" in withinBody && \"$of\" in withinBody)\n && withinBody.$distance != null\n && withinBody.$of != null) {\n return {\n type: \"withinDistanceOf\",\n field,\n value: {\n center: Array.isArray(withinBody.$of)\n ? {\n type: \"Point\",\n coordinates: withinBody.$of,\n }\n : withinBody.$of,\n distance: {\n value: withinBody.$distance[0],\n unit: DistanceUnitMapping[withinBody.$distance[1]],\n },\n },\n };\n }\n else {\n const coordinates = (\"$polygon\" in withinBody)\n ? withinBody.$polygon\n : withinBody.coordinates;\n return makeGeoFilterPolygon(field, coordinates, \"withinPolygon\");\n }\n }\n if (firstKey === \"$intersects\") {\n const intersectsBody = filter[firstKey];\n if (Array.isArray(intersectsBody)) {\n return makeGeoFilterBbox(field, intersectsBody, firstKey);\n }\n else if (\"$bbox\" in intersectsBody && intersectsBody.$bbox != null) {\n return makeGeoFilterBbox(field, intersectsBody.$bbox, firstKey);\n }\n else {\n const coordinates = (\"$polygon\" in intersectsBody)\n ? intersectsBody.$polygon\n : intersectsBody.coordinates;\n return makeGeoFilterPolygon(field, coordinates, \"intersectsPolygon\");\n }\n }\n if (firstKey === \"$containsAllTerms\" || firstKey === \"$containsAnyTerm\") {\n return {\n type: firstKey.substring(1),\n field,\n value: typeof filter[firstKey] === \"string\"\n ? filter[firstKey]\n : filter[firstKey][\"term\"],\n fuzzy: typeof filter[firstKey] === \"string\"\n ? false\n : filter[firstKey][\"fuzzySearch\"] ?? false,\n };\n }\n return {\n type: firstKey.substring(1),\n field,\n value: filter[firstKey],\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,mBAAmB,QAAQ,WAAW;AAC/C,OAAOC,SAAS,MAAM,gBAAgB;AACtC,OAAO,SAASC,gBAAgBA,CAACC,SAAS,EAAE;EACxC,MAAMC,IAAI,GAAGD,SAAS,CAACE,WAAW,CAAC,GAAG,CAAC;EACvC,IAAID,IAAI,KAAK,CAAC,CAAC,EACX,OAAO,CAACE,SAAS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GAAI,UAAU,IAAI+B,cAAc,GAC3CA,cAAc,CAACD,QAAQ,GACvBC,cAAc,CAAC/B,WAAW;MAChC,OAAOE,oBAAoB,CAACN,KAAK,EAAEI,WAAW,EAAE,mBAAmB,CAAC;IACxE;EACJ;EACA,IAAIoB,QAAQ,KAAK,mBAAmB,IAAIA,QAAQ,KAAK,kBAAkB,EAAE;IACrE,OAAO;MACHtC,IAAI,EAAEsC,QAAQ,CAACY,SAAS,CAAC,CAAC,CAAC;MAC3BpC,KAAK;MACLb,KAAK,EAAE,OAAOoB,MAAM,CAACiB,QAAQ,CAAC,KAAK,QAAQ,GACrCjB,MAAM,CAACiB,QAAQ,CAAC,GAChBjB,MAAM,CAACiB,QAAQ,CAAC,CAAC,MAAM,CAAC;MAC9Ba,KAAK,EAAE,OAAO9B,MAAM,CAACiB,QAAQ,CAAC,KAAK,QAAQ,GACrC,KAAK,GACLjB,MAAM,CAACiB,QAAQ,CAAC,CAAC,aAAa,CAAC,IAAI;IAC7C,CAAC;EACL;EACA,OAAO;IACHtC,IAAI,EAAEsC,QAAQ,CAACY,SAAS,CAAC,CAAC,CAAC;IAC3BpC,KAAK;IACLb,KAAK,EAAEoB,MAAM,CAACiB,QAAQ;EAC1B,CAAC;AACL","ignoreList":[]}
1
+ {"version":3,"file":"modernToLegacyWhereClause.js","names":["DistanceUnitMapping","invariant","extractNamespace","fqApiName","last","lastIndexOf","undefined","slice","modernToLegacyWhereClause","whereClause","objectOrInterface","type","value","$and","map","clause","$or","$not","parts","Object","entries","length","handleWherePair","v","makeGeoFilterBbox","field","bbox","filterType","topLeft","coordinates","bottomRight","makeGeoFilterPolygon","filter","process","env","NODE_ENV","objApiNamespace","apiName","fieldApiNamespace","fieldShortName","keysOfFilter","keys","hasDollarSign","some","key","startsWith","Error","JSON","stringify","firstKey","withinBody","Array","isArray","$bbox","$distance","$of","center","distance","unit","$polygon","intersectsBody","substring","fuzzy"],"sources":["modernToLegacyWhereClause.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n GeoFilterOptions,\n ObjectOrInterfaceDefinition,\n PossibleWhereClauseFilters,\n WhereClause,\n} from \"@osdk/api\";\nimport { DistanceUnitMapping } from \"@osdk/api\";\n\nimport type { SearchJsonQueryV2 } from \"@osdk/internal.foundry.core\";\nimport type { BBox, Position } from \"geojson\";\nimport invariant from \"tiny-invariant\";\n\nexport function extractNamespace(\n fqApiName: string,\n): [string | undefined, string] {\n const last = fqApiName.lastIndexOf(\".\");\n if (last === -1) return [undefined, fqApiName];\n return [fqApiName.slice(0, last), fqApiName.slice(last + 1)];\n}\n\n/** @internal */\nexport function modernToLegacyWhereClause<\n T extends ObjectOrInterfaceDefinition,\n>(\n whereClause: WhereClause<T>,\n objectOrInterface: T,\n): SearchJsonQueryV2 {\n if (\"$and\" in whereClause) {\n return {\n type: \"and\",\n value: (whereClause.$and as WhereClause<T>[]).map(\n (clause) => modernToLegacyWhereClause(clause, objectOrInterface),\n ),\n };\n } else if (\"$or\" in whereClause) {\n return {\n type: \"or\",\n value: (whereClause.$or as WhereClause<T>[]).map(\n (clause) => modernToLegacyWhereClause(clause, objectOrInterface),\n ),\n };\n } else if (\"$not\" in whereClause) {\n return {\n type: \"not\",\n value: modernToLegacyWhereClause(\n whereClause.$not as WhereClause<T>,\n objectOrInterface,\n ),\n };\n }\n\n const parts = Object.entries(whereClause);\n\n if (parts.length === 1) {\n return handleWherePair(parts[0], objectOrInterface);\n }\n\n return {\n type: \"and\",\n value: parts.map<SearchJsonQueryV2>(\n v => handleWherePair(v, objectOrInterface),\n ),\n };\n}\n\nfunction makeGeoFilterBbox(\n field: string,\n bbox: BBox,\n filterType: \"$within\" | \"$intersects\",\n): SearchJsonQueryV2 {\n return {\n type: filterType === \"$within\"\n ? \"withinBoundingBox\"\n : \"intersectsBoundingBox\",\n field,\n value: {\n topLeft: {\n type: \"Point\",\n coordinates: [bbox[0], bbox[3]],\n },\n bottomRight: {\n type: \"Point\",\n coordinates: [bbox[2], bbox[1]],\n },\n },\n };\n}\n\nfunction makeGeoFilterPolygon(\n field: string,\n coordinates: Position[][],\n filterType: \"intersectsPolygon\" | \"withinPolygon\",\n): SearchJsonQueryV2 {\n return {\n type: filterType,\n field,\n value: {\n type: \"Polygon\",\n coordinates,\n },\n };\n}\n\nfunction handleWherePair(\n [field, filter]: [string, any],\n objectOrInterface: ObjectOrInterfaceDefinition,\n): SearchJsonQueryV2 {\n invariant(\n filter != null,\n \"Defined key values are only allowed when they are not undefined.\",\n );\n\n if (\n typeof filter === \"string\" || typeof filter === \"number\"\n || typeof filter === \"boolean\"\n ) {\n if (objectOrInterface.type === \"interface\") {\n const [objApiNamespace] = extractNamespace(objectOrInterface.apiName);\n const [fieldApiNamespace, fieldShortName] = extractNamespace(field);\n\n if (fieldApiNamespace == null && objApiNamespace != null) {\n field = `${objApiNamespace}.${fieldShortName}`;\n }\n }\n\n return {\n type: \"eq\",\n field,\n value: filter,\n };\n }\n\n const keysOfFilter = Object.keys(filter);\n\n // If any of the keys start with `$` then they must be the only one.\n // e.g. `where({ name: { $eq: \"foo\", $ne: \"bar\" } })` is invalid currently\n const hasDollarSign = keysOfFilter.some((key) => key.startsWith(\"$\"));\n invariant(\n !hasDollarSign\n || keysOfFilter.length === 1,\n \"WhereClause Filter with multiple clauses isn't allowed\",\n );\n\n if (!hasDollarSign) {\n // Future case for structs\n throw new Error(\n `Unsupported filter. Did you forget to use a $-prefixed filter? (${\n JSON.stringify(filter)\n })`,\n );\n }\n\n const firstKey = keysOfFilter[0] as PossibleWhereClauseFilters;\n invariant(filter[firstKey] != null);\n\n if (firstKey === \"$ne\") {\n return {\n type: \"not\",\n value: {\n type: \"eq\",\n field,\n value: filter[firstKey],\n },\n };\n }\n\n if (firstKey === \"$within\") {\n const withinBody = filter[firstKey] as GeoFilterOptions[\"$within\"];\n\n if (Array.isArray(withinBody)) {\n return makeGeoFilterBbox(field, withinBody, firstKey);\n } else if (\"$bbox\" in withinBody && withinBody.$bbox != null) {\n return makeGeoFilterBbox(field, withinBody.$bbox, firstKey);\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 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(field, coordinates, \"withinPolygon\");\n }\n }\n if (firstKey === \"$intersects\") {\n const intersectsBody = filter[firstKey] as GeoFilterOptions[\"$intersects\"];\n if (Array.isArray(intersectsBody)) {\n return makeGeoFilterBbox(field, intersectsBody, firstKey);\n } else if (\"$bbox\" in intersectsBody && intersectsBody.$bbox != null) {\n return makeGeoFilterBbox(field, intersectsBody.$bbox, firstKey);\n } else {\n const coordinates = (\"$polygon\" in intersectsBody)\n ? intersectsBody.$polygon\n : intersectsBody.coordinates;\n return makeGeoFilterPolygon(field, coordinates, \"intersectsPolygon\");\n }\n }\n\n if (firstKey === \"$containsAllTerms\" || firstKey === \"$containsAnyTerm\") {\n return {\n type: firstKey.substring(1) as DropDollarSign<typeof firstKey>,\n field,\n value: typeof filter[firstKey] === \"string\"\n ? filter[firstKey]\n : filter[firstKey][\"term\"],\n fuzzy: typeof filter[firstKey] === \"string\"\n ? false\n : filter[firstKey][\"fuzzySearch\"] ?? false,\n };\n }\n\n return {\n type: firstKey.substring(1) as DropDollarSign<typeof firstKey>,\n field,\n value: filter[firstKey] as any,\n };\n}\n\ntype DropDollarSign<T extends `$${string}`> = T extends `$${infer U}` ? U\n : never;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,SAASA,mBAAmB,QAAQ,WAAW;AAI/C,OAAOC,SAAS,MAAM,gBAAgB;AAEtC,OAAO,SAASC,gBAAgBA,CAC9BC,SAAiB,EACa;EAC9B,MAAMC,IAAI,GAAGD,SAAS,CAACE,WAAW,CAAC,GAAG,CAAC;EACvC,IAAID,IAAI,KAAK,CAAC,CAAC,EAAE,OAAO,CAACE,SAAS,EAAEH,SAAS,CAAC;EAC9C,OAAO,CAACA,SAAS,CAACI,KAAK,CAAC,CAAC,EAAEH,IAAI,CAAC,EAAED,SAAS,CAACI,KAAK,CAACH,IAAI,GAAG,CAAC,CAAC,CAAC;AAC9D;;AAEA;AACA,OAAO,SAASI,yBAAyBA,CAGvCC,WAA2B,EAC3BC,iBAAoB,EACD;EACnB,IAAI,MAAM,IAAID,WAAW,EAAE;IACzB,OAAO;MACLE,IAAI,EAAE,KAAK;MACXC,KAAK,EAAGH,WAAW,CAACI,IAAI,CAAsBC,GAAG,CAC9CC,MAAM,IAAKP,yBAAyB,CAACO,MAAM,EAAEL,iBAAiB,CACjE;IACF,CAAC;EACH,CAAC,MAAM,IAAI,KAAK,IAAID,WAAW,EAAE;IAC/B,OAAO;MACLE,IAAI,EAAE,IAAI;MACVC,KAAK,EAAGH,WAAW,CAACO,GAAG,CAAsBF,GAAG,CAC7CC,MAAM,IAAKP,yBAAyB,CAACO,MAAM,EAAEL,iBAAiB,CACjE;IACF,CAAC;EACH,CAAC,MAAM,IAAI,MAAM,IAAID,WAAW,EAAE;IAChC,OAAO;MACLE,IAAI,EAAE,KAAK;MACXC,KAAK,EAAEJ,yBAAyB,CAC9BC,WAAW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oB,MAAM,CAACiB,QAAQ;EACxB,CAAC;AACH","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import { objectTypeWithAllPropertyTypes } from "@osdk/client.test.ontology";
17
18
  import { expectType } from "ts-expect";
18
19
  import { describe, expect, it } from "vitest";