import type { Client } from 'graphql-ws'; import type { IssuanceResponse, PhotoCaptureEventData, PhotoCaptureRequestInput, PhotoCaptureResponse, PresentationEventData, PresentationRequestInput, PresentationResponse } from './types'; import { type IssuanceEventData, type IssuanceRequestInput } from './types'; export declare class VerifiedOrchestrationClient { constructor({ url, accessToken }: { url: string; accessToken: string; }); url: string; accessToken: string; wsClient: Client; /** * Initiates an issuance request using the supplied input. * Returns an issuance request response (or throws an error). * Issuance events are received via the onIssuanceEvent callback. * * Issuance has the following steps: * #1 An issuance request is created and returned, it contains a QR code and URL, plus the request ID and expiry. * #2 For mobile apps, the URL can opened immediately to initiate the issuance process in Microsoft Authenticator. For web apps, the QR code should be displayed to be scanned via a mobile device to initiate issuance in Microsoft Authenticator. * #3 The onIssuanceEvent callback will receive issuance events (or an Error). The first event status will be 'issuance_retrieved' when the request has been opened by Microsoft Authenticator. If a PIN code has been specified in the issuance request, it must be entered by the user at this point. * #4 The final event status will be 'issuance_successful', indicating the issuance process has completed successfully. The issuance data is included with this event. * * @param input IssuanceRequestInput containing the necessary parameters for issuance. * @param onIssuanceEvent Callback function that will be invoked for issuance events or errors. * @param options Options to use polling (HTTP) instead of subscriptions (WebSockets). Note that the issuance event for `issuance_retrieved` is not returned when using polling. * @returns IssuanceResponse data containing the request ID, expiry, QR code and URL which must be opened on the mobile device by Microsoft Authenticator. * @throws An error if the issuance request creation fails. Subsequent errors will be returned via the onIssuanceEvent callback. */ createIssuanceRequest({ contractId, identityId, claims, pin, callback, expirationDate, faceCheckPhoto, photoCaptureRequestId }: IssuanceRequestInput, onIssuanceEvent: (event: IssuanceEventData | Error) => void, options?: { eventTimeout?: number; usePolling?: boolean; pollWaitInterval?: number; }): Promise; private subscribeToIssuanceEvent; private pollIssuanceEvent; /** * Initiates a presentation request using the supplied input. * Returns a presentation request response (or throws an error). * Presentation events are received via the onPresentationEvent callback. * * Presentation has the following steps: * #1 A presentation request is created and returned, it contains a QR code and URL, plus the request ID and expiry. * #2 For mobile apps, the URL can opened immediately to initiate the presentation process in Microsoft Authenticator. For web apps, the QR code should be displayed to be scanned via a mobile device to initiate presentation in Microsoft Authenticator. * #3 The onPresentationEvent callback will receive presentation events (or an Error). The first event status will be 'presentation_retrieved' when the request has been opened by Microsoft Authenticator. * #4 The final event status will be 'presentation_verified', indicating the presentation process has completed successfully. The presentation data is included with this event. * * @param input PresentationRequestInput containing the necessary parameters for presentation. * @param onPresentationEvent Callback function that will be invoked for presentation events or errors. * @param options Options to use polling (HTTP) instead of subscriptions (WebSockets). Note that the presentation event for `presentation_retrieved` is not returned when using polling. * @returns PresentationResponse data containing the request ID, expiry, QR code and URL which must be opened on the mobile device by Microsoft Authenticator. * @throws An error if the presentation request creation fails. Subsequent errors will be returned via the onPresentationEvent callback. */ createPresentationRequest({ callback, clientName, requestedCredentials, identityId }: PresentationRequestInput, onPresentationEvent: (event: PresentationEventData | Error) => void, options?: { eventTimeout?: number; usePolling?: boolean; pollWaitInterval?: number; }): Promise; /** * Initiates a presentation request for authorization. * For use by the OIDC provider login UI only, not for general use. */ createPresentationRequestForAuthn(onPresentationEvent: (event: PresentationEventData | Error) => void, options?: { eventTimeout?: number; usePolling?: boolean; pollWaitInterval?: number; }): Promise; private subscribeToPresentationEvent; private pollPresentationEvent; /** * Initiates a photo capture request, allowing a user to capture a photo to be used in a subsequent credential issuance. * Note that `createPhotoCaptureIssuance` runs both photo capture and issuance operations and is generally recommended for issuances requiring photo capture. * * Photo capture has the following steps: * #1 A photo capture request is created and returned, it contains a QR code and URL, plus the request ID. * #2 The URL or QR code can be opened in whatever device is being used to capture the photo. * #3 The onPhotoCaptureEvent callback will receive photo capture events. The first event status will be 'started' when the photo capture URL has been opened. * #4 The final event will be 'complete', indicating the photo has been captured successfully and is ready to use in a subsequent issuance. * * @param request PhotoCaptureRequestInput containing the necessary parameters for the photo capture request. * @param onPhotoCaptureEvent Callback function that will be invoked for photo capture events (or errors). * @param options Options to use polling (HTTP) instead of subscriptions (WebSockets). * @returns PhotoCaptureResponse data containing the request ID, expiry, QR code and URL which can be opened on whatever device is being used to capture the photo. * @throws An error if the presentation request creation fails. Subsequent errors will be returned via the onPhotoCaptureEvent callback. */ createPhotoCaptureRequest(request: PhotoCaptureRequestInput, onPhotoCaptureEvent: (event: PhotoCaptureEventData | Error) => void, options?: { eventTimeout?: number; usePolling?: boolean; pollWaitInterval?: number; }): Promise; private subscribeToPhotoCaptureEvent; private pollPhotoCaptureEvent; /** * Runs a photo capture request followed by an issuance request using the captured photo. * This function can be used for issuances that require a photo to be captured by the user. * The combined process has both photo capture and issuance steps. * * Photo capture steps: * #1 A photo capture request is created and returned, it contains a QR code and URL, plus the request ID. * #2 The URL or QR code can be opened in whatever device is being used to capture the photo. * #3 The onPhotoCaptureEvent callback will receive photo capture events. The first event status will be 'started' when the photo capture URL has been opened. * #4 The final event will be 'complete', indicating the photo has been captured successfully and is ready to use in a subsequent issuance. * #5 Issuance steps will then be initiated... * * Issuance steps: * #1 An issuance request is created and returned via the onIssuance callback function, it contains a QR code and URL, plus the request ID and expiry. * #2 For mobile apps, the URL can opened immediately to initiate the issuance process in Microsoft Authenticator. For web apps, the QR code should be displayed to be scanned via a mobile device to initiate issuance in Microsoft Authenticator. * #3 The onIssuanceEvent callback will receive issuance events (or an Error). The first event status will be 'issuance_retrieved' when the request has been opened by Microsoft Authenticator. If a PIN code has been specified in the issuance request, it must be entered by the user at this point. * #4 The final event status will be 'issuance_successful', indicating the issuance process has completed successfully. The issuance data is included with this event. * * @param input IssuanceRequestInput without faceCheckPhoto or photoCaptureRequestId. * @param onPhotoCaptureEvent Callback function that will be invoked for photo capture events. * @param onIssuance Callback function that will be invoked with the issuance request response (QR code and URL). * @param onIssuanceEvent Callback function that will be invoked for issuance events. * @param options Options to use polling (HTTP) instead of subscriptions (WebSockets). Note that the issuance event for `issuance_retrieved` is not returned when using polling. * @returns PhotoCaptureResponse data containing the request ID, expiry, QR code and URL which can be opened on whatever device is being used to capture the photo. * @throws An error if the presentation request creation fails. Subsequent errors will be returned via the onPhotoCaptureEvent, onIssuance and onIssuanceEvent callback functions. */ createPhotoCaptureIssuance(input: Omit, onPhotoCaptureEvent: (event: PhotoCaptureEventData | Error) => void, onIssuance: (response: IssuanceResponse) => void, onIssuanceEvent: (event: IssuanceEventData | Error) => void, options?: { eventTimeout?: number; usePolling?: boolean; pollWaitInterval?: number; }): Promise; private graphql; }