UNPKG

@piiano/vault-client

Version:

Piiano Vault generated typescript client

102 lines 4.86 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AnalysisClient = void 0; class AnalysisClient { constructor(httpRequest) { this.httpRequest = httpRequest; } /** * Contains PII data * Checks if text strings contain PII and classifies the findings. * * If you need to obtain details about the location of PII in your strings, use the [locate operation](/api/operations/analysis-locate). * * See the [Find PII](/guides/analyze-for-pii-data) guide for more information on using this operation. * * The role performing this operation must have the `CapAnalysisDetect` capability. * * See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * :::note * This operation uses AI to detect PII. As such, it's possible for PII to be missed or for non-PII text to be classified as PII. * ::: * :::info * This feature is enabled on [Vault SaaS](/guides/install/hosted) only. If you're interested in running it with a self-hosted deployment, please [contact us](https://www.piiano.com/contact-us). * ::: * * @returns AnalysisContainsResponseBody The request is successful. * @throws ApiError */ analysisContains({ adhocReason, reason, customAudit, reloadCache, requestBody, additionalHeaders = {}, } = {}) { return this.httpRequest.request({ method: 'POST', url: '/api/pvlt/1.0/data/analysis/contains', headers: additionalHeaders, query: { 'adhoc_reason': adhocReason, 'reason': reason, 'custom_audit': customAudit, 'reload_cache': reloadCache, }, body: requestBody, mediaType: 'application/json', errors: { 400: `The request is invalid.`, 401: `Authentication credentials are incorrect or missing.`, 403: `The caller doesn't have the required access rights.`, 404: `The requested resource is not found.`, 405: `The operation is not allowed.`, 409: `A conflict occurs.`, 410: `Access to a resource that is no longer available occurs.`, 500: `An error occurs on the server.`, 503: `The service is unavailable.`, }, }); } /** * Locate PII data * Locates the positions of PII data in text strings and classifies the findings. * * If you only need an indication of whether your strings contain PII, use the [contains operation](/api/operations/analysis-contains). * * See the [Find PII](/guides/analyze-for-pii-data) guide for more information on using this operation. * * The role performing this operation must have the `CapAnalysisLocate` capability. * * See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * * :::info * This feature is enabled on [Vault SaaS](/guides/install/hosted) only. If you're interested in running it with a self-hosted deployment, please [contact us](https://www.piiano.com/contact-us). * ::: * * @returns AnalysisLocateResponseBody The request is successful. * @throws ApiError */ analysisLocate({ adhocReason, reason, customAudit, reloadCache, requestBody, additionalHeaders = {}, } = {}) { return this.httpRequest.request({ method: 'POST', url: '/api/pvlt/1.0/data/analysis/locate', headers: additionalHeaders, query: { 'adhoc_reason': adhocReason, 'reason': reason, 'custom_audit': customAudit, 'reload_cache': reloadCache, }, body: requestBody, mediaType: 'application/json', errors: { 400: `The request is invalid.`, 401: `Authentication credentials are incorrect or missing.`, 403: `The caller doesn't have the required access rights.`, 404: `The requested resource is not found.`, 405: `The operation is not allowed.`, 409: `A conflict occurs.`, 410: `Access to a resource that is no longer available occurs.`, 500: `An error occurs on the server.`, 503: `The service is unavailable.`, }, }); } } exports.AnalysisClient = AnalysisClient; //# sourceMappingURL=AnalysisClient.js.map