mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-11 07:29:08 +00:00
Compare commits
65
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
94c9ab7939 | ||
|
|
a211b8593e | ||
|
|
25661613d5 | ||
|
|
3d8ea3576d | ||
|
|
e3a2eba5c3 | ||
|
|
81c446354b | ||
|
|
bf0314f5b1 | ||
|
|
c97180ac95 | ||
|
|
cac36f2c60 | ||
|
|
cd21fd0b7b | ||
|
|
a5a685ee3f | ||
|
|
a16fefe691 | ||
|
|
9c57485031 | ||
|
|
7051b21d86 | ||
|
|
0c4888ccdb | ||
|
|
e1b0e88bd8 | ||
|
|
cef1184908 | ||
|
|
31dda867d1 | ||
|
|
8a92da470c | ||
|
|
b89909ad66 | ||
|
|
2bb280e8de | ||
|
|
00cbadbb45 | ||
|
|
47ad527d38 | ||
|
|
51044a23b3 | ||
|
|
bb29d126c1 | ||
|
|
9d0f449eeb | ||
|
|
0eafa67e6f | ||
|
|
c3937472ec | ||
|
|
84d64424ca | ||
|
|
f0bfc5c94b | ||
|
|
ad86a6a698 | ||
|
|
af3b11ad54 | ||
|
|
15860519e1 | ||
|
|
cffda86eab | ||
|
|
a93fbfbbd9 | ||
|
|
e1cfc6e1a8 | ||
|
|
1e63df6536 | ||
|
|
8eb7fd0169 | ||
|
|
f8c6a8b747 | ||
|
|
8a9d6c2f9c | ||
|
|
bcb2a0b7cb | ||
|
|
2e181e70af | ||
|
|
ef615adb8e | ||
|
|
e03900811b | ||
|
|
5bc5fb0977 | ||
|
|
011032e3d4 | ||
|
|
17363e74f4 | ||
|
|
63efff6adf | ||
|
|
b5f569e522 | ||
|
|
5c77577992 | ||
|
|
4b9e113185 | ||
|
|
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
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ maestro:
|
|||||||
open_customer_id: f239718a-a271-4ef9-ae7e-02a2f0f3aa6e
|
open_customer_id: f239718a-a271-4ef9-ae7e-02a2f0f3aa6e
|
||||||
open_group_id: 401573bb-334f-44b2-b30e-88d4cea31ae9
|
open_group_id: 401573bb-334f-44b2-b30e-88d4cea31ae9
|
||||||
platform_api_url: https://oz8v2zid1e.execute-api.us-east-1.amazonaws.com
|
platform_api_url: https://oz8v2zid1e.execute-api.us-east-1.amazonaws.com
|
||||||
connections_api_url: https://wv6fw7ayj4.execute-api.us-east-1.amazonaws.com
|
|
||||||
storage_explorer_api_url: "https://storage-explorer-{customer}.dadosfera.ai/api"
|
storage_explorer_api_url: "https://storage-explorer-{customer}.dadosfera.ai/api"
|
||||||
dedicated_proxy: ""
|
dedicated_proxy: ""
|
||||||
restricted_ip: ""
|
restricted_ip: ""
|
||||||
@@ -57,6 +56,8 @@ maestro:
|
|||||||
redis_tls: "true"
|
redis_tls: "true"
|
||||||
cookie_secret: "13cc5e136d3074bcc05bec8697092ec1f5f376bf"
|
cookie_secret: "13cc5e136d3074bcc05bec8697092ec1f5f376bf"
|
||||||
firebase_base_url: https://feature-flag-25bf6-default-rtdb.firebaseio.com/prd
|
firebase_base_url: https://feature-flag-25bf6-default-rtdb.firebaseio.com/prd
|
||||||
|
connections_api_url: https://wv6fw7ayj4.execute-api.us-east-1.amazonaws.com
|
||||||
|
|
||||||
autoscaling:
|
autoscaling:
|
||||||
enabled: false
|
enabled: false
|
||||||
minReplicas: 1
|
minReplicas: 1
|
||||||
|
|||||||
+327
-2
@@ -900,6 +900,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -949,6 +952,9 @@
|
|||||||
"connections"
|
"connections"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -997,6 +1003,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -1033,6 +1042,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -1066,6 +1078,9 @@
|
|||||||
"connections"
|
"connections"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -2403,6 +2418,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -2486,6 +2504,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -2525,6 +2546,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -2564,6 +2588,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -2601,6 +2628,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -2640,6 +2670,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -2681,6 +2714,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -2722,6 +2758,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3071,6 +3110,9 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3120,6 +3162,9 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3190,6 +3235,9 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3230,6 +3278,9 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3270,6 +3321,9 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3310,6 +3364,9 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3350,6 +3407,9 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3397,6 +3457,9 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3442,6 +3505,9 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3490,6 +3556,9 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3528,6 +3597,9 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3586,6 +3658,9 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3634,6 +3709,9 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3674,6 +3752,9 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3716,6 +3797,9 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3765,6 +3849,9 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3814,6 +3901,9 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -3861,6 +3951,9 @@
|
|||||||
"PipelinesV2"
|
"PipelinesV2"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4031,6 +4124,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4056,6 +4152,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4092,6 +4191,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4126,6 +4228,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4160,6 +4265,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4187,6 +4295,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4214,6 +4325,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4241,6 +4355,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4277,6 +4394,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4313,6 +4433,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4340,6 +4463,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4367,6 +4493,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4404,6 +4533,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4440,6 +4572,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4484,6 +4619,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4520,6 +4658,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4564,6 +4705,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4574,6 +4718,7 @@
|
|||||||
"get": {
|
"get": {
|
||||||
"operationId": "PlatformApiController_getPipelineRunJobs",
|
"operationId": "PlatformApiController_getPipelineRunJobs",
|
||||||
"summary": "Get pipeline run jobs",
|
"summary": "Get pipeline run jobs",
|
||||||
|
"description": "Proxies platform-api DB-backed job runs and returns `{ jobs: [...] }`.",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "pipelineId",
|
"name": "pipelineId",
|
||||||
@@ -4594,11 +4739,22 @@
|
|||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "",
|
"description": "DB-backed job runs for the selected pipeline run.",
|
||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"jobs": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"jobs"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4644,6 +4800,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4678,6 +4837,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4714,6 +4876,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4750,6 +4915,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4787,6 +4955,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4814,6 +4985,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -4841,6 +5015,9 @@
|
|||||||
"Platform API"
|
"Platform API"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -5252,6 +5429,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -5295,6 +5475,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -5404,6 +5587,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -5436,6 +5622,9 @@
|
|||||||
"Catalog"
|
"Catalog"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -5478,6 +5667,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -5526,6 +5718,48 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/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",
|
||||||
@@ -5571,6 +5805,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -5629,6 +5866,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -5677,6 +5917,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -5770,6 +6013,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -5820,6 +6066,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -5878,6 +6127,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -5934,6 +6186,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -5994,6 +6249,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -6034,6 +6292,9 @@
|
|||||||
"Catalog"
|
"Catalog"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -6074,6 +6335,9 @@
|
|||||||
"Catalog"
|
"Catalog"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -6134,6 +6398,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -6192,6 +6459,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -6568,6 +6838,9 @@
|
|||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -7021,6 +7294,9 @@
|
|||||||
"Connection Test"
|
"Connection Test"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -7057,6 +7333,9 @@
|
|||||||
"Connection Test"
|
"Connection Test"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -7093,6 +7372,9 @@
|
|||||||
"Connection Test"
|
"Connection Test"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -7129,6 +7411,9 @@
|
|||||||
"Connection Test"
|
"Connection Test"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -7165,6 +7450,9 @@
|
|||||||
"Connection Test"
|
"Connection Test"
|
||||||
],
|
],
|
||||||
"security": [
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"access-token": []
|
"access-token": []
|
||||||
}
|
}
|
||||||
@@ -11033,6 +11321,37 @@
|
|||||||
"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": {
|
||||||
@@ -11061,6 +11380,12 @@
|
|||||||
},
|
},
|
||||||
"docs": {
|
"docs": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"custom_properties": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/CustomPropertyDto"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ const config: Config.InitialOptions = {
|
|||||||
'<rootDir>/node_modules/',
|
'<rootDir>/node_modules/',
|
||||||
'.*\\.module\\.[jt]s$',
|
'.*\\.module\\.[jt]s$',
|
||||||
],
|
],
|
||||||
|
setupFiles: ['<rootDir>/jest.setup.ts'],
|
||||||
// moduleDirectories: ['node_modules'], // default is already 'node_modules'
|
// moduleDirectories: ['node_modules'], // default is already 'node_modules'
|
||||||
// rootDir: '.', //No need
|
// rootDir: '.', //No need
|
||||||
// testEnvironment: 'node', //Defaults to 'node'
|
// testEnvironment: 'node', //Defaults to 'node'
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
process.env.DUC_URL="duc:50051"
|
||||||
|
process.env.INFACTORY_URL="in-factory:50052"
|
||||||
|
process.env.PIFACTORY_URL="pi-factory:50053"
|
||||||
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.10",
|
"@dadosfera/protospack-v2": "3.40.0",
|
||||||
"@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.10",
|
"version": "3.40.0",
|
||||||
"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",
|
"resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.40.0.tgz",
|
||||||
"integrity": "sha512-F45dSEIKG+gwwDMYHayA242bFwhFTJbZm26KesQbGhf4I45ur6hYZD8dK0voNuVQInLMQhtm6+7th6/jJ8xpTQ==",
|
"integrity": "sha512-tzYAGosFjGUgi3pAvXqv+Eqqjca9tH1kU9kJdRI5d1rLXNimo0fIuPWxWng0C4OBH/2sIgC1WLHseq+DZ6qgdw==",
|
||||||
|
"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.10",
|
"@dadosfera/protospack-v2": "3.40.0",
|
||||||
"@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",
|
||||||
|
|||||||
@@ -722,6 +722,8 @@ 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> = [
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ import {
|
|||||||
RequireAllPermissions,
|
RequireAllPermissions,
|
||||||
} from 'src/decorators/authentication.decorator';
|
} from 'src/decorators/authentication.decorator';
|
||||||
import { AuthClientService } from './auth.service';
|
import { AuthClientService } from './auth.service';
|
||||||
|
import { UserDTO } from './dtos/login';
|
||||||
import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
||||||
import { GrpcToHttpExceptionFilter } from '../../error/grpc-to-http-exception.filter';
|
import { GrpcToHttpExceptionFilter } from '../../error/grpc-to-http-exception.filter';
|
||||||
import { RequestUser, User } from 'src/decorators/user.decorator';
|
import { RequestUser, User } from 'src/decorators/user.decorator';
|
||||||
@@ -486,7 +487,7 @@ export class AuthController {
|
|||||||
this.logger.info('Authenticating via X-Api-key header');
|
this.logger.info('Authenticating via X-Api-key header');
|
||||||
const { api_key } = await this.apiKeyService.get(apiKey);
|
const { api_key } = await this.apiKeyService.get(apiKey);
|
||||||
|
|
||||||
const userDto = {
|
const userDto: UserDTO = {
|
||||||
id: api_key.user_id,
|
id: api_key.user_id,
|
||||||
name: api_key.username,
|
name: api_key.username,
|
||||||
email: api_key.username,
|
email: api_key.username,
|
||||||
@@ -494,7 +495,8 @@ export class AuthController {
|
|||||||
id: api_key.customer_id,
|
id: api_key.customer_id,
|
||||||
name: api_key.customer_name,
|
name: api_key.customer_name,
|
||||||
tier: api_key.customer_tier,
|
tier: api_key.customer_tier,
|
||||||
}
|
},
|
||||||
|
permissions: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
return res.status(200).json(userDto);
|
return res.status(200).json(userDto);
|
||||||
|
|||||||
@@ -447,6 +447,9 @@ export class AuthClientService implements OnModuleInit {
|
|||||||
name: payload.customer_name,
|
name: payload.customer_name,
|
||||||
tier: payload.customer_tier,
|
tier: payload.customer_tier,
|
||||||
},
|
},
|
||||||
|
// Raw permission seqids from the JWT. Consumers own the seqid->meaning
|
||||||
|
// mapping (e.g. Orchest's auth-server); Maestro reports them as-is.
|
||||||
|
permissions: payload.permissions ?? [],
|
||||||
};
|
};
|
||||||
|
|
||||||
return userDto;
|
return userDto;
|
||||||
|
|||||||
@@ -152,5 +152,6 @@ export type UserDTO = {
|
|||||||
id: string,
|
id: string,
|
||||||
name: string,
|
name: string,
|
||||||
tier: string,
|
tier: string,
|
||||||
}
|
},
|
||||||
|
permissions: number[],
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,6 +85,9 @@ 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,
|
||||||
@@ -124,6 +127,9 @@ 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,
|
||||||
@@ -167,6 +173,9 @@ 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;
|
||||||
@@ -225,6 +234,9 @@ 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,
|
||||||
@@ -271,11 +283,31 @@ 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,
|
||||||
@@ -387,6 +419,9 @@ 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,
|
||||||
@@ -418,6 +453,9 @@ 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,
|
||||||
@@ -449,6 +487,9 @@ 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,
|
||||||
@@ -480,6 +521,9 @@ 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,
|
||||||
@@ -515,6 +559,9 @@ export class CatalogController {
|
|||||||
PERMISSIONS_GROUPS.CATALOG.permissions.CERTIFY,
|
PERMISSIONS_GROUPS.CATALOG.permissions.CERTIFY,
|
||||||
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
|
||||||
)
|
)
|
||||||
|
@RequireModule(
|
||||||
|
DADOSFERA_MODULES_KEYS.CATALOG
|
||||||
|
)
|
||||||
async updateDataAssetCertificationStatus(
|
async updateDataAssetCertificationStatus(
|
||||||
@User() user: RequestUser,
|
@User() user: RequestUser,
|
||||||
@Language() language: LanguageEnum,
|
@Language() language: LanguageEnum,
|
||||||
@@ -542,6 +589,9 @@ 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 manageDataAssetDocs(
|
async manageDataAssetDocs(
|
||||||
@User() user: RequestUser,
|
@User() user: RequestUser,
|
||||||
@Headers() headers,
|
@Headers() headers,
|
||||||
@@ -579,6 +629,9 @@ 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,
|
||||||
@@ -601,6 +654,9 @@ 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,
|
||||||
@@ -626,6 +682,9 @@ 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,
|
||||||
@@ -650,6 +709,9 @@ 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,
|
||||||
@@ -676,6 +738,9 @@ 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({
|
||||||
@@ -697,6 +762,9 @@ 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,
|
||||||
@@ -850,6 +918,9 @@ 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,
|
||||||
@@ -1002,4 +1073,4 @@ export class CatalogController {
|
|||||||
this.logger.error(error.message);
|
this.logger.error(error.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,6 +120,10 @@ 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;
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
import { ApiProperty, ApiPropertyOptional, PickType } from '@nestjs/swagger';
|
import { ApiProperty, ApiPropertyOptional, PickType } from '@nestjs/swagger';
|
||||||
import { IsEnum } from 'class-validator';
|
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 {
|
||||||
@@ -198,6 +203,27 @@ 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;
|
||||||
@@ -211,6 +237,8 @@ export class IUpdateDataRequest {
|
|||||||
share_type?: DataAssetShareType;
|
share_type?: DataAssetShareType;
|
||||||
@ApiPropertyOptional()
|
@ApiPropertyOptional()
|
||||||
docs?: string;
|
docs?: string;
|
||||||
|
@ApiPropertyOptional({ type: [CustomPropertyDto] })
|
||||||
|
custom_properties?: CustomPropertyDto[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export class IUpdateCertificationStatusRequest {
|
export class IUpdateCertificationStatusRequest {
|
||||||
@@ -372,4 +400,4 @@ export type CreateDataDocsDTO = {
|
|||||||
docs: string;
|
docs: string;
|
||||||
asset_type: string;
|
asset_type: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import {
|
|||||||
} from '@nestjs/microservices';
|
} from '@nestjs/microservices';
|
||||||
import { ConnectionTest } from '@dadosfera/protospack-v2';
|
import { ConnectionTest } from '@dadosfera/protospack-v2';
|
||||||
|
|
||||||
const infactoryUrl = process.env.INFACTORY_URL ?? '';
|
|
||||||
const isLocalConnection =
|
const isLocalConnection =
|
||||||
infactoryUrl.startsWith('in-factory:') || infactoryUrl.includes('0.0.0.0');
|
process.env.INFACTORY_URL.startsWith('in-factory:') ||
|
||||||
|
process.env.INFACTORY_URL.includes('0.0.0.0');
|
||||||
|
|
||||||
export class ConnectionTestClientConfiguration {
|
export class ConnectionTestClientConfiguration {
|
||||||
private config: GrpcOptions = {
|
private config: GrpcOptions = {
|
||||||
|
|||||||
@@ -27,15 +27,19 @@ import {
|
|||||||
RefreshCatalogStatusReq,
|
RefreshCatalogStatusReq,
|
||||||
} from './dto/connection-test';
|
} from './dto/connection-test';
|
||||||
import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
||||||
import { Authenticated } from 'src/decorators/authentication.decorator';
|
import { Authenticated, RequireModule } 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(
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import {
|
|||||||
} from '@nestjs/microservices';
|
} from '@nestjs/microservices';
|
||||||
import { ConnectionManager } from '@dadosfera/protospack-v2';
|
import { ConnectionManager } from '@dadosfera/protospack-v2';
|
||||||
|
|
||||||
const infactoryUrl = process.env.INFACTORY_URL ?? '';
|
|
||||||
const isLocalConnection =
|
const isLocalConnection =
|
||||||
infactoryUrl.startsWith('in-factory:') || infactoryUrl.includes('0.0.0.0');
|
process.env.INFACTORY_URL.startsWith('in-factory:') ||
|
||||||
|
process.env.INFACTORY_URL.includes('0.0.0.0');
|
||||||
|
|
||||||
export class ConnectionClientConfiguration {
|
export class ConnectionClientConfiguration {
|
||||||
public name = 'ConnectionClientConfiguration';
|
public name = 'ConnectionClientConfiguration';
|
||||||
|
|||||||
@@ -16,8 +16,9 @@ import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
|||||||
import {
|
import {
|
||||||
Authenticated,
|
Authenticated,
|
||||||
RequireAllPermissions,
|
RequireAllPermissions,
|
||||||
|
RequireModule,
|
||||||
} from 'src/decorators/authentication.decorator';
|
} from 'src/decorators/authentication.decorator';
|
||||||
import { PERMISSIONS_GROUPS } from 'src/authentication/permissions.enum';
|
import { DADOSFERA_MODULES_KEYS, 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 {
|
||||||
@@ -39,6 +40,9 @@ 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(
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import {
|
|||||||
} from '@nestjs/microservices';
|
} from '@nestjs/microservices';
|
||||||
import { ConnectorManager } from '@dadosfera/protospack-v2';
|
import { ConnectorManager } from '@dadosfera/protospack-v2';
|
||||||
|
|
||||||
const infactoryUrl = process.env.INFACTORY_URL ?? '';
|
|
||||||
const isLocalConnection =
|
const isLocalConnection =
|
||||||
infactoryUrl.startsWith('in-factory:') || infactoryUrl.includes('0.0.0.0');
|
process.env.INFACTORY_URL.startsWith('in-factory:') ||
|
||||||
|
process.env.INFACTORY_URL.includes('0.0.0.0');
|
||||||
|
|
||||||
export class ConnectorClientConfiguration {
|
export class ConnectorClientConfiguration {
|
||||||
public name = 'ConnectorClientConfiguration';
|
public name = 'ConnectorClientConfiguration';
|
||||||
|
|||||||
@@ -25,9 +25,10 @@ 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 { PERMISSIONS_GROUPS } from 'src/authentication/permissions.enum';
|
import { DADOSFERA_MODULES_KEYS, 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';
|
||||||
@@ -99,6 +100,9 @@ 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,
|
||||||
@@ -131,6 +135,9 @@ 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();
|
||||||
}
|
}
|
||||||
@@ -143,6 +150,9 @@ 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,
|
||||||
@@ -171,6 +181,9 @@ 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,
|
||||||
@@ -193,6 +206,9 @@ 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,
|
||||||
@@ -214,6 +230,9 @@ 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,
|
||||||
@@ -241,6 +260,9 @@ 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,
|
||||||
@@ -269,6 +291,9 @@ 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,
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import {
|
|||||||
type GrpcOptions,
|
type GrpcOptions,
|
||||||
} from '@nestjs/microservices';
|
} from '@nestjs/microservices';
|
||||||
|
|
||||||
const infactoryUrl = process.env.INFACTORY_URL ?? '';
|
|
||||||
const isLocalConnection =
|
const isLocalConnection =
|
||||||
infactoryUrl.startsWith('in-factory:') || infactoryUrl.includes('0.0.0.0');
|
process.env.INFACTORY_URL.startsWith('in-factory:') ||
|
||||||
|
process.env.INFACTORY_URL.includes('0.0.0.0');
|
||||||
export class InputsGrpcClient {
|
export class InputsGrpcClient {
|
||||||
public readonly name = 'InputsGrpcClient';
|
public readonly name = 'InputsGrpcClient';
|
||||||
private config: GrpcOptions = {
|
private config: GrpcOptions = {
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ 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()
|
||||||
|
|
||||||
@@ -73,10 +74,10 @@ export class InputsService {
|
|||||||
objectCamelToSnake(createInputResponse);
|
objectCamelToSnake(createInputResponse);
|
||||||
return createInputResponse;
|
return createInputResponse;
|
||||||
},
|
},
|
||||||
update: async (updateInputDTO: UpdateInputRequest): Promise<InputUpdateResponse> => {
|
update: async (updateInputDTO: UpdateInputRequest, metadata: Metadata): 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),
|
this.inputWriteService.InputUpdate(updateInputDTO, metadata),
|
||||||
);
|
);
|
||||||
|
|
||||||
return updateInputResponse;
|
return updateInputResponse;
|
||||||
@@ -206,7 +207,7 @@ export class InputsService {
|
|||||||
return findOneInputResponse;
|
return findOneInputResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
async update(id: string, data, info: Info) {
|
async update(id: string, data, info: Info, metadata?: Metadata) {
|
||||||
// this.validateCron({ ...data, info });
|
// this.validateCron({ ...data, info });
|
||||||
try {
|
try {
|
||||||
const {
|
const {
|
||||||
@@ -217,7 +218,7 @@ export class InputsService {
|
|||||||
id,
|
id,
|
||||||
...data,
|
...data,
|
||||||
info,
|
info,
|
||||||
});
|
}, metadata);
|
||||||
|
|
||||||
const updateInputResponse = this.adjustInputPayload(
|
const updateInputResponse = this.adjustInputPayload(
|
||||||
input,
|
input,
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import {
|
|||||||
} from '@nestjs/microservices';
|
} from '@nestjs/microservices';
|
||||||
import { NetworkConfig } from '@dadosfera/protospack-v2';
|
import { NetworkConfig } from '@dadosfera/protospack-v2';
|
||||||
|
|
||||||
const infactoryUrl = process.env.INFACTORY_URL ?? '';
|
|
||||||
const isLocalConnection =
|
const isLocalConnection =
|
||||||
infactoryUrl.startsWith('in-factory:') || infactoryUrl.includes('0.0.0.0');
|
process.env.INFACTORY_URL.startsWith('in-factory:') ||
|
||||||
|
process.env.INFACTORY_URL.includes('0.0.0.0');
|
||||||
|
|
||||||
export class NetworkConfigGrpcClient {
|
export class NetworkConfigGrpcClient {
|
||||||
public name = 'NetworkConfigGrpcClient';
|
public name = 'NetworkConfigGrpcClient';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { ClientsModule } from '@nestjs/microservices';
|
import { ClientsModule } from '@nestjs/microservices';
|
||||||
import { Test, TestingModule } from '@nestjs/testing';
|
import { Test, TestingModule } from '@nestjs/testing';
|
||||||
// import { DucClient } from 'src/clients/duc/client.config';
|
// import { DucClient } from '../duc/client.config'
|
||||||
import { PermissionsController } from './permissions.controller';
|
import { PermissionsController } from './permissions.controller';
|
||||||
import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
||||||
import { PermissionsService } from './permissions.service';
|
import { PermissionsService } from './permissions.service';
|
||||||
@@ -22,7 +22,7 @@ describe.skip('PermissionsController', () => {
|
|||||||
provide: DadosferaLogger,
|
provide: DadosferaLogger,
|
||||||
useValue: { logger },
|
useValue: { logger },
|
||||||
},
|
},
|
||||||
PermissionsService,
|
PermissionsService
|
||||||
],
|
],
|
||||||
}).compile();
|
}).compile();
|
||||||
|
|
||||||
|
|||||||
@@ -25,9 +25,10 @@ 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 { PERMISSIONS_GROUPS } from '../../authentication/permissions.enum';
|
import { DADOSFERA_MODULES_KEYS, 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';
|
||||||
@@ -57,6 +58,9 @@ 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(
|
||||||
@@ -317,7 +321,6 @@ 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,
|
||||||
@@ -325,13 +328,7 @@ export class PipelinesController {
|
|||||||
pipeline_id: pipelineId
|
pipeline_id: pipelineId
|
||||||
};
|
};
|
||||||
|
|
||||||
const metadata = PackTheMetadata({
|
const metadata = PackTheMetadata(user);
|
||||||
customer_id,
|
|
||||||
customer_name,
|
|
||||||
user_id,
|
|
||||||
username,
|
|
||||||
language,
|
|
||||||
});
|
|
||||||
|
|
||||||
const response = await this.pipelinesClientService.updatePipelineInput(
|
const response = await this.pipelinesClientService.updatePipelineInput(
|
||||||
pipelineId,
|
pipelineId,
|
||||||
|
|||||||
@@ -383,7 +383,8 @@ 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 = () => {
|
||||||
@@ -404,34 +405,36 @@ export class PipelinesService implements OnModuleInit {
|
|||||||
|
|
||||||
const nimbusUpdates = updateInputResponse?.tablesUpdate || [];
|
const nimbusUpdates = updateInputResponse?.tablesUpdate || [];
|
||||||
|
|
||||||
nimbusUpdates.forEach(update => {
|
if (user.customer_modules.includes('catalog')) {
|
||||||
const nimbusRollback = () => {
|
nimbusUpdates.forEach(update => {
|
||||||
return this.nimbusService.renameTable(
|
const nimbusRollback = () => {
|
||||||
info.customer,
|
return this.nimbusService.renameTable(
|
||||||
update.database,
|
info.customer,
|
||||||
{
|
update.database,
|
||||||
table_name: update.table_name,
|
{
|
||||||
table_schema: update.table_schema
|
table_name: update.table_name,
|
||||||
},
|
table_schema: update.table_schema
|
||||||
{
|
},
|
||||||
table_name: update.old_table_name,
|
{
|
||||||
table_schema: update.old_table_schema
|
table_name: update.old_table_name,
|
||||||
}
|
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 {
|
||||||
|
|||||||
@@ -14,16 +14,17 @@ import {
|
|||||||
NotFoundException,
|
NotFoundException,
|
||||||
UseGuards,
|
UseGuards,
|
||||||
} from '@nestjs/common';
|
} from '@nestjs/common';
|
||||||
import { ApiTags, ApiOperation } from '@nestjs/swagger';
|
import { ApiTags, ApiOperation, ApiOkResponse } from '@nestjs/swagger';
|
||||||
import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
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 { PERMISSIONS_GROUPS } from '../../authentication/permissions.enum';
|
import { DADOSFERA_MODULES_KEYS, 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';
|
||||||
@@ -49,6 +50,7 @@ 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;
|
||||||
|
|
||||||
@@ -72,6 +74,10 @@ export class PlatformApiController {
|
|||||||
return id?.replace(/-/g, '_') || '';
|
return id?.replace(/-/g, '_') || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private decodePathParam(value: string): string {
|
||||||
|
return value ? decodeURIComponent(value) : '';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Denormalize ID back to UUID format (replace _ with -).
|
* Denormalize ID back to UUID format (replace _ with -).
|
||||||
* Used when we receive a normalized ID but need the original UUID.
|
* Used when we receive a normalized ID but need the original UUID.
|
||||||
@@ -832,6 +838,40 @@ export class PlatformApiController {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Get('pipelines/:pipelineId/pipeline_run/:runId/jobs')
|
||||||
|
@ApiOperation({
|
||||||
|
summary: 'Get pipeline run jobs',
|
||||||
|
description: 'Proxies platform-api DB-backed job runs and returns `{ jobs: [...] }`.',
|
||||||
|
})
|
||||||
|
@ApiOkResponse({
|
||||||
|
description: 'DB-backed job runs for the selected pipeline run.',
|
||||||
|
schema: {
|
||||||
|
type: 'object',
|
||||||
|
properties: {
|
||||||
|
jobs: {
|
||||||
|
type: 'array',
|
||||||
|
items: { type: 'object' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
required: ['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 decodedRunId = this.decodePathParam(runId);
|
||||||
|
|
||||||
|
return this.platformApiService.proxy(
|
||||||
|
'GET',
|
||||||
|
`/pipeline/${normalizedPipelineId}/pipeline_run/${decodedRunId}/jobs`,
|
||||||
|
user,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// ==================== JOBS - COLUMN EDITING ROUTES ====================
|
// ==================== JOBS - COLUMN EDITING ROUTES ====================
|
||||||
|
|
||||||
@Put('jobs/:jobId/input')
|
@Put('jobs/:jobId/input')
|
||||||
|
|||||||
@@ -5,11 +5,21 @@ import DadosferaLogger from '@dadosfera/dadosfera-logs';
|
|||||||
|
|
||||||
describe('ReleaseNoteController', () => {
|
describe('ReleaseNoteController', () => {
|
||||||
let controller: ReleaseNoteController;
|
let controller: ReleaseNoteController;
|
||||||
|
const logger = {
|
||||||
|
info: (...args) => args,
|
||||||
|
error: (...args) => args,
|
||||||
|
};
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
const module: TestingModule = await Test.createTestingModule({
|
const module: TestingModule = await Test.createTestingModule({
|
||||||
controllers: [ReleaseNoteController],
|
controllers: [ReleaseNoteController],
|
||||||
providers: [ReleaseNoteService, DadosferaLogger],
|
providers: [
|
||||||
|
{
|
||||||
|
provide: DadosferaLogger,
|
||||||
|
useValue: { logger },
|
||||||
|
},
|
||||||
|
ReleaseNoteService
|
||||||
|
],
|
||||||
}).compile();
|
}).compile();
|
||||||
|
|
||||||
controller = module.get<ReleaseNoteController>(ReleaseNoteController);
|
controller = module.get<ReleaseNoteController>(ReleaseNoteController);
|
||||||
|
|||||||
@@ -4,10 +4,20 @@ import DadosferaLogger from '@dadosfera/dadosfera-logs';
|
|||||||
|
|
||||||
describe('ReleaseNoteService', () => {
|
describe('ReleaseNoteService', () => {
|
||||||
let service: ReleaseNoteService;
|
let service: ReleaseNoteService;
|
||||||
|
const logger = {
|
||||||
|
info: (...args) => args,
|
||||||
|
error: (...args) => args,
|
||||||
|
};
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
const module: TestingModule = await Test.createTestingModule({
|
const module: TestingModule = await Test.createTestingModule({
|
||||||
providers: [ReleaseNoteService, DadosferaLogger],
|
providers: [
|
||||||
|
{
|
||||||
|
provide: DadosferaLogger,
|
||||||
|
useValue: { logger },
|
||||||
|
},
|
||||||
|
ReleaseNoteService
|
||||||
|
],
|
||||||
}).compile();
|
}).compile();
|
||||||
|
|
||||||
service = module.get<ReleaseNoteService>(ReleaseNoteService);
|
service = module.get<ReleaseNoteService>(ReleaseNoteService);
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import {
|
|||||||
import { credentials } from '@grpc/grpc-js';
|
import { credentials } from '@grpc/grpc-js';
|
||||||
import { Transformation } from '@dadosfera/protospack-v2';
|
import { Transformation } from '@dadosfera/protospack-v2';
|
||||||
|
|
||||||
const infactoryUrl = process.env.INFACTORY_URL ?? '';
|
|
||||||
const isLocalConnection =
|
const isLocalConnection =
|
||||||
infactoryUrl.startsWith('in-factory:') || infactoryUrl.includes('0.0.0.0');
|
process.env.INFACTORY_URL.startsWith('in-factory:') ||
|
||||||
|
process.env.INFACTORY_URL.includes('0.0.0.0');
|
||||||
|
|
||||||
export class TransformationsClientConfiguration {
|
export class TransformationsClientConfiguration {
|
||||||
public name = 'TransformationsClientConfiguration';
|
public name = 'TransformationsClientConfiguration';
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ 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;
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "./tsconfig.json",
|
"extends": "./tsconfig.json",
|
||||||
"exclude": ["node_modules", "test", "dist", "**/*spec.ts", "jest.config.ts"]
|
"exclude": ["node_modules", "test", "dist", "**/*spec.ts", "jest.*.ts"]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user