mirror of
https://github.com/dadosfera/maestro.git
synced 2026-09-18 20:54:48 +00:00
Compare commits
2
Commits
v1.6.0
...
v1.6.0-alpha.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a69752332e | ||
|
|
09c7cc79ee |
Generated
+13
-9259
File diff suppressed because it is too large
Load Diff
@@ -31,6 +31,7 @@ export class LoggerMiddleware implements NestMiddleware {
|
||||
const jwtDecoded: any = decode(idToken);
|
||||
|
||||
const permissions = jwtDecoded.user.permissions;
|
||||
|
||||
const clienId = jwtDecoded.user.customerId;
|
||||
const customer = jwtDecoded.user.customer;
|
||||
const userId = jwtDecoded.user.id;
|
||||
@@ -38,16 +39,20 @@ export class LoggerMiddleware implements NestMiddleware {
|
||||
await verifyToken(accessToken);
|
||||
|
||||
let havePermission = false;
|
||||
permissions.forEach((permission) => {
|
||||
const permission = permissions.find((permission) => {
|
||||
permission = permission.split('/');
|
||||
const method = permission[0].trim();
|
||||
const route = permission[1].trim();
|
||||
|
||||
if (method === requiredMethod && route === requiredRoute) {
|
||||
havePermission = true;
|
||||
return permission;
|
||||
}
|
||||
});
|
||||
|
||||
if (permission) {
|
||||
havePermission = true;
|
||||
}
|
||||
|
||||
if (havePermission) {
|
||||
request.body.info = {
|
||||
customer_id: clienId,
|
||||
|
||||
@@ -2,15 +2,12 @@ import axios from 'axios';
|
||||
|
||||
class CatalogService {
|
||||
async catalogAll(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`;
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
|
||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/all/`);
|
||||
|
||||
@@ -18,30 +15,24 @@ class CatalogService {
|
||||
}
|
||||
|
||||
async dataAppsAll(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`;
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
|
||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data_apps/`);
|
||||
return data;
|
||||
}
|
||||
|
||||
async dataAppsOne(id, 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`;
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${nimbusUrl}/api/catalog/data_apps/${id}/`,
|
||||
@@ -51,16 +42,12 @@ class CatalogService {
|
||||
}
|
||||
|
||||
async getAllDashboardMetabase(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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.get(
|
||||
`${nimbusUrl}/api/catalog/dashboard-metabase/`,
|
||||
);
|
||||
@@ -68,16 +55,12 @@ class CatalogService {
|
||||
}
|
||||
|
||||
async getOneDashboardMetabase(id, 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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.get(
|
||||
`${nimbusUrl}/api/catalog/dashboard-metabase/${id}`,
|
||||
);
|
||||
@@ -91,16 +74,12 @@ class CatalogService {
|
||||
}
|
||||
|
||||
async getAllTableMetadata(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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.get(
|
||||
`${nimbusUrl}/api/catalog/table-metadata/`,
|
||||
);
|
||||
@@ -108,16 +87,12 @@ class CatalogService {
|
||||
}
|
||||
|
||||
async getOneTableMetadata(body, params) {
|
||||
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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.get(
|
||||
`${nimbusUrl}/api/catalog/table-metadata/`,
|
||||
{ params: params },
|
||||
@@ -126,16 +101,12 @@ class CatalogService {
|
||||
}
|
||||
|
||||
async deleteOneTableMetadata(id, 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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.delete(
|
||||
`${nimbusUrl}/api/catalog/table-metadata/${id}`,
|
||||
);
|
||||
@@ -143,16 +114,12 @@ class CatalogService {
|
||||
}
|
||||
|
||||
async getOneColumnMetadata(body, params) {
|
||||
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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.get(
|
||||
`${nimbusUrl}/api/catalog/column-metadata/`,
|
||||
{ params: params },
|
||||
@@ -161,16 +128,12 @@ class CatalogService {
|
||||
}
|
||||
|
||||
async deleteOneColumnMetadata(id, 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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.delete(
|
||||
`${nimbusUrl}/api/catalog/column-metadata/${id}/`,
|
||||
);
|
||||
@@ -178,16 +141,12 @@ class CatalogService {
|
||||
}
|
||||
|
||||
async getOneDataPreview(body, params) {
|
||||
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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-preview/`, {
|
||||
params: params,
|
||||
});
|
||||
@@ -195,31 +154,23 @@ class CatalogService {
|
||||
}
|
||||
|
||||
async getDataStatus(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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-status/`);
|
||||
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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.post(
|
||||
`${nimbusUrl}/api/catalog/data-status/`,
|
||||
body,
|
||||
@@ -228,16 +179,12 @@ class CatalogService {
|
||||
}
|
||||
|
||||
async getDataDescription(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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.get(
|
||||
`${nimbusUrl}/api/catalog/data-description/`,
|
||||
);
|
||||
@@ -245,16 +192,12 @@ class CatalogService {
|
||||
}
|
||||
|
||||
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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.post(
|
||||
`${nimbusUrl}/api/catalog/data-description/`,
|
||||
body,
|
||||
@@ -263,31 +206,23 @@ class CatalogService {
|
||||
}
|
||||
|
||||
async getDataDocs(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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-docs/`);
|
||||
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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.post(
|
||||
`${nimbusUrl}/api/catalog/data-docs/`,
|
||||
body,
|
||||
@@ -296,31 +231,23 @@ class CatalogService {
|
||||
}
|
||||
|
||||
async getDataRating(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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-rating/`);
|
||||
return data;
|
||||
}
|
||||
|
||||
async createDataRating(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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.post(
|
||||
`${nimbusUrl}/api/catalog/data-rating/`,
|
||||
body,
|
||||
@@ -329,16 +256,12 @@ class CatalogService {
|
||||
}
|
||||
|
||||
async getSummaryRating(id, 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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.get(
|
||||
`${nimbusUrl}/api/catalog/summary-rating/${id}`,
|
||||
);
|
||||
@@ -346,31 +269,23 @@ class CatalogService {
|
||||
}
|
||||
|
||||
async getDataComment(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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-comment/`);
|
||||
return data;
|
||||
}
|
||||
|
||||
async createDataComment(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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.post(
|
||||
`${nimbusUrl}/api/catalog/data-comment/`,
|
||||
body,
|
||||
@@ -379,16 +294,12 @@ class CatalogService {
|
||||
}
|
||||
|
||||
async getDataReview(body, params) {
|
||||
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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-review/`, {
|
||||
params: params,
|
||||
});
|
||||
@@ -396,46 +307,34 @@ class CatalogService {
|
||||
}
|
||||
|
||||
async createTags(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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.post(`${nimbusUrl}/api/catalog/tags/`, body);
|
||||
return data;
|
||||
}
|
||||
|
||||
async findAllTags(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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/tags/`, body);
|
||||
return data;
|
||||
}
|
||||
|
||||
async findAllTableTags(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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.get(
|
||||
`${nimbusUrl}/api/catalog/table-tags/`,
|
||||
body,
|
||||
@@ -444,31 +343,23 @@ class CatalogService {
|
||||
}
|
||||
|
||||
async deleteTags(id, 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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.delete(`${nimbusUrl}/api/catalog/tags/${id}`);
|
||||
return data;
|
||||
}
|
||||
|
||||
async createTableTags(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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.post(
|
||||
`${nimbusUrl}/api/catalog/table-tags/`,
|
||||
body,
|
||||
@@ -477,16 +368,12 @@ class CatalogService {
|
||||
}
|
||||
|
||||
async deleteTableTags(id, 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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.delete(
|
||||
`${nimbusUrl}/api/catalog/table-tags/${id}`,
|
||||
);
|
||||
@@ -494,16 +381,12 @@ class CatalogService {
|
||||
}
|
||||
|
||||
async getTableRules(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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.get(
|
||||
`${nimbusUrl}/api/catalog/table-rules/`,
|
||||
body,
|
||||
@@ -512,16 +395,12 @@ class CatalogService {
|
||||
}
|
||||
|
||||
async deleteTableRules(id, 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`;
|
||||
|
||||
let nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
if (process.env.ENV !== 'prd') {
|
||||
nimbusUrl = `https://nimbus-${body.info.customer.toLowerCase()}.${
|
||||
process.env.ENV
|
||||
}.dadosfera.ai`;
|
||||
}
|
||||
const { data } = await axios.delete(
|
||||
`${nimbusUrl}/api/catalog/table-rules/${id}`,
|
||||
);
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user