From 93dfe1c0268d995443a7674287c0c0a35531f4be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1chym=20Tou=C5=A1ek?= Date: Wed, 6 Nov 2024 09:47:32 +0100 Subject: [PATCH] feat: Cleanup Stream events --- schema/ext.keboola.stream.fileImport.json | 65 +------------------ schema/ext.keboola.stream.sliceUpload.json | 65 +------------------ schema/ext.keboola.stream.sourceCreate.json | 30 +-------- schema/ext.keboola.stream.sourceDelete.json | 30 +-------- schema/ext.keboola.stream.sourceDisable.json | 30 +-------- schema/ext.keboola.stream.sourceEnable.json | 30 +-------- schema/ext.keboola.stream.sourcePurge.json | 30 +-------- schema/ext.keboola.stream.sourceUndelete.json | 30 +-------- .../events/ext.keboola.stream.fileImport.json | 17 +---- .../ext.keboola.stream.sliceUpload.json | 17 +---- .../ext.keboola.stream.sourceCreate.json | 8 +-- .../ext.keboola.stream.sourceDelete.json | 8 +-- .../ext.keboola.stream.sourceDisable.json | 8 +-- .../ext.keboola.stream.sourceEnable.json | 8 +-- .../ext.keboola.stream.sourcePurge.json | 8 +-- .../ext.keboola.stream.sourceUndelete.json | 8 +-- 16 files changed, 24 insertions(+), 368 deletions(-) diff --git a/schema/ext.keboola.stream.fileImport.json b/schema/ext.keboola.stream.fileImport.json index c03c938..05ed904 100644 --- a/schema/ext.keboola.stream.fileImport.json +++ b/schema/ext.keboola.stream.fileImport.json @@ -22,44 +22,6 @@ }, "sinkId": { "type": "string" - }, - "statistics": { - "type": "object", - "properties": { - "firstRecordAt": { - "type": "string" - }, - "lastRecordAt": { - "type": "string" - }, - "recordsCount": { - "type": "integer" - }, - "slicesCount": { - "type": "integer" - }, - "uncompressedSize": { - "type": "integer" - }, - "compressedSize": { - "type": "integer" - }, - "stagingSize": { - "type": "integer" - } - }, - "required": [ - "firstRecordAt", - "lastRecordAt", - "recordsCount", - "slicesCount", - "uncompressedSize", - "compressedSize", - "stagingSize" - ] - }, - "error": { - "type": "string" } }, "required": [ @@ -73,21 +35,6 @@ "results": { "type": "object", "properties": { - "projectId": { - "type": "integer" - }, - "branchId": { - "type": "integer" - }, - "sourceId": { - "type": "string" - }, - "streamId": { - "type": "string" - }, - "sinkId": { - "type": "string" - }, "statistics": { "type": "object", "properties": { @@ -126,19 +73,11 @@ "error": { "type": "string" } - }, - "required": [ - "projectId", - "branchId", - "sourceId", - "streamId", - "sinkId" - ] + } } }, "required": [ "message", - "params", - "results" + "params" ] } diff --git a/schema/ext.keboola.stream.sliceUpload.json b/schema/ext.keboola.stream.sliceUpload.json index c03c938..05ed904 100644 --- a/schema/ext.keboola.stream.sliceUpload.json +++ b/schema/ext.keboola.stream.sliceUpload.json @@ -22,44 +22,6 @@ }, "sinkId": { "type": "string" - }, - "statistics": { - "type": "object", - "properties": { - "firstRecordAt": { - "type": "string" - }, - "lastRecordAt": { - "type": "string" - }, - "recordsCount": { - "type": "integer" - }, - "slicesCount": { - "type": "integer" - }, - "uncompressedSize": { - "type": "integer" - }, - "compressedSize": { - "type": "integer" - }, - "stagingSize": { - "type": "integer" - } - }, - "required": [ - "firstRecordAt", - "lastRecordAt", - "recordsCount", - "slicesCount", - "uncompressedSize", - "compressedSize", - "stagingSize" - ] - }, - "error": { - "type": "string" } }, "required": [ @@ -73,21 +35,6 @@ "results": { "type": "object", "properties": { - "projectId": { - "type": "integer" - }, - "branchId": { - "type": "integer" - }, - "sourceId": { - "type": "string" - }, - "streamId": { - "type": "string" - }, - "sinkId": { - "type": "string" - }, "statistics": { "type": "object", "properties": { @@ -126,19 +73,11 @@ "error": { "type": "string" } - }, - "required": [ - "projectId", - "branchId", - "sourceId", - "streamId", - "sinkId" - ] + } } }, "required": [ "message", - "params", - "results" + "params" ] } diff --git a/schema/ext.keboola.stream.sourceCreate.json b/schema/ext.keboola.stream.sourceCreate.json index 6b480ec..1356998 100644 --- a/schema/ext.keboola.stream.sourceCreate.json +++ b/schema/ext.keboola.stream.sourceCreate.json @@ -22,9 +22,6 @@ }, "sourceName": { "type": "string" - }, - "error": { - "type": "string" } }, "required": [ @@ -38,37 +35,14 @@ "results": { "type": "object", "properties": { - "projectId": { - "type": "integer" - }, - "branchId": { - "type": "integer" - }, - "sourceId": { - "type": "string" - }, - "streamId": { - "type": "string" - }, - "sourceName": { - "type": "string" - }, "error": { "type": "string" } - }, - "required": [ - "projectId", - "branchId", - "sourceId", - "streamId", - "sourceName" - ] + } } }, "required": [ "message", - "params", - "results" + "params" ] } diff --git a/schema/ext.keboola.stream.sourceDelete.json b/schema/ext.keboola.stream.sourceDelete.json index 6b480ec..1356998 100644 --- a/schema/ext.keboola.stream.sourceDelete.json +++ b/schema/ext.keboola.stream.sourceDelete.json @@ -22,9 +22,6 @@ }, "sourceName": { "type": "string" - }, - "error": { - "type": "string" } }, "required": [ @@ -38,37 +35,14 @@ "results": { "type": "object", "properties": { - "projectId": { - "type": "integer" - }, - "branchId": { - "type": "integer" - }, - "sourceId": { - "type": "string" - }, - "streamId": { - "type": "string" - }, - "sourceName": { - "type": "string" - }, "error": { "type": "string" } - }, - "required": [ - "projectId", - "branchId", - "sourceId", - "streamId", - "sourceName" - ] + } } }, "required": [ "message", - "params", - "results" + "params" ] } diff --git a/schema/ext.keboola.stream.sourceDisable.json b/schema/ext.keboola.stream.sourceDisable.json index 6b480ec..1356998 100644 --- a/schema/ext.keboola.stream.sourceDisable.json +++ b/schema/ext.keboola.stream.sourceDisable.json @@ -22,9 +22,6 @@ }, "sourceName": { "type": "string" - }, - "error": { - "type": "string" } }, "required": [ @@ -38,37 +35,14 @@ "results": { "type": "object", "properties": { - "projectId": { - "type": "integer" - }, - "branchId": { - "type": "integer" - }, - "sourceId": { - "type": "string" - }, - "streamId": { - "type": "string" - }, - "sourceName": { - "type": "string" - }, "error": { "type": "string" } - }, - "required": [ - "projectId", - "branchId", - "sourceId", - "streamId", - "sourceName" - ] + } } }, "required": [ "message", - "params", - "results" + "params" ] } diff --git a/schema/ext.keboola.stream.sourceEnable.json b/schema/ext.keboola.stream.sourceEnable.json index 6b480ec..1356998 100644 --- a/schema/ext.keboola.stream.sourceEnable.json +++ b/schema/ext.keboola.stream.sourceEnable.json @@ -22,9 +22,6 @@ }, "sourceName": { "type": "string" - }, - "error": { - "type": "string" } }, "required": [ @@ -38,37 +35,14 @@ "results": { "type": "object", "properties": { - "projectId": { - "type": "integer" - }, - "branchId": { - "type": "integer" - }, - "sourceId": { - "type": "string" - }, - "streamId": { - "type": "string" - }, - "sourceName": { - "type": "string" - }, "error": { "type": "string" } - }, - "required": [ - "projectId", - "branchId", - "sourceId", - "streamId", - "sourceName" - ] + } } }, "required": [ "message", - "params", - "results" + "params" ] } diff --git a/schema/ext.keboola.stream.sourcePurge.json b/schema/ext.keboola.stream.sourcePurge.json index 6b480ec..1356998 100644 --- a/schema/ext.keboola.stream.sourcePurge.json +++ b/schema/ext.keboola.stream.sourcePurge.json @@ -22,9 +22,6 @@ }, "sourceName": { "type": "string" - }, - "error": { - "type": "string" } }, "required": [ @@ -38,37 +35,14 @@ "results": { "type": "object", "properties": { - "projectId": { - "type": "integer" - }, - "branchId": { - "type": "integer" - }, - "sourceId": { - "type": "string" - }, - "streamId": { - "type": "string" - }, - "sourceName": { - "type": "string" - }, "error": { "type": "string" } - }, - "required": [ - "projectId", - "branchId", - "sourceId", - "streamId", - "sourceName" - ] + } } }, "required": [ "message", - "params", - "results" + "params" ] } diff --git a/schema/ext.keboola.stream.sourceUndelete.json b/schema/ext.keboola.stream.sourceUndelete.json index 6b480ec..1356998 100644 --- a/schema/ext.keboola.stream.sourceUndelete.json +++ b/schema/ext.keboola.stream.sourceUndelete.json @@ -22,9 +22,6 @@ }, "sourceName": { "type": "string" - }, - "error": { - "type": "string" } }, "required": [ @@ -38,37 +35,14 @@ "results": { "type": "object", "properties": { - "projectId": { - "type": "integer" - }, - "branchId": { - "type": "integer" - }, - "sourceId": { - "type": "string" - }, - "streamId": { - "type": "string" - }, - "sourceName": { - "type": "string" - }, "error": { "type": "string" } - }, - "required": [ - "projectId", - "branchId", - "sourceId", - "streamId", - "sourceName" - ] + } } }, "required": [ "message", - "params", - "results" + "params" ] } diff --git a/tests/events/ext.keboola.stream.fileImport.json b/tests/events/ext.keboola.stream.fileImport.json index 877ddd3..1779503 100644 --- a/tests/events/ext.keboola.stream.fileImport.json +++ b/tests/events/ext.keboola.stream.fileImport.json @@ -22,24 +22,9 @@ "branchId": 1, "sourceId": "my-source", "streamId": "8763/1/my-source", - "sinkId": "my-sink", - "statistics": { - "firstRecordAt": "2006-01-02T15:04:05.000Z", - "lastRecordAt": "2006-01-02T15:06:05.000Z", - "recordsCount": 1234, - "slicesCount": 123, - "uncompressedSize": 1000, - "compressedSize": 100, - "stagingSize": 100 - }, - "error": "" + "sinkId": "my-sink" }, "results": { - "projectId": 8763, - "branchId": 1, - "sourceId": "my-source", - "streamId": "8763/1/my-source", - "sinkId": "my-sink", "statistics": { "firstRecordAt": "2006-01-02T15:04:05.000Z", "lastRecordAt": "2006-01-02T15:06:05.000Z", diff --git a/tests/events/ext.keboola.stream.sliceUpload.json b/tests/events/ext.keboola.stream.sliceUpload.json index 13d130c..856c5c9 100644 --- a/tests/events/ext.keboola.stream.sliceUpload.json +++ b/tests/events/ext.keboola.stream.sliceUpload.json @@ -22,24 +22,9 @@ "branchId": 1, "sourceId": "my-source", "streamId": "8763/1/my-source", - "sinkId": "my-sink", - "statistics": { - "firstRecordAt": "2006-01-02T15:04:05.000Z", - "lastRecordAt": "2006-01-02T15:06:05.000Z", - "recordsCount": 1234, - "slicesCount": 123, - "uncompressedSize": 1000, - "compressedSize": 100, - "stagingSize": 100 - }, - "error": "" + "sinkId": "my-sink" }, "results": { - "projectId": 8763, - "branchId": 1, - "sourceId": "my-source", - "streamId": "8763/1/my-source", - "sinkId": "my-sink", "statistics": { "firstRecordAt": "2006-01-02T15:04:05.000Z", "lastRecordAt": "2006-01-02T15:06:05.000Z", diff --git a/tests/events/ext.keboola.stream.sourceCreate.json b/tests/events/ext.keboola.stream.sourceCreate.json index 1544364..6f125c5 100644 --- a/tests/events/ext.keboola.stream.sourceCreate.json +++ b/tests/events/ext.keboola.stream.sourceCreate.json @@ -22,15 +22,9 @@ "branchId": 1, "sourceId": "my-source", "streamId": "8763/1/my-source", - "sourceName": "My stream v1", - "error": "" + "sourceName": "My stream v1" }, "results": { - "projectId": 8763, - "branchId": 1, - "sourceId": "my-source", - "streamId": "8763/1/my-source", - "sourceName": "My stream v1", "error": "" }, "performance": {}, diff --git a/tests/events/ext.keboola.stream.sourceDelete.json b/tests/events/ext.keboola.stream.sourceDelete.json index 4c65446..0eb073c 100644 --- a/tests/events/ext.keboola.stream.sourceDelete.json +++ b/tests/events/ext.keboola.stream.sourceDelete.json @@ -22,15 +22,9 @@ "branchId": 1, "sourceId": "my-source", "streamId": "8763/1/my-source", - "sourceName": "My stream v1", - "error": "" + "sourceName": "My stream v1" }, "results": { - "projectId": 8763, - "branchId": 1, - "sourceId": "my-source", - "streamId": "8763/1/my-source", - "sourceName": "My stream v1", "error": "" }, "performance": {}, diff --git a/tests/events/ext.keboola.stream.sourceDisable.json b/tests/events/ext.keboola.stream.sourceDisable.json index b7479fc..5e74209 100644 --- a/tests/events/ext.keboola.stream.sourceDisable.json +++ b/tests/events/ext.keboola.stream.sourceDisable.json @@ -22,15 +22,9 @@ "branchId": 1, "sourceId": "my-source", "streamId": "8763/1/my-source", - "sourceName": "My stream v1", - "error": "" + "sourceName": "My stream v1" }, "results": { - "projectId": 8763, - "branchId": 1, - "sourceId": "my-source", - "streamId": "8763/1/my-source", - "sourceName": "My stream v1", "error": "" }, "performance": {}, diff --git a/tests/events/ext.keboola.stream.sourceEnable.json b/tests/events/ext.keboola.stream.sourceEnable.json index 8bcf476..15437df 100644 --- a/tests/events/ext.keboola.stream.sourceEnable.json +++ b/tests/events/ext.keboola.stream.sourceEnable.json @@ -22,15 +22,9 @@ "branchId": 1, "sourceId": "my-source", "streamId": "8763/1/my-source", - "sourceName": "My stream v1", - "error": "" + "sourceName": "My stream v1" }, "results": { - "projectId": 8763, - "branchId": 1, - "sourceId": "my-source", - "streamId": "8763/1/my-source", - "sourceName": "My stream v1", "error": "" }, "performance": {}, diff --git a/tests/events/ext.keboola.stream.sourcePurge.json b/tests/events/ext.keboola.stream.sourcePurge.json index 8f54ee2..54bd0c2 100644 --- a/tests/events/ext.keboola.stream.sourcePurge.json +++ b/tests/events/ext.keboola.stream.sourcePurge.json @@ -22,15 +22,9 @@ "branchId": 1, "sourceId": "my-source", "streamId": "8763/1/my-source", - "sourceName": "My stream v1", - "error": "" + "sourceName": "My stream v1" }, "results": { - "projectId": 8763, - "branchId": 1, - "sourceId": "my-source", - "streamId": "8763/1/my-source", - "sourceName": "My stream v1", "error": "" }, "performance": {}, diff --git a/tests/events/ext.keboola.stream.sourceUndelete.json b/tests/events/ext.keboola.stream.sourceUndelete.json index 0afac4b..3d2cc75 100644 --- a/tests/events/ext.keboola.stream.sourceUndelete.json +++ b/tests/events/ext.keboola.stream.sourceUndelete.json @@ -22,15 +22,9 @@ "branchId": 1, "sourceId": "my-source", "streamId": "8763/1/my-source", - "sourceName": "My stream v1", - "error": "" + "sourceName": "My stream v1" }, "results": { - "projectId": 8763, - "branchId": 1, - "sourceId": "my-source", - "streamId": "8763/1/my-source", - "sourceName": "My stream v1", "error": "" }, "performance": {},