Initial commit - Event Planner application
This commit is contained in:
9
dist/todo/api/todo.controller.d.ts
vendored
Normal file
9
dist/todo/api/todo.controller.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { TodoService } from '../services/todo.service';
|
||||
export declare class TodoController {
|
||||
private readonly todoService;
|
||||
constructor(todoService: TodoService);
|
||||
createTodo(tenantId: string, dto: any): Promise<import("../entities/todo.entity").TodoItem>;
|
||||
listTodos(tenantId: string): Promise<import("../entities/todo.entity").TodoItem[]>;
|
||||
completeTodo(tenantId: string, id: string): Promise<import("../entities/todo.entity").TodoItem | null>;
|
||||
}
|
||||
//# sourceMappingURL=todo.controller.d.ts.map
|
||||
1
dist/todo/api/todo.controller.d.ts.map
vendored
Normal file
1
dist/todo/api/todo.controller.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"todo.controller.d.ts","sourceRoot":"","sources":["../../../src/todo/api/todo.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,qBACa,cAAc;IACb,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,WAAW;IAG/C,UAAU,CACU,QAAQ,EAAE,MAAM,EAChC,GAAG,EAAE,GAAG;IAMZ,SAAS,CAAyB,QAAQ,EAAE,MAAM;IAKlD,YAAY,CACQ,QAAQ,EAAE,MAAM,EAC3B,EAAE,EAAE,MAAM;CAI1B"}
|
||||
59
dist/todo/api/todo.controller.js
vendored
Normal file
59
dist/todo/api/todo.controller.js
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
"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.TodoController = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const todo_service_1 = require("../services/todo.service");
|
||||
let TodoController = class TodoController {
|
||||
constructor(todoService) {
|
||||
this.todoService = todoService;
|
||||
}
|
||||
async createTodo(tenantId, dto) {
|
||||
return this.todoService.createTodo(tenantId, dto);
|
||||
}
|
||||
async listTodos(tenantId) {
|
||||
return this.todoService.listTodos(tenantId);
|
||||
}
|
||||
async completeTodo(tenantId, id) {
|
||||
return this.todoService.markComplete(tenantId, id);
|
||||
}
|
||||
};
|
||||
exports.TodoController = TodoController;
|
||||
__decorate([
|
||||
(0, common_1.Post)(),
|
||||
__param(0, (0, common_1.Headers)('x-tenant-id')),
|
||||
__param(1, (0, common_1.Body)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [String, Object]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], TodoController.prototype, "createTodo", null);
|
||||
__decorate([
|
||||
(0, common_1.Get)(),
|
||||
__param(0, (0, common_1.Headers)('x-tenant-id')),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [String]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], TodoController.prototype, "listTodos", null);
|
||||
__decorate([
|
||||
(0, common_1.Patch)(':id/complete'),
|
||||
__param(0, (0, common_1.Headers)('x-tenant-id')),
|
||||
__param(1, (0, common_1.Param)('id')),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [String, String]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], TodoController.prototype, "completeTodo", null);
|
||||
exports.TodoController = TodoController = __decorate([
|
||||
(0, common_1.Controller)('todo'),
|
||||
__metadata("design:paramtypes", [todo_service_1.TodoService])
|
||||
], TodoController);
|
||||
10
dist/todo/entities/todo.entity.d.ts
vendored
Normal file
10
dist/todo/entities/todo.entity.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { EntitySchema } from '@mikro-orm/core';
|
||||
import { BaseEntity } from '../../core/entities/base.entity';
|
||||
export declare class TodoItem extends BaseEntity {
|
||||
title: string;
|
||||
description?: string;
|
||||
completed: boolean;
|
||||
dueDate?: Date;
|
||||
}
|
||||
export declare const TodoItemSchema: EntitySchema<TodoItem, never, import("@mikro-orm/core").EntityCtor<TodoItem>>;
|
||||
//# sourceMappingURL=todo.entity.d.ts.map
|
||||
1
dist/todo/entities/todo.entity.d.ts.map
vendored
Normal file
1
dist/todo/entities/todo.entity.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"todo.entity.d.ts","sourceRoot":"","sources":["../../../src/todo/entities/todo.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE7D,qBAAa,QAAS,SAAQ,UAAU;IACtC,KAAK,EAAG,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAS;IAC3B,OAAO,CAAC,EAAE,IAAI,CAAC;CAChB;AAED,eAAO,MAAM,cAAc,+EAezB,CAAC"}
|
||||
27
dist/todo/entities/todo.entity.js
vendored
Normal file
27
dist/todo/entities/todo.entity.js
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.TodoItemSchema = exports.TodoItem = void 0;
|
||||
const core_1 = require("@mikro-orm/core");
|
||||
const base_entity_1 = require("../../core/entities/base.entity");
|
||||
class TodoItem extends base_entity_1.BaseEntity {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.completed = false;
|
||||
}
|
||||
}
|
||||
exports.TodoItem = TodoItem;
|
||||
exports.TodoItemSchema = new core_1.EntitySchema({
|
||||
class: TodoItem,
|
||||
tableName: 'todo_items',
|
||||
properties: {
|
||||
id: { type: 'uuid', primary: true },
|
||||
tenantId: { type: 'string' },
|
||||
metadata: { type: 'json', nullable: true },
|
||||
createdAt: { type: 'date', defaultRaw: 'now()' },
|
||||
updatedAt: { type: 'date', defaultRaw: 'now()' },
|
||||
title: { type: 'string' },
|
||||
description: { type: 'text', nullable: true },
|
||||
completed: { type: 'boolean', default: false },
|
||||
dueDate: { type: 'date', nullable: true },
|
||||
},
|
||||
});
|
||||
13
dist/todo/services/todo.service.d.ts
vendored
Normal file
13
dist/todo/services/todo.service.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { MikroORM } from '@mikro-orm/core';
|
||||
import { EventEmitter2 } from '@nestjs/event-emitter';
|
||||
import { TodoItem } from '../entities/todo.entity';
|
||||
export declare class TodoService {
|
||||
private readonly orm;
|
||||
private readonly eventEmitter;
|
||||
constructor(orm: MikroORM, eventEmitter: EventEmitter2);
|
||||
private get em();
|
||||
createTodo(tenantId: string, dto: Partial<TodoItem>): Promise<TodoItem>;
|
||||
listTodos(tenantId: string): Promise<TodoItem[]>;
|
||||
markComplete(tenantId: string, id: string): Promise<TodoItem | null>;
|
||||
}
|
||||
//# sourceMappingURL=todo.service.d.ts.map
|
||||
1
dist/todo/services/todo.service.d.ts.map
vendored
Normal file
1
dist/todo/services/todo.service.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"todo.service.d.ts","sourceRoot":"","sources":["../../../src/todo/services/todo.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEnD,qBACa,WAAW;IAEpB,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBADZ,GAAG,EAAE,QAAQ,EACb,YAAY,EAAE,aAAa;IAG9C,OAAO,KAAK,EAAE,GAEb;IAEK,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC;IAWvE,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAIhD,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;CAS3E"}
|
||||
54
dist/todo/services/todo.service.js
vendored
Normal file
54
dist/todo/services/todo.service.js
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
"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.TodoService = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const core_1 = require("@mikro-orm/core");
|
||||
const event_emitter_1 = require("@nestjs/event-emitter");
|
||||
const todo_entity_1 = require("../entities/todo.entity");
|
||||
let TodoService = class TodoService {
|
||||
constructor(orm, eventEmitter) {
|
||||
this.orm = orm;
|
||||
this.eventEmitter = eventEmitter;
|
||||
}
|
||||
get em() {
|
||||
return this.orm.em.fork();
|
||||
}
|
||||
async createTodo(tenantId, dto) {
|
||||
const todo = this.em.create(todo_entity_1.TodoItem, {
|
||||
tenantId,
|
||||
...dto,
|
||||
});
|
||||
this.em.persist(todo);
|
||||
await this.em.flush();
|
||||
this.eventEmitter.emit('todo.created', { todo });
|
||||
return todo;
|
||||
}
|
||||
async listTodos(tenantId) {
|
||||
return this.em.find(todo_entity_1.TodoItem, { tenantId });
|
||||
}
|
||||
async markComplete(tenantId, id) {
|
||||
const todo = await this.em.findOne(todo_entity_1.TodoItem, { tenantId, id });
|
||||
if (!todo)
|
||||
return null;
|
||||
todo.completed = true;
|
||||
this.em.persist(todo);
|
||||
await this.em.flush();
|
||||
this.eventEmitter.emit('todo.completed', { todo });
|
||||
return todo;
|
||||
}
|
||||
};
|
||||
exports.TodoService = TodoService;
|
||||
exports.TodoService = TodoService = __decorate([
|
||||
(0, common_1.Injectable)(),
|
||||
__metadata("design:paramtypes", [core_1.MikroORM,
|
||||
event_emitter_1.EventEmitter2])
|
||||
], TodoService);
|
||||
10
dist/todo/subscribers/todo.subscriber.d.ts
vendored
Normal file
10
dist/todo/subscribers/todo.subscriber.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { NotificationService } from '../../core/services/notification.service';
|
||||
import { NotificationRuleService } from '../../core/services/notification-rule.service';
|
||||
export declare class TodoSubscriber {
|
||||
private readonly notificationService;
|
||||
private readonly notificationRuleService;
|
||||
constructor(notificationService: NotificationService, notificationRuleService: NotificationRuleService);
|
||||
handleTodoCreated(payload: any): Promise<void>;
|
||||
handleTodoCompleted(payload: any): Promise<void>;
|
||||
}
|
||||
//# sourceMappingURL=todo.subscriber.d.ts.map
|
||||
1
dist/todo/subscribers/todo.subscriber.d.ts.map
vendored
Normal file
1
dist/todo/subscribers/todo.subscriber.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"todo.subscriber.d.ts","sourceRoot":"","sources":["../../../src/todo/subscribers/todo.subscriber.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AAExF,qBACa,cAAc;IAEvB,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,uBAAuB;gBADvB,mBAAmB,EAAE,mBAAmB,EACxC,uBAAuB,EAAE,uBAAuB;IAI7D,iBAAiB,CAAC,OAAO,EAAE,GAAG;IAgB9B,mBAAmB,CAAC,OAAO,EAAE,GAAG;CAcvC"}
|
||||
58
dist/todo/subscribers/todo.subscriber.js
vendored
Normal file
58
dist/todo/subscribers/todo.subscriber.js
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
"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.TodoSubscriber = void 0;
|
||||
const event_emitter_1 = require("@nestjs/event-emitter");
|
||||
const common_1 = require("@nestjs/common");
|
||||
const notification_service_1 = require("../../core/services/notification.service");
|
||||
const notification_rule_service_1 = require("../../core/services/notification-rule.service");
|
||||
let TodoSubscriber = class TodoSubscriber {
|
||||
constructor(notificationService, notificationRuleService) {
|
||||
this.notificationService = notificationService;
|
||||
this.notificationRuleService = notificationRuleService;
|
||||
}
|
||||
async handleTodoCreated(payload) {
|
||||
const { todo } = payload;
|
||||
const rules = await this.notificationRuleService.getRulesForEvent(todo.tenantId, 'todo', 'todo.created');
|
||||
for (const rule of rules) {
|
||||
for (const channel of rule.channels) {
|
||||
await this.notificationService.send(channel, todo.metadata?.notifyTo || '', 'Nueva tarea creada', `Se creó la tarea: ${todo.title}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
async handleTodoCompleted(payload) {
|
||||
const { todo } = payload;
|
||||
const rules = await this.notificationRuleService.getRulesForEvent(todo.tenantId, 'todo', 'todo.completed');
|
||||
for (const rule of rules) {
|
||||
for (const channel of rule.channels) {
|
||||
await this.notificationService.send(channel, todo.metadata?.notifyTo || '', 'Tarea completada', `La tarea "${todo.title}" se ha marcado como completada.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.TodoSubscriber = TodoSubscriber;
|
||||
__decorate([
|
||||
(0, event_emitter_1.OnEvent)('todo.created'),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], TodoSubscriber.prototype, "handleTodoCreated", null);
|
||||
__decorate([
|
||||
(0, event_emitter_1.OnEvent)('todo.completed'),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], TodoSubscriber.prototype, "handleTodoCompleted", null);
|
||||
exports.TodoSubscriber = TodoSubscriber = __decorate([
|
||||
(0, common_1.Injectable)(),
|
||||
__metadata("design:paramtypes", [notification_service_1.NotificationService,
|
||||
notification_rule_service_1.NotificationRuleService])
|
||||
], TodoSubscriber);
|
||||
3
dist/todo/todo.module.d.ts
vendored
Normal file
3
dist/todo/todo.module.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export declare class TodoModule {
|
||||
}
|
||||
//# sourceMappingURL=todo.module.d.ts.map
|
||||
1
dist/todo/todo.module.d.ts.map
vendored
Normal file
1
dist/todo/todo.module.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"todo.module.d.ts","sourceRoot":"","sources":["../../src/todo/todo.module.ts"],"names":[],"mappings":"AASA,qBAMa,UAAU;CAAG"}
|
||||
28
dist/todo/todo.module.js
vendored
Normal file
28
dist/todo/todo.module.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
"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.TodoModule = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const nestjs_1 = require("@mikro-orm/nestjs");
|
||||
const core_module_1 = require("../core/core.module");
|
||||
const todo_service_1 = require("./services/todo.service");
|
||||
const todo_controller_1 = require("./api/todo.controller");
|
||||
const todo_subscriber_1 = require("./subscribers/todo.subscriber");
|
||||
const todo_entity_1 = require("./entities/todo.entity");
|
||||
const todo_registration_1 = require("./todo.registration");
|
||||
let TodoModule = class TodoModule {
|
||||
};
|
||||
exports.TodoModule = TodoModule;
|
||||
exports.TodoModule = TodoModule = __decorate([
|
||||
(0, common_1.Module)({
|
||||
imports: [core_module_1.CoreModule, nestjs_1.MikroOrmModule.forFeature({ entities: [todo_entity_1.TodoItemSchema] })],
|
||||
providers: [todo_service_1.TodoService, todo_subscriber_1.TodoSubscriber, todo_registration_1.TodoModuleRegistration],
|
||||
controllers: [todo_controller_1.TodoController],
|
||||
exports: [todo_service_1.TodoService],
|
||||
})
|
||||
], TodoModule);
|
||||
8
dist/todo/todo.registration.d.ts
vendored
Normal file
8
dist/todo/todo.registration.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { OnModuleInit } from '@nestjs/common';
|
||||
import { ModuleRegistryService } from '../core/services/module-registry.service';
|
||||
export declare class TodoModuleRegistration implements OnModuleInit {
|
||||
private readonly moduleRegistry;
|
||||
constructor(moduleRegistry: ModuleRegistryService);
|
||||
onModuleInit(): void;
|
||||
}
|
||||
//# sourceMappingURL=todo.registration.d.ts.map
|
||||
1
dist/todo/todo.registration.d.ts.map
vendored
Normal file
1
dist/todo/todo.registration.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"todo.registration.d.ts","sourceRoot":"","sources":["../../src/todo/todo.registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,qBACa,sBAAuB,YAAW,YAAY;IAC7C,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,qBAAqB;IAElE,YAAY;CAQb"}
|
||||
32
dist/todo/todo.registration.js
vendored
Normal file
32
dist/todo/todo.registration.js
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
"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.TodoModuleRegistration = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const module_registry_service_1 = require("../core/services/module-registry.service");
|
||||
let TodoModuleRegistration = class TodoModuleRegistration {
|
||||
constructor(moduleRegistry) {
|
||||
this.moduleRegistry = moduleRegistry;
|
||||
}
|
||||
onModuleInit() {
|
||||
this.moduleRegistry.registerModule({
|
||||
key: 'todo',
|
||||
name: 'To-do',
|
||||
description: 'Lista de pendientes para la organización del matrimonio.',
|
||||
routePrefix: '/todo',
|
||||
});
|
||||
}
|
||||
};
|
||||
exports.TodoModuleRegistration = TodoModuleRegistration;
|
||||
exports.TodoModuleRegistration = TodoModuleRegistration = __decorate([
|
||||
(0, common_1.Injectable)(),
|
||||
__metadata("design:paramtypes", [module_registry_service_1.ModuleRegistryService])
|
||||
], TodoModuleRegistration);
|
||||
5
dist/todo/workflows/todo.workflow.d.ts
vendored
Normal file
5
dist/todo/workflows/todo.workflow.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { BaseWorkflow } from '../../core/workflows/base-workflow';
|
||||
export declare class TodoWorkflow extends BaseWorkflow {
|
||||
execute(...args: any[]): Promise<any>;
|
||||
}
|
||||
//# sourceMappingURL=todo.workflow.d.ts.map
|
||||
1
dist/todo/workflows/todo.workflow.d.ts.map
vendored
Normal file
1
dist/todo/workflows/todo.workflow.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"todo.workflow.d.ts","sourceRoot":"","sources":["../../../src/todo/workflows/todo.workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAElE,qBAAa,YAAa,SAAQ,YAAY;IACtC,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;CAM5C"}
|
||||
13
dist/todo/workflows/todo.workflow.js
vendored
Normal file
13
dist/todo/workflows/todo.workflow.js
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.TodoWorkflow = void 0;
|
||||
const base_workflow_1 = require("../../core/workflows/base-workflow");
|
||||
class TodoWorkflow extends base_workflow_1.BaseWorkflow {
|
||||
async execute(...args) {
|
||||
this.logExecution('Ejecutando workflow de tareas', args);
|
||||
// Implementar lógica de workflow para tareas
|
||||
// ...existing code...
|
||||
return {};
|
||||
}
|
||||
}
|
||||
exports.TodoWorkflow = TodoWorkflow;
|
||||
Reference in New Issue
Block a user