"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.Pii = void 0;
const piiDetect_js_1 = require("../funcs/piiDetect.js");
const piiRedact_js_1 = require("../funcs/piiRedact.js");
const piiRestore_js_1 = require("../funcs/piiRestore.js");
const sdks_js_1 = require("../lib/sdks.js");
const fp_js_1 = require("../types/fp.js");
class Pii extends sdks_js_1.ClientSDK {
    /**
     * Detect PII
     *
     * @remarks
     * Reports whether the supplied text contains personally identifiable information, optionally with a per-type entity breakdown.
     */
    async detect(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, piiDetect_js_1.piiDetect)(this, request, options));
    }
    /**
     * Redact PII
     *
     * @remarks
     * Replaces detected PII with placeholders and returns the reverse mapping needed to restore the original text.
     */
    async redact(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, piiRedact_js_1.piiRedact)(this, request, options));
    }
    /**
     * Restore redacted text
     *
     * @remarks
     * Reverses a redaction, substituting placeholders back to their original values using the mapping returned by Redact.
     */
    async restore(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, piiRestore_js_1.piiRestore)(this, request, options));
    }
}
exports.Pii = Pii;
//# sourceMappingURL=pii.js.map