Shorten imports

This commit is contained in:
Rory& committed 2026-03-14 05:43:42 +01:00
1 parent e8b0b58fcd
commit 8bb0b84b5e
60 files changed
+124 -123

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@
*/
/* eslint-disable @typescript-eslint/no-explicit-any */
import { ConnectionConfigEntity } from "../entities/ConnectionConfigEntity";
import { ConnectionConfigEntity } from "../entities";
import { OrmUtils } from "../imports";
let config: any;
@@ -17,8 +17,8 @@
*/
import { ConnectedAccount } from "../entities";
import { ConnectedAccountCommonOAuthTokenResponse } from "../interfaces";
import { Connection } from "./Connection";
import { ConnectedAccountCommonOAuthTokenResponse } from "@spacebar/schemas";
/**
* A connection that can refresh its token.
+1 -1
View File
@@ -18,7 +18,7 @@
import { BeforeRemove, Column, Entity, JoinColumn, ManyToOne, RelationId } from "typeorm";
import { URL } from "url";
import { deleteFile } from "../util/cdn";
import { deleteFile } from "../util";
import { BaseClass } from "./BaseClass";
import { getUrlSignature, NewUrlUserSignatureData, NewUrlSignatureData } from "../Signing";
+3 -4
View File
@@ -17,10 +17,9 @@
*/
import { BaseEntity, BeforeInsert, BeforeUpdate, Column, ColumnOptions, FindOptionsWhere, ObjectIdColumn, PrimaryColumn } from "typeorm";
import { Snowflake } from "../util/Snowflake";
import { getDatabase } from "../util/Database";
import { OrmUtils } from "../imports/OrmUtils";
import { annotationsKey, JsonNumber } from "../util/Decorators";
import { Snowflake, getDatabase } from "../util";
import { OrmUtils } from "../imports";
import { annotationsKey } from "../util/Decorators";
export class BaseClassWithoutId extends BaseEntity {
private get construct() {
+1 -1
View File
@@ -17,9 +17,9 @@
*/
import { Column, Entity, JoinColumn, ManyToOne, RelationId } from "typeorm";
import { ConnectedAccountTokenData } from "../interfaces";
import { BaseClass } from "./BaseClass";
import { User } from "./User";
import { ConnectedAccountTokenData } from "@spacebar/schemas";
@Entity({
name: "connected_accounts",
+1 -2
View File
@@ -21,8 +21,7 @@ import { BeforeInsert, BeforeUpdate, Column, Entity, Index, JoinColumn, JoinTabl
import { Ban, Channel, PublicGuildRelations } from ".";
import { ReadyGuildDTO } from "../dtos";
import { GuildCreateEvent, GuildDeleteEvent, GuildMemberAddEvent, GuildMemberRemoveEvent, GuildMemberUpdateEvent, MessageCreateEvent } from "../interfaces";
import { Config, emitEvent } from "../util";
import { DiscordApiErrors } from "../util/Constants";
import { Config, emitEvent, DiscordApiErrors } from "../util";
import { BaseClassWithoutId } from "./BaseClass";
import { Guild } from "./Guild";
import { Message } from "./Message";
+1 -1
View File
@@ -20,7 +20,7 @@ import { User } from "./User";
import { Member } from "./Member";
import { Role } from "./Role";
import { Channel } from "./Channel";
import { InteractionType } from "../interfaces/Interaction";
import { InteractionType } from "../interfaces";
import { Application } from "./Application";
import { Column, CreateDateColumn, Entity, Index, JoinColumn, JoinTable, ManyToMany, ManyToOne, OneToMany, RelationId, FindOneOptions, Raw, Not, BaseEntity, In } from "typeorm";
import { BaseClass } from "./BaseClass";
-18
View File
@@ -15,21 +15,3 @@
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/>.
*/
export interface ConnectedAccountCommonOAuthTokenResponse {
access_token: string;
token_type: string;
scope: string;
refresh_token?: string;
expires_in?: number;
}
export interface ConnectedAccountTokenData {
access_token: string;
token_type?: string;
scope?: string;
refresh_token?: string;
expires_in?: number;
expires_at?: number;
fetched_at: number;
}
+1 -1
View File
@@ -20,7 +20,7 @@ import { existsSync } from "fs";
import fs from "fs/promises";
import { OrmUtils } from "..";
import { ConfigValue } from "../config";
import { ConfigEntity } from "../entities/Config";
import { ConfigEntity } from "../entities";
import { JsonValue } from "@protobuf-ts/runtime";
// TODO: yaml instead of json