mirror of
https://github.com/spacebarchat/server.git
synced 2026-07-12 11:49:17 +00:00
Move entities to database
This commit is contained in:
@@ -16,9 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { checkToken, Rights, Session, User, UserTokenData } from "@spacebar/util";
|
||||
import { NextFunction, Request, Response } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { Session, User } from "@spacebar/database";
|
||||
import { checkToken, Rights, UserTokenData } from "@spacebar/util";
|
||||
|
||||
export const NO_AUTHORIZATION_ROUTES = [
|
||||
// Authentication routes
|
||||
|
||||
@@ -16,11 +16,12 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Application, DiscordApiErrors, FieldErrors, User, createAppBotUser, generateToken, handleFile } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { verifyToken } from "node-2fa";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Application, User } from "@spacebar/database";
|
||||
import { DiscordApiErrors, FieldErrors, createAppBotUser, generateToken, handleFile } from "@spacebar/util";
|
||||
import { BotModifySchema } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ApplicationCommandCreateSchema, ApplicationCommandSchema } from "@spacebar/schemas";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { Application, ApplicationCommand, FieldErrors, Snowflake } from "@spacebar/util";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Application, ApplicationCommand } from "@spacebar/database";
|
||||
import { FieldErrors, Snowflake } from "@spacebar/util";
|
||||
import { ApplicationCommandCreateSchema, ApplicationCommandSchema } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,11 +16,12 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Request, Response, Router } from "express";
|
||||
import { IsNull } from "typeorm";
|
||||
import { ApplicationCommandCreateSchema, ApplicationCommandSchema } from "@spacebar/schemas";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { Application, ApplicationCommand, FieldErrors, Snowflake } from "@spacebar/util";
|
||||
import { IsNull } from "typeorm";
|
||||
import { Application, ApplicationCommand } from "@spacebar/database";
|
||||
import { FieldErrors, Snowflake } from "@spacebar/util";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
+4
-3
@@ -16,10 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ApplicationCommandCreateSchema, ApplicationCommandSchema } from "@spacebar/schemas";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { Application, ApplicationCommand, FieldErrors, Guild, Member, Snowflake } from "@spacebar/util";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Application, ApplicationCommand, Guild, Member } from "@spacebar/database";
|
||||
import { FieldErrors, Snowflake } from "@spacebar/util";
|
||||
import { ApplicationCommandCreateSchema, ApplicationCommandSchema } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ApplicationCommandCreateSchema, ApplicationCommandSchema } from "@spacebar/schemas";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { Application, ApplicationCommand, FieldErrors, Guild, Member, Snowflake } from "@spacebar/util";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Application, ApplicationCommand, Guild, Member } from "@spacebar/database";
|
||||
import { FieldErrors, Snowflake } from "@spacebar/util";
|
||||
import { ApplicationCommandCreateSchema, ApplicationCommandSchema } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,11 +16,12 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Application, DiscordApiErrors, FieldErrors, Guild, handleFile, User } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { verifyToken } from "node-2fa";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Application, Guild, User } from "@spacebar/database";
|
||||
import { DiscordApiErrors, FieldErrors, handleFile } from "@spacebar/util";
|
||||
import { ApplicationModifySchema } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Application, Guild, handleFile } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Application, Guild } from "@spacebar/database";
|
||||
import { handleFile } from "@spacebar/util";
|
||||
import { ApplicationModifySchema } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Application, Config, createAppBotUser, trimSpecial } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Application } from "@spacebar/database";
|
||||
import { Config, createAppBotUser, trimSpecial } from "@spacebar/util";
|
||||
import { ApplicationCreateSchema } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,10 +16,12 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route, verifyCaptcha } from "@spacebar/api";
|
||||
import { Config, Email, User } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route, verifyCaptcha } from "@spacebar/api";
|
||||
import { User } from "@spacebar/database";
|
||||
import { Config, Email } from "@spacebar/util";
|
||||
import { ForgotPasswordSchema } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
router.post(
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { randomString, route } from "@spacebar/api";
|
||||
import { Config, ValidRegistrationToken } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { randomString, route } from "@spacebar/api";
|
||||
import { ValidRegistrationToken } from "@spacebar/database";
|
||||
import { Config } from "@spacebar/util";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
export default router;
|
||||
|
||||
router.get(
|
||||
"/",
|
||||
@@ -68,3 +68,5 @@ router.get(
|
||||
return res.json({ tokens: ret });
|
||||
},
|
||||
);
|
||||
|
||||
export default router;
|
||||
|
||||
@@ -16,15 +16,15 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route, verifyCaptcha } from "@spacebar/api";
|
||||
import { Config, FieldErrors, User, WebAuthn, generateToken, generateWebAuthnTicket } from "@spacebar/util";
|
||||
import bcrypt from "bcrypt";
|
||||
import crypto from "node:crypto";
|
||||
import bcrypt from "bcrypt";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route, verifyCaptcha } from "@spacebar/api";
|
||||
import { User } from "@spacebar/database";
|
||||
import { Config, FieldErrors, WebAuthn, generateToken, generateWebAuthnTicket } from "@spacebar/util";
|
||||
import { LoginSchema } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
export default router;
|
||||
|
||||
router.post(
|
||||
"/",
|
||||
@@ -197,3 +197,5 @@ router.post(
|
||||
* @returns {"token": "USERTOKEN", "settings": {"locale": "en", "theme": "dark"}}
|
||||
|
||||
*/
|
||||
|
||||
export default router;
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { emitEvent, Session } from "@spacebar/util";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Session } from "@spacebar/database";
|
||||
import { emitEvent } from "@spacebar/util";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
export default router;
|
||||
|
||||
router.post(
|
||||
"/",
|
||||
@@ -51,3 +51,5 @@ router.post(
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
export default router;
|
||||
|
||||
@@ -16,12 +16,14 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { BackupCode, User, generateToken } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { verifyToken } from "node-2fa";
|
||||
import { route } from "@spacebar/api";
|
||||
import { BackupCode, User } from "@spacebar/database";
|
||||
import { generateToken } from "@spacebar/util";
|
||||
import { TotpSchema } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
router.post(
|
||||
|
||||
@@ -16,12 +16,14 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { generateToken, SecurityKey, User, verifyWebAuthnToken, WebAuthn } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { ExpectedAssertionResult } from "fido2-lib";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { route } from "@spacebar/api";
|
||||
import { SecurityKey, User } from "@spacebar/database";
|
||||
import { generateToken, verifyWebAuthnToken, WebAuthn } from "@spacebar/util";
|
||||
import { WebAuthnTotpSchema } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
function toArrayBuffer(buf: Buffer) {
|
||||
|
||||
@@ -16,12 +16,13 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route, verifyCaptcha } from "@spacebar/api";
|
||||
import { Config, FieldErrors, Invite, User, ValidRegistrationToken, generateToken, IpDataClient, AbuseIpDbClient, TimeSpan, Stopwatch } from "@spacebar/util";
|
||||
import bcrypt from "bcrypt";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { MoreThan } from "typeorm";
|
||||
import { route, verifyCaptcha } from "@spacebar/api";
|
||||
import { Invite, User, ValidRegistrationToken } from "@spacebar/database";
|
||||
import { Config, FieldErrors, generateToken, IpDataClient, AbuseIpDbClient, TimeSpan, Stopwatch } from "@spacebar/util";
|
||||
import { RegisterSchema } from "@spacebar/schemas";
|
||||
import { BcryptWorkerPool } from "../../../util/util/workers/bcrypt/BcryptWorkerPool";
|
||||
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { checkToken, Email, FieldErrors, generateToken, User } from "@spacebar/util";
|
||||
import bcrypt from "bcrypt";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { User } from "@spacebar/database";
|
||||
import { checkToken, Email, FieldErrors, generateToken } from "@spacebar/util";
|
||||
import { PasswordResetSchema } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
@@ -15,12 +15,15 @@
|
||||
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 { createHash } from "node:crypto";
|
||||
import { emitEvent, Session } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { SessionsLogoutSchema } from "../../../schemas/api/users/SessionsSchemas";
|
||||
import { In } from "typeorm";
|
||||
import { route } from "@spacebar/api";
|
||||
import { emitEvent } from "@spacebar/util";
|
||||
import { SessionsLogoutSchema } from "@spacebar/schemas";
|
||||
import { Session } from "@spacebar/database";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
router.get(
|
||||
"/",
|
||||
@@ -78,4 +81,5 @@ router.post(
|
||||
res.status(204).send();
|
||||
},
|
||||
);
|
||||
|
||||
export default router;
|
||||
|
||||
@@ -16,9 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route, verifyCaptcha } from "@spacebar/api";
|
||||
import { checkToken, Config, FieldErrors, generateToken, User } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route, verifyCaptcha } from "@spacebar/api";
|
||||
import { User } from "@spacebar/database";
|
||||
import { checkToken, Config, FieldErrors, generateToken } from "@spacebar/util";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
async function getToken(user: User) {
|
||||
|
||||
@@ -16,10 +16,12 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Email, User } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { route } from "@spacebar/api";
|
||||
import { User } from "@spacebar/database";
|
||||
import { Email } from "@spacebar/util";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
router.post(
|
||||
|
||||
@@ -16,11 +16,13 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { FieldErrors, User } from "@spacebar/util";
|
||||
import bcrypt from "bcrypt";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { User } from "@spacebar/database";
|
||||
import { FieldErrors } from "@spacebar/util";
|
||||
import { BackupCodesChallengeSchema } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
router.post(
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { randomString, route } from "@spacebar/api";
|
||||
import { CloudAttachment, Channel, Config, Permissions } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { randomString, route } from "@spacebar/api";
|
||||
import { Channel, CloudAttachment } from "@spacebar/database";
|
||||
import { Config, Permissions } from "@spacebar/util";
|
||||
import { UploadAttachmentRequestSchema, UploadAttachmentResponseSchema } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, emitEvent, Message, MessageCreateEvent, Permissions, Sticker } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { In } from "typeorm";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, Message, Sticker } from "@spacebar/database";
|
||||
import { emitEvent, MessageCreateEvent, Permissions } from "@spacebar/util";
|
||||
import { GreetRequestSchema, MessageType } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, ChannelDeleteEvent, ChannelUpdateEvent, Recipient, emitEvent, handleFile, Config, FieldError, ErrorList, makeObjectErrorContent } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, Recipient } from "@spacebar/database";
|
||||
import { ChannelDeleteEvent, ChannelUpdateEvent, emitEvent, handleFile, Config, FieldError, ErrorList, makeObjectErrorContent } from "@spacebar/util";
|
||||
import { ChannelModifySchema, ChannelType } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { randomString, route } from "@spacebar/api";
|
||||
import { Channel, Guild, Invite, InviteCreateEvent, PublicInviteRelation, User, emitEvent } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { randomString, route } from "@spacebar/api";
|
||||
import { Channel, Guild, Invite, PublicInviteRelation, User } from "@spacebar/database";
|
||||
import { InviteCreateEvent, emitEvent } from "@spacebar/util";
|
||||
import { InviteCreateSchema, isTextChannel } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { emitEvent, getPermission, MessageAckEvent, ReadState } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { ReadState } from "@spacebar/database";
|
||||
import { emitEvent, getPermission, MessageAckEvent } from "@spacebar/util";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,10 +16,12 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import multer from "multer";
|
||||
import { handleMessage, postHandleMessage, route } from "@spacebar/api";
|
||||
import { Attachment, Channel, Message } from "@spacebar/database";
|
||||
import {
|
||||
Attachment,
|
||||
Channel,
|
||||
Message,
|
||||
MessageCreateEvent,
|
||||
MessageDeleteEvent,
|
||||
MessageUpdateEvent,
|
||||
@@ -31,10 +33,6 @@ import {
|
||||
uploadFile,
|
||||
NewUrlUserSignatureData,
|
||||
} from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import multer from "multer";
|
||||
import { handleMessage, postHandleMessage, route } from "@spacebar/api";
|
||||
import { MessageCreateAttachment, MessageCreateCloudAttachment, MessageCreateSchema, MessageEditSchema, ChannelType } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,25 +16,21 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { In } from "typeorm";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, Emoji, Member, Message, User } from "@spacebar/database";
|
||||
import { arrayRemove } from "@spacebar/extensions";
|
||||
import {
|
||||
Channel,
|
||||
emitEvent,
|
||||
Emoji,
|
||||
getPermission,
|
||||
Member,
|
||||
Message,
|
||||
MessageReactionAddEvent,
|
||||
MessageReactionRemoveAllEvent,
|
||||
MessageReactionRemoveEmojiEvent,
|
||||
MessageReactionRemoveEvent,
|
||||
User,
|
||||
ReactionType,
|
||||
} from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { In } from "typeorm";
|
||||
import { PartialEmoji, PublicMemberProjection, PublicUserProjection } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route, sendMessage } from "@spacebar/api";
|
||||
import { Message, Channel, emitEvent, User, MessageUpdateEvent } from "@spacebar/util";
|
||||
import { MessageThreadCreationSchema, ChannelType, MessageType } from "@spacebar/schemas";
|
||||
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route, sendMessage } from "@spacebar/api";
|
||||
import { Channel, Message, User } from "@spacebar/database";
|
||||
import { emitEvent, MessageUpdateEvent } from "@spacebar/util";
|
||||
import { MessageThreadCreationSchema, ChannelType, MessageType } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, Config, emitEvent, getPermission, getRights, Message, MessageDeleteBulkEvent } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, Message } from "@spacebar/database";
|
||||
import { Config, emitEvent, getPermission, getRights, MessageDeleteBulkEvent } from "@spacebar/util";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
*/
|
||||
|
||||
import { handleMessage, postHandleMessage, route } from "@spacebar/api";
|
||||
import { Attachment, Channel, Member, Message, ReadState, Relationship, User, ThreadMember, ThreadMemberFlags } from "@spacebar/database";
|
||||
import {
|
||||
Attachment,
|
||||
Channel,
|
||||
Config,
|
||||
DiscordApiErrors,
|
||||
DmChannelDTO,
|
||||
@@ -27,19 +26,12 @@ import {
|
||||
FieldErrors,
|
||||
getPermission,
|
||||
getUrlSignature,
|
||||
Member,
|
||||
Message,
|
||||
MessageCreateEvent,
|
||||
NewUrlSignatureData,
|
||||
NewUrlUserSignatureData,
|
||||
ReadState,
|
||||
Relationship,
|
||||
Rights,
|
||||
Snowflake,
|
||||
uploadFile,
|
||||
User,
|
||||
ThreadMember,
|
||||
ThreadMemberFlags,
|
||||
ThreadMembersUpdateEvent,
|
||||
ThreadCreateEvent,
|
||||
} from "@spacebar/util";
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { ChannelPinsUpdateEvent, Config, DiscordApiErrors, emitEvent, Message, MessageCreateEvent, MessageUpdateEvent, User } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { IsNull, Not } from "typeorm";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Message, User } from "@spacebar/database";
|
||||
import { ChannelPinsUpdateEvent, Config, DiscordApiErrors, emitEvent, MessageCreateEvent, MessageUpdateEvent } from "@spacebar/util";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -18,11 +18,12 @@
|
||||
|
||||
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, FieldErrors, Message, getPermission } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { FindManyOptions, Like } from "typeorm";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, Message } from "@spacebar/database";
|
||||
import { FieldErrors, getPermission } from "@spacebar/util";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,12 +16,13 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Channel, ChannelUpdateEvent, emitEvent, Member, Role } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, Member, Role } from "@spacebar/database";
|
||||
import { ChannelUpdateEvent, emitEvent } from "@spacebar/util";
|
||||
import { ChannelPermissionOverwriteSchema, ChannelPermissionOverwrite, ChannelPermissionOverwriteType } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
// TODO: Only permissions your bot has in the guild or channel can be allowed/denied (unless your bot has a MANAGE_ROLES overwrite in the channel)
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { ChannelPinsUpdateEvent, Config, DiscordApiErrors, emitEvent, Message, MessageCreateEvent, MessageUpdateEvent, User } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { IsNull, Not } from "typeorm";
|
||||
import { route } from "@spacebar/api";
|
||||
import { ChannelPinsUpdateEvent, Config, DiscordApiErrors, emitEvent, MessageCreateEvent, MessageUpdateEvent } from "@spacebar/util";
|
||||
import { Message, User } from "@spacebar/database";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,13 +16,12 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, Member, Message } from "@spacebar/util";
|
||||
import { PostDataSchema, PublicMessage } from "@spacebar/schemas";
|
||||
|
||||
import { Request, Response, Router } from "express";
|
||||
import { messageUpload } from "./messages";
|
||||
import { In } from "typeorm";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, Member, Message } from "@spacebar/database";
|
||||
import { PostDataSchema, PublicMessage } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,17 +16,16 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, Message, MessageDeleteBulkEvent, emitEvent, getPermission, getRights } from "@spacebar/util";
|
||||
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 { Channel, Message } from "@spacebar/database";
|
||||
import { MessageDeleteBulkEvent, emitEvent, getPermission, getRights } from "@spacebar/util";
|
||||
import { isTextChannel, PurgeSchema } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
export default router;
|
||||
|
||||
/**
|
||||
TODO: apply the delete bit by bit to prevent client and database stress
|
||||
**/
|
||||
@@ -99,3 +98,5 @@ router.post(
|
||||
res.sendStatus(204);
|
||||
},
|
||||
);
|
||||
|
||||
export default router;
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, ChannelRecipientAddEvent, DiscordApiErrors, DmChannelDTO, emitEvent, Recipient, User } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, Recipient, User } from "@spacebar/database";
|
||||
import { ChannelRecipientAddEvent, DiscordApiErrors, DmChannelDTO, emitEvent } from "@spacebar/util";
|
||||
import { ChannelType, PublicUserProjection } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,11 +16,12 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, ChannelUpdateEvent, emitEvent, Tag } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { TagCreateSchema } from "@spacebar/schemas";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, Tag } from "@spacebar/database";
|
||||
import { ChannelUpdateEvent, emitEvent } from "@spacebar/util";
|
||||
import { TagCreateSchema } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, emitEvent, Member, Permissions, ThreadCreateEvent, ThreadDeleteEvent, ThreadMember, ThreadMemberFlags, ThreadMembersUpdateEvent } from "@spacebar/util";
|
||||
import { ChannelType, Snowflake } from "@spacebar/schemas";
|
||||
|
||||
import { Request, Response, Router } from "express";
|
||||
import { MoreThan } from "typeorm";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, Member, ThreadMember, ThreadMemberFlags } from "@spacebar/database";
|
||||
import { emitEvent, Permissions, ThreadCreateEvent, ThreadDeleteEvent, ThreadMembersUpdateEvent } from "@spacebar/util";
|
||||
import { ChannelType, Snowflake } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,29 +16,14 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { handleMessage, postHandleMessage, route, sendMessage } from "@spacebar/api";
|
||||
import {
|
||||
Channel,
|
||||
emitEvent,
|
||||
User,
|
||||
uploadFile,
|
||||
Attachment,
|
||||
Member,
|
||||
ReadState,
|
||||
MessageCreateEvent,
|
||||
FieldErrors,
|
||||
getPermission,
|
||||
ThreadMember,
|
||||
Message,
|
||||
ChannelFlags,
|
||||
Snowflake,
|
||||
} from "@spacebar/util";
|
||||
import { ChannelType, MessageType, ThreadCreationSchema, MessageCreateAttachment, MessageCreateCloudAttachment } from "@spacebar/schemas";
|
||||
|
||||
import { Request, Response, Router } from "express";
|
||||
import { messageUpload } from "./messages";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { FindManyOptions, FindOptionsOrder, In, Like, ArrayContains, ArrayOverlap } from "typeorm";
|
||||
import { handleMessage, postHandleMessage, route, sendMessage } from "@spacebar/api";
|
||||
import { Attachment, Channel, Member, Message, ReadState, ThreadMember, User } from "@spacebar/database";
|
||||
import { emitEvent, uploadFile, MessageCreateEvent, FieldErrors, getPermission, ChannelFlags } from "@spacebar/util";
|
||||
import { ChannelType, MessageType, ThreadCreationSchema, MessageCreateAttachment, MessageCreateCloudAttachment } from "@spacebar/schemas";
|
||||
import { messageUpload } from "./messages";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, emitEvent, Member, TypingStartEvent } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, Member } from "@spacebar/database";
|
||||
import { emitEvent, TypingStartEvent } from "@spacebar/util";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,11 +16,12 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, Config, DiscordApiErrors, User, Webhook, handleFile, trimSpecial, ValidateName, Application } from "@spacebar/util";
|
||||
import crypto from "node:crypto";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Application, Channel, User, Webhook } from "@spacebar/database";
|
||||
import { Config, DiscordApiErrors, handleFile, trimSpecial, ValidateName } from "@spacebar/util";
|
||||
import { isTextChannel, WebhookCreateSchema, WebhookType } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,10 +16,12 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Config, Message } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Message } from "@spacebar/database";
|
||||
import { Config } from "@spacebar/util";
|
||||
import { PreloadMessagesRequestSchema, PreloadMessagesResponseSchema } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
router.post(
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Config, Guild, Member } from "@spacebar/util";
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { ArrayContains, In, Not } from "typeorm";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Guild, Member } from "@spacebar/database";
|
||||
import { Config } from "@spacebar/util";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Categories } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Categories } from "@spacebar/database";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { FieldErrors, ClientRelease } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { ClientRelease } from "@spacebar/database";
|
||||
import { FieldErrors } from "@spacebar/util";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Emoji, DiscordApiErrors, Guild, Member } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Emoji, Guild, Member } from "@spacebar/database";
|
||||
import { DiscordApiErrors } from "@spacebar/util";
|
||||
import { APIErrorResponse, EmojiGuild, EmojiSourceResponse } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Config, Guild } from "@spacebar/util";
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { ArrayContains } from "typeorm";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Guild } from "@spacebar/database";
|
||||
import { Config } from "@spacebar/util";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { Application, ApplicationCommand, Member, Snowflake } from "@spacebar/util";
|
||||
import { IsNull } from "typeorm";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Application, ApplicationCommand, Member } from "@spacebar/database";
|
||||
import { Snowflake } from "@spacebar/util";
|
||||
import { ApplicationCommandSchema, ApplicationCommandType } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { User, AutomodRule } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { route } from "@spacebar/api";
|
||||
import { User, AutomodRule } from "@spacebar/database";
|
||||
import { AutomodRuleSchema } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Ban, DiscordApiErrors, GuildBanAddEvent, GuildBanRemoveEvent, Member, User, emitEvent } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Ban, Member, User } from "@spacebar/database";
|
||||
import { DiscordApiErrors, GuildBanAddEvent, GuildBanRemoveEvent, emitEvent } from "@spacebar/util";
|
||||
import { BanCreateSchema, BanRegistrySchema, GuildBanResponse, GuildBansResponse, PublicUser } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Ban, Config, DiscordApiErrors, GuildBanAddEvent, Member, User, emitEvent } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Ban, Member, User } from "@spacebar/database";
|
||||
import { Config, DiscordApiErrors, GuildBanAddEvent, emitEvent } from "@spacebar/util";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,10 +16,12 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, ChannelUpdateEvent, Guild, emitEvent } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, Guild } from "@spacebar/database";
|
||||
import { ChannelUpdateEvent, emitEvent } from "@spacebar/util";
|
||||
import { ChannelCreateSchema, ChannelReorderSchema } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
router.get(
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Guild, GuildDeleteEvent, emitEvent } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Guild } from "@spacebar/database";
|
||||
import { GuildDeleteEvent, emitEvent } from "@spacebar/util";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Config, DiscordApiErrors, Emoji, GuildEmojisUpdateEvent, Member, Snowflake, emitEvent, handleFile } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Emoji, Member } from "@spacebar/database";
|
||||
import { Config, DiscordApiErrors, GuildEmojisUpdateEvent, Snowflake, emitEvent, handleFile } from "@spacebar/util";
|
||||
import { EmojiCreateSchema, EmojiModifySchema } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,23 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import {
|
||||
Channel,
|
||||
DiscordApiErrors,
|
||||
Guild,
|
||||
GuildUpdateEvent,
|
||||
Member,
|
||||
Permissions,
|
||||
SpacebarApiErrors,
|
||||
emitEvent,
|
||||
getPermission,
|
||||
getRights,
|
||||
handleFile,
|
||||
Config,
|
||||
} from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { route } from "@spacebar/api";
|
||||
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";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Invite, PublicInviteRelation } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Invite, PublicInviteRelation } from "@spacebar/database";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Config, DiscordApiErrors, emitEvent, Emoji, getPermission, getRights, Guild, GuildMemberUpdateEvent, handleFile, Member, Role, Sticker } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
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";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { getPermission, Member, PermissionResolvable } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Member } from "@spacebar/database";
|
||||
import { getPermission, PermissionResolvable } from "@spacebar/util";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Member } from "@spacebar/util";
|
||||
import { Member } from "@spacebar/database";
|
||||
import { Request, Response, Router } from "express";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Member } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { MoreThan } from "typeorm";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Member } from "@spacebar/database";
|
||||
import { PublicMemberProjection } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,11 +16,12 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, FieldErrors, Member, Message, Snowflake, getPermission } from "@spacebar/util";
|
||||
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 { Channel, Member, Message } from "@spacebar/database";
|
||||
import { FieldErrors, Snowflake, getPermission } from "@spacebar/util";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Guild } from "@spacebar/util";
|
||||
import { Guild } from "@spacebar/database";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { GuildProfileResponse, GuildVisibilityLevel } from "@spacebar/schemas";
|
||||
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { emitEvent, getPermission, getRights, GuildMemberUpdateEvent, handleFile, Member, OrmUtils, Permissions } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Member } from "@spacebar/database";
|
||||
import { emitEvent, getPermission, getRights, GuildMemberUpdateEvent, handleFile, OrmUtils, Permissions } from "@spacebar/util";
|
||||
import { MemberChangeProfileSchema } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,10 +16,12 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Guild, Member, Snowflake } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { IsNull, LessThan } from "typeorm";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Guild, Member } from "@spacebar/database";
|
||||
import { Snowflake } from "@spacebar/util";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
//Returns all inactive members, respecting role hierarchy
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
import { getVoiceRegions, route } from "@spacebar/api";
|
||||
import { Guild } from "@spacebar/util";
|
||||
import { Guild } from "@spacebar/database";
|
||||
import { Request, Response, Router } from "express";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { emitEvent, GuildRoleDeleteEvent, GuildRoleUpdateEvent, handleFile, Member, Role } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Member, Role } from "@spacebar/database";
|
||||
import { emitEvent, GuildRoleDeleteEvent, GuildRoleUpdateEvent, handleFile } from "@spacebar/util";
|
||||
import { RoleModifySchema } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
import { Router, Request, Response } from "express";
|
||||
import { Member } from "@spacebar/util";
|
||||
import { Member } from "@spacebar/database";
|
||||
import { route } from "@spacebar/api";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
@@ -17,9 +17,10 @@
|
||||
*/
|
||||
|
||||
import { Router, Request, Response } from "express";
|
||||
import { arrayPartition } from "@spacebar/extensions";
|
||||
import { DiscordApiErrors, Member } from "@spacebar/util";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Member } from "@spacebar/database";
|
||||
import { arrayPartition } from "@spacebar/extensions";
|
||||
import { DiscordApiErrors } from "@spacebar/util";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Config, DiscordApiErrors, emitEvent, GuildRoleCreateEvent, GuildRoleUpdateEvent, Member, Role, Snowflake } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { Not } from "typeorm";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Member, Role } from "@spacebar/database";
|
||||
import { Config, DiscordApiErrors, emitEvent, GuildRoleCreateEvent, GuildRoleUpdateEvent, Snowflake } from "@spacebar/util";
|
||||
import { RoleModifySchema, RolePositionUpdateSchema } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
import { Request, Response, Router } from "express";
|
||||
import { Role, Member } from "@spacebar/util";
|
||||
import { Role, Member } from "@spacebar/database";
|
||||
import { route } from "@spacebar/api";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,12 +16,13 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { DiscordApiErrors, Guild, Member } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { makeBadge } from "badge-maker";
|
||||
import path from "node:path";
|
||||
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 { Guild, Member } from "@spacebar/database";
|
||||
import { DiscordApiErrors } from "@spacebar/util";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,12 +16,14 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { GuildStickersUpdateEvent, Member, Snowflake, Sticker, emitEvent, uploadFile, Config, DiscordApiErrors } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import multer from "multer";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Member, Sticker } from "@spacebar/database";
|
||||
import { GuildStickersUpdateEvent, Snowflake, emitEvent, uploadFile, Config, DiscordApiErrors } from "@spacebar/util";
|
||||
import { ModifyGuildStickerSchema, StickerFormatType, StickerType } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
router.get(
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { generateCode, route } from "@spacebar/api";
|
||||
import { Guild, Template } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { generateCode, route } from "@spacebar/api";
|
||||
import { Guild, Template } from "@spacebar/database";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, Guild, Invite } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, Guild, Invite } from "@spacebar/database";
|
||||
import { ChannelType, VanityUrlSchema } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, DiscordApiErrors, emitEvent, getPermission, Member, VoiceState, VoiceStateUpdateEvent } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, Member, VoiceState } from "@spacebar/database";
|
||||
import { DiscordApiErrors, emitEvent, getPermission, VoiceStateUpdateEvent } from "@spacebar/util";
|
||||
import { ChannelType, VoiceStateUpdateSchema } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,9 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Config, Webhook } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Webhook } from "@spacebar/database";
|
||||
import { Config } from "@spacebar/util";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
router.get(
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, Guild, Member } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Channel, Guild, Member } from "@spacebar/database";
|
||||
import { GuildUpdateWelcomeScreenSchema } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { randomString, route } from "@spacebar/api";
|
||||
import { Channel, Config, DiscordApiErrors, Guild, Invite, Member, Permissions } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { randomString, route } from "@spacebar/api";
|
||||
import { Channel, Guild, Member, Invite } from "@spacebar/database";
|
||||
import { Config, DiscordApiErrors, Permissions } from "@spacebar/util";
|
||||
import { ChannelType, GuildWidgetJsonResponse } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -18,13 +18,14 @@
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { DiscordApiErrors, Guild } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import fs from "node:fs";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import path from "node:path";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { route } from "@spacebar/api";
|
||||
import { storage } from "@spacebar/cdn";
|
||||
import { Guild } from "@spacebar/database";
|
||||
import { DiscordApiErrors } from "@spacebar/util";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Guild } from "@spacebar/util";
|
||||
import { Guild } from "@spacebar/database";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { WidgetModifySchema } from "@spacebar/schemas";
|
||||
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Config, DiscordApiErrors, Guild, Member, getRights } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Guild, Member } from "@spacebar/database";
|
||||
import { Config, DiscordApiErrors, getRights } from "@spacebar/util";
|
||||
import { GuildCreateSchema } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Config, DiscordApiErrors, Guild, Member, Tag, Template } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Guild, Member, Tag, Template } from "@spacebar/database";
|
||||
import { Config, DiscordApiErrors } from "@spacebar/util";
|
||||
import { ChannelType, GuildTemplateCreateSchema } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,11 +16,12 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { BaseMessageComponents, InteractionCallbackSchema, InteractionCallbacksSchema, InteractionCallbackType, InteractionFailureReason, MessageType } from "@spacebar/schemas";
|
||||
import { handleComps, route, sendMessage } from "@spacebar/api";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { Config, emitEvent, InteractionSuccessEvent, Message, MessageUpdateEvent, pendingInteractions, User, InteractionFailureEvent } from "@spacebar/util";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { handleComps, route, sendMessage } from "@spacebar/api";
|
||||
import { Message, User } from "@spacebar/database";
|
||||
import { InteractionCallbacksSchema, InteractionCallbackType, InteractionFailureReason, MessageType } from "@spacebar/schemas";
|
||||
import { Config, emitEvent, InteractionSuccessEvent, MessageUpdateEvent, pendingInteractions, InteractionFailureEvent } from "@spacebar/util";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -17,10 +17,11 @@
|
||||
*/
|
||||
|
||||
import { randomBytes } from "node:crypto";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { InteractionFailureReason, InteractionSchema, InteractionType } from "@spacebar/schemas";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { Config, emitEvent, getPermission, Guild, InteractionCreateEvent, InteractionFailureEvent, Member, Message, Snowflake } from "@spacebar/util";
|
||||
import { Guild, Member, Message } from "@spacebar/database";
|
||||
import { Config, emitEvent, getPermission, InteractionCreateEvent, InteractionFailureEvent, Snowflake } from "@spacebar/util";
|
||||
import { pendingInteractions } from "@spacebar/util/imports/Interactions";
|
||||
import { InteractionCreateSchema } from "@spacebar/schemas/api/bots/InteractionCreateSchema";
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Ban, Config, DiscordApiErrors, emitEvent, getPermission, Guild, Invite, InviteDeleteEvent, PublicInviteRelation } from "@spacebar/util";
|
||||
import { Ban, Guild, Invite, PublicInviteRelation } from "@spacebar/database";
|
||||
import { Config, DiscordApiErrors, emitEvent, getPermission, InviteDeleteEvent } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { UserFlags } from "@spacebar/schemas";
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Application, DiscordApiErrors } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Application } from "@spacebar/database";
|
||||
import { DiscordApiErrors } from "@spacebar/util";
|
||||
import { PublicUserProjection } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,10 +16,12 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { ApiError, Application, DiscordApiErrors, FieldErrors, Member, Permissions, User, getPermission, Role } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Application, Member, Role, User } from "@spacebar/database";
|
||||
import { ApiError, DiscordApiErrors, FieldErrors, Permissions, getPermission } from "@spacebar/util";
|
||||
import { ApplicationAuthorizeSchema } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
// TODO: scopes, other oauth types
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Config, getRights, Guild, Member, Message, User } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Guild, Member, Message, User } from "@spacebar/database";
|
||||
import { Config, getRights } from "@spacebar/util";
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
router.get(
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { ReadState } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { ReadState } from "@spacebar/database";
|
||||
import { AckBulkSchema } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
router.post(
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { User } from "@spacebar/util";
|
||||
import { User } from "@spacebar/database";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { AccountStandingResponse, AccountStandingState, AppealEligibility } from "@spacebar/schemas";
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { User } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { User } from "@spacebar/database";
|
||||
import { AccountStandingResponse, AccountStandingState, AppealEligibility } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { StickerPack } from "@spacebar/util";
|
||||
import { StickerPack } from "@spacebar/database";
|
||||
import { Request, Response, Router } from "express";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Sticker } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Sticker } from "@spacebar/database";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
router.get(
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
*/
|
||||
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Team, TeamMember, User } from "@spacebar/util";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Team, TeamMember, User } from "@spacebar/database";
|
||||
import { TeamCreateSchema, TeamMemberRole, TeamMemberState } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { FieldErrors, ClientRelease } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { ClientRelease } from "@spacebar/database";
|
||||
import { FieldErrors } from "@spacebar/util";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -17,22 +17,8 @@
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import {
|
||||
Channel,
|
||||
ChannelDeleteEvent,
|
||||
ChannelRecipientRemoveEvent,
|
||||
emitEvent,
|
||||
Emoji,
|
||||
Guild,
|
||||
InstanceBan,
|
||||
Member,
|
||||
Recipient,
|
||||
Sticker,
|
||||
Stopwatch,
|
||||
User,
|
||||
UserDeleteEvent,
|
||||
UserSettingsProtos,
|
||||
} from "@spacebar/util";
|
||||
import { Channel, Emoji, Guild, InstanceBan, Member, Recipient, Sticker, User, UserSettingsProtos } from "@spacebar/database";
|
||||
import { ChannelDeleteEvent, ChannelRecipientRemoveEvent, emitEvent, Stopwatch, UserDeleteEvent } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { ChannelType, InstanceUserDeleteSchema, PrivateUserProjection } from "@spacebar/schemas";
|
||||
import { Not } from "typeorm";
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { User } from "@spacebar/util";
|
||||
import { User } from "@spacebar/database";
|
||||
import { Request, Response, Router } from "express";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -16,10 +16,12 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { Config, Message, User } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Message, User } from "@spacebar/database";
|
||||
import { Config } from "@spacebar/util";
|
||||
import { DmMessagesResponseSchema } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
router.get(
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user