/** * Example Controller * * Simple NestJS controller demonstrating Core + BackendExampleDomainService integration. * Use as reference for building your own backend modules. * * Demonstrates: * - Standard CRUD operations with error handling * - Single error throwing (standard pattern) * - Array error throwing (multiple validation errors) * - Standard API response format using SuccessResponseStandard * - How errors are automatically captured and returned as ErrorResponse */ import { BackendExampleDomainService } from '../../domain/example'; import type { ExampleEntity, CreateExampleDTO, PatchExampleDTO } from '@plyaz/types/examples'; import type { ReturnResponseType } from '@plyaz/types/errors'; import type { SendEmailParams, NotificationResult, NotificationResponse } from '@plyaz/types/notifications'; export declare const BACKEND_EXAMPLE_DOMAIN_SERVICE = "BACKEND_EXAMPLE_DOMAIN_SERVICE"; /** * Example Controller * * Routes: * - GET /example/health - Health check * - GET /example/entities/:id - Get entity by ID * - POST /example/entities - Create entity * - PATCH /example/entities/:id - Update entity * - DELETE /example/entities/:id - Delete entity * - POST /example/entities/validated - Create with full validation (array errors example) * - GET /example/errors/single - Demo: Single error response * - GET /example/errors/array - Demo: Array of errors response * - POST /example/email - Send email using templates * * NOTE: Upload and generate-document endpoints are now in files.controller.ts */ export declare class ExampleController { private readonly exampleService; constructor(exampleService: BackendExampleDomainService); /** * Health check endpoint * GET /example/health */ health(): ReturnResponseType<{ service: boolean; timestamp: string; }>; /** * Get entity by ID * GET /example/entities/:id */ getEntity(id: string): Promise>; /** * Create a new entity * POST /example/entities */ createEntity(dto: CreateExampleDTO): Promise>; /** * Update an entity (partial) * PATCH /example/entities/:id */ updateEntity(id: string, dto: PatchExampleDTO): Promise>; /** * Delete an entity * DELETE /example/entities/:id */ deleteEntity(id: string): Promise>; /** * Create entity with full validation (array errors pattern) * POST /example/entities/validated */ createEntityWithValidation(dto: unknown): Promise>; /** * Demo: Single validation error response * GET /example/errors/single */ demoSingleError(): Promise; /** * Demo: Multiple validation errors response * GET /example/errors/array */ demoArrayErrors(): Promise; /** * Send an email using notification templates * POST /example/email */ sendEmail(dto: Partial): Promise>>; } //# sourceMappingURL=example.controller.d.ts.map