Closed andyslack closed 1 month ago
[!CAUTION]
Review failed
The pull request is closed.
The pull request introduces significant changes to the application's data handling, primarily focusing on webhook functionality. A new user document structure is established, alongside the creation of _llana_webhook
and _llana_webhook_log
collections. The package.json
file is updated to include a new dependency, and various constants related to webhooks are added. Several controllers are modified to incorporate webhook-specific logic, including authentication and role checks. Additionally, a new TasksService
class is introduced for managing scheduled tasks related to webhooks, enhancing the application's overall functionality.
File Path | Change Summary |
---|---|
demo/databases/mongodb.js | Added user document insertion, created _llana_webhook and _llana_webhook_log collections, modified insertion logic. |
package.json | Added dependency: "@nestjs/schedule": "^4.1.1" in dependencies . |
src/app.constants.ts | Added constants: LLANA_WEBHOOK_TABLE , LLANA_WEBHOOK_LOG_TABLE , CACHE_DEFAULT_WEBHOOK_TTL , WEBHOOK_LOG_DAYS . |
src/app.controller.delete.test.spec.ts | Introduced test suite for delete functionality with tests for single and multiple customer deletions. |
src/app.controller.delete.ts | Modified DeleteController to handle webhook-specific logic and authentication checks. |
src/app.controller.get.ts | Updated GetController to use LLANA_WEBHOOK_TABLE for webhook requests. |
src/app.controller.post.ts | Renamed createOne to create , added webhook-specific logic and authentication. |
src/app.controller.put.ts | Enhanced PutController to manage webhook updates with specific authentication checks. |
src/app.module.ts | Imported and registered ScheduleModule , added TasksService , removed Websockets . |
src/app.service.bootup.ts | Extended onApplicationBootstrap to create _llana_webhook and _llana_webhook_log schemas. |
src/app.service.tasks.ts | Introduced TasksService for managing scheduled tasks related to webhooks. |
src/databases/mongo.database.ts | Updated logging in createOne and findMany methods for clarity. |
src/databases/mysql.database.ts | Added foreign key constraint logic in createTable method. |
src/databases/postgres.database.ts | Implemented foreign key constraint handling during table creation. |
src/dtos/webhook.dto.ts | Added Webhook and WebhookLog classes with validation. |
src/helpers/Documentation.ts | Expanded generateDocumentation to include new webhook endpoints. |
src/helpers/Query.ts | Updated error logging and table listing logic. |
src/helpers/Webhook.ts | Introduced Webhook class for managing webhook operations. |
src/helpers/Websocket.ts | Renamed Websockets to Websocket , updated publish method signature. |
src/main.ts | Added conditional logging for timezone information. |
src/types/database.types.ts | Renamed SocketType to PublishType , corrected interface names. |
src/utils/String.ts | Added plural function for generating plural forms of words. |
GetController
class involve restructuring logic for handling requests, which may relate to the overall data retrieval process in the main PR.GetController
class include formatting improvements and adjustments that could impact how user data is retrieved, relevant to the user document insertion in the main PR.DeleteController
for handling request identifiers may relate to the structured data insertion and retrieval logic in the main PR.Query
class for managing relations could connect with the new collection and data relationships established in the main PR.🐇 In the land of code where changes bloom,
New webhooks dance, dispelling gloom.
With tasks scheduled and logs refined,
Our rabbit's work is well-defined.
So hop along, let’s celebrate,
For every change, we elevate! 🎉
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Documentation
Tests
Chores