"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RecoveryData = void 0;
/**
 * @internal this entity is meant for internal use only
 */
class RecoveryData {
    constructor(json) {
        if (!json.recipient || !json.encryptedSelf || !json.type)
            throw new Error(`Recovery data json is missing required properties.\n${JSON.stringify(json)}`);
        Object.assign(this, json);
    }
}
exports.RecoveryData = RecoveryData;
(function (RecoveryData) {
    /**
     * Represents possible types of recovery data.
     */
    let Type;
    (function (Type) {
        /**
         * This recovery data is meant to be used to recover a keypair of the recipient. This could be for making a key
         * available on another device, or for recovering a keypair that has been fully lost.
         */
        Type["KEYPAIR_RECOVERY"] = "KEYPAIR_RECOVERY";
        /**
         * This recovery data is meant to be used to recover an exchange key of the recipient. The main purpose of this
         * is to allow data owners to share data with other data owners that do not have created a keypair yet, but it
         * can also be used as part of the give-access-back recovery mechanism.
         */
        Type["EXCHANGE_KEY_RECOVERY"] = "EXCHANGE_KEY_RECOVERY";
    })(Type = RecoveryData.Type || (RecoveryData.Type = {}));
})(RecoveryData || (exports.RecoveryData = RecoveryData = {}));
//# sourceMappingURL=RecoveryData.js.map