/**
 * @aurora-catalyst-generated
 * @source cliter/iam/account.aurora.yaml
 */
import { IamAccount } from '@api/graphql';
import { IamSequelizeAccountRepository } from '@app/iam/account';
import { HandlerMeta } from '@aurorajs.dev/core-back';
import { QueryStatement } from '@aurorajs.dev/core-common';
import { Injectable } from '@nestjs/common';

@Injectable()
export class IamFindAccountService {
  constructor(private readonly repository: IamSequelizeAccountRepository) {}

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