diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 00000000..13566b81
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 00000000..7c883b63
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/examples.iml b/.idea/examples.iml
new file mode 100644
index 00000000..d6ebd480
--- /dev/null
+++ b/.idea/examples.iml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
new file mode 100644
index 00000000..9a13d784
--- /dev/null
+++ b/.idea/gradle.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
new file mode 100644
index 00000000..fdc392fe
--- /dev/null
+++ b/.idea/jarRepositories.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 00000000..639900d1
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 00000000..704ff0e8
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/Run.xml b/.idea/runConfigurations/Run.xml
new file mode 100644
index 00000000..de1f5de1
--- /dev/null
+++ b/.idea/runConfigurations/Run.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+ false
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 00000000..35eb1ddf
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/java/AppwriteCollectionWiper/.gitignore b/java/AppwriteCollectionWiper/.gitignore
new file mode 100644
index 00000000..8d482b58
--- /dev/null
+++ b/java/AppwriteCollectionWiper/.gitignore
@@ -0,0 +1,3 @@
+# OS
+## Mac
+.DS_Store
diff --git a/java/AppwriteCollectionWiper/Index.java b/java/AppwriteCollectionWiper/Index.java
new file mode 100644
index 00000000..64f7c4be
--- /dev/null
+++ b/java/AppwriteCollectionWiper/Index.java
@@ -0,0 +1,92 @@
+import java.util.Map;
+import java.util.HashMap;
+import java.util.*;
+import io.openruntimes.java.*;
+import com.google.gson.Gson;
+import io.appwrite.Client;
+import io.appwrite.exceptions.AppwriteException;
+import io.appwrite.services.Databases;
+import kotlin.Result;
+import kotlin.coroutines.Continuation;
+import kotlin.coroutines.CoroutineContext;
+import kotlin.coroutines.EmptyCoroutineContext;
+import org.jetbrains.annotations.NotNull;
+import okhttp3.Response;
+import com.google.gson.JsonParser;
+import com.google.gson.JsonObject;
+
+final Gson gson = new Gson();
+
+
+public RuntimeResponse main(RuntimeRequest req, RuntimeResponse res) throws Exception {
+
+
+
+ // Initialize the Appwrite client and databases service
+ var client = new Client();
+ var databases = new Databases(client);
+ var variables = req.getVariables();
+ var payloadString = req.getPayload();
+
+ // Check if the required environment variables are set
+ if (variables == null
+ || !variables.containsKey("APPWRITE_FUNCTION_ENDPOINT")
+ || !variables.containsKey("APPWRITE_FUNCTION_API_KEY")
+ || !variables.containsKey("APPWRITE_FUNCTION_PROJECT_ID")
+ || variables.get("APPWRITE_FUNCTION_ENDPOINT") == null
+ || variables.get("APPWRITE_FUNCTION_API_KEY") == null
+ || variables.get("APPWRITE_FUNCTION_PROJECT_ID") == null) {
+ return res.json(Map.of("Environment variables are not set. Function cannot use Appwrite SDK.", false));
+ } else {
+ // Set the Appwrite client properties
+ client
+ .setEndpoint(variables.get("APPWRITE_FUNCTION_ENDPOINT"))
+ .setProject(variables.get("APPWRITE_FUNCTION_PROJECT_ID"))
+ .setKey(variables.get("APPWRITE_FUNCTION_API_KEY"));
+ }
+
+ try {
+ // Parse the payload data into a Map
+
+ Map payload = gson.fromJson(payloadString, Map.class);
+ String databaseId = (String) payload.get("databaseId");
+ String collectionId = (String) payload.get("collectionId");
+ if (payload == null || databaseId == null || collectionId == null) {
+ return res.json(Map.of("Invalid payload.", false));
+ }
+
+
+
+ databases.deleteCollection(
+ databaseId,
+ collectionId,
+ new Continuation