import { OpenId4VcVerificationSessionState } from "../OpenId4VcVerificationSessionState.mjs"; import { OpenId4VpAuthorizationRequestPayload, OpenId4VpAuthorizationResponsePayload } from "../../shared/models/index.mjs"; import { OpenId4VpVersion } from "../OpenId4VpVerifierServiceOptions.mjs"; import { BaseRecord, RecordTags, TagsBase } from "@credo-ts/core"; //#region src/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.d.ts type OpenId4VcVerificationSessionRecordTags = RecordTags; type DefaultOpenId4VcVerificationSessionRecordTags = { verifierId: string; state: OpenId4VcVerificationSessionState; nonce: string; payloadState?: string; authorizationRequestUri?: string; authorizationRequestId?: string; openId4VpVersion?: OpenId4VpVersion; }; interface OpenId4VcVerificationSessionRecordProps { id?: string; createdAt?: Date; tags?: TagsBase; verifierId: string; state: OpenId4VcVerificationSessionState; errorMessage?: string; authorizationRequestJwt?: string; authorizationRequestUri?: string; authorizationRequestId: string; authorizationRequestPayload?: OpenId4VpAuthorizationRequestPayload; authorizationResponseRedirectUri?: string; expiresAt: Date; authorizationResponsePayload?: OpenId4VpAuthorizationResponsePayload; /** * Presentation during issuance session. This is used when issuance of a credential requires a presentation, and helps * prevent session fixation attacks */ presentationDuringIssuanceSession?: string; /** * The version of openid4vp used for the request */ openId4VpVersion: OpenId4VpVersion; } declare class OpenId4VcVerificationSessionRecord extends BaseRecord { static readonly type = "OpenId4VcVerificationSessionRecord"; readonly type = "OpenId4VcVerificationSessionRecord"; /** * The id of the verifier that this session is for. */ verifierId: string; /** * The state of the verification session. */ state: OpenId4VcVerificationSessionState; /** * Optional error message of the error that occurred during the verification session. Will be set when state is {@link OpenId4VcVerificationSessionState.Error} */ errorMessage?: string; /** * The signed JWT containing the authorization request */ authorizationRequestJwt?: string; /** * Authorization request payload. This should be used only for unsigned requests */ authorizationRequestPayload?: OpenId4VpAuthorizationRequestPayload; /** * URI of the authorization request. This is the url that can be used to * retrieve the authorization request. * * Not used for requests with response_mode of dc_api or dc_api.jwt */ authorizationRequestUri?: string; /** * The public id for the authorization request. This is used in the authorization * request uri. * * @since 0.6 */ authorizationRequestId?: string; /** * The version of OpenID4VP used. * * If `v1` is used this is always defined. Otherwise it could be both * `v1.draft21` or `v1.draft24`. * * You can detect this based on: * - if `client_id_scheme` is defined -> `v1.draft21` * - otherwise `v1.draft24` * * @since 0.6 */ openId4VpVersion?: OpenId4VpVersion; /** * The time at which the authorization request expires. * * @since 0.6 */ expiresAt?: Date; /** * The payload of the received authorization response */ authorizationResponsePayload?: OpenId4VpAuthorizationResponsePayload; /** * Presentation during issuance session. This is used when issuance of a credential requires a presentation, and helps * prevent session fixation attacks */ presentationDuringIssuanceSession?: string; /** * Redirect uri that should be used in the authorization response. This will be included in both error and success * responses. * * @since 0.6 */ authorizationResponseRedirectUri?: string; constructor(props: OpenId4VcVerificationSessionRecordProps); get request(): string | OpenId4VpAuthorizationRequestPayload; get requestPayload(): OpenId4VpAuthorizationRequestPayload; assertState(expectedStates: OpenId4VcVerificationSessionState | OpenId4VcVerificationSessionState[]): void; getTags(): { verifierId: string; state: OpenId4VcVerificationSessionState; nonce: string; payloadState: string | undefined; authorizationRequestUri: string | undefined; authorizationRequestId: string | undefined; openId4VpVersion: OpenId4VpVersion | undefined; }; } //#endregion export { DefaultOpenId4VcVerificationSessionRecordTags, OpenId4VcVerificationSessionRecord, OpenId4VcVerificationSessionRecordProps, OpenId4VcVerificationSessionRecordTags }; //# sourceMappingURL=OpenId4VcVerificationSessionRecord.d.mts.map