@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.
- package/LICENSE +202 -0
- package/dist/cloud/arctic/ArcticCatalog.d.ts +34 -0
- package/dist/cloud/arctic/ArcticCatalog.js +46 -0
- package/dist/cloud/arctic/ArcticCatalog.js.map +1 -0
- package/dist/cloud/arctic/ArcticResource.d.ts +15 -0
- package/dist/cloud/arctic/ArcticResource.js +40 -0
- package/dist/cloud/arctic/ArcticResource.js.map +1 -0
- package/dist/cloud/credentials/fromAccessToken.d.ts +2 -0
- package/dist/cloud/credentials/fromAccessToken.js +19 -0
- package/dist/cloud/credentials/fromAccessToken.js.map +1 -0
- package/dist/cloud/credentials/fromRefreshToken.d.ts +5 -0
- package/dist/cloud/credentials/fromRefreshToken.js +47 -0
- package/dist/cloud/credentials/fromRefreshToken.js.map +1 -0
- package/dist/cloud/credentials/fromUsernamePassword.d.ts +2 -0
- package/dist/cloud/credentials/fromUsernamePassword.js +41 -0
- package/dist/cloud/credentials/fromUsernamePassword.js.map +1 -0
- package/dist/cloud/credentials/index.d.ts +4 -0
- package/dist/cloud/credentials/index.js +20 -0
- package/dist/cloud/credentials/index.js.map +1 -0
- package/dist/cloud/engines/Engine.d.ts +47 -0
- package/dist/cloud/engines/Engine.js +58 -0
- package/dist/cloud/engines/Engine.js.map +1 -0
- package/dist/cloud/engines/EnginesResource.d.ts +15 -0
- package/dist/cloud/engines/EnginesResource.js +42 -0
- package/dist/cloud/engines/EnginesResource.js.map +1 -0
- package/dist/cloud/engines/utils.d.ts +17 -0
- package/dist/cloud/engines/utils.js +59 -0
- package/dist/cloud/engines/utils.js.map +1 -0
- package/dist/cloud/index.d.ts +487 -0
- package/dist/cloud/index.js +47 -0
- package/dist/cloud/index.js.map +1 -0
- package/dist/cloud/interfaces.d.ts +13 -0
- package/dist/cloud/interfaces.js +18 -0
- package/dist/cloud/interfaces.js.map +1 -0
- package/dist/cloud/oauth/OAuthApplication.d.ts +26 -0
- package/dist/cloud/oauth/OAuthApplication.js +49 -0
- package/dist/cloud/oauth/OAuthApplication.js.map +1 -0
- package/dist/cloud/oauth/OAuthApplicationsResource.d.ts +15 -0
- package/dist/cloud/oauth/OAuthApplicationsResource.js +66 -0
- package/dist/cloud/oauth/OAuthApplicationsResource.js.map +1 -0
- package/dist/cloud/oauth/oauth.d.ts +32 -0
- package/dist/cloud/oauth/oauth.js +57 -0
- package/dist/cloud/oauth/oauth.js.map +1 -0
- package/dist/cloud/projects/Project.d.ts +49 -0
- package/dist/cloud/projects/Project.js +61 -0
- package/dist/cloud/projects/Project.js.map +1 -0
- package/dist/cloud/projects/ProjectsResource.d.ts +17 -0
- package/dist/cloud/projects/ProjectsResource.js +50 -0
- package/dist/cloud/projects/ProjectsResource.js.map +1 -0
- package/dist/cloud/projects/projectApiMethods.d.ts +9 -0
- package/dist/cloud/projects/projectApiMethods.js +43 -0
- package/dist/cloud/projects/projectApiMethods.js.map +1 -0
- package/dist/cloud/projects/utils.d.ts +2 -0
- package/dist/cloud/projects/utils.js +37 -0
- package/dist/cloud/projects/utils.js.map +1 -0
- package/dist/cloud/resources.d.ts +472 -0
- package/dist/cloud/resources.js +41 -0
- package/dist/cloud/resources.js.map +1 -0
- package/dist/cloud/users/CloudUser.d.ts +4 -0
- package/dist/cloud/users/CloudUser.js +27 -0
- package/dist/cloud/users/CloudUser.js.map +1 -0
- package/dist/cloud/users/CloudUsersResource.d.ts +13 -0
- package/dist/cloud/users/CloudUsersResource.js +37 -0
- package/dist/cloud/users/CloudUsersResource.js.map +1 -0
- package/dist/common/Config.d.ts +54 -0
- package/dist/common/Config.js +17 -0
- package/dist/common/Config.js.map +1 -0
- package/dist/common/CredentialProvider.d.ts +4 -0
- package/dist/common/CredentialProvider.js +17 -0
- package/dist/common/CredentialProvider.js.map +1 -0
- package/dist/common/HttpError.d.ts +21 -0
- package/dist/common/HttpError.js +74 -0
- package/dist/common/HttpError.js.map +1 -0
- package/dist/common/Params.d.ts +16 -0
- package/dist/common/Params.js +17 -0
- package/dist/common/Params.js.map +1 -0
- package/dist/common/Problem.d.ts +45 -0
- package/dist/common/Problem.js +37 -0
- package/dist/common/Problem.js.map +1 -0
- package/dist/common/Query.d.ts +6 -0
- package/dist/common/Query.js +30 -0
- package/dist/common/Query.js.map +1 -0
- package/dist/common/batch.d.ts +2 -0
- package/dist/common/batch.js +42 -0
- package/dist/common/batch.js.map +1 -0
- package/dist/common/createRequest.d.ts +6 -0
- package/dist/common/createRequest.js +71 -0
- package/dist/common/createRequest.js.map +1 -0
- package/dist/common/fromAbortable.d.ts +4 -0
- package/dist/common/fromAbortable.js +35 -0
- package/dist/common/fromAbortable.js.map +1 -0
- package/dist/common/problems.d.ts +9 -0
- package/dist/common/problems.js +25 -0
- package/dist/common/problems.js.map +1 -0
- package/dist/common/sharedExports.d.ts +5 -0
- package/dist/common/sharedExports.js +21 -0
- package/dist/common/sharedExports.js.map +1 -0
- package/dist/enterprise/Grantee.d.ts +9 -0
- package/dist/enterprise/Grantee.js +17 -0
- package/dist/enterprise/Grantee.js.map +1 -0
- package/dist/enterprise/Ownable.d.ts +7 -0
- package/dist/enterprise/Ownable.js +17 -0
- package/dist/enterprise/Ownable.js.map +1 -0
- package/dist/enterprise/catalog/CatalogLineage.d.ts +37 -0
- package/dist/enterprise/catalog/CatalogLineage.js +26 -0
- package/dist/enterprise/catalog/CatalogLineage.js.map +1 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseDatasetCatalogObject.d.ts +39 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseDatasetCatalogObject.js +45 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseDatasetCatalogObject.js.map +1 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseFileCatalogObject.d.ts +6 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseFileCatalogObject.js +22 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseFileCatalogObject.js.map +1 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseFolderCatalogObject.d.ts +7 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseFolderCatalogObject.js +25 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseFolderCatalogObject.js.map +1 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseFunctionCatalogObject.d.ts +6 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseFunctionCatalogObject.js +22 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseFunctionCatalogObject.js.map +1 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseHomeCatalogObject.d.ts +6 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseHomeCatalogObject.js +22 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseHomeCatalogObject.js.map +1 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseSourceCatalogObject.d.ts +46 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseSourceCatalogObject.js +44 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseSourceCatalogObject.js.map +1 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseSpaceCatalogObject.d.ts +6 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseSpaceCatalogObject.js +22 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseSpaceCatalogObject.js.map +1 -0
- package/dist/enterprise/catalog/CatalogObjects/index.d.ts +10 -0
- package/dist/enterprise/catalog/CatalogObjects/index.js +17 -0
- package/dist/enterprise/catalog/CatalogObjects/index.js.map +1 -0
- package/dist/enterprise/catalog/CatalogReferences/EnterpriseDatasetCatalogReference.d.ts +14 -0
- package/dist/enterprise/catalog/CatalogReferences/EnterpriseDatasetCatalogReference.js +28 -0
- package/dist/enterprise/catalog/CatalogReferences/EnterpriseDatasetCatalogReference.js.map +1 -0
- package/dist/enterprise/catalog/CatalogReferences/EnterpriseFileCatalogReference.d.ts +3 -0
- package/dist/enterprise/catalog/CatalogReferences/EnterpriseFileCatalogReference.js +19 -0
- package/dist/enterprise/catalog/CatalogReferences/EnterpriseFileCatalogReference.js.map +1 -0
- package/dist/enterprise/catalog/CatalogReferences/EnterpriseFolderCatalogReference.d.ts +12 -0
- package/dist/enterprise/catalog/CatalogReferences/EnterpriseFolderCatalogReference.js +28 -0
- package/dist/enterprise/catalog/CatalogReferences/EnterpriseFolderCatalogReference.js.map +1 -0
- package/dist/enterprise/catalog/CatalogReferences/EnterpriseFunctionCatalogReference.d.ts +3 -0
- package/dist/enterprise/catalog/CatalogReferences/EnterpriseFunctionCatalogReference.js +19 -0
- package/dist/enterprise/catalog/CatalogReferences/EnterpriseFunctionCatalogReference.js.map +1 -0
- package/dist/enterprise/catalog/CatalogReferences/EnterpriseHomeCatalogReference.d.ts +3 -0
- package/dist/enterprise/catalog/CatalogReferences/EnterpriseHomeCatalogReference.js +19 -0
- package/dist/enterprise/catalog/CatalogReferences/EnterpriseHomeCatalogReference.js.map +1 -0
- package/dist/enterprise/catalog/CatalogReferences/EnterpriseSourceCatalogReference.d.ts +12 -0
- package/dist/enterprise/catalog/CatalogReferences/EnterpriseSourceCatalogReference.js +28 -0
- package/dist/enterprise/catalog/CatalogReferences/EnterpriseSourceCatalogReference.js.map +1 -0
- package/dist/enterprise/catalog/CatalogReferences/EnterpriseSpaceCatalogReference.d.ts +3 -0
- package/dist/enterprise/catalog/CatalogReferences/EnterpriseSpaceCatalogReference.js +19 -0
- package/dist/enterprise/catalog/CatalogReferences/EnterpriseSpaceCatalogReference.js.map +1 -0
- package/dist/enterprise/catalog/CatalogReferences/index.d.ts +9 -0
- package/dist/enterprise/catalog/CatalogReferences/index.js +17 -0
- package/dist/enterprise/catalog/CatalogReferences/index.js.map +1 -0
- package/dist/enterprise/catalog/CatalogReferences/retrieveCatalogGrants.d.ts +15 -0
- package/dist/enterprise/catalog/CatalogReferences/retrieveCatalogGrants.js +30 -0
- package/dist/enterprise/catalog/CatalogReferences/retrieveCatalogGrants.js.map +1 -0
- package/dist/enterprise/catalog/EnterpriseCatalogResource.d.ts +10 -0
- package/dist/enterprise/catalog/EnterpriseCatalogResource.js +38 -0
- package/dist/enterprise/catalog/EnterpriseCatalogResource.js.map +1 -0
- package/dist/enterprise/catalog/catalogObjectFromEntity.d.ts +3 -0
- package/dist/enterprise/catalog/catalogObjectFromEntity.js +73 -0
- package/dist/enterprise/catalog/catalogObjectFromEntity.js.map +1 -0
- package/dist/enterprise/catalog/catalogReferenceFromProperties.d.ts +6 -0
- package/dist/enterprise/catalog/catalogReferenceFromProperties.js +46 -0
- package/dist/enterprise/catalog/catalogReferenceFromProperties.js.map +1 -0
- package/dist/enterprise/catalog/catalogRetrieve.d.ts +5 -0
- package/dist/enterprise/catalog/catalogRetrieve.js +119 -0
- package/dist/enterprise/catalog/catalogRetrieve.js.map +1 -0
- package/dist/enterprise/credentials/exchangePat.d.ts +12 -0
- package/dist/enterprise/credentials/exchangePat.js +55 -0
- package/dist/enterprise/credentials/exchangePat.js.map +1 -0
- package/dist/enterprise/credentials/fromPat.d.ts +2 -0
- package/dist/enterprise/credentials/fromPat.js +36 -0
- package/dist/enterprise/credentials/fromPat.js.map +1 -0
- package/dist/enterprise/credentials/index.d.ts +2 -0
- package/dist/enterprise/credentials/index.js +18 -0
- package/dist/enterprise/credentials/index.js.map +1 -0
- package/dist/enterprise/engines/Engine.d.ts +78 -0
- package/dist/enterprise/engines/Engine.js +75 -0
- package/dist/enterprise/engines/Engine.js.map +1 -0
- package/dist/enterprise/engines/EnginesResource.d.ts +10 -0
- package/dist/enterprise/engines/EnginesResource.js +34 -0
- package/dist/enterprise/engines/EnginesResource.js.map +1 -0
- package/dist/enterprise/index.d.ts +60 -0
- package/dist/enterprise/index.js +43 -0
- package/dist/enterprise/index.js.map +1 -0
- package/dist/enterprise/interfaces.d.ts +12 -0
- package/dist/enterprise/interfaces.js +18 -0
- package/dist/enterprise/interfaces.js.map +1 -0
- package/dist/enterprise/reflections/ReflectionSummary.d.ts +74 -0
- package/dist/enterprise/reflections/ReflectionSummary.js +82 -0
- package/dist/enterprise/reflections/ReflectionSummary.js.map +1 -0
- package/dist/enterprise/resources.d.ts +44 -0
- package/dist/enterprise/resources.js +36 -0
- package/dist/enterprise/resources.js.map +1 -0
- package/dist/enterprise/roles/Role.d.ts +23 -0
- package/dist/enterprise/roles/Role.js +38 -0
- package/dist/enterprise/roles/Role.js.map +1 -0
- package/dist/enterprise/roles/RolesResource.d.ts +8 -0
- package/dist/enterprise/roles/RolesResource.js +32 -0
- package/dist/enterprise/roles/RolesResource.js.map +1 -0
- package/dist/enterprise/scripts/EnterpriseScript.d.ts +46 -0
- package/dist/enterprise/scripts/EnterpriseScript.js +62 -0
- package/dist/enterprise/scripts/EnterpriseScript.js.map +1 -0
- package/dist/enterprise/scripts/EnterpriseScriptsResource.d.ts +15 -0
- package/dist/enterprise/scripts/EnterpriseScriptsResource.js +72 -0
- package/dist/enterprise/scripts/EnterpriseScriptsResource.js.map +1 -0
- package/dist/enterprise/users/EnterpriseUser.d.ts +23 -0
- package/dist/enterprise/users/EnterpriseUser.js +43 -0
- package/dist/enterprise/users/EnterpriseUser.js.map +1 -0
- package/dist/enterprise/users/EnterpriseUsersResource.d.ts +11 -0
- package/dist/enterprise/users/EnterpriseUsersResource.js +32 -0
- package/dist/enterprise/users/EnterpriseUsersResource.js.map +1 -0
- package/dist/oss/catalog/CatalogObjects/DatasetCatalogObject.d.ts +43 -0
- package/dist/oss/catalog/CatalogObjects/DatasetCatalogObject.js +56 -0
- package/dist/oss/catalog/CatalogObjects/DatasetCatalogObject.js.map +1 -0
- package/dist/oss/catalog/CatalogObjects/FileCatalogObject.d.ts +17 -0
- package/dist/oss/catalog/CatalogObjects/FileCatalogObject.js +48 -0
- package/dist/oss/catalog/CatalogObjects/FileCatalogObject.js.map +1 -0
- package/dist/oss/catalog/CatalogObjects/FolderCatalogObject.d.ts +20 -0
- package/dist/oss/catalog/CatalogObjects/FolderCatalogObject.js +48 -0
- package/dist/oss/catalog/CatalogObjects/FolderCatalogObject.js.map +1 -0
- package/dist/oss/catalog/CatalogObjects/FunctionCatalogObject.d.ts +17 -0
- package/dist/oss/catalog/CatalogObjects/FunctionCatalogObject.js +47 -0
- package/dist/oss/catalog/CatalogObjects/FunctionCatalogObject.js.map +1 -0
- package/dist/oss/catalog/CatalogObjects/HomeCatalogObject.d.ts +18 -0
- package/dist/oss/catalog/CatalogObjects/HomeCatalogObject.js +48 -0
- package/dist/oss/catalog/CatalogObjects/HomeCatalogObject.js.map +1 -0
- package/dist/oss/catalog/CatalogObjects/SourceCatalogObject.d.ts +60 -0
- package/dist/oss/catalog/CatalogObjects/SourceCatalogObject.js +95 -0
- package/dist/oss/catalog/CatalogObjects/SourceCatalogObject.js.map +1 -0
- package/dist/oss/catalog/CatalogObjects/SpaceCatalogObject.d.ts +19 -0
- package/dist/oss/catalog/CatalogObjects/SpaceCatalogObject.js +53 -0
- package/dist/oss/catalog/CatalogObjects/SpaceCatalogObject.js.map +1 -0
- package/dist/oss/catalog/CatalogObjects/VersionedDatasetCatalogObject.d.ts +31 -0
- package/dist/oss/catalog/CatalogObjects/VersionedDatasetCatalogObject.js +58 -0
- package/dist/oss/catalog/CatalogObjects/VersionedDatasetCatalogObject.js.map +1 -0
- package/dist/oss/catalog/CatalogObjects/index.d.ts +10 -0
- package/dist/oss/catalog/CatalogObjects/index.js +17 -0
- package/dist/oss/catalog/CatalogObjects/index.js.map +1 -0
- package/dist/oss/catalog/CatalogObjects/utils/catalogObjectFromEntity.d.ts +11 -0
- package/dist/oss/catalog/CatalogObjects/utils/catalogObjectFromEntity.js +73 -0
- package/dist/oss/catalog/CatalogObjects/utils/catalogObjectFromEntity.js.map +1 -0
- package/dist/oss/catalog/CatalogReferences/BaseCatalogReference.d.ts +16 -0
- package/dist/oss/catalog/CatalogReferences/BaseCatalogReference.js +34 -0
- package/dist/oss/catalog/CatalogReferences/BaseCatalogReference.js.map +1 -0
- package/dist/oss/catalog/CatalogReferences/DatasetCatalogReference.d.ts +17 -0
- package/dist/oss/catalog/CatalogReferences/DatasetCatalogReference.js +39 -0
- package/dist/oss/catalog/CatalogReferences/DatasetCatalogReference.js.map +1 -0
- package/dist/oss/catalog/CatalogReferences/FileCatalogReference.d.ts +9 -0
- package/dist/oss/catalog/CatalogReferences/FileCatalogReference.js +28 -0
- package/dist/oss/catalog/CatalogReferences/FileCatalogReference.js.map +1 -0
- package/dist/oss/catalog/CatalogReferences/FolderCatalogReference.d.ts +22 -0
- package/dist/oss/catalog/CatalogReferences/FolderCatalogReference.js +40 -0
- package/dist/oss/catalog/CatalogReferences/FolderCatalogReference.js.map +1 -0
- package/dist/oss/catalog/CatalogReferences/FunctionCatalogReference.d.ts +9 -0
- package/dist/oss/catalog/CatalogReferences/FunctionCatalogReference.js +28 -0
- package/dist/oss/catalog/CatalogReferences/FunctionCatalogReference.js.map +1 -0
- package/dist/oss/catalog/CatalogReferences/HomeCatalogReference.d.ts +20 -0
- package/dist/oss/catalog/CatalogReferences/HomeCatalogReference.js +38 -0
- package/dist/oss/catalog/CatalogReferences/HomeCatalogReference.js.map +1 -0
- package/dist/oss/catalog/CatalogReferences/SourceCatalogReference.d.ts +24 -0
- package/dist/oss/catalog/CatalogReferences/SourceCatalogReference.js +61 -0
- package/dist/oss/catalog/CatalogReferences/SourceCatalogReference.js.map +1 -0
- package/dist/oss/catalog/CatalogReferences/SpaceCatalogReference.d.ts +20 -0
- package/dist/oss/catalog/CatalogReferences/SpaceCatalogReference.js +38 -0
- package/dist/oss/catalog/CatalogReferences/SpaceCatalogReference.js.map +1 -0
- package/dist/oss/catalog/CatalogReferences/index.d.ts +9 -0
- package/dist/oss/catalog/CatalogReferences/index.js +17 -0
- package/dist/oss/catalog/CatalogReferences/index.js.map +1 -0
- package/dist/oss/catalog/CatalogReferences/utils/catalogChildren.d.ts +14 -0
- package/dist/oss/catalog/CatalogReferences/utils/catalogChildren.js +62 -0
- package/dist/oss/catalog/CatalogReferences/utils/catalogChildren.js.map +1 -0
- package/dist/oss/catalog/CatalogReferences/utils/catalogReferenceEntityToProperties.d.ts +1 -0
- package/dist/oss/catalog/CatalogReferences/utils/catalogReferenceEntityToProperties.js +42 -0
- package/dist/oss/catalog/CatalogReferences/utils/catalogReferenceEntityToProperties.js.map +1 -0
- package/dist/oss/catalog/CatalogReferences/utils/catalogReferenceFromProperties.d.ts +6 -0
- package/dist/oss/catalog/CatalogReferences/utils/catalogReferenceFromProperties.js +45 -0
- package/dist/oss/catalog/CatalogReferences/utils/catalogReferenceFromProperties.js.map +1 -0
- package/dist/oss/catalog/CatalogReferences/utils/getTags.d.ts +5 -0
- package/dist/oss/catalog/CatalogReferences/utils/getTags.js +23 -0
- package/dist/oss/catalog/CatalogReferences/utils/getTags.js.map +1 -0
- package/dist/oss/catalog/CatalogReferences/utils/getWiki.d.ts +5 -0
- package/dist/oss/catalog/CatalogReferences/utils/getWiki.js +23 -0
- package/dist/oss/catalog/CatalogReferences/utils/getWiki.js.map +1 -0
- package/dist/oss/catalog/CatalogResource.d.ts +10 -0
- package/dist/oss/catalog/CatalogResource.js +38 -0
- package/dist/oss/catalog/CatalogResource.js.map +1 -0
- package/dist/oss/catalog/CatalogTags.d.ts +26 -0
- package/dist/oss/catalog/CatalogTags.js +60 -0
- package/dist/oss/catalog/CatalogTags.js.map +1 -0
- package/dist/oss/catalog/CatalogWiki.d.ts +26 -0
- package/dist/oss/catalog/CatalogWiki.js +60 -0
- package/dist/oss/catalog/CatalogWiki.js.map +1 -0
- package/dist/oss/catalog/VersionReference.d.ts +13 -0
- package/dist/oss/catalog/VersionReference.js +19 -0
- package/dist/oss/catalog/VersionReference.js.map +1 -0
- package/dist/oss/catalog/catalogErrors.d.ts +18 -0
- package/dist/oss/catalog/catalogErrors.js +36 -0
- package/dist/oss/catalog/catalogErrors.js.map +1 -0
- package/dist/oss/catalog/catalogRetrieve.d.ts +6 -0
- package/dist/oss/catalog/catalogRetrieve.js +119 -0
- package/dist/oss/catalog/catalogRetrieve.js.map +1 -0
- package/dist/oss/credentials/fromUsernamePassword.d.ts +2 -0
- package/dist/oss/credentials/fromUsernamePassword.js +41 -0
- package/dist/oss/credentials/fromUsernamePassword.js.map +1 -0
- package/dist/oss/credentials/index.d.ts +1 -0
- package/dist/oss/credentials/index.js +17 -0
- package/dist/oss/credentials/index.js.map +1 -0
- package/dist/oss/index.d.ts +55 -0
- package/dist/oss/index.js +42 -0
- package/dist/oss/index.js.map +1 -0
- package/dist/oss/interfaces.d.ts +8 -0
- package/dist/oss/interfaces.js +18 -0
- package/dist/oss/interfaces.js.map +1 -0
- package/dist/oss/jobs/Job.d.ts +71 -0
- package/dist/oss/jobs/Job.js +133 -0
- package/dist/oss/jobs/Job.js.map +1 -0
- package/dist/oss/jobs/JobsResource.d.ts +10 -0
- package/dist/oss/jobs/JobsResource.js +74 -0
- package/dist/oss/jobs/JobsResource.js.map +1 -0
- package/dist/oss/jobs/utils/JobResultsResponse.d.ts +85 -0
- package/dist/oss/jobs/utils/JobResultsResponse.js +17 -0
- package/dist/oss/jobs/utils/JobResultsResponse.js.map +1 -0
- package/dist/oss/jobs/utils/createArrayForFieldType.d.ts +2 -0
- package/dist/oss/jobs/utils/createArrayForFieldType.js +55 -0
- package/dist/oss/jobs/utils/createArrayForFieldType.js.map +1 -0
- package/dist/oss/jobs/utils/createColumnRecordFromSchema.d.ts +2 -0
- package/dist/oss/jobs/utils/createColumnRecordFromSchema.js +21 -0
- package/dist/oss/jobs/utils/createColumnRecordFromSchema.js.map +1 -0
- package/dist/oss/jobs/utils/mapRowData.d.ts +3 -0
- package/dist/oss/jobs/utils/mapRowData.js +46 -0
- package/dist/oss/jobs/utils/mapRowData.js.map +1 -0
- package/dist/oss/jobs/utils/mapRowsToColumns.d.ts +2 -0
- package/dist/oss/jobs/utils/mapRowsToColumns.js +27 -0
- package/dist/oss/jobs/utils/mapRowsToColumns.js.map +1 -0
- package/dist/oss/reflections/Reflection.d.ts +60 -0
- package/dist/oss/reflections/Reflection.js +41 -0
- package/dist/oss/reflections/Reflection.js.map +1 -0
- package/dist/oss/resources.d.ts +38 -0
- package/dist/oss/resources.js +30 -0
- package/dist/oss/resources.js.map +1 -0
- package/dist/oss/scripts/Script.d.ts +64 -0
- package/dist/oss/scripts/Script.js +94 -0
- package/dist/oss/scripts/Script.js.map +1 -0
- package/dist/oss/scripts/ScriptErrors.d.ts +19 -0
- package/dist/oss/scripts/ScriptErrors.js +37 -0
- package/dist/oss/scripts/ScriptErrors.js.map +1 -0
- package/dist/oss/scripts/ScriptsResource.d.ts +15 -0
- package/dist/oss/scripts/ScriptsResource.js +72 -0
- package/dist/oss/scripts/ScriptsResource.js.map +1 -0
- package/dist/oss/users/User.d.ts +30 -0
- package/dist/oss/users/User.js +60 -0
- package/dist/oss/users/User.js.map +1 -0
- package/dist/oss/users/UsersResource.d.ts +11 -0
- package/dist/oss/users/UsersResource.js +32 -0
- package/dist/oss/users/UsersResource.js.map +1 -0
- package/package.json +70 -0
|
@@ -0,0 +1,45 @@
|
|
|
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 { DatasetCatalogReference } from "../DatasetCatalogReference.js";
|
|
17
|
+
import { FileCatalogReference } from "../FileCatalogReference.js";
|
|
18
|
+
import { FolderCatalogReference } from "../FolderCatalogReference.js";
|
|
19
|
+
import { FunctionCatalogReference } from "../FunctionCatalogReference.js";
|
|
20
|
+
import { HomeCatalogReference } from "../HomeCatalogReference.js";
|
|
21
|
+
import { SourceCatalogReference } from "../SourceCatalogReference.js";
|
|
22
|
+
import { SpaceCatalogReference } from "../SpaceCatalogReference.js";
|
|
23
|
+
export const catalogReferenceFromProperties = (properties, config, retrieveByPath) => {
|
|
24
|
+
switch (properties.type) {
|
|
25
|
+
case "DATASET_DIRECT":
|
|
26
|
+
case "DATASET_PROMOTED":
|
|
27
|
+
case "DATASET_VIRTUAL":
|
|
28
|
+
return new DatasetCatalogReference(properties, retrieveByPath, config);
|
|
29
|
+
case "FILE":
|
|
30
|
+
return new FileCatalogReference(properties, retrieveByPath);
|
|
31
|
+
case "FOLDER":
|
|
32
|
+
return new FolderCatalogReference(properties, config, retrieveByPath);
|
|
33
|
+
case "FUNCTION":
|
|
34
|
+
return new FunctionCatalogReference(properties, retrieveByPath);
|
|
35
|
+
case "HOME":
|
|
36
|
+
return new HomeCatalogReference(properties, config, retrieveByPath);
|
|
37
|
+
case "SOURCE":
|
|
38
|
+
return new SourceCatalogReference(properties, config, retrieveByPath);
|
|
39
|
+
case "SPACE":
|
|
40
|
+
return new SpaceCatalogReference(properties, config, retrieveByPath);
|
|
41
|
+
default:
|
|
42
|
+
throw new Error("Unknown catalogReference type: " + properties.type);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=catalogReferenceFromProperties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalogReferenceFromProperties.js","sourceRoot":"","sources":["../../../../../src/oss/catalog/CatalogReferences/utils/catalogReferenceFromProperties.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAGpE,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAC5C,UAA6D,EAC7D,MAAqB,EACrB,cAA8B,EACZ,EAAE;IACpB,QAAQ,UAAU,CAAC,IAAI,EAAE,CAAC;QACxB,KAAK,gBAAgB,CAAC;QACtB,KAAK,kBAAkB,CAAC;QACxB,KAAK,iBAAiB;YACpB,OAAO,IAAI,uBAAuB,CAAC,UAAiB,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;QAChF,KAAK,MAAM;YACT,OAAO,IAAI,oBAAoB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC9D,KAAK,QAAQ;YACX,OAAO,IAAI,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;QACxE,KAAK,UAAU;YACb,OAAO,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAClE,KAAK,MAAM;YACT,OAAO,IAAI,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;QACtE,KAAK,QAAQ;YACX,OAAO,IAAI,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;QACxE,KAAK,OAAO;YACV,OAAO,IAAI,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;QACvE;YACE,MAAM,IAAI,KAAK,CAAC,iCAAiC,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IACzE,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\nimport type { SonarV3Config } from \"../../../../common/Config.ts\";\nimport type { BaseCatalogReferenceProperties, RetrieveByPath } from \"../BaseCatalogReference.ts\";\nimport { DatasetCatalogReference } from \"../DatasetCatalogReference.ts\";\nimport { FileCatalogReference } from \"../FileCatalogReference.ts\";\nimport { FolderCatalogReference } from \"../FolderCatalogReference.ts\";\nimport { FunctionCatalogReference } from \"../FunctionCatalogReference.ts\";\nimport { HomeCatalogReference } from \"../HomeCatalogReference.ts\";\nimport { SourceCatalogReference } from \"../SourceCatalogReference.ts\";\nimport { SpaceCatalogReference } from \"../SpaceCatalogReference.ts\";\nimport type { CatalogReference } from \"../index.ts\";\n\nexport const catalogReferenceFromProperties = (\n properties: BaseCatalogReferenceProperties & { type: string },\n config: SonarV3Config,\n retrieveByPath: RetrieveByPath,\n): CatalogReference => {\n switch (properties.type) {\n case \"DATASET_DIRECT\":\n case \"DATASET_PROMOTED\":\n case \"DATASET_VIRTUAL\":\n return new DatasetCatalogReference(properties as any, retrieveByPath, config);\n case \"FILE\":\n return new FileCatalogReference(properties, retrieveByPath);\n case \"FOLDER\":\n return new FolderCatalogReference(properties, config, retrieveByPath);\n case \"FUNCTION\":\n return new FunctionCatalogReference(properties, retrieveByPath);\n case \"HOME\":\n return new HomeCatalogReference(properties, config, retrieveByPath);\n case \"SOURCE\":\n return new SourceCatalogReference(properties, config, retrieveByPath);\n case \"SPACE\":\n return new SpaceCatalogReference(properties, config, retrieveByPath);\n default:\n throw new Error(\"Unknown catalogReference type: \" + properties.type);\n }\n};\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Err, Ok } from "ts-results-es";
|
|
2
|
+
import type { SonarV3Config } from "../../../../common/Config.ts";
|
|
3
|
+
import { CatalogTags } from "../../CatalogTags.ts";
|
|
4
|
+
import type { CatalogReference } from "../index.ts";
|
|
5
|
+
export declare const getTags: (config: SonarV3Config, catalogReference: CatalogReference) => () => Promise<Err<unknown> | Ok<CatalogTags>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
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 { CatalogTags, catalogTagsEntityToProperties } from "../../CatalogTags.js";
|
|
18
|
+
export const getTags = (config, catalogReference) => () => config
|
|
19
|
+
.sonarV3Request(`catalog/${catalogReference.id}/collaboration/tag`)
|
|
20
|
+
.then((res) => res.json())
|
|
21
|
+
.then((entity) => Ok(new CatalogTags(catalogTagsEntityToProperties(catalogReference, entity), config)))
|
|
22
|
+
.catch((e) => Err(e));
|
|
23
|
+
//# sourceMappingURL=getTags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTags.js","sourceRoot":"","sources":["../../../../../src/oss/catalog/CatalogReferences/utils/getTags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAGlF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,MAAqB,EAAE,gBAAkC,EAAE,EAAE,CAAC,GAAG,EAAE,CACzF,MAAM;KACH,cAAc,CAAC,WAAW,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;KAClE,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;KACzB,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CACf,EAAE,CAAC,IAAI,WAAW,CAAC,6BAA6B,CAAC,gBAAgB,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CACrF;KACA,KAAK,CAAC,CAAC,CAAU,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,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 { CatalogTags, catalogTagsEntityToProperties } from \"../../CatalogTags.ts\";\nimport type { CatalogReference } from \"../index.ts\";\n\nexport const getTags = (config: SonarV3Config, catalogReference: CatalogReference) => () =>\n config\n .sonarV3Request(`catalog/${catalogReference.id}/collaboration/tag`)\n .then((res) => res.json())\n .then((entity) =>\n Ok(new CatalogTags(catalogTagsEntityToProperties(catalogReference, entity), config)),\n )\n .catch((e: unknown) => Err(e));\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Err, Ok } from "ts-results-es";
|
|
2
|
+
import type { SonarV3Config } from "../../../../common/Config.ts";
|
|
3
|
+
import { CatalogWiki } from "../../CatalogWiki.ts";
|
|
4
|
+
import type { CatalogReference } from "../index.ts";
|
|
5
|
+
export declare const getWiki: (config: SonarV3Config, catalogReference: CatalogReference) => () => Promise<Err<unknown> | Ok<CatalogWiki>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
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 { CatalogWiki, catalogWikiEntityToProperties } from "../../CatalogWiki.js";
|
|
18
|
+
export const getWiki = (config, catalogReference) => () => config
|
|
19
|
+
.sonarV3Request(`catalog/${catalogReference.id}/collaboration/wiki`)
|
|
20
|
+
.then((res) => res.json())
|
|
21
|
+
.then((entity) => Ok(new CatalogWiki(catalogWikiEntityToProperties(catalogReference, entity), config)))
|
|
22
|
+
.catch((e) => Err(e));
|
|
23
|
+
//# sourceMappingURL=getWiki.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getWiki.js","sourceRoot":"","sources":["../../../../../src/oss/catalog/CatalogReferences/utils/getWiki.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAGlF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,MAAqB,EAAE,gBAAkC,EAAE,EAAE,CAAC,GAAG,EAAE,CACzF,MAAM;KACH,cAAc,CAAC,WAAW,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;KACnE,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;KACzB,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CACf,EAAE,CAAC,IAAI,WAAW,CAAC,6BAA6B,CAAC,gBAAgB,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CACrF;KACA,KAAK,CAAC,CAAC,CAAU,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,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 { CatalogWiki, catalogWikiEntityToProperties } from \"../../CatalogWiki.ts\";\nimport type { CatalogReference } from \"../index.ts\";\n\nexport const getWiki = (config: SonarV3Config, catalogReference: CatalogReference) => () =>\n config\n .sonarV3Request(`catalog/${catalogReference.id}/collaboration/wiki`)\n .then((res) => res.json())\n .then((entity) =>\n Ok(new CatalogWiki(catalogWikiEntityToProperties(catalogReference, entity), config)),\n )\n .catch((e: unknown) => Err(e));\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SonarV3Config } from "../../common/Config.ts";
|
|
2
|
+
import type { FunctionCatalogReference, HomeCatalogReference, SourceCatalogReference, SpaceCatalogReference } from "./CatalogReferences/index.ts";
|
|
3
|
+
export declare const CatalogResource: (config: SonarV3Config) => {
|
|
4
|
+
_catalogReferenceFromEntity: (entity: unknown) => import("./CatalogReferences/index.ts").CatalogReference;
|
|
5
|
+
list: () => {
|
|
6
|
+
data(): AsyncGenerator<FunctionCatalogReference | HomeCatalogReference | SourceCatalogReference | SpaceCatalogReference, void, unknown>;
|
|
7
|
+
};
|
|
8
|
+
retrieve: (key: string) => Promise<import("ts-results-es").Result<import("./CatalogObjects/index.ts").CatalogObject, import("../index.ts").Problem>>;
|
|
9
|
+
retrieveByPath: (key: string[]) => Promise<import("ts-results-es").Result<import("./CatalogObjects/index.ts").CatalogObject, import("../index.ts").Problem>>;
|
|
10
|
+
};
|
|
@@ -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 { catalogReferenceEntityToProperties } from "./CatalogReferences/utils/catalogReferenceEntityToProperties.js";
|
|
17
|
+
import { catalogReferenceFromProperties } from "./CatalogReferences/utils/catalogReferenceFromProperties.js";
|
|
18
|
+
import { baseRetrieve, baseRetrieveByPath } from "./catalogRetrieve.js";
|
|
19
|
+
export const CatalogResource = (config) => {
|
|
20
|
+
const retrieve = baseRetrieve(config);
|
|
21
|
+
const retrieveByPath = baseRetrieveByPath(config);
|
|
22
|
+
return {
|
|
23
|
+
_catalogReferenceFromEntity: (entity) => catalogReferenceFromProperties(catalogReferenceEntityToProperties(entity), config, retrieveByPath),
|
|
24
|
+
list: () => {
|
|
25
|
+
return {
|
|
26
|
+
async *data() {
|
|
27
|
+
yield* await config
|
|
28
|
+
.sonarV3Request("catalog")
|
|
29
|
+
.then((res) => res.json())
|
|
30
|
+
.then((response) => response.data.map((entity) => catalogReferenceFromProperties(catalogReferenceEntityToProperties(entity), config, retrieveByPath)));
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
retrieve,
|
|
35
|
+
retrieveByPath,
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=CatalogResource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CatalogResource.js","sourceRoot":"","sources":["../../../src/oss/catalog/CatalogResource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,OAAO,EAAE,kCAAkC,EAAE,MAAM,iEAAiE,CAAC;AACrH,OAAO,EAAE,8BAA8B,EAAE,MAAM,6DAA6D,CAAC;AAC7G,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAExE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAAqB,EAAE,EAAE;IACvD,MAAM,QAAQ,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IACtC,MAAM,cAAc,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAElD,OAAO;QACL,2BAA2B,EAAE,CAAC,MAAe,EAAE,EAAE,CAC/C,8BAA8B,CAC5B,kCAAkC,CAAC,MAAM,CAAC,EAC1C,MAAM,EACN,cAAc,CACf;QACH,IAAI,EAAE,GAAG,EAAE;YACT,OAAO;gBACL,KAAK,CAAC,CAAC,IAAI;oBACT,KAAK,CAAC,CAAC,MAAM,MAAM;yBAChB,cAAc,CAAC,SAAS,CAAC;yBACzB,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;yBACzB,IAAI,CAAC,CAAC,QAA6B,EAAE,EAAE,CACtC,QAAQ,CAAC,IAAI,CAAC,GAAG,CACf,CAAC,MAAe,EAAE,EAAE,CAClB,8BAA8B,CAC5B,kCAAkC,CAAC,MAAM,CAAC,EAC1C,MAAM,EACN,cAAc,CAKS,CAC5B,CACF,CAAC;gBACN,CAAC;aACF,CAAC;QACJ,CAAC;QACD,QAAQ;QACR,cAAc;KACf,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 type { SonarV3Config } from \"../../common/Config.ts\";\nimport type {\n FunctionCatalogReference,\n HomeCatalogReference,\n SourceCatalogReference,\n SpaceCatalogReference,\n} from \"./CatalogReferences/index.ts\";\nimport { catalogReferenceEntityToProperties } from \"./CatalogReferences/utils/catalogReferenceEntityToProperties.ts\";\nimport { catalogReferenceFromProperties } from \"./CatalogReferences/utils/catalogReferenceFromProperties.ts\";\nimport { baseRetrieve, baseRetrieveByPath } from \"./catalogRetrieve.ts\";\n\nexport const CatalogResource = (config: SonarV3Config) => {\n const retrieve = baseRetrieve(config);\n const retrieveByPath = baseRetrieveByPath(config);\n\n return {\n _catalogReferenceFromEntity: (entity: unknown) =>\n catalogReferenceFromProperties(\n catalogReferenceEntityToProperties(entity),\n config,\n retrieveByPath,\n ),\n list: () => {\n return {\n async *data() {\n yield* await config\n .sonarV3Request(\"catalog\")\n .then((res) => res.json())\n .then((response: { data: unknown[] }) =>\n response.data.map(\n (entity: unknown) =>\n catalogReferenceFromProperties(\n catalogReferenceEntityToProperties(entity),\n config,\n retrieveByPath,\n ) as\n | FunctionCatalogReference\n | HomeCatalogReference\n | SourceCatalogReference\n | SpaceCatalogReference,\n ),\n );\n },\n };\n },\n retrieve,\n retrieveByPath,\n };\n};\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Err, Ok } from "ts-results-es";
|
|
2
|
+
import type { SonarV3Config } from "../../common/Config.ts";
|
|
3
|
+
import type { CatalogReference } from "../interfaces.ts";
|
|
4
|
+
import { HttpError } from "../../common/HttpError.ts";
|
|
5
|
+
export declare class CatalogTags {
|
|
6
|
+
#private;
|
|
7
|
+
readonly catalogReference: CatalogReference;
|
|
8
|
+
readonly tags: string[];
|
|
9
|
+
constructor(properties: CatalogTagsProperties, config: SonarV3Config);
|
|
10
|
+
update(properties: {
|
|
11
|
+
tags: string[];
|
|
12
|
+
}): Promise<Err<{
|
|
13
|
+
readonly title: "The version of the provided resource is older than the stored version";
|
|
14
|
+
readonly type: "https://api.dremio.dev/problems/version-conflict";
|
|
15
|
+
}> | Err<HttpError> | Ok<CatalogTags>>;
|
|
16
|
+
}
|
|
17
|
+
export declare const catalogTagsEntityToProperties: (catalogReference: CatalogReference, entity: {
|
|
18
|
+
tags: string[];
|
|
19
|
+
version: number;
|
|
20
|
+
}) => {
|
|
21
|
+
catalogReference: CatalogReference;
|
|
22
|
+
tags: string[];
|
|
23
|
+
version: number;
|
|
24
|
+
};
|
|
25
|
+
type CatalogTagsProperties = ReturnType<typeof catalogTagsEntityToProperties>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
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 { HttpError } from "../../common/HttpError.js";
|
|
18
|
+
import { versionConflictError } from "../../common/problems.js";
|
|
19
|
+
export class CatalogTags {
|
|
20
|
+
catalogReference;
|
|
21
|
+
tags;
|
|
22
|
+
#version;
|
|
23
|
+
#config;
|
|
24
|
+
constructor(properties, config) {
|
|
25
|
+
this.catalogReference = properties.catalogReference;
|
|
26
|
+
this.tags = properties.tags;
|
|
27
|
+
this.#version = properties.version;
|
|
28
|
+
this.#config = config;
|
|
29
|
+
}
|
|
30
|
+
update(properties) {
|
|
31
|
+
return this.#config
|
|
32
|
+
.sonarV3Request(`catalog/${this.catalogReference.id}/collaboration/tag`, {
|
|
33
|
+
body: JSON.stringify({
|
|
34
|
+
tags: properties.tags,
|
|
35
|
+
version: this.#version,
|
|
36
|
+
}),
|
|
37
|
+
headers: {
|
|
38
|
+
"Content-Type": "application/json",
|
|
39
|
+
},
|
|
40
|
+
keepalive: true,
|
|
41
|
+
method: "POST",
|
|
42
|
+
})
|
|
43
|
+
.then((res) => res.json())
|
|
44
|
+
.then((entity) => Ok(new CatalogTags(catalogTagsEntityToProperties(this.catalogReference, entity), this.#config)))
|
|
45
|
+
.catch((e) => {
|
|
46
|
+
if (e instanceof HttpError) {
|
|
47
|
+
if (e.status === 409) {
|
|
48
|
+
return Err(versionConflictError);
|
|
49
|
+
}
|
|
50
|
+
return Err(e);
|
|
51
|
+
}
|
|
52
|
+
throw e;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export const catalogTagsEntityToProperties = (catalogReference, entity) => ({
|
|
57
|
+
...entity,
|
|
58
|
+
catalogReference,
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=CatalogTags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CatalogTags.js","sourceRoot":"","sources":["../../../src/oss/catalog/CatalogTags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,OAAO,WAAW;IACb,gBAAgB,CAAmB;IACnC,IAAI,CAAW;IAExB,QAAQ,CAAmC;IAC3C,OAAO,CAAgB;IAEvB,YAAY,UAAiC,EAAE,MAAqB;QAClE,IAAI,CAAC,gBAAgB,GAAG,UAAU,CAAC,gBAAgB,CAAC;QACpD,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,MAAM,CAAC,UAA8B;QACnC,OAAO,IAAI,CAAC,OAAO;aAChB,cAAc,CAAC,WAAW,IAAI,CAAC,gBAAgB,CAAC,EAAE,oBAAoB,EAAE;YACvE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACnB,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,OAAO,EAAE,IAAI,CAAC,QAAQ;aACvB,CAAC;YACF,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;aACnC;YACD,SAAS,EAAE,IAAI;YACf,MAAM,EAAE,MAAM;SACf,CAAC;aACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;aACzB,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CACf,EAAE,CACA,IAAI,WAAW,CACb,6BAA6B,CAAC,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,EAC5D,IAAI,CAAC,OAAO,CACb,CACF,CACF;aACA,KAAK,CAAC,CAAC,CAAU,EAAE,EAAE;YACpB,IAAI,CAAC,YAAY,SAAS,EAAE,CAAC;gBAC3B,IAAI,CAAC,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;oBACrB,OAAO,GAAG,CAAC,oBAAoB,CAAC,CAAC;gBACnC,CAAC;gBACD,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;YAChB,CAAC;YACD,MAAM,CAAC,CAAC;QACV,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AAED,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAC3C,gBAAkC,EAClC,MAGC,EACD,EAAE,CAAC,CAAC;IACJ,GAAG,MAAM;IACT,gBAAgB;CACjB,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 { CatalogReference } from \"../interfaces.ts\";\nimport { HttpError } from \"../../common/HttpError.ts\";\nimport { versionConflictError } from \"../../common/problems.ts\";\n\nexport class CatalogTags {\n readonly catalogReference: CatalogReference;\n readonly tags: string[];\n\n #version: CatalogTagsProperties[\"version\"];\n #config: SonarV3Config;\n\n constructor(properties: CatalogTagsProperties, config: SonarV3Config) {\n this.catalogReference = properties.catalogReference;\n this.tags = properties.tags;\n this.#version = properties.version;\n this.#config = config;\n }\n\n update(properties: { tags: string[] }) {\n return this.#config\n .sonarV3Request(`catalog/${this.catalogReference.id}/collaboration/tag`, {\n body: JSON.stringify({\n tags: properties.tags,\n version: this.#version,\n }),\n headers: {\n \"Content-Type\": \"application/json\",\n },\n keepalive: true,\n method: \"POST\",\n })\n .then((res) => res.json())\n .then((entity) =>\n Ok(\n new CatalogTags(\n catalogTagsEntityToProperties(this.catalogReference, entity),\n this.#config,\n ),\n ),\n )\n .catch((e: unknown) => {\n if (e instanceof HttpError) {\n if (e.status === 409) {\n return Err(versionConflictError);\n }\n return Err(e);\n }\n throw e;\n });\n }\n}\n\nexport const catalogTagsEntityToProperties = (\n catalogReference: CatalogReference,\n entity: {\n tags: string[];\n version: number;\n },\n) => ({\n ...entity,\n catalogReference,\n});\n\ntype CatalogTagsProperties = ReturnType<typeof catalogTagsEntityToProperties>;\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Err, Ok } from "ts-results-es";
|
|
2
|
+
import type { SonarV3Config } from "../../common/Config.ts";
|
|
3
|
+
import type { CatalogReference } from "../interfaces.ts";
|
|
4
|
+
import { HttpError } from "../../common/HttpError.ts";
|
|
5
|
+
export declare class CatalogWiki {
|
|
6
|
+
#private;
|
|
7
|
+
readonly catalogReference: CatalogReference;
|
|
8
|
+
readonly text: CatalogWikiProperties["text"];
|
|
9
|
+
constructor(properties: CatalogWikiProperties, config: SonarV3Config);
|
|
10
|
+
update(properties: {
|
|
11
|
+
text: string;
|
|
12
|
+
}): Promise<Ok<CatalogWiki> | Err<{
|
|
13
|
+
readonly title: "The version of the provided resource is older than the stored version";
|
|
14
|
+
readonly type: "https://api.dremio.dev/problems/version-conflict";
|
|
15
|
+
}> | Err<HttpError>>;
|
|
16
|
+
}
|
|
17
|
+
export declare const catalogWikiEntityToProperties: (catalogReference: CatalogReference, entity: {
|
|
18
|
+
text: string;
|
|
19
|
+
version: number;
|
|
20
|
+
}) => {
|
|
21
|
+
catalogReference: CatalogReference;
|
|
22
|
+
text: string;
|
|
23
|
+
version: number;
|
|
24
|
+
};
|
|
25
|
+
type CatalogWikiProperties = ReturnType<typeof catalogWikiEntityToProperties>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
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 { HttpError } from "../../common/HttpError.js";
|
|
18
|
+
import { versionConflictError } from "../../common/problems.js";
|
|
19
|
+
export class CatalogWiki {
|
|
20
|
+
catalogReference;
|
|
21
|
+
text;
|
|
22
|
+
#version;
|
|
23
|
+
#config;
|
|
24
|
+
constructor(properties, config) {
|
|
25
|
+
this.catalogReference = properties.catalogReference;
|
|
26
|
+
this.text = properties.text;
|
|
27
|
+
this.#version = properties.version;
|
|
28
|
+
this.#config = config;
|
|
29
|
+
}
|
|
30
|
+
update(properties) {
|
|
31
|
+
return this.#config
|
|
32
|
+
.sonarV3Request(`catalog/${this.catalogReference.id}/collaboration/wiki`, {
|
|
33
|
+
body: JSON.stringify({
|
|
34
|
+
text: properties.text,
|
|
35
|
+
version: this.#version,
|
|
36
|
+
}),
|
|
37
|
+
headers: {
|
|
38
|
+
"Content-Type": "application/json",
|
|
39
|
+
},
|
|
40
|
+
keepalive: true,
|
|
41
|
+
method: "POST",
|
|
42
|
+
})
|
|
43
|
+
.then((res) => res.json())
|
|
44
|
+
.then((entity) => Ok(new CatalogWiki(catalogWikiEntityToProperties(this.catalogReference, entity), this.#config)))
|
|
45
|
+
.catch((e) => {
|
|
46
|
+
if (e instanceof HttpError) {
|
|
47
|
+
if (e.status === 409) {
|
|
48
|
+
return Err(versionConflictError);
|
|
49
|
+
}
|
|
50
|
+
return Err(e);
|
|
51
|
+
}
|
|
52
|
+
throw e;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export const catalogWikiEntityToProperties = (catalogReference, entity) => ({
|
|
57
|
+
...entity,
|
|
58
|
+
catalogReference,
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=CatalogWiki.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CatalogWiki.js","sourceRoot":"","sources":["../../../src/oss/catalog/CatalogWiki.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,OAAO,WAAW;IACb,gBAAgB,CAAmB;IACnC,IAAI,CAAgC;IAE7C,QAAQ,CAAmC;IAC3C,OAAO,CAAgB;IAEvB,YAAY,UAAiC,EAAE,MAAqB;QAClE,IAAI,CAAC,gBAAgB,GAAG,UAAU,CAAC,gBAAgB,CAAC;QACpD,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,MAAM,CAAC,UAA4B;QACjC,OAAO,IAAI,CAAC,OAAO;aAChB,cAAc,CAAC,WAAW,IAAI,CAAC,gBAAgB,CAAC,EAAE,qBAAqB,EAAE;YACxE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACnB,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,OAAO,EAAE,IAAI,CAAC,QAAQ;aACvB,CAAC;YACF,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;aACnC;YACD,SAAS,EAAE,IAAI;YACf,MAAM,EAAE,MAAM;SACf,CAAC;aACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;aACzB,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CACf,EAAE,CACA,IAAI,WAAW,CACb,6BAA6B,CAAC,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,EAC5D,IAAI,CAAC,OAAO,CACb,CACF,CACF;aACA,KAAK,CAAC,CAAC,CAAU,EAAE,EAAE;YACpB,IAAI,CAAC,YAAY,SAAS,EAAE,CAAC;gBAC3B,IAAI,CAAC,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;oBACrB,OAAO,GAAG,CAAC,oBAAoB,CAAC,CAAC;gBACnC,CAAC;gBACD,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;YAChB,CAAC;YACD,MAAM,CAAC,CAAC;QACV,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AAED,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAC3C,gBAAkC,EAClC,MAGC,EACD,EAAE,CAAC,CAAC;IACJ,GAAG,MAAM;IACT,gBAAgB;CACjB,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 { CatalogReference } from \"../interfaces.ts\";\nimport { HttpError } from \"../../common/HttpError.ts\";\nimport { versionConflictError } from \"../../common/problems.ts\";\n\nexport class CatalogWiki {\n readonly catalogReference: CatalogReference;\n readonly text: CatalogWikiProperties[\"text\"];\n\n #version: CatalogWikiProperties[\"version\"];\n #config: SonarV3Config;\n\n constructor(properties: CatalogWikiProperties, config: SonarV3Config) {\n this.catalogReference = properties.catalogReference;\n this.text = properties.text;\n this.#version = properties.version;\n this.#config = config;\n }\n\n update(properties: { text: string }) {\n return this.#config\n .sonarV3Request(`catalog/${this.catalogReference.id}/collaboration/wiki`, {\n body: JSON.stringify({\n text: properties.text,\n version: this.#version,\n }),\n headers: {\n \"Content-Type\": \"application/json\",\n },\n keepalive: true,\n method: \"POST\",\n })\n .then((res) => res.json())\n .then((entity) =>\n Ok(\n new CatalogWiki(\n catalogWikiEntityToProperties(this.catalogReference, entity),\n this.#config,\n ),\n ),\n )\n .catch((e: unknown) => {\n if (e instanceof HttpError) {\n if (e.status === 409) {\n return Err(versionConflictError);\n }\n return Err(e);\n }\n throw e;\n });\n }\n}\n\nexport const catalogWikiEntityToProperties = (\n catalogReference: CatalogReference,\n entity: {\n text: string;\n version: number;\n },\n) => ({\n ...entity,\n catalogReference,\n});\n\ntype CatalogWikiProperties = ReturnType<typeof catalogWikiEntityToProperties>;\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type BranchHeadVersionReference = {
|
|
2
|
+
branch: string;
|
|
3
|
+
};
|
|
4
|
+
export type BareCommitVersionReference = {
|
|
5
|
+
hash: string;
|
|
6
|
+
};
|
|
7
|
+
export type TagVersionReference = {
|
|
8
|
+
tag: string;
|
|
9
|
+
};
|
|
10
|
+
export type VersionReference = BareCommitVersionReference | BranchHeadVersionReference | TagVersionReference;
|
|
11
|
+
export declare const isBranchHeadVersionReference: (versionReference: VersionReference) => versionReference is BranchHeadVersionReference;
|
|
12
|
+
export declare const isBareCommitVersionReference: (versionReference: VersionReference) => versionReference is BareCommitVersionReference;
|
|
13
|
+
export declare const isTagVersionReference: (versionReference: VersionReference) => versionReference is TagVersionReference;
|
|
@@ -0,0 +1,19 @@
|
|
|
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 isBranchHeadVersionReference = (versionReference) => !("hash" in versionReference) && "branch" in versionReference;
|
|
17
|
+
export const isBareCommitVersionReference = (versionReference) => "hash" in versionReference && !("branch" in versionReference);
|
|
18
|
+
export const isTagVersionReference = (versionReference) => "tag" in versionReference;
|
|
19
|
+
//# sourceMappingURL=VersionReference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VersionReference.js","sourceRoot":"","sources":["../../../src/oss/catalog/VersionReference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAmBH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAC1C,gBAAkC,EACc,EAAE,CAClD,CAAC,CAAC,MAAM,IAAI,gBAAgB,CAAC,IAAI,QAAQ,IAAI,gBAAgB,CAAC;AAEhE,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAC1C,gBAAkC,EACc,EAAE,CAClD,MAAM,IAAI,gBAAgB,IAAI,CAAC,CAAC,QAAQ,IAAI,gBAAgB,CAAC,CAAC;AAEhE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,gBAAkC,EACO,EAAE,CAAC,KAAK,IAAI,gBAAgB,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 type BranchHeadVersionReference = {\n branch: string;\n};\n\nexport type BareCommitVersionReference = {\n hash: string;\n};\n\nexport type TagVersionReference = {\n tag: string;\n};\n\nexport type VersionReference =\n | BareCommitVersionReference\n | BranchHeadVersionReference\n | TagVersionReference;\n\nexport const isBranchHeadVersionReference = (\n versionReference: VersionReference,\n): versionReference is BranchHeadVersionReference =>\n !(\"hash\" in versionReference) && \"branch\" in versionReference;\n\nexport const isBareCommitVersionReference = (\n versionReference: VersionReference,\n): versionReference is BareCommitVersionReference =>\n \"hash\" in versionReference && !(\"branch\" in versionReference);\n\nexport const isTagVersionReference = (\n versionReference: VersionReference,\n): versionReference is TagVersionReference => \"tag\" in versionReference;\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const emptyPathError: {
|
|
2
|
+
readonly errors: [{
|
|
3
|
+
readonly detail: "`path` parameter is required and cannot be empty";
|
|
4
|
+
readonly pointer: "#/path";
|
|
5
|
+
readonly type: "https://api.dremio.dev/problems/validation/min-length";
|
|
6
|
+
}];
|
|
7
|
+
readonly title: "There was a problem validating the content of the request";
|
|
8
|
+
readonly type: "https://api.dremio.dev/problems/validation-problem";
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Generic problem for when we don't know what specifically caused the retrieval
|
|
12
|
+
* to fail.
|
|
13
|
+
*/
|
|
14
|
+
export declare const unableToRetrieveProblem: (internalErrorMessage?: string) => {
|
|
15
|
+
readonly detail: string | undefined;
|
|
16
|
+
readonly title: "We were unable to fetch details for this catalog object";
|
|
17
|
+
readonly type: "https://api.dremio.dev/problems/catalog/failed-to-retrieve";
|
|
18
|
+
};
|
|
@@ -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
|
+
export const emptyPathError = {
|
|
17
|
+
errors: [
|
|
18
|
+
{
|
|
19
|
+
detail: "`path` parameter is required and cannot be empty",
|
|
20
|
+
pointer: "#/path",
|
|
21
|
+
type: "https://api.dremio.dev/problems/validation/min-length",
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
title: "There was a problem validating the content of the request",
|
|
25
|
+
type: "https://api.dremio.dev/problems/validation-problem",
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Generic problem for when we don't know what specifically caused the retrieval
|
|
29
|
+
* to fail.
|
|
30
|
+
*/
|
|
31
|
+
export const unableToRetrieveProblem = (internalErrorMessage) => ({
|
|
32
|
+
detail: internalErrorMessage,
|
|
33
|
+
title: "We were unable to fetch details for this catalog object",
|
|
34
|
+
type: "https://api.dremio.dev/problems/catalog/failed-to-retrieve",
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=catalogErrors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalogErrors.js","sourceRoot":"","sources":["../../../src/oss/catalog/catalogErrors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE;QACN;YACE,MAAM,EAAE,kDAAkD;YAC1D,OAAO,EAAE,QAAQ;YACjB,IAAI,EAAE,uDAAuD;SAC9D;KACF;IACD,KAAK,EAAE,2DAA2D;IAClE,IAAI,EAAE,oDAAoD;CACtB,CAAC;AAEvC;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,oBAA6B,EAAE,EAAE,CACvE,CAAC;IACC,MAAM,EAAE,oBAAoB;IAC5B,KAAK,EAAE,yDAAyD;IAChE,IAAI,EAAE,4DAA4D;CACnE,CAA4B,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 { Problem, ValidationProblem } from \"../../common/Problem.ts\";\n\nexport const emptyPathError = {\n errors: [\n {\n detail: \"`path` parameter is required and cannot be empty\",\n pointer: \"#/path\",\n type: \"https://api.dremio.dev/problems/validation/min-length\",\n },\n ],\n title: \"There was a problem validating the content of the request\",\n type: \"https://api.dremio.dev/problems/validation-problem\",\n} as const satisfies ValidationProblem;\n\n/**\n * Generic problem for when we don't know what specifically caused the retrieval\n * to fail.\n */\nexport const unableToRetrieveProblem = (internalErrorMessage?: string) =>\n ({\n detail: internalErrorMessage,\n title: \"We were unable to fetch details for this catalog object\",\n type: \"https://api.dremio.dev/problems/catalog/failed-to-retrieve\",\n }) as const satisfies Problem;\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Result } from "ts-results-es";
|
|
2
|
+
import type { SonarV3Config } from "../../common/Config.ts";
|
|
3
|
+
import type { CatalogObject } from "./CatalogObjects/index.ts";
|
|
4
|
+
import type { Problem } from "../../common/Problem.ts";
|
|
5
|
+
export declare const baseRetrieve: (config: SonarV3Config) => (key: string) => Promise<Result<CatalogObject, Problem>>;
|
|
6
|
+
export declare const baseRetrieveByPath: (config: SonarV3Config) => (key: string[]) => Promise<Result<CatalogObject, Problem>>;
|
|
@@ -0,0 +1,119 @@
|
|
|
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 { batch } from "../../common/batch.js";
|
|
17
|
+
import { Err, Ok } from "ts-results-es";
|
|
18
|
+
import { catalogObjectFromEntity } from "./CatalogObjects/utils/catalogObjectFromEntity.js";
|
|
19
|
+
import { HttpError } from "../../common/HttpError.js";
|
|
20
|
+
import { unableToRetrieveProblem } from "./catalogErrors.js";
|
|
21
|
+
export const baseRetrieve = (config) => batch(async (ids) => {
|
|
22
|
+
const results = new Map();
|
|
23
|
+
if (ids.size === 1) {
|
|
24
|
+
const id = Array.from(ids).at(0);
|
|
25
|
+
return config
|
|
26
|
+
.sonarV3Request(`catalog/${id}?maxChildren=0`)
|
|
27
|
+
.then((res) => res.json())
|
|
28
|
+
.then((response) => {
|
|
29
|
+
results.set(id, Ok(catalogObjectFromEntity(config, baseRetrieveByPath(config))(response)));
|
|
30
|
+
return results;
|
|
31
|
+
})
|
|
32
|
+
.catch((e) => {
|
|
33
|
+
if (e instanceof HttpError) {
|
|
34
|
+
results.set(id, Err(e.body));
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
results.set(id, Err(unableToRetrieveProblem()));
|
|
38
|
+
}
|
|
39
|
+
return results;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
const idsArray = Array.from(ids);
|
|
43
|
+
const chunks = [];
|
|
44
|
+
while (idsArray.length > 0) {
|
|
45
|
+
chunks.push(idsArray.splice(0, Math.min(50, idsArray.length)));
|
|
46
|
+
}
|
|
47
|
+
const catalogItems = await Promise.all(chunks.map((chunk) => config
|
|
48
|
+
.sonarV3Request(`catalog/by-ids?maxChildren=0`, {
|
|
49
|
+
body: JSON.stringify(chunk),
|
|
50
|
+
headers: { "Content-Type": "application/json" },
|
|
51
|
+
method: "POST",
|
|
52
|
+
})
|
|
53
|
+
.then((res) => res.json())
|
|
54
|
+
.then((response) => response.data))).then((chunks) => chunks.flat());
|
|
55
|
+
for (const catalogItem of catalogItems) {
|
|
56
|
+
results.set(catalogItem.id, Ok(catalogObjectFromEntity(config, baseRetrieveByPath(config))(catalogItem)));
|
|
57
|
+
}
|
|
58
|
+
for (const id of ids) {
|
|
59
|
+
if (!results.has(id)) {
|
|
60
|
+
results.set(id, Err(unableToRetrieveProblem()));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return results;
|
|
64
|
+
});
|
|
65
|
+
export const baseRetrieveByPath = (config) => batch(async (paths) => {
|
|
66
|
+
const results = new Map();
|
|
67
|
+
// Because the key is a reference type (array), we need to store the
|
|
68
|
+
// original path reference
|
|
69
|
+
const originalKeyRef = new Map();
|
|
70
|
+
for (const key of paths) {
|
|
71
|
+
originalKeyRef.set(JSON.stringify(key), key);
|
|
72
|
+
}
|
|
73
|
+
if (paths.size === 1) {
|
|
74
|
+
const path = Array.from(paths).at(0);
|
|
75
|
+
return config
|
|
76
|
+
.sonarV3Request(`catalog/by-path/${path.map(encodeURIComponent).join("/")}?maxChildren=0`)
|
|
77
|
+
.then((res) => res.json())
|
|
78
|
+
.then((response) => {
|
|
79
|
+
results.set(path, Ok(catalogObjectFromEntity(config, baseRetrieveByPath(config))(response)));
|
|
80
|
+
return results;
|
|
81
|
+
})
|
|
82
|
+
.catch((e) => {
|
|
83
|
+
if (e instanceof HttpError) {
|
|
84
|
+
results.set(path, Err(e.body));
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
results.set(path, Err(unableToRetrieveProblem()));
|
|
88
|
+
}
|
|
89
|
+
return results;
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
const pathsArray = Array.from(paths);
|
|
93
|
+
const chunks = [];
|
|
94
|
+
while (pathsArray.length > 0) {
|
|
95
|
+
chunks.push(pathsArray.splice(0, Math.min(50, pathsArray.length)));
|
|
96
|
+
}
|
|
97
|
+
const catalogItems = await Promise.all(chunks.map((chunk) => config
|
|
98
|
+
.sonarV3Request(`catalog/by-paths?maxChildren=0`, {
|
|
99
|
+
body: JSON.stringify(chunk),
|
|
100
|
+
headers: { "Content-Type": "application/json" },
|
|
101
|
+
method: "POST",
|
|
102
|
+
})
|
|
103
|
+
.then((res) => res.json())
|
|
104
|
+
.then((response) => response.data))).then((chunks) => chunks.flat());
|
|
105
|
+
for (const catalogItem of catalogItems) {
|
|
106
|
+
const resolved = catalogObjectFromEntity(config, baseRetrieveByPath(config))(catalogItem);
|
|
107
|
+
const originalKey = originalKeyRef.get(JSON.stringify(resolved.path));
|
|
108
|
+
if (originalKey) {
|
|
109
|
+
results.set(originalKey, Ok(resolved));
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
for (const path of paths) {
|
|
113
|
+
if (!results.has(path)) {
|
|
114
|
+
results.set(path, Err(unableToRetrieveProblem()));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return results;
|
|
118
|
+
});
|
|
119
|
+
//# sourceMappingURL=catalogRetrieve.js.map
|