diff --git a/docsfera.json b/docsfera.json index eed1cb5..ec823b4 100644 --- a/docsfera.json +++ b/docsfera.json @@ -7952,6 +7952,4126 @@ } } }, + "/platform/pipeline": { + "post": { + "operationId": "PlatformApiController_createPipeline", + "summary": "Create a new pipeline", + "parameters": [], + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/platform/pipelines": { + "get": { + "operationId": "PlatformApiController_getPipelines", + "summary": "List all pipelines for customer", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/platform/pipeline/{pipelineId}": { + "get": { + "operationId": "PlatformApiController_getPipeline", + "summary": "Get pipeline by ID", + "parameters": [ + { + "name": "pipelineId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + }, + "patch": { + "operationId": "PlatformApiController_updatePipeline", + "summary": "Update pipeline by ID", + "parameters": [ + { + "name": "pipelineId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + }, + "delete": { + "operationId": "PlatformApiController_deletePipeline", + "summary": "Delete pipeline by ID", + "parameters": [ + { + "name": "pipelineId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/platform/pipeline/execute": { + "post": { + "operationId": "PlatformApiController_executePipeline", + "summary": "Execute a pipeline", + "parameters": [], + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/platform/pipeline/pause": { + "post": { + "operationId": "PlatformApiController_pausePipeline", + "summary": "Pause a pipeline", + "parameters": [], + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/platform/pipeline/unpause": { + "post": { + "operationId": "PlatformApiController_unpausePipeline", + "summary": "Unpause a pipeline", + "parameters": [], + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/platform/pipeline/{pipelineId}/memory": { + "put": { + "operationId": "PlatformApiController_updatePipelineMemory", + "summary": "Update pipeline memory configuration", + "parameters": [ + { + "name": "pipelineId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/platform/pipeline/{pipelineId}/metadata": { + "put": { + "operationId": "PlatformApiController_updatePipelineMetadata", + "summary": "Update pipeline metadata", + "parameters": [ + { + "name": "pipelineId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/platform/pipelines/metadata": { + "get": { + "operationId": "PlatformApiController_getPipelinesMetadata", + "summary": "Get all pipelines metadata", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/platform/pipelines/catalog/tables": { + "get": { + "operationId": "PlatformApiController_getAvailableTables", + "summary": "Get all tables available", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/platform/pipelines/catalog/schemas": { + "get": { + "operationId": "PlatformApiController_getAvailableSchemas", + "summary": "Get all schemas available", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/platform/pipelines/catalog/tables/validate": { + "post": { + "operationId": "PlatformApiController_validateTableAndSchema", + "summary": "Validate tables and schemas", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/platform/pipeline/{pipelineId}/pipeline_run": { + "get": { + "operationId": "PlatformApiController_getPipelineRuns", + "summary": "Get pipeline runs for a pipeline", + "parameters": [ + { + "name": "pipelineId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/platform/pipeline/{pipelineId}/pipeline_run/{runId}": { + "get": { + "operationId": "PlatformApiController_getPipelineRun", + "summary": "Get specific pipeline run", + "parameters": [ + { + "name": "pipelineId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "runId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/platform/pipeline/pipeline_run/{runId}/logs": { + "get": { + "operationId": "PlatformApiController_getPipelineRunLogs", + "summary": "Get pipeline run logs", + "parameters": [ + { + "name": "runId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/platform/jobs/{jobId}/input": { + "put": { + "operationId": "PlatformApiController_updateJobInput", + "summary": "Update job input columns", + "parameters": [ + { + "name": "jobId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + }, + "patch": { + "operationId": "PlatformApiController_patchJobInput", + "summary": "Partial update job input columns", + "parameters": [ + { + "name": "jobId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/platform/jobs/{jobId}/memory": { + "put": { + "operationId": "PlatformApiController_updateJobMemory", + "summary": "Update job memory configuration", + "parameters": [ + { + "name": "jobId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/platform/jobs/{jobId}/reset-state": { + "post": { + "operationId": "PlatformApiController_resetJobState", + "summary": "Reset job state", + "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/{jobId}": { + "delete": { + "operationId": "PlatformApiController_deleteJob", + "summary": "Delete a job and mark its table as deleted in DynamoDB", + "parameters": [ + { + "name": "jobId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/platform/jobs/jdbc/{jobId}": { + "get": { + "operationId": "PlatformApiController_getJdbcJob", + "summary": "Get JDBC job details", + "parameters": [ + { + "name": "jobId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/platform/jobs/jdbc/{jobId}/sync-mode": { + "post": { + "operationId": "PlatformApiController_updateJdbcSyncMode", + "summary": "Update JDBC job sync mode", + "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": { + "get": { + "operationId": "PlatformApiController_getJdbcAllowedDatatypes", + "summary": "Get allowed datatypes for JDBC", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/platform/jobs/singer/{jobId}": { + "get": { + "operationId": "PlatformApiController_getSingerJob", + "summary": "Get Singer job details", + "parameters": [ + { + "name": "jobId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/platform/jobs/singer/{jobId}/sync-mode": { + "post": { + "operationId": "PlatformApiController_updateSingerSyncMode", + "summary": "Update Singer job sync mode", + "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/s3/{jobId}": { + "get": { + "operationId": "PlatformApiController_getS3Job", + "summary": "Get S3 job details", + "parameters": [ + { + "name": "jobId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/platform/health": { + "get": { + "operationId": "PlatformApiController_healthCheck", + "summary": "Platform API health check", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Platform API" + ], + "security": [ + { + "access-token": [] + } + ] + } + }, + "/storage-explorer/tables/validate-name": { + "post": { + "operationId": "StorageExplorerController_validateTableName", + "summary": "Validate table name in PostgreSQL and Snowflake", + "parameters": [], + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Storage Explorer" + ], + "security": [ + { + "access-token": [] + }, + { + "access-token": [] + } + ] + } + }, + "/storage-explorer/tables": { + "post": { + "operationId": "StorageExplorerController_createTable", + "summary": "Create a new table", + "parameters": [], + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Storage Explorer" + ], + "security": [ + { + "access-token": [] + }, + { + "access-token": [] + } + ] + }, + "get": { + "operationId": "StorageExplorerController_listTables", + "summary": "List all tables with pagination", + "parameters": [ + { + "name": "page", + "required": true, + "in": "query", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Storage Explorer" + ], + "security": [ + { + "access-token": [] + }, + { + "access-token": [] + } + ] + } + }, + "/storage-explorer/tables/{tableId}": { + "get": { + "operationId": "StorageExplorerController_getTable", + "summary": "Get table details by ID", + "parameters": [ + { + "name": "tableId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Storage Explorer" + ], + "security": [ + { + "access-token": [] + }, + { + "access-token": [] + } + ] + } + }, + "/storage-explorer/tables/{tableId}/datasets/{datasetId}": { + "post": { + "operationId": "StorageExplorerController_linkDatasetToTable", + "summary": "Link a dataset to a table", + "parameters": [ + { + "name": "tableId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "datasetId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Storage Explorer" + ], + "security": [ + { + "access-token": [] + }, + { + "access-token": [] + } + ] + } + }, + "/storage-explorer/tables/{tableId}/datasets": { + "get": { + "operationId": "StorageExplorerController_getTableDatasets", + "summary": "Get all datasets linked to a table", + "parameters": [ + { + "name": "tableId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Storage Explorer" + ], + "security": [ + { + "access-token": [] + }, + { + "access-token": [] + } + ] + } + }, + "/storage-explorer/tables/{tableId}/schema": { + "get": { + "operationId": "StorageExplorerController_getTableSchema", + "summary": "Get table schema", + "parameters": [ + { + "name": "tableId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Storage Explorer" + ], + "security": [ + { + "access-token": [] + }, + { + "access-token": [] + } + ] + } + }, + "/storage-explorer/tables/{tableId}/validate-compatibility/{datasetId}": { + "post": { + "operationId": "StorageExplorerController_validateSchemaCompatibility", + "summary": "Validate schema compatibility between table and dataset", + "parameters": [ + { + "name": "tableId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "datasetId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Storage Explorer" + ], + "security": [ + { + "access-token": [] + }, + { + "access-token": [] + } + ] + } + }, + "/storage-explorer/datasets/{datasetId}/preview": { + "get": { + "operationId": "StorageExplorerController_getDatasetPreview", + "summary": "Get dataset preview data", + "parameters": [ + { + "name": "datasetId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "required": true, + "in": "query", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Storage Explorer" + ], + "security": [ + { + "access-token": [] + }, + { + "access-token": [] + } + ] + } + }, + "/storage-explorer/datasets/{datasetId}/schema": { + "get": { + "operationId": "StorageExplorerController_getDatasetSchema", + "summary": "Get dataset schema information", + "parameters": [ + { + "name": "datasetId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "force_refresh", + "required": true, + "in": "query", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Storage Explorer" + ], + "security": [ + { + "access-token": [] + }, + { + "access-token": [] + } + ] + } + }, + "/storage-explorer/datasets/upload/{uploadId}": { + "get": { + "operationId": "StorageExplorerController_listDatasetsByUpload", + "summary": "List all datasets for a specific upload", + "parameters": [ + { + "name": "uploadId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Storage Explorer" + ], + "security": [ + { + "access-token": [] + }, + { + "access-token": [] + } + ] + } + }, + "/storage-explorer/datasets/{datasetId}/refresh-schema": { + "put": { + "operationId": "StorageExplorerController_refreshDatasetSchema", + "summary": "Refresh dataset schema with new parsing options (Excel)", + "parameters": [ + { + "name": "datasetId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Storage Explorer" + ], + "security": [ + { + "access-token": [] + }, + { + "access-token": [] + } + ] + } + }, + "/storage-explorer/storage/uploads/history": { + "get": { + "operationId": "StorageExplorerController_listFileExplorerUploads", + "summary": "List file explorer uploads with pagination", + "parameters": [ + { + "name": "page", + "required": true, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "limit", + "required": true, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "folder_path", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Storage Explorer" + ], + "security": [ + { + "access-token": [] + }, + { + "access-token": [] + } + ] + } + }, + "/storage-explorer/storage/browse": { + "get": { + "operationId": "StorageExplorerController_browseStorage", + "summary": "Browse folders and files in storage", + "parameters": [ + { + "name": "path", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Storage Explorer" + ], + "security": [ + { + "access-token": [] + }, + { + "access-token": [] + } + ] + } + }, + "/storage-explorer/storage/upload/batch": { + "post": { + "operationId": "StorageExplorerController_batchUpload", + "summary": "Upload multiple files to storage", + "parameters": [], + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Storage Explorer" + ], + "security": [ + { + "access-token": [] + }, + { + "access-token": [] + } + ] + } + }, + "/storage-explorer/storage/folder/create": { + "post": { + "operationId": "StorageExplorerController_createFolder", + "summary": "Create a new folder in storage", + "parameters": [], + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Storage Explorer" + ], + "security": [ + { + "access-token": [] + }, + { + "access-token": [] + } + ] + } + }, + "/storage-explorer/storage/download": { + "get": { + "operationId": "StorageExplorerController_downloadFile", + "summary": "Download a file from storage", + "parameters": [ + { + "name": "file_path", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Storage Explorer" + ], + "security": [ + { + "access-token": [] + }, + { + "access-token": [] + } + ] + } + }, + "/storage-explorer/storage/metadata": { + "get": { + "operationId": "StorageExplorerController_getFileMetadata", + "summary": "Get detailed file metadata", + "parameters": [ + { + "name": "file_path", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Storage Explorer" + ], + "security": [ + { + "access-token": [] + }, + { + "access-token": [] + } + ] + } + }, + "/health": { + "get": { + "operationId": "HealthController_check", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Health" + ] + } + } + }, + "info": { + "title": "Maestro", + "description": "This is the Maestro API", + "version": "1.0.0", + "contact": {} + }, + "tags": [], + "servers": [], + "components": { + "securitySchemes": { + "access-token": { + "type": "apiKey", + "name": "Authorization", + "in": "header" + } + }, + "schemas": { + "AuthSignInReq": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "totp": { + "type": "string", + "description": "TOTP code used to login when Multi-Factor Authentication is enabled" + } + }, + "required": [ + "username", + "password" + ] + }, + "AuthRefreshAccessTokenReq": { + "type": "object", + "properties": { + "refreshToken": { + "type": "string" + }, + "userId": { + "type": "string" + } + }, + "required": [ + "refreshToken", + "userId" + ] + }, + "AuthRefreshAccessTokenRes": { + "type": "object", + "properties": { + "permissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "accessToken": { + "type": "string" + } + }, + "required": [ + "permissions", + "accessToken" + ] + }, + "CreateApiKeyDto": { + "type": "object", + "properties": { + "permissions": { + "description": "Array of permission IDs", + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "permissions" + ] + }, + "PermissionDto": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "CreateApiKeyResponseDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "key_mask": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PermissionDto" + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "created_by": { + "type": "string" + }, + "key": { + "type": "string" + } + }, + "required": [ + "id", + "key_mask", + "permissions", + "created_at", + "created_by", + "key" + ] + }, + "ApiKeyBaseResponseDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "key_mask": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PermissionDto" + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "created_by": { + "type": "string" + } + }, + "required": [ + "id", + "key_mask", + "permissions", + "created_at", + "created_by" + ] + }, + "CreateConnectionDto": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network_config_id": { + "type": "string" + }, + "properties": { + "type": "object" + }, + "connector_id": { + "type": "string" + }, + "connector_name": { + "type": "string" + }, + "plugin": { + "type": "string" + }, + "image_url": { + "type": "string" + } + }, + "required": [ + "name", + "description", + "type", + "properties", + "connector_id", + "connector_name", + "plugin", + "image_url" + ] + }, + "ConnectionToCatalogDto": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network_config_id": { + "type": "string" + }, + "connector_id": { + "type": "string" + }, + "connector_name": { + "type": "string" + }, + "plugin": { + "type": "string" + }, + "image_url": { + "type": "string" + } + }, + "required": [ + "name", + "description", + "type", + "connector_id", + "connector_name", + "plugin", + "image_url" + ] + }, + "ConnectionRes": { + "type": "object", + "properties": { + "connection": { + "$ref": "#/components/schemas/ConnectionToCatalogDto" + }, + "message": { + "type": "string" + } + }, + "required": [ + "connection", + "message" + ] + }, + "UpdateConnectionDto": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "network_config_id": { + "type": "string" + }, + "properties": { + "type": "object" + } + }, + "required": [ + "name", + "description", + "properties" + ] + }, + "ConnectionsRes": { + "type": "object", + "properties": { + "connections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConnectionToCatalogDto" + } + }, + "message": { + "type": "string" + } + }, + "required": [ + "connections", + "message" + ] + }, + "ConnectionDto": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "customer_id": { + "type": "string" + }, + "customer_name": { + "type": "string" + }, + "user_id": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "pipelines": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network_config_id": { + "type": "string" + }, + "properties": { + "type": "object" + }, + "connector_id": { + "type": "string" + }, + "connector_name": { + "type": "string" + }, + "plugin": { + "type": "string" + }, + "image_url": { + "type": "string" + } + }, + "required": [ + "id", + "customer_id", + "customer_name", + "user_id", + "updated_at", + "created_at", + "pipelines", + "name", + "description", + "type", + "properties", + "connector_id", + "connector_name", + "plugin", + "image_url" + ] + }, + "ConnectionDetailsRes": { + "type": "object", + "properties": { + "connection": { + "$ref": "#/components/schemas/ConnectionDto" + }, + "message": { + "type": "string" + } + }, + "required": [ + "connection", + "message" + ] + }, + "Customer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "tier": { + "type": "string" + }, + "info": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "domain", + "tier", + "info", + "createdAt", + "updatedAt" + ] + }, + "UserRole": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PermissionDto" + } + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "isPublic": { + "type": "boolean" + }, + "customer": { + "$ref": "#/components/schemas/Customer" + }, + "usage": { + "type": "string" + }, + "canUntoggle": { + "type": "boolean", + "description": "Whether this role can be untoggled" + } + }, + "required": [ + "id", + "name", + "description", + "createdAt", + "updatedAt", + "isPublic", + "customer", + "usage" + ] + }, + "IUserByCustomer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserRole" + } + }, + "jobTitle": { + "type": "string" + }, + "department": { + "type": "string" + }, + "hierarchy": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "companyName": { + "type": "string" + }, + "personalSite": { + "type": "string" + }, + "mfaStatus": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "status": { + "type": "string" + }, + "lastLogin": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "authProvider": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "email", + "roles", + "jobTitle", + "department", + "hierarchy", + "bio", + "companyName", + "personalSite", + "mfaStatus", + "createdAt", + "updatedAt", + "status" + ] + }, + "GetAllUsersByCustomerIdRes": { + "type": "object", + "properties": { + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IUserByCustomer" + } + }, + "departments": { + "type": "array", + "items": { + "type": "string" + } + }, + "jobTitles": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "users", + "departments", + "jobTitles" + ] + }, + "Hierarchy": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "GetAllHierarchiesRes": { + "type": "object", + "properties": { + "hierarchies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Hierarchy" + } + } + }, + "required": [ + "hierarchies" + ] + }, + "GetAllDepartmentsRes": { + "type": "object", + "properties": { + "departments": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "departments" + ] + }, + "CreateUserReq": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "roleNames": { + "type": "array", + "items": { + "type": "string" + } + }, + "jobTitle": { + "type": "string" + }, + "department": { + "type": "string" + }, + "hierarchy": { + "type": "string" + } + }, + "required": [ + "email" + ] + }, + "User": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserRole" + } + }, + "jobTitle": { + "type": "string" + }, + "department": { + "type": "string" + }, + "hierarchy": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "companyName": { + "type": "string" + }, + "personalSite": { + "type": "string" + }, + "customer": { + "$ref": "#/components/schemas/Customer" + }, + "mfaStatus": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "status": { + "type": "string" + }, + "lastLogin": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "email", + "roles", + "jobTitle", + "department", + "hierarchy", + "bio", + "companyName", + "personalSite", + "mfaStatus", + "createdAt", + "updatedAt", + "status" + ] + }, + "CreateUserRes": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + } + }, + "required": [ + "user" + ] + }, + "BatchCreateUserReq": { + "type": "object", + "properties": { + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CreateUserReq" + } + } + }, + "required": [ + "users" + ] + }, + "ErrorUsers": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/CreateUserReq" + }, + "error": { + "type": "string" + } + }, + "required": [ + "user", + "error" + ] + }, + "BatchCreateUserRes": { + "type": "object", + "properties": { + "usersCreated": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + }, + "errorUsers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorUsers" + } + } + }, + "required": [ + "usersCreated", + "errorUsers" + ] + }, + "DeleteUserRes": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "SetUserRolesReq": { + "type": "object", + "properties": { + "userId": { + "type": "string" + }, + "roleNames": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "userId", + "roleNames" + ] + }, + "SetUserRolesRes": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/IUserByCustomer" + } + }, + "required": [ + "user" + ] + }, + "AssignRoleToUserReq": { + "type": "object", + "properties": { + "userId": { + "type": "string" + }, + "roleId": { + "type": "string" + } + }, + "required": [ + "userId", + "roleId" + ] + }, + "UpdateUserReq": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "jobTitle": { + "type": "string" + }, + "department": { + "type": "string" + }, + "hierarchy": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "personalSite": { + "type": "string" + }, + "companyName": { + "type": "string" + }, + "roleNames": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "UpdateUserRes": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/IUserByCustomer" + } + }, + "required": [ + "user" + ] + }, + "UserNoRolesAndCustomer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "jobTitle": { + "type": "string" + }, + "department": { + "type": "string" + }, + "hierarchy": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "companyName": { + "type": "string" + }, + "personalSite": { + "type": "string" + }, + "mfaStatus": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "status": { + "type": "string" + }, + "lastLogin": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "email", + "jobTitle", + "department", + "hierarchy", + "bio", + "companyName", + "personalSite", + "mfaStatus", + "createdAt", + "updatedAt", + "status" + ] + }, + "RoleDto": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PermissionDto" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserNoRolesAndCustomer" + } + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "isPublic": { + "type": "boolean" + }, + "customer": { + "$ref": "#/components/schemas/Customer" + }, + "usage": { + "type": "string" + }, + "canUntoggle": { + "type": "boolean", + "description": "Whether this role can be untoggled" + } + }, + "required": [ + "id", + "name", + "description", + "createdAt", + "updatedAt", + "isPublic", + "customer", + "usage" + ] + }, + "GetRolesByCustomerRes": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RoleDto" + } + } + }, + "required": [ + "roles" + ] + }, + "CreateRoleReq": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "permissionIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "userIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "type": "string" + } + }, + "required": [ + "name", + "permissionIds", + "description" + ] + }, + "CustomerRole": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PermissionDto" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserNoRolesAndCustomer" + } + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "isPublic": { + "type": "boolean" + }, + "usage": { + "type": "string" + }, + "canUntoggle": { + "type": "boolean", + "description": "Whether this role can be untoggled" + } + }, + "required": [ + "id", + "name", + "description", + "createdAt", + "updatedAt", + "isPublic", + "usage" + ] + }, + "CreateRoleRes": { + "type": "object", + "properties": { + "role": { + "$ref": "#/components/schemas/CustomerRole" + } + }, + "required": [ + "role" + ] + }, + "GrantPermissionsToRoleReq": { + "type": "object", + "properties": { + "roleId": { + "type": "string" + }, + "permissionIds": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "roleId", + "permissionIds" + ] + }, + "GrantPermissionsToRoleRes": { + "type": "object", + "properties": { + "role": { + "$ref": "#/components/schemas/RoleDto" + } + }, + "required": [ + "role" + ] + }, + "RevokePermissionsFromRoleReq": { + "type": "object", + "properties": { + "roleId": { + "type": "string" + }, + "permissionIds": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "roleId", + "permissionIds" + ] + }, + "RevokePermissionsFromRoleRes": { + "type": "object", + "properties": { + "role": { + "$ref": "#/components/schemas/RoleDto" + } + }, + "required": [ + "role" + ] + }, + "SetRolePermissionsReq": { + "type": "object", + "properties": { + "roleId": { + "type": "string" + }, + "permissionIds": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "roleId", + "permissionIds" + ] + }, + "SetRolePermissionsRes": { + "type": "object", + "properties": { + "role": { + "$ref": "#/components/schemas/RoleDto" + } + }, + "required": [ + "role" + ] + }, + "SetRoleUsersReq": { + "type": "object", + "properties": { + "roleId": { + "type": "string" + }, + "userIds": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "roleId", + "userIds" + ] + }, + "SetRoleUsersRes": { + "type": "object", + "properties": { + "role": { + "$ref": "#/components/schemas/RoleDto" + } + }, + "required": [ + "role" + ] + }, + "UpdateRoleReq": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "UpdateRoleRes": { + "type": "object", + "properties": { + "role": { + "$ref": "#/components/schemas/RoleDto" + } + }, + "required": [ + "role" + ] + }, + "PermissionGroupPermission": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "id": { + "type": "number" + } + }, + "required": [ + "name", + "id" + ] + }, + "PermissionGroup": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PermissionGroupPermission" + } + } + }, + "required": [ + "title", + "permissions" + ] + }, + "GetPublicPermissionsRes": { + "type": "object", + "properties": { + "permissionGroups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PermissionGroup" + } + } + }, + "required": [ + "permissionGroups" + ] + }, + "CreateConnectorDto": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + }, + "connector": { + "type": "string" + } + }, + "required": [ + "file", + "connector" + ] + }, + "UpdateDto": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + }, + "version": { + "type": "string" + }, + "category": { + "type": "string" + }, + "plugin": { + "type": "string" + }, + "image": { + "type": "string" + }, + "docs": { + "type": "string" + }, + "name": { + "type": "string" + }, + "options": { + "type": "object", + "description": "skip_select_entities: boolean skip_select_columns: boolean;" + }, + "connection_controls": { + "type": "array", + "items": { + "properties": {} + } + } + }, + "required": [ + "version" + ] + }, + "AddTagDto": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "tags" + ] + }, + "RemoveTagDto": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "tags" + ] + }, + "NetworkConfigToCatalogDto": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "customer_id": { + "type": "string" + }, + "plugin": { + "type": "string" + }, + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "network_type_id": { + "type": "string" + }, + "network_type_name": { + "type": "string" + } + }, + "required": [ + "id", + "customer_id", + "plugin", + "type", + "name", + "description", + "created_at", + "updated_at", + "network_type_id", + "network_type_name" + ] + }, + "FindAllNetworkConfigsRes": { + "type": "object", + "properties": { + "network_configs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NetworkConfigToCatalogDto" + } + }, + "message": { + "type": "string" + } + }, + "required": [ + "network_configs", + "message" + ] + }, + "CreateNetworkConfigReq": { + "type": "object", + "properties": { + "network_type_id": { + "type": "string" + }, + "network_type_name": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "ovpn_file": { + "type": "string", + "format": "binary" + } + }, + "required": [ + "network_type_id", + "network_type_name", + "name", + "description", + "ovpn_file" + ] + }, + "CreateNetworkConfigRes": { + "type": "object", + "properties": { + "network_config": { + "$ref": "#/components/schemas/NetworkConfigToCatalogDto" + } + }, + "required": [ + "network_config" + ] + }, + "AvailableEntity": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "replication_methods": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "name", + "replication_methods" + ] + }, + "GetAvailableEntitiesRes": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AvailableEntity" + } + } + }, + "required": [ + "entities" + ] + }, + "Column": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "name", + "type" + ] + }, + "TableColumns": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "columns": { + "type": "array", + "items": { + "type": "string" + } + }, + "references": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Column" + } + }, + "destination": { + "type": "object" + }, + "type": { + "type": "string" + }, + "identifier_columns": { + "type": "array", + "items": { + "type": "string" + } + }, + "reference_column": { + "$ref": "#/components/schemas/Column" + } + }, + "required": [ + "name", + "columns", + "destination", + "type" + ] + }, + "CreateInputReq": { + "type": "object", + "properties": { + "tables": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TableColumns" + } + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "plugin": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "tables", + "name", + "description", + "plugin" + ] + }, + "Input": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "tables": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TableColumns" + } + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "plugin": { + "type": "string" + }, + "type": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "required": [ + "id", + "tables", + "name", + "description", + "plugin", + "created_at", + "updated_at" + ] + }, + "ICreatePipelineV2Req": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + }, + "connection_id": { + "type": "string" + }, + "cron": { + "type": "string" + }, + "input_id": { + "type": "string" + }, + "transformations_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "properties": { + "type": "object" + }, + "connector_name": { + "type": "string" + }, + "connector_plugin": { + "type": "string" + }, + "connector_version": { + "type": "string" + }, + "image_url": { + "type": "string" + } + }, + "required": [ + "name", + "description", + "type", + "connection_id", + "cron", + "connector_name", + "connector_plugin", + "connector_version", + "image_url" + ] + }, + "IPipelineV2": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + }, + "connection_id": { + "type": "string" + }, + "cron": { + "type": "string" + }, + "input_id": { + "type": "string" + }, + "transformations_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "properties": { + "type": "object" + }, + "connector_name": { + "type": "string" + }, + "connector_plugin": { + "type": "string" + }, + "connector_version": { + "type": "string" + }, + "image_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "description", + "type", + "connection_id", + "cron", + "connector_name", + "connector_plugin", + "connector_version", + "image_url", + "created_at", + "updated_at" + ] + }, + "IInitUploadCSVFile": { + "type": "object", + "properties": { + "file_name": { + "type": "string" + }, + "parts": { + "type": "number" + } + }, + "required": [ + "file_name", + "parts" + ] + }, + "ICompleteUploadCSVFile": { + "type": "object", + "properties": { + "upload_id": { + "type": "string" + }, + "file_name": { + "type": "string" + }, + "parts": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "upload_id", + "file_name", + "parts" + ] + }, + "ICreatePipelineCSVFile": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "file_name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "encoding": { + "type": "string" + }, + "sep": { + "type": "string" + }, + "header": { + "type": "boolean" + }, + "engine": { + "type": "string" + } + }, + "required": [ + "name", + "file_name", + "description", + "encoding", + "sep", + "header", + "engine" + ] + }, + "IRole": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": [ + "name", + "id" + ] + }, + "IUser": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": [ + "username", + "id" + ] + }, + "IComment": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "message": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "required": [ + "id", + "message", + "created_at", + "username" + ] + }, + "EmbedObject": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "required": [ + "url" + ] + }, + "IDataAsset": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "database_name": { + "type": "string" + }, + "table_name": { + "type": "string" + }, + "num_columns": { + "type": "number" + }, + "location": { + "type": "string" + }, + "created_time": { + "type": "string" + }, + "table_type": { + "type": "string" + }, + "size_in_bytes": { + "type": "number" + }, + "num_files": { + "type": "number" + }, + "data_encrypted": { + "type": "string" + }, + "num_rows": { + "type": "number" + }, + "display_name": { + "type": "string" + }, + "pipeline_id": { + "type": "string" + }, + "user_id": { + "type": "string" + }, + "description": { + "type": "string" + }, + "data_asset_type": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "owner": { + "type": "string" + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IRole" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IUser" + } + }, + "dashboard_id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "type": "string" + } + }, + "embedding_params": { + "type": "object" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "comments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IComment" + } + }, + "embed": { + "$ref": "#/components/schemas/EmbedObject" + }, + "share_type": { + "type": "string", + "enum": [ + "none", + "public", + "private" + ] + }, + "docs": { + "type": "string" + } + }, + "required": [ + "id", + "display_name", + "pipeline_id", + "user_id", + "description", + "data_asset_type", + "tags", + "owner", + "roles", + "users", + "created_at", + "comments" + ] + }, + "ICatalogAllResponse": { + "type": "object", + "properties": { + "data_assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IDataAsset" + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "data_assets", + "total" + ] + }, + "IColumnMetadata": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "table_name": { + "type": "string" + }, + "column_name": { + "type": "string" + }, + "data_type": { + "type": "string" + }, + "missing_count": { + "type": "string" + }, + "min": { + "type": "string" + }, + "max": { + "type": "string" + }, + "count": { + "type": "string" + }, + "histogram": { + "type": "string" + }, + "mean": { + "type": "string" + }, + "median": { + "type": "string" + }, + "missing_rate": { + "type": "string" + }, + "stddev": { + "type": "string" + }, + "unique_count": { + "type": "string" + }, + "unique_rate": { + "type": "string" + }, + "analyzer_rules": { + "type": "array", + "items": { + "type": "string" + } + }, + "version": { + "type": "string" + } + }, + "required": [ + "id", + "table_name", + "column_name", + "data_type", + "missing_count", + "min", + "max", + "count", + "histogram", + "mean", + "median", + "missing_rate", + "stddev", + "unique_count", + "unique_rate", + "analyzer_rules", + "version" + ] + }, + "IColumnsMetadataResponse": { + "type": "object", + "properties": { + "columns_metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IColumnMetadata" + } + } + }, + "required": [ + "columns_metadata" + ] + }, + "IData": { + "type": "object", + "properties": { + "var": { + "type": "number" + }, + "date": { + "type": "string" + }, + "last": { + "type": "number" + }, + "maximum": { + "type": "number" + }, + "minimum": { + "type": "number" + }, + "day_opening": { + "type": "number" + } + }, + "required": [ + "var", + "date", + "last", + "maximum", + "minimum", + "day_opening" + ] + }, + "IPreview": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "database_name": { + "type": "string" + }, + "table_name": { + "type": "string" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IData" + } + } + }, + "required": [ + "id", + "database_name", + "table_name", + "data" + ] + }, + "IPreviewResponse": { + "type": "object", + "properties": { + "preview": { + "$ref": "#/components/schemas/IPreview" + } + }, + "required": [ + "preview" + ] + }, + "IDocs": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "docs": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "table_id": { + "type": "string" + } + }, + "required": [ + "id", + "docs", + "updated_at", + "table_id" + ] + }, + "IDocsResponse": { + "type": "object", + "properties": { + "docs": { + "$ref": "#/components/schemas/IDocs" + } + }, + "required": [ + "docs" + ] + }, + "IUpdateDataRequest": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "embed": { + "$ref": "#/components/schemas/EmbedObject" + }, + "share_type": { + "type": "string", + "enum": [ + "none", + "public", + "private" + ] + }, + "docs": { + "type": "string" + } + }, + "required": [ + "name", + "description", + "tags" + ] + }, + "IOneDataAsset": { + "type": "object", + "properties": { + "data_asset": { + "$ref": "#/components/schemas/IDataAsset" + } + }, + "required": [ + "data_asset" + ] + }, + "ICreateDataAsset": { + "type": "object", + "properties": { + "display_name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "data_asset_type": { + "type": "string" + }, + "external_url": { + "type": "string" + }, + "location": { + "type": "string" + }, + "embed": { + "$ref": "#/components/schemas/EmbedObject" + }, + "docs": { + "type": "string" + } + }, + "required": [ + "display_name", + "description", + "data_asset_type", + "external_url", + "location" + ] + }, + "IMakeAComment": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ] + }, + "CommentToDelete": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "username": { + "type": "string" + } + }, + "required": [ + "id", + "username" + ] + }, + "IDeleteComment": { + "type": "object", + "properties": { + "comment": { + "$ref": "#/components/schemas/CommentToDelete" + } + }, + "required": [ + "comment" + ] + }, + "TriggerCatalogReq": { + "type": "object", + "properties": { + "table_name": { + "type": "string", + "description": "Name of the table on Snowflake", + "example": "TB__4DXSD4_TEST" + }, + "table_schema": { + "type": "string", + "description": "Schema where the asset is located. If not set defaults to \"PUBLIC\"" + }, + "pipeline_id": { + "type": "string", + "description": "Id of the pipeline that generated the asset." + } + }, + "required": [ + "table_name" + ] + }, + "TriggerCatalogRes": { + "type": "object", + "properties": { + "session": { + "type": "string" + } + }, + "required": [ + "session" + ] + }, + "GetDatasetCatalogTaskRes": { + "type": "object", + "properties": { + "created_at": { + "type": "string" + }, + "customer_name": { + "type": "string" + }, + "session_id": { + "type": "string" + }, + "status": { + "type": "string" + }, + "table_name": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "updated_by": { + "type": "string" + } + }, + "required": [ + "created_at", + "customer_name", + "session_id", + "status", + "table_name", + "updated_at", + "updated_by" + ] + }, "EnforceMfa": { "type": "object", "properties": { @@ -8529,3 +12649,4 @@ } } } +} \ No newline at end of file diff --git a/src/modules/platform-api/platform-api.controller.ts b/src/modules/platform-api/platform-api.controller.ts index 74caaf9..a83b7bd 100644 --- a/src/modules/platform-api/platform-api.controller.ts +++ b/src/modules/platform-api/platform-api.controller.ts @@ -963,74 +963,55 @@ export class PlatformApiController { } @Delete('jobs/:jobId') - @ApiOperation({ summary: 'Delete a job and sync pipeline data' }) + @ApiOperation({ summary: 'Delete a job and mark its table as deleted in DynamoDB' }) @RequireAllPermissions(PERMISSIONS_GROUPS.PIPELINE.permissions.DELETE) async deleteJob( @Param('jobId') jobId: string, @User() user: RequestUser, ) { - // Get job details before deletion to extract table_name and connector type const normalizedJobId = this.normalizeJobId(jobId); - let tableName: string | undefined; + const esPipelineId = this.extractPipelineIdFromJobId(jobId); - this.logger.info('[deleteJob] Start', { jobId }); + // Fetch job details and ES pipeline in parallel — both are reads with no mutual dependency + const [jobResult, esPipelineResult] = await Promise.allSettled([ + this.platformApiService.proxy('GET', `/jobs/${normalizedJobId}`, user), + this.elasticsearchService.getPipeline(user.customer_name, esPipelineId), + ]); - try { - const job = await this.platformApiService.proxy( - 'GET', - `/jobs/${normalizedJobId}`, - user, - ); - tableName = job?.source_config?.table_name; - this.logger.info('[deleteJob] Job fetched', { jobId, tableName }); - } catch (err) { - this.logger.warn('[deleteJob] Could not fetch job before deletion', { jobId, error: err.message }); + const tableName: string | undefined = jobResult.status === 'fulfilled' + ? jobResult.value?.source_config?.table_name + : undefined; + + if (jobResult.status === 'rejected') { + this.logger.warn('deleteJob: could not fetch job before deletion', { jobId, error: jobResult.reason?.message }); } - const result = await this.platformApiService.proxy( - 'DELETE', - `/jobs/${normalizedJobId}`, - user, - ); - this.logger.info('[deleteJob] Job deleted from platform-api', { jobId }); + // Main operation + const result = await this.platformApiService.proxy('DELETE', `/jobs/${normalizedJobId}`, user); - // Mark the table as deleted via in-factory (which has the correct DynamoDB credentials). - // config.tables in ES stores the DynamoDB input ID (legacy naming). - if (tableName) { - try { - const esPipelineId = this.extractPipelineIdFromJobId(jobId); - const esPipeline = await this.elasticsearchService.getPipeline( - user.customer_name, - esPipelineId, - ); - // config.tables holds the DynamoDB input ID (see syncJobInputToDynamoDB for context) - const dynamoInputId = esPipeline?.config?.tables; + // Sync deleted status to DynamoDB — follows syncJobInputToDynamoDB pattern + // config.tables in ES stores the DynamoDB input ID (legacy field naming) + const dynamoInputId: string | undefined = esPipelineResult.status === 'fulfilled' + ? esPipelineResult.value?.config?.tables + : undefined; - if (dynamoInputId) { - const info = { customer_id: user.customer_id, user_id: user.user_id, customer: user.customer_name }; + if (esPipelineResult.status === 'rejected') { + this.logger.warn('deleteJob: could not fetch ES pipeline for DynamoDB sync', { jobId, error: esPipelineResult.reason?.message }); + } - // Read current input to get full tables array (adjustInputPayload flattens the response) - const { input } = await this.inputsService.findOne({ id: dynamoInputId, info }); - const currentTables: any[] = input?.tables ?? []; - - const updatedTables = currentTables.map((t: any) => - t.name === tableName ? { ...t, status: 'deleted' } : t, - ); - - await this.inputsService.update(dynamoInputId, { tables: updatedTables }, info); - this.logger.info('[deleteJob] Marked table as deleted via in-factory', { jobId, tableName }); - } else { - this.logger.warn('[deleteJob] No input ID in ES pipeline, skipping DynamoDB update', { jobId, tableName }); - } - } catch (error) { - this.logger.error('[deleteJob] Failed to mark table as deleted via in-factory', { - jobId, - tableName, - error: error.message, - }); - } + if (tableName && dynamoInputId) { + await this.dynamoDBService.updateInputTable( + user.customer_id, + dynamoInputId, + tableName, + { status: 'deleted' }, + ).catch((error) => { + this.logger.error('Failed to sync job deletion to DynamoDB', { jobId, tableName, error: error.message }); + }); + } else if (!tableName) { + this.logger.warn('deleteJob: table name not resolved, skipping DynamoDB sync', { jobId }); } else { - this.logger.warn('[deleteJob] tableName not resolved, skipping DynamoDB update', { jobId }); + this.logger.warn('deleteJob: no input ID in ES pipeline, skipping DynamoDB sync', { jobId }); } return result;