Commit Graph

337 Commits

Author SHA1 Message Date
e3a06f1ba9 feat: add scheduled quiz notification task and enhance Quiz schema with scheduleId
- Introduced a new cron job in CronService to check for schedules with status WAITING_QUIZ and notify customers to complete their quizzes.
- Enhanced the Quiz schema by adding an optional 'scheduleId' argument to facilitate quiz retrieval based on specific schedules, improving user experience and data association.
- Updated role-based access control logic to ensure proper handling of quiz queries for customers and center mentors.
2024-12-09 18:35:01 +07:00
5ab89d5cfa fix: update centerMentorId reference in Quiz schema query
- Changed the centerMentorId reference in the Quiz schema to use centerMentor.mentorId instead of the current user's ID.
- This adjustment ensures that the correct mentor association is maintained in the query logic, enhancing data integrity and access control.
2024-12-09 17:55:09 +07:00
269563555f fix: extend role-based access control in Quiz schema
- Updated authorization logic to allow both CENTER_MENTOR and CENTER_OWNER roles access to Quiz queries and mutations.
- Enhanced security by refining user role checks to ensure proper access control.
2024-12-09 17:54:17 +07:00
2edd7c18e5 refactor: enhance Quiz schema with role-based access control and service ID requirement
- Added role-based access control to restrict access to Quiz queries and mutations for users with the CENTER_MENTOR role.
- Updated error messages for unauthorized access to improve clarity.
- Introduced a required 'serviceId' argument in the quizzes query to ensure proper filtering and association with the center mentor.
- Refactored existing authentication checks to maintain consistent error handling across the Quiz schema.
2024-12-09 17:53:47 +07:00
342fea041f feat: add service field to Quiz creation and enforce service ID requirement
- Introduced 'service' field in the Quiz creation input to enhance data structure.
- Added validation to ensure 'service ID' is provided during Quiz creation, improving data integrity.
- Updated centerMentor association logic to connect the current user as the center mentor for the Quiz.
2024-12-09 17:45:52 +07:00
b8d7c52d63 chore: update subproject commit reference and enhance Prisma types
- Updated the subproject commit reference in epess-database to the latest version.
- Modified Prisma types in pothos.generated.ts to include 'Quiz' in relation names and list relations.
- Removed the 'TempOrder' type definition from PrismaTypes for improved clarity and maintainability.
2024-12-09 17:30:02 +07:00
abcda1ae58 refactor: improve DateTime handling in GraphQL builder
- Streamlined DateTime serialization and parsing logic in the GraphQL builder for enhanced clarity and maintainability.
- Removed commented-out code to reduce clutter and improve code readability.
- Ensured consistent error handling for invalid DateTime values.
2024-12-09 17:24:00 +07:00
087bf3a3ad chore: update subproject commit reference and modify date handling in Cron service
- Updated the subproject commit reference in epess-database to the latest version.
- Changed the date handling in CronService to allow scheduling up to one day in advance instead of thirty minutes.
- Removed commented-out code in DocumentSchema for improved clarity and maintainability.
2024-12-09 17:20:30 +07:00
56762e98eb refactor: streamline collaborator check in Document schema
- Simplified the collaborator check logic in the DocumentSchema by condensing the condition into a single line for improved readability.
- Maintained existing functionality while enhancing code clarity and maintainability.
2024-12-09 17:11:18 +07:00
8d0b80f09c chore: update subproject commit reference and enhance error handling in schema files
- Updated the subproject commit reference in epess-database to the latest version.
- Changed error messages in CollaborationSession and Document schemas for improved clarity and security.
- Refactored error handling logic to ensure consistent user authentication checks across multiple schema files.
- Enhanced GraphQL module configuration with new options for better performance and error response handling.
2024-12-09 17:06:23 +07:00
951511228a chore: clean up GraphQL module request logging
- Removed unnecessary logging of session ID in the GraphQL module to streamline request handling.
- Maintained existing functionality while improving code clarity and reducing potential noise in logs.
2024-12-08 21:56:57 +07:00
ba32ee8dc1 chore: refactor pub/sub iterator usage across schema files
- Updated pub/sub iterator methods from `asyncIterableIterator` to `asyncIterator` in multiple schema files for improved compatibility with the latest GraphQL subscriptions.
- Refactored subscription logic in CollaborationSession, Document, Message, User, and other schema files to enhance readability and maintainability.
- Adjusted imports in GraphQL builder to utilize RedisPubSub for better performance in subscription handling.
2024-12-08 21:54:23 +07:00
8b36e7d05a chore: update GraphQL module configuration and enhance server plugins
- Added ApolloServerPluginLandingPageLocalDefault for improved GraphQL playground experience.
- Disabled playground in production by setting it to false for better security.
- Updated logger configuration for clearer debugging and error handling in the GraphQL module.
2024-12-08 21:25:42 +07:00
45dca51990 chore: update biome configuration and enhance error handling in schema files
- Enabled useIgnoreFile in biome.json for better file management.
- Updated various correctness and style rules in biome.json to enforce stricter coding standards.
- Added new biome lint command in package.json for improved code quality checks.
- Refactored error handling in multiple schema files to use consistent error throwing patterns, enhancing readability and maintainability.
- Improved user authentication checks across various schemas to ensure proper access control.
2024-12-08 21:01:26 +07:00
10e20092ab chore: update configuration and improve schema imports
- Updated biome.json to include "graphql.d.ts" in the ignored files list.
- Updated subproject commit reference in epess-database to the latest version.
- Removed unused script from package.json and streamlined module file extensions in tsconfig.json.
- Consolidated exclude patterns in tsconfig.build.json for clarity.
- Refactored imports across multiple schema files for consistency and improved readability.
- Enhanced various schema files by ensuring proper import order and removing redundant code.
- Improved error handling and data integrity checks in several service and schema files.
2024-12-08 20:49:52 +07:00
9e6d62e4be chore: update package dependencies and improve pub/sub iterator usage
- Updated various package dependencies in package-lock.json and package.json for enhanced stability and performance.
- Changed pub/sub iterator methods from `asyncIterator` to `asyncIterableIterator` in multiple schema files for better compatibility with the latest GraphQL subscriptions.
- Added `moduleResolution` option in tsconfig.json to support Node.js-style module resolution.
2024-12-08 20:38:09 +07:00
16f6f8a629 chore: update package dependencies and adjust GraphQL upload imports
- Updated various package dependencies in package-lock.json and package.json for improved stability and performance.
- Changed import paths for graphql-upload to use .mjs extensions, ensuring compatibility with ES modules.
- Added @types/graphql-upload to package.json for better TypeScript support.
- Adjusted Jest configuration for improved readability and maintainability.
2024-12-07 19:54:37 +07:00
14a91a1885 chore: update subproject commit reference and enhance Quiz schema
- Updated the subproject commit reference in epess-database to the latest version.
- Enhanced QuizSchema by adding quizAttempt relation and submitQuiz mutation for improved quiz attempt handling.
- Updated Prisma types to include QuizAttempt, ensuring consistency across the application.
2024-12-07 19:39:16 +07:00
636be21a4c chore: update subproject commit reference in epess-database to latest version 2024-12-07 19:05:35 +07:00
7a0a404081 chore: update subproject commit and enhance PersonalMilestone schema
- Updated the subproject commit reference in epess-database to the latest version.
- Added milestoneOrder field to PersonalMilestoneSchema for improved milestone ordering.
- Ensured consistency in Prisma types with the latest schema changes.
2024-12-07 18:47:43 +07:00
ae537d40f6 feat: integrate PersonalMilestoneModule into GraphQL module and update its configuration
- Added PersonalMilestoneModule to the GraphQL module imports, enhancing the overall functionality and data management.
- Updated PersonalMilestoneModule to use providers and exports for PersonalMilestoneSchema, improving module encapsulation and reusability.
2024-12-07 18:21:02 +07:00
bb88d6ed00 feat: enhance QuizSchema and related schemas with new fields and relations
- Updated QuizSchema to expose correctAnswer as a field with a resolver, improving data retrieval for quizzes.
- Introduced new object types for correctAnswer, allowing for flexible data structures (StringType and StringListType).
- Modified createQuiz mutation to automatically associate the current user as centerMentorId, enhancing data integrity.
- Added personalMilestone relation to ScheduleSchema, linking schedules to personal milestones for better tracking.
- Included quiz relation in ServiceSchema, establishing a connection between services and their associated quizzes.
- Updated Prisma types to reflect the new relationships and fields, ensuring consistency across the application.
2024-12-07 18:18:33 +07:00
d59df7d2ab feat: update collaboration session handling and schedule date status
- Removed redundant code for adding current user ID to collaborators in collaboration sessions.
- Implemented updates to schedule date status based on collaboration session conditions, enhancing the workflow for both customers and mentors.
- Improved error handling to ensure only authorized users can access collaboration sessions, maintaining data integrity and user experience.
2024-12-07 16:28:44 +07:00
77e3526564 feat: add scheduleDates field to ScheduleSchema for retrieving schedule dates
- Introduced a new `scheduleDates` field in the ScheduleSchema to allow users to fetch a list of schedule dates.
- Implemented argument handling for pagination and filtering, ensuring efficient data retrieval.
- Added error handling to prevent access during subscriptions and ensure user authentication before data access.
- Enhanced the overall functionality of the ScheduleSchema, improving user experience and data management.
2024-12-07 16:05:12 +07:00
d72c647acd feat: add QuizModule to GraphQL module imports
- Integrated QuizModule into the GraphQL module to enhance quiz-related functionalities.
- Updated module imports to ensure proper dependency management and maintainability of the codebase.
2024-12-07 15:56:19 +07:00
429c6f9073 chore: remove Milestone module and update related schemas
- Deleted the MilestoneModule and its associated schema to streamline the codebase.
- Updated QuizSchema to replace scheduleId with serviceId, enhancing the relationship structure.
- Removed references to Milestone in ServiceSchema, improving clarity and focus on relevant entities.
- Updated Prisma types to reflect the removal of Milestone, ensuring data integrity across the application.
2024-12-07 15:33:28 +07:00
4af2e848b8 feat: implement Quiz and Question schemas with GraphQL integration
- Introduced QuizSchema and QuestionSchema extending PothosSchema for enhanced GraphQL capabilities.
- Added methods to expose Quiz and Question fields, including relations and various attributes.
- Implemented query and mutation fields for creating, updating, and retrieving quizzes, ensuring proper authentication and error handling.
- Enhanced the overall structure of the schema to improve data integrity and access control.
2024-12-06 21:52:11 +07:00
5e68b1e11a feat: add PersonalMilestone and Quiz relations to Prisma types
- Introduced PersonalMilestone entity to the Prisma types, enhancing the schema with new relationships.
- Updated existing relations in various schemas to include PersonalMilestone and Quiz, improving data structure and integrity.
- Modified relation names and lists to accommodate the new entities, ensuring comprehensive coverage of the data model.
2024-12-06 21:26:51 +07:00
6cbaf44c7f chore: update subproject commit and enhance ServiceFeedback schema
- Updated the subproject commit reference in epess-database to the latest version.
- Added Logger to the ServiceFeedback schema for improved logging of arguments during feedback submission.
- Modified the Prisma types to include new Quiz and Question entities, enhancing the schema's capabilities and data structure.
2024-12-06 21:25:25 +07:00
59b221a6ee chore: update subproject commit and modify prisma studio command
- Updated the subproject commit reference in epess-database to the latest version.
- Modified the prisma studio command in package.json to use dotenv for environment variable management, enhancing configuration flexibility.
2024-12-06 19:06:27 +07:00
46074c89b0 feat: enhance WorkshopMeetingRoomSchema with join info and LiveKit integration
- Added a new method `workshopMeetingRoomJoinInfo` to provide details for joining a workshop meeting room, including ID, token, and server URL.
- Integrated LiveKitService to generate tokens and retrieve server URLs, improving the functionality of the workshop meeting room.
- Updated the `init` method to include the new join info field, ensuring proper resolution and access control for users.
- Enhanced error handling to ensure unauthorized access is properly managed during the join process.
2024-12-06 17:03:45 +07:00
4931f382b3 feat: implement createServiceFeedback mutation in ServiceFeedbackSchema
- Added a new mutation field `createServiceFeedback` to allow users to submit feedback for services.
- Implemented validation checks to ensure only authorized users (CUSTOMER role) can submit feedback for completed orders.
- Included error handling for invalid ratings and comment length, enhancing data integrity and user experience.
- Improved the overall structure and clarity of the ServiceFeedbackSchema by integrating the new mutation.
2024-12-06 16:57:04 +07:00
db2b3e9dd4 fix: enhance collaborator access check in DocumentSchema
- Updated the collaborator access check in the DocumentSchema to ensure that a user must have both writable and readable permissions to access a document.
- Improved error handling by providing a more precise condition for user access, enhancing security and clarity in document collaboration.
2024-12-06 16:34:49 +07:00
6d28d74351 refactor: unify logging messages in CronService for consistency
- Updated log messages in the CronService to use a consistent logger context ('CronService') across all scheduled tasks.
- Improved traceability and readability of log outputs by standardizing the log context, enhancing debugging capabilities.
2024-12-05 22:56:22 +07:00
eb05610b23 refactor: streamline import statements in GraphQL service and ServiceSchema
- Consolidated import paths in graphql.service.ts and service.schema.ts to use relative paths for improved organization and consistency.
- Enhanced code readability by reducing unnecessary line breaks in import statements.
2024-12-05 22:51:48 +07:00
bbec8aba03 refactor: update import paths in GraphQL module for consistency
- Changed import paths in graphql.module.ts to use relative paths for better organization and consistency.
- Enhanced logging in the GraphQL module by adding the module name to log messages, improving traceability during debugging.
2024-12-05 22:49:53 +07:00
6eafc6d5ef fix: improve error handling in GraphQL connection parameters
- Replaced error throws with logging for missing connection parameters in the GraphQL module.
- Enhanced the logging mechanism to provide better insights during connection failures, improving overall debugging and monitoring capabilities.
2024-12-05 22:47:26 +07:00
de46499288 feat: add notification messaging for service approval and rejection in ServiceSchema
- Implemented user notification system by creating messages in the database when a service is approved or rejected.
- Utilized the new Message and PubSubEvent classes to handle notifications effectively.
- Enhanced user experience by informing users of service status changes through direct messages.
2024-12-05 22:41:25 +07:00
37b0086b4d feat: update file output paths and add feedback tracking to service schema
- Modified file output paths in LiveKitRoomService to utilize the BUCKET_NAME environment variable for dynamic S3 storage.
- Introduced a new `feedbacked` field in ServiceSchema to track whether a user has provided feedback for a service, enhancing user interaction capabilities.
- Cleaned up the ServiceFeedback schema by refining the resolve function for better clarity and consistency.
2024-12-05 22:11:40 +07:00
1b7329bb44 feat: add completedOrders field to Order schema and enhance workshop subscription error handling
- Introduced a new `completedOrders` field in the Order schema to retrieve a list of completed orders for the authenticated user, filtering by order status and schedule dates.
- Enhanced error handling in the WorkshopSubscription schema to prevent retrieval in subscription context, improving the robustness of the API.
- Updated imports in order.schema.ts to include additional status types from Prisma for better functionality.
2024-12-05 21:31:38 +07:00
0d973a6544 refactor: update getRoomRecordUrl method in MinioService for improved promise handling
- Changed the implementation of the `getRoomRecordUrl` method to use `await` with the Promise constructor for better readability and consistency.
- This adjustment enhances the asynchronous handling of the method, ensuring a more straightforward promise resolution process.
2024-12-05 21:14:00 +07:00
10df93d534 feat: add record URL retrieval to MeetingRoom schema and enhance MinioService
- Introduced a new field `recordUrl` in the MeetingRoom schema to fetch the presigned URL for meeting room recordings.
- Implemented `getRoomRecordUrl` method in MinioService to retrieve the recording URL from Minio, enhancing the service's functionality.
- Updated imports in MeetingRoom schema to include MinioService for the new functionality.
2024-12-05 21:10:45 +07:00
62662b0256 chore: clean up workshop subscription schema and add subscribed workshops field
- Removed unnecessary line breaks in the workshop subscription schema for improved readability.
- Consolidated import statements for better organization.
- Added a new field `subscribedWorkshops` to retrieve a list of workshops the current user is subscribed to, enhancing the schema's functionality.
- Streamlined error handling in the subscription logic for clarity.
2024-12-05 19:56:20 +07:00
9d64a199e2 refactor: update LiveKit egress service and module structure
- Removed the `livekit.egress.ts` file and replaced it with `livekit.egress.service.ts` for better clarity and consistency in naming.
- Updated `livekit.module.ts` to reflect the new import path for the `LiveKitEgressService`.
- Enhanced `livekit.room.service.ts` to utilize the new egress service structure, including improved egress configuration for recording sessions with dynamic file output settings.
- Removed the `rootDir` property from `tsconfig.json` to streamline the TypeScript configuration.
2024-12-05 19:35:17 +07:00
7699a07d1d chore: remove redundant Docker Compose down command in CI workflow
- Eliminated the `docker compose down` command from the CI workflow to streamline the build and deployment process. This change simplifies the CI configuration and enhances efficiency by reducing unnecessary steps.
2024-12-05 18:47:31 +07:00
253dbc783b chore: simplify Docker Compose commands in CI workflow
- Updated the CI workflow to streamline Docker Compose commands by replacing separate build and up commands with a single `docker compose up --build -d` command. This change enhances the efficiency of the CI process by reducing the number of steps required to start the services.
2024-12-05 18:46:28 +07:00
14edf629bd chore: update Dockerfile to include .nvmrc and .npmrc files
- Added .nvmrc and .npmrc files to the Docker image for consistent Node.js versioning and npm configuration.
- Removed the direct copy of the prisma directory to streamline the build process.
2024-12-05 18:42:16 +07:00
2033d0ec26 feat: enhance Docker configuration and update environment variables
- Updated .dockerignore to include additional files and directories for better Docker build context management.
- Modified compose.yaml to add BASE_URL and change BUCKET_NAME to improve environment configuration.
- Refactored Dockerfile to implement a multi-stage build for optimized image size and performance.
- Updated package.json to include a new script for production Prisma generation.
- Adjusted tsconfig files to refine project structure and exclude unnecessary directories.
- Removed delta.mdx.txt file from OpenAI instructions to streamline the service.
- Updated package-lock.json and package.json to upgrade Prisma and related dependencies for improved functionality.
2024-12-05 18:37:34 +07:00
ac2014079f feat: add listRecords method to MinioService and update start:dev script in package.json
- Introduced a new method `listRecords` in MinioService for listing objects in a specified room's records.
- Updated the `start:dev` script in package.json to remove debugging options for a cleaner development experience.
2024-12-05 17:13:11 +07:00
74656dd4d9 chore: update subproject commit reference for epess-database 2024-12-05 16:51:53 +07:00