Files
calendar/packages/features/routing-forms/di/RoutingFormResponseRepository.module.ts
T
Hariom BalharaGitHubhariom@cal.com <hariombalhara@gmail.com>Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
9d39590510 feat: create BookingHistoryViewerService to combine audit logs with routing form submissions (#26045)
* feat: create BookingHistoryViewerService to combine audit logs with routing form submissions

Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>

* refactor(booking): rename audit log query and enhance type safety

- Updated the booking logs view to use the new getBookingHistory query instead of getAuditLogs.
- Introduced DisplayBookingAuditLog type for improved clarity in BookingAuditViewerService.
- Refactored BookingHistoryViewerService to utilize the new DisplayBookingAuditLog type and added sorting functionality for history logs.
- Adjusted related types and methods to ensure consistency across services.

* refactor(routing-forms): streamline imports and enhance type definitions

- Consolidated type exports and imports from the features library for better organization.
- Removed redundant type definitions and functions in zod.ts, findFieldValueByIdentifier.ts, getFieldIdentifier.ts, and parseRoutingFormResponse.ts.
- Introduced new utility functions for handling field responses and parsing routing form responses.
- Improved type safety and clarity across routing form response handling.

* fix: remove double prefix from uniqueId in form submission entry

Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>

* 1c97f9cc5d50416788c01876fe539bcc9750e9b2 (#26453)

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-01-05 11:11:05 +00:00

22 lines
879 B
TypeScript

import { PrismaRoutingFormResponseRepository } from "@calcom/lib/server/repository/PrismaRoutingFormResponseRepository";
import { ROUTING_FORM_DI_TOKENS } from "@calcom/features/routing-forms/di/tokens";
import { bindModuleToClassOnToken } from "@calcom/features/di/di";
import { moduleLoader as prismaModuleLoader } from "@calcom/features/di/modules/Prisma";
import { createModule } from "../../di/di";
export const routingFormResponseRepositoryModule = createModule();
const token = ROUTING_FORM_DI_TOKENS.ROUTING_FORM_RESPONSE_REPOSITORY;
const moduleToken = ROUTING_FORM_DI_TOKENS.ROUTING_FORM_RESPONSE_REPOSITORY_MODULE;
const loadModule = bindModuleToClassOnToken({
module: routingFormResponseRepositoryModule,
moduleToken,
token,
classs: PrismaRoutingFormResponseRepository,
dep: prismaModuleLoader,
});
export const moduleLoader = {
token,
loadModule,
};