import { __decorateMetadata } from "../../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.mjs";
import { __decorate } from "../../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.mjs";
import { __decorateParam } from "../../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateParam.mjs";
import { DidCommProofExchangeRecord } from "./DidCommProofExchangeRecord.mjs";
import { EventEmitter, InjectionSymbols, Repository, inject, injectable } from "@credo-ts/core";

//#region ../didcomm/src/modules/proofs/repository/DidCommProofExchangeRepository.ts
var _ref;
let DidCommProofExchangeRepository = class DidCommProofExchangeRepository$1 extends Repository {
	constructor(storageService, eventEmitter) {
		super(DidCommProofExchangeRecord, storageService, eventEmitter);
	}
	/**
	* Retrieve a proof record by connection id and thread id
	*
	* @param connectionId The connection id
	* @param threadId The thread id
	* @throws {RecordNotFoundError} If no record is found
	* @throws {RecordDuplicateError} If multiple records are found
	* @returns The proof record
	*/
	async getByThreadAndConnectionId(agentContext, threadId, connectionId) {
		return this.getSingleByQuery(agentContext, {
			threadId,
			connectionId
		});
	}
	/**
	* Retrieve proof records by connection id and parent thread id
	*
	* @param connectionId The connection id
	* @param parentThreadId The parent thread id
	* @returns List containing all proof records matching the given query
	*/
	async getByParentThreadAndConnectionId(agentContext, parentThreadId, connectionId) {
		return this.findByQuery(agentContext, {
			parentThreadId,
			connectionId
		});
	}
};
DidCommProofExchangeRepository = __decorate([
	injectable(),
	__decorateParam(0, inject(InjectionSymbols.StorageService)),
	__decorateMetadata("design:paramtypes", [Object, typeof (_ref = typeof EventEmitter !== "undefined" && EventEmitter) === "function" ? _ref : Object])
], DidCommProofExchangeRepository);

//#endregion
export { DidCommProofExchangeRepository };
//# sourceMappingURL=DidCommProofExchangeRepository.mjs.map