diff --git a/src/routes/console/project-[project]/functions/+page.svelte b/src/routes/console/project-[project]/functions/+page.svelte
index 716afe310..d9c5cf14b 100644
--- a/src/routes/console/project-[project]/functions/+page.svelte
+++ b/src/routes/console/project-[project]/functions/+page.svelte
@@ -5,7 +5,7 @@
import { Empty, EmptyGridItem, Pagination, Copy, GridItem1 } from '$lib/components';
import { Pill } from '$lib/elements';
import type { Models } from '@aw-labs/appwrite-console';
- import Create from './_create.svelte';
+ import Create from './createFunction.svelte';
import { Container } from '$lib/layout';
import { base } from '$app/paths';
import { tooltip } from '$lib/actions/tooltip';
@@ -13,6 +13,7 @@
import { toLocaleDateTime } from '$lib/helpers/date';
import { app } from '$lib/stores/app';
import { onMount } from 'svelte';
+ import { wizard } from '$lib/stores/wizard';
let showCreate = false;
let search = '';
@@ -31,6 +32,10 @@
await goto(`${base}/console/project-${project}/functions/function/${event.detail.$id}`);
};
+ function openWizard() {
+ wizard.start(Create);
+ }
+
$: functionList.load(search, limit, offset ?? 0);
@@ -38,7 +43,7 @@
Functions
-
diff --git a/src/routes/console/project-[project]/functions/createFunction.svelte b/src/routes/console/project-[project]/functions/createFunction.svelte
new file mode 100644
index 000000000..c19b97de5
--- /dev/null
+++ b/src/routes/console/project-[project]/functions/createFunction.svelte
@@ -0,0 +1,70 @@
+
+
+
diff --git a/src/routes/console/project-[project]/functions/wizard/step1.svelte b/src/routes/console/project-[project]/functions/wizard/step1.svelte
new file mode 100644
index 000000000..6216f4c1f
--- /dev/null
+++ b/src/routes/console/project-[project]/functions/wizard/step1.svelte
@@ -0,0 +1,76 @@
+
+
+
+ Create your function
+ Let’s create a function.
+
+
+
+
+
+
+
+
diff --git a/src/routes/console/project-[project]/functions/wizard/step2.svelte b/src/routes/console/project-[project]/functions/wizard/step2.svelte
new file mode 100644
index 000000000..c70f4eabb
--- /dev/null
+++ b/src/routes/console/project-[project]/functions/wizard/step2.svelte
@@ -0,0 +1,16 @@
+
+
+
+ Execute access (optional)
+
+ Choose who can execute this function using the client API. Check out our documentation for
+ more on
+ Permissions.
+
+
+ ROLE
+
diff --git a/src/routes/console/project-[project]/functions/wizard/step3.svelte b/src/routes/console/project-[project]/functions/wizard/step3.svelte
new file mode 100644
index 000000000..f0c313d68
--- /dev/null
+++ b/src/routes/console/project-[project]/functions/wizard/step3.svelte
@@ -0,0 +1,13 @@
+
+
+
+ Events (optional)
+
+ Set the events that will trigger your function. Maximum 100 events allowed.
+
+
+ EVENT
+
diff --git a/src/routes/console/project-[project]/functions/wizard/step4.svelte b/src/routes/console/project-[project]/functions/wizard/step4.svelte
new file mode 100644
index 000000000..494fd3950
--- /dev/null
+++ b/src/routes/console/project-[project]/functions/wizard/step4.svelte
@@ -0,0 +1,18 @@
+
+
+
+ Scheduling (optional)
+
+ Set a CRON schedule to trigger your function. Leave blank for no schedule. More details on CRON syntax here.
+
+
+ EVENT
+
diff --git a/src/routes/console/project-[project]/functions/wizard/step5.svelte b/src/routes/console/project-[project]/functions/wizard/step5.svelte
new file mode 100644
index 000000000..359f85468
--- /dev/null
+++ b/src/routes/console/project-[project]/functions/wizard/step5.svelte
@@ -0,0 +1,13 @@
+
+
+
+ Variables (optional)
+
+ Create a variable (or secret key) that will be passed to your function at runtime.
+
+
+ EVENT
+
diff --git a/src/routes/console/project-[project]/functions/wizard/store.ts b/src/routes/console/project-[project]/functions/wizard/store.ts
new file mode 100644
index 000000000..84daae263
--- /dev/null
+++ b/src/routes/console/project-[project]/functions/wizard/store.ts
@@ -0,0 +1,21 @@
+import { writable } from 'svelte/store';
+
+export const createFunction = writable<{
+ id?: string;
+ name: string;
+ execute: string[];
+ runtime: string;
+ vars?: object;
+ events?: string[];
+ schedule?: string;
+ timeout?: number;
+}>({
+ id: null,
+ name: null,
+ execute: [],
+ runtime: null,
+ vars: {},
+ events: [],
+ schedule: null,
+ timeout: null
+});