UNPKG

@nevis-security/nevis-mobile-authentication-sdk-react

Version:

React Native plugin for Nevis Mobile Authentication SDK. Supports only mobile.

66 lines (60 loc) 2.53 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PendingOutOfBandOperationImpl = exports.PendingOutOfBandOperation = void 0; var _OutOfBandPayload = require("./OutOfBandPayload"); /** * Copyright © 2024 Nevis Security AG. All rights reserved. */ /** * The object defining a non-redeemed out-of-band operation as defined in the * {@link https://docs.nevis.net/nevisfido/reference-guide/uaf-http-api/device-service#get-device-out-of-band-operations | Get Device Out-of-Band Operations} * service. */ class PendingOutOfBandOperation { /** * The time the out-of-band operation was created (i.e. the time the dispatch * occurred). This can be used by the mobile clients to know which is the latest * operation for the device. */ /** * The name of the dispatcher used by the operation. This provides information * about how the out-of-band operation is transmitted to the mobile device. */ /** * The {@link OutOfBandPayload} object that can be used with the {@link OutOfBandOperation} * to continue with the operation. */ /** * Additional information that is not included in the {@link OutOfBandPayload}. * For instance, if this is an operation dispatched using the Firebase dispatcher, * this contains the push notification information in JSON format, as provided * as input of the dispatch request. */ /** * Alternate constructor that creates an {@link PendingOutOfBandOperation} from a json. * * @param json contains the source for instance creation. * @returns a {@link PendingOutOfBandOperation} instance. */ static fromJson(json) { return PendingOutOfBandOperationImpl.fromJson(json); } } exports.PendingOutOfBandOperation = PendingOutOfBandOperation; class PendingOutOfBandOperationImpl extends PendingOutOfBandOperation { constructor(creationTimeInEpochMillis, dispatchChannel, payload, additionalInformation) { super(); this.creationTimeInEpochMillis = creationTimeInEpochMillis; this.dispatchChannel = dispatchChannel; this.payload = payload; this.additionalInformation = additionalInformation; } static fromJson(json) { const payload = _OutOfBandPayload.OutOfBandPayload.fromJson(json.payload); return new PendingOutOfBandOperationImpl(json.creationTimeInEpochMillis, json.dispatchChannel, payload, json.additionalInformation); } } exports.PendingOutOfBandOperationImpl = PendingOutOfBandOperationImpl; //# sourceMappingURL=PendingOutOfBandOperation.js.map