Signify some imports more explicitly

This commit is contained in:
Rory&
2026-06-16 02:47:03 +02:00
parent 92f4099b82
commit 6e0f571b35
192 changed files with 195 additions and 195 deletions
+1 -1
View File
@@ -17,7 +17,7 @@
*/
import { Router, Response, Request } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { getDatabase } from "@spacebar/database";
const router = Router({ mergeParams: true });
+1 -1
View File
@@ -17,7 +17,7 @@
*/
import { Router, Response, Request } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { getDatabase } from "@spacebar/database";
const router = Router({ mergeParams: true });
@@ -19,7 +19,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { verifyToken } from "node-2fa";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Application, User } from "@spacebar/database";
import { DiscordApiErrors, FieldErrors, createAppBotUser, generateToken, handleFile } from "@spacebar/util";
import { BotModifySchema } from "@spacebar/schemas";
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Application, ApplicationCommand } from "@spacebar/database";
import { FieldErrors, Snowflake } from "@spacebar/util";
import { ApplicationCommandCreateSchema, ApplicationCommandSchema } from "@spacebar/schemas";
@@ -19,7 +19,7 @@
import { Request, Response, Router } from "express";
import { IsNull } from "typeorm";
import { ApplicationCommandCreateSchema, ApplicationCommandSchema } from "@spacebar/schemas";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Application, ApplicationCommand } from "@spacebar/database";
import { FieldErrors, Snowflake } from "@spacebar/util";
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Request, Response, Router } from "express";
const router = Router({ mergeParams: true });
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Application, ApplicationCommand, Guild, Member } from "@spacebar/database";
import { FieldErrors, Snowflake } from "@spacebar/util";
import { ApplicationCommandCreateSchema, ApplicationCommandSchema } from "@spacebar/schemas";
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Application, ApplicationCommand, Guild, Member } from "@spacebar/database";
import { FieldErrors, Snowflake } from "@spacebar/util";
import { ApplicationCommandCreateSchema, ApplicationCommandSchema } from "@spacebar/schemas";
@@ -19,7 +19,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { verifyToken } from "node-2fa";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Application, Guild, User } from "@spacebar/database";
import { DiscordApiErrors, FieldErrors, handleFile } from "@spacebar/util";
import { ApplicationModifySchema } from "@spacebar/schemas";
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Request, Response, Router } from "express";
const router: Router = Router({ mergeParams: true });
+1 -1
View File
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Application, Guild } from "@spacebar/database";
import { handleFile } from "@spacebar/util";
import { ApplicationModifySchema } from "@spacebar/schemas";
+1 -1
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Request, Response, Router } from "express";
import { ApplicationDetectableResponse } from "@spacebar/schemas";
+1 -1
View File
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Application } from "@spacebar/database";
import { Config, createAppBotUser } from "@spacebar/util";
import { ApplicationCreateSchema } from "@spacebar/schemas";
+1 -1
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { getUrlSignature, NewUrlSignatureData } from "@spacebar/util";
import { Request, Response, Router } from "express";
import { RefreshUrlsRequestSchema } from "@spacebar/schemas";
+1 -1
View File
@@ -15,7 +15,7 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { createHash } from "node:crypto";
import { Snowflake } from "@spacebar/util";
import { Request, Response, Router } from "express";
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { ValidRegistrationToken } from "@spacebar/database";
import { Random } from "@spacebar/extensions";
import { Config } from "@spacebar/util";
+1 -1
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { IpDataClient } from "@spacebar/util";
import { Request, Response, Router } from "express";
const router = Router({ mergeParams: true });
+1 -1
View File
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Session } from "@spacebar/database";
import { emitEvent } from "@spacebar/util";
+1 -1
View File
@@ -19,7 +19,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { verifyToken } from "node-2fa";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { BackupCode, User } from "@spacebar/database";
import { generateToken } from "@spacebar/util";
import { TotpSchema } from "@spacebar/schemas";
+1 -1
View File
@@ -19,7 +19,7 @@
import { Request, Response, Router } from "express";
import { ExpectedAssertionResult } from "fido2-lib";
import { HTTPError } from "lambert-server/HTTPError";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { SecurityKey, User } from "@spacebar/database";
import { generateToken, verifyWebAuthnToken, WebAuthn } from "@spacebar/util";
import { WebAuthnTotpSchema } from "@spacebar/schemas";
+1 -1
View File
@@ -24,7 +24,7 @@ import { route, verifyCaptcha } from "@spacebar/api";
import { Invite, User, ValidRegistrationToken } from "@spacebar/database";
import { Config, FieldErrors, generateToken, IpDataClient, AbuseIpDbClient } from "@spacebar/util";
import { RegisterSchema } from "@spacebar/schemas";
import { BcryptWorkerPool } from "../../../util/util/workers/bcrypt/BcryptWorkerPool";
import { BcryptWorkerPool } from "@spacebar/util/util/workers/bcrypt/BcryptWorkerPool";
import { Stopwatch, TimeSpan } from "@spacebar/extensions";
const router: Router = Router({ mergeParams: true });
+1 -1
View File
@@ -18,7 +18,7 @@
import bcrypt from "bcrypt";
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { User } from "@spacebar/database";
import { checkToken, Email, FieldErrors, generateToken } from "@spacebar/util";
import { PasswordResetSchema } from "@spacebar/schemas";
+1 -1
View File
@@ -19,7 +19,7 @@
import { createHash } from "node:crypto";
import { Request, Response, Router } from "express";
import { In } from "typeorm";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { emitEvent } from "@spacebar/util";
import { SessionsLogoutSchema } from "@spacebar/schemas";
import { Session } from "@spacebar/database";
+1 -1
View File
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { User } from "@spacebar/database";
import { Email } from "@spacebar/util";
@@ -18,7 +18,7 @@
import bcrypt from "bcrypt";
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { User } from "@spacebar/database";
import { FieldErrors } from "@spacebar/util";
import { BackupCodesChallengeSchema } from "@spacebar/schemas";
+1 -1
View File
@@ -15,7 +15,7 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Request, Response, Router } from "express";
const router = Router({ mergeParams: true });
+1 -1
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Request, Response, Router } from "express";
const router = Router({ mergeParams: true });
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Channel, CloudAttachment } from "@spacebar/database";
import { Random } from "@spacebar/extensions";
import { Config, Permissions } from "@spacebar/util";
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { HubDirectoryEntriesResponse } from "@spacebar/schemas";
import { Request, Response, Router } from "express";
const router = Router({ mergeParams: true });
+1 -1
View File
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { In } from "typeorm";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Channel, Message, Sticker } from "@spacebar/database";
import { emitEvent, MessageCreateEvent, Permissions } from "@spacebar/util";
import { GreetRequestSchema, MessageType } from "@spacebar/schemas";
+1 -1
View File
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Channel, Recipient } from "@spacebar/database";
import { ChannelDeleteEvent, ChannelUpdateEvent, emitEvent, handleFile, Config, FieldError, ErrorList, makeObjectErrorContent } from "@spacebar/util";
import { ChannelModifySchema, ChannelType } from "@spacebar/schemas";
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Channel, Guild, Invite, PublicInviteRelation, User } from "@spacebar/database";
import { InviteCreateEvent, emitEvent } from "@spacebar/util";
import { InviteCreateSchema, isTextChannel } from "@spacebar/schemas";
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { ReadState } from "@spacebar/database";
import { emitEvent, getPermission, MessageAckEvent } from "@spacebar/util";
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Request, Response, Router } from "express";
const router = Router({ mergeParams: true });
@@ -19,7 +19,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { In } from "typeorm";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Channel, Emoji, Member, Message, User } from "@spacebar/database";
import { arrayRemove } from "@spacebar/extensions";
import {
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Channel, Message } from "@spacebar/database";
import { Config, emitEvent, getPermission, getRights, MessageDeleteBulkEvent } from "@spacebar/util";
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { IsNull, Not } from "typeorm";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Message, User } from "@spacebar/database";
import { ChannelPinsUpdateEvent, Config, DiscordApiErrors, emitEvent, MessageCreateEvent, MessageUpdateEvent } from "@spacebar/util";
@@ -21,7 +21,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { FindManyOptions, Like } from "typeorm";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Channel, Message } from "@spacebar/database";
import { FieldErrors, getPermission } from "@spacebar/util";
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Channel, Member, Role } from "@spacebar/database";
import { ChannelUpdateEvent, emitEvent } from "@spacebar/util";
import { ChannelPermissionOverwriteSchema, ChannelPermissionOverwrite, ChannelPermissionOverwriteType } from "@spacebar/schemas";
+1 -1
View File
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { IsNull, Not } from "typeorm";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { ChannelPinsUpdateEvent, Config, DiscordApiErrors, emitEvent, MessageCreateEvent, MessageUpdateEvent } from "@spacebar/util";
import { Message, User } from "@spacebar/database";
@@ -19,7 +19,7 @@
import { Request, Response, Router } from "express";
import { messageUpload } from "./messages";
import { In } from "typeorm";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Channel, Member, Message } from "@spacebar/database";
import { PostDataSchema, PublicMessage } from "@spacebar/schemas";
+1 -1
View File
@@ -19,7 +19,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { Between, FindManyOptions, FindOperator, Not } from "typeorm";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Channel, Message } from "@spacebar/database";
import { MessageDeleteBulkEvent, emitEvent, getPermission, getRights } from "@spacebar/util";
import { isTextChannel, PurgeSchema } from "@spacebar/schemas";
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Channel, Recipient, User } from "@spacebar/database";
import { ChannelRecipientAddEvent, DiscordApiErrors, DmChannelDTO, emitEvent } from "@spacebar/util";
import { ChannelType, PublicUserProjection } from "@spacebar/schemas";
+1 -1
View File
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Channel, Tag } from "@spacebar/database";
import { ChannelUpdateEvent, emitEvent } from "@spacebar/util";
import { TagCreateSchema } from "@spacebar/schemas";
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { MoreThan } from "typeorm";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Channel, Member, ThreadMember, ThreadMemberFlags } from "@spacebar/database";
import { emitEvent, Permissions, ThreadCreateEvent, ThreadDeleteEvent, ThreadMembersUpdateEvent } from "@spacebar/util";
import { ChannelType, Snowflake } from "@spacebar/schemas";
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Channel, Member } from "@spacebar/database";
import { emitEvent, TypingStartEvent } from "@spacebar/util";
@@ -19,7 +19,7 @@
import crypto from "node:crypto";
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Application, Channel, User, Webhook } from "@spacebar/database";
import { Config, DiscordApiErrors, handleFile, ValidateName } from "@spacebar/util";
import { isTextChannel, WebhookCreateSchema, WebhookType } from "@spacebar/schemas";
+1 -1
View File
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Message } from "@spacebar/database";
import { Config } from "@spacebar/util";
import { PreloadMessagesRequestSchema, PreloadMessagesResponseSchema } from "@spacebar/schemas";
+1 -1
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Request, Response, Router } from "express";
import { CollectiblesCategoriesResponse } from "@spacebar/schemas";
+1 -1
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Request, Response, Router } from "express";
import { CollectiblesShopResponse } from "@spacebar/schemas";
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Request, Response, Router } from "express";
const router = Router({ mergeParams: true });
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Request, Response, Router } from "express";
import { ConnectionStore, FieldErrors } from "@spacebar/util";
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { ConnectionStore, emitEvent, FieldErrors } from "@spacebar/util";
import { Request, Response, Router } from "express";
import { ConnectionCallbackSchema } from "@spacebar/schemas";
+1 -1
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { ConnectionConfig } from "@spacebar/util";
import { Request, Response, Router } from "express";
const router = Router({ mergeParams: true });
+1 -1
View File
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { ArrayContains, In, Not } from "typeorm";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Guild, Member } from "@spacebar/database";
import { Config } from "@spacebar/util";
+1 -1
View File
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Categories } from "@spacebar/database";
const router = Router({ mergeParams: true });
+1 -1
View File
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { ClientRelease } from "@spacebar/database";
import { FieldErrors } from "@spacebar/util";
+1 -1
View File
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Emoji, Guild, Member } from "@spacebar/database";
import { DiscordApiErrors } from "@spacebar/util";
import { APIErrorResponse, EmojiGuild, EmojiSourceResponse } from "@spacebar/schemas";
+1 -1
View File
@@ -17,7 +17,7 @@
*/
import { Router, Response, Request } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
const router = Router({ mergeParams: true });
+1 -1
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Request, Response, Router } from "express";
import { ApplicationDetectableResponse } from "@spacebar/schemas";
+1 -1
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Config } from "@spacebar/util";
import { Request, Response, Router } from "express";
+1 -1
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Config } from "@spacebar/util";
import { Request, Response, Router } from "express";
+1 -1
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { getGifApiKey, parseGifResult } from "@spacebar/util";
import { Request, Response, Router } from "express";
import { TenorGif, TenorMediaTypes } from "@spacebar/schemas";
+1 -1
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { getGifApiKey, parseGifResult } from "@spacebar/util";
import { Request, Response, Router } from "express";
import { TenorGif, TenorMediaTypes } from "@spacebar/schemas";
+1 -1
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { getGifApiKey, parseGifResult } from "@spacebar/util";
import { Request, Response, Router } from "express";
import { TenorCategoriesResults, TenorTrendingResults } from "@spacebar/schemas";
+1 -1
View File
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { ArrayContains } from "typeorm";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Guild } from "@spacebar/database";
import { Config } from "@spacebar/util";
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { IsNull } from "typeorm";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Application, ApplicationCommand, Member } from "@spacebar/database";
import { Snowflake } from "@spacebar/util";
import { ApplicationCommandSchema, ApplicationCommandType } from "@spacebar/schemas";
@@ -17,7 +17,7 @@
*/
import { Router, Response, Request } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
const router = Router({ mergeParams: true });
//TODO: implement audit logs
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { User, AutomodRule } from "@spacebar/database";
import { AutomodRuleSchema } from "@spacebar/schemas";
+1 -1
View File
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Ban, Member, User } from "@spacebar/database";
import { DiscordApiErrors, GuildBanAddEvent, GuildBanRemoveEvent, emitEvent } from "@spacebar/util";
import { BanCreateSchema, BanRegistrySchema, GuildBanResponse, GuildBansResponse, PublicUser } from "@spacebar/schemas";
+1 -1
View File
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Ban, Member, User } from "@spacebar/database";
import { Config, DiscordApiErrors, GuildBanAddEvent, emitEvent } from "@spacebar/util";
+1 -1
View File
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Channel, Guild } from "@spacebar/database";
import { ChannelUpdateEvent, emitEvent } from "@spacebar/util";
import { ChannelCreateSchema, ChannelReorderSchema } from "@spacebar/schemas";
+1 -1
View File
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Guild } from "@spacebar/database";
import { GuildDeleteEvent, emitEvent } from "@spacebar/util";
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Request, Response, Router } from "express";
const router = Router({ mergeParams: true });
+1 -1
View File
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Emoji, Member } from "@spacebar/database";
import { Config, DiscordApiErrors, GuildEmojisUpdateEvent, Snowflake, emitEvent, handleFile } from "@spacebar/util";
import { EmojiCreateSchema, EmojiModifySchema } from "@spacebar/schemas";
+1 -1
View File
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Channel, Guild, Member } from "@spacebar/database";
import { DiscordApiErrors, GuildUpdateEvent, Permissions, SpacebarApiErrors, emitEvent, getPermission, getRights, handleFile } from "@spacebar/util";
import { GuildCreateResponse, GuildUpdateSchema } from "@spacebar/schemas";
@@ -17,7 +17,7 @@
*/
import { Router, Response, Request } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
const router = Router({ mergeParams: true });
//TODO: implement integrations list
+1 -1
View File
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Invite, PublicInviteRelation } from "@spacebar/database";
const router = Router({ mergeParams: true });
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Request, Response, Router } from "express";
const router = Router({ mergeParams: true });
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Emoji, Guild, Member, Role, Sticker } from "@spacebar/database";
import { Config, DiscordApiErrors, emitEvent, getPermission, getRights, GuildMemberUpdateEvent, handleFile } from "@spacebar/util";
import { MemberChangeSchema, PublicMemberProjection, PublicUserProjection } from "@spacebar/schemas";
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Member } from "@spacebar/database";
import { getPermission, PermissionResolvable } from "@spacebar/util";
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Member } from "@spacebar/database";
import { Request, Response, Router } from "express";
@@ -19,7 +19,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { MoreThan } from "typeorm";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Member } from "@spacebar/database";
import { PublicMemberProjection } from "@spacebar/schemas";
@@ -19,7 +19,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { Between, FindManyOptions, FindOptionsWhere, In, LessThan, Like, MoreThan } from "typeorm";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Channel, Member, Message } from "@spacebar/database";
import { FieldErrors, Snowflake, getPermission } from "@spacebar/util";
+1 -1
View File
@@ -17,7 +17,7 @@
*/
import { Router, Request, Response } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
const router = Router({ mergeParams: true });
router.get("/subscriptions", route({}), (req: Request, res: Response) => {
+1 -1
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Guild } from "@spacebar/database";
import { Request, Response, Router } from "express";
import { GuildProfileResponse, GuildVisibilityLevel } from "@spacebar/schemas";
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Member } from "@spacebar/database";
import { emitEvent, getPermission, getRights, GuildMemberUpdateEvent, handleFile, OrmUtils, Permissions } from "@spacebar/util";
import { MemberChangeProfileSchema } from "@spacebar/schemas";
+1 -1
View File
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { IsNull, LessThan } from "typeorm";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Guild, Member } from "@spacebar/database";
import { Snowflake } from "@spacebar/util";
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Member, Role } from "@spacebar/database";
import { emitEvent, GuildRoleDeleteEvent, GuildRoleUpdateEvent, handleFile } from "@spacebar/util";
import { RoleModifySchema } from "@spacebar/schemas";
@@ -18,7 +18,7 @@
import { Router, Request, Response } from "express";
import { Member } from "@spacebar/database";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
const router = Router({ mergeParams: true });
@@ -17,7 +17,7 @@
*/
import { Router, Request, Response } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Member } from "@spacebar/database";
import { arrayPartition } from "@spacebar/extensions";
import { DiscordApiErrors } from "@spacebar/util";
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { Not } from "typeorm";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Member, Role } from "@spacebar/database";
import { Config, DiscordApiErrors, emitEvent, GuildRoleCreateEvent, GuildRoleUpdateEvent, Snowflake } from "@spacebar/util";
import { RoleModifySchema, RolePositionUpdateSchema } from "@spacebar/schemas";
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { Role, Member } from "@spacebar/database";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
const router: Router = Router({ mergeParams: true });
@@ -20,7 +20,7 @@ import fs from "node:fs";
import path from "node:path";
import { makeBadge } from "badge-maker";
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Guild, Member } from "@spacebar/database";
import { DiscordApiErrors } from "@spacebar/util";
+1 -1
View File
@@ -19,7 +19,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import multer from "multer";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Member, Sticker } from "@spacebar/database";
import { GuildStickersUpdateEvent, Snowflake, emitEvent, uploadFile, Config, DiscordApiErrors } from "@spacebar/util";
import { ModifyGuildStickerSchema, StickerFormatType, StickerType } from "@spacebar/schemas";
+1 -1
View File
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Guild, Template } from "@spacebar/database";
import { generateCode } from "@spacebar/extensions";
@@ -18,7 +18,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Channel, Guild, Invite } from "@spacebar/database";
import { ChannelType, VanityUrlSchema } from "@spacebar/schemas";
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Channel, Member, VoiceState } from "@spacebar/database";
import { DiscordApiErrors, emitEvent, getPermission, VoiceStateUpdateEvent } from "@spacebar/util";
import { ChannelType, VoiceStateUpdateSchema } from "@spacebar/schemas";
+1 -1
View File
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Webhook } from "@spacebar/database";
import { Config } from "@spacebar/util";
@@ -17,7 +17,7 @@
*/
import { Request, Response, Router } from "express";
import { route } from "@spacebar/api";
import { route } from "@spacebar/api/util/handlers/route";
import { Channel, Guild, Member } from "@spacebar/database";
import { GuildUpdateWelcomeScreenSchema } from "@spacebar/schemas";

Some files were not shown because too many files have changed in this diff Show More