/* * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ import { BadRequestException, Body, Controller, Delete, Get, HttpCode, NotFoundException, Param, Patch, Post, Query, } from '@nestjs/common'; import { BaseController } from '@/utils/generics/base-controller'; import { DeleteResult } from '@/utils/generics/base-repository'; import { PageQueryDto } from '@/utils/pagination/pagination-query.dto'; import { PageQueryPipe } from '@/utils/pagination/pagination-query.pipe'; import { PopulatePipe } from '@/utils/pipes/populate.pipe'; import { SearchFilterPipe } from '@/utils/pipes/search-filter.pipe'; import { TFilterQuery } from '@/utils/types/filter.types'; import { LabelCreateDto, LabelUpdateDto } from '../dto/label.dto'; import { Label, LabelFull, LabelPopulate, LabelStub, } from '../schemas/label.schema'; import { LabelService } from '../services/label.service'; @Controller('label') export class LabelController extends BaseController< Label, LabelStub, LabelPopulate, LabelFull > { constructor(private readonly labelService: LabelService) { super(labelService); } @Get() async findPage( @Query(PageQueryPipe) pageQuery: PageQueryDto