@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 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/enterprise/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAQ3D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,sBAAsB,GAAG,CAAC,MAAc,EAAE,EAAE;IAChD,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACtC,OAAO;QACL,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,OAAO;QACP,cAAc,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,UAAU,IAAI,EAAE,EAAE,IAAI,CAAC;QAC/D,cAAc,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,IAAI,EAAE,EAAE,IAAI,CAAC;QAChE,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,IAAI,EAAE,EAAE,IAAI,CAAC;KACQ,CAAC;AACxE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,MAAc,EAAE,EAAE;IACvC,MAAM,mBAAmB,GAAG,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAC3D,OAAO;QACL,GAAG,SAAS,CAAC,mBAAmB,CAAC;QACjC,QAAQ,EAAE,mBAAmB,CAAC,OAAO;QACrC,oBAAoB,EAAE,mBAAmB;QACzC,eAAe,EAAE,mBAAmB,CAAC,cAAc;QACnD,eAAe,EAAE,mBAAmB,CAAC,cAAc;KACpD,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,SAAS,IAAI,UAAU,EAAE,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 { createRequest } from \"../common/createRequest.ts\";\nimport type {\n Config,\n ResourceConfig,\n SonarV2Config,\n SonarV3Config,\n V3Config,\n} from \"../common/Config.ts\";\nimport { Resources } from \"./resources.ts\";\n\nconst getSonarResourceConfig = (config: Config) => {\n const request = createRequest(config);\n return {\n logger: config.logger,\n origin: config.origin,\n request,\n sonarV2Request: (path, init) => request(`/apiv2/${path}`, init),\n sonarV3Request: (path, init) => request(`/api/v3/${path}`, init),\n v3Request: (path, init) => request(`/api/v3/${path}`, init),\n } satisfies ResourceConfig & SonarV2Config & SonarV3Config & V3Config;\n};\n\nexport const Dremio = (config: Config) => {\n const sonarResourceConfig = getSonarResourceConfig(config);\n return {\n ...Resources(sonarResourceConfig),\n _request: sonarResourceConfig.request,\n _sonarResourceConfig: sonarResourceConfig,\n _sonarV2Request: sonarResourceConfig.sonarV2Request,\n _sonarV3Request: sonarResourceConfig.sonarV3Request,\n };\n};\n\nexport * from \"../common/sharedExports.ts\";\nexport * from \"./credentials/index.ts\";\nexport * from \"./interfaces.ts\";\nexport { Resources as _Resources };\n"]}
@@ -0,0 +1,12 @@
1
+ import type { Engine } from "./engines/Engine.ts";
2
+ import type { Job, Reflection } from "../oss/interfaces.ts";
3
+ import type { EnterpriseCatalogObject } from "./catalog/CatalogObjects/index.ts";
4
+ import type { EnterpriseCatalogReference } from "./catalog/CatalogReferences/index.ts";
5
+ import type { EnterpriseScript } from "./scripts/EnterpriseScript.ts";
6
+ import type { EnterpriseUser } from "./users/EnterpriseUser.ts";
7
+ import type { ReflectionSummary } from "./reflections/ReflectionSummary.ts";
8
+ import type { Role } from "./roles/Role.ts";
9
+ import type { BranchHeadVersionReference, BareCommitVersionReference, TagVersionReference, VersionReference } from "../oss/catalog/VersionReference.ts";
10
+ export * from "./catalog/CatalogObjects/index.ts";
11
+ export * from "./catalog/CatalogReferences/index.ts";
12
+ export type { Engine, EnterpriseCatalogObject, EnterpriseCatalogReference, EnterpriseScript, EnterpriseUser, Job, Reflection, ReflectionSummary, Role, BranchHeadVersionReference, BareCommitVersionReference, TagVersionReference, VersionReference, };
@@ -0,0 +1,18 @@
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 * from "./catalog/CatalogObjects/index.js";
17
+ export * from "./catalog/CatalogReferences/index.js";
18
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/enterprise/interfaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAiBH,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,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 { Engine } from \"./engines/Engine.ts\";\nimport type { Job, Reflection } from \"../oss/interfaces.ts\";\nimport type { EnterpriseCatalogObject } from \"./catalog/CatalogObjects/index.ts\";\nimport type { EnterpriseCatalogReference } from \"./catalog/CatalogReferences/index.ts\";\nimport type { EnterpriseScript } from \"./scripts/EnterpriseScript.ts\";\nimport type { EnterpriseUser } from \"./users/EnterpriseUser.ts\";\nimport type { ReflectionSummary } from \"./reflections/ReflectionSummary.ts\";\nimport type { Role } from \"./roles/Role.ts\";\nimport type {\n BranchHeadVersionReference,\n BareCommitVersionReference,\n TagVersionReference,\n VersionReference,\n} from \"../oss/catalog/VersionReference.ts\";\n\nexport * from \"./catalog/CatalogObjects/index.ts\";\nexport * from \"./catalog/CatalogReferences/index.ts\";\nexport type {\n Engine,\n EnterpriseCatalogObject,\n EnterpriseCatalogReference,\n EnterpriseScript,\n EnterpriseUser,\n Job,\n Reflection,\n ReflectionSummary,\n Role,\n BranchHeadVersionReference,\n BareCommitVersionReference,\n TagVersionReference,\n VersionReference,\n};\n"]}
@@ -0,0 +1,74 @@
1
+ import type { EnterpriseDatasetCatalogReference } from "../catalog/CatalogReferences/index.ts";
2
+ export declare class ReflectionSummary {
3
+ createdAt: ReflectionProperties["createdAt"];
4
+ dataset: ReflectionProperties["dataset"];
5
+ id: ReflectionProperties["id"];
6
+ isCanAlter: ReflectionProperties["isCanAlter"];
7
+ isCanView: ReflectionProperties["isCanView"];
8
+ metrics: ReflectionProperties["metrics"];
9
+ name: ReflectionProperties["name"];
10
+ status: ReflectionProperties["status"];
11
+ type: ReflectionProperties["type"];
12
+ updatedAt: ReflectionProperties["updatedAt"];
13
+ constructor(properties: ReflectionProperties);
14
+ }
15
+ export declare const reflectionSummaryEntityToProperties: (entity: {
16
+ createdAt: string;
17
+ id: string;
18
+ isCanAlter: boolean;
19
+ isCanView: boolean;
20
+ chosenCount: number;
21
+ consideredCount: number;
22
+ currentSizeBytes: number;
23
+ matchedCount: number;
24
+ status: {
25
+ availabilityStatus: "AVAILABLE" | "EXPIRED" | "INCOMPLETE" | "NONE";
26
+ combinedStatus: "CAN_ACCELERATE" | "CAN_ACCELERATE_WITH_FAILURES" | "CANNOT_ACCELERATE_INITIALIZING" | "CANNOT_ACCELERATE_MANUAL" | "CANNOT_ACCELERATE_SCHEDULED" | "DISABLED" | "EXPIRED" | "FAILED" | "INVALID" | "INCOMPLETE" | "REFRESHING";
27
+ configStatus: "OK" | "INVALID";
28
+ expiresAt: string;
29
+ failureCount: number;
30
+ lastDataFetchAt: string;
31
+ lastFailureMessage: string;
32
+ lastRefreshDurationMillis: number;
33
+ refreshMethod: "INCREMENTAL" | "FULL" | "NONE";
34
+ refreshStatus: "GIVEN_UP" | "MANUAL" | "RUNNING" | "SCHEDULED";
35
+ };
36
+ isEnabled: boolean;
37
+ outputRecords: number;
38
+ totalSizeBytes: number;
39
+ name: string;
40
+ reflectionType: "RAW" | "AGGREGATION";
41
+ updatedAt: string;
42
+ }) => {
43
+ createdAt: Date;
44
+ dataset: EnterpriseDatasetCatalogReference;
45
+ id: string;
46
+ isCanAlter: boolean;
47
+ isCanView: boolean;
48
+ metrics: {
49
+ chosenCount: number;
50
+ consideredCount: number;
51
+ currentSizeBytes: number;
52
+ failureCount: number;
53
+ matchedCount: number;
54
+ outputRecords: number;
55
+ totalSizeBytes: number;
56
+ };
57
+ name: string;
58
+ status: {
59
+ availabilityStatus: "AVAILABLE" | "EXPIRED" | "INCOMPLETE" | "NONE";
60
+ combinedStatus: "FAILED" | "INVALID" | "EXPIRED" | "INCOMPLETE" | "CAN_ACCELERATE" | "CAN_ACCELERATE_WITH_FAILURES" | "CANNOT_ACCELERATE_INITIALIZING" | "CANNOT_ACCELERATE_MANUAL" | "CANNOT_ACCELERATE_SCHEDULED" | "DISABLED" | "REFRESHING";
61
+ configStatus: "OK" | "INVALID";
62
+ expiresAt: Date;
63
+ isEnabled: boolean;
64
+ lastDataFetchAt: Date | null;
65
+ lastFailureMessage: string | null;
66
+ lastRefreshDuration: Temporal.Duration | null;
67
+ refreshMethod: "NONE" | "INCREMENTAL" | "FULL";
68
+ refreshStatus: "RUNNING" | "GIVEN_UP" | "MANUAL" | "SCHEDULED";
69
+ };
70
+ type: "RAW" | "AGGREGATION";
71
+ updatedAt: Date;
72
+ };
73
+ type ReflectionProperties = ReturnType<typeof reflectionSummaryEntityToProperties>;
74
+ export {};
@@ -0,0 +1,82 @@
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 parseMilliseconds from "parse-ms";
17
+ export class ReflectionSummary {
18
+ createdAt;
19
+ dataset;
20
+ id;
21
+ isCanAlter;
22
+ isCanView;
23
+ metrics;
24
+ name;
25
+ status;
26
+ type;
27
+ updatedAt;
28
+ constructor(properties) {
29
+ this.createdAt = properties.createdAt;
30
+ this.dataset = properties.dataset;
31
+ this.id = properties.id;
32
+ this.isCanAlter = properties.isCanAlter;
33
+ this.isCanView = properties.isCanView;
34
+ this.metrics = properties.metrics;
35
+ this.name = properties.name;
36
+ this.status = properties.status;
37
+ this.type = properties.type;
38
+ this.updatedAt = properties.updatedAt;
39
+ }
40
+ }
41
+ export const reflectionSummaryEntityToProperties = (entity) => ({
42
+ createdAt: new Date(entity.createdAt),
43
+ dataset: {},
44
+ // dataset: new DatasetCatalogReference(
45
+ // {
46
+ // id: entity.datasetId,
47
+ // path: entity.datasetPath,
48
+ // type: entity.datasetType,
49
+ // },
50
+ // null as any,
51
+ // ),
52
+ id: entity.id,
53
+ isCanAlter: entity.isCanAlter,
54
+ isCanView: entity.isCanView,
55
+ metrics: {
56
+ chosenCount: entity.chosenCount,
57
+ consideredCount: entity.consideredCount,
58
+ currentSizeBytes: entity.currentSizeBytes,
59
+ failureCount: entity.status.failureCount,
60
+ matchedCount: entity.matchedCount,
61
+ outputRecords: entity.outputRecords,
62
+ totalSizeBytes: entity.totalSizeBytes,
63
+ },
64
+ name: entity.name,
65
+ status: {
66
+ availabilityStatus: entity.status.availabilityStatus,
67
+ combinedStatus: entity.status.combinedStatus,
68
+ configStatus: entity.status.configStatus,
69
+ expiresAt: new Date(entity.status.expiresAt),
70
+ isEnabled: entity.isEnabled,
71
+ lastDataFetchAt: entity.status.lastDataFetchAt ? new Date(entity.status.lastDataFetchAt) : null,
72
+ lastFailureMessage: entity.status.lastFailureMessage || null,
73
+ lastRefreshDuration: typeof entity.status.lastRefreshDurationMillis === "number"
74
+ ? Temporal.Duration.from(parseMilliseconds(entity.status.lastRefreshDurationMillis))
75
+ : null,
76
+ refreshMethod: entity.status.refreshMethod,
77
+ refreshStatus: entity.status.refreshStatus,
78
+ },
79
+ type: entity.reflectionType,
80
+ updatedAt: new Date(entity.updatedAt),
81
+ });
82
+ //# sourceMappingURL=ReflectionSummary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReflectionSummary.js","sourceRoot":"","sources":["../../../src/enterprise/reflections/ReflectionSummary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,iBAAiB,MAAM,UAAU,CAAC;AAGzC,MAAM,OAAO,iBAAiB;IAC5B,SAAS,CAAoC;IAC7C,OAAO,CAAkC;IACzC,EAAE,CAA6B;IAC/B,UAAU,CAAqC;IAC/C,SAAS,CAAoC;IAC7C,OAAO,CAAkC;IACzC,IAAI,CAA+B;IACnC,MAAM,CAAiC;IACvC,IAAI,CAA+B;IACnC,SAAS,CAAoC;IAC7C,YAAY,UAAgC;QAC1C,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;QAClC,IAAI,CAAC,EAAE,GAAG,UAAU,CAAC,EAAE,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACxC,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;QAClC,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;QAC5B,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;IACxC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,MAsCnD,EAAE,EAAE,CAAC,CAAC;IACL,SAAS,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;IACrC,OAAO,EAAE,EAAuC;IAChD,wCAAwC;IACxC,MAAM;IACN,4BAA4B;IAC5B,gCAAgC;IAChC,gCAAgC;IAChC,OAAO;IACP,iBAAiB;IACjB,KAAK;IACL,EAAE,EAAE,MAAM,CAAC,EAAE;IACb,UAAU,EAAE,MAAM,CAAC,UAAU;IAC7B,SAAS,EAAE,MAAM,CAAC,SAAS;IAC3B,OAAO,EAAE;QACP,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;QACzC,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY;QACxC,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,cAAc,EAAE,MAAM,CAAC,cAAc;KACtC;IACD,IAAI,EAAE,MAAM,CAAC,IAAI;IACjB,MAAM,EAAE;QACN,kBAAkB,EAAE,MAAM,CAAC,MAAM,CAAC,kBAAkB;QACpD,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC,cAAc;QAC5C,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY;QACxC,SAAS,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC;QAC5C,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,IAAI;QAC/F,kBAAkB,EAAE,MAAM,CAAC,MAAM,CAAC,kBAAkB,IAAI,IAAI;QAC5D,mBAAmB,EACjB,OAAO,MAAM,CAAC,MAAM,CAAC,yBAAyB,KAAK,QAAQ;YACzD,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC;YACpF,CAAC,CAAC,IAAI;QACV,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa;QAC1C,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa;KAC3C;IACD,IAAI,EAAE,MAAM,CAAC,cAAc;IAC3B,SAAS,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;CACtC,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 parseMilliseconds from \"parse-ms\";\nimport type { EnterpriseDatasetCatalogReference } from \"../catalog/CatalogReferences/index.ts\";\n\nexport class ReflectionSummary {\n createdAt: ReflectionProperties[\"createdAt\"];\n dataset: ReflectionProperties[\"dataset\"];\n id: ReflectionProperties[\"id\"];\n isCanAlter: ReflectionProperties[\"isCanAlter\"];\n isCanView: ReflectionProperties[\"isCanView\"];\n metrics: ReflectionProperties[\"metrics\"];\n name: ReflectionProperties[\"name\"];\n status: ReflectionProperties[\"status\"];\n type: ReflectionProperties[\"type\"];\n updatedAt: ReflectionProperties[\"updatedAt\"];\n constructor(properties: ReflectionProperties) {\n this.createdAt = properties.createdAt;\n this.dataset = properties.dataset;\n this.id = properties.id;\n this.isCanAlter = properties.isCanAlter;\n this.isCanView = properties.isCanView;\n this.metrics = properties.metrics;\n this.name = properties.name;\n this.status = properties.status;\n this.type = properties.type;\n this.updatedAt = properties.updatedAt;\n }\n}\n\nexport const reflectionSummaryEntityToProperties = (entity: {\n createdAt: string;\n id: string;\n isCanAlter: boolean;\n isCanView: boolean;\n chosenCount: number;\n consideredCount: number;\n currentSizeBytes: number;\n matchedCount: number;\n status: {\n availabilityStatus: \"AVAILABLE\" | \"EXPIRED\" | \"INCOMPLETE\" | \"NONE\";\n combinedStatus:\n | \"CAN_ACCELERATE\"\n | \"CAN_ACCELERATE_WITH_FAILURES\"\n | \"CANNOT_ACCELERATE_INITIALIZING\"\n | \"CANNOT_ACCELERATE_MANUAL\"\n | \"CANNOT_ACCELERATE_SCHEDULED\"\n | \"DISABLED\"\n | \"EXPIRED\"\n | \"FAILED\"\n | \"INVALID\"\n | \"INCOMPLETE\"\n | \"REFRESHING\";\n configStatus: \"OK\" | \"INVALID\";\n expiresAt: string;\n failureCount: number;\n lastDataFetchAt: string;\n lastFailureMessage: string;\n lastRefreshDurationMillis: number;\n refreshMethod: \"INCREMENTAL\" | \"FULL\" | \"NONE\";\n refreshStatus: \"GIVEN_UP\" | \"MANUAL\" | \"RUNNING\" | \"SCHEDULED\";\n };\n isEnabled: boolean;\n outputRecords: number;\n totalSizeBytes: number;\n name: string;\n reflectionType: \"RAW\" | \"AGGREGATION\";\n updatedAt: string;\n}) => ({\n createdAt: new Date(entity.createdAt),\n dataset: {} as EnterpriseDatasetCatalogReference,\n // dataset: new DatasetCatalogReference(\n // {\n // id: entity.datasetId,\n // path: entity.datasetPath,\n // type: entity.datasetType,\n // },\n // null as any,\n // ),\n id: entity.id,\n isCanAlter: entity.isCanAlter,\n isCanView: entity.isCanView,\n metrics: {\n chosenCount: entity.chosenCount,\n consideredCount: entity.consideredCount,\n currentSizeBytes: entity.currentSizeBytes,\n failureCount: entity.status.failureCount,\n matchedCount: entity.matchedCount,\n outputRecords: entity.outputRecords,\n totalSizeBytes: entity.totalSizeBytes,\n },\n name: entity.name,\n status: {\n availabilityStatus: entity.status.availabilityStatus,\n combinedStatus: entity.status.combinedStatus,\n configStatus: entity.status.configStatus,\n expiresAt: new Date(entity.status.expiresAt),\n isEnabled: entity.isEnabled,\n lastDataFetchAt: entity.status.lastDataFetchAt ? new Date(entity.status.lastDataFetchAt) : null,\n lastFailureMessage: entity.status.lastFailureMessage || null,\n lastRefreshDuration:\n typeof entity.status.lastRefreshDurationMillis === \"number\"\n ? Temporal.Duration.from(parseMilliseconds(entity.status.lastRefreshDurationMillis))\n : null,\n refreshMethod: entity.status.refreshMethod,\n refreshStatus: entity.status.refreshStatus,\n },\n type: entity.reflectionType,\n updatedAt: new Date(entity.updatedAt),\n});\n\ntype ReflectionProperties = ReturnType<typeof reflectionSummaryEntityToProperties>;\n"]}
@@ -0,0 +1,44 @@
1
+ import type { ResourceConfig, SonarV2Config, SonarV3Config, V3Config } from "../common/Config.ts";
2
+ import { EnginesResource } from "./engines/EnginesResource.ts";
3
+ /**
4
+ * @internal
5
+ * @hidden
6
+ */
7
+ export declare const Resources: (config: ResourceConfig & SonarV2Config & SonarV3Config & V3Config) => {
8
+ catalog: {
9
+ _catalogReferenceFromEntity: (entity: unknown) => import("./interfaces.ts").EnterpriseCatalogReference;
10
+ list: () => {
11
+ data(): AsyncGenerator<import("./interfaces.ts").EnterpriseFunctionCatalogReference | import("./interfaces.ts").EnterpriseHomeCatalogReference | import("./interfaces.ts").EnterpriseSourceCatalogReference | import("./interfaces.ts").EnterpriseSpaceCatalogReference, void, unknown>;
12
+ };
13
+ retrieve: (key: string) => Promise<import("ts-results-es").Result<import("./interfaces.ts").EnterpriseCatalogObject, unknown>>;
14
+ retrieveByPath: (key: string[]) => Promise<import("ts-results-es").Result<import("./interfaces.ts").EnterpriseCatalogObject, unknown>>;
15
+ };
16
+ engines: EnginesResource;
17
+ jobs: {
18
+ create: (query: import("./index.ts").Query) => Promise<import("ts-results-es").Err<unknown> | import("ts-results-es").Ok<string>>;
19
+ observe: (id: string) => import("rxjs").Observable<import("../oss/jobs/Job.ts").JobResult>;
20
+ retrieve: (id: string, { signal }?: import("../common/Params.ts").SignalParam) => Promise<import("../oss/jobs/Job.ts").JobResult>;
21
+ };
22
+ roles: {
23
+ retrieve: (id: string, { signal }?: import("../common/Params.ts").SignalParam) => Promise<import("ts-results-es").Result<import("./interfaces.ts").Role, unknown>>;
24
+ retrieveByName: (name: string, { signal }?: import("../common/Params.ts").SignalParam) => Promise<import("ts-results-es").Result<import("./interfaces.ts").Role, unknown>>;
25
+ };
26
+ scripts: {
27
+ list(): {
28
+ data({ signal }?: import("../common/Params.ts").SignalParam): AsyncGenerator<import("./interfaces.ts").EnterpriseScript, void, unknown>;
29
+ };
30
+ retrieve: (id: string, { signal }?: import("../common/Params.ts").SignalParam) => Promise<import("ts-results-es").Err<unknown> | import("ts-results-es").Ok<import("./interfaces.ts").EnterpriseScript>>;
31
+ store: (properties: {
32
+ name: string;
33
+ query: import("./index.ts").Query;
34
+ }) => Promise<import("ts-results-es").Err<unknown> | import("ts-results-es").Ok<import("./interfaces.ts").EnterpriseScript>>;
35
+ };
36
+ users: {
37
+ retrieveById: (id: string, { signal }?: {
38
+ signal?: AbortSignal;
39
+ }) => Promise<import("ts-results-es").Err<unknown> | import("ts-results-es").Ok<import("./interfaces.ts").EnterpriseUser>>;
40
+ retrieveByName: (name: string, { signal }?: {
41
+ signal?: AbortSignal;
42
+ }) => Promise<import("ts-results-es").Err<unknown> | import("ts-results-es").Ok<import("./interfaces.ts").EnterpriseUser>>;
43
+ };
44
+ };
@@ -0,0 +1,36 @@
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 { JobsResource } from "../oss/jobs/JobsResource.js";
17
+ import { Resources as CommunityResources } from "../oss/resources.js";
18
+ import { EnterpriseCatalogResource } from "./catalog/EnterpriseCatalogResource.js";
19
+ import { RolesResource } from "./roles/RolesResource.js";
20
+ import { EnterpriseScriptsResource } from "./scripts/EnterpriseScriptsResource.js";
21
+ import { EnterpriseUsersResource } from "./users/EnterpriseUsersResource.js";
22
+ import { EnginesResource } from "./engines/EnginesResource.js";
23
+ /**
24
+ * @internal
25
+ * @hidden
26
+ */
27
+ export const Resources = (config) => ({
28
+ ...CommunityResources(config),
29
+ catalog: EnterpriseCatalogResource(config),
30
+ engines: new EnginesResource(config),
31
+ jobs: JobsResource(config),
32
+ roles: RolesResource(config),
33
+ scripts: EnterpriseScriptsResource(config),
34
+ users: EnterpriseUsersResource(config),
35
+ });
36
+ //# sourceMappingURL=resources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/enterprise/resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,MAAiE,EAAE,EAAE,CAAC,CAAC;IAC/F,GAAG,kBAAkB,CAAC,MAAM,CAAC;IAC7B,OAAO,EAAE,yBAAyB,CAAC,MAAM,CAAC;IAC1C,OAAO,EAAE,IAAI,eAAe,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC;IAC1B,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC;IAC5B,OAAO,EAAE,yBAAyB,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,uBAAuB,CAAC,MAAM,CAAC;CACvC,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 { ResourceConfig, SonarV2Config, SonarV3Config, V3Config } from \"../common/Config.ts\";\nimport { JobsResource } from \"../oss/jobs/JobsResource.ts\";\nimport { Resources as CommunityResources } from \"../oss/resources.ts\";\nimport { EnterpriseCatalogResource } from \"./catalog/EnterpriseCatalogResource.ts\";\nimport { RolesResource } from \"./roles/RolesResource.ts\";\nimport { EnterpriseScriptsResource } from \"./scripts/EnterpriseScriptsResource.ts\";\nimport { EnterpriseUsersResource } from \"./users/EnterpriseUsersResource.ts\";\nimport { EnginesResource } from \"./engines/EnginesResource.ts\";\n\n/**\n * @internal\n * @hidden\n */\nexport const Resources = (config: ResourceConfig & SonarV2Config & SonarV3Config & V3Config) => ({\n ...CommunityResources(config),\n catalog: EnterpriseCatalogResource(config),\n engines: new EnginesResource(config),\n jobs: JobsResource(config),\n roles: RolesResource(config),\n scripts: EnterpriseScriptsResource(config),\n users: EnterpriseUsersResource(config),\n});\n"]}
@@ -0,0 +1,23 @@
1
+ export declare class Role implements RoleProperties {
2
+ readonly description: RoleProperties["description"];
3
+ readonly id: RoleProperties["id"];
4
+ readonly memberCount: RoleProperties["memberCount"];
5
+ readonly name: RoleProperties["name"];
6
+ readonly roles: RoleProperties["roles"];
7
+ readonly type: RoleProperties["type"];
8
+ constructor(properties: RoleProperties);
9
+ static fromResource(properties: any): Role;
10
+ }
11
+ export type RoleReference = {
12
+ id: string;
13
+ name: string;
14
+ type: string;
15
+ };
16
+ export type RoleProperties = {
17
+ readonly description: string | null;
18
+ readonly id: string;
19
+ readonly memberCount: number;
20
+ readonly name: string;
21
+ readonly roles: RoleReference[];
22
+ readonly type: string;
23
+ };
@@ -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
+ export class Role {
17
+ description;
18
+ id;
19
+ memberCount;
20
+ name;
21
+ roles;
22
+ type;
23
+ constructor(properties) {
24
+ this.description = properties.description;
25
+ this.id = properties.id;
26
+ this.memberCount = properties.memberCount;
27
+ this.name = properties.name;
28
+ this.roles = properties.roles;
29
+ this.type = properties.type;
30
+ }
31
+ static fromResource(properties) {
32
+ return new Role({
33
+ ...properties,
34
+ description: properties.description?.length ? properties.description : null,
35
+ });
36
+ }
37
+ }
38
+ //# sourceMappingURL=Role.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Role.js","sourceRoot":"","sources":["../../../src/enterprise/roles/Role.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,OAAO,IAAI;IACN,WAAW,CAAgC;IAC3C,EAAE,CAAuB;IACzB,WAAW,CAAgC;IAC3C,IAAI,CAAyB;IAC7B,KAAK,CAA0B;IAC/B,IAAI,CAAyB;IAEtC,YAAY,UAA0B;QACpC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;QAC1C,IAAI,CAAC,EAAE,GAAG,UAAU,CAAC,EAAE,CAAC;QACxB,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;QAC1C,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;QAC5B,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;QAC9B,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;IAC9B,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,UAAe;QACjC,OAAO,IAAI,IAAI,CAAC;YACd,GAAG,UAAU;YACb,WAAW,EAAE,UAAU,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI;SAC5E,CAAC,CAAC;IACL,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\nexport class Role implements RoleProperties {\n readonly description: RoleProperties[\"description\"];\n readonly id: RoleProperties[\"id\"];\n readonly memberCount: RoleProperties[\"memberCount\"];\n readonly name: RoleProperties[\"name\"];\n readonly roles: RoleProperties[\"roles\"];\n readonly type: RoleProperties[\"type\"];\n\n constructor(properties: RoleProperties) {\n this.description = properties.description;\n this.id = properties.id;\n this.memberCount = properties.memberCount;\n this.name = properties.name;\n this.roles = properties.roles;\n this.type = properties.type;\n }\n\n static fromResource(properties: any) {\n return new Role({\n ...properties,\n description: properties.description?.length ? properties.description : null,\n });\n }\n}\n\nexport type RoleReference = { id: string; name: string; type: string };\n\nexport type RoleProperties = {\n readonly description: string | null;\n readonly id: string;\n readonly memberCount: number;\n readonly name: string;\n readonly roles: RoleReference[];\n readonly type: string;\n};\n"]}
@@ -0,0 +1,8 @@
1
+ import { type Result } from "ts-results-es";
2
+ import type { SonarV3Config } from "../../common/Config.ts";
3
+ import { Role } from "./Role.ts";
4
+ import type { SignalParam } from "../../common/Params.ts";
5
+ export declare const RolesResource: (config: SonarV3Config) => {
6
+ retrieve: (id: string, { signal }?: SignalParam) => Promise<Result<Role, unknown>>;
7
+ retrieveByName: (name: string, { signal }?: SignalParam) => Promise<Result<Role, unknown>>;
8
+ };
@@ -0,0 +1,32 @@
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 { Role } from "./Role.js";
18
+ export const RolesResource = (config) => {
19
+ return {
20
+ retrieve: (id, { signal } = {}) => config
21
+ .sonarV3Request(`role/${id}`, { signal })
22
+ .then((res) => res.json())
23
+ .then((properties) => Ok(Role.fromResource(properties)))
24
+ .catch((e) => Err(e)),
25
+ retrieveByName: (name, { signal } = {}) => config
26
+ .sonarV3Request(`role/by-name/${name}`, { signal })
27
+ .then((res) => res.json())
28
+ .then((properties) => Ok(Role.fromResource(properties)))
29
+ .catch((e) => Err(e)),
30
+ };
31
+ };
32
+ //# sourceMappingURL=RolesResource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RolesResource.js","sourceRoot":"","sources":["../../../src/enterprise/roles/RolesResource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,GAAG,EAAE,EAAE,EAAe,MAAM,eAAe,CAAC;AAErD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAqB,EAAE,EAAE;IACrD,OAAO;QACL,QAAQ,EAAE,CAAC,EAAU,EAAE,EAAE,MAAM,KAAkB,EAAE,EAAkC,EAAE,CACrF,MAAM;aACH,cAAc,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC;aACxC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;aACzB,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC;aACvD,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACzB,cAAc,EAAE,CAAC,IAAY,EAAE,EAAE,MAAM,KAAkB,EAAE,EAAkC,EAAE,CAC7F,MAAM;aACH,cAAc,CAAC,gBAAgB,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC;aAClD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;aACzB,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC;aACvD,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;KAC1B,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, type Result } from \"ts-results-es\";\nimport type { SonarV3Config } from \"../../common/Config.ts\";\nimport { Role } from \"./Role.ts\";\nimport type { SignalParam } from \"../../common/Params.ts\";\n\nexport const RolesResource = (config: SonarV3Config) => {\n return {\n retrieve: (id: string, { signal }: SignalParam = {}): Promise<Result<Role, unknown>> =>\n config\n .sonarV3Request(`role/${id}`, { signal })\n .then((res) => res.json())\n .then((properties) => Ok(Role.fromResource(properties)))\n .catch((e) => Err(e)),\n retrieveByName: (name: string, { signal }: SignalParam = {}): Promise<Result<Role, unknown>> =>\n config\n .sonarV3Request(`role/by-name/${name}`, { signal })\n .then((res) => res.json())\n .then((properties) => Ok(Role.fromResource(properties)))\n .catch((e) => Err(e)),\n };\n};\n"]}
@@ -0,0 +1,46 @@
1
+ import type { SonarV3Config } from "../../common/Config.ts";
2
+ import type { RoleGrantee, UserGrantee } from "../Grantee.ts";
3
+ import type { Ownable } from "../Ownable.ts";
4
+ import { Script, type ScriptEntity, type ScriptPatchableProperties } from "../../oss/scripts/Script.ts";
5
+ import { Err, Ok } from "ts-results-es";
6
+ import type { SignalParam } from "../../common/Params.ts";
7
+ export declare class EnterpriseScript extends Script implements Ownable {
8
+ #private;
9
+ readonly owner: UserGrantee;
10
+ constructor(properties: EnterpriseScriptProperties, config: SonarV3Config);
11
+ grants({ signal }?: SignalParam): Promise<Err<unknown> | Ok<({
12
+ grantee: RoleGrantee;
13
+ privileges: Set<ScriptPrivileges>;
14
+ } | {
15
+ grantee: UserGrantee;
16
+ privileges: Set<ScriptPrivileges>;
17
+ })[]>>;
18
+ save(properties: ScriptPatchableProperties & {
19
+ owner?: UserGrantee;
20
+ }): Promise<Err<{
21
+ readonly errors: [{
22
+ readonly detail: "A script with this name already exists";
23
+ readonly pointer: "#/name";
24
+ readonly type: "https://api.dremio.dev/problems/validation/field-conflict";
25
+ readonly value: string;
26
+ }];
27
+ readonly title: "There was a problem validating the content of the request";
28
+ readonly type: "https://api.dremio.dev/problems/validation-problem";
29
+ }> | Err<import("../index.ts").Problem> | Ok<EnterpriseScript>>;
30
+ }
31
+ export type EnterpriseScriptProperties = ReturnType<typeof enterpriseScriptEntityToProperties>;
32
+ type EnterpriseScriptEntity = ScriptEntity & {
33
+ owner?: string;
34
+ };
35
+ export declare const enterpriseScriptEntityToProperties: (entity: EnterpriseScriptEntity) => {
36
+ owner: UserGrantee;
37
+ createdAt: Temporal.Instant;
38
+ createdBy: string;
39
+ id: string;
40
+ modifiedAt: Temporal.Instant;
41
+ modifiedBy: string;
42
+ name: string;
43
+ query: import("../index.ts").Query;
44
+ };
45
+ type ScriptPrivileges = "DELETE" | "MANAGE_GRANTS" | "MODIFY" | "VIEW";
46
+ export {};
@@ -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 { createScriptPatchedFields, saveScript, Script, scriptEntityToProperties, } from "../../oss/scripts/Script.js";
17
+ import { Err, Ok, Result } from "ts-results-es";
18
+ export class EnterpriseScript extends Script {
19
+ owner;
20
+ #config;
21
+ constructor(properties, config) {
22
+ super(properties, config);
23
+ this.owner = properties.owner;
24
+ this.#config = config;
25
+ }
26
+ grants({ signal } = {}) {
27
+ return this.#config
28
+ .sonarV3Request(`scripts/${this.id}/grants`, { signal })
29
+ .then((res) => res.json())
30
+ .then((entity) => Ok([
31
+ ...entity.roles.map((grant) => ({
32
+ grantee: {
33
+ id: grant.granteeId,
34
+ type: "ROLE",
35
+ },
36
+ privileges: new Set(grant.privileges),
37
+ })),
38
+ ...entity.users.map((grant) => ({
39
+ grantee: {
40
+ id: grant.granteeId,
41
+ type: "USER",
42
+ },
43
+ privileges: new Set(grant.privileges),
44
+ })),
45
+ ]))
46
+ .catch((e) => Err(e));
47
+ }
48
+ async save(properties) {
49
+ return saveScript(this.id, this.#config)({
50
+ ...createScriptPatchedFields(properties),
51
+ ...(properties.owner && { owner: properties.owner.id }),
52
+ }).then((result) => result.map((value) => new EnterpriseScript(enterpriseScriptEntityToProperties(value), this.#config)));
53
+ }
54
+ }
55
+ export const enterpriseScriptEntityToProperties = (entity) => ({
56
+ ...scriptEntityToProperties(entity),
57
+ owner: {
58
+ id: entity.owner,
59
+ type: "USER",
60
+ },
61
+ });
62
+ //# sourceMappingURL=EnterpriseScript.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnterpriseScript.js","sourceRoot":"","sources":["../../../src/enterprise/scripts/EnterpriseScript.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EACL,yBAAyB,EACzB,UAAU,EACV,MAAM,EACN,wBAAwB,GAGzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGhD,MAAM,OAAO,gBAAiB,SAAQ,MAAM;IACjC,KAAK,CAAc;IAC5B,OAAO,CAAgB;IAEvB,YAAY,UAAsC,EAAE,MAAqB;QACvE,KAAK,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAC1B,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,MAAM,CAAC,EAAE,MAAM,KAAkB,EAAE;QACjC,OAAO,IAAI,CAAC,OAAO;aAChB,cAAc,CAAC,WAAW,IAAI,CAAC,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,CAAC;aACvD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;aACzB,IAAI,CACH,CAAC,MAGA,EAAE,EAAE,CACH,EAAE,CAAC;YACD,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;gBAC9B,OAAO,EAAE;oBACP,EAAE,EAAE,KAAK,CAAC,SAAS;oBACnB,IAAI,EAAE,MAAM;iBACwB;gBACtC,UAAU,EAAE,IAAI,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC;aACtC,CAAC,CAAC;YACH,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;gBAC9B,OAAO,EAAE;oBACP,EAAE,EAAE,KAAK,CAAC,SAAS;oBACnB,IAAI,EAAE,MAAM;iBACwB;gBACtC,UAAU,EAAE,IAAI,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC;aACtC,CAAC,CAAC;SACJ,CAAC,CACL;aACA,KAAK,CAAC,CAAC,CAAU,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC;IAEQ,KAAK,CAAC,IAAI,CAAC,UAA+D;QACjF,OAAO,UAAU,CACf,IAAI,CAAC,EAAE,EACP,IAAI,CAAC,OAAO,CACb,CAAC;YACA,GAAG,yBAAyB,CAAC,UAAU,CAAC;YACxC,GAAG,CAAC,UAAU,CAAC,KAAK,IAAI,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;SACxD,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CACjB,MAAM,CAAC,GAAG,CACR,CAAC,KAA6B,EAAE,EAAE,CAChC,IAAI,gBAAgB,CAAC,kCAAkC,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,CAChF,CACF,CAAC;IACJ,CAAC;CACF;AAMD,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,MAA8B,EAAE,EAAE,CAAC,CAAC;IACrF,GAAG,wBAAwB,CAAC,MAAM,CAAC;IACnC,KAAK,EAAE;QACL,EAAE,EAAE,MAAM,CAAC,KAAe;QAC1B,IAAI,EAAE,MAAM;KACwB;CACvC,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 { SonarV3Config } from \"../../common/Config.ts\";\nimport type { RoleGrantee, UserGrantee } from \"../Grantee.ts\";\nimport type { Ownable } from \"../Ownable.ts\";\nimport {\n createScriptPatchedFields,\n saveScript,\n Script,\n scriptEntityToProperties,\n type ScriptEntity,\n type ScriptPatchableProperties,\n} from \"../../oss/scripts/Script.ts\";\nimport { Err, Ok, Result } from \"ts-results-es\";\nimport type { SignalParam } from \"../../common/Params.ts\";\n\nexport class EnterpriseScript extends Script implements Ownable {\n readonly owner: UserGrantee;\n #config: SonarV3Config;\n\n constructor(properties: EnterpriseScriptProperties, config: SonarV3Config) {\n super(properties, config);\n this.owner = properties.owner;\n this.#config = config;\n }\n\n grants({ signal }: SignalParam = {}) {\n return this.#config\n .sonarV3Request(`scripts/${this.id}/grants`, { signal })\n .then((res) => res.json())\n .then(\n (entity: {\n roles: { granteeId: string; privileges: ScriptPrivileges[] }[];\n users: { granteeId: string; privileges: ScriptPrivileges[] }[];\n }) =>\n Ok([\n ...entity.roles.map((grant) => ({\n grantee: {\n id: grant.granteeId,\n type: \"ROLE\",\n } satisfies RoleGrantee as RoleGrantee,\n privileges: new Set(grant.privileges),\n })),\n ...entity.users.map((grant) => ({\n grantee: {\n id: grant.granteeId,\n type: \"USER\",\n } satisfies UserGrantee as UserGrantee,\n privileges: new Set(grant.privileges),\n })),\n ]),\n )\n .catch((e: unknown) => Err(e));\n }\n\n override async save(properties: ScriptPatchableProperties & { owner?: UserGrantee }) {\n return saveScript(\n this.id,\n this.#config,\n )({\n ...createScriptPatchedFields(properties),\n ...(properties.owner && { owner: properties.owner.id }),\n }).then((result) =>\n result.map(\n (value: EnterpriseScriptEntity) =>\n new EnterpriseScript(enterpriseScriptEntityToProperties(value), this.#config),\n ),\n );\n }\n}\n\nexport type EnterpriseScriptProperties = ReturnType<typeof enterpriseScriptEntityToProperties>;\n\ntype EnterpriseScriptEntity = ScriptEntity & { owner?: string };\n\nexport const enterpriseScriptEntityToProperties = (entity: EnterpriseScriptEntity) => ({\n ...scriptEntityToProperties(entity),\n owner: {\n id: entity.owner as string,\n type: \"USER\",\n } satisfies UserGrantee as UserGrantee,\n});\n\ntype ScriptPrivileges = \"DELETE\" | \"MANAGE_GRANTS\" | \"MODIFY\" | \"VIEW\";\n"]}
@@ -0,0 +1,15 @@
1
+ import type { ResourceConfig, SonarV3Config } from "../../common/Config.ts";
2
+ import { EnterpriseScript } from "./EnterpriseScript.ts";
3
+ import { Ok, Err } from "ts-results-es";
4
+ import type { Query } from "../../common/Query.ts";
5
+ import type { SignalParam } from "../../common/Params.ts";
6
+ export declare const EnterpriseScriptsResource: (config: ResourceConfig & SonarV3Config) => {
7
+ list(): {
8
+ data({ signal }?: SignalParam): AsyncGenerator<EnterpriseScript, void, unknown>;
9
+ };
10
+ retrieve: (id: string, { signal }?: SignalParam) => Promise<Err<unknown> | Ok<EnterpriseScript>>;
11
+ store: (properties: {
12
+ name: string;
13
+ query: Query;
14
+ }) => Promise<Err<unknown> | Ok<EnterpriseScript>>;
15
+ };