diff --git a/packages/system/vyuh_core/lib/plugin_types/analytics/analytics_plugin.dart b/packages/system/vyuh_core/lib/plugin/analytics/analytics_plugin.dart similarity index 100% rename from packages/system/vyuh_core/lib/plugin_types/analytics/analytics_plugin.dart rename to packages/system/vyuh_core/lib/plugin/analytics/analytics_plugin.dart diff --git a/packages/system/vyuh_core/lib/plugin_types/analytics/analytics_provider.dart b/packages/system/vyuh_core/lib/plugin/analytics/analytics_provider.dart similarity index 100% rename from packages/system/vyuh_core/lib/plugin_types/analytics/analytics_provider.dart rename to packages/system/vyuh_core/lib/plugin/analytics/analytics_provider.dart diff --git a/packages/system/vyuh_core/lib/plugin_types/analytics/noop_analytics_provider.dart b/packages/system/vyuh_core/lib/plugin/analytics/noop_analytics_provider.dart similarity index 100% rename from packages/system/vyuh_core/lib/plugin_types/analytics/noop_analytics_provider.dart rename to packages/system/vyuh_core/lib/plugin/analytics/noop_analytics_provider.dart diff --git a/packages/system/vyuh_core/lib/plugin/auth.dart b/packages/system/vyuh_core/lib/plugin/auth.dart new file mode 100644 index 00000000..946aa9a9 --- /dev/null +++ b/packages/system/vyuh_core/lib/plugin/auth.dart @@ -0,0 +1,42 @@ +import 'package:vyuh_core/vyuh_core.dart'; + +abstract base class AuthPlugin extends Plugin { + AuthPlugin({required super.name, required super.title}) + : super(pluginType: PluginType.auth); + + // login + Future loginWithEmailPassword( + {required String username, required String password}); + + // logout + Future logout(); +} + +class User { + final String id; + final String name; + final String email; + final String? phoneNumber; + final LoginMethod loginMethod; + + User({ + required this.id, + required this.name, + required this.email, + this.phoneNumber, + this.loginMethod = LoginMethod.anonymous, + }); +} + +enum LoginMethod { + anonymous, + emailPassword, + phoneOtp, + google, + meta, + apple, + twitter, + github, + linkedin, + microsoft, +} diff --git a/packages/system/vyuh_core/lib/plugin_types/content/content_plugin.dart b/packages/system/vyuh_core/lib/plugin/content/content_plugin.dart similarity index 100% rename from packages/system/vyuh_core/lib/plugin_types/content/content_plugin.dart rename to packages/system/vyuh_core/lib/plugin/content/content_plugin.dart diff --git a/packages/system/vyuh_core/lib/plugin_types/content/content_provider.dart b/packages/system/vyuh_core/lib/plugin/content/content_provider.dart similarity index 100% rename from packages/system/vyuh_core/lib/plugin_types/content/content_provider.dart rename to packages/system/vyuh_core/lib/plugin/content/content_provider.dart diff --git a/packages/system/vyuh_core/lib/plugin_types/content/noop_content_plugin.dart b/packages/system/vyuh_core/lib/plugin/content/noop_content_plugin.dart similarity index 100% rename from packages/system/vyuh_core/lib/plugin_types/content/noop_content_plugin.dart rename to packages/system/vyuh_core/lib/plugin/content/noop_content_plugin.dart diff --git a/packages/system/vyuh_core/lib/plugin_types/content/noop_content_provider.dart b/packages/system/vyuh_core/lib/plugin/content/noop_content_provider.dart similarity index 100% rename from packages/system/vyuh_core/lib/plugin_types/content/noop_content_provider.dart rename to packages/system/vyuh_core/lib/plugin/content/noop_content_provider.dart diff --git a/packages/system/vyuh_core/lib/plugin_types/di/di_plugin.dart b/packages/system/vyuh_core/lib/plugin/di/di_plugin.dart similarity index 100% rename from packages/system/vyuh_core/lib/plugin_types/di/di_plugin.dart rename to packages/system/vyuh_core/lib/plugin/di/di_plugin.dart diff --git a/packages/system/vyuh_core/lib/plugin_types/di/plugin_di_get_it.dart b/packages/system/vyuh_core/lib/plugin/di/plugin_di_get_it.dart similarity index 100% rename from packages/system/vyuh_core/lib/plugin_types/di/plugin_di_get_it.dart rename to packages/system/vyuh_core/lib/plugin/di/plugin_di_get_it.dart diff --git a/packages/system/vyuh_core/lib/plugin_types/feature_flag.dart b/packages/system/vyuh_core/lib/plugin/feature_flag.dart similarity index 100% rename from packages/system/vyuh_core/lib/plugin_types/feature_flag.dart rename to packages/system/vyuh_core/lib/plugin/feature_flag.dart diff --git a/packages/system/vyuh_core/lib/plugin_types/logger/console_logger_plugin.dart b/packages/system/vyuh_core/lib/plugin/logger/console_logger_plugin.dart similarity index 100% rename from packages/system/vyuh_core/lib/plugin_types/logger/console_logger_plugin.dart rename to packages/system/vyuh_core/lib/plugin/logger/console_logger_plugin.dart diff --git a/packages/system/vyuh_core/lib/plugin_types/logger/logger_plugin.dart b/packages/system/vyuh_core/lib/plugin/logger/logger_plugin.dart similarity index 100% rename from packages/system/vyuh_core/lib/plugin_types/logger/logger_plugin.dart rename to packages/system/vyuh_core/lib/plugin/logger/logger_plugin.dart diff --git a/packages/system/vyuh_core/lib/plugin_types/network/http_network_plugin.dart b/packages/system/vyuh_core/lib/plugin/network/http_network_plugin.dart similarity index 100% rename from packages/system/vyuh_core/lib/plugin_types/network/http_network_plugin.dart rename to packages/system/vyuh_core/lib/plugin/network/http_network_plugin.dart diff --git a/packages/system/vyuh_core/lib/plugin_types/network/network_plugin.dart b/packages/system/vyuh_core/lib/plugin/network/network_plugin.dart similarity index 100% rename from packages/system/vyuh_core/lib/plugin_types/network/network_plugin.dart rename to packages/system/vyuh_core/lib/plugin/network/network_plugin.dart diff --git a/packages/system/vyuh_core/lib/plugin_types/plugin.dart b/packages/system/vyuh_core/lib/plugin/plugin.dart similarity index 100% rename from packages/system/vyuh_core/lib/plugin_types/plugin.dart rename to packages/system/vyuh_core/lib/plugin/plugin.dart diff --git a/packages/system/vyuh_core/lib/runtime/platform/default_platform.dart b/packages/system/vyuh_core/lib/runtime/platform/default_platform.dart index 6105604e..7d399ab5 100644 --- a/packages/system/vyuh_core/lib/runtime/platform/default_platform.dart +++ b/packages/system/vyuh_core/lib/runtime/platform/default_platform.dart @@ -4,7 +4,6 @@ import 'package:flutter/material.dart' as flutter; import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart' as g; import 'package:mobx/mobx.dart'; -import 'package:vyuh_core/plugin_types/content/noop_content_plugin.dart'; import 'package:vyuh_core/runtime/platform/fallback_route_page_builder.dart'; import 'package:vyuh_core/runtime/platform/framework_init_view.dart'; import 'package:vyuh_core/runtime/platform/platform_init_tracker.dart'; diff --git a/packages/system/vyuh_core/lib/vyuh_core.dart b/packages/system/vyuh_core/lib/vyuh_core.dart index 50c46adf..9f4138a2 100644 --- a/packages/system/vyuh_core/lib/vyuh_core.dart +++ b/packages/system/vyuh_core/lib/vyuh_core.dart @@ -8,19 +8,20 @@ export 'content/type_descriptor.dart'; export 'content/unknown.dart'; export 'extension.dart'; export 'feature_descriptor.dart'; -export 'plugin_types/analytics/analytics_plugin.dart'; -export 'plugin_types/analytics/analytics_provider.dart'; -export 'plugin_types/analytics/noop_analytics_provider.dart'; -export 'plugin_types/content/content_plugin.dart'; -export 'plugin_types/content/content_provider.dart'; -export 'plugin_types/content/noop_content_provider.dart'; -export 'plugin_types/di/di_plugin.dart'; -export 'plugin_types/di/plugin_di_get_it.dart'; -export 'plugin_types/logger/console_logger_plugin.dart'; -export 'plugin_types/logger/logger_plugin.dart'; -export 'plugin_types/network/http_network_plugin.dart'; -export 'plugin_types/network/network_plugin.dart'; -export 'plugin_types/plugin.dart'; +export 'plugin/analytics/analytics_plugin.dart'; +export 'plugin/analytics/analytics_provider.dart'; +export 'plugin/analytics/noop_analytics_provider.dart'; +export 'plugin/content/content_plugin.dart'; +export 'plugin/content/content_provider.dart'; +export 'plugin/content/noop_content_plugin.dart'; +export 'plugin/content/noop_content_provider.dart'; +export 'plugin/di/di_plugin.dart'; +export 'plugin/di/plugin_di_get_it.dart'; +export 'plugin/logger/console_logger_plugin.dart'; +export 'plugin/logger/logger_plugin.dart'; +export 'plugin/network/http_network_plugin.dart'; +export 'plugin/network/network_plugin.dart'; +export 'plugin/plugin.dart'; export 'runtime/cms_route.dart'; export 'runtime/init_tracker.dart'; export 'runtime/platform/default_platform_widget_builder.dart'; diff --git a/packages/system/vyuh_feature_developer/lib/plugin_detail.dart b/packages/system/vyuh_feature_developer/lib/plugin_detail.dart index 1cc35712..51db5937 100644 --- a/packages/system/vyuh_feature_developer/lib/plugin_detail.dart +++ b/packages/system/vyuh_feature_developer/lib/plugin_detail.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; -import 'package:vyuh_core/plugin_types/plugin.dart'; import 'package:vyuh_core/vyuh_core.dart'; import 'package:vyuh_feature_developer/components/standard_plugin_view.dart';