{"version":3,"file":"OpenBadgesOAuthRepository.mjs","names":["OpenBadgesOAuthRepository","storageService: StorageService<OpenBadgesOAuthRecord>"],"sources":["../../src/repository/OpenBadgesOAuthRepository.ts"],"sourcesContent":["import type { StorageService } from '@credo-ts/core'\nimport { injectable, inject, InjectionSymbols, EventEmitter, Repository } from '@credo-ts/core'\nimport { OpenBadgesOAuthRecord } from './OpenBadgesOAuthRecord'\n\n@injectable()\nexport class OpenBadgesOAuthRepository extends Repository<OpenBadgesOAuthRecord> {\n  public constructor(\n    @inject(InjectionSymbols.StorageService) storageService: StorageService<OpenBadgesOAuthRecord>,\n    eventEmitter: EventEmitter\n  ) {\n    super(OpenBadgesOAuthRecord, storageService, eventEmitter)\n  }\n\n  public async findByHost(agentContext: any, host: string) {\n    return this.findByQuery(agentContext, { host })\n  }\n\n  public async findBySubject(agentContext: any, subject: string) {\n    return this.findByQuery(agentContext, { subject })\n  }\n\n  public async findByClientId(agentContext: any, clientId: string) {\n    return this.findSingleByQuery(agentContext, { clientId })\n  }\n}\n\n"],"mappings":";;;;;;;4BAE+D;;;;;AAGxD,sCAAMA,oCAAkC,WAAkC;CAC/E,AAAO,YACL,AAAyCC,gBACzC,cACA;AACA,QAAM,uBAAuB,gBAAgB,aAAa;;CAG5D,MAAa,WAAW,cAAmB,MAAc;AACvD,SAAO,KAAK,YAAY,cAAc,EAAE,MAAM,CAAC;;CAGjD,MAAa,cAAc,cAAmB,SAAiB;AAC7D,SAAO,KAAK,YAAY,cAAc,EAAE,SAAS,CAAC;;CAGpD,MAAa,eAAe,cAAmB,UAAkB;AAC/D,SAAO,KAAK,kBAAkB,cAAc,EAAE,UAAU,CAAC;;;;CAlB5D,YAAY;oBAGR,OAAO,iBAAiB,eAAe"}