Fix wrong type

import, make auth and chat work
This commit is contained in:
Wuesteon 2025-12-04 23:25:25 +01:00
parent b8f9bc107c
commit 9c47119535
261 changed files with 24453 additions and 443 deletions

View file

@ -1,5 +1,6 @@
import { ErrorCode } from '../types/error-codes';
import { AppError, type ErrorContext } from './app-error';
import { AppError } from './app-error';
import type { ErrorContext } from './app-error';
type AuthErrorCode =
| ErrorCode.AUTHENTICATION_REQUIRED

View file

@ -1,5 +1,6 @@
import { ErrorCode } from '../types/error-codes';
import { AppError, type ErrorContext } from './app-error';
import { AppError } from './app-error';
import type { ErrorContext } from './app-error';
type DatabaseErrorCode = ErrorCode.DATABASE_ERROR | ErrorCode.CONSTRAINT_VIOLATION;

View file

@ -1,5 +1,6 @@
import { ErrorCode } from '../types/error-codes';
import { AppError, type ErrorContext } from './app-error';
import { AppError } from './app-error';
import type { ErrorContext } from './app-error';
type NetworkErrorCode = ErrorCode.NETWORK_ERROR | ErrorCode.TIMEOUT | ErrorCode.CONNECTION_REFUSED;

View file

@ -1,5 +1,6 @@
import { ErrorCode } from '../types/error-codes';
import { AppError, type ErrorContext } from './app-error';
import { AppError } from './app-error';
import type { ErrorContext } from './app-error';
/**
* Error for when a requested resource is not found.

View file

@ -1,5 +1,6 @@
import { ErrorCode } from '../types/error-codes';
import { AppError, type ErrorContext } from './app-error';
import { AppError } from './app-error';
import type { ErrorContext } from './app-error';
type ServiceErrorCode =
| ErrorCode.INTERNAL_ERROR

View file

@ -1,5 +1,6 @@
import { ErrorCode } from '../types/error-codes';
import { AppError, type ErrorContext } from './app-error';
import { AppError } from './app-error';
import type { ErrorContext } from './app-error';
/**
* Error for validation failures (invalid input, missing fields, etc.).

View file

@ -1,11 +1,5 @@
import {
type ExceptionFilter,
Catch,
type ArgumentsHost,
HttpException,
HttpStatus,
Logger,
} from '@nestjs/common';
import { Catch, HttpException, HttpStatus, Logger } from '@nestjs/common';
import type { ExceptionFilter, ArgumentsHost } from '@nestjs/common';
import type { Request, Response } from 'express';
import { type AppError } from '../errors/app-error';
import { isAppError, isCreditError, isRateLimitError } from '../guards/type-guards';

View file

@ -1,4 +1,5 @@
import { AppError, type ErrorContext } from '../errors/app-error';
import { AppError } from '../errors/app-error';
import type { ErrorContext } from '../errors/app-error';
import { ErrorCode } from '../types/error-codes';
import { isAppError } from '../guards/type-guards';