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

@Injectable()
export class IamPaginateTagsService {
  constructor(private readonly repository: IamSequelizeTagRepository) {}

  async main(
    queryStatement?: QueryStatement,
    constraint?: QueryStatement,
    handlerMeta?: HandlerMeta,
  ): Promise<Pagination<IamTag>> {
    return await this.repository.paginate({
      queryStatement,
      constraint,
      handlerMeta,
    });
  }
}
