From cb3eaa6b7939e0d228695f1664905e0f8e0b99ea Mon Sep 17 00:00:00 2001
From: Joscha Schmiedt <joscha@schmiedt.dev>
Date: Tue, 18 Mar 2025 20:24:12 +0100
Subject: [PATCH] Add ServerSide to names of scripting API

To clarify that the ServerSide API is only available on the server side, we should add "ServerSide" to the names of the scripting API. This will make it clear that the API is not available on the client side.
---
 .../caosdb/scripting/v1alpha1/scripting.proto | 36 +++++++++----------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/proto/caosdb/scripting/v1alpha1/scripting.proto b/proto/caosdb/scripting/v1alpha1/scripting.proto
index 2028e04..311dd7e 100644
--- a/proto/caosdb/scripting/v1alpha1/scripting.proto
+++ b/proto/caosdb/scripting/v1alpha1/scripting.proto
@@ -33,7 +33,7 @@ message NamedArgument {
   string value = 2;
 }
 
-message ExecuteScriptRequest {
+message ExecuteServerSideScriptRequest {
   // The script to execute
   string script_filename = 1;
   // The timeout for the script execution in milliseconds
@@ -50,44 +50,44 @@ message ExecuteScriptRequest {
   bool run_async = 7;
 }
 
-enum ScriptExecutionResult {
+enum ServerSideScriptExecutionResult {
   // The result of the script execution is unspecified
-  SCRIPT_EXECUTION_RESULT_UNSPECIFIED = 0;
+  SERVER_SIDE_SCRIPT_EXECUTION_RESULT_UNSPECIFIED = 0;
   // The script execution was successful
-  SCRIPT_EXECUTION_RESULT_SUCCESS = 1;
+  SERVER_SIDE_SCRIPT_EXECUTION_RESULT_SUCCESS = 1;
   // The script execution failed (general/unspecified failure)
-  SCRIPT_EXECUTION_RESULT_GENERAL_FAILURE = 2;
+  SERVER_SIDE_SCRIPT_EXECUTION_RESULT_GENERAL_FAILURE = 2;
   // The script does not exist
-  SCRIPT_EXECUTION_RESULT_SCRIPT_DOES_NOT_EXIST = 3;
+  SERVER_SIDE_SCRIPT_EXECUTION_RESULT_SCRIPT_DOES_NOT_EXIST = 3;
   // The script is not executable
-  SCRIPT_EXECUTION_RESULT_SCRIPT_NOT_EXECUTABLE = 4;
+  SERVER_SIDE_SCRIPT_EXECUTION_RESULT_SCRIPT_NOT_EXECUTABLE = 4;
   // The script execution failed due to a script error
-  SCRIPT_EXECUTION_RESULT_SCRIPT_ERROR = 5;
+  SERVER_SIDE_SCRIPT_EXECUTION_RESULT_SCRIPT_ERROR = 5;
   // The script execution failed during setup, e.g. due to configuration errors
-  SCRIPT_EXECUTION_RESULT_SCRIPT_SETUP_ERROR = 6;
+  SERVER_SIDE_SCRIPT_EXECUTION_RESULT_SCRIPT_SETUP_ERROR = 6;
   // The script execution timed out
-  SCRIPT_EXECUTION_RESULT_SCRIPT_TIMEOUT = 7;
+  SERVER_SIDE_SCRIPT_EXECUTION_RESULT_SCRIPT_TIMEOUT = 7;
   // The script execution was cancelled for another reason
-  SCRIPT_EXECUTION_RESULT_CANCELLED = 8;
+  SERVER_SIDE_SCRIPT_EXECUTION_RESULT_CANCELLED = 8;
   // The script execution was denied due to insufficient permissions
-  SCRIPT_EXECUTION_RESULT_PERMISSION_DENIED = 9;
+  SERVER_SIDE_SCRIPT_EXECUTION_RESULT_PERMISSION_DENIED = 9;
   // The script is running and the result is not yet available (only for async scripts)
-  SCRIPT_EXECUTION_RESULT_RUNNING = 10;
+  SERVER_SIDE_SCRIPT_EXECUTION_RESULT_RUNNING = 10;
 }
 
 // IDEA: Give the script execution an id to be able to track it
-message ScriptExecutionId {
+message ServerSideScriptExecutionId {
   // Id of the script execution
   string script_execution_id = 1;
 }
 
-message ExecuteScriptResponse {
+message ExecuteServerSideScriptResponse {
   // Id of the script execution
-  ScriptExecutionId script_execution_id = 1;
+  ServerSideScriptExecutionId script_execution_id = 1;
   // The script to execute
   string script_filename = 2;
   // The result of the script execution
-  ScriptExecutionResult result = 3;
+  ServerSideScriptExecutionResult result = 3;
   // Script return code
   int32 return_code = 4;
   // The standard output of the script
@@ -104,5 +104,5 @@ message ExecuteScriptResponse {
 
 service ServerSideScriptingService {
   // Executes a script on the server side
-  rpc ExecuteScript(ExecuteScriptRequest) returns (ExecuteScriptResponse) {}
+  rpc ExecuteServerSideScript(ExecuteServerSideScriptRequest) returns (ExecuteServerSideScriptResponse) {}
 }
-- 
GitLab