/**
 * @aurora-catalyst-generated
 * @source cliter/o-auth/access-token.aurora.yaml
 */
import { OAuthAccessToken } from '@api/graphql';
import { OAuthSequelizeAccessTokenRepository } from '@app/o-auth/access-token';
import { HandlerMeta } from '@aurorajs.dev/core-back';
import { QueryStatement } from '@aurorajs.dev/core-common';
import { Injectable } from '@nestjs/common';

@Injectable()
export class OAuthGetAccessTokensService {
  constructor(private readonly repository: OAuthSequelizeAccessTokenRepository) {}

  async main(
    queryStatement?: QueryStatement,
    constraint?: QueryStatement,
    handlerMeta?: HandlerMeta,
  ): Promise<OAuthAccessToken[]> {
    return await this.repository.get({
      queryStatement,
      constraint,
      handlerMeta,
    });
  }
}
