/**
 * @aurora-catalyst-generated
 * @source cliter/o-auth/scope.aurora.yaml
 */
import { Pagination } from '@api/graphql';
import { OAuthPaginateScopesService } from '@app/o-auth/scope';
import { OAuthScopeFieldSchema } from '@app/o-auth/scope/domain';
import { Format, HandlerMeta } from '@aurorajs.dev/core-back';
import { QueryStatement } from '@aurorajs.dev/core-common';
import { Injectable } from '@nestjs/common';

@Injectable()
export class OAuthPaginateScopesHandler {
  constructor(private readonly paginateService: OAuthPaginateScopesService) {}

  @Format(OAuthScopeFieldSchema)
  async main(
    queryStatement?: QueryStatement,
    constraint?: QueryStatement,
    handlerMeta?: HandlerMeta,
  ): Promise<Pagination> {
    return await this.paginateService.main(queryStatement, constraint, handlerMeta);
  }
}
