mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-16 23:49:09 +00:00
FIX: Get a total and fix owner type
This commit is contained in:
Generated
+7
-7
@@ -12,7 +12,7 @@
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-secrets-manager": "^3.112.0",
|
||||
"@dadosfera/dadosfera-logs": "^1.0.0-beta.4",
|
||||
"@dadosfera/protospack-v2": "3.18.16",
|
||||
"@dadosfera/protospack-v2": "3.18.17",
|
||||
"@grpc/grpc-js": "^1.6.7",
|
||||
"@grpc/proto-loader": "^0.6.13",
|
||||
"@nestjs/common": "^8.4.7",
|
||||
@@ -1726,9 +1726,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@dadosfera/protospack-v2": {
|
||||
"version": "3.18.16",
|
||||
"resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com:443/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.18.16.tgz",
|
||||
"integrity": "sha512-FpFY4MUU0rntdUFyYPaY6Isc6C8xSzWW4f3x9UvunG7X5fmB6ycOdWcNBTnreROrKUBO88M7Ahc8hn6dxB543A==",
|
||||
"version": "3.18.17",
|
||||
"resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com:443/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.18.17.tgz",
|
||||
"integrity": "sha512-cA57M7wr23pxVgbOV80+Tm0zgCtqDN5lpb5zbhx0p7lVTgi61S8oV0j/M3Srf3BEqA1nABrWUK4Uohgwjc+XpQ==",
|
||||
"dependencies": {
|
||||
"@grpc/grpc-js": "^1.6.7",
|
||||
"rxjs": "^7.5.5",
|
||||
@@ -12306,9 +12306,9 @@
|
||||
}
|
||||
},
|
||||
"@dadosfera/protospack-v2": {
|
||||
"version": "3.18.16",
|
||||
"resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com:443/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.18.16.tgz",
|
||||
"integrity": "sha512-FpFY4MUU0rntdUFyYPaY6Isc6C8xSzWW4f3x9UvunG7X5fmB6ycOdWcNBTnreROrKUBO88M7Ahc8hn6dxB543A==",
|
||||
"version": "3.18.17",
|
||||
"resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com:443/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.18.17.tgz",
|
||||
"integrity": "sha512-cA57M7wr23pxVgbOV80+Tm0zgCtqDN5lpb5zbhx0p7lVTgi61S8oV0j/M3Srf3BEqA1nABrWUK4Uohgwjc+XpQ==",
|
||||
"requires": {
|
||||
"@grpc/grpc-js": "^1.6.7",
|
||||
"rxjs": "^7.5.5",
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-secrets-manager": "^3.112.0",
|
||||
"@dadosfera/dadosfera-logs": "^1.0.0-beta.4",
|
||||
"@dadosfera/protospack-v2": "3.18.16",
|
||||
"@dadosfera/protospack-v2": "3.18.17",
|
||||
"@grpc/grpc-js": "^1.6.7",
|
||||
"@grpc/proto-loader": "^0.6.13",
|
||||
"@nestjs/common": "^8.4.7",
|
||||
|
||||
@@ -151,7 +151,7 @@ class CatalogService implements OnModuleInit {
|
||||
) {
|
||||
this.logger.info('CatalogService - getAllOpenSearchDashboard');
|
||||
|
||||
const response = await lastValueFrom(
|
||||
const { data_assets, total } = await lastValueFrom(
|
||||
this.catalogReadService.GetAllDataAssets(data, metadata),
|
||||
).catch((err) => {
|
||||
throw new HttpException(
|
||||
@@ -160,7 +160,7 @@ class CatalogService implements OnModuleInit {
|
||||
);
|
||||
});
|
||||
|
||||
const result = JSON.parse(response.data_assets);
|
||||
const result = JSON.parse(data_assets);
|
||||
|
||||
const [customer_users, customer_roles] =
|
||||
await this.getUsernamesAndRolesByCustomerId(customer_id);
|
||||
@@ -197,7 +197,7 @@ class CatalogService implements OnModuleInit {
|
||||
});
|
||||
}
|
||||
|
||||
return { data_assets: result.data_assets };
|
||||
return { data_assets: result.data_assets, total };
|
||||
}
|
||||
|
||||
async getOneDataAsset({
|
||||
|
||||
@@ -14,6 +14,17 @@ export class IUser {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export class IComment {
|
||||
@ApiProperty()
|
||||
id: number;
|
||||
@ApiProperty()
|
||||
message: string;
|
||||
@ApiProperty()
|
||||
created_at: string;
|
||||
@ApiProperty()
|
||||
username: string;
|
||||
}
|
||||
|
||||
export class IDataAsset {
|
||||
@ApiProperty()
|
||||
id: number;
|
||||
@@ -50,7 +61,7 @@ export class IDataAsset {
|
||||
@ApiProperty()
|
||||
tags: string[];
|
||||
@ApiProperty()
|
||||
owner: IUser;
|
||||
owner: string;
|
||||
@ApiProperty({ type: [IRole] })
|
||||
roles: IRole[];
|
||||
@ApiProperty({ type: [IUser] })
|
||||
@@ -67,6 +78,8 @@ export class IDataAsset {
|
||||
created_at?: string;
|
||||
@ApiPropertyOptional()
|
||||
updated_at?: string;
|
||||
@ApiProperty({ type: [IComment] })
|
||||
comments: IComment[];
|
||||
}
|
||||
|
||||
export class IOneDataAsset {
|
||||
@@ -74,17 +87,6 @@ export class IOneDataAsset {
|
||||
data_asset: IDataAsset;
|
||||
}
|
||||
|
||||
export class IComment {
|
||||
@ApiProperty()
|
||||
id: number;
|
||||
@ApiProperty()
|
||||
message: string;
|
||||
@ApiProperty()
|
||||
created_at: string;
|
||||
@ApiProperty()
|
||||
username: string;
|
||||
}
|
||||
|
||||
export class IMakeAComment {
|
||||
@ApiProperty()
|
||||
message: string;
|
||||
@@ -98,6 +100,8 @@ export class IDeleteComment {
|
||||
export class ICatalogAllResponse {
|
||||
@ApiProperty({ type: [IDataAsset] })
|
||||
data_assets: IDataAsset[];
|
||||
@ApiProperty()
|
||||
total: number;
|
||||
}
|
||||
|
||||
export class IData {
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user