mirror of
https://github.com/dadosfera/maestro.git
synced 2026-10-20 19:59:07 +00:00
Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b7171556b8 | ||
|
|
74b3bd6b46 | ||
|
|
bf19d29a1d | ||
|
|
6523f707e3 | ||
|
|
8b0bf84d34 | ||
|
|
9ef4c51ba1 | ||
|
|
19521489fa | ||
|
|
2ce9aad005 | ||
|
|
2125884c6c | ||
|
|
f4c9226ef9 | ||
|
|
ff3999a6aa | ||
|
|
209470482a | ||
|
|
c26194554c |
+103
-18
@@ -4747,6 +4747,42 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/platform/jobs/{jobId}/rename-tables": {
|
||||||
|
"post": {
|
||||||
|
"operationId": "PlatformApiController_renameJobTables",
|
||||||
|
"summary": "Rename job output tables and sync to catalog",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "jobId",
|
||||||
|
"required": true,
|
||||||
|
"in": "path",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"201": {
|
||||||
|
"description": "",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tags": [
|
||||||
|
"Platform API"
|
||||||
|
],
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"/platform/jobs/jdbc/configs/allowed_datatypes": {
|
"/platform/jobs/jdbc/configs/allowed_datatypes": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "PlatformApiController_getJdbcAllowedDatatypes",
|
"operationId": "PlatformApiController_getJdbcAllowedDatatypes",
|
||||||
@@ -10125,6 +10161,21 @@
|
|||||||
"entities"
|
"entities"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"Column": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"name",
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
},
|
||||||
"TableColumns": {
|
"TableColumns": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@@ -10140,13 +10191,7 @@
|
|||||||
"references": {
|
"references": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"$ref": "#/components/schemas/Column"
|
||||||
}
|
|
||||||
},
|
|
||||||
"identifier_columns": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"destination": {
|
"destination": {
|
||||||
@@ -10154,13 +10199,20 @@
|
|||||||
},
|
},
|
||||||
"type": {
|
"type": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"identifier_columns": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"reference_column": {
|
||||||
|
"$ref": "#/components/schemas/Column"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"name",
|
"name",
|
||||||
"columns",
|
"columns",
|
||||||
"references",
|
|
||||||
"identifier_columns",
|
|
||||||
"destination",
|
"destination",
|
||||||
"type"
|
"type"
|
||||||
]
|
]
|
||||||
@@ -10466,7 +10518,7 @@
|
|||||||
"enabled"
|
"enabled"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"CustomerLink": {
|
"CustomerLinkItem": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"href": {
|
"href": {
|
||||||
@@ -10488,28 +10540,61 @@
|
|||||||
"description"
|
"description"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"CustomerLinksResponse": {
|
"CustomerSidebarSection": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"links": {
|
"title": {
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"items": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/components/schemas/CustomerLink"
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/CustomerSidebarMenuItem"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/CustomerSidebarLinkItem"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"links"
|
"title",
|
||||||
|
"items"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"CustomerLinksConfig": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"home": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/CustomerLinkItem"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sidebar": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/CustomerSidebarSection"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"CustomerLinksResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"links": {
|
||||||
|
"$ref": "#/components/schemas/CustomerLinksConfig"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"CustomerLinkRequest": {
|
"CustomerLinkRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"links": {
|
"links": {
|
||||||
"type": "array",
|
"$ref": "#/components/schemas/CustomerLinksConfig"
|
||||||
"items": {
|
|
||||||
"$ref": "#/components/schemas/CustomerLink"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
|
|||||||
Generated
+79
-7
@@ -17,7 +17,7 @@
|
|||||||
"@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": "2.5.3",
|
"@dadosfera/protospack": "2.5.3",
|
||||||
"@dadosfera/protospack-v2": "3.38.0-beta.28",
|
"@dadosfera/protospack-v2": "^3.38.0-beta.30",
|
||||||
"@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",
|
||||||
@@ -47,6 +47,7 @@
|
|||||||
"jwk-to-pem": "^2.0.5",
|
"jwk-to-pem": "^2.0.5",
|
||||||
"mixpanel": "^0.17.0",
|
"mixpanel": "^0.17.0",
|
||||||
"ms": "^3.0.0-canary.1",
|
"ms": "^3.0.0-canary.1",
|
||||||
|
"multer": "^2.0.2",
|
||||||
"openid-client": "^5.7.1",
|
"openid-client": "^5.7.1",
|
||||||
"passport": "^0.6.0",
|
"passport": "^0.6.0",
|
||||||
"passport-facebook": "^3.0.0",
|
"passport-facebook": "^3.0.0",
|
||||||
@@ -1744,10 +1745,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@dadosfera/protospack-v2": {
|
"node_modules/@dadosfera/protospack-v2": {
|
||||||
"version": "3.38.0-beta.28",
|
"version": "3.38.0-beta.30",
|
||||||
"resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.38.0-beta.28.tgz",
|
"resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.38.0-beta.30.tgz",
|
||||||
"integrity": "sha512-w3Au0qschqZJ6OSHVDKaR2KeeCF2ncuJ4k7iZQceOLo1zxUU3TpDyLYyp/rp1DoSG763uIgqm3kJUXv7RlmfNw==",
|
"integrity": "sha512-EePtEV4Bjr47BCtQgeZP8WzappDv1mRWMro15ms+Vdev/FIVBydMew/BtK3spzI7KHWJniB0Ctsvpcdj2GiTDA==",
|
||||||
"license": "ISC",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@grpc/grpc-js": "^1.9.3",
|
"@grpc/grpc-js": "^1.9.3",
|
||||||
"rxjs": "^7.5.5"
|
"rxjs": "^7.5.5"
|
||||||
@@ -2928,6 +2928,20 @@
|
|||||||
"node": ">= 0.6"
|
"node": ">= 0.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@nestjs/platform-express/node_modules/concat-stream": {
|
||||||
|
"version": "1.6.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
|
||||||
|
"integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
|
||||||
|
"engines": [
|
||||||
|
"node >= 0.8"
|
||||||
|
],
|
||||||
|
"dependencies": {
|
||||||
|
"buffer-from": "^1.0.0",
|
||||||
|
"inherits": "^2.0.3",
|
||||||
|
"readable-stream": "^2.2.2",
|
||||||
|
"typedarray": "^0.0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@nestjs/platform-express/node_modules/content-disposition": {
|
"node_modules/@nestjs/platform-express/node_modules/content-disposition": {
|
||||||
"version": "0.5.4",
|
"version": "0.5.4",
|
||||||
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
|
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
|
||||||
@@ -3097,6 +3111,24 @@
|
|||||||
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/@nestjs/platform-express/node_modules/multer": {
|
||||||
|
"version": "1.4.4-lts.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/multer/-/multer-1.4.4-lts.1.tgz",
|
||||||
|
"integrity": "sha512-WeSGziVj6+Z2/MwQo3GvqzgR+9Uc+qt8SwHKh3gvNPiISKfsMfG4SvCOFYlxxgkXt7yIV2i1yczehm0EOKIxIg==",
|
||||||
|
"deprecated": "Multer 1.x is impacted by a number of vulnerabilities, which have been patched in 2.x. You should upgrade to the latest 2.x version.",
|
||||||
|
"dependencies": {
|
||||||
|
"append-field": "^1.0.0",
|
||||||
|
"busboy": "^1.0.0",
|
||||||
|
"concat-stream": "^1.5.2",
|
||||||
|
"mkdirp": "^0.5.4",
|
||||||
|
"object-assign": "^4.1.1",
|
||||||
|
"type-is": "^1.6.4",
|
||||||
|
"xtend": "^4.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 6.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@nestjs/platform-express/node_modules/negotiator": {
|
"node_modules/@nestjs/platform-express/node_modules/negotiator": {
|
||||||
"version": "0.6.3",
|
"version": "0.6.3",
|
||||||
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
|
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
|
||||||
@@ -3121,6 +3153,25 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@nestjs/platform-express/node_modules/readable-stream": {
|
||||||
|
"version": "2.3.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",
|
||||||
|
"integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
|
||||||
|
"dependencies": {
|
||||||
|
"core-util-is": "~1.0.0",
|
||||||
|
"inherits": "~2.0.3",
|
||||||
|
"isarray": "~1.0.0",
|
||||||
|
"process-nextick-args": "~2.0.0",
|
||||||
|
"safe-buffer": "~5.1.1",
|
||||||
|
"string_decoder": "~1.1.1",
|
||||||
|
"util-deprecate": "~1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@nestjs/platform-express/node_modules/readable-stream/node_modules/safe-buffer": {
|
||||||
|
"version": "5.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||||
|
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||||
|
},
|
||||||
"node_modules/@nestjs/platform-express/node_modules/safe-buffer": {
|
"node_modules/@nestjs/platform-express/node_modules/safe-buffer": {
|
||||||
"version": "5.2.1",
|
"version": "5.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||||
@@ -3195,6 +3246,19 @@
|
|||||||
"node": ">= 0.8"
|
"node": ">= 0.8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@nestjs/platform-express/node_modules/string_decoder": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
|
||||||
|
"dependencies": {
|
||||||
|
"safe-buffer": "~5.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@nestjs/platform-express/node_modules/string_decoder/node_modules/safe-buffer": {
|
||||||
|
"version": "5.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||||
|
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||||
|
},
|
||||||
"node_modules/@nestjs/platform-express/node_modules/tslib": {
|
"node_modules/@nestjs/platform-express/node_modules/tslib": {
|
||||||
"version": "2.5.3",
|
"version": "2.5.3",
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz",
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz",
|
||||||
@@ -6509,7 +6573,6 @@
|
|||||||
"engines": [
|
"engines": [
|
||||||
"node >= 6.0"
|
"node >= 6.0"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"buffer-from": "^1.0.0",
|
"buffer-from": "^1.0.0",
|
||||||
"inherits": "^2.0.3",
|
"inherits": "^2.0.3",
|
||||||
@@ -9128,6 +9191,11 @@
|
|||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/isarray": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="
|
||||||
|
},
|
||||||
"node_modules/isexe": {
|
"node_modules/isexe": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||||
@@ -10725,7 +10793,6 @@
|
|||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/multer/-/multer-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/multer/-/multer-2.0.2.tgz",
|
||||||
"integrity": "sha512-u7f2xaZ/UG8oLXHvtF/oWTRvT44p9ecwBBqTwgJVq0+4BW1g8OW01TyMEGWBHbyMOYVHXslaut7qEQ1meATXgw==",
|
"integrity": "sha512-u7f2xaZ/UG8oLXHvtF/oWTRvT44p9ecwBBqTwgJVq0+4BW1g8OW01TyMEGWBHbyMOYVHXslaut7qEQ1meATXgw==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"append-field": "^1.0.0",
|
"append-field": "^1.0.0",
|
||||||
"busboy": "^1.6.0",
|
"busboy": "^1.6.0",
|
||||||
@@ -11728,6 +11795,11 @@
|
|||||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/process-nextick-args": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
|
||||||
|
},
|
||||||
"node_modules/process-warning": {
|
"node_modules/process-warning": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/process-warning/-/process-warning-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/process-warning/-/process-warning-1.0.0.tgz",
|
||||||
|
|||||||
+2
-1
@@ -35,7 +35,7 @@
|
|||||||
"@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": "2.5.3",
|
"@dadosfera/protospack": "2.5.3",
|
||||||
"@dadosfera/protospack-v2": "3.38.0-beta.28",
|
"@dadosfera/protospack-v2": "^3.38.0-beta.30",
|
||||||
"@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",
|
||||||
@@ -65,6 +65,7 @@
|
|||||||
"jwk-to-pem": "^2.0.5",
|
"jwk-to-pem": "^2.0.5",
|
||||||
"mixpanel": "^0.17.0",
|
"mixpanel": "^0.17.0",
|
||||||
"ms": "^3.0.0-canary.1",
|
"ms": "^3.0.0-canary.1",
|
||||||
|
"multer": "^2.0.2",
|
||||||
"openid-client": "^5.7.1",
|
"openid-client": "^5.7.1",
|
||||||
"passport": "^0.6.0",
|
"passport": "^0.6.0",
|
||||||
"passport-facebook": "^3.0.0",
|
"passport-facebook": "^3.0.0",
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ import {
|
|||||||
} from '@nestjs/common';
|
} from '@nestjs/common';
|
||||||
|
|
||||||
import { firstValueFrom, lastValueFrom } from 'rxjs';
|
import { firstValueFrom, lastValueFrom } from 'rxjs';
|
||||||
import { Link } from '@dadosfera/protospack-v2/dist/lib/Duc/interfaces/entities';
|
|
||||||
import { DucClient } from '../duc/client.config';
|
import { DucClient } from '../duc/client.config';
|
||||||
import { ClientGrpc } from '@nestjs/microservices';
|
import { ClientGrpc } from '@nestjs/microservices';
|
||||||
import { ProtoServices } from '@dadosfera/protospack-v2/dist/lib/Duc';
|
import { ProtoServices } from '@dadosfera/protospack-v2/dist/lib/Duc';
|
||||||
import { CustomerUpdateRequest } from '@dadosfera/protospack-v2/dist/lib/Duc/interfaces/messages';
|
import { CustomerSetLinksRequest } from '@dadosfera/protospack-v2/dist/lib/Duc/interfaces/messages';
|
||||||
import { CustomersProtoService } from '@dadosfera/protospack-v2/dist/lib/Duc/interfaces/write-service';
|
import { CustomersProtoService } from '@dadosfera/protospack-v2/dist/lib/Duc/interfaces/write-service';
|
||||||
|
import { CustomerLinksConfig } from './dtos/customers';
|
||||||
import ErrorCodes from 'src/utils/errorCodes';
|
import ErrorCodes from 'src/utils/errorCodes';
|
||||||
import jwt from 'jsonwebtoken';
|
import jwt from 'jsonwebtoken';
|
||||||
import {
|
import {
|
||||||
@@ -67,12 +67,12 @@ export class CustomersService implements OnModuleInit {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
async getLinks(customerId: string) {
|
async getLinks(customerId: string): Promise<CustomerLinksConfig | null> {
|
||||||
try {
|
try {
|
||||||
const result = await lastValueFrom(
|
const result = await lastValueFrom(
|
||||||
this.customerService.CustomerFindOneById({ id: customerId }),
|
this.customerService.CustomerGetLinks({ customerId }),
|
||||||
);
|
);
|
||||||
return result.customer?.links || [];
|
return (result.links as CustomerLinksConfig) || null;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err.details === ErrorCodes.CUSTOMER.NOT_FOUND)
|
if (err.details === ErrorCodes.CUSTOMER.NOT_FOUND)
|
||||||
throw new HttpException(err.details, HttpStatus.NOT_FOUND);
|
throw new HttpException(err.details, HttpStatus.NOT_FOUND);
|
||||||
@@ -80,17 +80,17 @@ export class CustomersService implements OnModuleInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async setLinks(customerId: string, links: Link[]) {
|
async setLinks(customerId: string, links: CustomerLinksConfig) {
|
||||||
if (!customerId || !links) {
|
if (!customerId || !links) {
|
||||||
throw new HttpException(null, HttpStatus.BAD_REQUEST);
|
throw new HttpException(null, HttpStatus.BAD_REQUEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return await firstValueFrom(
|
return await firstValueFrom(
|
||||||
this.customerService.CustomerUpdate({
|
this.customerService.CustomerSetLinks({
|
||||||
id: customerId,
|
customerId,
|
||||||
links,
|
links: links as CustomerSetLinksRequest['links'],
|
||||||
} as CustomerUpdateRequest),
|
}),
|
||||||
);
|
);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err.details === ErrorCodes.CUSTOMER.NOT_FOUND)
|
if (err.details === ErrorCodes.CUSTOMER.NOT_FOUND)
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { Link } from '@dadosfera/protospack-v2/dist/lib/Duc/interfaces/entities';
|
|
||||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||||
|
|
||||||
export class CustomerLink implements Link {
|
export class CustomerLinkItem {
|
||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
href: string;
|
href: string;
|
||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
@@ -9,15 +8,59 @@ export class CustomerLink implements Link {
|
|||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
description: string;
|
description: string;
|
||||||
@ApiPropertyOptional()
|
@ApiPropertyOptional()
|
||||||
iconSrc: string;
|
iconSrc?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class CustomerSidebarLinkItem {
|
||||||
|
@ApiProperty()
|
||||||
|
type: 'link';
|
||||||
|
@ApiProperty({ type: Object })
|
||||||
|
title: Record<string, string>;
|
||||||
|
@ApiProperty()
|
||||||
|
link: string;
|
||||||
|
@ApiPropertyOptional()
|
||||||
|
icon?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class CustomerSidebarMenuItem {
|
||||||
|
@ApiProperty()
|
||||||
|
type: 'menu';
|
||||||
|
@ApiProperty({ type: Object })
|
||||||
|
title: Record<string, string>;
|
||||||
|
@ApiPropertyOptional()
|
||||||
|
icon?: string;
|
||||||
|
@ApiProperty({ type: [CustomerSidebarLinkItem] })
|
||||||
|
items: CustomerSidebarLinkItem[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export class CustomerSidebarSection {
|
||||||
|
@ApiProperty({ type: Object })
|
||||||
|
title: Record<string, string>;
|
||||||
|
@ApiProperty({
|
||||||
|
type: 'array',
|
||||||
|
items: {
|
||||||
|
oneOf: [
|
||||||
|
{ $ref: '#/components/schemas/CustomerSidebarMenuItem' },
|
||||||
|
{ $ref: '#/components/schemas/CustomerSidebarLinkItem' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
})
|
||||||
|
items: (CustomerSidebarMenuItem | CustomerSidebarLinkItem)[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export class CustomerLinksConfig {
|
||||||
|
@ApiPropertyOptional({ type: [CustomerLinkItem] })
|
||||||
|
home?: CustomerLinkItem[];
|
||||||
|
@ApiPropertyOptional({ type: [CustomerSidebarSection] })
|
||||||
|
sidebar?: CustomerSidebarSection[];
|
||||||
|
}
|
||||||
|
|
||||||
export class CustomerLinkRequest {
|
export class CustomerLinkRequest {
|
||||||
@ApiProperty({ type: [CustomerLink] })
|
@ApiProperty({ type: CustomerLinksConfig })
|
||||||
links: CustomerLink[];
|
links: CustomerLinksConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CustomerLinksResponse {
|
export class CustomerLinksResponse {
|
||||||
@ApiProperty({ type: [CustomerLink] })
|
@ApiPropertyOptional({ type: CustomerLinksConfig })
|
||||||
links: CustomerLink[];
|
links?: CustomerLinksConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -11,17 +11,19 @@ export class TableColumns {
|
|||||||
name: string;
|
name: string;
|
||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
columns: string[];
|
columns: string[];
|
||||||
@ApiProperty()
|
@ApiPropertyOptional({ type: [Column] })
|
||||||
references: Column[];
|
references: Column[];
|
||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
identifier_columns: string[];
|
|
||||||
@ApiProperty()
|
|
||||||
destination: Record<'raw' | 'qualify', {
|
destination: Record<'raw' | 'qualify', {
|
||||||
table_name: string;
|
table_name: string;
|
||||||
table_schema: string;
|
table_schema: string;
|
||||||
}> | null;
|
}> | null;
|
||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
type: string;
|
type: string;
|
||||||
|
@ApiPropertyOptional({ type: [String] })
|
||||||
|
identifier_columns?: string[];
|
||||||
|
@ApiPropertyOptional({ type: Column })
|
||||||
|
reference_column?: Column;
|
||||||
}
|
}
|
||||||
export class AvailableEntity {
|
export class AvailableEntity {
|
||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
|
|||||||
@@ -164,6 +164,11 @@ export class InputsService {
|
|||||||
const inputCreateGenericRequest: InputCreateGenericRequest = {
|
const inputCreateGenericRequest: InputCreateGenericRequest = {
|
||||||
input: {
|
input: {
|
||||||
...body,
|
...body,
|
||||||
|
tables: (body.tables || []).map((table) => ({
|
||||||
|
...table,
|
||||||
|
identifier_columns: table.identifier_columns || [],
|
||||||
|
reference_column: table.reference_column || table.references?.[0],
|
||||||
|
})),
|
||||||
},
|
},
|
||||||
info,
|
info,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user