import { AnyUint8Array } from "../../types.js";
import { EncodedX509Certificate } from "../x509/X509ServiceOptions.js";
import { X509Certificate } from "../x509/X509Certificate.js";
import { MdocRecord } from "./repository/MdocRecord.js";
import { DifPresentationExchangeDefinition } from "../dif-presentation-exchange/models/index.js";
import { Mdoc } from "./Mdoc.js";
import { PublicJwk } from "../kms/jwk/PublicJwk.js";
import { ValidityInfo } from "@animo-id/mdoc";

//#region src/modules/mdoc/MdocOptions.d.ts
type MdocNameSpaces = Record<string, Record<string, unknown>>;
interface MdocStoreOptions {
  record: MdocRecord;
}
type MdocVerifyOptions = {
  trustedCertificates?: EncodedX509Certificate[];
  now?: Date;
};
type MdocOpenId4VpSessionTranscriptOptions = {
  type: 'openId4Vp';
  responseUri: string;
  clientId: string;
  verifierGeneratedNonce: string;
  encryptionJwk?: PublicJwk;
};
type MdocOpenId4VpDraft18SessionTranscriptOptions = {
  type: 'openId4VpDraft18';
  responseUri: string;
  clientId: string;
  verifierGeneratedNonce: string;
  mdocGeneratedNonce: string;
};
type MdocSessionTranscriptByteOptions = {
  type: 'sesionTranscriptBytes';
  sessionTranscriptBytes: AnyUint8Array;
};
type MdocOpenId4VpDcApiSessionTranscriptOptions = {
  type: 'openId4VpDcApi';
  origin: string;
  verifierGeneratedNonce: string;
  encryptionJwk?: PublicJwk;
};
type MdocOpenId4VpDcApiDraft24SessionTranscriptOptions = {
  type: 'openId4VpDcApiDraft24';
  clientId: string;
  origin: string;
  verifierGeneratedNonce: string;
};
type MdocSessionTranscriptOptions = MdocOpenId4VpSessionTranscriptOptions | MdocOpenId4VpDraft18SessionTranscriptOptions | MdocSessionTranscriptByteOptions | MdocOpenId4VpDcApiSessionTranscriptOptions | MdocOpenId4VpDcApiDraft24SessionTranscriptOptions;
type MdocDocumentRequest = {
  docType: string;
  nameSpaces: Record<string, Record<string, boolean>>;
};
type MdocDeviceResponseOptions = {
  mdocs: [Mdoc, ...Mdoc[]];
  documentRequests: MdocDocumentRequest[];
  deviceNameSpaces?: MdocNameSpaces;
  sessionTranscriptOptions: MdocSessionTranscriptOptions;
};
type MdocDeviceResponsePresentationDefinitionOptions = {
  mdocs: [Mdoc, ...Mdoc[]];
  presentationDefinition: DifPresentationExchangeDefinition;
  deviceNameSpaces?: MdocNameSpaces;
  sessionTranscriptOptions: MdocSessionTranscriptOptions;
};
type MdocDeviceResponseVerifyOptions = {
  trustedCertificates?: EncodedX509Certificate[];
  sessionTranscriptOptions: MdocSessionTranscriptOptions;
  /**
   * The base64Url-encoded device response string.
   */
  deviceResponse: string;
  now?: Date;
};
type MdocSignOptions = {
  docType: 'org.iso.18013.5.1.mDL' | (string & {});
  validityInfo?: Partial<ValidityInfo>;
  namespaces: MdocNameSpaces;
  /**
   *
   * The X509 certificate to use for signing the mDOC. The certificate MUST have a
   * publicJwk with key id configured, enabling signing with the KMS
   */
  issuerCertificate: X509Certificate;
  holderKey: PublicJwk;
};
//#endregion
export { MdocDeviceResponseOptions, MdocDeviceResponsePresentationDefinitionOptions, MdocDeviceResponseVerifyOptions, MdocDocumentRequest, MdocNameSpaces, MdocOpenId4VpDcApiDraft24SessionTranscriptOptions, MdocOpenId4VpDcApiSessionTranscriptOptions, MdocOpenId4VpDraft18SessionTranscriptOptions, MdocOpenId4VpSessionTranscriptOptions, MdocSessionTranscriptByteOptions, MdocSessionTranscriptOptions, MdocSignOptions, MdocStoreOptions, MdocVerifyOptions };
//# sourceMappingURL=MdocOptions.d.ts.map