.
This commit is contained in:
parent
180a708956
commit
0ae16f2d9f
11
.eslintrc.js
11
.eslintrc.js
@ -1,10 +1,5 @@
|
||||
// This configuration only applies to the package manager root.
|
||||
/** @type {import("eslint").Linter.Config} */
|
||||
module.exports = {
|
||||
ignorePatterns: ["apps/**", "packages/**", "libs/**"],
|
||||
extends: ["@repo/eslint-config"],
|
||||
parser: "@typescript-eslint/parser",
|
||||
parserOptions: {
|
||||
project: true,
|
||||
},
|
||||
};
|
||||
root: true,
|
||||
extends: ["@repo/eslint-config/index.js"],
|
||||
};
|
||||
53
.gitignore
vendored
53
.gitignore
vendored
@ -1,44 +1,11 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# Dependencies
|
||||
node_modules
|
||||
.pnp
|
||||
.pnp.js
|
||||
|
||||
# Local env files
|
||||
.env
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
# Testing
|
||||
coverage
|
||||
|
||||
# Turbo
|
||||
.turbo
|
||||
|
||||
# Vercel
|
||||
.vercel
|
||||
|
||||
# Build Outputs
|
||||
.next/
|
||||
out/
|
||||
build
|
||||
dist
|
||||
|
||||
|
||||
# Debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
debug-*.log
|
||||
error-*.log
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
*-audit.json
|
||||
|
||||
#Jetbrains
|
||||
.idea
|
||||
node_modules
|
||||
.turbo
|
||||
*.log
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
.env
|
||||
.cache
|
||||
server/dist
|
||||
public/dist
|
||||
88
.vscode/launch.json
vendored
88
.vscode/launch.json
vendored
@ -2,48 +2,66 @@
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Launch firefox localhost",
|
||||
"type": "firefox",
|
||||
"request": "launch",
|
||||
"reAttach": true,
|
||||
"url": "http://localhost:5173",
|
||||
"webRoot": "${workspaceFolder}/client"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Launch Chrome localhost",
|
||||
"type": "chrome",
|
||||
"request": "launch",
|
||||
"url": "http://localhost:5173",
|
||||
"webRoot": "${workspaceFolder}/client"
|
||||
},
|
||||
|
||||
{
|
||||
"type": "msedge",
|
||||
"request": "launch",
|
||||
"name": "CLIENT: Launch Edge against localhost",
|
||||
"url": "http://localhost:5173",
|
||||
"webRoot": "${workspaceFolder}/client"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Attach to Turbo Server API (ts-node-dev)",
|
||||
"type": "node",
|
||||
"request": "attach",
|
||||
"name": "Attach to ts-node-dev",
|
||||
"port": 4321,
|
||||
"port": 9229,
|
||||
"restart": true,
|
||||
"timeout": 10000,
|
||||
"protocol": "inspector",
|
||||
"skipFiles": ["<node_internals>/**"],
|
||||
"sourceMaps": true,
|
||||
"resolveSourceMapLocations": ["${workspaceFolder}/**", "!**/node_modules/**"]
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/apps/api/src/**/*.ts",
|
||||
"${workspaceFolder}/modules/*/src/**/*.ts",
|
||||
"${workspaceFolder}/packages/*/src/**/*.ts"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Launch via YARN",
|
||||
"name": "Turbo: debug server-side + modules + packages",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"runtimeArgs": ["run", "server"],
|
||||
"runtimeExecutable": "yarn",
|
||||
"skipFiles": ["<node_internals>/**", "client/**", "dist/**", "doc/**"],
|
||||
"type": "node"
|
||||
"program": "${workspaceFolder}/apps/server/src/index.ts",
|
||||
"runtimeArgs": ["-r", "ts-node/register"],
|
||||
"envFile": "${workspaceFolder}/apps/server/.env",
|
||||
"env": {
|
||||
"NODE_ENV": "development",
|
||||
"NODE_OPTIONS": "--inspect=0"
|
||||
},
|
||||
"skipFiles": ["<node_internals>/**"],
|
||||
"sourceMaps": true,
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/apps/server/**/*.js",
|
||||
"${workspaceFolder}/modules/**/dist/**/*.js",
|
||||
"${workspaceFolder}/packages/**/dist/**/*.js"
|
||||
],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"name": "Debug Server",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/apps/server/src/index.ts",
|
||||
"runtimeArgs": ["--require", "tsconfig-paths/register", "--inspect"],
|
||||
"cwd": "${workspaceFolder}",
|
||||
"outFiles": ["${workspaceFolder}/**/*.js"],
|
||||
"sourceMaps": true,
|
||||
"envFile": "${workspaceFolder}/apps/server/.env",
|
||||
"internalConsoleOptions": "openOnSessionStart"
|
||||
},
|
||||
{
|
||||
"name": "Attach to Server",
|
||||
"type": "node",
|
||||
"request": "attach",
|
||||
"port": 9229,
|
||||
"restart": true,
|
||||
"protocol": "inspector",
|
||||
"skipFiles": ["<node_internals>/**"],
|
||||
"sourceMaps": true,
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/apps/server/dist/**/*.js",
|
||||
"${workspaceFolder}/packages/*/dist/**/*.js",
|
||||
"${workspaceFolder}/modules/*/dist/**/*.js"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
18
.vscode/settings.json
vendored
18
.vscode/settings.json
vendored
@ -1,4 +1,21 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"tsconfig.json": "jsonc",
|
||||
"typescript-config/*.json": "jsonc"
|
||||
},
|
||||
|
||||
// Javascript and TypeScript settings
|
||||
"javascript.suggest.enabled": true,
|
||||
"javascript.suggest.autoImports": true,
|
||||
"javascript.preferences.importModuleSpecifier": "shortest",
|
||||
|
||||
"typescript.suggest.enabled": true,
|
||||
"typescript.suggest.autoImports": true,
|
||||
"typescript.suggest.completeFunctionCalls": true,
|
||||
"typescript.suggest.includeAutomaticOptionalChainCompletions": true,
|
||||
"typescript.suggestionActions.enabled": true,
|
||||
"typescript.preferences.importModuleSpecifier": "shortest",
|
||||
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.organizeImports": "explicit",
|
||||
"source.fixAll.eslint": "explicit"
|
||||
@ -11,7 +28,6 @@
|
||||
"prettier.configPath": ".prettierrc",
|
||||
|
||||
// other vscode settings
|
||||
"tailwindCSS.rootFontSize": 16,
|
||||
"[handlebars]": {
|
||||
"editor.defaultFormatter": "vscode.html-language-features"
|
||||
} // <- your root font size here
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "node-server",
|
||||
"name": "server",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"dev:nodebug": "ts-node-dev -r tsconfig-paths/register ./src/index.ts",
|
||||
"dev": "ts-node-dev --transpile-only --respawn --inspect=4321 -r tsconfig-paths/register ./src/index.ts",
|
||||
"dev": "ts-node-dev --rs --transpile-only --respawn --inspect=9229 -r tsconfig-paths/register ./src/index.ts",
|
||||
"clean": "rm -rf dist",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"build": "npm run clean && npm run typecheck && esbuild src/index.ts --platform=node --format=cjs --bundle --sourcemap --minify --outdir=dist",
|
||||
@ -18,8 +18,10 @@
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@repo/eslint-config": "workspace:*",
|
||||
"@repo/tsconfig": "workspace:*",
|
||||
"@repo/typescript-config": "workspace:*",
|
||||
"@types/bcrypt": "^5.0.2",
|
||||
"@types/dinero.js": "^1.9.4",
|
||||
"@types/dotenv": "^8.2.3",
|
||||
"@types/express": "^4.17.21",
|
||||
"@types/glob": "^8.1.0",
|
||||
"@types/jest": "^29.5.14",
|
||||
@ -40,12 +42,11 @@
|
||||
"typescript": "^5.7.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/dinero.js": "^1.9.4",
|
||||
"bcrypt": "^5.1.1",
|
||||
"cls-rtracer": "^2.6.3",
|
||||
"cors": "^2.8.5",
|
||||
"dinero.js": "^1.9.1",
|
||||
"dotenv": "^16.4.7",
|
||||
"dotenv": "^16.5.0",
|
||||
"esbuild": "^0.24.0",
|
||||
"express": "^4.18.2",
|
||||
"glob": "^11.0.1",
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import { sequelize } from "config/database";
|
||||
import { initPackages } from "core/package-loader";
|
||||
//import { initPackages } from "@/core/package-loader";
|
||||
import dotenv from "dotenv";
|
||||
import express, { Application } from "express";
|
||||
import helmet from "helmet";
|
||||
@ -7,6 +6,7 @@ import responseTime from "response-time";
|
||||
import { authProvider } from "./contexts/auth/infraestructure";
|
||||
import { logger } from "./core/common/infrastructure/logger";
|
||||
import { globalErrorHandler } from "./core/common/presentation";
|
||||
import { v1Routes } from "./routes";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
@ -48,8 +48,8 @@ export function createApp(): Application {
|
||||
});
|
||||
|
||||
// Registrar rutas de la API
|
||||
// app.use("/api/v1", v1Routes());
|
||||
initPackages(app, sequelize);
|
||||
app.use("/api/v1", v1Routes());
|
||||
// initPackages(app, sequelize);
|
||||
|
||||
// Gestión global de errores.
|
||||
// Siempre al final de la cadena de middlewares
|
||||
|
||||
@ -1,48 +1,84 @@
|
||||
import { logger } from "core/common/infrastructure/logger";
|
||||
import { logger } from "@/core/common/infrastructure/logger";
|
||||
import dotenv from "dotenv";
|
||||
import { Sequelize } from "sequelize";
|
||||
import { registerModels } from "./register-models";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
export const sequelize = new Sequelize(
|
||||
process.env.DB_NAME as string, // database
|
||||
process.env.DB_USER as string, // username
|
||||
process.env.DB_PASSWORD as string, // password
|
||||
{
|
||||
host: process.env.DB_HOST as string,
|
||||
dialect: "mysql",
|
||||
port: parseInt(process.env.DB_PORT || "3306", 10),
|
||||
dialectOptions: {
|
||||
multipleStatements: true,
|
||||
dateStrings: true,
|
||||
typeCast: true,
|
||||
//timezone: "Z",
|
||||
},
|
||||
pool: {
|
||||
max: 10,
|
||||
min: 0,
|
||||
acquire: 30000,
|
||||
idle: 10000,
|
||||
},
|
||||
logQueryParameters: true,
|
||||
logging: process.env.DB_LOGGING === "true" ? logger.debug : false,
|
||||
define: {
|
||||
charset: "utf8mb4",
|
||||
collate: "utf8mb4_unicode_ci",
|
||||
//freezeTableName: true,
|
||||
underscored: true,
|
||||
timestamps: true,
|
||||
},
|
||||
}
|
||||
);
|
||||
let sequelizeInstance: Sequelize | null = null;
|
||||
|
||||
export function getDatabase(): Sequelize {
|
||||
if (sequelizeInstance) {
|
||||
return sequelizeInstance;
|
||||
}
|
||||
|
||||
sequelizeInstance = new Sequelize(
|
||||
process.env.DB_NAME as string,
|
||||
process.env.DB_USER as string,
|
||||
process.env.DB_PASSWORD as string,
|
||||
{
|
||||
host: process.env.DB_HOST as string,
|
||||
dialect: "mysql",
|
||||
port: parseInt(process.env.DB_PORT || "3306", 10),
|
||||
dialectOptions: {
|
||||
multipleStatements: true,
|
||||
dateStrings: true,
|
||||
typeCast: true,
|
||||
},
|
||||
pool: {
|
||||
max: 10,
|
||||
min: 0,
|
||||
acquire: 30000,
|
||||
idle: 10000,
|
||||
},
|
||||
logQueryParameters: true,
|
||||
logging: process.env.DB_LOGGING === "true" ? logger.debug : false,
|
||||
define: {
|
||||
charset: "utf8mb4",
|
||||
collate: "utf8mb4_unicode_ci",
|
||||
underscored: true,
|
||||
timestamps: true,
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
return sequelizeInstance;
|
||||
}
|
||||
|
||||
export async function tryConnectToDatabase() {
|
||||
const database = getDatabase();
|
||||
|
||||
if (!database) {
|
||||
const error = new Error("❌ Database not found.");
|
||||
logger.error({
|
||||
message: error.message,
|
||||
label: "tryConnectToDatabase",
|
||||
});
|
||||
throw error;
|
||||
}
|
||||
logger.info({ message: `🔸 Connecting to database...`, label: "tryConnectToDatabase" });
|
||||
|
||||
export async function connectToDatabase(): Promise<void> {
|
||||
try {
|
||||
await sequelize.authenticate();
|
||||
//await registerModels();
|
||||
logger.info(`✔️${" "}Database connection established successfully.`);
|
||||
await database.authenticate();
|
||||
await registerModels(database);
|
||||
|
||||
logger.info({
|
||||
message: `✔️${" "}Database connection established successfully.`,
|
||||
label: "tryConnectToDatabase",
|
||||
meta: {
|
||||
host: process.env.DB_HOST,
|
||||
port: process.env.DB_PORT,
|
||||
database: process.env.DB_NAME,
|
||||
user: process.env.DB_USER,
|
||||
},
|
||||
});
|
||||
return database;
|
||||
} catch (error) {
|
||||
logger.error("❌ Unable to connect to the database:", error);
|
||||
process.exit(1);
|
||||
logger.error({
|
||||
message: `❌ Unable to connect to the database: ${(error as Error).message}`,
|
||||
error,
|
||||
label: "tryConnectToDatabase",
|
||||
});
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,13 +1,21 @@
|
||||
import { logger } from "core/common/infrastructure/logger";
|
||||
import { logger } from "@/core/common/infrastructure/logger";
|
||||
import * as glob from "glob";
|
||||
import * as path from "path";
|
||||
import { DataTypes } from "sequelize";
|
||||
import { sequelize } from "./database";
|
||||
import { DataTypes, Sequelize } from "sequelize";
|
||||
|
||||
/**
|
||||
* 🔹 Registra todos los modelos en Sequelize
|
||||
*/
|
||||
export const registerModels = async () => {
|
||||
export const registerModels = async (database: Sequelize) => {
|
||||
if (!database) {
|
||||
const error = new Error("❌ Database not found.");
|
||||
logger.error({
|
||||
message: error.message,
|
||||
label: "initModels",
|
||||
});
|
||||
throw error;
|
||||
}
|
||||
|
||||
const cwd = path.resolve(`${__dirname}/../`);
|
||||
const models: { [key: string]: any } = {};
|
||||
|
||||
@ -25,42 +33,46 @@ export const registerModels = async () => {
|
||||
// Buscamos los ficheros que terminen en .model.js o .model.ts
|
||||
glob.sync("**/*.model.{js,ts}", globOptions).forEach((file) => {
|
||||
//logger.info(`📄 File >> ${file}...`);
|
||||
const modelDef = require(path.join(file)).default;
|
||||
const model = typeof modelDef === "function" ? modelDef(sequelize, DataTypes) : false;
|
||||
const modelFile = require(path.resolve(cwd, file));
|
||||
const modelDef = modelFile.default;
|
||||
const model = typeof modelDef === "function" ? modelDef(database, DataTypes) : false;
|
||||
|
||||
if (model) {
|
||||
models[model.name] = model;
|
||||
logger.info(`🔸 Model >> ${model.name} (${file})`);
|
||||
logger.info({
|
||||
message: `🔸 Model "${model.name}" registered (sequelize)`,
|
||||
label: "registerModels",
|
||||
});
|
||||
} else {
|
||||
logger.info(`🚫 No model`);
|
||||
logger.info({ message: `🚫 No model`, label: "registerModels" });
|
||||
}
|
||||
});
|
||||
|
||||
// Asociaciones y hooks de los modelos, si existen
|
||||
for (const modelName in models) {
|
||||
const model = models[modelName];
|
||||
if (model.associate) {
|
||||
model.associate(sequelize, models);
|
||||
}
|
||||
if (model.hooks) {
|
||||
model.hooks(sequelize);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
logger.error("❌ Error registering models:", error);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Configurar asociaciones
|
||||
Object.values(models).forEach((model) => {
|
||||
if (typeof model.associate === "function") {
|
||||
model.associate(database);
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
// Sincronizamos DB en modo desarrollo
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
await sequelize.sync({ force: false, alter: true });
|
||||
logger.info(`✔️${" "}Database synchronized successfully.`);
|
||||
await database.sync({ force: false, alter: true });
|
||||
logger.info({ message: `✔️${" "}Database synchronized successfully.`, label: "initModels" });
|
||||
} else {
|
||||
logger.warning("⚠️ Running in production mode - Skipping database sync.");
|
||||
logger.warning({
|
||||
message: "⚠️ Running in production mode - Skipping database sync.",
|
||||
label: "initModels",
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
logger.error("❌ Error synchronizing database:", error);
|
||||
process.exit(1);
|
||||
} catch (err) {
|
||||
const error = err as Error;
|
||||
logger.error({ message: "❌ Error synchronizing database:", error, label: "initModels" });
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
@ -1,9 +1,15 @@
|
||||
import { EmailAddress, PhoneNumber, PostalAddress, TINNumber, UniqueID } from "core/common/domain";
|
||||
import {
|
||||
EmailAddress,
|
||||
PhoneNumber,
|
||||
PostalAddress,
|
||||
TINNumber,
|
||||
UniqueID,
|
||||
} from "@/core/common/domain";
|
||||
|
||||
import { Account, AccountStatus, IAccountProps, IAccountService } from "@contexts/accounts/domain";
|
||||
import { Maybe, Result } from "core/common/helpers";
|
||||
import { ITransactionManager } from "core/common/infrastructure/database";
|
||||
import { logger } from "core/common/infrastructure/logger";
|
||||
import { Account, AccountStatus, IAccountProps, IAccountService } from "@/contexts/accounts/domain";
|
||||
import { Maybe, Result } from "@/core/common/helpers";
|
||||
import { ITransactionManager } from "@/core/common/infrastructure/database";
|
||||
import { logger } from "@/core/common/infrastructure/logger";
|
||||
import { ICreateAccountRequestDTO } from "../presentation";
|
||||
|
||||
export class CreateAccountUseCase {
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { Account, IAccountService } from "@contexts/accounts/domain";
|
||||
import { UniqueID } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { ITransactionManager } from "core/common/infrastructure/database";
|
||||
import { logger } from "core/common/infrastructure/logger";
|
||||
import { Account, IAccountService } from "@/contexts/accounts/domain";
|
||||
import { UniqueID } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
import { ITransactionManager } from "@/core/common/infrastructure/database";
|
||||
import { logger } from "@/core/common/infrastructure/logger";
|
||||
|
||||
export class GetAccountUseCase {
|
||||
constructor(
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { Account, IAccountService } from "@contexts/accounts/domain";
|
||||
import { Collection, Result } from "core/common/helpers";
|
||||
import { ITransactionManager } from "core/common/infrastructure/database";
|
||||
import { logger } from "core/common/infrastructure/logger";
|
||||
import { Account, IAccountService } from "@/contexts/accounts/domain";
|
||||
import { Collection, Result } from "@/core/common/helpers";
|
||||
import { ITransactionManager } from "@/core/common/infrastructure/database";
|
||||
import { logger } from "@/core/common/infrastructure/logger";
|
||||
|
||||
export class ListAccountsUseCase {
|
||||
constructor(
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { UniqueID } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { TransactionManager } from "core/common/infrastructure/database";
|
||||
import { UniqueID } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
import { TransactionManager } from "@/core/common/infrastructure/database";
|
||||
import { AccountService } from "../domain";
|
||||
import { UpdateAccountUseCase } from "./update-account.use-case";
|
||||
|
||||
|
||||
@ -1,9 +1,15 @@
|
||||
import { EmailAddress, PhoneNumber, PostalAddress, TINNumber, UniqueID } from "core/common/domain";
|
||||
import {
|
||||
EmailAddress,
|
||||
PhoneNumber,
|
||||
PostalAddress,
|
||||
TINNumber,
|
||||
UniqueID,
|
||||
} from "@/core/common/domain";
|
||||
|
||||
import { Account, IAccountProps, IAccountService } from "@contexts/accounts/domain";
|
||||
import { Maybe, Result } from "core/common/helpers";
|
||||
import { ITransactionManager } from "core/common/infrastructure/database";
|
||||
import { logger } from "core/common/infrastructure/logger";
|
||||
import { Account, IAccountProps, IAccountService } from "@/contexts/accounts/domain";
|
||||
import { Maybe, Result } from "@/core/common/helpers";
|
||||
import { ITransactionManager } from "@/core/common/infrastructure/database";
|
||||
import { logger } from "@/core/common/infrastructure/logger";
|
||||
import { IUpdateAccountRequestDTO } from "../presentation";
|
||||
|
||||
export class UpdateAccountUseCase {
|
||||
|
||||
@ -5,8 +5,8 @@ import {
|
||||
PostalAddress,
|
||||
TINNumber,
|
||||
UniqueID,
|
||||
} from "core/common/domain";
|
||||
import { Maybe, Result } from "core/common/helpers";
|
||||
} from "@/core/common/domain";
|
||||
import { Maybe, Result } from "@/core/common/helpers";
|
||||
import { AccountStatus } from "../value-objects";
|
||||
|
||||
export interface IAccountProps {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { EmailAddress, UniqueID } from "core/common/domain";
|
||||
import { Collection, Result } from "core/common/helpers";
|
||||
import { EmailAddress, UniqueID } from "@/core/common/domain";
|
||||
import { Collection, Result } from "@/core/common/helpers";
|
||||
import { Account } from "../aggregates";
|
||||
|
||||
export interface IAccountRepository {
|
||||
|
||||
@ -1,5 +1,11 @@
|
||||
import { EmailAddress, PhoneNumber, PostalAddress, TINNumber, UniqueID } from "core/common/domain";
|
||||
import { Maybe, Result } from "core/common/helpers";
|
||||
import {
|
||||
EmailAddress,
|
||||
PhoneNumber,
|
||||
PostalAddress,
|
||||
TINNumber,
|
||||
UniqueID,
|
||||
} from "@/core/common/domain";
|
||||
import { Maybe, Result } from "@/core/common/helpers";
|
||||
import { Account, IAccountProps } from "../aggregates";
|
||||
import { IAccountRepository } from "../repositories";
|
||||
import { AccountStatus } from "../value-objects";
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { UniqueID } from "core/common/domain";
|
||||
import { Collection, Result } from "core/common/helpers";
|
||||
import { UniqueID } from "@/core/common/domain";
|
||||
import { Collection, Result } from "@/core/common/helpers";
|
||||
import { Account, IAccountProps } from "../aggregates";
|
||||
|
||||
export interface IAccountService {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { UniqueID } from "core/common/domain";
|
||||
import { UniqueID } from "@/core/common/domain";
|
||||
import { Account } from "../aggregates";
|
||||
import { IAccountRepository } from "../repositories";
|
||||
import { AccountService } from "./account.service";
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { UniqueID } from "core/common/domain";
|
||||
import { Collection, Result } from "core/common/helpers";
|
||||
import { UniqueID } from "@/core/common/domain";
|
||||
import { Collection, Result } from "@/core/common/helpers";
|
||||
import { Transaction } from "sequelize";
|
||||
import { Account, IAccountProps } from "../aggregates";
|
||||
import { IAccountRepository } from "../repositories";
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { ValueObject } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { ValueObject } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
|
||||
interface IAccountStatusProps {
|
||||
value: string;
|
||||
|
||||
@ -1,11 +1,17 @@
|
||||
import { Account, AccountStatus } from "@contexts/accounts/domain/";
|
||||
import { EmailAddress, PhoneNumber, PostalAddress, TINNumber, UniqueID } from "core/common/domain";
|
||||
import { Maybe, Result } from "core/common/helpers";
|
||||
import { Account, AccountStatus } from "@/contexts/accounts/domain/";
|
||||
import {
|
||||
EmailAddress,
|
||||
PhoneNumber,
|
||||
PostalAddress,
|
||||
TINNumber,
|
||||
UniqueID,
|
||||
} from "@/core/common/domain";
|
||||
import { Maybe, Result } from "@/core/common/helpers";
|
||||
import {
|
||||
ISequelizeMapper,
|
||||
MapperParamsType,
|
||||
SequelizeMapper,
|
||||
} from "core/common/infrastructure/sequelize/sequelize-mapper";
|
||||
} from "@/core/common/infrastructure/sequelize/sequelize-mapper";
|
||||
import { AccountCreationAttributes, AccountModel } from "../sequelize/account.model";
|
||||
|
||||
export interface IAccountMapper
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { Account } from "@contexts/accounts/domain";
|
||||
import { IAccountRepository } from "@contexts/accounts/domain/repositories/account-repository.interface";
|
||||
import { EmailAddress, UniqueID } from "core/common/domain";
|
||||
import { Collection, Result } from "core/common/helpers";
|
||||
import { SequelizeRepository } from "core/common/infrastructure";
|
||||
import { Account } from "@/contexts/accounts/domain";
|
||||
import { IAccountRepository } from "@/contexts/accounts/domain/repositories/account-repository.interface";
|
||||
import { EmailAddress, UniqueID } from "@/core/common/domain";
|
||||
import { Collection, Result } from "@/core/common/helpers";
|
||||
import { SequelizeRepository } from "@/core/common/infrastructure";
|
||||
import { Transaction } from "sequelize";
|
||||
import { accountMapper, IAccountMapper } from "../mappers/account.mapper";
|
||||
import { AccountModel } from "./account.model";
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { IAccountRepository } from "@contexts/accounts/domain/repositories/account-repository.interface";
|
||||
import { IAccountRepository } from "@/contexts/accounts/domain/repositories/account-repository.interface";
|
||||
import { accountRepository } from "./account.repository";
|
||||
|
||||
export * from "./account.model";
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { UniqueID } from "core/common/domain";
|
||||
import { ExpressController } from "core/common/presentation";
|
||||
import { UniqueID } from "@/core/common/domain";
|
||||
import { ExpressController } from "@/core/common/presentation";
|
||||
import { CreateAccountUseCase } from "../../../application";
|
||||
import { ICreateAccountRequestDTO } from "../../dto";
|
||||
import { ICreateAccountPresenter } from "./create-account.presenter";
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Account } from "@contexts/accounts/domain";
|
||||
import { ensureBoolean, ensureNumber, ensureString } from "core/common/helpers";
|
||||
import { Account } from "@/contexts/accounts/domain";
|
||||
import { ensureBoolean, ensureNumber, ensureString } from "@/core/common/helpers";
|
||||
import { ICreateAccountResponseDTO } from "../../dto";
|
||||
|
||||
export interface ICreateAccountPresenter {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { CreateAccountUseCase } from "@contexts/accounts/application/create-account.use-case";
|
||||
import { AccountService } from "@contexts/accounts/domain";
|
||||
import { accountRepository } from "@contexts/accounts/infraestructure";
|
||||
import { SequelizeTransactionManager } from "core/common/infrastructure";
|
||||
import { CreateAccountUseCase } from "@/contexts/accounts/application/create-account.use-case";
|
||||
import { AccountService } from "@/contexts/accounts/domain";
|
||||
import { accountRepository } from "@/contexts/accounts/infraestructure";
|
||||
import { SequelizeTransactionManager } from "@/core/common/infrastructure";
|
||||
import { CreateAccountController } from "./create-account.controller";
|
||||
import { createAccountPresenter } from "./create-account.presenter";
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { GetAccountUseCase } from "@contexts/accounts/application";
|
||||
import { UniqueID } from "core/common/domain";
|
||||
import { ExpressController } from "core/common/presentation";
|
||||
import { GetAccountUseCase } from "@/contexts/accounts/application";
|
||||
import { UniqueID } from "@/core/common/domain";
|
||||
import { ExpressController } from "@/core/common/presentation";
|
||||
import { IGetAccountPresenter } from "./get-account.presenter";
|
||||
|
||||
export class GetAccountController extends ExpressController {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Account } from "@contexts/accounts/domain";
|
||||
import { ensureBoolean, ensureNumber, ensureString } from "core/common/helpers";
|
||||
import { Account } from "@/contexts/accounts/domain";
|
||||
import { ensureBoolean, ensureNumber, ensureString } from "@/core/common/helpers";
|
||||
import { IGetAccountResponseDTO } from "../../dto";
|
||||
|
||||
export interface IGetAccountPresenter {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { GetAccountUseCase } from "@contexts/accounts/application";
|
||||
import { AccountService } from "@contexts/accounts/domain";
|
||||
import { accountRepository } from "@contexts/accounts/infraestructure";
|
||||
import { SequelizeTransactionManager } from "core/common/infrastructure";
|
||||
import { GetAccountUseCase } from "@/contexts/accounts/application";
|
||||
import { AccountService } from "@/contexts/accounts/domain";
|
||||
import { accountRepository } from "@/contexts/accounts/infraestructure";
|
||||
import { SequelizeTransactionManager } from "@/core/common/infrastructure";
|
||||
import { GetAccountController } from "./get-account.controller";
|
||||
import { getAccountPresenter } from "./get-account.presenter";
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { ListAccountsUseCase } from "@contexts/accounts/application";
|
||||
import { AccountService } from "@contexts/accounts/domain";
|
||||
import { accountRepository } from "@contexts/accounts/infraestructure";
|
||||
import { SequelizeTransactionManager } from "core/common/infrastructure";
|
||||
import { ListAccountsUseCase } from "@/contexts/accounts/application";
|
||||
import { AccountService } from "@/contexts/accounts/domain";
|
||||
import { accountRepository } from "@/contexts/accounts/infraestructure";
|
||||
import { SequelizeTransactionManager } from "@/core/common/infrastructure";
|
||||
import { ListAccountsController } from "./list-accounts.controller";
|
||||
import { listAccountsPresenter } from "./list-accounts.presenter";
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { ListAccountsUseCase } from "@contexts/accounts/application";
|
||||
import { ExpressController } from "core/common/presentation";
|
||||
import { ListAccountsUseCase } from "@/contexts/accounts/application";
|
||||
import { ExpressController } from "@/core/common/presentation";
|
||||
import { IListAccountsPresenter } from "./list-accounts.presenter";
|
||||
|
||||
export class ListAccountsController extends ExpressController {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Account } from "@contexts/accounts/domain";
|
||||
import { Collection, ensureBoolean, ensureNumber, ensureString } from "core/common/helpers";
|
||||
import { Account } from "@/contexts/accounts/domain";
|
||||
import { Collection, ensureBoolean, ensureNumber, ensureString } from "@/core/common/helpers";
|
||||
import { IListAccountsResponseDTO } from "../../dto";
|
||||
|
||||
export interface IListAccountsPresenter {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { UpdateAccountUseCase } from "@contexts/accounts/application";
|
||||
import { AccountService } from "@contexts/accounts/domain";
|
||||
import { accountRepository } from "@contexts/accounts/infraestructure";
|
||||
import { SequelizeTransactionManager } from "core/common/infrastructure";
|
||||
import { UpdateAccountUseCase } from "@/contexts/accounts/application";
|
||||
import { AccountService } from "@/contexts/accounts/domain";
|
||||
import { accountRepository } from "@/contexts/accounts/infraestructure";
|
||||
import { SequelizeTransactionManager } from "@/core/common/infrastructure";
|
||||
import { UpdateAccountController } from "./update-account.controller";
|
||||
import { updateAccountPresenter } from "./update-account.presenter";
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { UpdateAccountUseCase } from "@contexts/accounts/application/update-account.use-case";
|
||||
import { UniqueID } from "core/common/domain";
|
||||
import { ExpressController } from "core/common/presentation";
|
||||
import { UpdateAccountUseCase } from "@/contexts/accounts/application/update-account.use-case";
|
||||
import { UniqueID } from "@/core/common/domain";
|
||||
import { ExpressController } from "@/core/common/presentation";
|
||||
import { IUpdateAccountRequestDTO } from "../../dto";
|
||||
import { IUpdateAccountPresenter } from "./update-account.presenter";
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Account } from "@contexts/accounts/domain";
|
||||
import { ensureBoolean, ensureNumber, ensureString } from "core/common/helpers";
|
||||
import { Account } from "@/contexts/accounts/domain";
|
||||
import { ensureBoolean, ensureNumber, ensureString } from "@/core/common/helpers";
|
||||
import { IUpdateAccountResponseDTO } from "../../dto";
|
||||
|
||||
export interface IUpdateAccountPresenter {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { User } from "@contexts/auth/domain";
|
||||
import { IUserService } from "@contexts/auth/domain/services";
|
||||
import { Collection, Result } from "core/common/helpers";
|
||||
import { ITransactionManager } from "core/common/infrastructure/database";
|
||||
import { Collection, Result } from "@/core/common/helpers";
|
||||
import { ITransactionManager } from "@/core/common/infrastructure/database";
|
||||
import { User } from "../../domain";
|
||||
import { IUserService } from "../../domain/services";
|
||||
|
||||
export class ListUsersUseCase {
|
||||
constructor(
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { LoginData } from "@contexts/auth/domain";
|
||||
import { IAuthService } from "@contexts/auth/domain/services";
|
||||
import { ITransactionManager } from "core/common/infrastructure/database";
|
||||
import { ITransactionManager } from "@/core/common/infrastructure/database";
|
||||
import { LoginData } from "../../domain";
|
||||
import { IAuthService } from "../../domain/services";
|
||||
|
||||
export class LoginUseCase {
|
||||
constructor(
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { LogoutData } from "@contexts/auth/domain";
|
||||
import { IAuthService } from "@contexts/auth/domain/services";
|
||||
import { ITransactionManager } from "core/common/infrastructure/database";
|
||||
import { ITransactionManager } from "@/core/common/infrastructure/database";
|
||||
import { LogoutData } from "../../domain";
|
||||
import { IAuthService } from "../../domain/services";
|
||||
|
||||
export class LogoutUseCase {
|
||||
constructor(
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Token } from "@contexts/auth/domain";
|
||||
import { IAuthService } from "@contexts/auth/domain/services";
|
||||
import { ITransactionManager } from "core/common/infrastructure/database";
|
||||
import { ITransactionManager } from "@/core/common/infrastructure/database";
|
||||
import { Token } from "../../domain";
|
||||
import { IAuthService } from "../../domain/services";
|
||||
|
||||
export class RefreshTokenUseCase {
|
||||
constructor(
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { RegisterData } from "@contexts/auth/domain";
|
||||
import { IAuthService } from "@contexts/auth/domain/services";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { ITransactionManager } from "core/common/infrastructure/database";
|
||||
import { logger } from "core/common/infrastructure/logger";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
import { ITransactionManager } from "@/core/common/infrastructure/database";
|
||||
import { logger } from "@/core/common/infrastructure/logger";
|
||||
import { RegisterData } from "../../domain";
|
||||
import { IAuthService } from "../../domain/services";
|
||||
|
||||
export class RegisterUseCase {
|
||||
constructor(
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Result } from "core/common/helpers";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
|
||||
import { AggregateRoot, EmailAddress, UniqueID } from "core/common/domain";
|
||||
import { AggregateRoot, EmailAddress, UniqueID } from "@/core/common/domain";
|
||||
import { UserAuthenticatedEvent } from "../events";
|
||||
import { HashPassword, PlainPassword, Username } from "../value-objects";
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { AggregateRoot, UniqueID } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { AggregateRoot, UniqueID } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
|
||||
export interface IRoleProps {}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { AggregateRoot, EmailAddress, UniqueID } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { AggregateRoot, EmailAddress, UniqueID } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
import { UserAuthenticatedEvent } from "../events";
|
||||
import { Username } from "../value-objects";
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { DomainEntity, EmailAddress, UniqueID } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { DomainEntity, EmailAddress, UniqueID } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
|
||||
export interface IJWTPayloadProps {
|
||||
tabId: UniqueID;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { DomainEntity, EmailAddress, UniqueID } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { DomainEntity, EmailAddress, UniqueID } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
import { PlainPassword } from "../value-objects";
|
||||
|
||||
export interface ILoginDataProps {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { DomainEntity, EmailAddress, UniqueID } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { DomainEntity, EmailAddress, UniqueID } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
|
||||
export interface ILogoutDataProps {
|
||||
email: EmailAddress;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { DomainEntity, EmailAddress } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { DomainEntity, EmailAddress } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
import { HashPassword, Username } from "../value-objects";
|
||||
|
||||
export interface IRegisterDataProps {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { DomainEntity, UniqueID } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { DomainEntity, UniqueID } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
|
||||
export interface ITabContextProps {
|
||||
tabId: UniqueID;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { IDomainEvent, UniqueID } from "core/common/domain";
|
||||
import { IDomainEvent, UniqueID } from "@/core/common/domain";
|
||||
|
||||
export class UserAuthenticatedEvent implements IDomainEvent {
|
||||
public readonly eventName = "UserAuthenticated";
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Result } from "core/common/helpers";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
|
||||
import { EmailAddress } from "core/common/domain";
|
||||
import { EmailAddress } from "@/core/common/domain";
|
||||
import { AuthenticatedUser } from "../aggregates";
|
||||
import { Username } from "../value-objects";
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { UniqueID } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { UniqueID } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
import { Transaction } from "sequelize";
|
||||
import { TabContext } from "../entities";
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { EmailAddress, UniqueID } from "core/common/domain";
|
||||
import { Collection, Result } from "core/common/helpers";
|
||||
import { EmailAddress, UniqueID } from "@/core/common/domain";
|
||||
import { Collection, Result } from "@/core/common/helpers";
|
||||
import { User } from "../aggregates";
|
||||
|
||||
export interface IUserRepository {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { EmailAddress } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { EmailAddress } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
import {
|
||||
AuthenticatedUser,
|
||||
IJWTPayload,
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { EmailAddress } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { EmailAddress } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
import { AuthenticatedUser, IJWTPayload, LoginData, RegisterData, TabContext, Token } from "..";
|
||||
|
||||
import { UniqueID } from "core/common/domain";
|
||||
import { UniqueID } from "@/core/common/domain";
|
||||
import { IAuthenticatedUserRepository, JWTPayload } from "..";
|
||||
import { JwtHelper } from "../../infraestructure/passport/jwt.helper";
|
||||
import { ITabContextRepository } from "../repositories/tab-context-repository.interface";
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { UniqueID } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { UniqueID } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
import { TabContext } from "../entities";
|
||||
|
||||
export interface ITabContextService {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { UniqueID } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { UniqueID } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
import { TabContext } from "../entities";
|
||||
import { ITabContextRepository } from "../repositories";
|
||||
import { ITabContextService } from "./tab-context-service.interface";
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { UniqueID } from "core/common/domain";
|
||||
import { Collection, Result } from "core/common/helpers";
|
||||
import { UniqueID } from "@/core/common/domain";
|
||||
import { Collection, Result } from "@/core/common/helpers";
|
||||
import { User } from "../aggregates";
|
||||
|
||||
export interface IUserService {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { UniqueID } from "core/common/domain";
|
||||
import { Collection, Result } from "core/common/helpers";
|
||||
import { UniqueID } from "@/core/common/domain";
|
||||
import { Collection, Result } from "@/core/common/helpers";
|
||||
import { IUserRepository, User } from "..";
|
||||
import { IUserService } from "./user-service.interface";
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { ValueObject } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { ValueObject } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
import { z } from "zod";
|
||||
|
||||
const RoleSchema = z.enum(["Admin", "User", "Manager", "Editor"]);
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import bcrypt from "bcrypt";
|
||||
import { ValueObject } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { ValueObject } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
import { z } from "zod";
|
||||
|
||||
interface HashPasswordProps {
|
||||
@ -41,4 +40,8 @@ export class HashPassword extends ValueObject<HashPasswordProps> {
|
||||
toString() {
|
||||
return this.props.value;
|
||||
}
|
||||
|
||||
toPrimitive() {
|
||||
return this.props.value;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { ValueObject } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { ValueObject } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
import { z } from "zod";
|
||||
|
||||
interface PlainPasswordProps {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { ValueObject } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { ValueObject } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
import { z } from "zod";
|
||||
|
||||
interface TokenProps {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { ValueObject } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { ValueObject } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
import { z } from "zod";
|
||||
|
||||
interface UsernameProps {
|
||||
@ -34,4 +34,8 @@ export class Username extends ValueObject<UsernameProps> {
|
||||
toString() {
|
||||
return this.props.value;
|
||||
}
|
||||
|
||||
toPrimitive() {
|
||||
return this.props.value;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { AuthenticatedUser, TabContext } from "@contexts/auth/domain";
|
||||
import { Request } from "express";
|
||||
import { AuthenticatedUser, TabContext } from "../../domain";
|
||||
|
||||
export interface TabContextRequest extends Request {
|
||||
tabContext?: TabContext;
|
||||
|
||||
@ -1,7 +1,12 @@
|
||||
import { AuthenticatedUser, HashPassword, Username } from "@contexts/auth/domain";
|
||||
import { EmailAddress, UniqueID } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { ISequelizeMapper, MapperParamsType, SequelizeMapper } from "core/common/infrastructure";
|
||||
import {
|
||||
EmailAddress,
|
||||
ISequelizeMapper,
|
||||
MapperParamsType,
|
||||
Result,
|
||||
SequelizeMapper,
|
||||
UniqueID,
|
||||
} from "@/core";
|
||||
import { AuthenticatedUser, HashPassword, Username } from "../../domain";
|
||||
import { AuthUserCreationAttributes, AuthUserModel } from "../sequelize";
|
||||
|
||||
export interface IAuthenticatedUserMapper
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { TabContext } from "@contexts/auth/domain";
|
||||
import { UniqueID } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { ISequelizeMapper, MapperParamsType, SequelizeMapper } from "core/common/infrastructure";
|
||||
import { UniqueID } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
import { ISequelizeMapper, MapperParamsType, SequelizeMapper } from "@/core/common/infrastructure";
|
||||
import { TabContext } from "../../domain";
|
||||
import { TabContextCreationAttributes, TabContextModel } from "../sequelize";
|
||||
|
||||
export interface ITabContextMapper
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import { User, Username } from "@contexts/auth/domain";
|
||||
import { EmailAddress, UniqueID } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { EmailAddress, UniqueID } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
import {
|
||||
ISequelizeMapper,
|
||||
MapperParamsType,
|
||||
SequelizeMapper,
|
||||
} from "core/common/infrastructure/sequelize/sequelize-mapper";
|
||||
} from "@/core/common/infrastructure/sequelize/sequelize-mapper";
|
||||
import { User, Username } from "../../domain";
|
||||
import { UserCreationAttributes, UserModel } from "../sequelize";
|
||||
|
||||
export interface IUserMapper extends ISequelizeMapper<UserModel, UserCreationAttributes, User> {}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { AuthenticatedUser } from "@contexts/auth/domain";
|
||||
import { UniqueID } from "core/common/domain";
|
||||
import { ApiError, ExpressController } from "core/common/presentation";
|
||||
//import { authProvider } from "@contexts/auth/infraestructure";
|
||||
import { UniqueID } from "@/core/common/domain";
|
||||
import { ApiError, ExpressController } from "@/core/common/presentation";
|
||||
import { AuthenticatedUser } from "../../domain";
|
||||
//import { authProvider } from "@/contexts/auth/infraestructure";
|
||||
import { NextFunction, Response } from "express";
|
||||
import { AuthenticatedRequest } from "../express/types";
|
||||
import { authProvider } from "../passport";
|
||||
|
||||
@ -1,9 +1,12 @@
|
||||
import { AuthService, TabContextService } from "@contexts/auth/domain/services";
|
||||
import { SequelizeTransactionManager } from "core/common/infrastructure";
|
||||
import { getDatabase } from "@/config";
|
||||
import { SequelizeTransactionManager } from "@/core/common/infrastructure";
|
||||
import { AuthService, TabContextService } from "../../domain/services";
|
||||
import { authenticatedUserRepository, tabContextRepository } from "../sequelize";
|
||||
import { PassportAuthProvider } from "./passport-auth-provider";
|
||||
|
||||
const transactionManager = new SequelizeTransactionManager();
|
||||
const database = getDatabase();
|
||||
|
||||
const transactionManager = new SequelizeTransactionManager(database);
|
||||
const authService = new AuthService(authenticatedUserRepository, tabContextRepository);
|
||||
const tabContextService = new TabContextService(tabContextRepository);
|
||||
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
import { NextFunction, Response } from "express";
|
||||
|
||||
import { TabContext } from "@contexts/auth/domain";
|
||||
import { IAuthService, ITabContextService } from "@contexts/auth/domain/services";
|
||||
import { EmailAddress, UniqueID } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { ITransactionManager } from "core/common/infrastructure/database";
|
||||
import { logger } from "core/common/infrastructure/logger";
|
||||
import { EmailAddress, UniqueID } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
import { ITransactionManager } from "@/core/common/infrastructure/database";
|
||||
import { logger } from "@/core/common/infrastructure/logger";
|
||||
import passport from "passport";
|
||||
import { ExtractJwt, Strategy as JwtStrategy } from "passport-jwt";
|
||||
import { TabContext } from "../../domain";
|
||||
import { IAuthService, ITabContextService } from "../../domain/services";
|
||||
import { TabContextRequest } from "../express/types";
|
||||
|
||||
const SECRET_KEY = process.env.JWT_SECRET || "supersecretkey";
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { AuthenticatedUser, IAuthenticatedUserRepository, Username } from "@contexts/auth/domain";
|
||||
import { EmailAddress } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { SequelizeRepository } from "core/common/infrastructure";
|
||||
import { EmailAddress } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
import { SequelizeRepository } from "@/core/common/infrastructure";
|
||||
import { Transaction } from "sequelize";
|
||||
import { AuthenticatedUser, IAuthenticatedUserRepository, Username } from "../../domain";
|
||||
import { authenticatedUserMapper, IAuthenticatedUserMapper } from "../mappers";
|
||||
import { AuthUserModel } from "./auth-user.model";
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { ITabContextRepository, TabContext } from "@contexts/auth/domain/";
|
||||
import { UniqueID } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { SequelizeRepository } from "core/common/infrastructure";
|
||||
import { UniqueID } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
import { SequelizeRepository } from "@/core/common/infrastructure";
|
||||
import { Op, Transaction } from "sequelize";
|
||||
import { ITabContextRepository, TabContext } from "../../domain/";
|
||||
import { ITabContextMapper, tabContextMapper } from "../mappers";
|
||||
import { TabContextModel } from "./tab-context.model";
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { IUserRepository, User } from "@contexts/auth/domain";
|
||||
import { EmailAddress, UniqueID } from "core/common/domain";
|
||||
import { Collection, Result } from "core/common/helpers";
|
||||
import { SequelizeRepository } from "core/common/infrastructure";
|
||||
import { EmailAddress, UniqueID } from "@/core/common/domain";
|
||||
import { Collection, Result } from "@/core/common/helpers";
|
||||
import { SequelizeRepository } from "@/core/common/infrastructure";
|
||||
import { Transaction } from "sequelize";
|
||||
import { IUserRepository, User } from "../../domain";
|
||||
import { IUserMapper, userMapper } from "../mappers";
|
||||
import { UserModel } from "./user.model";
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { ListUsersUseCase } from "@contexts/auth/application/list-users/list-users.use-case";
|
||||
import { UserService } from "@contexts/auth/domain/services/user.service";
|
||||
import { userRepository } from "@contexts/auth/infraestructure";
|
||||
import { SequelizeTransactionManager } from "core/common/infrastructure";
|
||||
import { ListUsersUseCase } from "@/contexts/auth/application/list-users/list-users.use-case";
|
||||
import { userRepository } from "@/contexts/auth/infraestructure";
|
||||
import { SequelizeTransactionManager } from "@/core/common/infrastructure";
|
||||
import { UserService } from "../../domain/services/user.service";
|
||||
import { ListUsersController } from "./list-users.controller";
|
||||
import { listUsersPresenter } from "./list-users.presenter";
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { ListUsersUseCase } from "@contexts/auth/application";
|
||||
import { ExpressController } from "core/common/presentation";
|
||||
import { ListUsersUseCase } from "@/contexts/auth/application";
|
||||
import { ExpressController } from "@/core/common/presentation";
|
||||
import { IListUsersPresenter } from "./list-users.presenter";
|
||||
|
||||
export class ListUsersController extends ExpressController {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { User } from "@contexts/auth/domain";
|
||||
import { Collection, ensureString } from "core/common/helpers";
|
||||
import { Collection, ensureString } from "@/core/common/helpers";
|
||||
import { User } from "../../domain";
|
||||
import { IListUsersResponseDTO } from "../../dto";
|
||||
|
||||
export interface IListUsersPresenter {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { LoginUseCase } from "@contexts/auth/application";
|
||||
import { AuthService } from "@contexts/auth/domain/services";
|
||||
import { authenticatedUserRepository, tabContextRepository } from "@contexts/auth/infraestructure";
|
||||
import { SequelizeTransactionManager } from "core/common/infrastructure";
|
||||
import { LoginUseCase } from "@/contexts/auth/application";
|
||||
import { authenticatedUserRepository, tabContextRepository } from "@/contexts/auth/infraestructure";
|
||||
import { SequelizeTransactionManager } from "@/core/common/infrastructure";
|
||||
import { AuthService } from "../../domain/services";
|
||||
import { LoginController } from "./login.controller";
|
||||
import { loginPresenter } from "./login.presenter";
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { LoginUseCase } from "@contexts/auth/application";
|
||||
import { LoginData } from "@contexts/auth/domain";
|
||||
import { ExpressController } from "core/common/presentation";
|
||||
import { LoginUseCase } from "@/contexts/auth/application";
|
||||
import { ExpressController } from "@/core/common/presentation";
|
||||
import { LoginData } from "../../domain";
|
||||
import { ILoginPresenter } from "./login.presenter";
|
||||
|
||||
export class LoginController extends ExpressController {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { AuthenticatedUser, TabContext, Token } from "@contexts/auth/domain";
|
||||
import { AuthenticatedUser, TabContext, Token } from "../../domain";
|
||||
import { ILoginUserResponseDTO } from "../../dto";
|
||||
|
||||
export interface ILoginPresenter {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { LogoutUseCase } from "@contexts/auth/application";
|
||||
import { AuthService } from "@contexts/auth/domain/services";
|
||||
import { authenticatedUserRepository, tabContextRepository } from "@contexts/auth/infraestructure";
|
||||
import { SequelizeTransactionManager } from "core/common/infrastructure";
|
||||
import { LogoutUseCase } from "@/contexts/auth/application";
|
||||
import { authenticatedUserRepository, tabContextRepository } from "@/contexts/auth/infraestructure";
|
||||
import { SequelizeTransactionManager } from "@/core/common/infrastructure";
|
||||
import { AuthService } from "../../domain/services";
|
||||
import { LogoutController } from "./logout.controller";
|
||||
|
||||
export const buildLogoutController = () => {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { LogoutUseCase } from "@contexts/auth/application/logout";
|
||||
import { AuthenticatedUser, LogoutData, TabContext } from "@contexts/auth/domain";
|
||||
import { TabContextRequest } from "@contexts/auth/infraestructure/express/types";
|
||||
import { ExpressController } from "core/common/presentation";
|
||||
import { LogoutUseCase } from "@/contexts/auth/application/logout";
|
||||
import { TabContextRequest } from "@/contexts/auth/infraestructure/express/types";
|
||||
import { ExpressController } from "@/core/common/presentation";
|
||||
import { AuthenticatedUser, LogoutData, TabContext } from "../../domain";
|
||||
|
||||
export class LogoutController extends ExpressController {
|
||||
public constructor(private readonly logout: LogoutUseCase) {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { RefreshTokenUseCase } from "@contexts/auth/application";
|
||||
import { AuthService } from "@contexts/auth/domain/services";
|
||||
import { authenticatedUserRepository, tabContextRepository } from "@contexts/auth/infraestructure";
|
||||
import { SequelizeTransactionManager } from "core/common/infrastructure";
|
||||
import { RefreshTokenUseCase } from "@/contexts/auth/application";
|
||||
import { authenticatedUserRepository, tabContextRepository } from "@/contexts/auth/infraestructure";
|
||||
import { SequelizeTransactionManager } from "@/core/common/infrastructure";
|
||||
import { AuthService } from "../../domain/services";
|
||||
import { RefreshTokenController } from "./refresh-token.controller";
|
||||
import { refreshTokenPresenter } from "./refresh-token.presenter";
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { RefreshTokenUseCase } from "@contexts/auth/application";
|
||||
import { Token } from "@contexts/auth/domain";
|
||||
import { ExpressController } from "core/common/presentation";
|
||||
import { RefreshTokenUseCase } from "@/contexts/auth/application";
|
||||
import { ExpressController } from "@/core/common/presentation";
|
||||
import { Token } from "../../domain";
|
||||
import { IRefreshTokenPresenter } from "./refresh-token.presenter";
|
||||
|
||||
export class RefreshTokenController extends ExpressController {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Token } from "@contexts/auth/domain";
|
||||
import { Token } from "../../domain";
|
||||
import { IRefreshTokenResponseDTO } from "../../dto";
|
||||
|
||||
export interface IRefreshTokenPresenter {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { RegisterUseCase } from "@contexts/auth/application/register";
|
||||
import { AuthService } from "@contexts/auth/domain/services";
|
||||
import { authenticatedUserRepository, tabContextRepository } from "@contexts/auth/infraestructure";
|
||||
import { SequelizeTransactionManager } from "core/common/infrastructure";
|
||||
import { RegisterUseCase } from "@/contexts/auth/application/register";
|
||||
import { authenticatedUserRepository, tabContextRepository } from "@/contexts/auth/infraestructure";
|
||||
import { SequelizeTransactionManager } from "@/core/common/infrastructure";
|
||||
import { AuthService } from "../../domain/services";
|
||||
import { RegisterController } from "./register.controller";
|
||||
import { registerPresenter } from "./register.presenter";
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { RegisterUseCase } from "@contexts/auth/application";
|
||||
import { RegisterData } from "@contexts/auth/domain";
|
||||
import { ExpressController } from "core/common/presentation";
|
||||
import { RegisterUseCase } from "@/contexts/auth/application";
|
||||
import { ExpressController } from "@/core/common/presentation";
|
||||
import { RegisterData } from "../../domain";
|
||||
import { IRegisterPresenter } from "./register.presenter";
|
||||
|
||||
export class RegisterController extends ExpressController {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { AuthenticatedUser } from "@contexts/auth/domain";
|
||||
import { AuthenticatedUser } from "../../domain";
|
||||
import { IRegisterUserResponseDTO } from "../../dto";
|
||||
|
||||
export interface IRegisterPresenter {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Collection, Result } from "core/common/helpers";
|
||||
import { ITransactionManager } from "core/common/infrastructure/database";
|
||||
import { Collection, Result } from "@/core/common/helpers";
|
||||
import { ITransactionManager } from "@/core/common/infrastructure/database";
|
||||
import { Contact, IContactService } from "../domain";
|
||||
|
||||
export class ListContactsUseCase {
|
||||
|
||||
@ -5,8 +5,8 @@ import {
|
||||
PostalAddress,
|
||||
TINNumber,
|
||||
UniqueID,
|
||||
} from "core/common/domain";
|
||||
import { Maybe, Result } from "core/common/helpers";
|
||||
} from "@/core/common/domain";
|
||||
import { Maybe, Result } from "@/core/common/helpers";
|
||||
|
||||
export interface IContactProps {
|
||||
reference: string;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { EmailAddress, UniqueID } from "core/common/domain";
|
||||
import { Collection, Result } from "core/common/helpers";
|
||||
import { EmailAddress, UniqueID } from "@/core/common/domain";
|
||||
import { Collection, Result } from "@/core/common/helpers";
|
||||
import { Contact } from "../aggregates";
|
||||
|
||||
export interface IContactRepository {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { UniqueID } from "core/common/domain";
|
||||
import { Collection, Result } from "core/common/helpers";
|
||||
import { UniqueID } from "@/core/common/domain";
|
||||
import { Collection, Result } from "@/core/common/helpers";
|
||||
import { Contact } from "../aggregates";
|
||||
|
||||
export interface IContactService {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { UniqueID } from "core/common/domain";
|
||||
import { Collection, Result } from "core/common/helpers";
|
||||
import { UniqueID } from "@/core/common/domain";
|
||||
import { Collection, Result } from "@/core/common/helpers";
|
||||
import { Contact } from "../aggregates";
|
||||
import { IContactRepository } from "../repositories";
|
||||
import { IContactService } from "./contact-service.interface";
|
||||
|
||||
@ -1,10 +1,16 @@
|
||||
import { EmailAddress, PhoneNumber, PostalAddress, TINNumber, UniqueID } from "core/common/domain";
|
||||
import { Maybe, Result } from "core/common/helpers";
|
||||
import {
|
||||
EmailAddress,
|
||||
PhoneNumber,
|
||||
PostalAddress,
|
||||
TINNumber,
|
||||
UniqueID,
|
||||
} from "@/core/common/domain";
|
||||
import { Maybe, Result } from "@/core/common/helpers";
|
||||
import {
|
||||
ISequelizeMapper,
|
||||
MapperParamsType,
|
||||
SequelizeMapper,
|
||||
} from "core/common/infrastructure/sequelize/sequelize-mapper";
|
||||
} from "@/core/common/infrastructure/sequelize/sequelize-mapper";
|
||||
import { Contact } from "../../domain";
|
||||
import { ContactCreationAttributes, ContactModel } from "../sequelize/contact.model";
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { EmailAddress, UniqueID } from "core/common/domain";
|
||||
import { Collection, Result } from "core/common/helpers";
|
||||
import { SequelizeRepository } from "core/common/infrastructure";
|
||||
import { EmailAddress, UniqueID } from "@/core/common/domain";
|
||||
import { Collection, Result } from "@/core/common/helpers";
|
||||
import { SequelizeRepository } from "@/core/common/infrastructure";
|
||||
import { Transaction } from "sequelize";
|
||||
import { Contact, IContactRepository } from "../../domain";
|
||||
import { contactMapper, IContactMapper } from "../mappers";
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { SequelizeTransactionManager } from "core/common/infrastructure";
|
||||
import { SequelizeTransactionManager } from "@/core/common/infrastructure";
|
||||
import { ListContactsUseCase } from "../../../application";
|
||||
import { ContactService } from "../../../domain";
|
||||
import { contactRepository } from "../../../infraestructure";
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { ExpressController } from "core/common/presentation";
|
||||
import { ExpressController } from "@/core/common/presentation";
|
||||
import { ListContactsUseCase } from "../../../application";
|
||||
import { IListContactsPresenter } from "./list-contacts.presenter";
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Collection, ensureBoolean, ensureNumber, ensureString } from "core/common/helpers";
|
||||
import { Collection, ensureBoolean, ensureNumber, ensureString } from "@/core/common/helpers";
|
||||
import { Contact } from "../../../domain";
|
||||
import { IListContactsResponseDTO } from "../../dto";
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { ICustomerInvoiceService } from "@contexts/customer-billing/domain";
|
||||
import { CustomerInvoice } from "@contexts/customer-billing/domain/aggregates";
|
||||
import { UniqueID } from "core/common/domain";
|
||||
import { Result } from "core/common/helpers";
|
||||
import { ITransactionManager } from "core/common/infrastructure/database";
|
||||
import { ICustomerInvoiceService } from "@/contexts/customer-billing/domain";
|
||||
import { CustomerInvoice } from "@/contexts/customer-billing/domain/aggregates";
|
||||
import { UniqueID } from "@/core/common/domain";
|
||||
import { Result } from "@/core/common/helpers";
|
||||
import { ITransactionManager } from "@/core/common/infrastructure/database";
|
||||
|
||||
export class GetCustomerInvoiceUseCase {
|
||||
constructor(
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Collection, Result } from "core/common/helpers";
|
||||
import { ITransactionManager } from "core/common/infrastructure/database";
|
||||
import { Collection, Result } from "@/core/common/helpers";
|
||||
import { ITransactionManager } from "@/core/common/infrastructure/database";
|
||||
import { CustomerInvoice, ICustomerInvoiceService } from "../domain";
|
||||
|
||||
export class ListCustomerInvoicesUseCase {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { AggregateRoot, UniqueID, UtcDate } from "core/common/domain";
|
||||
import { Maybe, Result } from "core/common/helpers";
|
||||
import { AggregateRoot, UniqueID, UtcDate } from "@/core/common/domain";
|
||||
import { Maybe, Result } from "@/core/common/helpers";
|
||||
import { Customer, CustomerInvoiceItem } from "../entities";
|
||||
import { InvoiceStatus } from "../value-objetcs";
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user