/**
 * @aurora-catalyst-generated
 * @source cliter/iam/tag.aurora.yaml
 */
import { IamTag } from '@api/graphql';
import { IamGetTagsService } from '@app/iam/tag';
import { IamTagFieldSchema } from '@app/iam/tag/domain';
import { Format, HandlerMeta } from '@aurorajs.dev/core-back';
import { QueryStatement } from '@aurorajs.dev/core-common';
import { Injectable } from '@nestjs/common';

@Injectable()
export class IamGetTagsHandler {
  constructor(private readonly getService: IamGetTagsService) {}

  @Format(IamTagFieldSchema)
  async main(
    queryStatement?: QueryStatement,
    constraint?: QueryStatement,
    handlerMeta?: HandlerMeta,
  ): Promise<IamTag[]> {
    return await this.getService.main(queryStatement, constraint, handlerMeta);
  }
}
