mirror of
https://github.com/dadosfera/maestro.git
synced 2026-12-04 00:00:05 +00:00
FEAT: add custom properties endpoints and DTOs for catalog management
This commit is contained in:
@@ -35,9 +35,11 @@ import {
|
||||
} from './dtos';
|
||||
import {
|
||||
AddRlsRuleRequest,
|
||||
DeleteCustomPropertyDefinitionRequest,
|
||||
GetNimbusDashboardsRequest,
|
||||
GetRlsRulesRequest,
|
||||
PiiMetadata,
|
||||
UpsertCustomPropertyDefinitionRequest,
|
||||
} from '@dadosfera/protospack-v2/dist/lib/Catalog/interfaces/messages';
|
||||
import { TypeParser } from 'src/utils/FileParser/parser-types';
|
||||
import { ParserBuilder } from 'src/utils/FileParser/parser.builder';
|
||||
@@ -120,6 +122,24 @@ class CatalogService implements OnModuleInit {
|
||||
}
|
||||
}
|
||||
|
||||
async getCustomPropertyDefinitions(metadata: Metadata) {
|
||||
return lastValueFrom(this.catalogReadService.GetCustomPropertyDefinitions({}, metadata));
|
||||
}
|
||||
|
||||
async upsertCustomPropertyDefinition(
|
||||
data: UpsertCustomPropertyDefinitionRequest,
|
||||
metadata: Metadata,
|
||||
) {
|
||||
return lastValueFrom(this.catalogWriteService.UpsertCustomPropertyDefinition(data, metadata));
|
||||
}
|
||||
|
||||
async deleteCustomPropertyDefinition(
|
||||
data: DeleteCustomPropertyDefinitionRequest,
|
||||
metadata: Metadata,
|
||||
) {
|
||||
return lastValueFrom(this.catalogWriteService.DeleteCustomPropertyDefinition(data, metadata));
|
||||
}
|
||||
|
||||
async createDataAsset(data: Messages.CreateDataAssetRequest, metadata) {
|
||||
this.logger.info('CatalogService - Manage Data assets permissions');
|
||||
if (!data.embed) data.embed = undefined;
|
||||
|
||||
Reference in New Issue
Block a user