fix npm run build
This commit is contained in:
+50
@@ -0,0 +1,50 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ApplicationModule = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const prisma_service_1 = require("../../shared/prisma.service");
|
||||
const applications_controller_1 = require("./presentation/controllers/applications.controller");
|
||||
const prisma_application_repository_1 = require("./infrastructure/repositories/prisma-application.repository");
|
||||
const application_interface_1 = require("./domain/repositories/application.interface");
|
||||
const get_applications_handler_1 = require("./application/handlers/get-applications.handler");
|
||||
const get_application_handler_1 = require("./application/handlers/get-application.handler");
|
||||
const create_application_handler_1 = require("./application/handlers/create-application.handler");
|
||||
const update_application_handler_1 = require("./application/handlers/update-application.handler");
|
||||
const delete_application_handler_1 = require("./application/handlers/delete-application.handler");
|
||||
const get_me_applications_handler_1 = require("./application/handlers/get-me-applications.handler");
|
||||
const application_validator_1 = require("./application/validators/application.validator");
|
||||
const jwt_auth_guard_1 = require("../../core/auth/guards/jwt-auth.guard");
|
||||
const current_user_guard_1 = require("../identity/presentation/guards/current-user.guard");
|
||||
let ApplicationModule = class ApplicationModule {
|
||||
};
|
||||
exports.ApplicationModule = ApplicationModule;
|
||||
exports.ApplicationModule = ApplicationModule = __decorate([
|
||||
(0, common_1.Module)({
|
||||
imports: [],
|
||||
providers: [
|
||||
prisma_service_1.PrismaService,
|
||||
prisma_application_repository_1.PrismaApplicationRepository,
|
||||
get_applications_handler_1.GetApplicationsHandler,
|
||||
get_application_handler_1.GetApplicationHandler,
|
||||
create_application_handler_1.CreateApplicationHandler,
|
||||
update_application_handler_1.UpdateApplicationHandler,
|
||||
delete_application_handler_1.DeleteApplicationHandler,
|
||||
get_me_applications_handler_1.GetMeApplicationsHandler,
|
||||
application_validator_1.ApplicationValidator,
|
||||
jwt_auth_guard_1.JwtAuthGuard,
|
||||
current_user_guard_1.CurrentUserGuard,
|
||||
{
|
||||
provide: application_interface_1.IApplication,
|
||||
useClass: prisma_application_repository_1.PrismaApplicationRepository,
|
||||
},
|
||||
],
|
||||
controllers: [applications_controller_1.ApplicationsController],
|
||||
})
|
||||
], ApplicationModule);
|
||||
//# sourceMappingURL=application.module.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"application.module.js","sourceRoot":"","sources":["../../../src/modules/application/application.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,gEAA4D;AAC5D,gGAA4F;AAC5F,+GAA0G;AAC1G,uFAA2E;AAC3E,8FAAyF;AACzF,4FAAuF;AACvF,kGAA6F;AAC7F,kGAA6F;AAC7F,kGAA6F;AAC7F,oGAA8F;AAC9F,0FAAsF;AACtF,0EAAqE;AACrE,2FAAsF;AAuB/E,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAAG,CAAA;AAApB,8CAAiB;4BAAjB,iBAAiB;IArB7B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,EAAE;QACX,SAAS,EAAE;YACT,8BAAa;YACb,2DAA2B;YAC3B,iDAAsB;YACtB,+CAAqB;YACrB,qDAAwB;YACxB,qDAAwB;YACxB,qDAAwB;YACxB,sDAAwB;YACxB,4CAAoB;YACpB,6BAAY;YACZ,qCAAgB;YAChB;gBACE,OAAO,EAAE,oCAAY;gBACrB,QAAQ,EAAE,2DAA2B;aACtC;SACF;QACD,WAAW,EAAE,CAAC,gDAAsB,CAAC;KACtC,CAAC;GACW,iBAAiB,CAAG"}
|
||||
@@ -0,0 +1,44 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CreateApplicationHandler = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const application_interface_1 = require("../../domain/repositories/application.interface");
|
||||
const application_validator_1 = require("../../application/validators/application.validator");
|
||||
const application_entity_1 = require("../../domain/entities/application.entity");
|
||||
let CreateApplicationHandler = class CreateApplicationHandler {
|
||||
appRepo;
|
||||
validator;
|
||||
constructor(appRepo, validator) {
|
||||
this.appRepo = appRepo;
|
||||
this.validator = validator;
|
||||
}
|
||||
async execute(payload) {
|
||||
await this.validator.validateCreate(payload);
|
||||
const app = application_entity_1.ApplicationData.create({
|
||||
code: payload.code,
|
||||
name: payload.name,
|
||||
description: payload.description,
|
||||
icon: payload.icon,
|
||||
url: payload.url,
|
||||
applicationsClaim: payload.applicationsClaim,
|
||||
displayOrder: payload.displayOrder,
|
||||
});
|
||||
const created = await this.appRepo.create(app);
|
||||
return created;
|
||||
}
|
||||
};
|
||||
exports.CreateApplicationHandler = CreateApplicationHandler;
|
||||
exports.CreateApplicationHandler = CreateApplicationHandler = __decorate([
|
||||
(0, common_1.Injectable)(),
|
||||
__metadata("design:paramtypes", [application_interface_1.IApplication, application_validator_1.ApplicationValidator])
|
||||
], CreateApplicationHandler);
|
||||
//# sourceMappingURL=create-application.handler.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"create-application.handler.js","sourceRoot":"","sources":["../../../../../src/modules/application/application/handlers/create-application.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiE;AACjE,2FAA+E;AAC/E,8FAA0F;AAC1F,iFAA2E;AAGpE,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACN;IAAwC;IAArE,YAA6B,OAAqB,EAAmB,SAA+B;QAAvE,YAAO,GAAP,OAAO,CAAc;QAAmB,cAAS,GAAT,SAAS,CAAsB;IAAG,CAAC;IAExG,KAAK,CAAC,OAAO,CAAC,OAAY;QACxB,MAAM,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAE7C,MAAM,GAAG,GAAG,oCAAe,CAAC,MAAM,CAAC;YACjC,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;YAC5C,YAAY,EAAE,OAAO,CAAC,YAAY;SACnC,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC/C,OAAO,OAAO,CAAC;IACjB,CAAC;CACF,CAAA;AAnBY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;qCAE2B,oCAAY,EAA8B,4CAAoB;GADzF,wBAAwB,CAmBpC"}
|
||||
@@ -0,0 +1,31 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.DeleteApplicationHandler = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const application_interface_1 = require("../../domain/repositories/application.interface");
|
||||
let DeleteApplicationHandler = class DeleteApplicationHandler {
|
||||
appRepo;
|
||||
constructor(appRepo) {
|
||||
this.appRepo = appRepo;
|
||||
}
|
||||
async execute(id) {
|
||||
// ensure exists
|
||||
await this.appRepo.findById(id);
|
||||
await this.appRepo.delete(id);
|
||||
}
|
||||
};
|
||||
exports.DeleteApplicationHandler = DeleteApplicationHandler;
|
||||
exports.DeleteApplicationHandler = DeleteApplicationHandler = __decorate([
|
||||
(0, common_1.Injectable)(),
|
||||
__metadata("design:paramtypes", [application_interface_1.IApplication])
|
||||
], DeleteApplicationHandler);
|
||||
//# sourceMappingURL=delete-application.handler.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"delete-application.handler.js","sourceRoot":"","sources":["../../../../../src/modules/application/application/handlers/delete-application.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,2FAA+E;AAGxE,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACN;IAA7B,YAA6B,OAAqB;QAArB,YAAO,GAAP,OAAO,CAAc;IAAG,CAAC;IAEtD,KAAK,CAAC,OAAO,CAAC,EAAU;QACtB,gBAAgB;QAChB,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAChC,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAChC,CAAC;CACF,CAAA;AARY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;qCAE2B,oCAAY;GADvC,wBAAwB,CAQpC"}
|
||||
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GetApplicationHandler = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const application_interface_1 = require("../../domain/repositories/application.interface");
|
||||
let GetApplicationHandler = class GetApplicationHandler {
|
||||
appRepo;
|
||||
constructor(appRepo) {
|
||||
this.appRepo = appRepo;
|
||||
}
|
||||
async execute(id) {
|
||||
const app = await this.appRepo.findById(id);
|
||||
return app;
|
||||
}
|
||||
};
|
||||
exports.GetApplicationHandler = GetApplicationHandler;
|
||||
exports.GetApplicationHandler = GetApplicationHandler = __decorate([
|
||||
(0, common_1.Injectable)(),
|
||||
__metadata("design:paramtypes", [application_interface_1.IApplication])
|
||||
], GetApplicationHandler);
|
||||
//# sourceMappingURL=get-application.handler.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"get-application.handler.js","sourceRoot":"","sources":["../../../../../src/modules/application/application/handlers/get-application.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,2FAA+E;AAGxE,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IACH;IAA7B,YAA6B,OAAqB;QAArB,YAAO,GAAP,OAAO,CAAc;IAAG,CAAC;IAEtD,KAAK,CAAC,OAAO,CAAC,EAAU;QACtB,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC5C,OAAO,GAAG,CAAC;IACb,CAAC;CACF,CAAA;AAPY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;qCAE2B,oCAAY;GADvC,qBAAqB,CAOjC"}
|
||||
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GetApplicationsHandler = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const application_interface_1 = require("../../domain/repositories/application.interface");
|
||||
let GetApplicationsHandler = class GetApplicationsHandler {
|
||||
appRepo;
|
||||
constructor(appRepo) {
|
||||
this.appRepo = appRepo;
|
||||
}
|
||||
async execute(query) {
|
||||
const res = await this.appRepo.find({ page: query.page, limit: query.limit, search: query.search || null });
|
||||
return res;
|
||||
}
|
||||
};
|
||||
exports.GetApplicationsHandler = GetApplicationsHandler;
|
||||
exports.GetApplicationsHandler = GetApplicationsHandler = __decorate([
|
||||
(0, common_1.Injectable)(),
|
||||
__metadata("design:paramtypes", [application_interface_1.IApplication])
|
||||
], GetApplicationsHandler);
|
||||
//# sourceMappingURL=get-applications.handler.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"get-applications.handler.js","sourceRoot":"","sources":["../../../../../src/modules/application/application/handlers/get-applications.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,2FAA+E;AAGxE,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACJ;IAA7B,YAA6B,OAAqB;QAArB,YAAO,GAAP,OAAO,CAAc;IAAG,CAAC;IAEtD,KAAK,CAAC,OAAO,CAAC,KAAyD;QACrE,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,IAAI,EAAE,CAAC,CAAC;QAC5G,OAAO,GAAG,CAAC;IACb,CAAC;CACF,CAAA;AAPY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;qCAE2B,oCAAY;GADvC,sBAAsB,CAOlC"}
|
||||
@@ -0,0 +1,35 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GetMeApplicationsHandler = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const application_interface_1 = require("../../domain/repositories/application.interface");
|
||||
let GetMeApplicationsHandler = class GetMeApplicationsHandler {
|
||||
appRepo;
|
||||
constructor(appRepo) {
|
||||
this.appRepo = appRepo;
|
||||
}
|
||||
async execute(applicationsClaimList) {
|
||||
if (!applicationsClaimList || applicationsClaimList.length === 0)
|
||||
return { data: [], total: 0 };
|
||||
// Only return active applications whose applicationsClaim exists in provided list
|
||||
const res = await this.appRepo.find({ page: 1, limit: 1000, isActive: true, applicationsClaimIn: applicationsClaimList });
|
||||
// sort by displayOrder asc
|
||||
res.data.sort((a, b) => (a.displayOrder ?? 0) - (b.displayOrder ?? 0));
|
||||
return res;
|
||||
}
|
||||
};
|
||||
exports.GetMeApplicationsHandler = GetMeApplicationsHandler;
|
||||
exports.GetMeApplicationsHandler = GetMeApplicationsHandler = __decorate([
|
||||
(0, common_1.Injectable)(),
|
||||
__metadata("design:paramtypes", [application_interface_1.IApplication])
|
||||
], GetMeApplicationsHandler);
|
||||
//# sourceMappingURL=get-me-applications.handler.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"get-me-applications.handler.js","sourceRoot":"","sources":["../../../../../src/modules/application/application/handlers/get-me-applications.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,2FAA+E;AAGxE,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACN;IAA7B,YAA6B,OAAqB;QAArB,YAAO,GAAP,OAAO,CAAc;IAAG,CAAC;IAEtD,KAAK,CAAC,OAAO,CAAC,qBAAkD;QAC9D,IAAI,CAAC,qBAAqB,IAAI,qBAAqB,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;QAEhG,kFAAkF;QAClF,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,CAAC,CAAC;QAC1H,2BAA2B;QAC3B,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC,CAAC,CAAC;QACvE,OAAO,GAAG,CAAC;IACb,CAAC;CACF,CAAA;AAZY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;qCAE2B,oCAAY;GADvC,wBAAwB,CAYpC"}
|
||||
@@ -0,0 +1,38 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.UpdateApplicationHandler = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const application_interface_1 = require("../../domain/repositories/application.interface");
|
||||
const application_validator_1 = require("../../application/validators/application.validator");
|
||||
let UpdateApplicationHandler = class UpdateApplicationHandler {
|
||||
appRepo;
|
||||
validator;
|
||||
constructor(appRepo, validator) {
|
||||
this.appRepo = appRepo;
|
||||
this.validator = validator;
|
||||
}
|
||||
async execute(id, payload) {
|
||||
const existing = await this.appRepo.findById(id);
|
||||
if (!existing)
|
||||
throw new Error('Application not found');
|
||||
await this.validator.validateUpdate(id, payload);
|
||||
existing.update(payload);
|
||||
const updated = await this.appRepo.update(existing);
|
||||
return updated;
|
||||
}
|
||||
};
|
||||
exports.UpdateApplicationHandler = UpdateApplicationHandler;
|
||||
exports.UpdateApplicationHandler = UpdateApplicationHandler = __decorate([
|
||||
(0, common_1.Injectable)(),
|
||||
__metadata("design:paramtypes", [application_interface_1.IApplication, application_validator_1.ApplicationValidator])
|
||||
], UpdateApplicationHandler);
|
||||
//# sourceMappingURL=update-application.handler.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"update-application.handler.js","sourceRoot":"","sources":["../../../../../src/modules/application/application/handlers/update-application.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,2FAA+E;AAC/E,8FAA0F;AAGnF,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACN;IAAwC;IAArE,YAA6B,OAAqB,EAAmB,SAA+B;QAAvE,YAAO,GAAP,OAAO,CAAc;QAAmB,cAAS,GAAT,SAAS,CAAsB;IAAG,CAAC;IAExG,KAAK,CAAC,OAAO,CAAC,EAAU,EAAE,OAAY;QACpC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACjD,IAAI,CAAC,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAExD,MAAM,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAEjD,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACzB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACpD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF,CAAA;AAbY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;qCAE2B,oCAAY,EAA8B,4CAAoB;GADzF,wBAAwB,CAapC"}
|
||||
@@ -0,0 +1,84 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ApplicationValidator = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const application_interface_1 = require("../../domain/repositories/application.interface");
|
||||
let ApplicationValidator = class ApplicationValidator {
|
||||
appRepo;
|
||||
constructor(appRepo) {
|
||||
this.appRepo = appRepo;
|
||||
}
|
||||
async validateCreate(payload) {
|
||||
if (!payload || !payload.code)
|
||||
throw new common_1.BadRequestException('code is required');
|
||||
if (!payload.name)
|
||||
throw new common_1.BadRequestException('name is required');
|
||||
if (!payload.applicationsClaim)
|
||||
throw new common_1.BadRequestException('applicationsClaim is required');
|
||||
// url validation if provided
|
||||
if (payload.url) {
|
||||
try {
|
||||
// allow relative urls
|
||||
if (!payload.url.startsWith('/') && !payload.url.startsWith('http')) {
|
||||
throw new Error('invalid');
|
||||
}
|
||||
// new URL(payload.url) // avoid throwing for relative
|
||||
}
|
||||
catch (e) {
|
||||
throw new common_1.BadRequestException('invalid url');
|
||||
}
|
||||
}
|
||||
// displayOrder
|
||||
if (payload.displayOrder !== undefined && typeof payload.displayOrder !== 'number') {
|
||||
throw new common_1.BadRequestException('invalid displayOrder');
|
||||
}
|
||||
// unique code
|
||||
const byCode = await this.appRepo.findByCode(payload.code);
|
||||
if (byCode)
|
||||
throw new common_1.BadRequestException('duplicate code');
|
||||
const byClaim = await this.appRepo.findByApplicationsClaim(payload.applicationsClaim);
|
||||
if (byClaim)
|
||||
throw new common_1.BadRequestException('duplicate applicationsClaim');
|
||||
}
|
||||
async validateUpdate(id, payload) {
|
||||
if (!payload)
|
||||
return;
|
||||
if (payload.url) {
|
||||
try {
|
||||
if (!payload.url.startsWith('/') && !payload.url.startsWith('http'))
|
||||
throw new Error('invalid');
|
||||
}
|
||||
catch (e) {
|
||||
throw new common_1.BadRequestException('invalid url');
|
||||
}
|
||||
}
|
||||
if (payload.displayOrder !== undefined && typeof payload.displayOrder !== 'number') {
|
||||
throw new common_1.BadRequestException('invalid displayOrder');
|
||||
}
|
||||
if (payload.code) {
|
||||
const existing = await this.appRepo.findByCode(payload.code);
|
||||
if (existing && existing.id !== id)
|
||||
throw new common_1.BadRequestException('duplicate code');
|
||||
}
|
||||
if (payload.applicationsClaim) {
|
||||
const existing = await this.appRepo.findByApplicationsClaim(payload.applicationsClaim);
|
||||
if (existing && existing.id !== id)
|
||||
throw new common_1.BadRequestException('duplicate applicationsClaim');
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.ApplicationValidator = ApplicationValidator;
|
||||
exports.ApplicationValidator = ApplicationValidator = __decorate([
|
||||
(0, common_1.Injectable)(),
|
||||
__metadata("design:paramtypes", [application_interface_1.IApplication])
|
||||
], ApplicationValidator);
|
||||
//# sourceMappingURL=application.validator.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"application.validator.js","sourceRoot":"","sources":["../../../../../src/modules/application/application/validators/application.validator.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiE;AACjE,2FAA+E;AAGxE,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IACF;IAA7B,YAA6B,OAAqB;QAArB,YAAO,GAAP,OAAO,CAAc;IAAG,CAAC;IAEtD,KAAK,CAAC,cAAc,CAAC,OAAY;QAC/B,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI;YAAE,MAAM,IAAI,4BAAmB,CAAC,kBAAkB,CAAC,CAAC;QACjF,IAAI,CAAC,OAAO,CAAC,IAAI;YAAE,MAAM,IAAI,4BAAmB,CAAC,kBAAkB,CAAC,CAAC;QACrE,IAAI,CAAC,OAAO,CAAC,iBAAiB;YAAE,MAAM,IAAI,4BAAmB,CAAC,+BAA+B,CAAC,CAAC;QAE/F,6BAA6B;QAC7B,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;YAChB,IAAI,CAAC;gBACH,sBAAsB;gBACtB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;oBACpE,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC;gBAC7B,CAAC;gBACD,sDAAsD;YACxD,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,MAAM,IAAI,4BAAmB,CAAC,aAAa,CAAC,CAAC;YAC/C,CAAC;QACH,CAAC;QAED,eAAe;QACf,IAAI,OAAO,CAAC,YAAY,KAAK,SAAS,IAAI,OAAO,OAAO,CAAC,YAAY,KAAK,QAAQ,EAAE,CAAC;YACnF,MAAM,IAAI,4BAAmB,CAAC,sBAAsB,CAAC,CAAC;QACxD,CAAC;QAED,cAAc;QACd,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO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GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;YACvF,IAAI,QAAQ,IAAI,QAAQ,CAAC,EAAE,KAAK,EAAE;gBAAE,MAAM,IAAI,4BAAmB,CAAC,6BAA6B,CAAC,CAAC;QACnG,CAAC;IACH,CAAC;CACF,CAAA;AA3DY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAE2B,oCAAY;GADvC,oBAAoB,CA2DhC"}
|
||||
@@ -0,0 +1,67 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ApplicationData = void 0;
|
||||
class ApplicationData {
|
||||
id;
|
||||
code;
|
||||
name;
|
||||
description;
|
||||
icon;
|
||||
url;
|
||||
applicationsClaim;
|
||||
isActive;
|
||||
displayOrder;
|
||||
createdAt;
|
||||
updatedAt;
|
||||
constructor(id, code, name, description, icon, url, applicationsClaim, isActive, displayOrder, createdAt, updatedAt) {
|
||||
this.id = id;
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.icon = icon;
|
||||
this.url = url;
|
||||
this.applicationsClaim = applicationsClaim;
|
||||
this.isActive = isActive;
|
||||
this.displayOrder = displayOrder;
|
||||
this.createdAt = createdAt;
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
static create(data) {
|
||||
return new ApplicationData(crypto.randomUUID(), data.code, data.name, data.description ?? null, data.icon ?? null, data.url ?? null, data.applicationsClaim, true, data.displayOrder ?? 0, new Date(), new Date());
|
||||
}
|
||||
static restore(props) {
|
||||
return new ApplicationData(props.id, props.code, props.name, props.description ?? null, props.icon ?? null, props.url ?? null, props.applicationsClaim, props.isActive !== undefined ? props.isActive : true, props.displayOrder ?? 0, props.createdAt ?? null, props.updatedAt ?? null);
|
||||
}
|
||||
update(data) {
|
||||
if (data.code !== undefined)
|
||||
this.code = data.code;
|
||||
if (data.name !== undefined)
|
||||
this.name = data.name;
|
||||
if (data.description !== undefined)
|
||||
this.description = data.description;
|
||||
if (data.icon !== undefined)
|
||||
this.icon = data.icon;
|
||||
if (data.url !== undefined)
|
||||
this.url = data.url;
|
||||
if (data.applicationsClaim !== undefined)
|
||||
this.applicationsClaim = data.applicationsClaim;
|
||||
if (data.isActive !== undefined)
|
||||
this.isActive = data.isActive;
|
||||
if (data.displayOrder !== undefined)
|
||||
this.displayOrder = data.displayOrder;
|
||||
this.updatedAt = new Date();
|
||||
}
|
||||
toResponse() {
|
||||
return {
|
||||
id: this.id,
|
||||
code: this.code,
|
||||
name: this.name,
|
||||
description: this.description,
|
||||
icon: this.icon,
|
||||
url: this.url,
|
||||
displayOrder: this.displayOrder,
|
||||
};
|
||||
}
|
||||
}
|
||||
exports.ApplicationData = ApplicationData;
|
||||
//# sourceMappingURL=application.entity.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"application.entity.js","sourceRoot":"","sources":["../../../../../src/modules/application/domain/entities/application.entity.ts"],"names":[],"mappings":";;;AAAA,MAAa,eAAe;IAER;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAXT,YACkB,EAAU,EACnB,IAAY,EACZ,IAAY,EACZ,WAA0B,EAC1B,IAAmB,EACnB,GAAkB,EAClB,iBAAyB,EACzB,QAAiB,EACjB,YAAoB,EACpB,SAAsB,EACtB,SAAsB;QAVb,OAAE,GAAF,EAAE,CAAQ;QACnB,SAAI,GAAJ,IAAI,CAAQ;QACZ,SAAI,GAAJ,IAAI,CAAQ;QACZ,gBAAW,GAAX,WAAW,CAAe;QAC1B,SAAI,GAAJ,IAAI,CAAe;QACnB,QAAG,GAAH,GAAG,CAAe;QAClB,sBAAiB,GAAjB,iBAAiB,CAAQ;QACzB,aAAQ,GAAR,QAAQ,CAAS;QACjB,iBAAY,GAAZ,YAAY,CAAQ;QACpB,cAAS,GAAT,SAAS,CAAa;QACtB,cAAS,GAAT,SAAS,CAAa;IAC5B,CAAC;IAEJ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,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACnD,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS;YAAE,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;QAChD,IAAI,IAAI,CAAC,iBAAiB,KAAK,SAAS;YAAE,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC;QAC1F,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS;YAAE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/D,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS;YAAE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QAC3E,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;IAC9B,CAAC;IAED,UAAU;QACR,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC;IACJ,CAAC;CACF;AAnGD,0CAmGC"}
|
||||
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.IApplication = void 0;
|
||||
class IApplication {
|
||||
}
|
||||
exports.IApplication = IApplication;
|
||||
//# sourceMappingURL=application.interface.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"application.interface.js","sourceRoot":"","sources":["../../../../../src/modules/application/domain/repositories/application.interface.ts"],"names":[],"mappings":";;;AAEA,MAAsB,YAAY;CASjC;AATD,oCASC"}
|
||||
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.PrismaApplicationMapper = void 0;
|
||||
const application_entity_1 = require("../../domain/entities/application.entity");
|
||||
class PrismaApplicationMapper {
|
||||
static toDomain(model) {
|
||||
return application_entity_1.ApplicationData.restore({
|
||||
id: model.id,
|
||||
code: model.code,
|
||||
name: model.name,
|
||||
description: model.description,
|
||||
icon: model.icon,
|
||||
url: model.url,
|
||||
applicationsClaim: model.applicationsClaim,
|
||||
isActive: model.isActive,
|
||||
displayOrder: model.displayOrder,
|
||||
createdAt: model.createdAt,
|
||||
updatedAt: model.updatedAt,
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.PrismaApplicationMapper = PrismaApplicationMapper;
|
||||
//# sourceMappingURL=prisma-application.mapper.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"prisma-application.mapper.js","sourceRoot":"","sources":["../../../../../src/modules/application/infrastructure/mappers/prisma-application.mapper.ts"],"names":[],"mappings":";;;AAAA,iFAA2E;AAE3E,MAAa,uBAAuB;IAClC,MAAM,CAAC,QAAQ,CAAC,KAAU;QACxB,OAAO,oCAAe,CAAC,OAAO,CAAC;YAC7B,EAAE,EAAE,KAAK,CAAC,EAAE;YACZ,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,GAAG,EAAE,KAAK,CAAC,GAAG;YACd,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;YAC1C,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,YAAY,EAAE,KAAK,CAAC,YAAY;YAChC,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,SAAS,EAAE,KAAK,CAAC,SAAS;SAC3B,CAAC,CAAC;IACL,CAAC;CACF;AAhBD,0DAgBC"}
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.PrismaApplicationRepository = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const prisma_service_1 = require("../../../../shared/prisma.service");
|
||||
const prisma_application_mapper_1 = require("../mappers/prisma-application.mapper");
|
||||
let PrismaApplicationRepository = class PrismaApplicationRepository {
|
||||
prisma;
|
||||
constructor(prisma) {
|
||||
this.prisma = prisma;
|
||||
}
|
||||
async find(params) {
|
||||
const page = params.page && params.page > 0 ? params.page : 1;
|
||||
const limit = params.limit && params.limit > 0 ? params.limit : 25;
|
||||
const where = {};
|
||||
if (params.search) {
|
||||
where.OR = [
|
||||
{ name: { contains: params.search, mode: 'insensitive' } },
|
||||
{ code: { contains: params.search, mode: 'insensitive' } },
|
||||
{ description: { contains: params.search, mode: 'insensitive' } },
|
||||
];
|
||||
}
|
||||
if (params.isActive !== undefined && params.isActive !== null) {
|
||||
where.isActive = params.isActive;
|
||||
}
|
||||
if (params.applicationsClaimIn && params.applicationsClaimIn.length > 0) {
|
||||
where.applicationsClaim = { in: params.applicationsClaimIn };
|
||||
}
|
||||
const [total, items] = await Promise.all([
|
||||
this.prisma.application.count({ where }),
|
||||
this.prisma.application.findMany({ where, skip: (page - 1) * limit, take: limit, orderBy: { displayOrder: 'asc', createdAt: 'asc' } }),
|
||||
]);
|
||||
return { data: items.map(i => prisma_application_mapper_1.PrismaApplicationMapper.toDomain(i)), total };
|
||||
}
|
||||
async findById(id) {
|
||||
const row = await this.prisma.application.findUnique({ where: { id } });
|
||||
if (!row)
|
||||
throw new Error('Application not found');
|
||||
return prisma_application_mapper_1.PrismaApplicationMapper.toDomain(row);
|
||||
}
|
||||
async findByCode(code) {
|
||||
const row = await this.prisma.application.findUnique({ where: { code } });
|
||||
if (!row)
|
||||
return null;
|
||||
return prisma_application_mapper_1.PrismaApplicationMapper.toDomain(row);
|
||||
}
|
||||
async findByApplicationsClaim(claim) {
|
||||
const row = await this.prisma.application.findUnique({ where: { applicationsClaim: claim } });
|
||||
if (!row)
|
||||
return null;
|
||||
return prisma_application_mapper_1.PrismaApplicationMapper.toDomain(row);
|
||||
}
|
||||
async create(app) {
|
||||
const created = await this.prisma.application.create({ data: {
|
||||
id: app.id,
|
||||
code: app.code,
|
||||
name: app.name,
|
||||
description: app.description,
|
||||
icon: app.icon,
|
||||
url: app.url,
|
||||
applicationsClaim: app.applicationsClaim,
|
||||
isActive: app.isActive,
|
||||
displayOrder: app.displayOrder,
|
||||
} });
|
||||
return prisma_application_mapper_1.PrismaApplicationMapper.toDomain(created);
|
||||
}
|
||||
async update(app) {
|
||||
const updated = await this.prisma.application.update({ where: { id: app.id }, data: {
|
||||
code: app.code,
|
||||
name: app.name,
|
||||
description: app.description,
|
||||
icon: app.icon,
|
||||
url: app.url,
|
||||
applicationsClaim: app.applicationsClaim,
|
||||
isActive: app.isActive,
|
||||
displayOrder: app.displayOrder,
|
||||
} });
|
||||
return prisma_application_mapper_1.PrismaApplicationMapper.toDomain(updated);
|
||||
}
|
||||
async delete(appId) {
|
||||
await this.prisma.application.delete({ where: { id: appId } });
|
||||
}
|
||||
};
|
||||
exports.PrismaApplicationRepository = PrismaApplicationRepository;
|
||||
exports.PrismaApplicationRepository = PrismaApplicationRepository = __decorate([
|
||||
(0, common_1.Injectable)(),
|
||||
__metadata("design:paramtypes", [prisma_service_1.PrismaService])
|
||||
], PrismaApplicationRepository);
|
||||
//# sourceMappingURL=prisma-application.repository.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"prisma-application.repository.js","sourceRoot":"","sources":["../../../../../src/modules/application/infrastructure/repositories/prisma-application.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,sEAAkE;AAElE,oFAA+E;AAIxE,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IACT;IAA7B,YAA6B,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAEtD,KAAK,CAAC,IAAI,CAAC,MAAmI;QAC5I,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9D,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QAEnE,MAAM,KAAK,GAAQ,EAAE,CAAC;QACtB,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YAClB,KAAK,CAAC,EAAE,GAAG;gBACT,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE;gBAC1D,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE;gBAC1D,EAAE,WAAW,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE;aAClE,CAAC;QACJ,CAAC;QAED,IAAI,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;YAC9D,KAAK,CAAC,QAAQ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IAAI,EAAE;gBAClF,IAAI,EAAE,GAAG,CAAC,IAAI;gBACd,IAAI,EAAE,GAAG,CAAC,IAAI;gBACd,WAAW,EAAE,GAAG,CAAC,WAAW;gBAC5B,IAAI,EAAE,GAAG,CAAC,IAAI;gBACd,GAAG,EAAE,GAAG,CAAC,GAAG;gBACZ,iBAAiB,EAAE,GAAG,CAAC,iBAAiB;gBACxC,QAAQ,EAAE,GAAG,CAAC,QAAQ;gBACtB,YAAY,EAAE,GAAG,CAAC,YAAY;aAC/B,EAAE,CAAC,CAAC;QAEL,OAAO,mDAAuB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACnD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,KAAa;QACxB,MAAM,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;IACjE,CAAC;CACF,CAAA;AApFY,kEAA2B;sCAA3B,2BAA2B;IADvC,IAAA,mBAAU,GAAE;qCAE0B,8BAAa;GADvC,2BAA2B,CAoFvC"}
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ApplicationsController = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const swagger_1 = require("@nestjs/swagger");
|
||||
const jwt_auth_guard_1 = require("../../../../core/auth/guards/jwt-auth.guard");
|
||||
const current_user_guard_1 = require("../../../identity/presentation/guards/current-user.guard");
|
||||
const get_applications_handler_1 = require("../../application/handlers/get-applications.handler");
|
||||
const get_application_handler_1 = require("../../application/handlers/get-application.handler");
|
||||
const create_application_handler_1 = require("../../application/handlers/create-application.handler");
|
||||
const update_application_handler_1 = require("../../application/handlers/update-application.handler");
|
||||
const delete_application_handler_1 = require("../../application/handlers/delete-application.handler");
|
||||
const get_me_applications_handler_1 = require("../../application/handlers/get-me-applications.handler");
|
||||
let ApplicationsController = class ApplicationsController {
|
||||
getApplicationsHandler;
|
||||
getApplicationHandler;
|
||||
createApplicationHandler;
|
||||
updateApplicationHandler;
|
||||
deleteApplicationHandler;
|
||||
getMeApplicationsHandler;
|
||||
constructor(getApplicationsHandler, getApplicationHandler, createApplicationHandler, updateApplicationHandler, deleteApplicationHandler, getMeApplicationsHandler) {
|
||||
this.getApplicationsHandler = getApplicationsHandler;
|
||||
this.getApplicationHandler = getApplicationHandler;
|
||||
this.createApplicationHandler = createApplicationHandler;
|
||||
this.updateApplicationHandler = updateApplicationHandler;
|
||||
this.deleteApplicationHandler = deleteApplicationHandler;
|
||||
this.getMeApplicationsHandler = getMeApplicationsHandler;
|
||||
}
|
||||
async findAll(query) {
|
||||
const res = await this.getApplicationsHandler.execute({ page: query.page, limit: query.limit, search: query.search });
|
||||
return { success: true, data: res.data.map(a => a.toResponse ? a.toResponse() : a), meta: { total: res.total } };
|
||||
}
|
||||
async findOne(id) {
|
||||
const app = await this.getApplicationHandler.execute(id);
|
||||
return { success: true, data: app.toResponse(), meta: {} };
|
||||
}
|
||||
async create(body) {
|
||||
const created = await this.createApplicationHandler.execute(body);
|
||||
return { success: true, data: created.toResponse(), meta: {} };
|
||||
}
|
||||
async update(id, body) {
|
||||
const updated = await this.updateApplicationHandler.execute(id, body);
|
||||
return { success: true, data: updated.toResponse(), meta: {} };
|
||||
}
|
||||
async remove(id) {
|
||||
await this.deleteApplicationHandler.execute(id);
|
||||
return { success: true, data: null, meta: {} };
|
||||
}
|
||||
// Dashboard endpoint
|
||||
async me(req) {
|
||||
const ctx = req.raylabContext;
|
||||
const identity = ctx && ctx.identity ? ctx.identity : {};
|
||||
const applicationsClaimList = identity.applications || [];
|
||||
const res = await this.getMeApplicationsHandler.execute(applicationsClaimList);
|
||||
return { success: true, data: res.data.map(a => a.toResponse ? a.toResponse() : a), meta: { total: res.total } };
|
||||
}
|
||||
};
|
||||
exports.ApplicationsController = ApplicationsController;
|
||||
__decorate([
|
||||
(0, common_1.Get)('applications'),
|
||||
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard, current_user_guard_1.CurrentUserGuard),
|
||||
(0, swagger_1.ApiOperation)({ summary: 'List applications' }),
|
||||
__param(0, (0, common_1.Query)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], ApplicationsController.prototype, "findAll", null);
|
||||
__decorate([
|
||||
(0, common_1.Get)('applications/:id'),
|
||||
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard, current_user_guard_1.CurrentUserGuard),
|
||||
(0, swagger_1.ApiOperation)({ summary: 'Get application by id' }),
|
||||
__param(0, (0, common_1.Param)('id')),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [String]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], ApplicationsController.prototype, "findOne", null);
|
||||
__decorate([
|
||||
(0, common_1.Post)('applications'),
|
||||
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard, current_user_guard_1.CurrentUserGuard),
|
||||
(0, swagger_1.ApiOperation)({ summary: 'Create application' }),
|
||||
__param(0, (0, common_1.Body)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], ApplicationsController.prototype, "create", null);
|
||||
__decorate([
|
||||
(0, common_1.Patch)('applications/:id'),
|
||||
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard, current_user_guard_1.CurrentUserGuard),
|
||||
(0, swagger_1.ApiOperation)({ summary: 'Update application' }),
|
||||
__param(0, (0, common_1.Param)('id')),
|
||||
__param(1, (0, common_1.Body)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [String, Object]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], ApplicationsController.prototype, "update", null);
|
||||
__decorate([
|
||||
(0, common_1.Delete)('applications/:id'),
|
||||
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard, current_user_guard_1.CurrentUserGuard),
|
||||
(0, swagger_1.ApiOperation)({ summary: 'Delete application' }),
|
||||
__param(0, (0, common_1.Param)('id')),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [String]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], ApplicationsController.prototype, "remove", null);
|
||||
__decorate([
|
||||
(0, common_1.Get)('me/applications'),
|
||||
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard, current_user_guard_1.CurrentUserGuard),
|
||||
(0, swagger_1.ApiOperation)({ summary: "Get current user's applications (filtered by Authentik claims)" }),
|
||||
__param(0, (0, common_1.Req)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], ApplicationsController.prototype, "me", null);
|
||||
exports.ApplicationsController = ApplicationsController = __decorate([
|
||||
(0, swagger_1.ApiTags)('Applications'),
|
||||
(0, common_1.Controller)(),
|
||||
__metadata("design:paramtypes", [get_applications_handler_1.GetApplicationsHandler,
|
||||
get_application_handler_1.GetApplicationHandler,
|
||||
create_application_handler_1.CreateApplicationHandler,
|
||||
update_application_handler_1.UpdateApplicationHandler,
|
||||
delete_application_handler_1.DeleteApplicationHandler,
|
||||
get_me_applications_handler_1.GetMeApplicationsHandler])
|
||||
], ApplicationsController);
|
||||
//# sourceMappingURL=applications.controller.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"applications.controller.js","sourceRoot":"","sources":["../../../../../src/modules/application/presentation/controllers/applications.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA0G;AAC1G,6CAAwD;AACxD,gFAA2E;AAC3E,iGAA4F;AAC5F,kGAA6F;AAC7F,gGAA2F;AAC3F,sGAAiG;AACjG,sGAAiG;AACjG,sGAAiG;AACjG,wGAAkG;AAI3F,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAEd;IACA;IACA;IACA;IACA;IACA;IANnB,YACmB,sBAA8C,EAC9C,qBAA4C,EAC5C,wBAAkD,EAClD,wBAAkD,EAClD,wBAAkD,EAClD,wBAAkD;QALlD,2BAAsB,GAAtB,sBAAsB,CAAwB;QAC9C,0BAAqB,GAArB,qBAAqB,CAAuB;QAC5C,6BAAwB,GAAxB,wBAAwB,CAA0B;QAClD,6BAAwB,GAAxB,wBAAwB,CAA0B;QAClD,6BAAwB,GAAxB,wBAAwB,CAA0B;QAClD,6BAAwB,GAAxB,wBAAwB,CAA0B;IAClE,CAAC;IAKE,AAAN,KAAK,CAAC,OAAO,CAAU,KAAU;QAC/B,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;QACtH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CA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