@dremio/js-sdk 0.1.0

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 (359) hide show
  1. package/LICENSE +202 -0
  2. package/dist/cloud/arctic/ArcticCatalog.d.ts +34 -0
  3. package/dist/cloud/arctic/ArcticCatalog.js +46 -0
  4. package/dist/cloud/arctic/ArcticCatalog.js.map +1 -0
  5. package/dist/cloud/arctic/ArcticResource.d.ts +15 -0
  6. package/dist/cloud/arctic/ArcticResource.js +40 -0
  7. package/dist/cloud/arctic/ArcticResource.js.map +1 -0
  8. package/dist/cloud/credentials/fromAccessToken.d.ts +2 -0
  9. package/dist/cloud/credentials/fromAccessToken.js +19 -0
  10. package/dist/cloud/credentials/fromAccessToken.js.map +1 -0
  11. package/dist/cloud/credentials/fromRefreshToken.d.ts +5 -0
  12. package/dist/cloud/credentials/fromRefreshToken.js +47 -0
  13. package/dist/cloud/credentials/fromRefreshToken.js.map +1 -0
  14. package/dist/cloud/credentials/fromUsernamePassword.d.ts +2 -0
  15. package/dist/cloud/credentials/fromUsernamePassword.js +41 -0
  16. package/dist/cloud/credentials/fromUsernamePassword.js.map +1 -0
  17. package/dist/cloud/credentials/index.d.ts +4 -0
  18. package/dist/cloud/credentials/index.js +20 -0
  19. package/dist/cloud/credentials/index.js.map +1 -0
  20. package/dist/cloud/engines/Engine.d.ts +47 -0
  21. package/dist/cloud/engines/Engine.js +58 -0
  22. package/dist/cloud/engines/Engine.js.map +1 -0
  23. package/dist/cloud/engines/EnginesResource.d.ts +15 -0
  24. package/dist/cloud/engines/EnginesResource.js +42 -0
  25. package/dist/cloud/engines/EnginesResource.js.map +1 -0
  26. package/dist/cloud/engines/utils.d.ts +17 -0
  27. package/dist/cloud/engines/utils.js +59 -0
  28. package/dist/cloud/engines/utils.js.map +1 -0
  29. package/dist/cloud/index.d.ts +487 -0
  30. package/dist/cloud/index.js +47 -0
  31. package/dist/cloud/index.js.map +1 -0
  32. package/dist/cloud/interfaces.d.ts +13 -0
  33. package/dist/cloud/interfaces.js +18 -0
  34. package/dist/cloud/interfaces.js.map +1 -0
  35. package/dist/cloud/oauth/OAuthApplication.d.ts +26 -0
  36. package/dist/cloud/oauth/OAuthApplication.js +49 -0
  37. package/dist/cloud/oauth/OAuthApplication.js.map +1 -0
  38. package/dist/cloud/oauth/OAuthApplicationsResource.d.ts +15 -0
  39. package/dist/cloud/oauth/OAuthApplicationsResource.js +66 -0
  40. package/dist/cloud/oauth/OAuthApplicationsResource.js.map +1 -0
  41. package/dist/cloud/oauth/oauth.d.ts +32 -0
  42. package/dist/cloud/oauth/oauth.js +57 -0
  43. package/dist/cloud/oauth/oauth.js.map +1 -0
  44. package/dist/cloud/projects/Project.d.ts +49 -0
  45. package/dist/cloud/projects/Project.js +61 -0
  46. package/dist/cloud/projects/Project.js.map +1 -0
  47. package/dist/cloud/projects/ProjectsResource.d.ts +17 -0
  48. package/dist/cloud/projects/ProjectsResource.js +50 -0
  49. package/dist/cloud/projects/ProjectsResource.js.map +1 -0
  50. package/dist/cloud/projects/projectApiMethods.d.ts +9 -0
  51. package/dist/cloud/projects/projectApiMethods.js +43 -0
  52. package/dist/cloud/projects/projectApiMethods.js.map +1 -0
  53. package/dist/cloud/projects/utils.d.ts +2 -0
  54. package/dist/cloud/projects/utils.js +37 -0
  55. package/dist/cloud/projects/utils.js.map +1 -0
  56. package/dist/cloud/resources.d.ts +472 -0
  57. package/dist/cloud/resources.js +41 -0
  58. package/dist/cloud/resources.js.map +1 -0
  59. package/dist/cloud/users/CloudUser.d.ts +4 -0
  60. package/dist/cloud/users/CloudUser.js +27 -0
  61. package/dist/cloud/users/CloudUser.js.map +1 -0
  62. package/dist/cloud/users/CloudUsersResource.d.ts +13 -0
  63. package/dist/cloud/users/CloudUsersResource.js +37 -0
  64. package/dist/cloud/users/CloudUsersResource.js.map +1 -0
  65. package/dist/common/Config.d.ts +54 -0
  66. package/dist/common/Config.js +17 -0
  67. package/dist/common/Config.js.map +1 -0
  68. package/dist/common/CredentialProvider.d.ts +4 -0
  69. package/dist/common/CredentialProvider.js +17 -0
  70. package/dist/common/CredentialProvider.js.map +1 -0
  71. package/dist/common/HttpError.d.ts +21 -0
  72. package/dist/common/HttpError.js +74 -0
  73. package/dist/common/HttpError.js.map +1 -0
  74. package/dist/common/Params.d.ts +16 -0
  75. package/dist/common/Params.js +17 -0
  76. package/dist/common/Params.js.map +1 -0
  77. package/dist/common/Problem.d.ts +45 -0
  78. package/dist/common/Problem.js +37 -0
  79. package/dist/common/Problem.js.map +1 -0
  80. package/dist/common/Query.d.ts +6 -0
  81. package/dist/common/Query.js +30 -0
  82. package/dist/common/Query.js.map +1 -0
  83. package/dist/common/batch.d.ts +2 -0
  84. package/dist/common/batch.js +42 -0
  85. package/dist/common/batch.js.map +1 -0
  86. package/dist/common/createRequest.d.ts +6 -0
  87. package/dist/common/createRequest.js +71 -0
  88. package/dist/common/createRequest.js.map +1 -0
  89. package/dist/common/fromAbortable.d.ts +4 -0
  90. package/dist/common/fromAbortable.js +35 -0
  91. package/dist/common/fromAbortable.js.map +1 -0
  92. package/dist/common/problems.d.ts +9 -0
  93. package/dist/common/problems.js +25 -0
  94. package/dist/common/problems.js.map +1 -0
  95. package/dist/common/sharedExports.d.ts +5 -0
  96. package/dist/common/sharedExports.js +21 -0
  97. package/dist/common/sharedExports.js.map +1 -0
  98. package/dist/enterprise/Grantee.d.ts +9 -0
  99. package/dist/enterprise/Grantee.js +17 -0
  100. package/dist/enterprise/Grantee.js.map +1 -0
  101. package/dist/enterprise/Ownable.d.ts +7 -0
  102. package/dist/enterprise/Ownable.js +17 -0
  103. package/dist/enterprise/Ownable.js.map +1 -0
  104. package/dist/enterprise/catalog/CatalogLineage.d.ts +37 -0
  105. package/dist/enterprise/catalog/CatalogLineage.js +26 -0
  106. package/dist/enterprise/catalog/CatalogLineage.js.map +1 -0
  107. package/dist/enterprise/catalog/CatalogObjects/EnterpriseDatasetCatalogObject.d.ts +39 -0
  108. package/dist/enterprise/catalog/CatalogObjects/EnterpriseDatasetCatalogObject.js +45 -0
  109. package/dist/enterprise/catalog/CatalogObjects/EnterpriseDatasetCatalogObject.js.map +1 -0
  110. package/dist/enterprise/catalog/CatalogObjects/EnterpriseFileCatalogObject.d.ts +6 -0
  111. package/dist/enterprise/catalog/CatalogObjects/EnterpriseFileCatalogObject.js +22 -0
  112. package/dist/enterprise/catalog/CatalogObjects/EnterpriseFileCatalogObject.js.map +1 -0
  113. package/dist/enterprise/catalog/CatalogObjects/EnterpriseFolderCatalogObject.d.ts +7 -0
  114. package/dist/enterprise/catalog/CatalogObjects/EnterpriseFolderCatalogObject.js +25 -0
  115. package/dist/enterprise/catalog/CatalogObjects/EnterpriseFolderCatalogObject.js.map +1 -0
  116. package/dist/enterprise/catalog/CatalogObjects/EnterpriseFunctionCatalogObject.d.ts +6 -0
  117. package/dist/enterprise/catalog/CatalogObjects/EnterpriseFunctionCatalogObject.js +22 -0
  118. package/dist/enterprise/catalog/CatalogObjects/EnterpriseFunctionCatalogObject.js.map +1 -0
  119. package/dist/enterprise/catalog/CatalogObjects/EnterpriseHomeCatalogObject.d.ts +6 -0
  120. package/dist/enterprise/catalog/CatalogObjects/EnterpriseHomeCatalogObject.js +22 -0
  121. package/dist/enterprise/catalog/CatalogObjects/EnterpriseHomeCatalogObject.js.map +1 -0
  122. package/dist/enterprise/catalog/CatalogObjects/EnterpriseSourceCatalogObject.d.ts +46 -0
  123. package/dist/enterprise/catalog/CatalogObjects/EnterpriseSourceCatalogObject.js +44 -0
  124. package/dist/enterprise/catalog/CatalogObjects/EnterpriseSourceCatalogObject.js.map +1 -0
  125. package/dist/enterprise/catalog/CatalogObjects/EnterpriseSpaceCatalogObject.d.ts +6 -0
  126. package/dist/enterprise/catalog/CatalogObjects/EnterpriseSpaceCatalogObject.js +22 -0
  127. package/dist/enterprise/catalog/CatalogObjects/EnterpriseSpaceCatalogObject.js.map +1 -0
  128. package/dist/enterprise/catalog/CatalogObjects/index.d.ts +10 -0
  129. package/dist/enterprise/catalog/CatalogObjects/index.js +17 -0
  130. package/dist/enterprise/catalog/CatalogObjects/index.js.map +1 -0
  131. package/dist/enterprise/catalog/CatalogReferences/EnterpriseDatasetCatalogReference.d.ts +14 -0
  132. package/dist/enterprise/catalog/CatalogReferences/EnterpriseDatasetCatalogReference.js +28 -0
  133. package/dist/enterprise/catalog/CatalogReferences/EnterpriseDatasetCatalogReference.js.map +1 -0
  134. package/dist/enterprise/catalog/CatalogReferences/EnterpriseFileCatalogReference.d.ts +3 -0
  135. package/dist/enterprise/catalog/CatalogReferences/EnterpriseFileCatalogReference.js +19 -0
  136. package/dist/enterprise/catalog/CatalogReferences/EnterpriseFileCatalogReference.js.map +1 -0
  137. package/dist/enterprise/catalog/CatalogReferences/EnterpriseFolderCatalogReference.d.ts +12 -0
  138. package/dist/enterprise/catalog/CatalogReferences/EnterpriseFolderCatalogReference.js +28 -0
  139. package/dist/enterprise/catalog/CatalogReferences/EnterpriseFolderCatalogReference.js.map +1 -0
  140. package/dist/enterprise/catalog/CatalogReferences/EnterpriseFunctionCatalogReference.d.ts +3 -0
  141. package/dist/enterprise/catalog/CatalogReferences/EnterpriseFunctionCatalogReference.js +19 -0
  142. package/dist/enterprise/catalog/CatalogReferences/EnterpriseFunctionCatalogReference.js.map +1 -0
  143. package/dist/enterprise/catalog/CatalogReferences/EnterpriseHomeCatalogReference.d.ts +3 -0
  144. package/dist/enterprise/catalog/CatalogReferences/EnterpriseHomeCatalogReference.js +19 -0
  145. package/dist/enterprise/catalog/CatalogReferences/EnterpriseHomeCatalogReference.js.map +1 -0
  146. package/dist/enterprise/catalog/CatalogReferences/EnterpriseSourceCatalogReference.d.ts +12 -0
  147. package/dist/enterprise/catalog/CatalogReferences/EnterpriseSourceCatalogReference.js +28 -0
  148. package/dist/enterprise/catalog/CatalogReferences/EnterpriseSourceCatalogReference.js.map +1 -0
  149. package/dist/enterprise/catalog/CatalogReferences/EnterpriseSpaceCatalogReference.d.ts +3 -0
  150. package/dist/enterprise/catalog/CatalogReferences/EnterpriseSpaceCatalogReference.js +19 -0
  151. package/dist/enterprise/catalog/CatalogReferences/EnterpriseSpaceCatalogReference.js.map +1 -0
  152. package/dist/enterprise/catalog/CatalogReferences/index.d.ts +9 -0
  153. package/dist/enterprise/catalog/CatalogReferences/index.js +17 -0
  154. package/dist/enterprise/catalog/CatalogReferences/index.js.map +1 -0
  155. package/dist/enterprise/catalog/CatalogReferences/retrieveCatalogGrants.d.ts +15 -0
  156. package/dist/enterprise/catalog/CatalogReferences/retrieveCatalogGrants.js +30 -0
  157. package/dist/enterprise/catalog/CatalogReferences/retrieveCatalogGrants.js.map +1 -0
  158. package/dist/enterprise/catalog/EnterpriseCatalogResource.d.ts +10 -0
  159. package/dist/enterprise/catalog/EnterpriseCatalogResource.js +38 -0
  160. package/dist/enterprise/catalog/EnterpriseCatalogResource.js.map +1 -0
  161. package/dist/enterprise/catalog/catalogObjectFromEntity.d.ts +3 -0
  162. package/dist/enterprise/catalog/catalogObjectFromEntity.js +73 -0
  163. package/dist/enterprise/catalog/catalogObjectFromEntity.js.map +1 -0
  164. package/dist/enterprise/catalog/catalogReferenceFromProperties.d.ts +6 -0
  165. package/dist/enterprise/catalog/catalogReferenceFromProperties.js +46 -0
  166. package/dist/enterprise/catalog/catalogReferenceFromProperties.js.map +1 -0
  167. package/dist/enterprise/catalog/catalogRetrieve.d.ts +5 -0
  168. package/dist/enterprise/catalog/catalogRetrieve.js +119 -0
  169. package/dist/enterprise/catalog/catalogRetrieve.js.map +1 -0
  170. package/dist/enterprise/credentials/exchangePat.d.ts +12 -0
  171. package/dist/enterprise/credentials/exchangePat.js +55 -0
  172. package/dist/enterprise/credentials/exchangePat.js.map +1 -0
  173. package/dist/enterprise/credentials/fromPat.d.ts +2 -0
  174. package/dist/enterprise/credentials/fromPat.js +36 -0
  175. package/dist/enterprise/credentials/fromPat.js.map +1 -0
  176. package/dist/enterprise/credentials/index.d.ts +2 -0
  177. package/dist/enterprise/credentials/index.js +18 -0
  178. package/dist/enterprise/credentials/index.js.map +1 -0
  179. package/dist/enterprise/engines/Engine.d.ts +78 -0
  180. package/dist/enterprise/engines/Engine.js +75 -0
  181. package/dist/enterprise/engines/Engine.js.map +1 -0
  182. package/dist/enterprise/engines/EnginesResource.d.ts +10 -0
  183. package/dist/enterprise/engines/EnginesResource.js +34 -0
  184. package/dist/enterprise/engines/EnginesResource.js.map +1 -0
  185. package/dist/enterprise/index.d.ts +60 -0
  186. package/dist/enterprise/index.js +43 -0
  187. package/dist/enterprise/index.js.map +1 -0
  188. package/dist/enterprise/interfaces.d.ts +12 -0
  189. package/dist/enterprise/interfaces.js +18 -0
  190. package/dist/enterprise/interfaces.js.map +1 -0
  191. package/dist/enterprise/reflections/ReflectionSummary.d.ts +74 -0
  192. package/dist/enterprise/reflections/ReflectionSummary.js +82 -0
  193. package/dist/enterprise/reflections/ReflectionSummary.js.map +1 -0
  194. package/dist/enterprise/resources.d.ts +44 -0
  195. package/dist/enterprise/resources.js +36 -0
  196. package/dist/enterprise/resources.js.map +1 -0
  197. package/dist/enterprise/roles/Role.d.ts +23 -0
  198. package/dist/enterprise/roles/Role.js +38 -0
  199. package/dist/enterprise/roles/Role.js.map +1 -0
  200. package/dist/enterprise/roles/RolesResource.d.ts +8 -0
  201. package/dist/enterprise/roles/RolesResource.js +32 -0
  202. package/dist/enterprise/roles/RolesResource.js.map +1 -0
  203. package/dist/enterprise/scripts/EnterpriseScript.d.ts +46 -0
  204. package/dist/enterprise/scripts/EnterpriseScript.js +62 -0
  205. package/dist/enterprise/scripts/EnterpriseScript.js.map +1 -0
  206. package/dist/enterprise/scripts/EnterpriseScriptsResource.d.ts +15 -0
  207. package/dist/enterprise/scripts/EnterpriseScriptsResource.js +72 -0
  208. package/dist/enterprise/scripts/EnterpriseScriptsResource.js.map +1 -0
  209. package/dist/enterprise/users/EnterpriseUser.d.ts +23 -0
  210. package/dist/enterprise/users/EnterpriseUser.js +43 -0
  211. package/dist/enterprise/users/EnterpriseUser.js.map +1 -0
  212. package/dist/enterprise/users/EnterpriseUsersResource.d.ts +11 -0
  213. package/dist/enterprise/users/EnterpriseUsersResource.js +32 -0
  214. package/dist/enterprise/users/EnterpriseUsersResource.js.map +1 -0
  215. package/dist/oss/catalog/CatalogObjects/DatasetCatalogObject.d.ts +43 -0
  216. package/dist/oss/catalog/CatalogObjects/DatasetCatalogObject.js +56 -0
  217. package/dist/oss/catalog/CatalogObjects/DatasetCatalogObject.js.map +1 -0
  218. package/dist/oss/catalog/CatalogObjects/FileCatalogObject.d.ts +17 -0
  219. package/dist/oss/catalog/CatalogObjects/FileCatalogObject.js +48 -0
  220. package/dist/oss/catalog/CatalogObjects/FileCatalogObject.js.map +1 -0
  221. package/dist/oss/catalog/CatalogObjects/FolderCatalogObject.d.ts +20 -0
  222. package/dist/oss/catalog/CatalogObjects/FolderCatalogObject.js +48 -0
  223. package/dist/oss/catalog/CatalogObjects/FolderCatalogObject.js.map +1 -0
  224. package/dist/oss/catalog/CatalogObjects/FunctionCatalogObject.d.ts +17 -0
  225. package/dist/oss/catalog/CatalogObjects/FunctionCatalogObject.js +47 -0
  226. package/dist/oss/catalog/CatalogObjects/FunctionCatalogObject.js.map +1 -0
  227. package/dist/oss/catalog/CatalogObjects/HomeCatalogObject.d.ts +18 -0
  228. package/dist/oss/catalog/CatalogObjects/HomeCatalogObject.js +48 -0
  229. package/dist/oss/catalog/CatalogObjects/HomeCatalogObject.js.map +1 -0
  230. package/dist/oss/catalog/CatalogObjects/SourceCatalogObject.d.ts +60 -0
  231. package/dist/oss/catalog/CatalogObjects/SourceCatalogObject.js +95 -0
  232. package/dist/oss/catalog/CatalogObjects/SourceCatalogObject.js.map +1 -0
  233. package/dist/oss/catalog/CatalogObjects/SpaceCatalogObject.d.ts +19 -0
  234. package/dist/oss/catalog/CatalogObjects/SpaceCatalogObject.js +53 -0
  235. package/dist/oss/catalog/CatalogObjects/SpaceCatalogObject.js.map +1 -0
  236. package/dist/oss/catalog/CatalogObjects/VersionedDatasetCatalogObject.d.ts +31 -0
  237. package/dist/oss/catalog/CatalogObjects/VersionedDatasetCatalogObject.js +58 -0
  238. package/dist/oss/catalog/CatalogObjects/VersionedDatasetCatalogObject.js.map +1 -0
  239. package/dist/oss/catalog/CatalogObjects/index.d.ts +10 -0
  240. package/dist/oss/catalog/CatalogObjects/index.js +17 -0
  241. package/dist/oss/catalog/CatalogObjects/index.js.map +1 -0
  242. package/dist/oss/catalog/CatalogObjects/utils/catalogObjectFromEntity.d.ts +11 -0
  243. package/dist/oss/catalog/CatalogObjects/utils/catalogObjectFromEntity.js +73 -0
  244. package/dist/oss/catalog/CatalogObjects/utils/catalogObjectFromEntity.js.map +1 -0
  245. package/dist/oss/catalog/CatalogReferences/BaseCatalogReference.d.ts +16 -0
  246. package/dist/oss/catalog/CatalogReferences/BaseCatalogReference.js +34 -0
  247. package/dist/oss/catalog/CatalogReferences/BaseCatalogReference.js.map +1 -0
  248. package/dist/oss/catalog/CatalogReferences/DatasetCatalogReference.d.ts +17 -0
  249. package/dist/oss/catalog/CatalogReferences/DatasetCatalogReference.js +39 -0
  250. package/dist/oss/catalog/CatalogReferences/DatasetCatalogReference.js.map +1 -0
  251. package/dist/oss/catalog/CatalogReferences/FileCatalogReference.d.ts +9 -0
  252. package/dist/oss/catalog/CatalogReferences/FileCatalogReference.js +28 -0
  253. package/dist/oss/catalog/CatalogReferences/FileCatalogReference.js.map +1 -0
  254. package/dist/oss/catalog/CatalogReferences/FolderCatalogReference.d.ts +22 -0
  255. package/dist/oss/catalog/CatalogReferences/FolderCatalogReference.js +40 -0
  256. package/dist/oss/catalog/CatalogReferences/FolderCatalogReference.js.map +1 -0
  257. package/dist/oss/catalog/CatalogReferences/FunctionCatalogReference.d.ts +9 -0
  258. package/dist/oss/catalog/CatalogReferences/FunctionCatalogReference.js +28 -0
  259. package/dist/oss/catalog/CatalogReferences/FunctionCatalogReference.js.map +1 -0
  260. package/dist/oss/catalog/CatalogReferences/HomeCatalogReference.d.ts +20 -0
  261. package/dist/oss/catalog/CatalogReferences/HomeCatalogReference.js +38 -0
  262. package/dist/oss/catalog/CatalogReferences/HomeCatalogReference.js.map +1 -0
  263. package/dist/oss/catalog/CatalogReferences/SourceCatalogReference.d.ts +24 -0
  264. package/dist/oss/catalog/CatalogReferences/SourceCatalogReference.js +61 -0
  265. package/dist/oss/catalog/CatalogReferences/SourceCatalogReference.js.map +1 -0
  266. package/dist/oss/catalog/CatalogReferences/SpaceCatalogReference.d.ts +20 -0
  267. package/dist/oss/catalog/CatalogReferences/SpaceCatalogReference.js +38 -0
  268. package/dist/oss/catalog/CatalogReferences/SpaceCatalogReference.js.map +1 -0
  269. package/dist/oss/catalog/CatalogReferences/index.d.ts +9 -0
  270. package/dist/oss/catalog/CatalogReferences/index.js +17 -0
  271. package/dist/oss/catalog/CatalogReferences/index.js.map +1 -0
  272. package/dist/oss/catalog/CatalogReferences/utils/catalogChildren.d.ts +14 -0
  273. package/dist/oss/catalog/CatalogReferences/utils/catalogChildren.js +62 -0
  274. package/dist/oss/catalog/CatalogReferences/utils/catalogChildren.js.map +1 -0
  275. package/dist/oss/catalog/CatalogReferences/utils/catalogReferenceEntityToProperties.d.ts +1 -0
  276. package/dist/oss/catalog/CatalogReferences/utils/catalogReferenceEntityToProperties.js +42 -0
  277. package/dist/oss/catalog/CatalogReferences/utils/catalogReferenceEntityToProperties.js.map +1 -0
  278. package/dist/oss/catalog/CatalogReferences/utils/catalogReferenceFromProperties.d.ts +6 -0
  279. package/dist/oss/catalog/CatalogReferences/utils/catalogReferenceFromProperties.js +45 -0
  280. package/dist/oss/catalog/CatalogReferences/utils/catalogReferenceFromProperties.js.map +1 -0
  281. package/dist/oss/catalog/CatalogReferences/utils/getTags.d.ts +5 -0
  282. package/dist/oss/catalog/CatalogReferences/utils/getTags.js +23 -0
  283. package/dist/oss/catalog/CatalogReferences/utils/getTags.js.map +1 -0
  284. package/dist/oss/catalog/CatalogReferences/utils/getWiki.d.ts +5 -0
  285. package/dist/oss/catalog/CatalogReferences/utils/getWiki.js +23 -0
  286. package/dist/oss/catalog/CatalogReferences/utils/getWiki.js.map +1 -0
  287. package/dist/oss/catalog/CatalogResource.d.ts +10 -0
  288. package/dist/oss/catalog/CatalogResource.js +38 -0
  289. package/dist/oss/catalog/CatalogResource.js.map +1 -0
  290. package/dist/oss/catalog/CatalogTags.d.ts +26 -0
  291. package/dist/oss/catalog/CatalogTags.js +60 -0
  292. package/dist/oss/catalog/CatalogTags.js.map +1 -0
  293. package/dist/oss/catalog/CatalogWiki.d.ts +26 -0
  294. package/dist/oss/catalog/CatalogWiki.js +60 -0
  295. package/dist/oss/catalog/CatalogWiki.js.map +1 -0
  296. package/dist/oss/catalog/VersionReference.d.ts +13 -0
  297. package/dist/oss/catalog/VersionReference.js +19 -0
  298. package/dist/oss/catalog/VersionReference.js.map +1 -0
  299. package/dist/oss/catalog/catalogErrors.d.ts +18 -0
  300. package/dist/oss/catalog/catalogErrors.js +36 -0
  301. package/dist/oss/catalog/catalogErrors.js.map +1 -0
  302. package/dist/oss/catalog/catalogRetrieve.d.ts +6 -0
  303. package/dist/oss/catalog/catalogRetrieve.js +119 -0
  304. package/dist/oss/catalog/catalogRetrieve.js.map +1 -0
  305. package/dist/oss/credentials/fromUsernamePassword.d.ts +2 -0
  306. package/dist/oss/credentials/fromUsernamePassword.js +41 -0
  307. package/dist/oss/credentials/fromUsernamePassword.js.map +1 -0
  308. package/dist/oss/credentials/index.d.ts +1 -0
  309. package/dist/oss/credentials/index.js +17 -0
  310. package/dist/oss/credentials/index.js.map +1 -0
  311. package/dist/oss/index.d.ts +55 -0
  312. package/dist/oss/index.js +42 -0
  313. package/dist/oss/index.js.map +1 -0
  314. package/dist/oss/interfaces.d.ts +8 -0
  315. package/dist/oss/interfaces.js +18 -0
  316. package/dist/oss/interfaces.js.map +1 -0
  317. package/dist/oss/jobs/Job.d.ts +71 -0
  318. package/dist/oss/jobs/Job.js +133 -0
  319. package/dist/oss/jobs/Job.js.map +1 -0
  320. package/dist/oss/jobs/JobsResource.d.ts +10 -0
  321. package/dist/oss/jobs/JobsResource.js +74 -0
  322. package/dist/oss/jobs/JobsResource.js.map +1 -0
  323. package/dist/oss/jobs/utils/JobResultsResponse.d.ts +85 -0
  324. package/dist/oss/jobs/utils/JobResultsResponse.js +17 -0
  325. package/dist/oss/jobs/utils/JobResultsResponse.js.map +1 -0
  326. package/dist/oss/jobs/utils/createArrayForFieldType.d.ts +2 -0
  327. package/dist/oss/jobs/utils/createArrayForFieldType.js +55 -0
  328. package/dist/oss/jobs/utils/createArrayForFieldType.js.map +1 -0
  329. package/dist/oss/jobs/utils/createColumnRecordFromSchema.d.ts +2 -0
  330. package/dist/oss/jobs/utils/createColumnRecordFromSchema.js +21 -0
  331. package/dist/oss/jobs/utils/createColumnRecordFromSchema.js.map +1 -0
  332. package/dist/oss/jobs/utils/mapRowData.d.ts +3 -0
  333. package/dist/oss/jobs/utils/mapRowData.js +46 -0
  334. package/dist/oss/jobs/utils/mapRowData.js.map +1 -0
  335. package/dist/oss/jobs/utils/mapRowsToColumns.d.ts +2 -0
  336. package/dist/oss/jobs/utils/mapRowsToColumns.js +27 -0
  337. package/dist/oss/jobs/utils/mapRowsToColumns.js.map +1 -0
  338. package/dist/oss/reflections/Reflection.d.ts +60 -0
  339. package/dist/oss/reflections/Reflection.js +41 -0
  340. package/dist/oss/reflections/Reflection.js.map +1 -0
  341. package/dist/oss/resources.d.ts +38 -0
  342. package/dist/oss/resources.js +30 -0
  343. package/dist/oss/resources.js.map +1 -0
  344. package/dist/oss/scripts/Script.d.ts +64 -0
  345. package/dist/oss/scripts/Script.js +94 -0
  346. package/dist/oss/scripts/Script.js.map +1 -0
  347. package/dist/oss/scripts/ScriptErrors.d.ts +19 -0
  348. package/dist/oss/scripts/ScriptErrors.js +37 -0
  349. package/dist/oss/scripts/ScriptErrors.js.map +1 -0
  350. package/dist/oss/scripts/ScriptsResource.d.ts +15 -0
  351. package/dist/oss/scripts/ScriptsResource.js +72 -0
  352. package/dist/oss/scripts/ScriptsResource.js.map +1 -0
  353. package/dist/oss/users/User.d.ts +30 -0
  354. package/dist/oss/users/User.js +60 -0
  355. package/dist/oss/users/User.js.map +1 -0
  356. package/dist/oss/users/UsersResource.d.ts +11 -0
  357. package/dist/oss/users/UsersResource.js +32 -0
  358. package/dist/oss/users/UsersResource.js.map +1 -0
  359. package/package.json +70 -0
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Copyright (C) 2024-2025 Dremio Corporation
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 { BaseCatalogReference, } from "./BaseCatalogReference.js";
17
+ export class FileCatalogReference extends BaseCatalogReference {
18
+ type = "FILE";
19
+ #retrieveByPath;
20
+ constructor(properties, retrieveByPath) {
21
+ super(properties);
22
+ this.#retrieveByPath = retrieveByPath;
23
+ }
24
+ catalogObject() {
25
+ return this.#retrieveByPath(this.path);
26
+ }
27
+ }
28
+ //# sourceMappingURL=FileCatalogReference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileCatalogReference.js","sourceRoot":"","sources":["../../../../src/oss/catalog/CatalogReferences/FileCatalogReference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,oBAAoB,GAGrB,MAAM,2BAA2B,CAAC;AAGnC,MAAM,OAAO,oBAAqB,SAAQ,oBAAoB;IACnD,IAAI,GAAG,MAAM,CAAC;IACvB,eAAe,CAAiB;IAEhC,YAAY,UAA0C,EAAE,cAA8B;QACpF,KAAK,CAAC,UAAU,CAAC,CAAC;QAClB,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;IACxC,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAgD,CAAC;IACxF,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\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 { Result } from \"ts-results-es\";\nimport {\n BaseCatalogReference,\n type BaseCatalogReferenceProperties,\n type RetrieveByPath,\n} from \"./BaseCatalogReference.ts\";\nimport type { FileCatalogObject } from \"../CatalogObjects/FileCatalogObject.ts\";\n\nexport class FileCatalogReference extends BaseCatalogReference {\n readonly type = \"FILE\";\n #retrieveByPath: RetrieveByPath;\n\n constructor(properties: BaseCatalogReferenceProperties, retrieveByPath: RetrieveByPath) {\n super(properties);\n this.#retrieveByPath = retrieveByPath;\n }\n\n catalogObject() {\n return this.#retrieveByPath(this.path) as Promise<Result<FileCatalogObject, unknown>>;\n }\n}\n"]}
@@ -0,0 +1,22 @@
1
+ import type { Result } from "ts-results-es";
2
+ import type { SonarV3Config } from "../../../common/Config.ts";
3
+ import { BaseCatalogReference, type BaseCatalogReferenceProperties, type RetrieveByPath } from "./BaseCatalogReference.ts";
4
+ import type { FolderCatalogObject } from "../CatalogObjects/FolderCatalogObject.ts";
5
+ export declare class FolderCatalogReference extends BaseCatalogReference {
6
+ #private;
7
+ readonly type = "FOLDER";
8
+ constructor(properties: BaseCatalogReferenceProperties, config: SonarV3Config, retrieveByPath: RetrieveByPath);
9
+ catalogObject(): Promise<Result<FolderCatalogObject, unknown>>;
10
+ children(params?: {
11
+ exclude?: string;
12
+ }): {
13
+ data({ signal }?: import("../../../common/Params.ts").SignalParam): AsyncGenerator<import("./index.ts").CatalogReference, void, unknown>;
14
+ getPage: (params?: {
15
+ nextPageToken?: string;
16
+ } & import("../../../common/Params.ts").SignalParam) => Promise<import("ts-results-es").Err<any> | import("ts-results-es").Ok<{
17
+ data: import("./index.ts").CatalogReference[];
18
+ nextPageToken: string | undefined;
19
+ }>>;
20
+ };
21
+ wiki(): Promise<import("ts-results-es").Err<unknown> | import("ts-results-es").Ok<import("../CatalogWiki.ts").CatalogWiki>>;
22
+ }
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Copyright (C) 2024-2025 Dremio Corporation
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 { BaseCatalogReference, } from "./BaseCatalogReference.js";
17
+ import { catalogChildren } from "./utils/catalogChildren.js";
18
+ import { getWiki } from "./utils/getWiki.js";
19
+ export class FolderCatalogReference extends BaseCatalogReference {
20
+ type = "FOLDER";
21
+ #config;
22
+ #retrieveByPath;
23
+ constructor(properties, config, retrieveByPath) {
24
+ super(properties);
25
+ this.#config = config;
26
+ this.#retrieveByPath = retrieveByPath;
27
+ }
28
+ catalogObject() {
29
+ return this.#retrieveByPath(this.path);
30
+ }
31
+ children(params = {}) {
32
+ return catalogChildren(this, this.#config, this.#retrieveByPath)({
33
+ ...(params.exclude && { exclude: params.exclude }),
34
+ });
35
+ }
36
+ wiki() {
37
+ return getWiki(this.#config, this)();
38
+ }
39
+ }
40
+ //# sourceMappingURL=FolderCatalogReference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FolderCatalogReference.js","sourceRoot":"","sources":["../../../../src/oss/catalog/CatalogReferences/FolderCatalogReference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,oBAAoB,GAGrB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,MAAM,OAAO,sBAAuB,SAAQ,oBAAoB;IACrD,IAAI,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAgB;IACvB,eAAe,CAAiB;IAEhC,YACE,UAA0C,EAC1C,MAAqB,EACrB,cAA8B;QAE9B,KAAK,CAAC,UAAU,CAAC,CAAC;QAClB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;IACxC,CAAC;IACD,aAAa;QACX,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAkD,CAAC;IAC1F,CAAC;IACD,QAAQ,CACN,SAEI,EAAE;QAEN,OAAO,eAAe,CACpB,IAAI,EACJ,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,eAAe,CACrB,CAAC;YACA,GAAG,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;SACnD,CAAC,CAAC;IACL,CAAC;IACD,IAAI;QACF,OAAO,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC;IACvC,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\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 { Result } from \"ts-results-es\";\nimport type { SonarV3Config } from \"../../../common/Config.ts\";\nimport {\n BaseCatalogReference,\n type BaseCatalogReferenceProperties,\n type RetrieveByPath,\n} from \"./BaseCatalogReference.ts\";\nimport type { FolderCatalogObject } from \"../CatalogObjects/FolderCatalogObject.ts\";\nimport { catalogChildren } from \"./utils/catalogChildren.ts\";\nimport { getWiki } from \"./utils/getWiki.ts\";\n\nexport class FolderCatalogReference extends BaseCatalogReference {\n readonly type = \"FOLDER\";\n #config: SonarV3Config;\n #retrieveByPath: RetrieveByPath;\n\n constructor(\n properties: BaseCatalogReferenceProperties,\n config: SonarV3Config,\n retrieveByPath: RetrieveByPath,\n ) {\n super(properties);\n this.#config = config;\n this.#retrieveByPath = retrieveByPath;\n }\n catalogObject() {\n return this.#retrieveByPath(this.path) as Promise<Result<FolderCatalogObject, unknown>>;\n }\n children(\n params: {\n exclude?: string;\n } = {},\n ) {\n return catalogChildren(\n this,\n this.#config,\n this.#retrieveByPath,\n )({\n ...(params.exclude && { exclude: params.exclude }),\n });\n }\n wiki() {\n return getWiki(this.#config, this)();\n }\n}\n"]}
@@ -0,0 +1,9 @@
1
+ import type { Result } from "ts-results-es";
2
+ import { BaseCatalogReference, type BaseCatalogReferenceProperties, type RetrieveByPath } from "./BaseCatalogReference.ts";
3
+ import type { FunctionCatalogObject } from "../CatalogObjects/FunctionCatalogObject.ts";
4
+ export declare class FunctionCatalogReference extends BaseCatalogReference {
5
+ #private;
6
+ readonly type = "FUNCTION";
7
+ constructor(properties: BaseCatalogReferenceProperties, retrieveByPath: RetrieveByPath);
8
+ catalogObject(): Promise<Result<FunctionCatalogObject, unknown>>;
9
+ }
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Copyright (C) 2024-2025 Dremio Corporation
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 { BaseCatalogReference, } from "./BaseCatalogReference.js";
17
+ export class FunctionCatalogReference extends BaseCatalogReference {
18
+ type = "FUNCTION";
19
+ #retrieveByPath;
20
+ constructor(properties, retrieveByPath) {
21
+ super(properties);
22
+ this.#retrieveByPath = retrieveByPath;
23
+ }
24
+ catalogObject() {
25
+ return this.#retrieveByPath(this.path);
26
+ }
27
+ }
28
+ //# sourceMappingURL=FunctionCatalogReference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FunctionCatalogReference.js","sourceRoot":"","sources":["../../../../src/oss/catalog/CatalogReferences/FunctionCatalogReference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,oBAAoB,GAGrB,MAAM,2BAA2B,CAAC;AAGnC,MAAM,OAAO,wBAAyB,SAAQ,oBAAoB;IACvD,IAAI,GAAG,UAAU,CAAC;IAC3B,eAAe,CAAiB;IAEhC,YAAY,UAA0C,EAAE,cAA8B;QACpF,KAAK,CAAC,UAAU,CAAC,CAAC;QAClB,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;IACxC,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAoD,CAAC;IAC5F,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\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 { Result } from \"ts-results-es\";\nimport {\n BaseCatalogReference,\n type BaseCatalogReferenceProperties,\n type RetrieveByPath,\n} from \"./BaseCatalogReference.ts\";\nimport type { FunctionCatalogObject } from \"../CatalogObjects/FunctionCatalogObject.ts\";\n\nexport class FunctionCatalogReference extends BaseCatalogReference {\n readonly type = \"FUNCTION\";\n #retrieveByPath: RetrieveByPath;\n\n constructor(properties: BaseCatalogReferenceProperties, retrieveByPath: RetrieveByPath) {\n super(properties);\n this.#retrieveByPath = retrieveByPath;\n }\n\n catalogObject() {\n return this.#retrieveByPath(this.path) as Promise<Result<FunctionCatalogObject, unknown>>;\n }\n}\n"]}
@@ -0,0 +1,20 @@
1
+ import type { Result } from "ts-results-es";
2
+ import type { SonarV3Config } from "../../../common/Config.ts";
3
+ import { BaseCatalogReference, type BaseCatalogReferenceProperties, type RetrieveByPath } from "./BaseCatalogReference.ts";
4
+ import type { HomeCatalogObject } from "../CatalogObjects/HomeCatalogObject.ts";
5
+ export declare class HomeCatalogReference extends BaseCatalogReference {
6
+ #private;
7
+ readonly type = "HOME";
8
+ constructor(properties: BaseCatalogReferenceProperties, config: SonarV3Config, retrieveByPath: RetrieveByPath);
9
+ catalogObject(): Promise<Result<HomeCatalogObject, unknown>>;
10
+ children(): {
11
+ data({ signal }?: import("../../../common/Params.ts").SignalParam): AsyncGenerator<import("./index.ts").CatalogReference, void, unknown>;
12
+ getPage: (params?: {
13
+ nextPageToken?: string;
14
+ } & import("../../../common/Params.ts").SignalParam) => Promise<import("ts-results-es").Err<any> | import("ts-results-es").Ok<{
15
+ data: import("./index.ts").CatalogReference[];
16
+ nextPageToken: string | undefined;
17
+ }>>;
18
+ };
19
+ wiki(): Promise<import("ts-results-es").Err<unknown> | import("ts-results-es").Ok<import("../CatalogWiki.ts").CatalogWiki>>;
20
+ }
@@ -0,0 +1,38 @@
1
+ /*
2
+ * Copyright (C) 2024-2025 Dremio Corporation
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 { BaseCatalogReference, } from "./BaseCatalogReference.js";
17
+ import { catalogChildren } from "./utils/catalogChildren.js";
18
+ import { getWiki } from "./utils/getWiki.js";
19
+ export class HomeCatalogReference extends BaseCatalogReference {
20
+ type = "HOME";
21
+ #config;
22
+ #retrieveByPath;
23
+ constructor(properties, config, retrieveByPath) {
24
+ super(properties);
25
+ this.#config = config;
26
+ this.#retrieveByPath = retrieveByPath;
27
+ }
28
+ catalogObject() {
29
+ return this.#retrieveByPath(this.path);
30
+ }
31
+ children() {
32
+ return catalogChildren(this, this.#config, this.#retrieveByPath)();
33
+ }
34
+ wiki() {
35
+ return getWiki(this.#config, this)();
36
+ }
37
+ }
38
+ //# sourceMappingURL=HomeCatalogReference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HomeCatalogReference.js","sourceRoot":"","sources":["../../../../src/oss/catalog/CatalogReferences/HomeCatalogReference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,oBAAoB,GAGrB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,MAAM,OAAO,oBAAqB,SAAQ,oBAAoB;IACnD,IAAI,GAAG,MAAM,CAAC;IACvB,OAAO,CAAgB;IACvB,eAAe,CAAiB;IAEhC,YACE,UAA0C,EAC1C,MAAqB,EACrB,cAA8B;QAE9B,KAAK,CAAC,UAAU,CAAC,CAAC;QAClB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;IACxC,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAgD,CAAC;IACxF,CAAC;IAED,QAAQ;QACN,OAAO,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;IACrE,CAAC;IAED,IAAI;QACF,OAAO,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC;IACvC,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\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 { Result } from \"ts-results-es\";\nimport type { SonarV3Config } from \"../../../common/Config.ts\";\nimport {\n BaseCatalogReference,\n type BaseCatalogReferenceProperties,\n type RetrieveByPath,\n} from \"./BaseCatalogReference.ts\";\nimport type { HomeCatalogObject } from \"../CatalogObjects/HomeCatalogObject.ts\";\nimport { catalogChildren } from \"./utils/catalogChildren.ts\";\nimport { getWiki } from \"./utils/getWiki.ts\";\n\nexport class HomeCatalogReference extends BaseCatalogReference {\n readonly type = \"HOME\";\n #config: SonarV3Config;\n #retrieveByPath: RetrieveByPath;\n\n constructor(\n properties: BaseCatalogReferenceProperties,\n config: SonarV3Config,\n retrieveByPath: RetrieveByPath,\n ) {\n super(properties);\n this.#config = config;\n this.#retrieveByPath = retrieveByPath;\n }\n\n catalogObject() {\n return this.#retrieveByPath(this.path) as Promise<Result<HomeCatalogObject, unknown>>;\n }\n\n children() {\n return catalogChildren(this, this.#config, this.#retrieveByPath)();\n }\n\n wiki() {\n return getWiki(this.#config, this)();\n }\n}\n"]}
@@ -0,0 +1,24 @@
1
+ import type { Result } from "ts-results-es";
2
+ import type { SonarV3Config } from "../../../common/Config.ts";
3
+ import { BaseCatalogReference, type BaseCatalogReferenceProperties, type RetrieveByPath } from "./BaseCatalogReference.ts";
4
+ import type { SourceCatalogObject } from "../CatalogObjects/SourceCatalogObject.ts";
5
+ import { type VersionReference } from "../VersionReference.ts";
6
+ export declare class SourceCatalogReference extends BaseCatalogReference {
7
+ #private;
8
+ readonly type = "SOURCE";
9
+ constructor(properties: BaseCatalogReferenceProperties, config: SonarV3Config, retrieveByPath: RetrieveByPath);
10
+ catalogObject(): Promise<Result<SourceCatalogObject, unknown>>;
11
+ children(params?: {
12
+ version?: VersionReference;
13
+ exclude?: string;
14
+ }): {
15
+ data({ signal }?: import("../../../common/Params.ts").SignalParam): AsyncGenerator<import("./index.ts").CatalogReference, void, unknown>;
16
+ getPage: (params?: {
17
+ nextPageToken?: string;
18
+ } & import("../../../common/Params.ts").SignalParam) => Promise<import("ts-results-es").Err<any> | import("ts-results-es").Ok<{
19
+ data: import("./index.ts").CatalogReference[];
20
+ nextPageToken: string | undefined;
21
+ }>>;
22
+ };
23
+ wiki(): Promise<import("ts-results-es").Err<unknown> | import("ts-results-es").Ok<import("../CatalogWiki.ts").CatalogWiki>>;
24
+ }
@@ -0,0 +1,61 @@
1
+ /*
2
+ * Copyright (C) 2024-2025 Dremio Corporation
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 { BaseCatalogReference, } from "./BaseCatalogReference.js";
17
+ import { catalogChildren } from "./utils/catalogChildren.js";
18
+ import { getWiki } from "./utils/getWiki.js";
19
+ import { isBareCommitVersionReference, isBranchHeadVersionReference, isTagVersionReference, } from "../VersionReference.js";
20
+ export class SourceCatalogReference extends BaseCatalogReference {
21
+ type = "SOURCE";
22
+ #config;
23
+ #retrieveByPath;
24
+ constructor(properties, config, retrieveByPath) {
25
+ super(properties);
26
+ this.#config = config;
27
+ this.#retrieveByPath = retrieveByPath;
28
+ }
29
+ catalogObject() {
30
+ return this.#retrieveByPath(this.path);
31
+ }
32
+ children(params = {}) {
33
+ return catalogChildren(this, this.#config, this.#retrieveByPath)({
34
+ ...(params.version && getVersionParams(params.version)),
35
+ ...(params.exclude && { exclude: params.exclude }),
36
+ });
37
+ }
38
+ wiki() {
39
+ return getWiki(this.#config, this)();
40
+ }
41
+ }
42
+ const getVersionParams = (versionReference) => {
43
+ const params = { versionType: "", versionValue: "" };
44
+ if (isBranchHeadVersionReference(versionReference)) {
45
+ params.versionType = "BRANCH";
46
+ params.versionValue = versionReference.branch;
47
+ }
48
+ else if (isBareCommitVersionReference(versionReference)) {
49
+ params.versionType = "COMMIT";
50
+ params.versionValue = versionReference.hash;
51
+ }
52
+ else if (isTagVersionReference(versionReference)) {
53
+ params.versionType = "TAG";
54
+ params.versionValue = versionReference.tag;
55
+ }
56
+ else {
57
+ throw new Error("Invalid versionReference");
58
+ }
59
+ return params;
60
+ };
61
+ //# sourceMappingURL=SourceCatalogReference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SourceCatalogReference.js","sourceRoot":"","sources":["../../../../src/oss/catalog/CatalogReferences/SourceCatalogReference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,oBAAoB,GAGrB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,qBAAqB,GAEtB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,OAAO,sBAAuB,SAAQ,oBAAoB;IACrD,IAAI,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAgB;IACvB,eAAe,CAAiB;IAEhC,YACE,UAA0C,EAC1C,MAAqB,EACrB,cAA8B;QAE9B,KAAK,CAAC,UAAU,CAAC,CAAC;QAClB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;IACxC,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAkD,CAAC;IAC1F,CAAC;IAED,QAAQ,CACN,SAGI,EAAE;QAEN,OAAO,eAAe,CACpB,IAAI,EACJ,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,eAAe,CACrB,CAAC;YACA,GAAG,CAAC,MAAM,CAAC,OAAO,IAAI,gBAAgB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YACvD,GAAG,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;SACnD,CAAC,CAAC;IACL,CAAC;IAED,IAAI;QACF,OAAO,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC;IACvC,CAAC;CACF;AAED,MAAM,gBAAgB,GAAG,CAAC,gBAAkC,EAAE,EAAE;IAC9D,MAAM,MAAM,GAAG,EAAE,WAAW,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC;IACrD,IAAI,4BAA4B,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACnD,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;QAC9B,MAAM,CAAC,YAAY,GAAG,gBAAgB,CAAC,MAAM,CAAC;IAChD,CAAC;SAAM,IAAI,4BAA4B,CAAC,gBAAgB,CAAC,EAAE,CAAC;QAC1D,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;QAC9B,MAAM,CAAC,YAAY,GAAG,gBAAgB,CAAC,IAAI,CAAC;IAC9C,CAAC;SAAM,IAAI,qBAAqB,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACnD,MAAM,CAAC,WAAW,GAAG,KAAK,CAAC;QAC3B,MAAM,CAAC,YAAY,GAAG,gBAAgB,CAAC,GAAG,CAAC;IAC7C,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAC9C,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\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 { Result } from \"ts-results-es\";\nimport type { SonarV3Config } from \"../../../common/Config.ts\";\nimport {\n BaseCatalogReference,\n type BaseCatalogReferenceProperties,\n type RetrieveByPath,\n} from \"./BaseCatalogReference.ts\";\nimport type { SourceCatalogObject } from \"../CatalogObjects/SourceCatalogObject.ts\";\nimport { catalogChildren } from \"./utils/catalogChildren.ts\";\nimport { getWiki } from \"./utils/getWiki.ts\";\nimport {\n isBareCommitVersionReference,\n isBranchHeadVersionReference,\n isTagVersionReference,\n type VersionReference,\n} from \"../VersionReference.ts\";\n\nexport class SourceCatalogReference extends BaseCatalogReference {\n readonly type = \"SOURCE\";\n #config: SonarV3Config;\n #retrieveByPath: RetrieveByPath;\n\n constructor(\n properties: BaseCatalogReferenceProperties,\n config: SonarV3Config,\n retrieveByPath: RetrieveByPath,\n ) {\n super(properties);\n this.#config = config;\n this.#retrieveByPath = retrieveByPath;\n }\n\n catalogObject() {\n return this.#retrieveByPath(this.path) as Promise<Result<SourceCatalogObject, unknown>>;\n }\n\n children(\n params: {\n version?: VersionReference;\n exclude?: string;\n } = {},\n ) {\n return catalogChildren(\n this,\n this.#config,\n this.#retrieveByPath,\n )({\n ...(params.version && getVersionParams(params.version)),\n ...(params.exclude && { exclude: params.exclude }),\n });\n }\n\n wiki() {\n return getWiki(this.#config, this)();\n }\n}\n\nconst getVersionParams = (versionReference: VersionReference) => {\n const params = { versionType: \"\", versionValue: \"\" };\n if (isBranchHeadVersionReference(versionReference)) {\n params.versionType = \"BRANCH\";\n params.versionValue = versionReference.branch;\n } else if (isBareCommitVersionReference(versionReference)) {\n params.versionType = \"COMMIT\";\n params.versionValue = versionReference.hash;\n } else if (isTagVersionReference(versionReference)) {\n params.versionType = \"TAG\";\n params.versionValue = versionReference.tag;\n } else {\n throw new Error(\"Invalid versionReference\");\n }\n\n return params;\n};\n"]}
@@ -0,0 +1,20 @@
1
+ import type { Result } from "ts-results-es";
2
+ import type { SonarV3Config } from "../../../common/Config.ts";
3
+ import { BaseCatalogReference, type BaseCatalogReferenceProperties, type RetrieveByPath } from "./BaseCatalogReference.ts";
4
+ import type { SpaceCatalogObject } from "../CatalogObjects/SpaceCatalogObject.ts";
5
+ export declare class SpaceCatalogReference extends BaseCatalogReference {
6
+ #private;
7
+ readonly type = "SPACE";
8
+ constructor(properties: BaseCatalogReferenceProperties, config: SonarV3Config, retrieveByPath: RetrieveByPath);
9
+ catalogObject(): Promise<Result<SpaceCatalogObject, unknown>>;
10
+ children(): {
11
+ data({ signal }?: import("../../../common/Params.ts").SignalParam): AsyncGenerator<import("./index.ts").CatalogReference, void, unknown>;
12
+ getPage: (params?: {
13
+ nextPageToken?: string;
14
+ } & import("../../../common/Params.ts").SignalParam) => Promise<import("ts-results-es").Err<any> | import("ts-results-es").Ok<{
15
+ data: import("./index.ts").CatalogReference[];
16
+ nextPageToken: string | undefined;
17
+ }>>;
18
+ };
19
+ wiki(): Promise<import("ts-results-es").Err<unknown> | import("ts-results-es").Ok<import("../CatalogWiki.ts").CatalogWiki>>;
20
+ }
@@ -0,0 +1,38 @@
1
+ /*
2
+ * Copyright (C) 2024-2025 Dremio Corporation
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 { BaseCatalogReference, } from "./BaseCatalogReference.js";
17
+ import { catalogChildren } from "./utils/catalogChildren.js";
18
+ import { getWiki } from "./utils/getWiki.js";
19
+ export class SpaceCatalogReference extends BaseCatalogReference {
20
+ type = "SPACE";
21
+ #config;
22
+ #retrieveByPath;
23
+ constructor(properties, config, retrieveByPath) {
24
+ super(properties);
25
+ this.#config = config;
26
+ this.#retrieveByPath = retrieveByPath;
27
+ }
28
+ catalogObject() {
29
+ return this.#retrieveByPath(this.path);
30
+ }
31
+ children() {
32
+ return catalogChildren(this, this.#config, this.#retrieveByPath)();
33
+ }
34
+ wiki() {
35
+ return getWiki(this.#config, this)();
36
+ }
37
+ }
38
+ //# sourceMappingURL=SpaceCatalogReference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpaceCatalogReference.js","sourceRoot":"","sources":["../../../../src/oss/catalog/CatalogReferences/SpaceCatalogReference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,oBAAoB,GAGrB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,MAAM,OAAO,qBAAsB,SAAQ,oBAAoB;IACpD,IAAI,GAAG,OAAO,CAAC;IACxB,OAAO,CAAgB;IACvB,eAAe,CAAiB;IAEhC,YACE,UAA0C,EAC1C,MAAqB,EACrB,cAA8B;QAE9B,KAAK,CAAC,UAAU,CAAC,CAAC;QAClB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;IACxC,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAiD,CAAC;IACzF,CAAC;IAED,QAAQ;QACN,OAAO,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;IACrE,CAAC;IAED,IAAI;QACF,OAAO,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC;IACvC,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\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 { Result } from \"ts-results-es\";\nimport type { SonarV3Config } from \"../../../common/Config.ts\";\nimport {\n BaseCatalogReference,\n type BaseCatalogReferenceProperties,\n type RetrieveByPath,\n} from \"./BaseCatalogReference.ts\";\nimport type { SpaceCatalogObject } from \"../CatalogObjects/SpaceCatalogObject.ts\";\nimport { catalogChildren } from \"./utils/catalogChildren.ts\";\nimport { getWiki } from \"./utils/getWiki.ts\";\n\nexport class SpaceCatalogReference extends BaseCatalogReference {\n readonly type = \"SPACE\";\n #config: SonarV3Config;\n #retrieveByPath: RetrieveByPath;\n\n constructor(\n properties: BaseCatalogReferenceProperties,\n config: SonarV3Config,\n retrieveByPath: RetrieveByPath,\n ) {\n super(properties);\n this.#config = config;\n this.#retrieveByPath = retrieveByPath;\n }\n\n catalogObject() {\n return this.#retrieveByPath(this.path) as Promise<Result<SpaceCatalogObject, unknown>>;\n }\n\n children() {\n return catalogChildren(this, this.#config, this.#retrieveByPath)();\n }\n\n wiki() {\n return getWiki(this.#config, this)();\n }\n}\n"]}
@@ -0,0 +1,9 @@
1
+ import type { DatasetCatalogReference } from "./DatasetCatalogReference.ts";
2
+ import type { FileCatalogReference } from "./FileCatalogReference.ts";
3
+ import type { FolderCatalogReference } from "./FolderCatalogReference.ts";
4
+ import type { FunctionCatalogReference } from "./FunctionCatalogReference.ts";
5
+ import type { HomeCatalogReference } from "./HomeCatalogReference.ts";
6
+ import type { SourceCatalogReference } from "./SourceCatalogReference.ts";
7
+ import type { SpaceCatalogReference } from "./SpaceCatalogReference.ts";
8
+ export type { DatasetCatalogReference, FileCatalogReference, FolderCatalogReference, FunctionCatalogReference, HomeCatalogReference, SourceCatalogReference, SpaceCatalogReference, };
9
+ export type CatalogReference = DatasetCatalogReference | FileCatalogReference | FolderCatalogReference | FunctionCatalogReference | HomeCatalogReference | SourceCatalogReference | SpaceCatalogReference;
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Copyright (C) 2024-2025 Dremio Corporation
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=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/oss/catalog/CatalogReferences/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\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 { DatasetCatalogReference } from \"./DatasetCatalogReference.ts\";\nimport type { FileCatalogReference } from \"./FileCatalogReference.ts\";\nimport type { FolderCatalogReference } from \"./FolderCatalogReference.ts\";\nimport type { FunctionCatalogReference } from \"./FunctionCatalogReference.ts\";\nimport type { HomeCatalogReference } from \"./HomeCatalogReference.ts\";\nimport type { SourceCatalogReference } from \"./SourceCatalogReference.ts\";\nimport type { SpaceCatalogReference } from \"./SpaceCatalogReference.ts\";\n\nexport type {\n DatasetCatalogReference,\n FileCatalogReference,\n FolderCatalogReference,\n FunctionCatalogReference,\n HomeCatalogReference,\n SourceCatalogReference,\n SpaceCatalogReference,\n};\n\nexport type CatalogReference =\n | DatasetCatalogReference\n | FileCatalogReference\n | FolderCatalogReference\n | FunctionCatalogReference\n | HomeCatalogReference\n | SourceCatalogReference\n | SpaceCatalogReference;\n"]}
@@ -0,0 +1,14 @@
1
+ import { Err, Ok } from "ts-results-es";
2
+ import type { SonarV3Config } from "../../../../common/Config.ts";
3
+ import type { SignalParam } from "../../../../common/Params.ts";
4
+ import type { RetrieveByPath } from "../BaseCatalogReference.ts";
5
+ import type { CatalogReference } from "../index.ts";
6
+ export declare const catalogChildren: (catalogReference: CatalogReference, config: SonarV3Config, retrieveByPath: RetrieveByPath) => (additionalParams?: Record<string, any>) => {
7
+ data({ signal }?: SignalParam): AsyncGenerator<CatalogReference, void, unknown>;
8
+ getPage: (params?: {
9
+ nextPageToken?: string;
10
+ } & SignalParam) => Promise<Err<any> | Ok<{
11
+ data: CatalogReference[];
12
+ nextPageToken: string | undefined;
13
+ }>>;
14
+ };
@@ -0,0 +1,62 @@
1
+ /*
2
+ * Copyright (C) 2024-2025 Dremio Corporation
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 { Err, Ok } from "ts-results-es";
17
+ import { catalogReferenceFromProperties } from "./catalogReferenceFromProperties.js";
18
+ import { catalogReferenceEntityToProperties } from "./catalogReferenceEntityToProperties.js";
19
+ export const catalogChildren = (catalogReference, config, retrieveByPath) => (additionalParams = {}) => {
20
+ const getPage = (params = {}) => {
21
+ const searchParams = new URLSearchParams();
22
+ searchParams.set("maxChildren", "100");
23
+ if (params.nextPageToken) {
24
+ searchParams.set("pageToken", params.nextPageToken);
25
+ }
26
+ for (const param in additionalParams) {
27
+ searchParams.set(param, additionalParams[param]);
28
+ }
29
+ return config
30
+ .sonarV3Request(`catalog/by-path/${catalogReference.path.map(encodeURIComponent).join("/")}?${searchParams.toString()}`, { signal: params.signal })
31
+ .then((res) => res.json())
32
+ .then((response) => {
33
+ return Ok({
34
+ data: response.children.map((entity) => catalogReferenceFromProperties(catalogReferenceEntityToProperties(entity), config, retrieveByPath)),
35
+ nextPageToken: response.nextPageToken,
36
+ });
37
+ })
38
+ .catch((e) => Err(e));
39
+ };
40
+ return {
41
+ async *data({ signal } = {}) {
42
+ const firstPageResult = await getPage({ signal });
43
+ if (firstPageResult.isErr()) {
44
+ throw firstPageResult.error;
45
+ }
46
+ const firstPage = firstPageResult.value;
47
+ yield* firstPage.data;
48
+ let nextPageToken = firstPage.nextPageToken;
49
+ while (nextPageToken && !signal?.aborted) {
50
+ const nextPageResult = await getPage({ nextPageToken, signal });
51
+ if (nextPageResult.isErr()) {
52
+ throw nextPageResult.error;
53
+ }
54
+ const nextPage = nextPageResult.value;
55
+ yield* nextPage.data;
56
+ nextPageToken = nextPage.nextPageToken;
57
+ }
58
+ },
59
+ getPage,
60
+ };
61
+ };
62
+ //# sourceMappingURL=catalogChildren.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalogChildren.js","sourceRoot":"","sources":["../../../../../src/oss/catalog/CatalogReferences/utils/catalogChildren.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAIxC,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAG7F,MAAM,CAAC,MAAM,eAAe,GAC1B,CAAC,gBAAkC,EAAE,MAAqB,EAAE,cAA8B,EAAE,EAAE,CAC9F,CAAC,mBAAwC,EAAE,EAAE,EAAE;IAC7C,MAAM,OAAO,GAAG,CAAC,SAAmD,EAAE,EAAE,EAAE;QACxE,MAAM,YAAY,GAAG,IAAI,eAAe,EAAE,CAAC;QAC3C,YAAY,CAAC,GAAG,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QACvC,IAAI,MAAM,CAAC,aAAa,EAAE,CAAC;YACzB,YAAY,CAAC,GAAG,CAAC,WAAW,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;QACtD,CAAC;QACD,KAAK,MAAM,KAAK,IAAI,gBAAgB,EAAE,CAAC;YACrC,YAAY,CAAC,GAAG,CAAC,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;QACnD,CAAC;QACD,OAAO,MAAM;aACV,cAAc,CACb,mBAAmB,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC,QAAQ,EAAE,EAAE,EACvG,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAC1B;aACA,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;aACzB,IAAI,CAAC,CAAC,QAAyD,EAAE,EAAE;YAClE,OAAO,EAAE,CAAC;gBACR,IAAI,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAe,EAAE,EAAE,CAC9C,8BAA8B,CAC5B,kCAAkC,CAAC,MAAM,CAAC,EAC1C,MAAM,EACN,cAAc,CACf,CACF;gBACD,aAAa,EAAE,QAAQ,CAAC,aAAa;aACtC,CAAC,CAAC;QACL,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1B,CAAC,CAAC;IACF,OAAO;QACL,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,KAAkB,EAAE;YACtC,MAAM,eAAe,GAAG,MAAM,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;YAClD,IAAI,eAAe,CAAC,KAAK,EAAE,EAAE,CAAC;gBAC5B,MAAM,eAAe,CAAC,KAAK,CAAC;YAC9B,CAAC;YACD,MAAM,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;YACxC,KAAK,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC;YACtB,IAAI,aAAa,GAAG,SAAS,CAAC,aAAa,CAAC;YAC5C,OAAO,aAAa,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC;gBACzC,MAAM,cAAc,GAAG,MAAM,OAAO,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,CAAC;gBAChE,IAAI,cAAc,CAAC,KAAK,EAAE,EAAE,CAAC;oBAC3B,MAAM,cAAc,CAAC,KAAK,CAAC;gBAC7B,CAAC;gBACD,MAAM,QAAQ,GAAG,cAAc,CAAC,KAAK,CAAC;gBACtC,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACrB,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC;YACzC,CAAC;QACH,CAAC;QACD,OAAO;KACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\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 { Err, Ok } from \"ts-results-es\";\nimport type { SonarV3Config } from \"../../../../common/Config.ts\";\nimport type { SignalParam } from \"../../../../common/Params.ts\";\nimport type { RetrieveByPath } from \"../BaseCatalogReference.ts\";\nimport { catalogReferenceFromProperties } from \"./catalogReferenceFromProperties.ts\";\nimport { catalogReferenceEntityToProperties } from \"./catalogReferenceEntityToProperties.ts\";\nimport type { CatalogReference } from \"../index.ts\";\n\nexport const catalogChildren =\n (catalogReference: CatalogReference, config: SonarV3Config, retrieveByPath: RetrieveByPath) =>\n (additionalParams: Record<string, any> = {}) => {\n const getPage = (params: { nextPageToken?: string } & SignalParam = {}) => {\n const searchParams = new URLSearchParams();\n searchParams.set(\"maxChildren\", \"100\");\n if (params.nextPageToken) {\n searchParams.set(\"pageToken\", params.nextPageToken);\n }\n for (const param in additionalParams) {\n searchParams.set(param, additionalParams[param]);\n }\n return config\n .sonarV3Request(\n `catalog/by-path/${catalogReference.path.map(encodeURIComponent).join(\"/\")}?${searchParams.toString()}`,\n { signal: params.signal },\n )\n .then((res) => res.json())\n .then((response: { children: unknown[]; nextPageToken?: string }) => {\n return Ok({\n data: response.children.map((entity: unknown) =>\n catalogReferenceFromProperties(\n catalogReferenceEntityToProperties(entity),\n config,\n retrieveByPath,\n ),\n ),\n nextPageToken: response.nextPageToken,\n });\n })\n .catch((e) => Err(e));\n };\n return {\n async *data({ signal }: SignalParam = {}) {\n const firstPageResult = await getPage({ signal });\n if (firstPageResult.isErr()) {\n throw firstPageResult.error;\n }\n const firstPage = firstPageResult.value;\n yield* firstPage.data;\n let nextPageToken = firstPage.nextPageToken;\n while (nextPageToken && !signal?.aborted) {\n const nextPageResult = await getPage({ nextPageToken, signal });\n if (nextPageResult.isErr()) {\n throw nextPageResult.error;\n }\n const nextPage = nextPageResult.value;\n yield* nextPage.data;\n nextPageToken = nextPage.nextPageToken;\n }\n },\n getPage,\n };\n };\n"]}
@@ -0,0 +1 @@
1
+ export declare const catalogReferenceEntityToProperties: (properties: any) => any;
@@ -0,0 +1,42 @@
1
+ /*
2
+ * Copyright (C) 2024-2025 Dremio Corporation
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 const catalogReferenceEntityToProperties = (
17
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
+ properties) => {
19
+ switch (properties.type) {
20
+ case "CONTAINER": {
21
+ return {
22
+ id: properties.id,
23
+ path: properties.path,
24
+ type: properties.containerType,
25
+ };
26
+ }
27
+ case "DATASET":
28
+ return {
29
+ id: properties.id,
30
+ path: properties.path,
31
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
32
+ type: `DATASET_${properties.datasetType}`,
33
+ };
34
+ default:
35
+ return {
36
+ id: properties.id,
37
+ path: properties.path,
38
+ type: properties.type,
39
+ };
40
+ }
41
+ };
42
+ //# sourceMappingURL=catalogReferenceEntityToProperties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalogReferenceEntityToProperties.js","sourceRoot":"","sources":["../../../../../src/oss/catalog/CatalogReferences/utils/catalogReferenceEntityToProperties.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAC,MAAM,kCAAkC,GAAG;AAChD,8DAA8D;AAC9D,UAAe,EACV,EAAE;IACP,QAAQ,UAAU,CAAC,IAAI,EAAE,CAAC;QACxB,KAAK,WAAW,CAAC,CAAC,CAAC;YACjB,OAAO;gBACL,EAAE,EAAE,UAAU,CAAC,EAAE;gBACjB,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,IAAI,EAAE,UAAU,CAAC,aAAa;aAC/B,CAAC;QACJ,CAAC;QACD,KAAK,SAAS;YACZ,OAAO;gBACL,EAAE,EAAE,UAAU,CAAC,EAAE;gBACjB,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,8DAA8D;gBAC9D,IAAI,EAAE,WAAW,UAAU,CAAC,WAAW,EAAS;aACjD,CAAC;QACJ;YACE,OAAO;gBACL,EAAE,EAAE,UAAU,CAAC,EAAE;gBACjB,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,IAAI,EAAE,UAAU,CAAC,IAAI;aACtB,CAAC;IACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\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 const catalogReferenceEntityToProperties = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n properties: any,\n): any => {\n switch (properties.type) {\n case \"CONTAINER\": {\n return {\n id: properties.id,\n path: properties.path,\n type: properties.containerType,\n };\n }\n case \"DATASET\":\n return {\n id: properties.id,\n path: properties.path,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n type: `DATASET_${properties.datasetType}` as any,\n };\n default:\n return {\n id: properties.id,\n path: properties.path,\n type: properties.type,\n };\n }\n};\n"]}
@@ -0,0 +1,6 @@
1
+ import type { SonarV3Config } from "../../../../common/Config.ts";
2
+ import type { BaseCatalogReferenceProperties, RetrieveByPath } from "../BaseCatalogReference.ts";
3
+ import type { CatalogReference } from "../index.ts";
4
+ export declare const catalogReferenceFromProperties: (properties: BaseCatalogReferenceProperties & {
5
+ type: string;
6
+ }, config: SonarV3Config, retrieveByPath: RetrieveByPath) => CatalogReference;