@osdk/client 2.0.0-beta.13 → 2.0.0-beta.15

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 (579) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/build/browser/Client.d.ts +39 -0
  3. package/build/browser/Client.d.ts.map +1 -0
  4. package/build/browser/Client.js +20 -0
  5. package/build/browser/Client.js.map +1 -0
  6. package/build/browser/Definitions.test.d.ts +2 -0
  7. package/build/browser/Definitions.test.d.ts.map +1 -0
  8. package/build/browser/Definitions.test.js +35 -0
  9. package/build/browser/Definitions.test.js.map +1 -0
  10. package/build/browser/Logger.d.ts +19 -0
  11. package/build/browser/Logger.d.ts.map +1 -0
  12. package/build/browser/Logger.js +17 -0
  13. package/build/browser/Logger.js.map +1 -0
  14. package/build/browser/MinimalClientContext.d.ts +26 -0
  15. package/build/browser/MinimalClientContext.d.ts.map +1 -0
  16. package/build/browser/MinimalClientContext.js +17 -0
  17. package/build/browser/MinimalClientContext.js.map +1 -0
  18. package/build/browser/ResultOrError.d.ts +12 -0
  19. package/build/browser/ResultOrError.d.ts.map +1 -0
  20. package/build/browser/ResultOrError.js +19 -0
  21. package/build/browser/ResultOrError.js.map +1 -0
  22. package/build/browser/SatisfiesSemver.d.ts +4 -0
  23. package/build/browser/SatisfiesSemver.d.ts.map +1 -0
  24. package/build/browser/SatisfiesSemver.js +17 -0
  25. package/build/browser/SatisfiesSemver.js.map +1 -0
  26. package/build/browser/SatisfiesSemver.test.d.ts +2 -0
  27. package/build/browser/SatisfiesSemver.test.d.ts.map +1 -0
  28. package/build/browser/SatisfiesSemver.test.js +69 -0
  29. package/build/browser/SatisfiesSemver.test.js.map +1 -0
  30. package/build/browser/__unstable/ConjureSupport.d.ts +55 -0
  31. package/build/browser/__unstable/ConjureSupport.d.ts.map +1 -0
  32. package/build/browser/__unstable/ConjureSupport.js +174 -0
  33. package/build/browser/__unstable/ConjureSupport.js.map +1 -0
  34. package/build/browser/__unstable/createBulkLinksAsyncIterFactory.d.ts +10 -0
  35. package/build/browser/__unstable/createBulkLinksAsyncIterFactory.d.ts.map +1 -0
  36. package/build/browser/__unstable/createBulkLinksAsyncIterFactory.js +114 -0
  37. package/build/browser/__unstable/createBulkLinksAsyncIterFactory.js.map +1 -0
  38. package/build/browser/actions/ActionValidationError.d.ts +6 -0
  39. package/build/browser/actions/ActionValidationError.d.ts.map +1 -0
  40. package/build/browser/actions/ActionValidationError.js +23 -0
  41. package/build/browser/actions/ActionValidationError.js.map +1 -0
  42. package/build/browser/actions/actions.test.d.ts +2 -0
  43. package/build/browser/actions/actions.test.d.ts.map +1 -0
  44. package/build/browser/actions/actions.test.js +323 -0
  45. package/build/browser/actions/actions.test.js.map +1 -0
  46. package/build/browser/actions/applyAction.d.ts +30 -0
  47. package/build/browser/actions/applyAction.d.ts.map +1 -0
  48. package/build/browser/actions/applyAction.js +114 -0
  49. package/build/browser/actions/applyAction.js.map +1 -0
  50. package/build/browser/createAttachmentFromRid.d.ts +10 -0
  51. package/build/browser/createAttachmentFromRid.d.ts.map +1 -0
  52. package/build/browser/createAttachmentFromRid.js +38 -0
  53. package/build/browser/createAttachmentFromRid.js.map +1 -0
  54. package/build/browser/createClient.d.ts +6 -0
  55. package/build/browser/createClient.d.ts.map +1 -0
  56. package/build/browser/createClient.js +88 -0
  57. package/build/browser/createClient.js.map +1 -0
  58. package/build/browser/createClient.test.d.ts +2 -0
  59. package/build/browser/createClient.test.d.ts.map +1 -0
  60. package/build/browser/createClient.test.js +45 -0
  61. package/build/browser/createClient.test.js.map +1 -0
  62. package/build/browser/createMinimalClient.d.ts +2 -0
  63. package/build/browser/createMinimalClient.d.ts.map +1 -0
  64. package/build/browser/createMinimalClient.js +42 -0
  65. package/build/browser/createMinimalClient.js.map +1 -0
  66. package/build/browser/createPlatformClient.d.ts +17 -0
  67. package/build/browser/createPlatformClient.d.ts.map +1 -0
  68. package/build/browser/createPlatformClient.js +33 -0
  69. package/build/browser/createPlatformClient.js.map +1 -0
  70. package/build/browser/createTimeseriesProperty.d.ts +14 -0
  71. package/build/browser/createTimeseriesProperty.d.ts.map +1 -0
  72. package/build/browser/createTimeseriesProperty.js +79 -0
  73. package/build/browser/createTimeseriesProperty.js.map +1 -0
  74. package/build/browser/definitions/LinkDefinitions.test.d.ts +2 -0
  75. package/build/browser/definitions/LinkDefinitions.test.d.ts.map +1 -0
  76. package/build/browser/definitions/LinkDefinitions.test.js +41 -0
  77. package/build/browser/definitions/LinkDefinitions.test.js.map +1 -0
  78. package/build/browser/fetchMetadata.d.ts +2 -0
  79. package/build/browser/fetchMetadata.d.ts.map +1 -0
  80. package/build/browser/fetchMetadata.js +35 -0
  81. package/build/browser/fetchMetadata.js.map +1 -0
  82. package/build/browser/fetchMetadata.test.d.ts +2 -0
  83. package/build/browser/fetchMetadata.test.d.ts.map +1 -0
  84. package/build/browser/fetchMetadata.test.js +218 -0
  85. package/build/browser/fetchMetadata.test.js.map +1 -0
  86. package/build/browser/index.d.ts +13 -0
  87. package/build/browser/index.d.ts.map +1 -0
  88. package/build/browser/index.js +22 -725
  89. package/build/browser/index.js.map +1 -1
  90. package/build/browser/intellisense.test.d.ts +2 -0
  91. package/build/browser/intellisense.test.d.ts.map +1 -0
  92. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.d.ts +2 -0
  93. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.d.ts.map +1 -0
  94. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.js +25 -0
  95. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.js.map +1 -0
  96. package/build/browser/intellisense.test.js +86 -0
  97. package/build/browser/intellisense.test.js.map +1 -0
  98. package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.d.ts +2 -0
  99. package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.d.ts.map +1 -0
  100. package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.js +34 -0
  101. package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.js.map +1 -0
  102. package/build/browser/internal/conversions/modernToLegacyAggregationClause.d.ts +2 -0
  103. package/build/browser/internal/conversions/modernToLegacyAggregationClause.d.ts.map +1 -0
  104. package/build/browser/internal/conversions/modernToLegacyAggregationClause.js +38 -0
  105. package/build/browser/internal/conversions/modernToLegacyAggregationClause.js.map +1 -0
  106. package/build/browser/internal/conversions/modernToLegacyGroupByClause.d.ts +2 -0
  107. package/build/browser/internal/conversions/modernToLegacyGroupByClause.d.ts.map +1 -0
  108. package/build/browser/internal/conversions/modernToLegacyGroupByClause.js +62 -0
  109. package/build/browser/internal/conversions/modernToLegacyGroupByClause.js.map +1 -0
  110. package/build/browser/internal/conversions/modernToLegacyWhereClause.d.ts +2 -0
  111. package/build/browser/internal/conversions/modernToLegacyWhereClause.d.ts.map +1 -0
  112. package/build/browser/internal/conversions/modernToLegacyWhereClause.js +144 -0
  113. package/build/browser/internal/conversions/modernToLegacyWhereClause.js.map +1 -0
  114. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.d.ts +2 -0
  115. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.d.ts.map +1 -0
  116. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js +486 -0
  117. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -0
  118. package/build/browser/object/AttachmentUpload.d.ts +4 -0
  119. package/build/browser/object/AttachmentUpload.d.ts.map +1 -0
  120. package/build/browser/object/AttachmentUpload.js +27 -0
  121. package/build/browser/object/AttachmentUpload.js.map +1 -0
  122. package/build/browser/object/Cache.d.ts +2 -0
  123. package/build/browser/object/Cache.d.ts.map +1 -0
  124. package/build/browser/object/Cache.js +76 -0
  125. package/build/browser/object/Cache.js.map +1 -0
  126. package/build/browser/object/Cache.test.d.ts +11 -0
  127. package/build/browser/object/Cache.test.d.ts.map +1 -0
  128. package/build/browser/object/Cache.test.js +283 -0
  129. package/build/browser/object/Cache.test.js.map +1 -0
  130. package/build/browser/object/SimpleCache.d.ts +38 -0
  131. package/build/browser/object/SimpleCache.d.ts.map +1 -0
  132. package/build/browser/object/SimpleCache.js +67 -0
  133. package/build/browser/object/SimpleCache.js.map +1 -0
  134. package/build/browser/object/aggregate.d.ts +2 -0
  135. package/build/browser/object/aggregate.d.ts.map +1 -0
  136. package/build/browser/object/aggregate.js +69 -0
  137. package/build/browser/object/aggregate.js.map +1 -0
  138. package/build/browser/object/aggregate.test.d.ts +2 -0
  139. package/build/browser/object/aggregate.test.d.ts.map +1 -0
  140. package/build/browser/object/aggregate.test.js +398 -0
  141. package/build/browser/object/aggregate.test.js.map +1 -0
  142. package/build/browser/object/attachment.test.d.ts +2 -0
  143. package/build/browser/object/attachment.test.d.ts.map +1 -0
  144. package/build/browser/object/attachment.test.js +55 -0
  145. package/build/browser/object/attachment.test.js.map +1 -0
  146. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.d.ts +11 -0
  147. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.d.ts.map +1 -0
  148. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.js +17 -0
  149. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -0
  150. package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.d.ts +13 -0
  151. package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.d.ts.map +1 -0
  152. package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.js +22 -0
  153. package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.js.map +1 -0
  154. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.d.ts +2 -0
  155. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.d.ts.map +1 -0
  156. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.js +17 -0
  157. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.js.map +1 -0
  158. package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts +2 -0
  159. package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts.map +1 -0
  160. package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js +48 -0
  161. package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js.map +1 -0
  162. package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts +8 -0
  163. package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts.map +1 -0
  164. package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js +17 -0
  165. package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js.map +1 -0
  166. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.d.ts +2 -0
  167. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.d.ts.map +1 -0
  168. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js +82 -0
  169. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -0
  170. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.d.ts +2 -0
  171. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.d.ts.map +1 -0
  172. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js +114 -0
  173. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -0
  174. package/build/browser/object/convertWireToOsdkObjects/getDollarAs.d.ts +3 -0
  175. package/build/browser/object/convertWireToOsdkObjects/getDollarAs.d.ts.map +1 -0
  176. package/build/browser/object/convertWireToOsdkObjects/getDollarAs.js +55 -0
  177. package/build/browser/object/convertWireToOsdkObjects/getDollarAs.js.map +1 -0
  178. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.d.ts +2 -0
  179. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.d.ts.map +1 -0
  180. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.js +60 -0
  181. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.js.map +1 -0
  182. package/build/browser/object/convertWireToOsdkObjects.d.ts +2 -0
  183. package/build/browser/object/convertWireToOsdkObjects.d.ts.map +1 -0
  184. package/build/browser/object/convertWireToOsdkObjects.js +150 -0
  185. package/build/browser/object/convertWireToOsdkObjects.js.map +1 -0
  186. package/build/browser/object/convertWireToOsdkObjects.test.d.ts +2 -0
  187. package/build/browser/object/convertWireToOsdkObjects.test.d.ts.map +1 -0
  188. package/build/browser/object/convertWireToOsdkObjects.test.js +254 -0
  189. package/build/browser/object/convertWireToOsdkObjects.test.js.map +1 -0
  190. package/build/browser/object/fetchPage.d.ts +3 -0
  191. package/build/browser/object/fetchPage.d.ts.map +1 -0
  192. package/build/browser/object/fetchPage.js +135 -0
  193. package/build/browser/object/fetchPage.js.map +1 -0
  194. package/build/browser/object/fetchPage.test.d.ts +2 -0
  195. package/build/browser/object/fetchPage.test.d.ts.map +1 -0
  196. package/build/browser/object/fetchPage.test.js +106 -0
  197. package/build/browser/object/fetchPage.test.js.map +1 -0
  198. package/build/browser/object/fetchSingle.d.ts +2 -0
  199. package/build/browser/object/fetchSingle.d.ts.map +1 -0
  200. package/build/browser/object/fetchSingle.js +47 -0
  201. package/build/browser/object/fetchSingle.js.map +1 -0
  202. package/build/browser/object/object.test.d.ts +12 -0
  203. package/build/browser/object/object.test.d.ts.map +1 -0
  204. package/build/browser/object/object.test.js +179 -0
  205. package/build/browser/object/object.test.js.map +1 -0
  206. package/build/browser/object/timeseries.test.d.ts +2 -0
  207. package/build/browser/object/timeseries.test.d.ts.map +1 -0
  208. package/build/browser/object/timeseries.test.js +163 -0
  209. package/build/browser/object/timeseries.test.js.map +1 -0
  210. package/build/browser/objectSet/ObjectSet.test.d.ts +2 -0
  211. package/build/browser/objectSet/ObjectSet.test.d.ts.map +1 -0
  212. package/build/browser/objectSet/ObjectSet.test.js +313 -0
  213. package/build/browser/objectSet/ObjectSet.test.js.map +1 -0
  214. package/build/browser/objectSet/ObjectSetFactory.d.ts +2 -0
  215. package/build/browser/objectSet/ObjectSetFactory.d.ts.map +1 -0
  216. package/build/browser/objectSet/ObjectSetFactory.js +17 -0
  217. package/build/browser/objectSet/ObjectSetFactory.js.map +1 -0
  218. package/build/browser/objectSet/ObjectSetListenerWebsocket.d.ts +7 -0
  219. package/build/browser/objectSet/ObjectSetListenerWebsocket.d.ts.map +1 -0
  220. package/build/browser/objectSet/ObjectSetListenerWebsocket.js +533 -0
  221. package/build/browser/objectSet/ObjectSetListenerWebsocket.js.map +1 -0
  222. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.d.ts +2 -0
  223. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.d.ts.map +1 -0
  224. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js +338 -0
  225. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -0
  226. package/build/browser/objectSet/conjureUnionType.d.ts +13 -0
  227. package/build/browser/objectSet/conjureUnionType.d.ts.map +1 -0
  228. package/build/browser/objectSet/conjureUnionType.js +27 -0
  229. package/build/browser/objectSet/conjureUnionType.js.map +1 -0
  230. package/build/browser/objectSet/createObjectSet.d.ts +2 -0
  231. package/build/browser/objectSet/createObjectSet.d.ts.map +1 -0
  232. package/build/browser/objectSet/createObjectSet.js +136 -0
  233. package/build/browser/objectSet/createObjectSet.js.map +1 -0
  234. package/build/browser/objectSet/toConjureObjectSet.d.ts +2 -0
  235. package/build/browser/objectSet/toConjureObjectSet.d.ts.map +1 -0
  236. package/build/browser/objectSet/toConjureObjectSet.js +158 -0
  237. package/build/browser/objectSet/toConjureObjectSet.js.map +1 -0
  238. package/build/browser/ontology/OntologyProvider.d.ts +32 -0
  239. package/build/browser/ontology/OntologyProvider.d.ts.map +1 -0
  240. package/build/browser/ontology/OntologyProvider.js +17 -0
  241. package/build/browser/ontology/OntologyProvider.js.map +1 -0
  242. package/build/browser/ontology/StandardOntologyProvider.d.ts +5 -0
  243. package/build/browser/ontology/StandardOntologyProvider.d.ts.map +1 -0
  244. package/build/browser/ontology/StandardOntologyProvider.js +59 -0
  245. package/build/browser/ontology/StandardOntologyProvider.js.map +1 -0
  246. package/build/browser/ontology/StandardOntologyProvider.test.d.ts +2 -0
  247. package/build/browser/ontology/StandardOntologyProvider.test.d.ts.map +1 -0
  248. package/build/browser/ontology/StandardOntologyProvider.test.js +48 -0
  249. package/build/browser/ontology/StandardOntologyProvider.test.js.map +1 -0
  250. package/build/browser/ontology/loadActionMetadata.d.ts +4 -0
  251. package/build/browser/ontology/loadActionMetadata.d.ts.map +1 -0
  252. package/build/browser/ontology/loadActionMetadata.js +22 -0
  253. package/build/browser/ontology/loadActionMetadata.js.map +1 -0
  254. package/build/browser/ontology/loadFullObjectMetadata.d.ts +6 -0
  255. package/build/browser/ontology/loadFullObjectMetadata.d.ts.map +1 -0
  256. package/build/browser/ontology/loadFullObjectMetadata.js +28 -0
  257. package/build/browser/ontology/loadFullObjectMetadata.js.map +1 -0
  258. package/build/browser/ontology/loadInterfaceMetadata.d.ts +4 -0
  259. package/build/browser/ontology/loadInterfaceMetadata.d.ts.map +1 -0
  260. package/build/browser/ontology/loadInterfaceMetadata.js +24 -0
  261. package/build/browser/ontology/loadInterfaceMetadata.js.map +1 -0
  262. package/build/browser/ontology/loadQueryMetadata.d.ts +4 -0
  263. package/build/browser/ontology/loadQueryMetadata.d.ts.map +1 -0
  264. package/build/browser/ontology/loadQueryMetadata.js +22 -0
  265. package/build/browser/ontology/loadQueryMetadata.js.map +1 -0
  266. package/build/browser/ontology/makeConjureContext.d.ts +4 -0
  267. package/build/browser/ontology/makeConjureContext.d.ts.map +1 -0
  268. package/build/browser/ontology/makeConjureContext.js +28 -0
  269. package/build/browser/ontology/makeConjureContext.js.map +1 -0
  270. package/build/browser/pageRequestAsAsyncIter.d.ts +10 -0
  271. package/build/browser/pageRequestAsAsyncIter.d.ts.map +1 -0
  272. package/build/browser/pageRequestAsAsyncIter.js +37 -0
  273. package/build/browser/pageRequestAsAsyncIter.js.map +1 -0
  274. package/build/browser/public/unstable-do-not-use.d.ts +2 -0
  275. package/build/browser/public/unstable-do-not-use.d.ts.map +1 -0
  276. package/build/browser/public/unstable-do-not-use.js +16 -2
  277. package/build/browser/public/unstable-do-not-use.js.map +1 -1
  278. package/build/browser/queries/applyQuery.d.ts +6 -0
  279. package/build/browser/queries/applyQuery.d.ts.map +1 -0
  280. package/build/browser/queries/applyQuery.js +234 -0
  281. package/build/browser/queries/applyQuery.js.map +1 -0
  282. package/build/browser/queries/queries.test.d.ts +2 -0
  283. package/build/browser/queries/queries.test.d.ts.map +1 -0
  284. package/build/browser/queries/queries.test.js +171 -0
  285. package/build/browser/queries/queries.test.js.map +1 -0
  286. package/build/browser/queries/types.d.ts +20 -0
  287. package/build/browser/queries/types.d.ts.map +1 -0
  288. package/build/browser/queries/types.js +17 -0
  289. package/build/browser/queries/types.js.map +1 -0
  290. package/build/browser/tsserver.d.ts +34 -0
  291. package/build/browser/tsserver.d.ts.map +1 -0
  292. package/build/browser/tsserver.js +133 -0
  293. package/build/browser/tsserver.js.map +1 -0
  294. package/build/browser/util/ArrayElement.d.ts +2 -0
  295. package/build/browser/util/ArrayElement.d.ts.map +1 -0
  296. package/build/browser/util/ArrayElement.js +17 -0
  297. package/build/browser/util/ArrayElement.js.map +1 -0
  298. package/build/browser/util/NOOP.d.ts +4 -0
  299. package/build/browser/util/NOOP.d.ts.map +1 -0
  300. package/build/browser/util/NOOP.js +17 -0
  301. package/build/browser/util/NOOP.js.map +1 -0
  302. package/build/browser/util/NullableProps.d.ts +6 -0
  303. package/build/browser/util/NullableProps.d.ts.map +1 -0
  304. package/build/browser/util/NullableProps.js +17 -0
  305. package/build/browser/util/NullableProps.js.map +1 -0
  306. package/build/browser/util/UserAgent.d.ts +2 -0
  307. package/build/browser/util/UserAgent.d.ts.map +1 -0
  308. package/build/browser/util/UserAgent.js +17 -0
  309. package/build/browser/util/UserAgent.js.map +1 -0
  310. package/build/browser/util/WireObjectSet.d.ts +2 -0
  311. package/build/browser/util/WireObjectSet.d.ts.map +1 -0
  312. package/build/browser/util/WireObjectSet.js +21 -0
  313. package/build/browser/util/WireObjectSet.js.map +1 -0
  314. package/build/browser/util/addUserAgentAndRequestContextHeaders.d.ts +4 -0
  315. package/build/browser/util/addUserAgentAndRequestContextHeaders.d.ts.map +1 -0
  316. package/build/browser/util/addUserAgentAndRequestContextHeaders.js +27 -0
  317. package/build/browser/util/addUserAgentAndRequestContextHeaders.js.map +1 -0
  318. package/build/browser/util/augmentRequestContext.d.ts +32 -0
  319. package/build/browser/util/augmentRequestContext.d.ts.map +1 -0
  320. package/build/browser/util/augmentRequestContext.js +52 -0
  321. package/build/browser/util/augmentRequestContext.js.map +1 -0
  322. package/build/browser/util/isOntologyObjectV2.d.ts +2 -0
  323. package/build/browser/util/isOntologyObjectV2.d.ts.map +1 -0
  324. package/build/browser/util/isOntologyObjectV2.js +20 -0
  325. package/build/browser/util/isOntologyObjectV2.js.map +1 -0
  326. package/build/browser/util/isOsdkBaseObject.d.ts +3 -0
  327. package/build/browser/util/isOsdkBaseObject.d.ts.map +1 -0
  328. package/build/browser/util/isOsdkBaseObject.js +19 -0
  329. package/build/browser/util/isOsdkBaseObject.js.map +1 -0
  330. package/build/browser/util/isOsdkObject.d.ts +3 -0
  331. package/build/browser/util/isOsdkObject.d.ts.map +1 -0
  332. package/build/browser/util/isOsdkObject.js +19 -0
  333. package/build/browser/util/isOsdkObject.js.map +1 -0
  334. package/build/browser/util/partialBy.d.ts +3 -0
  335. package/build/browser/util/partialBy.d.ts.map +1 -0
  336. package/build/browser/util/partialBy.js +17 -0
  337. package/build/browser/util/partialBy.js.map +1 -0
  338. package/build/browser/util/streamutils.d.ts +3 -0
  339. package/build/browser/util/streamutils.d.ts.map +1 -0
  340. package/build/browser/util/streamutils.js +95 -0
  341. package/build/browser/util/streamutils.js.map +1 -0
  342. package/build/browser/util/toDataValue.d.ts +2 -0
  343. package/build/browser/util/toDataValue.d.ts.map +1 -0
  344. package/build/browser/util/toDataValue.js +73 -0
  345. package/build/browser/util/toDataValue.js.map +1 -0
  346. package/build/browser/util/toDataValue.test.d.ts +2 -0
  347. package/build/browser/util/toDataValue.test.d.ts.map +1 -0
  348. package/build/browser/util/toDataValue.test.js +117 -0
  349. package/build/browser/util/toDataValue.test.js.map +1 -0
  350. package/build/browser/util/toDataValueQueries.d.ts +2 -0
  351. package/build/browser/util/toDataValueQueries.d.ts.map +1 -0
  352. package/build/browser/util/toDataValueQueries.js +107 -0
  353. package/build/browser/util/toDataValueQueries.js.map +1 -0
  354. package/build/esm/Client.d.ts +6 -7
  355. package/build/esm/Client.d.ts.map +1 -1
  356. package/build/esm/Client.js +20 -0
  357. package/build/esm/Client.js.map +1 -0
  358. package/build/esm/Definitions.test.js +35 -0
  359. package/build/esm/Definitions.test.js.map +1 -0
  360. package/build/esm/Logger.js +17 -0
  361. package/build/esm/Logger.js.map +1 -0
  362. package/build/esm/MinimalClientContext.js +17 -0
  363. package/build/esm/MinimalClientContext.js.map +1 -0
  364. package/build/esm/ResultOrError.js +19 -0
  365. package/build/esm/ResultOrError.js.map +1 -0
  366. package/build/esm/SatisfiesSemver.js +17 -0
  367. package/build/esm/SatisfiesSemver.js.map +1 -0
  368. package/build/esm/SatisfiesSemver.test.js +69 -0
  369. package/build/esm/SatisfiesSemver.test.js.map +1 -0
  370. package/build/esm/__unstable/ConjureSupport.js +174 -0
  371. package/build/esm/__unstable/ConjureSupport.js.map +1 -0
  372. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.d.ts +1 -1
  373. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.d.ts.map +1 -1
  374. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.js +114 -0
  375. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.js.map +1 -0
  376. package/build/esm/actions/ActionValidationError.d.ts +1 -1
  377. package/build/esm/actions/ActionValidationError.d.ts.map +1 -1
  378. package/build/esm/actions/ActionValidationError.js +23 -0
  379. package/build/esm/actions/ActionValidationError.js.map +1 -0
  380. package/build/esm/actions/actions.test.js +323 -0
  381. package/build/esm/actions/actions.test.js.map +1 -0
  382. package/build/esm/actions/applyAction.d.ts +9 -10
  383. package/build/esm/actions/applyAction.d.ts.map +1 -1
  384. package/build/esm/actions/applyAction.js +114 -0
  385. package/build/esm/actions/applyAction.js.map +1 -0
  386. package/build/esm/createAttachmentFromRid.d.ts +1 -1
  387. package/build/esm/createAttachmentFromRid.d.ts.map +1 -1
  388. package/build/esm/createAttachmentFromRid.js +38 -0
  389. package/build/esm/createAttachmentFromRid.js.map +1 -0
  390. package/build/esm/createClient.d.ts.map +1 -1
  391. package/build/esm/createClient.js +88 -0
  392. package/build/esm/createClient.js.map +1 -0
  393. package/build/esm/createClient.test.js +45 -0
  394. package/build/esm/createClient.test.js.map +1 -0
  395. package/build/esm/createMinimalClient.js +42 -0
  396. package/build/esm/createMinimalClient.js.map +1 -0
  397. package/build/esm/createPlatformClient.js +33 -0
  398. package/build/esm/createPlatformClient.js.map +1 -0
  399. package/build/esm/createTimeseriesProperty.d.ts +12 -2
  400. package/build/esm/createTimeseriesProperty.d.ts.map +1 -1
  401. package/build/esm/createTimeseriesProperty.js +79 -0
  402. package/build/esm/createTimeseriesProperty.js.map +1 -0
  403. package/build/esm/definitions/LinkDefinitions.test.js +41 -0
  404. package/build/esm/definitions/LinkDefinitions.test.js.map +1 -0
  405. package/build/esm/fetchMetadata.js +35 -0
  406. package/build/esm/fetchMetadata.js.map +1 -0
  407. package/build/esm/fetchMetadata.test.js +218 -0
  408. package/build/esm/fetchMetadata.test.js.map +1 -0
  409. package/build/esm/index.d.ts +2 -2
  410. package/build/esm/index.d.ts.map +1 -1
  411. package/build/esm/index.js +22 -725
  412. package/build/esm/index.js.map +1 -1
  413. package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.js +25 -0
  414. package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.js.map +1 -0
  415. package/build/esm/intellisense.test.js +86 -0
  416. package/build/esm/intellisense.test.js.map +1 -0
  417. package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.js +34 -0
  418. package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.js.map +1 -0
  419. package/build/esm/internal/conversions/modernToLegacyAggregationClause.js +38 -0
  420. package/build/esm/internal/conversions/modernToLegacyAggregationClause.js.map +1 -0
  421. package/build/esm/internal/conversions/modernToLegacyGroupByClause.js +62 -0
  422. package/build/esm/internal/conversions/modernToLegacyGroupByClause.js.map +1 -0
  423. package/build/esm/internal/conversions/modernToLegacyWhereClause.js +144 -0
  424. package/build/esm/internal/conversions/modernToLegacyWhereClause.js.map +1 -0
  425. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js +486 -0
  426. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -0
  427. package/build/esm/object/AttachmentUpload.d.ts +1 -1
  428. package/build/esm/object/AttachmentUpload.d.ts.map +1 -1
  429. package/build/esm/object/AttachmentUpload.js +27 -0
  430. package/build/esm/object/AttachmentUpload.js.map +1 -0
  431. package/build/esm/object/Cache.js +76 -0
  432. package/build/esm/object/Cache.js.map +1 -0
  433. package/build/esm/object/Cache.test.js +283 -0
  434. package/build/esm/object/Cache.test.js.map +1 -0
  435. package/build/esm/object/SimpleCache.js +67 -0
  436. package/build/esm/object/SimpleCache.js.map +1 -0
  437. package/build/esm/object/aggregate.js +69 -0
  438. package/build/esm/object/aggregate.js.map +1 -0
  439. package/build/esm/object/aggregate.test.js +398 -0
  440. package/build/esm/object/aggregate.test.js.map +1 -0
  441. package/build/esm/object/attachment.test.js +55 -0
  442. package/build/esm/object/attachment.test.js.map +1 -0
  443. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.d.ts +4 -5
  444. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.d.ts.map +1 -1
  445. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js +17 -0
  446. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -0
  447. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.d.ts +2 -3
  448. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.d.ts.map +1 -1
  449. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.js +22 -0
  450. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.js.map +1 -0
  451. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.js +17 -0
  452. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.js.map +1 -0
  453. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts.map +1 -1
  454. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js +48 -0
  455. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js.map +1 -0
  456. package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js +17 -0
  457. package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js.map +1 -0
  458. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js +82 -0
  459. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -0
  460. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js +114 -0
  461. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -0
  462. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.d.ts +1 -1
  463. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.d.ts.map +1 -1
  464. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.js +55 -0
  465. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.js.map +1 -0
  466. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.js +60 -0
  467. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.js.map +1 -0
  468. package/build/esm/object/convertWireToOsdkObjects.js +150 -0
  469. package/build/esm/object/convertWireToOsdkObjects.js.map +1 -0
  470. package/build/esm/object/convertWireToOsdkObjects.test.js +254 -0
  471. package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -0
  472. package/build/esm/object/fetchPage.d.ts +2 -3
  473. package/build/esm/object/fetchPage.d.ts.map +1 -1
  474. package/build/esm/object/fetchPage.js +135 -0
  475. package/build/esm/object/fetchPage.js.map +1 -0
  476. package/build/esm/object/fetchPage.test.js +106 -0
  477. package/build/esm/object/fetchPage.test.js.map +1 -0
  478. package/build/esm/object/fetchSingle.js +47 -0
  479. package/build/esm/object/fetchSingle.js.map +1 -0
  480. package/build/esm/object/object.test.d.ts +1 -1
  481. package/build/esm/object/object.test.d.ts.map +1 -1
  482. package/build/esm/object/object.test.js +179 -0
  483. package/build/esm/object/object.test.js.map +1 -0
  484. package/build/esm/object/timeseries.test.js +163 -0
  485. package/build/esm/object/timeseries.test.js.map +1 -0
  486. package/build/esm/objectSet/ObjectSet.test.js +313 -0
  487. package/build/esm/objectSet/ObjectSet.test.js.map +1 -0
  488. package/build/esm/objectSet/ObjectSetFactory.js +17 -0
  489. package/build/esm/objectSet/ObjectSetFactory.js.map +1 -0
  490. package/build/esm/objectSet/ObjectSetListenerWebsocket.d.ts.map +1 -1
  491. package/build/esm/objectSet/ObjectSetListenerWebsocket.js +536 -0
  492. package/build/esm/objectSet/ObjectSetListenerWebsocket.js.map +1 -0
  493. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js +338 -0
  494. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -0
  495. package/build/esm/objectSet/conjureUnionType.js +27 -0
  496. package/build/esm/objectSet/conjureUnionType.js.map +1 -0
  497. package/build/esm/objectSet/createObjectSet.js +136 -0
  498. package/build/esm/objectSet/createObjectSet.js.map +1 -0
  499. package/build/esm/objectSet/toConjureObjectSet.js +158 -0
  500. package/build/esm/objectSet/toConjureObjectSet.js.map +1 -0
  501. package/build/esm/ontology/OntologyProvider.d.ts +5 -5
  502. package/build/esm/ontology/OntologyProvider.d.ts.map +1 -1
  503. package/build/esm/ontology/OntologyProvider.js +17 -0
  504. package/build/esm/ontology/OntologyProvider.js.map +1 -0
  505. package/build/esm/ontology/StandardOntologyProvider.js +59 -0
  506. package/build/esm/ontology/StandardOntologyProvider.js.map +1 -0
  507. package/build/esm/ontology/StandardOntologyProvider.test.js +48 -0
  508. package/build/esm/ontology/StandardOntologyProvider.test.js.map +1 -0
  509. package/build/esm/ontology/loadActionMetadata.d.ts +1 -1
  510. package/build/esm/ontology/loadActionMetadata.d.ts.map +1 -1
  511. package/build/esm/ontology/loadActionMetadata.js +22 -0
  512. package/build/esm/ontology/loadActionMetadata.js.map +1 -0
  513. package/build/esm/ontology/loadFullObjectMetadata.d.ts +1 -1
  514. package/build/esm/ontology/loadFullObjectMetadata.d.ts.map +1 -1
  515. package/build/esm/ontology/loadFullObjectMetadata.js +28 -0
  516. package/build/esm/ontology/loadFullObjectMetadata.js.map +1 -0
  517. package/build/esm/ontology/loadInterfaceMetadata.d.ts +1 -1
  518. package/build/esm/ontology/loadInterfaceMetadata.d.ts.map +1 -1
  519. package/build/esm/ontology/loadInterfaceMetadata.js +24 -0
  520. package/build/esm/ontology/loadInterfaceMetadata.js.map +1 -0
  521. package/build/esm/ontology/loadQueryMetadata.js +22 -0
  522. package/build/esm/ontology/loadQueryMetadata.js.map +1 -0
  523. package/build/esm/ontology/makeConjureContext.js +28 -0
  524. package/build/esm/ontology/makeConjureContext.js.map +1 -0
  525. package/build/esm/pageRequestAsAsyncIter.js +37 -0
  526. package/build/esm/pageRequestAsAsyncIter.js.map +1 -0
  527. package/build/esm/public/unstable-do-not-use.js +16 -2
  528. package/build/esm/public/unstable-do-not-use.js.map +1 -1
  529. package/build/esm/queries/applyQuery.d.ts +1 -2
  530. package/build/esm/queries/applyQuery.d.ts.map +1 -1
  531. package/build/esm/queries/applyQuery.js +234 -0
  532. package/build/esm/queries/applyQuery.js.map +1 -0
  533. package/build/esm/queries/queries.test.js +171 -0
  534. package/build/esm/queries/queries.test.js.map +1 -0
  535. package/build/esm/queries/types.d.ts +1 -2
  536. package/build/esm/queries/types.d.ts.map +1 -1
  537. package/build/esm/queries/types.js +17 -0
  538. package/build/esm/queries/types.js.map +1 -0
  539. package/build/esm/tsserver.js +133 -0
  540. package/build/esm/tsserver.js.map +1 -0
  541. package/build/esm/util/ArrayElement.js +17 -0
  542. package/build/esm/util/ArrayElement.js.map +1 -0
  543. package/build/esm/util/NOOP.js +17 -0
  544. package/build/esm/util/NOOP.js.map +1 -0
  545. package/build/esm/util/NullableProps.js +17 -0
  546. package/build/esm/util/NullableProps.js.map +1 -0
  547. package/build/esm/util/UserAgent.js +17 -0
  548. package/build/esm/util/UserAgent.js.map +1 -0
  549. package/build/esm/util/WireObjectSet.js +21 -0
  550. package/build/esm/util/WireObjectSet.js.map +1 -0
  551. package/build/esm/util/addUserAgentAndRequestContextHeaders.js +27 -0
  552. package/build/esm/util/addUserAgentAndRequestContextHeaders.js.map +1 -0
  553. package/build/esm/util/augmentRequestContext.js +52 -0
  554. package/build/esm/util/augmentRequestContext.js.map +1 -0
  555. package/build/esm/util/isOntologyObjectV2.js +20 -0
  556. package/build/esm/util/isOntologyObjectV2.js.map +1 -0
  557. package/build/esm/util/isOsdkBaseObject.d.ts +1 -1
  558. package/build/esm/util/isOsdkBaseObject.d.ts.map +1 -1
  559. package/build/esm/util/isOsdkBaseObject.js +19 -0
  560. package/build/esm/util/isOsdkBaseObject.js.map +1 -0
  561. package/build/esm/util/isOsdkObject.d.ts +1 -1
  562. package/build/esm/util/isOsdkObject.d.ts.map +1 -1
  563. package/build/esm/util/isOsdkObject.js +19 -0
  564. package/build/esm/util/isOsdkObject.js.map +1 -0
  565. package/build/esm/util/partialBy.js +17 -0
  566. package/build/esm/util/partialBy.js.map +1 -0
  567. package/build/esm/util/streamutils.js +95 -0
  568. package/build/esm/util/streamutils.js.map +1 -0
  569. package/build/esm/util/toDataValue.js +73 -0
  570. package/build/esm/util/toDataValue.js.map +1 -0
  571. package/build/esm/util/toDataValue.test.js +117 -0
  572. package/build/esm/util/toDataValue.test.js.map +1 -0
  573. package/build/esm/util/toDataValueQueries.js +107 -0
  574. package/build/esm/util/toDataValueQueries.js.map +1 -0
  575. package/package.json +14 -18
  576. package/build/browser/chunk-CG25K4WC.js +0 -2502
  577. package/build/browser/chunk-CG25K4WC.js.map +0 -1
  578. package/build/esm/chunk-MQTCPUPF.js +0 -2505
  579. package/build/esm/chunk-MQTCPUPF.js.map +0 -1
@@ -0,0 +1,48 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { InterfaceDefRef, ObjectDefRef, UnderlyingOsdkObject } from "./InternalSymbols.js";
17
+ export const OsdkCustomInspectPrototype = Object.create(null, {
18
+ [Symbol.for("nodejs.util.inspect.custom")]: {
19
+ value: customInspect
20
+ }
21
+ });
22
+ /**
23
+ * A custom `util.inspect`/`console.log` for nodejs. Not emitted in the browser version
24
+ * @param this
25
+ * @param _depth
26
+ * @param options
27
+ * @param inspect
28
+ * @returns
29
+ */
30
+ function customInspect(_depth, options, localInspect) {
31
+ const newOptions = {
32
+ ...options,
33
+ depth: options.depth == null ? null : options.depth - 1
34
+ };
35
+ let ret = `Osdk<${options.stylize(this[ObjectDefRef]?.apiName ?? this[InterfaceDefRef]?.apiName ?? "", "special")}> {\n`;
36
+ for (const k of new Set(["$apiName", "$objectType", "$primaryKey", ...Reflect.ownKeys(this)])) {
37
+ if (typeof k === "symbol") continue;
38
+ ret += ` ${options.stylize(k.toString(), "undefined")}: ${localInspect(this[k], newOptions)}\n`;
39
+ }
40
+ if (this[UnderlyingOsdkObject] !== this) {
41
+ ret += "\n";
42
+ ret += ` ${options.stylize("$as", "special")}: ${localInspect(this[UnderlyingOsdkObject], newOptions).replace(/\n/g, `\n `)}`;
43
+ ret += "\n";
44
+ }
45
+ ret += "}";
46
+ return ret;
47
+ }
48
+ //# sourceMappingURL=OsdkCustomInspectPrototype.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OsdkCustomInspectPrototype.js","names":["InterfaceDefRef","ObjectDefRef","UnderlyingOsdkObject","OsdkCustomInspectPrototype","Object","create","Symbol","for","value","customInspect","_depth","options","localInspect","newOptions","depth","ret","stylize","apiName","k","Set","Reflect","ownKeys","toString","replace"],"sources":["OsdkCustomInspectPrototype.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 { InterfaceDefRef, ObjectDefRef, UnderlyingOsdkObject, } from \"./InternalSymbols.js\";\nexport const OsdkCustomInspectPrototype = Object.create(null, {\n [Symbol.for(\"nodejs.util.inspect.custom\")]: { value: customInspect },\n});\n/**\n * A custom `util.inspect`/`console.log` for nodejs. Not emitted in the browser version\n * @param this\n * @param _depth\n * @param options\n * @param inspect\n * @returns\n */\nfunction customInspect(_depth, options, localInspect) {\n const newOptions = {\n ...options,\n depth: options.depth == null ? null : options.depth - 1,\n };\n let ret = `Osdk<${options.stylize(this[ObjectDefRef]?.apiName ?? this[InterfaceDefRef]?.apiName ?? \"\", \"special\")}> {\\n`;\n for (const k of new Set([\n \"$apiName\",\n \"$objectType\",\n \"$primaryKey\",\n ...Reflect.ownKeys(this),\n ])) {\n if (typeof k === \"symbol\")\n continue;\n ret += ` ${options.stylize(k.toString(), \"undefined\")}: ${localInspect(this[k], newOptions)}\\n`;\n }\n if (this[UnderlyingOsdkObject] !== this) {\n ret += \"\\n\";\n ret += ` ${options.stylize(\"$as\", \"special\")}: ${localInspect(this[UnderlyingOsdkObject], newOptions).replace(/\\n/g, `\\n `)}`;\n ret += \"\\n\";\n }\n ret += \"}\";\n return ret;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,eAAe,EAAEC,YAAY,EAAEC,oBAAoB,QAAS,sBAAsB;AAC3F,OAAO,MAAMC,0BAA0B,GAAGC,MAAM,CAACC,MAAM,CAAC,IAAI,EAAE;EAC1D,CAACC,MAAM,CAACC,GAAG,CAAC,4BAA4B,CAAC,GAAG;IAAEC,KAAK,EAAEC;EAAc;AACvE,CAAC,CAAC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,aAAaA,CAACC,MAAM,EAAEC,OAAO,EAAEC,YAAY,EAAE;EAClD,MAAMC,UAAU,GAAG;IACf,GAAGF,OAAO;IACVG,KAAK,EAAEH,OAAO,CAACG,KAAK,IAAI,IAAI,GAAG,IAAI,GAAGH,OAAO,CAACG,KAAK,GAAG;EAC1D,CAAC;EACD,IAAIC,GAAG,GAAG,QAAQJ,OAAO,CAACK,OAAO,CAAC,IAAI,CAACf,YAAY,CAAC,EAAEgB,OAAO,IAAI,IAAI,CAACjB,eAAe,CAAC,EAAEiB,OAAO,IAAI,EAAE,EAAE,SAAS,CAAC,OAAO;EACxH,KAAK,MAAMC,CAAC,IAAI,IAAIC,GAAG,CAAC,CACpB,UAAU,EACV,aAAa,EACb,aAAa,EACb,GAAGC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC,CAC3B,CAAC,EAAE;IACA,IAAI,OAAOH,CAAC,KAAK,QAAQ,EACrB;IACJH,GAAG,IAAI,KAAKJ,OAAO,CAACK,OAAO,CAACE,CAAC,CAACI,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,KAAKV,YAAY,CAAC,IAAI,CAACM,CAAC,CAAC,EAAEL,UAAU,CAAC,IAAI;EACpG;EACA,IAAI,IAAI,CAACX,oBAAoB,CAAC,KAAK,IAAI,EAAE;IACrCa,GAAG,IAAI,IAAI;IACXA,GAAG,IAAI,KAAKJ,OAAO,CAACK,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC,KAAKJ,YAAY,CAAC,IAAI,CAACV,oBAAoB,CAAC,EAAEW,UAAU,CAAC,CAACU,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE;IAC/HR,GAAG,IAAI,IAAI;EACf;EACAA,GAAG,IAAI,GAAG;EACV,OAAOA,GAAG;AACd","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
17
+ //# sourceMappingURL=PropertyDescriptorRecord.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PropertyDescriptorRecord.js","names":[],"sources":["PropertyDescriptorRecord.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 */\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -0,0 +1,82 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { createSimpleCache } from "../SimpleCache.js";
17
+ import { InterfaceDefRef, ObjectDefRef, UnderlyingOsdkObject } from "./InternalSymbols.js";
18
+ const handlerCache = createSimpleCache(new WeakMap(), createInterfaceProxyHandler);
19
+ /** @internal */
20
+ export function createOsdkInterface(underlying, interfaceDef) {
21
+ const handler = handlerCache.get(interfaceDef);
22
+ const proxy = new Proxy({
23
+ [UnderlyingOsdkObject]: underlying,
24
+ [InterfaceDefRef]: interfaceDef
25
+ },
26
+ // the wrapper doesn't contain everything obviously. we proxy
27
+ handler);
28
+ return proxy;
29
+ }
30
+ function createInterfaceProxyHandler(newDef) {
31
+ return {
32
+ getOwnPropertyDescriptor(target, p) {
33
+ const underlying = target[UnderlyingOsdkObject];
34
+ const objDef = underlying[ObjectDefRef];
35
+ switch (p) {
36
+ case "$primaryKey":
37
+ case "$title":
38
+ case "$objectType":
39
+ case "$rid":
40
+ return underlying[p] != null ? Reflect.getOwnPropertyDescriptor(underlying, p) : undefined;
41
+ case "$apiName":
42
+ return {
43
+ enumerable: true,
44
+ configurable: true,
45
+ value: target[InterfaceDefRef].apiName
46
+ };
47
+ }
48
+ if (newDef.properties[p] != null) {
49
+ return {
50
+ enumerable: true,
51
+ configurable: true,
52
+ value: underlying[objDef.interfaceMap[newDef.apiName][p]]
53
+ };
54
+ }
55
+ },
56
+ ownKeys(target) {
57
+ const underlying = target[UnderlyingOsdkObject];
58
+ return ["$apiName", "$objectType", "$primaryKey", ...(underlying["$rid"] ? ["$rid"] : []), "$title", ...Object.keys(newDef.properties)];
59
+ },
60
+ get(target, p) {
61
+ const underlying = target[UnderlyingOsdkObject];
62
+ switch (p) {
63
+ case InterfaceDefRef:
64
+ return newDef;
65
+ case "$apiName":
66
+ return newDef.apiName;
67
+ case "$as":
68
+ case UnderlyingOsdkObject:
69
+ case "$primaryKey":
70
+ case "$title":
71
+ case "$objectType":
72
+ case "$rid":
73
+ return underlying[p];
74
+ }
75
+ if (newDef.properties[p] != null) {
76
+ const objDef = target[UnderlyingOsdkObject][ObjectDefRef];
77
+ return underlying[objDef.interfaceMap[newDef.apiName][p]];
78
+ }
79
+ }
80
+ };
81
+ }
82
+ //# sourceMappingURL=createOsdkInterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createOsdkInterface.js","names":["createSimpleCache","InterfaceDefRef","ObjectDefRef","UnderlyingOsdkObject","handlerCache","WeakMap","createInterfaceProxyHandler","createOsdkInterface","underlying","interfaceDef","handler","get","proxy","Proxy","newDef","getOwnPropertyDescriptor","target","p","objDef","Reflect","undefined","enumerable","configurable","value","apiName","properties","interfaceMap","ownKeys","Object","keys"],"sources":["createOsdkInterface.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 { createSimpleCache } from \"../SimpleCache.js\";\nimport { InterfaceDefRef, ObjectDefRef, UnderlyingOsdkObject, } from \"./InternalSymbols.js\";\nconst handlerCache = createSimpleCache(new WeakMap(), createInterfaceProxyHandler);\n/** @internal */\nexport function createOsdkInterface(underlying, interfaceDef) {\n const interfaceHolder = {\n [UnderlyingOsdkObject]: underlying,\n [InterfaceDefRef]: interfaceDef,\n };\n const handler = handlerCache.get(interfaceDef);\n const proxy = new Proxy(interfaceHolder, // the wrapper doesn't contain everything obviously. we proxy\n handler);\n return proxy;\n}\nfunction createInterfaceProxyHandler(newDef) {\n return {\n getOwnPropertyDescriptor(target, p) {\n const underlying = target[UnderlyingOsdkObject];\n const objDef = underlying[ObjectDefRef];\n switch (p) {\n case \"$primaryKey\":\n case \"$title\":\n case \"$objectType\":\n case \"$rid\":\n return underlying[p] != null\n ? Reflect.getOwnPropertyDescriptor(underlying, p)\n : undefined;\n case \"$apiName\":\n return {\n enumerable: true,\n configurable: true,\n value: target[InterfaceDefRef].apiName,\n };\n }\n if (newDef.properties[p] != null) {\n return {\n enumerable: true,\n configurable: true,\n value: underlying[objDef.interfaceMap[newDef.apiName][p]],\n };\n }\n },\n ownKeys(target) {\n const underlying = target[UnderlyingOsdkObject];\n return [\n \"$apiName\",\n \"$objectType\",\n \"$primaryKey\",\n ...(underlying[\"$rid\"] ? [\"$rid\"] : []),\n \"$title\",\n ...Object.keys(newDef.properties),\n ];\n },\n get(target, p) {\n const underlying = target[UnderlyingOsdkObject];\n switch (p) {\n case InterfaceDefRef:\n return newDef;\n case \"$apiName\":\n return newDef.apiName;\n case \"$as\":\n case UnderlyingOsdkObject:\n case \"$primaryKey\":\n case \"$title\":\n case \"$objectType\":\n case \"$rid\":\n return underlying[p];\n }\n if (newDef.properties[p] != null) {\n const objDef = target[UnderlyingOsdkObject][ObjectDefRef];\n return underlying[objDef.interfaceMap[newDef.apiName][p]];\n }\n },\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,iBAAiB,QAAQ,m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P,CAAC,CAAC;QAC5D,CAAC;MACL;IACJ,CAAC;IACDU,OAAOA,CAACX,MAAM,EAAE;MACZ,MAAMR,UAAU,GAAGQ,MAAM,CAACb,oBAAoB,CAAC;MAC/C,OAAO,CACH,UAAU,EACV,aAAa,EACb,aAAa,EACb,IAAIK,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,EACvC,QAAQ,EACR,GAAGoB,MAAM,CAACC,IAAI,CAACf,MAAM,CAACW,UAAU,CAAC,CACpC;IACL,CAAC;IACDd,GAAGA,CAACK,MAAM,EAAEC,CAAC,EAAE;MACX,MAAMT,UAAU,GAAGQ,MAAM,CAACb,oBAAoB,CAAC;MAC/C,QAAQc,CAAC;QACL,KAAKhB,eAAe;UAChB,OAAOa,MAAM;QACjB,KAAK,UAAU;UACX,OAAOA,MAAM,CAACU,OAAO;QACzB,KAAK,KAAK;QACV,KAAKrB,oBAAoB;QACzB,KAAK,aAAa;QAClB,KAAK,QAAQ;QACb,KAAK,aAAa;QAClB,KAAK,MAAM;UACP,OAAOK,UAAU,CAACS,CAAC,CAAC;MAC5B;MACA,IAAIH,MAAM,CAACW,UAAU,CAACR,CAAC,CAAC,IAAI,IAAI,EAAE;QAC9B,MAAMC,MAAM,GAAGF,MAAM,CAACb,oBAAoB,CAAC,CAACD,YAAY,CAAC;QACzD,OAAOM,UAAU,CAACU,MAAM,CAACQ,YAAY,CAACZ,MAAM,CAACU,OAAO,CAAC,CAACP,CAAC,CAAC,CAAC;MAC7D;IACJ;EACJ,CAAC;AACL","ignoreList":[]}
@@ -0,0 +1,114 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { createAttachmentFromRid } from "../../createAttachmentFromRid.js";
17
+ import { TimeSeriesPropertyImpl } from "../../createTimeseriesProperty.js";
18
+ import { createClientCache } from "../Cache.js";
19
+ import { get$as } from "./getDollarAs.js";
20
+ import { get$link } from "./getDollarLink.js";
21
+ import { ClientRef, ObjectDefRef, RawObject, UnderlyingOsdkObject } from "./InternalSymbols.js";
22
+ const objectPrototypeCache = createClientCache(function (client, objectDef) {
23
+ return Object.create(null, {
24
+ [ObjectDefRef]: {
25
+ value: objectDef
26
+ },
27
+ [ClientRef]: {
28
+ value: client
29
+ },
30
+ "$as": {
31
+ value: get$as(objectDef)
32
+ },
33
+ "$link": {
34
+ get: function () {
35
+ return get$link(this);
36
+ }
37
+ },
38
+ "$updateInternalValues": {
39
+ value: function (newValues) {
40
+ this[RawObject] = Object.assign({}, this[RawObject], newValues);
41
+ }
42
+ }
43
+ });
44
+ });
45
+ /** @internal */
46
+ export function createOsdkObject(client, objectDef, rawObj) {
47
+ // We use multiple layers of prototypes to maximize reuse and also to keep
48
+ // [RawObject] out of `ownKeys`. This keeps the code in the proxy below simpler.
49
+ const objectHolderPrototype = Object.create(objectPrototypeCache.get(client, objectDef), {
50
+ [RawObject]: {
51
+ value: rawObj,
52
+ writable: true // so we can allow updates
53
+ }
54
+ });
55
+ // we separate the holder out so we can update
56
+ // the underlying data without having to return a new object
57
+ // we also need the holder so we can customize the console.log output
58
+ const holder = Object.create(objectHolderPrototype);
59
+ const osdkObject = new Proxy(holder, {
60
+ ownKeys(target) {
61
+ return Reflect.ownKeys(target[RawObject]);
62
+ },
63
+ get(target, p, receiver) {
64
+ switch (p) {
65
+ case UnderlyingOsdkObject:
66
+ // effectively point back to the proxy
67
+ return receiver;
68
+ }
69
+ if (p in target) return target[p];
70
+ if (p in rawObj) {
71
+ const rawValue = target[RawObject][p];
72
+ const propDef = objectDef.properties[p];
73
+ if (propDef) {
74
+ if (propDef.type === "attachment") {
75
+ if (Array.isArray(rawValue)) {
76
+ return rawValue.map(a => createAttachmentFromRid(client, a.rid));
77
+ }
78
+ return createAttachmentFromRid(client, rawValue.rid);
79
+ }
80
+ if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries") {
81
+ return new TimeSeriesPropertyImpl(client, objectDef.apiName, target[RawObject][objectDef.primaryKeyApiName], p);
82
+ }
83
+ }
84
+ return rawValue;
85
+ }
86
+ // we do not do any fall through to avoid unexpected behavior
87
+ },
88
+ set(target, p, newValue) {
89
+ // allow the prototype to update this value
90
+ if (p === RawObject) {
91
+ // symbol only exists internally so no one else can hit this
92
+ target[p] = newValue;
93
+ return true;
94
+ }
95
+ return false;
96
+ },
97
+ getOwnPropertyDescriptor(target, p) {
98
+ if (p === RawObject) {
99
+ return Reflect.getOwnPropertyDescriptor(target, p);
100
+ }
101
+ if (target[RawObject][p] != null) {
102
+ return {
103
+ configurable: true,
104
+ enumerable: true
105
+ };
106
+ }
107
+ return {
108
+ enumerable: false
109
+ };
110
+ }
111
+ });
112
+ return osdkObject;
113
+ }
114
+ //# sourceMappingURL=createOsdkObject.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createOsdkObject.js","names":["createAttachmentFromRid","TimeSeriesPropertyImpl","createClientCache","get$as","get$link","ClientRef","ObjectDefRef","RawObject","UnderlyingOsdkObject","objectPrototypeCache","client","objectDef","Object","create","value","get","newValues","assign","createOsdkObject","rawObj","objectHolderPrototype","writable","holder","osdkObject","Proxy","ownKeys","target","Reflect","p","receiver","rawValue","propDef","properties","type","Array","isArray","map","a","rid","apiName","primaryKeyApiName","set","newValue","getOwnPropertyDescriptor","configurable","enumerable"],"sources":["createOsdkObject.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 { createAttachmentFromRid } from \"../../createAttachmentFromRid.js\";\nimport { TimeSeriesPropertyImpl } from \"../../createTimeseriesProperty.js\";\nimport { createClientCache } from \"../Cache.js\";\nimport { get$as } from \"./getDollarAs.js\";\nimport { get$link } from \"./getDollarLink.js\";\nimport { ClientRef, ObjectDefRef, RawObject, UnderlyingOsdkObject, } from \"./InternalSymbols.js\";\nconst objectPrototypeCache = createClientCache(function (client, objectDef) {\n return Object.create(null, {\n [ObjectDefRef]: { value: objectDef },\n [ClientRef]: { value: client },\n \"$as\": { value: get$as(objectDef) },\n \"$link\": {\n get: function () {\n return get$link(this);\n },\n },\n \"$updateInternalValues\": {\n value: function (newValues) {\n this[RawObject] = Object.assign({}, this[RawObject], newValues);\n },\n },\n });\n});\n/** @internal */\nexport function createOsdkObject(client, objectDef, rawObj) {\n // We use multiple layers of prototypes to maximize reuse and also to keep\n // [RawObject] out of `ownKeys`. This keeps the code in the proxy below simpler.\n const objectHolderPrototype = Object.create(objectPrototypeCache.get(client, objectDef), {\n [RawObject]: {\n value: rawObj,\n writable: true, // so we can allow updates\n },\n });\n // we separate the holder out so we can update\n // the underlying data without having to return a new object\n // we also need the holder so we can customize the console.log output\n const holder = Object.create(objectHolderPrototype);\n const osdkObject = new Proxy(holder, {\n ownKeys(target) {\n return Reflect.ownKeys(target[RawObject]);\n },\n get(target, p, receiver) {\n switch (p) {\n case UnderlyingOsdkObject:\n // effectively point back to the proxy\n return receiver;\n }\n if (p in target)\n return target[p];\n if (p in rawObj) {\n const rawValue = target[RawObject][p];\n const propDef = objectDef.properties[p];\n if (propDef) {\n if (propDef.type === \"attachment\") {\n if (Array.isArray(rawValue)) {\n return rawValue.map(a => createAttachmentFromRid(client, a.rid));\n }\n return createAttachmentFromRid(client, rawValue.rid);\n }\n if (propDef.type === \"numericTimeseries\"\n || propDef.type === \"stringTimeseries\") {\n return new TimeSeriesPropertyImpl(client, objectDef.apiName, target[RawObject][objectDef.primaryKeyApiName], p);\n }\n }\n return rawValue;\n }\n // we do not do any fall through to avoid unexpected behavior\n },\n set(target, p, newValue) {\n // allow the prototype to update this value\n if (p === RawObject) {\n // symbol only exists internally so no one else can hit this\n target[p] = newValue;\n return true;\n }\n return false;\n },\n getOwnPropertyDescriptor(target, p) {\n if (p === RawObject) {\n return Reflect.getOwnPropertyDescriptor(target, p);\n }\n if (target[RawObject][p] != null) {\n return { configurable: true, enumerable: true };\n }\n return { enumerable: false };\n },\n });\n return osdkObject;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,uBAAuB,QAAQ,kCAAkC;AAC1E,SAASC,sBAAsB,QAAQ,mCAAmC;AAC1E,SAASC,iBAAiB,QAAQ,aAAa;AAC/C,SAASC,MAAM,QAAQ,kBAAkB;AACzC,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,SAAS,EAAEC,YAAY,EAAEC,SAAS,EAAEC,oBAAoB,QAAS,sBAAsB;AAChG,MAAMC,oBAAoB,GAAGP,iBAAiB,CAAC,UAAUQ,MAAM,EAAEC,SAAS,EAAE;EACxE,OAAOC,MAAM,CAACC,MAAM,CAAC,IAAI,EAAE;IACvB,CAACP,YAAY,GAAG;MAAEQ,KAAK,EAAEH;IAAU,CAAC;IACpC,CAACN,SAAS,GAAG;MAAES,KAAK,EAAEJ;IAAO,CAAC;IAC9B,KAAK,EAAE;MAAEI,KAAK,EAAEX,MAAM,CAACQ,SAAS;IAAE,CAAC;IACnC,OAAO,EAAE;MACLI,GAAG,EAAE,SAAAA,CAAA,EAAY;QACb,OAAOX,QAAQ,CAAC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1
  import { type FetchedObjectTypeDefinition } from "../../ontology/OntologyProvider.js";
2
- export declare const get$as: (key: FetchedObjectTypeDefinition<any, any>) => DollarAsFn;
2
+ export declare const get$as: (key: FetchedObjectTypeDefinition) => DollarAsFn;
3
3
  //# sourceMappingURL=getDollarAs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDollarAs.d.ts","sourceRoot":"","sources":["../../../../src/object/convertWireToOsdkObjects/getDollarAs.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,KAAK,2BAA2B,EAEjC,MAAM,oCAAoC,CAAC;AAgB5C,eAAO,MAAM,MAAM,4DAGa,CAAC"}
1
+ {"version":3,"file":"getDollarAs.d.ts","sourceRoot":"","sources":["../../../../src/object/convertWireToOsdkObjects/getDollarAs.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,KAAK,2BAA2B,EAEjC,MAAM,oCAAoC,CAAC;AAgB5C,eAAO,MAAM,MAAM,kDAGa,CAAC"}
@@ -0,0 +1,55 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { InterfaceDefinitions } from "../../ontology/OntologyProvider.js";
17
+ import { createSimpleCache } from "../SimpleCache.js";
18
+ import { createOsdkInterface } from "./createOsdkInterface.js";
19
+ import { UnderlyingOsdkObject } from "./InternalSymbols.js";
20
+ export const get$as = createSimpleCache(new WeakMap(), $asFactory).get;
21
+ const osdkObjectToInterfaceView = createSimpleCache(new WeakMap(), () => new Map());
22
+ function $asFactory(objDef) {
23
+ // We use the exact same logic for both the interface rep and the underlying rep
24
+ return function (targetMinDef) {
25
+ let targetInterfaceApiName;
26
+ if (typeof targetMinDef === "string") {
27
+ if (targetMinDef === objDef.apiName) {
28
+ return this[UnderlyingOsdkObject];
29
+ }
30
+ // this is sufficient to determine if we implement the interface
31
+ if (objDef.interfaceMap?.[targetMinDef] == null) {
32
+ throw new Error(`Object does not implement interface '${targetMinDef}'.`);
33
+ }
34
+ targetInterfaceApiName = targetMinDef;
35
+ } else if (targetMinDef.apiName === objDef.apiName) {
36
+ return this[UnderlyingOsdkObject];
37
+ } else {
38
+ if (targetMinDef.type === "object") {
39
+ throw new Error(`'${targetMinDef.apiName}' is not an interface nor is it '${objDef.apiName}', which is the object type.`);
40
+ }
41
+ targetInterfaceApiName = targetMinDef.apiName;
42
+ }
43
+ const def = objDef[InterfaceDefinitions][targetInterfaceApiName];
44
+ if (!def) {
45
+ throw new Error(`Object does not implement interface '${targetMinDef}'.`);
46
+ }
47
+ const underlying = this[UnderlyingOsdkObject];
48
+ const existing = osdkObjectToInterfaceView.get(underlying).get(targetInterfaceApiName);
49
+ if (existing) return existing;
50
+ const osdkInterface = createOsdkInterface(underlying, def.def);
51
+ osdkObjectToInterfaceView.get(underlying).set(targetInterfaceApiName, osdkInterface);
52
+ return osdkInterface;
53
+ };
54
+ }
55
+ //# sourceMappingURL=getDollarAs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDollarAs.js","names":["InterfaceDefinitions","createSimpleCache","createOsdkInterface","UnderlyingOsdkObject","get$as","WeakMap","$asFactory","get","osdkObjectToInterfaceView","Map","objDef","targetMinDef","targetInterfaceApiName","apiName","interfaceMap","Error","type","def","underlying","existing","osdkInterface","set"],"sources":["getDollarAs.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\";\nimport { createSimpleCache } from \"../SimpleCache.js\";\nimport { createOsdkInterface } from \"./createOsdkInterface.js\";\nimport { UnderlyingOsdkObject } from \"./InternalSymbols.js\";\nexport const get$as = createSimpleCache(new WeakMap(), $asFactory).get;\nconst osdkObjectToInterfaceView = createSimpleCache(new WeakMap(), () => new Map());\nfunction $asFactory(objDef) {\n // We use the exact same logic for both the interface rep and the underlying rep\n return function $as(targetMinDef) {\n let targetInterfaceApiName;\n if (typeof targetMinDef === \"string\") {\n if (targetMinDef === objDef.apiName) {\n return this[UnderlyingOsdkObject];\n }\n // this is sufficient to determine if we implement the interface\n if (objDef.interfaceMap?.[targetMinDef] == null) {\n throw new Error(`Object does not implement interface '${targetMinDef}'.`);\n }\n targetInterfaceApiName = targetMinDef;\n }\n else if (targetMinDef.apiName === objDef.apiName) {\n return this[UnderlyingOsdkObject];\n }\n else {\n if (targetMinDef.type === \"object\") {\n throw new Error(`'${targetMinDef.apiName}' is not an interface nor is it '${objDef.apiName}', which is the object type.`);\n }\n targetInterfaceApiName = targetMinDef.apiName;\n }\n const def = objDef[InterfaceDefinitions][targetInterfaceApiName];\n if (!def) {\n throw new Error(`Object does not implement interface '${targetMinDef}'.`);\n }\n const underlying = this[UnderlyingOsdkObject];\n const existing = osdkObjectToInterfaceView\n .get(underlying)\n .get(targetInterfaceApiName);\n if (existing)\n return existing;\n const osdkInterface = createOsdkInterface(underlying, def.def);\n osdkObjectToInterfaceView.get(underlying).set(targetInterfaceApiName, osdkInterface);\n return osdkInterface;\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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J,YAAY,IAAI,CAAC;IAC7E;IACA,MAAMO,UAAU,GAAG,IAAI,CAACf,oBAAoB,CAAC;IAC7C,MAAMgB,QAAQ,GAAGX,yBAAyB,CACrCD,GAAG,CAACW,UAAU,CAAC,CACfX,GAAG,CAACK,sBAAsB,CAAC;IAChC,IAAIO,QAAQ,EACR,OAAOA,QAAQ;IACnB,MAAMC,aAAa,GAAGlB,mBAAmB,CAACgB,UAAU,EAAED,GAAG,CAACA,GAAG,CAAC;IAC9DT,yBAAyB,CAACD,GAAG,CAACW,UAAU,CAAC,CAACG,GAAG,CAACT,sBAAsB,EAAEQ,aAAa,CAAC;IACpF,OAAOA,aAAa;EACxB,CAAC;AACL","ignoreList":[]}
@@ -0,0 +1,60 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { getWireObjectSet } from "../../objectSet/createObjectSet.js";
17
+ import { fetchSingle, fetchSingleWithErrors } from "../fetchSingle.js";
18
+ import { ClientRef, ObjectDefRef, RawObject } from "./InternalSymbols.js";
19
+ /** @internal */
20
+ export function get$link(holder) {
21
+ return new Proxy(holder, DollarLinkProxyHandler);
22
+ }
23
+ const DollarLinkProxyHandler = {
24
+ get(target, p) {
25
+ const {
26
+ [ObjectDefRef]: objDef,
27
+ [ClientRef]: client,
28
+ [RawObject]: rawObj
29
+ } = target;
30
+ const linkDef = objDef.links[p];
31
+ if (linkDef == null) {
32
+ return;
33
+ }
34
+ const objectSet = client.objectSetFactory(objDef, client).where({
35
+ [objDef.primaryKeyApiName]: rawObj.$primaryKey
36
+ }).pivotTo(p);
37
+ if (!linkDef.multiplicity) {
38
+ return {
39
+ fetchOne: options => fetchSingle(client, objDef, options ?? {}, getWireObjectSet(objectSet)),
40
+ fetchOneWithErrors: options => fetchSingleWithErrors(client, objDef, options ?? {}, getWireObjectSet(objectSet))
41
+ };
42
+ } else {
43
+ return objectSet;
44
+ }
45
+ },
46
+ ownKeys(target) {
47
+ return [...Object.keys(target[ObjectDefRef].links)];
48
+ },
49
+ getOwnPropertyDescriptor(target, p) {
50
+ if (target[ObjectDefRef].links[p]) {
51
+ return {
52
+ enumerable: true,
53
+ configurable: true,
54
+ // fixme
55
+ writable: false
56
+ };
57
+ }
58
+ }
59
+ };
60
+ //# sourceMappingURL=getDollarLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDollarLink.js","names":["getWireObjectSet","fetchSingle","fetchSingleWithErrors","ClientRef","ObjectDefRef","RawObject","get$link","holder","Proxy","DollarLinkProxyHandler","get","target","p","objDef","client","rawObj","linkDef","links","objectSet","objectSetFactory","where","primaryKeyApiName","$primaryKey","pivotTo","multiplicity","fetchOne","options","fetchOneWithErrors","ownKeys","Object","keys","getOwnPropertyDescriptor","enumerable","configurable","writable"],"sources":["getDollarLink.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 { getWireObjectSet } from \"../../objectSet/createObjectSet.js\";\nimport { fetchSingle, fetchSingleWithErrors } from \"../fetchSingle.js\";\nimport { ClientRef, ObjectDefRef, RawObject } from \"./InternalSymbols.js\";\n/** @internal */\nexport function get$link(holder) {\n return new Proxy(holder, DollarLinkProxyHandler);\n}\nconst DollarLinkProxyHandler = {\n get(target, p) {\n const { [ObjectDefRef]: objDef, [ClientRef]: client, [RawObject]: rawObj, } = target;\n const linkDef = objDef.links[p];\n if (linkDef == null) {\n return;\n }\n const objectSet = client.objectSetFactory(objDef, client)\n .where({\n [objDef.primaryKeyApiName]: rawObj.$primaryKey,\n })\n .pivotTo(p);\n if (!linkDef.multiplicity) {\n return {\n fetchOne: (options) => fetchSingle(client, objDef, options ?? {}, getWireObjectSet(objectSet)),\n fetchOneWithErrors: (options) => fetchSingleWithErrors(client, objDef, options ?? {}, getWireObjectSet(objectSet)),\n };\n }\n else {\n return objectSet;\n }\n },\n ownKeys(target) {\n return [...Object.keys(target[ObjectDefRef].links)];\n },\n getOwnPropertyDescriptor(target, p) {\n if (target[ObjectDefRef].links[p]) {\n return {\n enumerable: true,\n configurable: true, // fixme\n writable: false,\n };\n }\n },\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,gBAAgB,QAAQ,oCAAoC;AACrE,SAASC,WAAW,EAAEC,qBAAqB,QAAQ,mBAAmB;AACtE,SAASC,SAAS,EAAEC,YAAY,EAAEC,SAAS,QAAQ,sBAAsB;AACzE;AACA,OAAO,SAASC,QAAQA,CAACC,MAAM,EAAE;EAC7B,OAAO,IAAIC,KAAK,CAACD,MAAM,EAAEE,sBAAsB,CAAC;AACpD;AACA,MAAMA,sBAAsB,GAAG;EAC3BC,GAAGA,CAACC,MAAM,EAAEC,CAAC,EAAE;IACX,MAAM;MAAE,CAACR,YAAY,GAAGS,MAAM;MAAE,CAACV,SAAS,GAAGW,MAAM;MAAE,CAACT,SAAS,GAAGU;IAAQ,CAAC,GAAGJ,MAAM;IACpF,MAAMK,OAAO,GAAGH,MAAM,CAACI,KAAK,CAACL,CAAC,CAAC;IAC/B,IAAII,OAAO,IAAI,IAAI,EAAE;MACjB;IACJ;IACA,MAAME,SAAS,GAAGJ,MAAM,CAACK,gBAAgB,CAACN,MAAM,EAAEC,MAAM,CAAC,CACpDM,KAAK,CAAC;MACP,CAACP,MAAM,CAACQ,iBAAiB,GAAGN,MAAM,CAACO;IACvC,CAAC,CAAC,CACGC,OAAO,CAACX,CAAC,CAAC;IACf,IAAI,CAACI,OAAO,CAACQ,YAAY,EAAE;MACvB,OAAO;QACHC,QAAQ,EAAGC,OAAO,IAAKzB,WAAW,CAACa,MAAM,EAAED,MAAM,EAAEa,OAAO,IAAI,CAAC,CAAC,EAAE1B,gBAAgB,CAACkB,SAAS,CAAC,CAAC;QAC9FS,kBAAkB,EAAGD,OAAO,IAAKxB,qBAAqB,CAACY,MAAM,EAAED,MAAM,EAAEa,OAAO,IAAI,CAAC,CAAC,EAAE1B,gBAAgB,CAACkB,SAAS,CAAC;MACrH,CAAC;IACL,CAAC,MACI;MACD,OAAOA,SAAS;IACpB;EACJ,CAAC;EACDU,OAAOA,CAACjB,MAAM,EAAE;IACZ,OAAO,CAAC,GAAGkB,MAAM,CAACC,IAAI,CAACnB,MAAM,CAACP,YAAY,CAAC,CAACa,KAAK,CAAC,CAAC;EACvD,CAAC;EACDc,wBAAwBA,CAACpB,MAAM,EAAEC,CAAC,EAAE;IAChC,IAAID,MAAM,CAACP,YAAY,CAAC,CAACa,KAAK,CAACL,CAAC,CAAC,EAAE;MAC/B,OAAO;QACHoB,UAAU,EAAE,IAAI;QAChBC,YAAY,EAAE,IAAI;QAAE;QACpBC,QAAQ,EAAE;MACd,CAAC;IACL;EACJ;AACJ,CAAC","ignoreList":[]}
@@ -0,0 +1,150 @@
1
+ /*
2
+ * Copyright 2023 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import invariant from "tiny-invariant";
17
+ import { createOsdkObject } from "./convertWireToOsdkObjects/createOsdkObject.js";
18
+ /**
19
+ * If interfaceApiName is not undefined, converts the instances of the
20
+ * interface into their respective
21
+ * underlying concrete types and then returns the $as() representation
22
+ * for the consumers.
23
+ *
24
+ * Otherwise just does the conversion
25
+ *
26
+ * May mutate in place for performance reasons. If you need a clean copy,
27
+ * keep it first.
28
+ *
29
+ * However, you must use the returned value, which will be whatever is correct.
30
+ *
31
+ * @internal
32
+ * @param interfaceApiName - if undefined
33
+ */
34
+ export async function convertWireToOsdkObjects(client, objects, interfaceApiName, forceRemoveRid = false, selectedProps, strictNonNull = false) {
35
+ client.logger?.debug(`START convertWireToOsdkObjects()`);
36
+ fixObjectPropertiesInPlace(objects, forceRemoveRid);
37
+ const ifaceDef = interfaceApiName ? await client.ontologyProvider.getInterfaceDefinition(interfaceApiName) : undefined;
38
+ const ifaceSelected = ifaceDef ? selectedProps ?? Object.keys(ifaceDef.properties) : undefined;
39
+ const ret = [];
40
+ for (const rawObj of objects) {
41
+ const objectDef = await client.ontologyProvider.getObjectDefinition(rawObj.$apiName);
42
+ !objectDef ? invariant(false, `Missing definition for '${rawObj.$apiName}'`) : void 0;
43
+ // default value for when we are checking an object
44
+ let objProps;
45
+ let conforming = true;
46
+ if (ifaceDef && ifaceSelected) {
47
+ // API returns interface spt names but we cache by real values
48
+ invariantInterfacesAsViews(objectDef, ifaceDef.apiName, client);
49
+ conforming &&= isConforming(client, ifaceDef, rawObj, ifaceSelected);
50
+ reframeAsObjectInPlace(objectDef, ifaceDef.apiName, rawObj);
51
+ objProps = convertInterfacePropNamesToObjectPropNames(objectDef, ifaceDef.apiName, ifaceSelected);
52
+ } else {
53
+ objProps = selectedProps ?? Object.keys(objectDef.properties);
54
+ }
55
+ conforming &&= isConforming(client, objectDef, rawObj, objProps);
56
+ if (strictNonNull === "throw" && !conforming) {
57
+ throw new Error("Unable to safely convert objects as some non nullable properties are null");
58
+ } else if (strictNonNull === "drop" && !conforming) {
59
+ continue;
60
+ }
61
+ let osdkObject = createOsdkObject(client, objectDef, rawObj);
62
+ if (interfaceApiName) osdkObject = osdkObject.$as(interfaceApiName);
63
+ ret.push(osdkObject);
64
+ }
65
+ client.logger?.debug(`END convertWireToOsdkObjects()`);
66
+ return ret;
67
+ }
68
+ /**
69
+ * Utility function that lets us take down selected property names from an interface
70
+ * and convert them to an array of property names on an object.
71
+ */
72
+ function convertInterfacePropNamesToObjectPropNames(objectDef, interfaceApiName, ifacePropsToMap) {
73
+ return ifacePropsToMap.map(ifaceProp => objectDef.interfaceMap[interfaceApiName][ifaceProp]);
74
+ }
75
+ /**
76
+ * Takes a raw object from the wire (contextually as an interface) and
77
+ * updates the fields to reflect the underlying objectDef instead
78
+ * @param objectDef
79
+ * @param interfaceApiName
80
+ * @param client
81
+ * @param rawObj
82
+ */
83
+ function reframeAsObjectInPlace(objectDef, interfaceApiName, rawObj) {
84
+ const newProps = {};
85
+ for (const [sptProp, regularProp] of Object.entries(objectDef.interfaceMap[interfaceApiName])) {
86
+ if (sptProp in rawObj) {
87
+ const value = rawObj[sptProp];
88
+ delete rawObj[sptProp];
89
+ if (value !== undefined) {
90
+ newProps[regularProp] = value;
91
+ }
92
+ }
93
+ }
94
+ Object.assign(rawObj, newProps);
95
+ if (!(objectDef.primaryKeyApiName in rawObj)) {
96
+ rawObj[objectDef.primaryKeyApiName] = rawObj.$primaryKey;
97
+ }
98
+ }
99
+ function isConforming(client, def, obj, propsToCheck) {
100
+ for (const propName of propsToCheck) {
101
+ if (def.properties[propName].nullable === false && obj[propName] == null) {
102
+ if (process?.env?.NODE_ENV !== "production") {
103
+ client.logger?.debug({
104
+ obj: {
105
+ $objectType: obj["$objectType"],
106
+ $primaryKey: obj["$primaryKey"]
107
+ }
108
+ }, `Found object that does not conform to its definition. Expected ${def.apiName}'s ${propName} to not be null.`);
109
+ }
110
+ return false;
111
+ }
112
+ }
113
+ return true;
114
+ }
115
+ function invariantInterfacesAsViews(objectDef, interfaceApiName, client) {
116
+ if (objectDef.interfaceMap?.[interfaceApiName] == null) {
117
+ const warning = "Interfaces are only supported 'as views' but your metadata object is missing the correct information. This suggests your interfaces have not been migrated to the newer version yet and you cannot use this version of the SDK.";
118
+ if (client.logger) {
119
+ client.logger.warn(warning);
120
+ } else {
121
+ // eslint-disable-next-line no-console
122
+ console.error(`WARNING! ${warning}`);
123
+ }
124
+ throw new Error(warning);
125
+ }
126
+ }
127
+ function fixObjectPropertiesInPlace(objs, forceRemoveRid) {
128
+ for (const obj of objs) {
129
+ if (forceRemoveRid) {
130
+ delete obj.__rid;
131
+ }
132
+ if (obj.__rid) {
133
+ obj.$rid = obj.__rid;
134
+ delete obj.__rid;
135
+ }
136
+ // Backend returns as __apiName but we want to stick to $ structure
137
+ obj.$apiName = obj.__apiName;
138
+ // for now these are the same but when we start doing interface projections the $objectType will always be underlying and
139
+ // the $apiName will be for the current view (in current designs)
140
+ obj.$objectType = obj.__apiName;
141
+ // copying over for now as its always returned. In the future, this should just be inferred from underlying
142
+ obj.$primaryKey = obj.__primaryKey;
143
+ obj.$title = obj.__title;
144
+ // we don't want people to use these
145
+ delete obj.__apiName;
146
+ delete obj.__primaryKey;
147
+ delete obj.__title;
148
+ }
149
+ }
150
+ //# sourceMappingURL=convertWireToOsdkObjects.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertWireToOsdkObjects.js","names":["invariant","createOsdkObject","convertWireToOsdkObjects","client","objects","interfaceApiName","forceRemoveRid","selectedProps","strictNonNull","logger","debug","fixObjectPropertiesInPlace","ifaceDef","ontologyProvider","getInterfaceDefinition","undefined","ifaceSelected","Object","keys","properties","ret","rawObj","objectDef","getObjectDefinition","$apiName","objProps","conforming","invariantInterfacesAsViews","apiName","isConforming","reframeAsObjectInPlace","convertInterfacePropNamesToObjectPropNames","Error","osdkObject","$as","push","ifacePropsToMap","map","ifaceProp","interfaceMap","newProps","sptProp","regularProp","entries","value","assign","primaryKeyApiName","$primaryKey","def","obj","propsToCheck","propName","nullable","process","env","NODE_ENV","$objectType","warning","warn","console","error","objs","__rid","$rid","__apiName","__primaryKey","$title","__title"],"sources":["convertWireToOsdkObjects.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\";\nimport { createOsdkObject } from \"./convertWireToOsdkObjects/createOsdkObject.js\";\n/**\n * If interfaceApiName is not undefined, converts the instances of the\n * interface into their respective\n * underlying concrete types and then returns the $as() representation\n * for the consumers.\n *\n * Otherwise just does the conversion\n *\n * May mutate in place for performance reasons. If you need a clean copy,\n * keep it first.\n *\n * However, you must use the returned value, which will be whatever is correct.\n *\n * @internal\n * @param interfaceApiName - if undefined\n */\nexport async function convertWireToOsdkObjects(client, objects, interfaceApiName, forceRemoveRid = false, selectedProps, strictNonNull = false) {\n client.logger?.debug(`START convertWireToOsdkObjects()`);\n fixObjectPropertiesInPlace(objects, forceRemoveRid);\n const ifaceDef = interfaceApiName\n ? await client.ontologyProvider.getInterfaceDefinition(interfaceApiName)\n : undefined;\n const ifaceSelected = ifaceDef\n ? (selectedProps ?? Object.keys(ifaceDef.properties))\n : undefined;\n const ret = [];\n for (const rawObj of objects) {\n const objectDef = await client.ontologyProvider.getObjectDefinition(rawObj.$apiName);\n invariant(objectDef, `Missing definition for '${rawObj.$apiName}'`);\n // default value for when we are checking an object\n let objProps;\n let conforming = true;\n if (ifaceDef && ifaceSelected) {\n // API returns interface spt names but we cache by real values\n invariantInterfacesAsViews(objectDef, ifaceDef.apiName, client);\n conforming &&= isConforming(client, ifaceDef, rawObj, ifaceSelected);\n reframeAsObjectInPlace(objectDef, ifaceDef.apiName, rawObj);\n objProps = convertInterfacePropNamesToObjectPropNames(objectDef, ifaceDef.apiName, ifaceSelected);\n }\n else {\n objProps = selectedProps ?? Object.keys(objectDef.properties);\n }\n conforming &&= isConforming(client, objectDef, rawObj, objProps);\n if (strictNonNull === \"throw\" && !conforming) {\n throw new Error(\"Unable to safely convert objects as some non nullable properties are null\");\n }\n else if (strictNonNull === \"drop\" && !conforming) {\n continue;\n }\n let osdkObject = createOsdkObject(client, objectDef, rawObj);\n if (interfaceApiName)\n osdkObject = osdkObject.$as(interfaceApiName);\n ret.push(osdkObject);\n }\n client.logger?.debug(`END convertWireToOsdkObjects()`);\n return ret;\n}\n/**\n * Utility function that lets us take down selected property names from an interface\n * and convert them to an array of property names on an object.\n */\nfunction convertInterfacePropNamesToObjectPropNames(objectDef, interfaceApiName, ifacePropsToMap) {\n return ifacePropsToMap.map((ifaceProp) => objectDef.interfaceMap[interfaceApiName][ifaceProp]);\n}\n/**\n * Takes a raw object from the wire (contextually as an interface) and\n * updates the fields to reflect the underlying objectDef instead\n * @param objectDef\n * @param interfaceApiName\n * @param client\n * @param rawObj\n */\nfunction reframeAsObjectInPlace(objectDef, interfaceApiName, rawObj) {\n const newProps = {};\n for (const [sptProp, regularProp] of Object.entries(objectDef.interfaceMap[interfaceApiName])) {\n if (sptProp in rawObj) {\n const value = rawObj[sptProp];\n delete rawObj[sptProp];\n if (value !== undefined) {\n newProps[regularProp] = value;\n }\n }\n }\n Object.assign(rawObj, newProps);\n if (!(objectDef.primaryKeyApiName in rawObj)) {\n rawObj[objectDef.primaryKeyApiName] = rawObj.$primaryKey;\n }\n}\nfunction isConforming(client, def, obj, propsToCheck) {\n for (const propName of propsToCheck) {\n if (def.properties[propName].nullable === false && obj[propName] == null) {\n if (process?.env?.NODE_ENV !== \"production\") {\n client.logger?.debug({\n obj: {\n $objectType: obj[\"$objectType\"],\n $primaryKey: obj[\"$primaryKey\"],\n },\n }, `Found object that does not conform to its definition. Expected ${def.apiName}'s ${propName} to not be null.`);\n }\n return false;\n }\n }\n return true;\n}\nfunction invariantInterfacesAsViews(objectDef, interfaceApiName, client) {\n if (objectDef.interfaceMap?.[interfaceApiName] == null) {\n const warning = \"Interfaces are only supported 'as views' but your metadata object is missing the correct information. This suggests your interfaces have not been migrated to the newer version yet and you cannot use this version of the SDK.\";\n if (client.logger) {\n client.logger.warn(warning);\n }\n else {\n // eslint-disable-next-line no-console\n console.error(`WARNING! ${warning}`);\n }\n throw new Error(warning);\n }\n}\nfunction fixObjectPropertiesInPlace(objs, forceRemoveRid) {\n for (const obj of objs) {\n if (forceRemoveRid) {\n delete obj.__rid;\n }\n if (obj.__rid) {\n obj.$rid = obj.__rid;\n delete obj.__rid;\n }\n // Backend returns as __apiName but we want to stick to $ structure\n obj.$apiName = obj.__apiName;\n // for now these are the same but when we start doing interface projections the $objectType will always be underlying and\n // the $apiName will be for the current view (in current designs)\n obj.$objectType = obj.__apiName;\n // copying over for now as its always returned. In the future, this should just be inferred from underlying\n obj.$primaryKey = obj.__primaryKey;\n obj.$title = obj.__title;\n // we don't want people to use these\n delete obj.__apiName;\n delete obj.__primaryKey;\n delete obj.__title;\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,SAASC,gBAAgB,QAAQ,gDAAgD;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,wBAAwBA,CAACC,MAAM,EAAEC,OAAO,EAAEC,gBAAgB,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