mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-29 02:40:06 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
827c7b1bf1 | ||
|
|
8d89b747b4 | ||
|
|
4f18328603 | ||
|
|
a68d312447 | ||
|
|
7f677f0376 | ||
|
|
bb2c0ab23e | ||
|
|
feec48114c | ||
|
|
7bee8d83a9 | ||
|
|
84b2dbd178 | ||
|
|
36706ff3dd | ||
|
|
0164e6978a | ||
|
|
7d371926f5 | ||
|
|
75e9e97f04 |
@@ -1,4 +1,4 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<image src="./assets/maestro.svg" style="width:10rem">
|
<image src="./assets/maestro.svg" style="width:10rem">
|
||||||
<h1 align="center">Maestro</h1>
|
<h1 align="center">Maestro</h1>
|
||||||
</p>
|
</p>
|
||||||
Generated
+7
-7
@@ -18,7 +18,7 @@
|
|||||||
"@nestjs/microservices": "^8.4.3",
|
"@nestjs/microservices": "^8.4.3",
|
||||||
"@nestjs/platform-express": "^8.4.3",
|
"@nestjs/platform-express": "^8.4.3",
|
||||||
"@nestjs/swagger": "^5.2.1",
|
"@nestjs/swagger": "^5.2.1",
|
||||||
"@victorradael/protospack": "^1.6.1",
|
"@victorradael/protospack": "^1.6.5",
|
||||||
"axios": "^0.25.0",
|
"axios": "^0.25.0",
|
||||||
"dotenv": "^14.2.0",
|
"dotenv": "^14.2.0",
|
||||||
"helmet": "^5.0.2",
|
"helmet": "^5.0.2",
|
||||||
@@ -2344,9 +2344,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@victorradael/protospack": {
|
"node_modules/@victorradael/protospack": {
|
||||||
"version": "1.6.1",
|
"version": "1.6.5",
|
||||||
"resolved": "https://registry.npmjs.org/@victorradael/protospack/-/protospack-1.6.1.tgz",
|
"resolved": "https://registry.npmjs.org/@victorradael/protospack/-/protospack-1.6.5.tgz",
|
||||||
"integrity": "sha512-GEW+NYaMNnuUZ4/WsNJGpi3dHAOXkbm4BQKFkT/Ij7P9vSelyx9RGqkrs5m0biAXfITWDHe8hjI4AbRQe6AMDw==",
|
"integrity": "sha512-WuRHsvjyprZTrA+L/LmuR0x4d/GLxO/rprQAMqQ5PzZmMViMQSrN6IGX6umJKHImLhVeRkNEGsysjAxHc4V12Q==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"rxjs": "^7.5.5"
|
"rxjs": "^7.5.5"
|
||||||
}
|
}
|
||||||
@@ -10904,9 +10904,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@victorradael/protospack": {
|
"@victorradael/protospack": {
|
||||||
"version": "1.6.1",
|
"version": "1.6.5",
|
||||||
"resolved": "https://registry.npmjs.org/@victorradael/protospack/-/protospack-1.6.1.tgz",
|
"resolved": "https://registry.npmjs.org/@victorradael/protospack/-/protospack-1.6.5.tgz",
|
||||||
"integrity": "sha512-GEW+NYaMNnuUZ4/WsNJGpi3dHAOXkbm4BQKFkT/Ij7P9vSelyx9RGqkrs5m0biAXfITWDHe8hjI4AbRQe6AMDw==",
|
"integrity": "sha512-WuRHsvjyprZTrA+L/LmuR0x4d/GLxO/rprQAMqQ5PzZmMViMQSrN6IGX6umJKHImLhVeRkNEGsysjAxHc4V12Q==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"rxjs": "^7.5.5"
|
"rxjs": "^7.5.5"
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -30,7 +30,7 @@
|
|||||||
"@nestjs/microservices": "^8.4.3",
|
"@nestjs/microservices": "^8.4.3",
|
||||||
"@nestjs/platform-express": "^8.4.3",
|
"@nestjs/platform-express": "^8.4.3",
|
||||||
"@nestjs/swagger": "^5.2.1",
|
"@nestjs/swagger": "^5.2.1",
|
||||||
"@victorradael/protospack": "^1.6.1",
|
"@victorradael/protospack": "^1.6.5",
|
||||||
"axios": "^0.25.0",
|
"axios": "^0.25.0",
|
||||||
"dotenv": "^14.2.0",
|
"dotenv": "^14.2.0",
|
||||||
"helmet": "^5.0.2",
|
"helmet": "^5.0.2",
|
||||||
|
|||||||
@@ -20,11 +20,11 @@ export class AuthClientService implements OnModuleInit {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async signIn({ username, password }: ILogin): Promise<any> {
|
async signIn({ username, password, totp }: ILogin): Promise<any> {
|
||||||
console.log('AuthClientService', 'SignIn');
|
console.log('AuthClientService', 'SignIn');
|
||||||
|
|
||||||
const tokens = await new Promise((resolve, reject) => {
|
const tokens = await new Promise((resolve, reject) => {
|
||||||
this.authService.signIn({ username, password }).subscribe({
|
this.authService.signIn({ username, password, totp }).subscribe({
|
||||||
next(x) {
|
next(x) {
|
||||||
resolve(x);
|
resolve(x);
|
||||||
},
|
},
|
||||||
|
|||||||
Vendored
+1
@@ -1,4 +1,5 @@
|
|||||||
export interface ILogin {
|
export interface ILogin {
|
||||||
username: string;
|
username: string;
|
||||||
password: string;
|
password: string;
|
||||||
|
totp: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { AuthClientService } from 'src/clients/auth/client.service';
|
|||||||
interface ISignIn {
|
interface ISignIn {
|
||||||
username: string;
|
username: string;
|
||||||
password: string;
|
password: string;
|
||||||
|
totp: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Controller('auth')
|
@Controller('auth')
|
||||||
@@ -12,11 +13,11 @@ export class AuthController {
|
|||||||
constructor(private authClient: AuthClientService) {}
|
constructor(private authClient: AuthClientService) {}
|
||||||
|
|
||||||
@Post()
|
@Post()
|
||||||
async signIn(@Body() { username, password }: ISignIn) {
|
async signIn(@Body() { username, password, totp }: ISignIn) {
|
||||||
console.log(`/auth`, 'SignIn');
|
console.log(`/auth`, 'SignIn');
|
||||||
|
|
||||||
const tokens = await this.authClient
|
const tokens = await this.authClient
|
||||||
.signIn({ username, password })
|
.signIn({ username, password, totp })
|
||||||
.then((result) => result)
|
.then((result) => result)
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
throw new UnauthorizedException(err.message);
|
throw new UnauthorizedException(err.message);
|
||||||
|
|||||||
@@ -140,6 +140,17 @@ export class CatalogController {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Get('data-status')
|
||||||
|
async createDataStatus(@Body() body) {
|
||||||
|
console.log(`/catalog`, 'ON CREATE DATA STATUS ROUTE');
|
||||||
|
|
||||||
|
const catalogService = new CatalogService();
|
||||||
|
|
||||||
|
const res = await catalogService.createDataStatus(body);
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
@Get('data-description')
|
@Get('data-description')
|
||||||
async getDataDescription(@Body() body) {
|
async getDataDescription(@Body() body) {
|
||||||
console.log(`/catalog`, 'ON GET DATA DESCRIPTION ROUTE');
|
console.log(`/catalog`, 'ON GET DATA DESCRIPTION ROUTE');
|
||||||
@@ -151,6 +162,17 @@ export class CatalogController {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Post('data-description')
|
||||||
|
async createDataDescription(@Body() body) {
|
||||||
|
console.log(`/catalog`, 'ON CREATE DATA DESCRIPTION ROUTE');
|
||||||
|
|
||||||
|
const catalogService = new CatalogService();
|
||||||
|
|
||||||
|
const res = await catalogService.createDataDescription(body);
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
@Get('data-docs')
|
@Get('data-docs')
|
||||||
async getDataDocs(@Body() body) {
|
async getDataDocs(@Body() body) {
|
||||||
console.log(`/catalog`, 'ON GET DATA DOCS ROUTE');
|
console.log(`/catalog`, 'ON GET DATA DOCS ROUTE');
|
||||||
@@ -162,6 +184,17 @@ export class CatalogController {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Post('data-docs')
|
||||||
|
async createDataDocs(@Body() body) {
|
||||||
|
console.log(`/catalog`, 'ON CREATE DATA DOCS ROUTE');
|
||||||
|
|
||||||
|
const catalogService = new CatalogService();
|
||||||
|
|
||||||
|
const res = await catalogService.createDataDocs(body);
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
@Get('data-rating')
|
@Get('data-rating')
|
||||||
async getDataRating(@Body() body) {
|
async getDataRating(@Body() body) {
|
||||||
console.log(`/catalog`, 'ON GET DATA RATING ROUTE');
|
console.log(`/catalog`, 'ON GET DATA RATING ROUTE');
|
||||||
@@ -185,15 +218,18 @@ export class CatalogController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Get('summary-rating/:id')
|
@Get('summary-rating/:id')
|
||||||
async getSummaryRating(@Param() params, @Body() body) {
|
async getSummaryRating() {
|
||||||
console.log(`/catalog`, 'ON GET SUMMARY RATING ROUTE');
|
console.log(`/catalog`, 'ON GET SUMMARY RATING ROUTE');
|
||||||
const { id } = params;
|
//const { id } = params;
|
||||||
|
|
||||||
const catalogService = new CatalogService();
|
//const catalogService = new CatalogService();
|
||||||
|
|
||||||
const res = await catalogService.getSummaryRating(id, body);
|
//const res = await catalogService.getSummaryRating(id, body);
|
||||||
|
|
||||||
return res;
|
return {
|
||||||
|
avg_rating: 0,
|
||||||
|
rating_count: 0,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get('data-comment')
|
@Get('data-comment')
|
||||||
|
|||||||
@@ -9,10 +9,8 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/all/`);
|
const { data } = await axios.get(`${nimbusUrl}/api/catalog/all/`);
|
||||||
|
|
||||||
@@ -27,10 +25,8 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data_apps/`);
|
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data_apps/`);
|
||||||
return data;
|
return data;
|
||||||
@@ -44,14 +40,13 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(
|
const { data } = await axios.get(
|
||||||
`${nimbusUrl}/api/catalog/data_apps/${id}/`,
|
`${nimbusUrl}/api/catalog/data_apps/${id}/`,
|
||||||
);
|
);
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,10 +58,8 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(
|
const { data } = await axios.get(
|
||||||
`${nimbusUrl}/api/catalog/dashboard-metabase/`,
|
`${nimbusUrl}/api/catalog/dashboard-metabase/`,
|
||||||
@@ -82,18 +75,17 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(
|
const { data } = await axios.get(
|
||||||
`${nimbusUrl}/api/catalog/dashboard-metabase/${id}`,
|
`${nimbusUrl}/api/catalog/dashboard-metabase/${id}`,
|
||||||
);
|
);
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
const [, path] = data.iframe_url.split('.dadosfera');
|
// const [, path] = data.iframe_url.split('.dadosfera');
|
||||||
const host = `https://metabase-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
// const host = `httpss://metabase-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||||
data.iframe_url = host + path;
|
// data.iframe_url = host + path;
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
@@ -106,10 +98,8 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(
|
const { data } = await axios.get(
|
||||||
`${nimbusUrl}/api/catalog/table-metadata/`,
|
`${nimbusUrl}/api/catalog/table-metadata/`,
|
||||||
@@ -125,10 +115,8 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(
|
const { data } = await axios.get(
|
||||||
`${nimbusUrl}/api/catalog/table-metadata/`,
|
`${nimbusUrl}/api/catalog/table-metadata/`,
|
||||||
@@ -145,12 +133,10 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(
|
const { data } = await axios.delete(
|
||||||
`${nimbusUrl}/api/catalog/table-metadata/${id}`,
|
`${nimbusUrl}/api/catalog/table-metadata/${id}`,
|
||||||
);
|
);
|
||||||
return data;
|
return data;
|
||||||
@@ -164,10 +150,8 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(
|
const { data } = await axios.get(
|
||||||
`${nimbusUrl}/api/catalog/column-metadata/`,
|
`${nimbusUrl}/api/catalog/column-metadata/`,
|
||||||
@@ -184,12 +168,10 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(
|
const { data } = await axios.delete(
|
||||||
`${nimbusUrl}/api/catalog/column-metadata/${id}/`,
|
`${nimbusUrl}/api/catalog/column-metadata/${id}/`,
|
||||||
);
|
);
|
||||||
return data;
|
return data;
|
||||||
@@ -203,10 +185,8 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-preview/`, {
|
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-preview/`, {
|
||||||
params: params,
|
params: params,
|
||||||
@@ -222,15 +202,31 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-status/`);
|
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-status/`);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async createDataStatus(body) {
|
||||||
|
const customer =
|
||||||
|
body.info.customer.toLowerCase() === 'dadosfera'
|
||||||
|
? ``
|
||||||
|
: `-${body.info.customer.toLowerCase()}`;
|
||||||
|
|
||||||
|
const nimbusUrl =
|
||||||
|
process.env.ENV === 'prd'
|
||||||
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
|
|
||||||
|
const { data } = await axios.post(
|
||||||
|
`${nimbusUrl}/api/catalog/data-status/`,
|
||||||
|
body,
|
||||||
|
);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
async getDataDescription(body) {
|
async getDataDescription(body) {
|
||||||
const customer =
|
const customer =
|
||||||
body.info.customer.toLowerCase() === 'dadosfera'
|
body.info.customer.toLowerCase() === 'dadosfera'
|
||||||
@@ -239,10 +235,8 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(
|
const { data } = await axios.get(
|
||||||
`${nimbusUrl}/api/catalog/data-description/`,
|
`${nimbusUrl}/api/catalog/data-description/`,
|
||||||
@@ -250,6 +244,24 @@ class CatalogService {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async createDataDescription(body) {
|
||||||
|
const customer =
|
||||||
|
body.info.customer.toLowerCase() === 'dadosfera'
|
||||||
|
? ``
|
||||||
|
: `-${body.info.customer.toLowerCase()}`;
|
||||||
|
|
||||||
|
const nimbusUrl =
|
||||||
|
process.env.ENV === 'prd'
|
||||||
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
|
|
||||||
|
const { data } = await axios.post(
|
||||||
|
`${nimbusUrl}/api/catalog/data-description/`,
|
||||||
|
body,
|
||||||
|
);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
async getDataDocs(body) {
|
async getDataDocs(body) {
|
||||||
const customer =
|
const customer =
|
||||||
body.info.customer.toLowerCase() === 'dadosfera'
|
body.info.customer.toLowerCase() === 'dadosfera'
|
||||||
@@ -258,15 +270,31 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-docs/`);
|
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-docs/`);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async createDataDocs(body) {
|
||||||
|
const customer =
|
||||||
|
body.info.customer.toLowerCase() === 'dadosfera'
|
||||||
|
? ``
|
||||||
|
: `-${body.info.customer.toLowerCase()}`;
|
||||||
|
|
||||||
|
const nimbusUrl =
|
||||||
|
process.env.ENV === 'prd'
|
||||||
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
|
|
||||||
|
const { data } = await axios.post(
|
||||||
|
`${nimbusUrl}/api/catalog/data-docs/`,
|
||||||
|
body,
|
||||||
|
);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
async getDataRating(body) {
|
async getDataRating(body) {
|
||||||
const customer =
|
const customer =
|
||||||
body.info.customer.toLowerCase() === 'dadosfera'
|
body.info.customer.toLowerCase() === 'dadosfera'
|
||||||
@@ -275,10 +303,8 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-rating/`);
|
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-rating/`);
|
||||||
return data;
|
return data;
|
||||||
@@ -292,12 +318,10 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(
|
const { data } = await axios.post(
|
||||||
`${nimbusUrl}/api/catalog/data-rating/`,
|
`${nimbusUrl}/api/catalog/data-rating/`,
|
||||||
body,
|
body,
|
||||||
);
|
);
|
||||||
@@ -312,10 +336,8 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(
|
const { data } = await axios.get(
|
||||||
`${nimbusUrl}/api/catalog/summary-rating/${id}`,
|
`${nimbusUrl}/api/catalog/summary-rating/${id}`,
|
||||||
@@ -331,10 +353,8 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-comment/`);
|
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-comment/`);
|
||||||
return data;
|
return data;
|
||||||
@@ -348,12 +368,10 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(
|
const { data } = await axios.post(
|
||||||
`${nimbusUrl}/api/catalog/data-comment/`,
|
`${nimbusUrl}/api/catalog/data-comment/`,
|
||||||
body,
|
body,
|
||||||
);
|
);
|
||||||
@@ -368,10 +386,8 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-review/`, {
|
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-review/`, {
|
||||||
params: params,
|
params: params,
|
||||||
@@ -387,12 +403,10 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/tags/`, body);
|
const { data } = await axios.post(`${nimbusUrl}/api/catalog/tags/`, body);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -404,10 +418,8 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/tags/`, body);
|
const { data } = await axios.get(`${nimbusUrl}/api/catalog/tags/`, body);
|
||||||
return data;
|
return data;
|
||||||
@@ -421,10 +433,8 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(
|
const { data } = await axios.get(
|
||||||
`${nimbusUrl}/api/catalog/table-tags/`,
|
`${nimbusUrl}/api/catalog/table-tags/`,
|
||||||
@@ -441,12 +451,10 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/tags/${id}`);
|
const { data } = await axios.delete(`${nimbusUrl}/api/catalog/tags/${id}`);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -458,12 +466,10 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(
|
const { data } = await axios.post(
|
||||||
`${nimbusUrl}/api/catalog/table-tags/`,
|
`${nimbusUrl}/api/catalog/table-tags/`,
|
||||||
body,
|
body,
|
||||||
);
|
);
|
||||||
@@ -478,12 +484,10 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(
|
const { data } = await axios.delete(
|
||||||
`${nimbusUrl}/api/catalog/table-tags/${id}`,
|
`${nimbusUrl}/api/catalog/table-tags/${id}`,
|
||||||
);
|
);
|
||||||
return data;
|
return data;
|
||||||
@@ -497,10 +501,8 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(
|
const { data } = await axios.get(
|
||||||
`${nimbusUrl}/api/catalog/table-rules/`,
|
`${nimbusUrl}/api/catalog/table-rules/`,
|
||||||
@@ -517,12 +519,10 @@ class CatalogService {
|
|||||||
|
|
||||||
const nimbusUrl =
|
const nimbusUrl =
|
||||||
process.env.ENV === 'prd'
|
process.env.ENV === 'prd'
|
||||||
? `${
|
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||||
process.env.NIMBUS_BASE_URL
|
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||||
}-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
|
||||||
: `http://nimbus-api${customer}.${process.env.ENV}.dadosfera`;
|
|
||||||
|
|
||||||
const { data } = await axios.get(
|
const { data } = await axios.delete(
|
||||||
`${nimbusUrl}/api/catalog/table-rules/${id}`,
|
`${nimbusUrl}/api/catalog/table-rules/${id}`,
|
||||||
);
|
);
|
||||||
return data;
|
return data;
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user