mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-09 21:49:09 +00:00
Compare commits
14
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
06d505c50a | ||
|
|
2177f6725c | ||
|
|
65ab16236f | ||
|
|
b4cc8151d7 | ||
|
|
e8b982998f | ||
|
|
ccd4159c59 | ||
|
|
9e49abb40d | ||
|
|
21a82b64f3 | ||
|
|
2414fcf21e | ||
|
|
94fbdb2226 | ||
|
|
985170d7ae | ||
|
|
b38b8f51e2 | ||
|
|
ea16e62d6b | ||
|
|
6182705410 |
@@ -71,6 +71,11 @@ jobs:
|
|||||||
sudo mv helmfile /usr/local/bin/
|
sudo mv helmfile /usr/local/bin/
|
||||||
helmfile --version
|
helmfile --version
|
||||||
|
|
||||||
|
- name: Install Helm Diff plugin
|
||||||
|
run: |
|
||||||
|
helm plugin install https://github.com/databus23/helm-diff --version v3.9.3
|
||||||
|
helm diff version
|
||||||
|
|
||||||
- name: Debug Helm env
|
- name: Debug Helm env
|
||||||
run: |
|
run: |
|
||||||
helm env
|
helm env
|
||||||
@@ -102,4 +107,5 @@ jobs:
|
|||||||
- name: Run Helmfile Diff
|
- name: Run Helmfile Diff
|
||||||
env:
|
env:
|
||||||
ENV: ${{ needs.extract_environment.outputs.environment }}
|
ENV: ${{ needs.extract_environment.outputs.environment }}
|
||||||
|
HELM_PLUGINS: /home/runner/.local/share/helm/plugins
|
||||||
run: helmfile -f deploy/helmfiles/${ENV}.yaml diff
|
run: helmfile -f deploy/helmfiles/${ENV}.yaml diff
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
FROM node:20-alpine AS base_image
|
FROM node:20-alpine AS base_image
|
||||||
RUN npm install -g npm@10.8.2
|
RUN npm install -g npm@latest
|
||||||
|
|
||||||
FROM base_image AS build_base
|
FROM base_image AS build_base
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|||||||
+41
-387
@@ -900,9 +900,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -952,9 +949,6 @@
|
|||||||
"connections"
|
"connections"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -1003,9 +997,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -1042,9 +1033,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -1078,9 +1066,6 @@
|
|||||||
"connections"
|
"connections"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -2418,9 +2403,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -2504,9 +2486,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -2546,9 +2525,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -2588,9 +2564,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -2628,9 +2601,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -2670,9 +2640,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -2714,9 +2681,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -2758,9 +2722,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3110,9 +3071,6 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3162,9 +3120,6 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3235,9 +3190,6 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3278,9 +3230,6 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3321,9 +3270,6 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3364,9 +3310,6 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3407,9 +3350,6 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3457,9 +3397,6 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3505,9 +3442,6 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3556,9 +3490,6 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3597,9 +3528,6 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3658,9 +3586,6 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3709,9 +3634,6 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3752,9 +3674,6 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3797,9 +3716,6 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3849,9 +3765,6 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3901,9 +3814,6 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3951,9 +3861,6 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4124,9 +4031,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4152,9 +4056,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4191,9 +4092,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4228,9 +4126,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4265,9 +4160,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4295,9 +4187,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4325,9 +4214,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4355,9 +4241,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4394,9 +4277,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4433,9 +4313,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4463,9 +4340,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4493,9 +4367,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4533,9 +4404,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4572,9 +4440,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4619,9 +4484,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4658,9 +4520,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4707,7 +4566,48 @@
|
|||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/platform/pipelines/{pipelineId}/pipeline_run/{runId}/jobs": {
|
||||||
|
"get": {
|
||||||
|
"operationId": "PlatformApiController_getPipelineRunJobs",
|
||||||
|
"summary": "Get pipeline run jobs",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "pipelineId",
|
||||||
|
"required": true,
|
||||||
|
"in": "path",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "runId",
|
||||||
|
"required": true,
|
||||||
|
"in": "path",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tags": [
|
||||||
|
"Platform API"
|
||||||
|
],
|
||||||
|
"security": [
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4744,9 +4644,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4781,9 +4678,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4820,9 +4714,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4859,9 +4750,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4899,9 +4787,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4929,9 +4814,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4959,9 +4841,6 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -5373,9 +5252,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -5419,9 +5295,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -5531,9 +5404,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -5566,9 +5436,6 @@
|
|||||||
"Catalog"
|
"Catalog"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -5611,9 +5478,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -5662,48 +5526,6 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/catalog/custom-properties": {
|
|
||||||
"get": {
|
|
||||||
"operationId": "CatalogController_getCustomPropertyDefinitions",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"name": "dadosfera-lang",
|
|
||||||
"in": "header",
|
|
||||||
"required": false,
|
|
||||||
"schema": {
|
|
||||||
"enum": [
|
|
||||||
"pt-br",
|
|
||||||
"en-us"
|
|
||||||
],
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "",
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"type": "object"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tags": [
|
|
||||||
"Catalog"
|
|
||||||
],
|
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/catalog/data-asset/{id}": {
|
"/catalog/data-asset/{id}": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "CatalogController_getDataAsset",
|
"operationId": "CatalogController_getDataAsset",
|
||||||
@@ -5749,9 +5571,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -5810,9 +5629,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -5861,9 +5677,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -5957,9 +5770,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -6010,9 +5820,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -6071,9 +5878,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -6127,72 +5931,6 @@
|
|||||||
"Catalog"
|
"Catalog"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/catalog/data-asset/{id}/certification-status": {
|
|
||||||
"put": {
|
|
||||||
"operationId": "CatalogController_updateDataAssetCertificationStatus",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"name": "dadosfera-lang",
|
|
||||||
"in": "header",
|
|
||||||
"required": false,
|
|
||||||
"schema": {
|
|
||||||
"enum": [
|
|
||||||
"pt-br",
|
|
||||||
"en-us"
|
|
||||||
],
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "id",
|
|
||||||
"required": true,
|
|
||||||
"in": "path",
|
|
||||||
"schema": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"requestBody": {
|
|
||||||
"required": true,
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/components/schemas/IUpdateCertificationStatusRequest"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "",
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/components/schemas/IUpdateCertificationStatusRequest"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tags": [
|
|
||||||
"Catalog"
|
|
||||||
],
|
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
@@ -6236,9 +5974,6 @@
|
|||||||
"Catalog"
|
"Catalog"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -6279,9 +6014,6 @@
|
|||||||
"Catalog"
|
"Catalog"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -6342,9 +6074,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -6403,9 +6132,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -6782,9 +6508,6 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -7238,9 +6961,6 @@
|
|||||||
"Connection Test"
|
"Connection Test"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -7277,9 +6997,6 @@
|
|||||||
"Connection Test"
|
"Connection Test"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -7316,9 +7033,6 @@
|
|||||||
"Connection Test"
|
"Connection Test"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -7355,9 +7069,6 @@
|
|||||||
"Connection Test"
|
"Connection Test"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -7394,9 +7105,6 @@
|
|||||||
"Connection Test"
|
"Connection Test"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -11265,37 +10973,6 @@
|
|||||||
"docs"
|
"docs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"CustomPropertyDto": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"key": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"type": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"text",
|
|
||||||
"number",
|
|
||||||
"date",
|
|
||||||
"boolean"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"color": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"emoji": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"key",
|
|
||||||
"value",
|
|
||||||
"type"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"IUpdateDataRequest": {
|
"IUpdateDataRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@@ -11324,12 +11001,6 @@
|
|||||||
},
|
},
|
||||||
"docs": {
|
"docs": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
|
||||||
"custom_properties": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/components/schemas/CustomPropertyDto"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
@@ -11349,23 +11020,6 @@
|
|||||||
"data_asset"
|
"data_asset"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"IUpdateCertificationStatusRequest": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"certification_status": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"draft",
|
|
||||||
"in_review",
|
|
||||||
"approved",
|
|
||||||
"deprecated"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"certification_status"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"ICreateDataAsset": {
|
"ICreateDataAsset": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|||||||
Generated
+5
-4
@@ -16,7 +16,7 @@
|
|||||||
"@aws-sdk/lib-dynamodb": "^3.414.0",
|
"@aws-sdk/lib-dynamodb": "^3.414.0",
|
||||||
"@aws-sdk/signature-v4": "^3.370.0",
|
"@aws-sdk/signature-v4": "^3.370.0",
|
||||||
"@dadosfera/dadosfera-logs": "^1.0.0-beta.4",
|
"@dadosfera/dadosfera-logs": "^1.0.0-beta.4",
|
||||||
"@dadosfera/protospack-v2": "^3.40.0-beta.14",
|
"@dadosfera/protospack-v2": "3.40.0-beta.10",
|
||||||
"@grpc/grpc-js": "^1.9.3",
|
"@grpc/grpc-js": "^1.9.3",
|
||||||
"@grpc/proto-loader": "^0.7.9",
|
"@grpc/proto-loader": "^0.7.9",
|
||||||
"@nestjs/cli": "^9.5.0",
|
"@nestjs/cli": "^9.5.0",
|
||||||
@@ -1735,9 +1735,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@dadosfera/protospack-v2": {
|
"node_modules/@dadosfera/protospack-v2": {
|
||||||
"version": "3.40.0-beta.14",
|
"version": "3.40.0-beta.10",
|
||||||
"resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.40.0-beta.14.tgz",
|
"resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.40.0-beta.10.tgz",
|
||||||
"integrity": "sha512-pv3pxq0x1XcBgf3ajD6QOFRLOduh8iEozKFA3AKlIW4gid+gT4iL0GcU2M+O7h0QFeO4JIzRZe/nEMN82nqk7A==",
|
"integrity": "sha512-F45dSEIKG+gwwDMYHayA242bFwhFTJbZm26KesQbGhf4I45ur6hYZD8dK0voNuVQInLMQhtm6+7th6/jJ8xpTQ==",
|
||||||
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@grpc/grpc-js": "^1.9.3",
|
"@grpc/grpc-js": "^1.9.3",
|
||||||
"rxjs": "^7.5.5"
|
"rxjs": "^7.5.5"
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@
|
|||||||
"@aws-sdk/lib-dynamodb": "^3.414.0",
|
"@aws-sdk/lib-dynamodb": "^3.414.0",
|
||||||
"@aws-sdk/signature-v4": "^3.370.0",
|
"@aws-sdk/signature-v4": "^3.370.0",
|
||||||
"@dadosfera/dadosfera-logs": "^1.0.0-beta.4",
|
"@dadosfera/dadosfera-logs": "^1.0.0-beta.4",
|
||||||
"@dadosfera/protospack-v2": "^3.40.0-beta.14",
|
"@dadosfera/protospack-v2": "3.40.0-beta.10",
|
||||||
"@grpc/grpc-js": "^1.9.3",
|
"@grpc/grpc-js": "^1.9.3",
|
||||||
"@grpc/proto-loader": "^0.7.9",
|
"@grpc/proto-loader": "^0.7.9",
|
||||||
"@nestjs/cli": "^9.5.0",
|
"@nestjs/cli": "^9.5.0",
|
||||||
|
|||||||
@@ -357,16 +357,6 @@ export const PERMISSIONS_GROUPS = {
|
|||||||
'es-es': 'Crear y editar atributos en el catálogo',
|
'es-es': 'Crear y editar atributos en el catálogo',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
CERTIFY: {
|
|
||||||
seqid: 53,
|
|
||||||
claim: 'catalog:certify',
|
|
||||||
usage: PermissionUsages.PUBLIC,
|
|
||||||
name: {
|
|
||||||
'pt-br': 'Alterar o status de certificação dos Ativos',
|
|
||||||
'en-us': "Change Assets' certification status",
|
|
||||||
'es-es': 'Cambiar el estado de certificación de los Activos',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
DELETE: {
|
DELETE: {
|
||||||
seqid: 1,
|
seqid: 1,
|
||||||
claim: 'catalog:delete',
|
claim: 'catalog:delete',
|
||||||
@@ -722,8 +712,6 @@ export const DADOSFERA_MODULES_KEYS = {
|
|||||||
PII: 'pii',
|
PII: 'pii',
|
||||||
EMBED: 'embedded-analytics',
|
EMBED: 'embedded-analytics',
|
||||||
EMBED_ASSIGNED: 'embed-assigned',
|
EMBED_ASSIGNED: 'embed-assigned',
|
||||||
CATALOG: 'catalog',
|
|
||||||
COLLECT: 'collect',
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DADOSFERA_MODULES: Array<DadosferaModule> = [
|
export const DADOSFERA_MODULES: Array<DadosferaModule> = [
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import {
|
|||||||
HttpStatus,
|
HttpStatus,
|
||||||
Res,
|
Res,
|
||||||
} from '@nestjs/common';
|
} from '@nestjs/common';
|
||||||
import { ValidationPipe } from '../../pipes/object-validation.pipe';
|
|
||||||
import {
|
import {
|
||||||
ApiCreatedResponse,
|
ApiCreatedResponse,
|
||||||
ApiHeaders,
|
ApiHeaders,
|
||||||
@@ -47,7 +46,6 @@ import {
|
|||||||
IMakeAComment,
|
IMakeAComment,
|
||||||
IOneDataAsset,
|
IOneDataAsset,
|
||||||
IPreviewResponse,
|
IPreviewResponse,
|
||||||
IUpdateCertificationStatusRequest,
|
|
||||||
IUpdateDataRequest,
|
IUpdateDataRequest,
|
||||||
TriggerCatalogReq,
|
TriggerCatalogReq,
|
||||||
TriggerCatalogRes,
|
TriggerCatalogRes,
|
||||||
@@ -85,9 +83,6 @@ export class CatalogController {
|
|||||||
PERMISSIONS_GROUPS.CATALOG.permissions.GET,
|
PERMISSIONS_GROUPS.CATALOG.permissions.GET,
|
||||||
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
||||||
)
|
)
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.CATALOG
|
|
||||||
)
|
|
||||||
async searchCatalog(
|
async searchCatalog(
|
||||||
@User() user: RequestUser,
|
@User() user: RequestUser,
|
||||||
@Query() query: ICatalogAllRequest,
|
@Query() query: ICatalogAllRequest,
|
||||||
@@ -127,9 +122,6 @@ export class CatalogController {
|
|||||||
PERMISSIONS_GROUPS.CATALOG.permissions.GET,
|
PERMISSIONS_GROUPS.CATALOG.permissions.GET,
|
||||||
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
||||||
)
|
)
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.CATALOG
|
|
||||||
)
|
|
||||||
async dowloadAsserts(
|
async dowloadAsserts(
|
||||||
@User() user: RequestUser,
|
@User() user: RequestUser,
|
||||||
@Query() query: ICatalogAllRequest,
|
@Query() query: ICatalogAllRequest,
|
||||||
@@ -173,9 +165,6 @@ export class CatalogController {
|
|||||||
|
|
||||||
@ApiInternalOnlyEndpoint()
|
@ApiInternalOnlyEndpoint()
|
||||||
@Get('data-asset')
|
@Get('data-asset')
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.CATALOG
|
|
||||||
)
|
|
||||||
async findByPipelineAndObject(@User() user: RequestUser, @Query() query) {
|
async findByPipelineAndObject(@User() user: RequestUser, @Query() query) {
|
||||||
const { username, user_id, customer_id, customer_name, permissions } = user;
|
const { username, user_id, customer_id, customer_name, permissions } = user;
|
||||||
const { pipeline, object } = query;
|
const { pipeline, object } = query;
|
||||||
@@ -234,9 +223,6 @@ export class CatalogController {
|
|||||||
PERMISSIONS_GROUPS.CATALOG.permissions.GET,
|
PERMISSIONS_GROUPS.CATALOG.permissions.GET,
|
||||||
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
||||||
)
|
)
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.CATALOG
|
|
||||||
)
|
|
||||||
async findAllTags(@Body() body) {
|
async findAllTags(@Body() body) {
|
||||||
this.logger.info(`/catalog - ON FIND ALL TAGS ROUTE`, {
|
this.logger.info(`/catalog - ON FIND ALL TAGS ROUTE`, {
|
||||||
user: body.info.user_id,
|
user: body.info.user_id,
|
||||||
@@ -283,31 +269,11 @@ export class CatalogController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get('custom-properties')
|
|
||||||
@RequireSomePermission(
|
|
||||||
PERMISSIONS_GROUPS.CATALOG.permissions.GET,
|
|
||||||
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
|
||||||
)
|
|
||||||
async getCustomPropertyDefinitions(@User() user: RequestUser) {
|
|
||||||
const { customer_id, customer_name, user_id, username } = user;
|
|
||||||
const metadata = PackTheMetadata({
|
|
||||||
customer_id,
|
|
||||||
customer_name,
|
|
||||||
user_id,
|
|
||||||
username,
|
|
||||||
});
|
|
||||||
|
|
||||||
return this.catalogService.getCustomPropertyDefinitions(metadata);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Get('data-asset/:id')
|
@Get('data-asset/:id')
|
||||||
@RequireSomePermission(
|
@RequireSomePermission(
|
||||||
PERMISSIONS_GROUPS.CATALOG.permissions.GET,
|
PERMISSIONS_GROUPS.CATALOG.permissions.GET,
|
||||||
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
||||||
)
|
)
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.CATALOG
|
|
||||||
)
|
|
||||||
async getDataAsset(
|
async getDataAsset(
|
||||||
@User() user: RequestUser,
|
@User() user: RequestUser,
|
||||||
@Param('id') id: string,
|
@Param('id') id: string,
|
||||||
@@ -419,9 +385,6 @@ export class CatalogController {
|
|||||||
PERMISSIONS_GROUPS.CATALOG.permissions.GET,
|
PERMISSIONS_GROUPS.CATALOG.permissions.GET,
|
||||||
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
||||||
)
|
)
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.CATALOG
|
|
||||||
)
|
|
||||||
async getDataAssetColumnsMetadata(
|
async getDataAssetColumnsMetadata(
|
||||||
@User() user: RequestUser,
|
@User() user: RequestUser,
|
||||||
@Language() language: LanguageEnum,
|
@Language() language: LanguageEnum,
|
||||||
@@ -453,9 +416,6 @@ export class CatalogController {
|
|||||||
PERMISSIONS_GROUPS.CATALOG.permissions.GET,
|
PERMISSIONS_GROUPS.CATALOG.permissions.GET,
|
||||||
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
||||||
)
|
)
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.CATALOG
|
|
||||||
)
|
|
||||||
async getDataAssetPreview(
|
async getDataAssetPreview(
|
||||||
@User() user: RequestUser,
|
@User() user: RequestUser,
|
||||||
@Language() language: LanguageEnum,
|
@Language() language: LanguageEnum,
|
||||||
@@ -487,9 +447,6 @@ export class CatalogController {
|
|||||||
PERMISSIONS_GROUPS.CATALOG.permissions.GET,
|
PERMISSIONS_GROUPS.CATALOG.permissions.GET,
|
||||||
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
||||||
)
|
)
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.CATALOG
|
|
||||||
)
|
|
||||||
async getDataAssetDocs(
|
async getDataAssetDocs(
|
||||||
@User() user: RequestUser,
|
@User() user: RequestUser,
|
||||||
@Language() language: LanguageEnum,
|
@Language() language: LanguageEnum,
|
||||||
@@ -521,9 +478,6 @@ export class CatalogController {
|
|||||||
PERMISSIONS_GROUPS.CATALOG.permissions.UPDATE,
|
PERMISSIONS_GROUPS.CATALOG.permissions.UPDATE,
|
||||||
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
||||||
)
|
)
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.CATALOG
|
|
||||||
)
|
|
||||||
async updateDataAsset(
|
async updateDataAsset(
|
||||||
@User() user: RequestUser,
|
@User() user: RequestUser,
|
||||||
@Language() language: LanguageEnum,
|
@Language() language: LanguageEnum,
|
||||||
@@ -539,8 +493,6 @@ export class CatalogController {
|
|||||||
language,
|
language,
|
||||||
});
|
});
|
||||||
|
|
||||||
delete (body as any).certification_status;
|
|
||||||
|
|
||||||
const result = await this.catalogService.updateOneDataAsset({
|
const result = await this.catalogService.updateOneDataAsset({
|
||||||
body,
|
body,
|
||||||
data_asset_id,
|
data_asset_id,
|
||||||
@@ -554,44 +506,11 @@ export class CatalogController {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Put('data-asset/:id/certification-status')
|
|
||||||
@RequireSomePermission(
|
|
||||||
PERMISSIONS_GROUPS.CATALOG.permissions.CERTIFY,
|
|
||||||
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
|
||||||
)
|
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.CATALOG
|
|
||||||
)
|
|
||||||
async updateDataAssetCertificationStatus(
|
|
||||||
@User() user: RequestUser,
|
|
||||||
@Language() language: LanguageEnum,
|
|
||||||
@Param('id') data_asset_id: string,
|
|
||||||
@Body(new ValidationPipe()) body: IUpdateCertificationStatusRequest,
|
|
||||||
): Promise<IUpdateCertificationStatusRequest> {
|
|
||||||
const { customer_id, customer_name, user_id, username } = user;
|
|
||||||
const metadata = PackTheMetadata({
|
|
||||||
customer_id,
|
|
||||||
customer_name,
|
|
||||||
user_id,
|
|
||||||
username,
|
|
||||||
language,
|
|
||||||
});
|
|
||||||
|
|
||||||
return this.catalogService.updateCertificationStatus({
|
|
||||||
body,
|
|
||||||
data_asset_id,
|
|
||||||
metadata,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Post('data-asset/:id/docs')
|
@Post('data-asset/:id/docs')
|
||||||
@RequireSomePermission(
|
@RequireSomePermission(
|
||||||
PERMISSIONS_GROUPS.CATALOG.permissions.UPDATE,
|
PERMISSIONS_GROUPS.CATALOG.permissions.UPDATE,
|
||||||
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
||||||
)
|
)
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.CATALOG
|
|
||||||
)
|
|
||||||
async manageDataAssetDocs(
|
async manageDataAssetDocs(
|
||||||
@User() user: RequestUser,
|
@User() user: RequestUser,
|
||||||
@Headers() headers,
|
@Headers() headers,
|
||||||
@@ -629,9 +548,6 @@ export class CatalogController {
|
|||||||
|
|
||||||
@ApiInternalOnlyEndpoint()
|
@ApiInternalOnlyEndpoint()
|
||||||
@Put('data-asset/:id/manage-permissions')
|
@Put('data-asset/:id/manage-permissions')
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.CATALOG
|
|
||||||
)
|
|
||||||
async manageDataAssetPermissions(
|
async manageDataAssetPermissions(
|
||||||
@Param('id') id: string,
|
@Param('id') id: string,
|
||||||
@User() user: RequestUser,
|
@User() user: RequestUser,
|
||||||
@@ -654,9 +570,6 @@ export class CatalogController {
|
|||||||
|
|
||||||
@ApiInternalOnlyEndpoint()
|
@ApiInternalOnlyEndpoint()
|
||||||
@Put('data-asset/:id/revoke-permissions')
|
@Put('data-asset/:id/revoke-permissions')
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.CATALOG
|
|
||||||
)
|
|
||||||
async revokeDataAssetPermissions(
|
async revokeDataAssetPermissions(
|
||||||
@Param('id') id: string,
|
@Param('id') id: string,
|
||||||
@User() user: RequestUser,
|
@User() user: RequestUser,
|
||||||
@@ -682,9 +595,6 @@ export class CatalogController {
|
|||||||
PERMISSIONS_GROUPS.CATALOG.permissions.CREATE,
|
PERMISSIONS_GROUPS.CATALOG.permissions.CREATE,
|
||||||
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
||||||
)
|
)
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.CATALOG
|
|
||||||
)
|
|
||||||
async createDataAsset(
|
async createDataAsset(
|
||||||
@User() user: RequestUser,
|
@User() user: RequestUser,
|
||||||
@Body() body: ICreateDataAsset,
|
@Body() body: ICreateDataAsset,
|
||||||
@@ -709,9 +619,6 @@ export class CatalogController {
|
|||||||
PERMISSIONS_GROUPS.CATALOG.permissions.UPDATE,
|
PERMISSIONS_GROUPS.CATALOG.permissions.UPDATE,
|
||||||
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
||||||
)
|
)
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.CATALOG
|
|
||||||
)
|
|
||||||
async commentOnDataAsset(
|
async commentOnDataAsset(
|
||||||
@Param('id') id: string,
|
@Param('id') id: string,
|
||||||
@User() user: RequestUser,
|
@User() user: RequestUser,
|
||||||
@@ -738,9 +645,6 @@ export class CatalogController {
|
|||||||
PERMISSIONS_GROUPS.CATALOG.permissions.DELETE,
|
PERMISSIONS_GROUPS.CATALOG.permissions.DELETE,
|
||||||
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
||||||
)
|
)
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.CATALOG
|
|
||||||
)
|
|
||||||
async deleteDataAsset(@Param('id') id: string, @User() user: RequestUser) {
|
async deleteDataAsset(@Param('id') id: string, @User() user: RequestUser) {
|
||||||
const { customer_id, customer_name, user_id, username } = user;
|
const { customer_id, customer_name, user_id, username } = user;
|
||||||
const metadata = PackTheMetadata({
|
const metadata = PackTheMetadata({
|
||||||
@@ -762,9 +666,6 @@ export class CatalogController {
|
|||||||
PERMISSIONS_GROUPS.CATALOG.permissions.UPDATE,
|
PERMISSIONS_GROUPS.CATALOG.permissions.UPDATE,
|
||||||
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
||||||
)
|
)
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.CATALOG
|
|
||||||
)
|
|
||||||
async deleteComment(
|
async deleteComment(
|
||||||
@Param('id') id: string,
|
@Param('id') id: string,
|
||||||
@User() user: RequestUser,
|
@User() user: RequestUser,
|
||||||
@@ -918,9 +819,6 @@ export class CatalogController {
|
|||||||
|
|
||||||
@Get('nimbus-dashboards')
|
@Get('nimbus-dashboards')
|
||||||
@RequireAllPermissions(PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER)
|
@RequireAllPermissions(PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER)
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.CATALOG
|
|
||||||
)
|
|
||||||
async getNimbusDashboards(
|
async getNimbusDashboards(
|
||||||
@User() user: RequestUser,
|
@User() user: RequestUser,
|
||||||
@Body() body: GetNimbusDashboardsRequest,
|
@Body() body: GetNimbusDashboardsRequest,
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import {
|
|||||||
AssetReporter,
|
AssetReporter,
|
||||||
BatchRemoveRlsRulesRequest,
|
BatchRemoveRlsRulesRequest,
|
||||||
CreateDataDocsDTO,
|
CreateDataDocsDTO,
|
||||||
IUpdateCertificationStatusRequest,
|
|
||||||
IUpdateDataRequest,
|
IUpdateDataRequest,
|
||||||
TriggerCatalogReq,
|
TriggerCatalogReq,
|
||||||
} from './dtos';
|
} from './dtos';
|
||||||
@@ -120,10 +119,6 @@ class CatalogService implements OnModuleInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async getCustomPropertyDefinitions(metadata: Metadata) {
|
|
||||||
return lastValueFrom(this.catalogReadService.GetCustomPropertyDefinitions({}, metadata));
|
|
||||||
}
|
|
||||||
|
|
||||||
async createDataAsset(data: Messages.CreateDataAssetRequest, metadata) {
|
async createDataAsset(data: Messages.CreateDataAssetRequest, metadata) {
|
||||||
this.logger.info('CatalogService - Manage Data assets permissions');
|
this.logger.info('CatalogService - Manage Data assets permissions');
|
||||||
if (!data.embed) data.embed = undefined;
|
if (!data.embed) data.embed = undefined;
|
||||||
@@ -389,28 +384,6 @@ class CatalogService implements OnModuleInit {
|
|||||||
return { data_asset: asset[0] };
|
return { data_asset: asset[0] };
|
||||||
}
|
}
|
||||||
|
|
||||||
async updateCertificationStatus(data: {
|
|
||||||
data_asset_id: string;
|
|
||||||
body: IUpdateCertificationStatusRequest;
|
|
||||||
metadata: Metadata;
|
|
||||||
}) {
|
|
||||||
const { body, data_asset_id, metadata } = data;
|
|
||||||
|
|
||||||
await lastValueFrom(
|
|
||||||
this.catalogWriteService.UpdateDataAsset(
|
|
||||||
{
|
|
||||||
id: data_asset_id,
|
|
||||||
changes: JSON.stringify({
|
|
||||||
certification_status: body.certification_status,
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
metadata,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
return { certification_status: body.certification_status };
|
|
||||||
}
|
|
||||||
|
|
||||||
async updateOneDataAsset(data: {
|
async updateOneDataAsset(data: {
|
||||||
data_asset_id: string;
|
data_asset_id: string;
|
||||||
customer_id: string;
|
customer_id: string;
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
import { ApiProperty, ApiPropertyOptional, PickType } from '@nestjs/swagger';
|
import { ApiProperty, ApiPropertyOptional, PickType } from '@nestjs/swagger';
|
||||||
import {
|
|
||||||
IsEnum,
|
|
||||||
IsNotEmpty,
|
|
||||||
IsOptional,
|
|
||||||
IsString,
|
|
||||||
} from 'class-validator';
|
|
||||||
import { CreateDataAssetRequest } from '@dadosfera/protospack-v2/dist/lib/Catalog/interfaces/messages';
|
import { CreateDataAssetRequest } from '@dadosfera/protospack-v2/dist/lib/Catalog/interfaces/messages';
|
||||||
|
|
||||||
export enum DataAssetShareType {
|
export enum DataAssetShareType {
|
||||||
@@ -12,12 +6,6 @@ export enum DataAssetShareType {
|
|||||||
public = 'public',
|
public = 'public',
|
||||||
private = 'private',
|
private = 'private',
|
||||||
}
|
}
|
||||||
export enum CertificationStatus {
|
|
||||||
draft = 'draft',
|
|
||||||
in_review = 'in_review',
|
|
||||||
approved = 'approved',
|
|
||||||
deprecated = 'deprecated',
|
|
||||||
}
|
|
||||||
export enum OrderEnum {
|
export enum OrderEnum {
|
||||||
asc = 'asc',
|
asc = 'asc',
|
||||||
desc = 'desc',
|
desc = 'desc',
|
||||||
@@ -203,27 +191,6 @@ export class IData {
|
|||||||
day_opening: number;
|
day_opening: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export enum CustomPropertyType {
|
|
||||||
TEXT = 'text',
|
|
||||||
NUMBER = 'number',
|
|
||||||
DATE = 'date',
|
|
||||||
BOOLEAN = 'boolean',
|
|
||||||
}
|
|
||||||
|
|
||||||
export class CustomPropertyDto {
|
|
||||||
@ApiProperty()
|
|
||||||
key: string;
|
|
||||||
@ApiProperty()
|
|
||||||
value: string;
|
|
||||||
@ApiProperty({ enum: CustomPropertyType })
|
|
||||||
type: CustomPropertyType;
|
|
||||||
@ApiPropertyOptional()
|
|
||||||
color?: string;
|
|
||||||
@ApiPropertyOptional()
|
|
||||||
emoji?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class IUpdateDataRequest {
|
export class IUpdateDataRequest {
|
||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
name: string;
|
name: string;
|
||||||
@@ -237,16 +204,7 @@ export class IUpdateDataRequest {
|
|||||||
share_type?: DataAssetShareType;
|
share_type?: DataAssetShareType;
|
||||||
@ApiPropertyOptional()
|
@ApiPropertyOptional()
|
||||||
docs?: string;
|
docs?: string;
|
||||||
@ApiPropertyOptional({ type: [CustomPropertyDto] })
|
|
||||||
custom_properties?: CustomPropertyDto[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class IUpdateCertificationStatusRequest {
|
|
||||||
@ApiProperty({ enum: CertificationStatus })
|
|
||||||
@IsEnum(CertificationStatus)
|
|
||||||
certification_status: CertificationStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class ICreateDataAsset implements CreateDataAssetRequest {
|
export class ICreateDataAsset implements CreateDataAssetRequest {
|
||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
display_name: string;
|
display_name: string;
|
||||||
|
|||||||
@@ -24,19 +24,15 @@ import {
|
|||||||
GetTableMetadataReq,
|
GetTableMetadataReq,
|
||||||
} from './dto/connection-test';
|
} from './dto/connection-test';
|
||||||
import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
||||||
import { Authenticated, RequireModule } from 'src/decorators/authentication.decorator';
|
import { Authenticated } from 'src/decorators/authentication.decorator';
|
||||||
import { GrpcToHttpExceptionFilter } from 'src/error/grpc-to-http-exception.filter';
|
import { GrpcToHttpExceptionFilter } from 'src/error/grpc-to-http-exception.filter';
|
||||||
import { ApiInternalOnlyController } from 'src/decorators/swagger.decorator';
|
import { ApiInternalOnlyController } from 'src/decorators/swagger.decorator';
|
||||||
import { DADOSFERA_MODULES_KEYS } from 'src/authentication/permissions.enum';
|
|
||||||
|
|
||||||
@ApiInternalOnlyController()
|
@ApiInternalOnlyController()
|
||||||
@ApiTags('Connection Test')
|
@ApiTags('Connection Test')
|
||||||
@Controller('connection-test')
|
@Controller('connection-test')
|
||||||
@UseFilters(new GrpcToHttpExceptionFilter())
|
@UseFilters(new GrpcToHttpExceptionFilter())
|
||||||
@Authenticated()
|
@Authenticated()
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.COLLECT
|
|
||||||
)
|
|
||||||
export class ConnectionTestController {
|
export class ConnectionTestController {
|
||||||
logger: any;
|
logger: any;
|
||||||
constructor(
|
constructor(
|
||||||
|
|||||||
@@ -16,9 +16,8 @@ import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
|||||||
import {
|
import {
|
||||||
Authenticated,
|
Authenticated,
|
||||||
RequireAllPermissions,
|
RequireAllPermissions,
|
||||||
RequireModule,
|
|
||||||
} from 'src/decorators/authentication.decorator';
|
} from 'src/decorators/authentication.decorator';
|
||||||
import { DADOSFERA_MODULES_KEYS, PERMISSIONS_GROUPS } from 'src/authentication/permissions.enum';
|
import { PERMISSIONS_GROUPS } from 'src/authentication/permissions.enum';
|
||||||
import { RequestUser, User } from 'src/decorators/user.decorator';
|
import { RequestUser, User } from 'src/decorators/user.decorator';
|
||||||
import { ValidationPipe } from '../../pipes/object-validation.pipe';
|
import { ValidationPipe } from '../../pipes/object-validation.pipe';
|
||||||
import {
|
import {
|
||||||
@@ -40,9 +39,6 @@ const connectionPermissions = PERMISSIONS_GROUPS.CONNECTION.permissions;
|
|||||||
@ApiTags('connections')
|
@ApiTags('connections')
|
||||||
@Authenticated()
|
@Authenticated()
|
||||||
@Controller('connections')
|
@Controller('connections')
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.COLLECT
|
|
||||||
)
|
|
||||||
export class ConnectionController {
|
export class ConnectionController {
|
||||||
logger: any;
|
logger: any;
|
||||||
constructor(
|
constructor(
|
||||||
|
|||||||
@@ -25,10 +25,9 @@ import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
|||||||
import {
|
import {
|
||||||
Authenticated,
|
Authenticated,
|
||||||
RequireAllPermissions,
|
RequireAllPermissions,
|
||||||
RequireModule,
|
|
||||||
RequireSomePermission,
|
RequireSomePermission,
|
||||||
} from 'src/decorators/authentication.decorator';
|
} from 'src/decorators/authentication.decorator';
|
||||||
import { DADOSFERA_MODULES_KEYS, PERMISSIONS_GROUPS } from 'src/authentication/permissions.enum';
|
import { PERMISSIONS_GROUPS } from 'src/authentication/permissions.enum';
|
||||||
import { Language } from 'src/decorators/language.decorator';
|
import { Language } from 'src/decorators/language.decorator';
|
||||||
import { LanguageEnum } from 'src/utils/languages.enum';
|
import { LanguageEnum } from 'src/utils/languages.enum';
|
||||||
import { ApiInternalOnlyController } from 'src/decorators/swagger.decorator';
|
import { ApiInternalOnlyController } from 'src/decorators/swagger.decorator';
|
||||||
@@ -100,9 +99,6 @@ export class ConnectorController {
|
|||||||
PERMISSIONS_GROUPS.PIPELINE.permissions.UPDATE,
|
PERMISSIONS_GROUPS.PIPELINE.permissions.UPDATE,
|
||||||
PERMISSIONS_GROUPS.PIPELINE.permissions.DELETE,
|
PERMISSIONS_GROUPS.PIPELINE.permissions.DELETE,
|
||||||
)
|
)
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.COLLECT
|
|
||||||
)
|
|
||||||
async getAllConnectors(
|
async getAllConnectors(
|
||||||
@Language() language: LanguageEnum,
|
@Language() language: LanguageEnum,
|
||||||
@Query() queries: GetAllDto,
|
@Query() queries: GetAllDto,
|
||||||
@@ -135,9 +131,6 @@ export class ConnectorController {
|
|||||||
PERMISSIONS_GROUPS.PIPELINE.permissions.UPDATE,
|
PERMISSIONS_GROUPS.PIPELINE.permissions.UPDATE,
|
||||||
PERMISSIONS_GROUPS.PIPELINE.permissions.DELETE,
|
PERMISSIONS_GROUPS.PIPELINE.permissions.DELETE,
|
||||||
)
|
)
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.COLLECT
|
|
||||||
)
|
|
||||||
async getConnectorsTags() {
|
async getConnectorsTags() {
|
||||||
return await this.connectorClientService.getConnectorsTags();
|
return await this.connectorClientService.getConnectorsTags();
|
||||||
}
|
}
|
||||||
@@ -150,9 +143,6 @@ export class ConnectorController {
|
|||||||
PERMISSIONS_GROUPS.PIPELINE.permissions.UPDATE,
|
PERMISSIONS_GROUPS.PIPELINE.permissions.UPDATE,
|
||||||
PERMISSIONS_GROUPS.PIPELINE.permissions.DELETE,
|
PERMISSIONS_GROUPS.PIPELINE.permissions.DELETE,
|
||||||
)
|
)
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.COLLECT
|
|
||||||
)
|
|
||||||
async getConnector(
|
async getConnector(
|
||||||
@Language() language: LanguageEnum,
|
@Language() language: LanguageEnum,
|
||||||
@Param('plugin') plugin: string,
|
@Param('plugin') plugin: string,
|
||||||
@@ -181,9 +171,6 @@ export class ConnectorController {
|
|||||||
PERMISSIONS_GROUPS.PIPELINE.permissions.UPDATE,
|
PERMISSIONS_GROUPS.PIPELINE.permissions.UPDATE,
|
||||||
PERMISSIONS_GROUPS.PIPELINE.permissions.DELETE,
|
PERMISSIONS_GROUPS.PIPELINE.permissions.DELETE,
|
||||||
)
|
)
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.COLLECT
|
|
||||||
)
|
|
||||||
async getConnectorDetails(
|
async getConnectorDetails(
|
||||||
@Language() language: LanguageEnum,
|
@Language() language: LanguageEnum,
|
||||||
@Param('plugin') plugin: string,
|
@Param('plugin') plugin: string,
|
||||||
@@ -206,9 +193,6 @@ export class ConnectorController {
|
|||||||
@Put('/:plugin')
|
@Put('/:plugin')
|
||||||
@RequireAllPermissions(PERMISSIONS_GROUPS.CONNECTORS.permissions.UPDATE)
|
@RequireAllPermissions(PERMISSIONS_GROUPS.CONNECTORS.permissions.UPDATE)
|
||||||
@ApiConsumes('multipart/form-data')
|
@ApiConsumes('multipart/form-data')
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.COLLECT
|
|
||||||
)
|
|
||||||
async updateConnector(
|
async updateConnector(
|
||||||
@Param('plugin') plugin: string,
|
@Param('plugin') plugin: string,
|
||||||
@Body() body: UpdateDto,
|
@Body() body: UpdateDto,
|
||||||
@@ -230,9 +214,6 @@ export class ConnectorController {
|
|||||||
|
|
||||||
@Put('/:plugin/add-tag')
|
@Put('/:plugin/add-tag')
|
||||||
@RequireAllPermissions(PERMISSIONS_GROUPS.CONNECTORS.permissions.UPDATE)
|
@RequireAllPermissions(PERMISSIONS_GROUPS.CONNECTORS.permissions.UPDATE)
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.COLLECT
|
|
||||||
)
|
|
||||||
async addTagOnConnector(
|
async addTagOnConnector(
|
||||||
@Param('plugin') plugin: string,
|
@Param('plugin') plugin: string,
|
||||||
@Body() body: AddTagDto,
|
@Body() body: AddTagDto,
|
||||||
@@ -260,9 +241,6 @@ export class ConnectorController {
|
|||||||
|
|
||||||
@Put('/:plugin/remove-tag')
|
@Put('/:plugin/remove-tag')
|
||||||
@RequireAllPermissions(PERMISSIONS_GROUPS.CONNECTORS.permissions.UPDATE)
|
@RequireAllPermissions(PERMISSIONS_GROUPS.CONNECTORS.permissions.UPDATE)
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.COLLECT
|
|
||||||
)
|
|
||||||
async removeTagOnConnector(
|
async removeTagOnConnector(
|
||||||
@Param('plugin') plugin: string,
|
@Param('plugin') plugin: string,
|
||||||
@Body() body: RemoveTagDto,
|
@Body() body: RemoveTagDto,
|
||||||
@@ -291,9 +269,6 @@ export class ConnectorController {
|
|||||||
|
|
||||||
@Delete('/:plugin')
|
@Delete('/:plugin')
|
||||||
@RequireAllPermissions(PERMISSIONS_GROUPS.CONNECTORS.permissions.DELETE)
|
@RequireAllPermissions(PERMISSIONS_GROUPS.CONNECTORS.permissions.DELETE)
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.COLLECT
|
|
||||||
)
|
|
||||||
async deleteConnector(
|
async deleteConnector(
|
||||||
@Param('plugin') plugin: string,
|
@Param('plugin') plugin: string,
|
||||||
@Query('version') version: string,
|
@Query('version') version: string,
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import {
|
|||||||
} from '@dadosfera/protospack-v2/dist/lib/Input/interfaces/messages';
|
} from '@dadosfera/protospack-v2/dist/lib/Input/interfaces/messages';
|
||||||
import { Info } from '@dadosfera/protospack-v2/dist/lib/Input/interfaces/entities';
|
import { Info } from '@dadosfera/protospack-v2/dist/lib/Input/interfaces/entities';
|
||||||
import { CreateInputReq } from './dtos/input.model';
|
import { CreateInputReq } from './dtos/input.model';
|
||||||
import { Metadata } from '@grpc/grpc-js';
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
|
||||||
@@ -74,10 +73,10 @@ export class InputsService {
|
|||||||
objectCamelToSnake(createInputResponse);
|
objectCamelToSnake(createInputResponse);
|
||||||
return createInputResponse;
|
return createInputResponse;
|
||||||
},
|
},
|
||||||
update: async (updateInputDTO: UpdateInputRequest, metadata: Metadata): Promise<InputUpdateResponse> => {
|
update: async (updateInputDTO: UpdateInputRequest): Promise<InputUpdateResponse> => {
|
||||||
this.logger.info('InputClientService - Update' + JSON.stringify(updateInputDTO));
|
this.logger.info('InputClientService - Update' + JSON.stringify(updateInputDTO));
|
||||||
const updateInputResponse = await lastValueFrom(
|
const updateInputResponse = await lastValueFrom(
|
||||||
this.inputWriteService.InputUpdate(updateInputDTO, metadata),
|
this.inputWriteService.InputUpdate(updateInputDTO),
|
||||||
);
|
);
|
||||||
|
|
||||||
return updateInputResponse;
|
return updateInputResponse;
|
||||||
@@ -207,7 +206,7 @@ export class InputsService {
|
|||||||
return findOneInputResponse;
|
return findOneInputResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
async update(id: string, data, info: Info, metadata?: Metadata) {
|
async update(id: string, data, info: Info) {
|
||||||
// this.validateCron({ ...data, info });
|
// this.validateCron({ ...data, info });
|
||||||
try {
|
try {
|
||||||
const {
|
const {
|
||||||
@@ -218,7 +217,7 @@ export class InputsService {
|
|||||||
id,
|
id,
|
||||||
...data,
|
...data,
|
||||||
info,
|
info,
|
||||||
}, metadata);
|
});
|
||||||
|
|
||||||
const updateInputResponse = this.adjustInputPayload(
|
const updateInputResponse = this.adjustInputPayload(
|
||||||
input,
|
input,
|
||||||
|
|||||||
@@ -25,10 +25,9 @@ import {
|
|||||||
} from '@nestjs/swagger';
|
} from '@nestjs/swagger';
|
||||||
import {
|
import {
|
||||||
RequireAllPermissions,
|
RequireAllPermissions,
|
||||||
RequireModule,
|
|
||||||
RequireSomePermission,
|
RequireSomePermission,
|
||||||
} from 'src/decorators/authentication.decorator';
|
} from 'src/decorators/authentication.decorator';
|
||||||
import { DADOSFERA_MODULES_KEYS, PERMISSIONS_GROUPS } from '../../authentication/permissions.enum';
|
import { PERMISSIONS_GROUPS } from '../../authentication/permissions.enum';
|
||||||
import { PipelinesService } from './pipelines.service';
|
import { PipelinesService } from './pipelines.service';
|
||||||
import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
||||||
import { Messages } from '@dadosfera/protospack-v2/dist/lib/PipelineV2';
|
import { Messages } from '@dadosfera/protospack-v2/dist/lib/PipelineV2';
|
||||||
@@ -58,9 +57,6 @@ type PipelineTablesConfig = { input_id?: string; tables: PipelineTable[] };
|
|||||||
@ApiHeaders([{ name: 'dadosfera-lang', enum: LanguageEnum, required: false }])
|
@ApiHeaders([{ name: 'dadosfera-lang', enum: LanguageEnum, required: false }])
|
||||||
@UseFilters(new GrpcToHttpExceptionFilter())
|
@UseFilters(new GrpcToHttpExceptionFilter())
|
||||||
@Controller('pipelinesV2')
|
@Controller('pipelinesV2')
|
||||||
@RequireModule(
|
|
||||||
DADOSFERA_MODULES_KEYS.COLLECT
|
|
||||||
)
|
|
||||||
export class PipelinesController {
|
export class PipelinesController {
|
||||||
logger: DadosferaLogger;
|
logger: DadosferaLogger;
|
||||||
constructor(
|
constructor(
|
||||||
@@ -321,6 +317,7 @@ export class PipelinesController {
|
|||||||
) {
|
) {
|
||||||
this.logger.info('PipelinesController - update', { user });
|
this.logger.info('PipelinesController - update', { user });
|
||||||
|
|
||||||
|
const { customer_id, customer_name, user_id, username } = user;
|
||||||
const info: Info = {
|
const info: Info = {
|
||||||
user_id: user.user_id,
|
user_id: user.user_id,
|
||||||
customer: user.customer_name,
|
customer: user.customer_name,
|
||||||
@@ -328,7 +325,13 @@ export class PipelinesController {
|
|||||||
pipeline_id: pipelineId
|
pipeline_id: pipelineId
|
||||||
};
|
};
|
||||||
|
|
||||||
const metadata = PackTheMetadata(user);
|
const metadata = PackTheMetadata({
|
||||||
|
customer_id,
|
||||||
|
customer_name,
|
||||||
|
user_id,
|
||||||
|
username,
|
||||||
|
language,
|
||||||
|
});
|
||||||
|
|
||||||
const response = await this.pipelinesClientService.updatePipelineInput(
|
const response = await this.pipelinesClientService.updatePipelineInput(
|
||||||
pipelineId,
|
pipelineId,
|
||||||
|
|||||||
@@ -383,8 +383,7 @@ export class PipelinesService implements OnModuleInit {
|
|||||||
const updateInputResponse = await this.inputsService.update(
|
const updateInputResponse = await this.inputsService.update(
|
||||||
inputId,
|
inputId,
|
||||||
updateInputDTO,
|
updateInputDTO,
|
||||||
info,
|
info
|
||||||
metadata
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const inputRollback = () => {
|
const inputRollback = () => {
|
||||||
@@ -405,36 +404,34 @@ export class PipelinesService implements OnModuleInit {
|
|||||||
|
|
||||||
const nimbusUpdates = updateInputResponse?.tablesUpdate || [];
|
const nimbusUpdates = updateInputResponse?.tablesUpdate || [];
|
||||||
|
|
||||||
if (user.customer_modules.includes('catalog')) {
|
nimbusUpdates.forEach(update => {
|
||||||
nimbusUpdates.forEach(update => {
|
const nimbusRollback = () => {
|
||||||
const nimbusRollback = () => {
|
return this.nimbusService.renameTable(
|
||||||
return this.nimbusService.renameTable(
|
info.customer,
|
||||||
info.customer,
|
update.database,
|
||||||
update.database,
|
{
|
||||||
{
|
table_name: update.table_name,
|
||||||
table_name: update.table_name,
|
table_schema: update.table_schema
|
||||||
table_schema: update.table_schema
|
},
|
||||||
},
|
{
|
||||||
{
|
table_name: update.old_table_name,
|
||||||
table_name: update.old_table_name,
|
table_schema: update.old_table_schema
|
||||||
table_schema: update.old_table_schema
|
}
|
||||||
}
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
rollback.push(nimbusRollback);
|
|
||||||
});
|
|
||||||
|
|
||||||
try {
|
|
||||||
await this.updateNimbus(info.customer, nimbusUpdates);
|
|
||||||
} catch (error) {
|
|
||||||
this.logger.error(error);
|
|
||||||
if (error instanceof AxiosError) {
|
|
||||||
this.logger.error(JSON.stringify(error.response.data));
|
|
||||||
}
|
|
||||||
await this.executeRenameRollback(rollback);
|
|
||||||
|
|
||||||
throw new Error("Error Nimbus updating tables");
|
|
||||||
}
|
}
|
||||||
|
rollback.push(nimbusRollback);
|
||||||
|
});
|
||||||
|
|
||||||
|
try {
|
||||||
|
await this.updateNimbus(info.customer, nimbusUpdates);
|
||||||
|
} catch (error) {
|
||||||
|
this.logger.error(error);
|
||||||
|
if (error instanceof AxiosError) {
|
||||||
|
this.logger.error(JSON.stringify(error.response.data));
|
||||||
|
}
|
||||||
|
await this.executeRenameRollback(rollback);
|
||||||
|
|
||||||
|
throw new Error("Error Nimbus updating tables");
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -20,11 +20,10 @@ import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
|||||||
import {
|
import {
|
||||||
Authenticated,
|
Authenticated,
|
||||||
RequireAllPermissions,
|
RequireAllPermissions,
|
||||||
RequireModule,
|
|
||||||
} from '../../decorators/authentication.decorator';
|
} from '../../decorators/authentication.decorator';
|
||||||
import { User, RequestUser } from '../../decorators/user.decorator';
|
import { User, RequestUser } from '../../decorators/user.decorator';
|
||||||
import { PlatformApiService } from './platform-api.service';
|
import { PlatformApiService } from './platform-api.service';
|
||||||
import { DADOSFERA_MODULES_KEYS, PERMISSIONS_GROUPS } from '../../authentication/permissions.enum';
|
import { PERMISSIONS_GROUPS } from '../../authentication/permissions.enum';
|
||||||
import { ElasticsearchService } from '../../services/elasticsearch';
|
import { ElasticsearchService } from '../../services/elasticsearch';
|
||||||
import { DynamoDBService, ReferenceColumn } from '../../services/dynamodb';
|
import { DynamoDBService, ReferenceColumn } from '../../services/dynamodb';
|
||||||
import { CustomersService } from '../customers/customers.service';
|
import { CustomersService } from '../customers/customers.service';
|
||||||
@@ -50,7 +49,6 @@ type RenameTablesBody = {
|
|||||||
|
|
||||||
@ApiTags('Platform API')
|
@ApiTags('Platform API')
|
||||||
@Controller('platform')
|
@Controller('platform')
|
||||||
@RequireModule(DADOSFERA_MODULES_KEYS.COLLECT)
|
|
||||||
export class PlatformApiController {
|
export class PlatformApiController {
|
||||||
private logger: any;
|
private logger: any;
|
||||||
|
|
||||||
@@ -834,6 +832,24 @@ export class PlatformApiController {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Get('pipelines/:pipelineId/pipeline_run/:runId/jobs')
|
||||||
|
@ApiOperation({ summary: 'Get pipeline run jobs' })
|
||||||
|
@RequireAllPermissions(PERMISSIONS_GROUPS.PIPELINE.permissions.GET)
|
||||||
|
async getPipelineRunJobs(
|
||||||
|
@Param('pipelineId') pipelineId: string,
|
||||||
|
@Param('runId') runId: string,
|
||||||
|
@User() user: RequestUser,
|
||||||
|
) {
|
||||||
|
const normalizedPipelineId = this.normalizePipelineId(pipelineId);
|
||||||
|
const normalizedRunId = this.normalizePipelineId(runId);
|
||||||
|
|
||||||
|
return this.platformApiService.proxy(
|
||||||
|
'GET',
|
||||||
|
`/pipeline/${normalizedPipelineId}/pipeline_run/${normalizedRunId}/jobs`,
|
||||||
|
user,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// ==================== JOBS - COLUMN EDITING ROUTES ====================
|
// ==================== JOBS - COLUMN EDITING ROUTES ====================
|
||||||
|
|
||||||
@Put('jobs/:jobId/input')
|
@Put('jobs/:jobId/input')
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { Test, TestingModule } from '@nestjs/testing';
|
import { Test, TestingModule } from '@nestjs/testing';
|
||||||
import { ReleaseNoteController } from './release_note.controller';
|
import { ReleaseNoteController } from './release_note.controller';
|
||||||
import { ReleaseNoteService } from './release_note.service';
|
import { ReleaseNoteService } from './release_note.service';
|
||||||
import DadosferaLogger from '@dadosfera/dadosfera-logs';
|
|
||||||
|
|
||||||
describe('ReleaseNoteController', () => {
|
describe('ReleaseNoteController', () => {
|
||||||
let controller: ReleaseNoteController;
|
let controller: ReleaseNoteController;
|
||||||
@@ -9,7 +8,7 @@ describe('ReleaseNoteController', () => {
|
|||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
const module: TestingModule = await Test.createTestingModule({
|
const module: TestingModule = await Test.createTestingModule({
|
||||||
controllers: [ReleaseNoteController],
|
controllers: [ReleaseNoteController],
|
||||||
providers: [ReleaseNoteService, DadosferaLogger],
|
providers: [ReleaseNoteService],
|
||||||
}).compile();
|
}).compile();
|
||||||
|
|
||||||
controller = module.get<ReleaseNoteController>(ReleaseNoteController);
|
controller = module.get<ReleaseNoteController>(ReleaseNoteController);
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
import { Test, TestingModule } from '@nestjs/testing';
|
import { Test, TestingModule } from '@nestjs/testing';
|
||||||
import { ReleaseNoteService } from './release_note.service';
|
import { ReleaseNoteService } from './release_note.service';
|
||||||
import DadosferaLogger from '@dadosfera/dadosfera-logs';
|
|
||||||
|
|
||||||
describe('ReleaseNoteService', () => {
|
describe('ReleaseNoteService', () => {
|
||||||
let service: ReleaseNoteService;
|
let service: ReleaseNoteService;
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
const module: TestingModule = await Test.createTestingModule({
|
const module: TestingModule = await Test.createTestingModule({
|
||||||
providers: [ReleaseNoteService, DadosferaLogger],
|
providers: [ReleaseNoteService],
|
||||||
}).compile();
|
}).compile();
|
||||||
|
|
||||||
service = module.get<ReleaseNoteService>(ReleaseNoteService);
|
service = module.get<ReleaseNoteService>(ReleaseNoteService);
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ interface IMetadata {
|
|||||||
details?: string;
|
details?: string;
|
||||||
sensitive?: string;
|
sensitive?: string;
|
||||||
roles?: string[];
|
roles?: string[];
|
||||||
customer_modules?: string[];
|
|
||||||
is_data_manager?: boolean;
|
is_data_manager?: boolean;
|
||||||
access_token?: string;
|
access_token?: string;
|
||||||
host?: string;
|
host?: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user