Skip to content

Commit

Permalink
refactor(imports): optimize and organize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
LeadcodeDev committed Aug 27, 2024
1 parent f36ddde commit 44ee968
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 112 deletions.
59 changes: 22 additions & 37 deletions lib/api.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
library api;

export 'package:mineral/api/common/activity.dart';
export 'package:mineral/api/common/activity_emoji.dart';
export 'package:mineral/api/common/bot.dart';
export 'package:mineral/api/common/channel.dart';
export 'package:mineral/api/common/channel_methods.dart';
export 'package:mineral/api/common/channel_permission_overwrite.dart';
export 'package:mineral/api/common/channel_properties.dart';
export 'package:mineral/api/common/color.dart';
// Commons
export 'package:mineral/api/common/commands/builder/command_builder.dart';
export 'package:mineral/api/common/commands/builder/command_declaration_builder.dart';
export 'package:mineral/api/common/commands/builder/command_definition_builder.dart';
export 'package:mineral/api/common/commands/builder/command_group_builder.dart';
export 'package:mineral/api/common/commands/builder/sub_command_builder.dart';
export 'package:mineral/api/common/commands/builder/translation.dart';

export 'package:mineral/api/common/commands/command_choice_option.dart';
export 'package:mineral/api/common/commands/command_context_type.dart';
export 'package:mineral/api/common/commands/command_contract.dart';
Expand All @@ -17,21 +24,16 @@ export 'package:mineral/api/common/commands/command_helper.dart';
export 'package:mineral/api/common/commands/command_option.dart';
export 'package:mineral/api/common/commands/command_option_type.dart';
export 'package:mineral/api/common/commands/command_type.dart';

export 'package:mineral/api/common/components/buttons/button_builder.dart';
export 'package:mineral/api/common/components/buttons/button_type.dart';

export 'package:mineral/api/common/components/component_type.dart';
export 'package:mineral/api/common/components/dialogs/dialog_builder.dart';
export 'package:mineral/api/common/components/dialogs/dialog_element.dart';
export 'package:mineral/api/common/components/dialogs/dialog_element_type.dart';

export 'package:mineral/api/common/components/menus/select_menu_builder.dart';
export 'package:mineral/api/common/components/menus/select_menu_option.dart';

export 'package:mineral/api/common/components/component_type.dart';
export 'package:mineral/api/common/components/message_component.dart';
export 'package:mineral/api/common/components/row_builder.dart';

export 'package:mineral/api/common/embed/message_embed.dart';
export 'package:mineral/api/common/embed/message_embed_assets.dart';
export 'package:mineral/api/common/embed/message_embed_author.dart';
Expand All @@ -42,30 +44,6 @@ export 'package:mineral/api/common/embed/message_embed_footer.dart';
export 'package:mineral/api/common/embed/message_embed_image.dart';
export 'package:mineral/api/common/embed/message_embed_provider.dart';
export 'package:mineral/api/common/embed/message_embed_type.dart';

export 'package:mineral/api/common/polls/poll.dart';
export 'package:mineral/api/common/polls/poll_answer.dart';
export 'package:mineral/api/common/polls/poll_builder.dart';
export 'package:mineral/api/common/polls/poll_layout.dart';
export 'package:mineral/api/common/polls/poll_question.dart';

export 'package:mineral/api/common/types/activity_type.dart';
export 'package:mineral/api/common/types/channel_type.dart';
export 'package:mineral/api/common/types/enhanced_enum.dart';
export 'package:mineral/api/common/types/format_type.dart';
export 'package:mineral/api/common/types/interaction_type.dart';
export 'package:mineral/api/common/types/message_flag_type.dart';
export 'package:mineral/api/common/types/status_type.dart';
export 'package:mineral/api/common/types/sticker_type.dart';

export 'package:mineral/api/common/activity.dart';
export 'package:mineral/api/common/activity_emoji.dart';
export 'package:mineral/api/common/bot.dart';
export 'package:mineral/api/common/channel.dart';
export 'package:mineral/api/common/channel_methods.dart';
export 'package:mineral/api/common/channel_permission_overwrite.dart';
export 'package:mineral/api/common/channel_properties.dart';
export 'package:mineral/api/common/color.dart';
export 'package:mineral/api/common/emoji.dart';
export 'package:mineral/api/common/image_asset.dart';
export 'package:mineral/api/common/lang.dart';
Expand All @@ -75,30 +53,39 @@ export 'package:mineral/api/common/message_type.dart';
export 'package:mineral/api/common/partial_application.dart';
export 'package:mineral/api/common/partial_emoji.dart';
export 'package:mineral/api/common/permission.dart';
export 'package:mineral/api/common/polls/poll.dart';
export 'package:mineral/api/common/polls/poll_answer.dart';
export 'package:mineral/api/common/polls/poll_builder.dart';
export 'package:mineral/api/common/polls/poll_layout.dart';
export 'package:mineral/api/common/polls/poll_question.dart';
export 'package:mineral/api/common/premium_tier.dart';
export 'package:mineral/api/common/presence.dart';
export 'package:mineral/api/common/snowflake.dart';
export 'package:mineral/api/common/sticker.dart';
export 'package:mineral/api/common/types/activity_type.dart';
export 'package:mineral/api/common/types/channel_type.dart';
export 'package:mineral/api/common/types/enhanced_enum.dart';
export 'package:mineral/api/common/types/format_type.dart';
export 'package:mineral/api/common/types/interaction_type.dart';
export 'package:mineral/api/common/types/message_flag_type.dart';
export 'package:mineral/api/common/types/status_type.dart';
export 'package:mineral/api/common/types/sticker_type.dart';
export 'package:mineral/api/common/video_quality.dart';

// Private
export 'package:mineral/api/private/channels/private_channel.dart';
export 'package:mineral/api/private/channels/private_group_channel.dart';
export 'package:mineral/api/private/private_message.dart';
export 'package:mineral/api/private/user.dart';
export 'package:mineral/api/private/user_assets.dart';

// Server
export 'package:mineral/api/server/builders/member_builder.dart';

export 'package:mineral/api/server/channels/server_announcement_channel.dart';
export 'package:mineral/api/server/channels/server_category_channel.dart';
export 'package:mineral/api/server/channels/server_channel.dart';
export 'package:mineral/api/server/channels/server_forum_channel.dart';
export 'package:mineral/api/server/channels/server_stage_channel.dart';
export 'package:mineral/api/server/channels/server_text_channel.dart';
export 'package:mineral/api/server/channels/server_voice_channel.dart';

export 'package:mineral/api/server/enums/default_message_notification.dart';
export 'package:mineral/api/server/enums/explicit_content_filter.dart';
export 'package:mineral/api/server/enums/forum_layout_types.dart';
Expand All @@ -108,14 +95,12 @@ export 'package:mineral/api/server/enums/nsfw_level.dart';
export 'package:mineral/api/server/enums/sort_order_forum.dart';
export 'package:mineral/api/server/enums/system_channel_flag.dart';
export 'package:mineral/api/server/enums/verification_level.dart';

export 'package:mineral/api/server/managers/channel_manager.dart';
export 'package:mineral/api/server/managers/emoji_manager.dart';
export 'package:mineral/api/server/managers/member_manager.dart';
export 'package:mineral/api/server/managers/member_role_manager.dart';
export 'package:mineral/api/server/managers/role_manager.dart';
export 'package:mineral/api/server/managers/sticker_manager.dart';

export 'package:mineral/api/server/member.dart';
export 'package:mineral/api/server/member_assets.dart';
export 'package:mineral/api/server/member_flags.dart';
Expand Down
8 changes: 0 additions & 8 deletions lib/api/server/channels/server_announcement_channel.dart
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
import 'package:mineral/api.dart';
import 'package:mineral/api/common/channel_methods.dart';
import 'package:mineral/api/common/channel_permission_overwrite.dart';
import 'package:mineral/api/common/channel_properties.dart';
import 'package:mineral/api/common/managers/message_manager.dart';
import 'package:mineral/api/common/snowflake.dart';
import 'package:mineral/api/common/types/channel_type.dart';
import 'package:mineral/api/server/channels/server_category_channel.dart';
import 'package:mineral/api/server/channels/server_channel.dart';
import 'package:mineral/api/server/managers/threads_manager.dart';
import 'package:mineral/api/server/server_message.dart';

final class ServerAnnouncementChannel extends ServerChannel {
final ChannelProperties _properties;
Expand Down
6 changes: 0 additions & 6 deletions lib/api/server/channels/server_category_channel.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import 'package:mineral/api.dart';
import 'package:mineral/api/common/channel_methods.dart';
import 'package:mineral/api/common/channel_permission_overwrite.dart';
import 'package:mineral/api/common/channel_properties.dart';
import 'package:mineral/api/common/snowflake.dart';
import 'package:mineral/api/common/types/channel_type.dart';
import 'package:mineral/api/server/channels/server_channel.dart';
import 'package:mineral/api/server/managers/threads_manager.dart';

final class ServerCategoryChannel extends ServerChannel {
Expand Down
8 changes: 0 additions & 8 deletions lib/api/server/channels/server_forum_channel.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
import 'package:mineral/api.dart';
import 'package:mineral/api/common/channel_permission_overwrite.dart';
import 'package:mineral/api/common/channel_properties.dart';
import 'package:mineral/api/common/snowflake.dart';
import 'package:mineral/api/common/types/channel_type.dart';
import 'package:mineral/api/server/channels/server_category_channel.dart';
import 'package:mineral/api/server/channels/server_channel.dart';
import 'package:mineral/api/server/enums/forum_layout_types.dart';
import 'package:mineral/api/server/enums/sort_order_forum.dart';
import 'package:mineral/api/server/managers/threads_manager.dart';

final class ServerForumChannel extends ServerChannel {
Expand Down
10 changes: 0 additions & 10 deletions lib/api/server/channels/server_stage_channel.dart
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
import 'package:mineral/api.dart';
import 'package:mineral/api/common/channel_methods.dart';
import 'package:mineral/api/common/channel_permission_overwrite.dart';
import 'package:mineral/api/common/channel_properties.dart';
import 'package:mineral/api/common/embed/message_embed.dart';
import 'package:mineral/api/common/managers/message_manager.dart';
import 'package:mineral/api/common/polls/poll.dart';
import 'package:mineral/api/common/snowflake.dart';
import 'package:mineral/api/common/types/channel_type.dart';
import 'package:mineral/api/server/channels/server_category_channel.dart';
import 'package:mineral/api/server/channels/server_channel.dart';
import 'package:mineral/api/server/managers/threads_manager.dart';
import 'package:mineral/api/server/server_message.dart';

final class ServerStageChannel extends ServerChannel {
final ChannelProperties _properties;
Expand Down
11 changes: 0 additions & 11 deletions lib/api/server/channels/server_text_channel.dart
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
import 'package:mineral/api.dart';
import 'package:mineral/api/common/channel_methods.dart';
import 'package:mineral/api/common/channel_permission_overwrite.dart';
import 'package:mineral/api/common/channel_properties.dart';
import 'package:mineral/api/common/components/message_component.dart';
import 'package:mineral/api/common/embed/message_embed.dart';
import 'package:mineral/api/common/managers/message_manager.dart';
import 'package:mineral/api/common/polls/poll.dart';
import 'package:mineral/api/common/snowflake.dart';
import 'package:mineral/api/common/types/channel_type.dart';
import 'package:mineral/api/server/channels/server_category_channel.dart';
import 'package:mineral/api/server/channels/server_channel.dart';
import 'package:mineral/api/server/managers/threads_manager.dart';
import 'package:mineral/api/server/server_message.dart';

final class ServerTextChannel extends ServerChannel {
final ChannelProperties _properties;
Expand Down
9 changes: 0 additions & 9 deletions lib/api/server/channels/server_voice_channel.dart
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
import 'package:mineral/api.dart';
import 'package:mineral/api/common/channel_methods.dart';
import 'package:mineral/api/common/channel_permission_overwrite.dart';
import 'package:mineral/api/common/channel_properties.dart';
import 'package:mineral/api/common/managers/message_manager.dart';
import 'package:mineral/api/common/snowflake.dart';
import 'package:mineral/api/common/types/channel_type.dart';
import 'package:mineral/api/common/video_quality.dart';
import 'package:mineral/api/server/channels/server_category_channel.dart';
import 'package:mineral/api/server/channels/server_channel.dart';
import 'package:mineral/api/server/managers/threads_manager.dart';
import 'package:mineral/api/server/server_message.dart';

final class ServerVoiceChannel extends ServerChannel {
final ChannelProperties _properties;
Expand Down
14 changes: 7 additions & 7 deletions lib/domains/events/buckets/server_bucket.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
import 'package:mineral/domains/events/contracts/server/server_thread_create_event.dart';
import 'package:mineral/domains/events/contracts/server/server_thread_delete_event.dart';
import 'package:mineral/domains/events/contracts/server/server_thread_member_add_event.dart';
import 'package:mineral/domains/events/contracts/server/server_thread_member_remove_event.dart';
import 'package:mineral/domains/events/contracts/server/server_thread_member_update_event.dart';
import 'package:mineral/domains/events/contracts/server/server_thread_update_event.dart';
import 'package:mineral/domains/events/event_bucket.dart';
import 'package:mineral/domains/events/contracts/server/server_ban_add_event.dart';
import 'package:mineral/domains/events/contracts/server/server_ban_remove_event.dart';
import 'package:mineral/domains/events/contracts/server/server_button_click_event.dart';
Expand All @@ -29,8 +22,15 @@ import 'package:mineral/domains/events/contracts/server/server_roles_remove_even
import 'package:mineral/domains/events/contracts/server/server_roles_update_event.dart';
import 'package:mineral/domains/events/contracts/server/server_stickers_update_event.dart';
import 'package:mineral/domains/events/contracts/server/server_text_select_event.dart';
import 'package:mineral/domains/events/contracts/server/server_thread_create_event.dart';
import 'package:mineral/domains/events/contracts/server/server_thread_delete_event.dart';
import 'package:mineral/domains/events/contracts/server/server_thread_member_add_event.dart';
import 'package:mineral/domains/events/contracts/server/server_thread_member_remove_event.dart';
import 'package:mineral/domains/events/contracts/server/server_thread_member_update_event.dart';
import 'package:mineral/domains/events/contracts/server/server_thread_update_event.dart';
import 'package:mineral/domains/events/contracts/server/server_update_event.dart';
import 'package:mineral/domains/events/event.dart';
import 'package:mineral/domains/events/event_bucket.dart';

final class ServerBucket {
final EventBucket _events;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'dart:async';

import 'package:mineral/api.dart';
import 'package:mineral/api/server/channels/thread_channel.dart';
import 'package:mineral/api/server/server.dart';
import 'package:mineral/domains/events/event.dart';
import 'package:mineral/domains/events/types/listenable_event.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'dart:async';

import 'package:mineral/api.dart';
import 'package:mineral/api/server/channels/thread_channel.dart';
import 'package:mineral/api/server/server.dart';
import 'package:mineral/domains/events/event.dart';
import 'package:mineral/domains/events/types/listenable_event.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'dart:async';

import 'package:mineral/api.dart';
import 'package:mineral/api/server/channels/thread_channel.dart';
import 'package:mineral/api/server/server.dart';
import 'package:mineral/domains/events/event.dart';
import 'package:mineral/domains/events/types/listenable_event.dart';

Expand Down
2 changes: 1 addition & 1 deletion lib/domains/events/event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import 'package:mineral/domains/events/contracts/server/server_roles_create_even
import 'package:mineral/domains/events/contracts/server/server_roles_remove_event.dart';
import 'package:mineral/domains/events/contracts/server/server_roles_update_event.dart';
import 'package:mineral/domains/events/contracts/server/server_stickers_update_event.dart';
import 'package:mineral/domains/events/contracts/server/server_thread_create_event.dart';
import 'package:mineral/domains/events/contracts/server/server_text_select_event.dart';
import 'package:mineral/domains/events/contracts/server/server_thread_create_event.dart';
import 'package:mineral/domains/events/contracts/server/server_thread_delete_event.dart';
import 'package:mineral/domains/events/contracts/server/server_thread_list_sync_event.dart';
import 'package:mineral/domains/events/contracts/server/server_thread_member_add_event.dart';
Expand Down
2 changes: 0 additions & 2 deletions lib/events.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
library events;

export 'package:mineral/domains/events/contracts/common/ready_event.dart';

export 'package:mineral/domains/events/contracts/private/private_button_click_event.dart';
export 'package:mineral/domains/events/contracts/private/private_channel_create_event.dart';
export 'package:mineral/domains/events/contracts/private/private_channel_delete_event.dart';
Expand All @@ -11,7 +10,6 @@ export 'package:mineral/domains/events/contracts/private/private_dialog_submit_e
export 'package:mineral/domains/events/contracts/private/private_message_create_event.dart';
export 'package:mineral/domains/events/contracts/private/private_text_select_event.dart';
export 'package:mineral/domains/events/contracts/private/private_user_select_event.dart';

export 'package:mineral/domains/events/contracts/server/server_ban_add_event.dart';
export 'package:mineral/domains/events/contracts/server/server_ban_remove_event.dart';
export 'package:mineral/domains/events/contracts/server/server_button_click_event.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@ import 'dart:async';
import 'dart:io';

import 'package:mineral/api.dart';
import 'package:mineral/api/common/channel.dart';
import 'package:mineral/api/common/components/message_component.dart';
import 'package:mineral/api/common/embed/message_embed.dart';
import 'package:mineral/api/common/message.dart';
import 'package:mineral/api/common/polls/poll.dart';
import 'package:mineral/api/common/snowflake.dart';
import 'package:mineral/api/private/channels/private_channel.dart';
import 'package:mineral/api/server/channels/server_channel.dart';
import 'package:mineral/api/server/channels/thread_channel.dart';
import 'package:mineral/infrastructure/commons/helper.dart';
import 'package:mineral/infrastructure/internals/datastore/data_store_part.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import 'package:mineral/api/common/polls/poll.dart';
import 'package:mineral/api/common/sticker.dart';
import 'package:mineral/api/private/private_message.dart';
import 'package:mineral/api/private/user.dart';
import 'package:mineral/api/server/channels/thread_channel.dart';
import 'package:mineral/api/private/user_assets.dart';
import 'package:mineral/api/server/channels/thread_channel.dart';
import 'package:mineral/api/server/member.dart';
import 'package:mineral/api/server/member_assets.dart';
import 'package:mineral/api/server/role.dart';
Expand All @@ -32,8 +32,8 @@ import 'package:mineral/infrastructure/internals/marshaller/serializers/server_s
import 'package:mineral/infrastructure/internals/marshaller/serializers/server_settings_serializer.dart';
import 'package:mineral/infrastructure/internals/marshaller/serializers/server_subscription_serializer.dart';
import 'package:mineral/infrastructure/internals/marshaller/serializers/sticker_serializer.dart';
import 'package:mineral/infrastructure/internals/marshaller/serializers/user_assets_serializer.dart';
import 'package:mineral/infrastructure/internals/marshaller/serializers/thread_serializer.dart';
import 'package:mineral/infrastructure/internals/marshaller/serializers/user_assets_serializer.dart';
import 'package:mineral/infrastructure/internals/marshaller/serializers/user_serializer.dart';
import 'package:mineral/infrastructure/internals/marshaller/types/serializer.dart';

Expand Down

0 comments on commit 44ee968

Please sign in to comment.