From c679a327f9d9b1d555c499922401cccf2477d5c8 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 11 May 2020 09:47:53 +0300 Subject: [PATCH] Added public events config file --- app/config/events.php | 58 ++++++++++++++++++++++ app/init.php | 1 + app/views/console/functions/function.phtml | 54 +++++++++++++++++--- app/views/console/webhooks/index.phtml | 22 +------- 4 files changed, 106 insertions(+), 29 deletions(-) create mode 100644 app/config/events.php diff --git a/app/config/events.php b/app/config/events.php new file mode 100644 index 0000000000..a5d6a899dc --- /dev/null +++ b/app/config/events.php @@ -0,0 +1,58 @@ + [ + 'description' => 'Triggers any time a new user register an account.', + ], + 'account.update.email' => [ + 'description' => 'Triggers any time a a user updates his or her acoount email address.', + ], + 'account.update.name' => [ + 'description' => 'Triggers any time a a user updates his or her acoount name.', + ], + 'account.update.password' => [ + 'description' => 'Triggers any time a a user updates his or her acoount password.', + ], + 'account.update.prefs' => [ + 'description' => 'Triggers any time a a user updates his or her acoount preferences.', + ], + 'account.delete' => [ + 'description' => 'Triggers any time a new user is deleting its account.', + ], + 'account.sessions.create' => [ + 'description' => 'Triggers any time a user session is being created.', + ], + 'account.sessions.delete' => [ + 'description' => 'Triggers any time a user session is being deleted.', + ], + 'database.collections.create' => [ + 'description' => 'Triggers any time a new database collection is being created.', + ], + 'database.collections.update' => [ + 'description' => 'Triggers any time a new database collection is being updated.', + ], + 'database.collections.delete' => [ + 'description' => 'Triggers any time a database collection is being deleted.', + ], + 'database.documents.create' => [ + 'description' => 'Triggers any time a new database document is being created.', + ], + 'database.documents.patch' => [ + 'description' => 'Triggers any time a new database document is being updated.', + ], + 'database.documents.delete' => [ + 'description' => 'Triggers any time a database document is being deleted.', + ], + 'storage.files.create' => [ + 'description' => 'Triggers any time a storage file has been created.', + ], + 'storage.files.update' => [ + 'description' => 'Triggers any time a storage file has been updated.', + ], + 'storage.files.delete' => [ + 'description' => 'Triggers any time a file has been deleted.', + ], +]; \ No newline at end of file diff --git a/app/init.php b/app/init.php index d5a6247891..452066e778 100644 --- a/app/init.php +++ b/app/init.php @@ -53,6 +53,7 @@ $response = new Response(); /* * ENV vars */ +Config::load('events', __DIR__.'/../app/config/events.php'); Config::load('providers', __DIR__.'/../app/config/providers.php'); Config::load('platforms', __DIR__.'/../app/config/platforms.php'); Config::load('locales', __DIR__.'/../app/config/locales.php'); diff --git a/app/views/console/functions/function.phtml b/app/views/console/functions/function.phtml index 82d50a37fb..4fe6400475 100644 --- a/app/views/console/functions/function.phtml +++ b/app/views/console/functions/function.phtml @@ -1,3 +1,9 @@ +getParam('events', [])); + +?> +
Functions
-   +  
@@ -55,23 +61,33 @@
- + + + + - + +
+

Variables


- -
@@ -141,4 +157,26 @@
-
\ No newline at end of file +
+ + + + \ No newline at end of file diff --git a/app/views/console/webhooks/index.phtml b/app/views/console/webhooks/index.phtml index d71dd99dff..bcd0012545 100644 --- a/app/views/console/webhooks/index.phtml +++ b/app/views/console/webhooks/index.phtml @@ -1,26 +1,6 @@ getParam('events', [])); ?>