/**
 * @aurora-catalyst-generated
 * @source cliter/o-auth/scope.aurora.yaml
 */
import { OAuthScope } from '@api/graphql';
import { OAuthGetScopesService } 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 OAuthGetScopesHandler {
  constructor(private readonly getService: OAuthGetScopesService) {}

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