mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-28 23:50:08 +00:00
530c7cb005
Fold the legacy tripService SQL into TripsService; port the trips MCP registrar/resources/trip-summary prompt to trips.mcp.ts and the share-link tools to share.mcp.ts (predicate access for the trips:delete/trips:share/canReadTrips gates, deprecation notice via the attach ctx); adopt trips.dto.ts and clear the seven allow-list entries; delete todo/share bridges with their last consumers. Includes the trailing quirk fixes: transactional deleteTrip/deleteGuest, owner display_name in listMembers.
25 lines
1.1 KiB
TypeScript
25 lines
1.1 KiB
TypeScript
import { createZodDto } from 'nestjs-zod';
|
|
import {
|
|
tripCreateRequestSchema,
|
|
tripUpdateRequestSchema,
|
|
tripCopyRequestSchema,
|
|
tripAddMemberRequestSchema,
|
|
tripTransferOwnershipRequestSchema,
|
|
tripCreateGuestRequestSchema,
|
|
tripRenameGuestRequestSchema,
|
|
} from '@trek/shared';
|
|
|
|
/**
|
|
* Server-side createZodDto wrappers over the @trek/shared trip contracts. The
|
|
* global ZodValidationPipe (APP_PIPE in app.module.ts) validates any @Body()
|
|
* parameter typed with one of these classes by metatype — the Zod schemas in
|
|
* shared/ remain the single source of truth for the wire contract.
|
|
*/
|
|
export class TripCreateDto extends createZodDto(tripCreateRequestSchema) {}
|
|
export class TripUpdateDto extends createZodDto(tripUpdateRequestSchema) {}
|
|
export class TripCopyDto extends createZodDto(tripCopyRequestSchema) {}
|
|
export class TripAddMemberDto extends createZodDto(tripAddMemberRequestSchema) {}
|
|
export class TripTransferOwnershipDto extends createZodDto(tripTransferOwnershipRequestSchema) {}
|
|
export class TripCreateGuestDto extends createZodDto(tripCreateGuestRequestSchema) {}
|
|
export class TripRenameGuestDto extends createZodDto(tripRenameGuestRequestSchema) {}
|