feat: add file storage service and update configurations

refactor: migrate to tsup for builds and update tsconfigs
fix: update error handling and validation in payment service
chore: update package scripts and dependencies
docs: update README and env examples
This commit is contained in:
Yuu Ottosoka
2025-07-12 16:01:57 +03:00
parent c0c04bbdba
commit f9ecac94f2
67 changed files with 3308 additions and 695 deletions

View File

@@ -1,8 +1,8 @@
import { AppError, createAppError } from '@repo/exceptions';
import { AppError, createAppError } from "@repo/exceptions";
export enum PaymentErrorCode {
PAYMENT_NOT_FOUND = 'PAYMENT_NOT_FOUND',
PAYMENT_ALREADY_PROCESSED = 'PAYMENT_ALREADY_PROCESSED',
PAYMENT_NOT_FOUND = "PAYMENT_NOT_FOUND",
PAYMENT_ALREADY_PROCESSED = "PAYMENT_ALREADY_PROCESSED",
}
export type PaymentError = AppError<PaymentErrorCode>;
@@ -10,11 +10,11 @@ export type PaymentError = AppError<PaymentErrorCode>;
export const paymentNotFound = (paymentId: string): PaymentError =>
createAppError<PaymentErrorCode>(
PaymentErrorCode.PAYMENT_NOT_FOUND,
`Payment with id ${paymentId} not found`
`Payment with id ${paymentId} not found`,
) as PaymentError;
export const paymentAlreadyProcessed = (paymentId: string): PaymentError =>
createAppError(
PaymentErrorCode.PAYMENT_ALREADY_PROCESSED,
`Payment ${paymentId} has already been processed`
`Payment ${paymentId} has already been processed`,
) as PaymentError;