@quba/sensitive-data-protection 0.0.7 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +91 -13
- package/dist/index.cjs +895 -327
- package/dist/index.d.cts +1024 -422
- package/dist/index.d.mts +1024 -422
- package/dist/index.mjs +833 -315
- package/docs/AnonymizeRequestBody.md +3 -0
- package/docs/AnonymizeRequestBodyRulesInner.md +1 -1
- package/docs/AnonymizeResponseBody.md +5 -2
- package/docs/AnonymizeResponseBodyResultsInner.md +44 -0
- package/docs/CreatePolicyRequest.md +36 -0
- package/docs/DetectRule.md +37 -0
- package/docs/DetectRuleEntitiesInner.md +36 -0
- package/docs/EncryptRule.md +2 -1
- package/docs/ListPolicies200Response.md +34 -0
- package/docs/MaskRule.md +2 -1
- package/docs/ModelEntity.md +1 -0
- package/docs/PoliciesApi.md +360 -0
- package/docs/Policy.md +44 -0
- package/docs/PolicyDocument.md +41 -0
- package/docs/PolicyDocumentRulesInner.md +46 -0
- package/docs/PolicySummary.md +42 -0
- package/docs/RedactRule.md +2 -1
- package/docs/RegexEntity.md +1 -0
- package/docs/ReplaceRule.md +2 -1
- package/docs/SHA256Rule.md +2 -1
- package/docs/SHA512Rule.md +2 -1
- package/docs/ScanRequestBody.md +1 -0
- package/docs/ScanResponseBody.md +3 -0
- package/docs/ScanResult.md +1 -0
- package/docs/SensitiveDataProtectionApi.md +23 -10
- package/docs/UpdatePolicyRequest.md +36 -0
- package/docs/Usage.md +37 -0
- package/docs/ValidationError.md +4 -0
- package/package.json +4 -3
package/dist/index.cjs
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
//#region src/runtime.ts
|
|
3
3
|
/**
|
|
4
4
|
* Sensitive Data Protection API
|
|
5
|
-
*
|
|
5
|
+
* Detect and de-identify sensitive data (PII) in text. Use `scan` to locate sensitive entities such as emails, phone numbers, and names, and `anonymize` to transform them using configurable rules (redact, mask, replace, hash, or encrypt).
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 0.0
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
const BASE_PATH = "https://
|
|
14
|
+
const BASE_PATH = "https://www.quba.co/api/sdp".replace(/\/+$/, "");
|
|
15
15
|
var Configuration = class {
|
|
16
16
|
constructor(configuration = {}) {
|
|
17
17
|
this.configuration = configuration;
|
|
@@ -264,514 +264,805 @@ var TextApiResponse = class {
|
|
|
264
264
|
};
|
|
265
265
|
|
|
266
266
|
//#endregion
|
|
267
|
-
//#region src/models/
|
|
267
|
+
//#region src/models/DetectRuleEntitiesInner.ts
|
|
268
268
|
/**
|
|
269
|
-
*
|
|
269
|
+
* @export
|
|
270
|
+
*/
|
|
271
|
+
const DetectRuleEntitiesInnerTypeEnum = {
|
|
272
|
+
model: "model",
|
|
273
|
+
regex: "regex"
|
|
274
|
+
};
|
|
275
|
+
/**
|
|
276
|
+
* Check if a given object implements the DetectRuleEntitiesInner interface.
|
|
270
277
|
*/
|
|
271
|
-
function
|
|
278
|
+
function instanceOfDetectRuleEntitiesInner(value) {
|
|
279
|
+
if (!("value" in value) || value["value"] === void 0) return false;
|
|
272
280
|
return true;
|
|
273
281
|
}
|
|
274
|
-
function
|
|
275
|
-
return
|
|
282
|
+
function DetectRuleEntitiesInnerFromJSON(json) {
|
|
283
|
+
return DetectRuleEntitiesInnerFromJSONTyped(json, false);
|
|
276
284
|
}
|
|
277
|
-
function
|
|
278
|
-
return json;
|
|
285
|
+
function DetectRuleEntitiesInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
286
|
+
if (json == null) return json;
|
|
287
|
+
return {
|
|
288
|
+
"type": json["type"] == null ? void 0 : json["type"],
|
|
289
|
+
"value": json["value"]
|
|
290
|
+
};
|
|
279
291
|
}
|
|
280
|
-
function
|
|
281
|
-
return
|
|
292
|
+
function DetectRuleEntitiesInnerToJSON(json) {
|
|
293
|
+
return DetectRuleEntitiesInnerToJSONTyped(json, false);
|
|
282
294
|
}
|
|
283
|
-
function
|
|
284
|
-
return value;
|
|
295
|
+
function DetectRuleEntitiesInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
296
|
+
if (value == null) return value;
|
|
297
|
+
return {
|
|
298
|
+
"type": value["type"],
|
|
299
|
+
"value": value["value"]
|
|
300
|
+
};
|
|
285
301
|
}
|
|
286
302
|
|
|
287
303
|
//#endregion
|
|
288
|
-
//#region src/models/
|
|
304
|
+
//#region src/models/AnonymizeRequestBodyRulesInner.ts
|
|
289
305
|
/**
|
|
290
306
|
* @export
|
|
291
307
|
*/
|
|
292
|
-
const
|
|
308
|
+
const AnonymizeRequestBodyRulesInnerTypeEnum = {
|
|
309
|
+
replace: "replace",
|
|
310
|
+
redact: "redact",
|
|
311
|
+
sha256: "sha256",
|
|
312
|
+
sha512: "sha512",
|
|
313
|
+
encrypt: "encrypt",
|
|
314
|
+
mask: "mask",
|
|
315
|
+
detect: "detect"
|
|
316
|
+
};
|
|
293
317
|
/**
|
|
294
|
-
* Check if a given object implements the
|
|
318
|
+
* Check if a given object implements the AnonymizeRequestBodyRulesInner interface.
|
|
295
319
|
*/
|
|
296
|
-
function
|
|
320
|
+
function instanceOfAnonymizeRequestBodyRulesInner(value) {
|
|
297
321
|
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
298
322
|
return true;
|
|
299
323
|
}
|
|
300
|
-
function
|
|
301
|
-
return
|
|
324
|
+
function AnonymizeRequestBodyRulesInnerFromJSON(json) {
|
|
325
|
+
return AnonymizeRequestBodyRulesInnerFromJSONTyped(json, false);
|
|
302
326
|
}
|
|
303
|
-
function
|
|
327
|
+
function AnonymizeRequestBodyRulesInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
304
328
|
if (json == null) return json;
|
|
305
329
|
return {
|
|
306
330
|
"type": json["type"] == null ? void 0 : json["type"],
|
|
307
|
-
"entities":
|
|
308
|
-
"
|
|
331
|
+
"entities": json["entities"].map(DetectRuleEntitiesInnerFromJSON),
|
|
332
|
+
"replacement": json["replacement"] == null ? void 0 : json["replacement"],
|
|
333
|
+
"key": json["key"] == null ? void 0 : json["key"],
|
|
334
|
+
"masking_char": json["masking_char"] == null ? void 0 : json["masking_char"],
|
|
335
|
+
"chars_to_mask": json["chars_to_mask"] == null ? void 0 : json["chars_to_mask"],
|
|
336
|
+
"from_end": json["from_end"] == null ? void 0 : json["from_end"]
|
|
309
337
|
};
|
|
310
338
|
}
|
|
311
|
-
function
|
|
312
|
-
return
|
|
339
|
+
function AnonymizeRequestBodyRulesInnerToJSON(json) {
|
|
340
|
+
return AnonymizeRequestBodyRulesInnerToJSONTyped(json, false);
|
|
313
341
|
}
|
|
314
|
-
function
|
|
342
|
+
function AnonymizeRequestBodyRulesInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
315
343
|
if (value == null) return value;
|
|
316
344
|
return {
|
|
317
345
|
"type": value["type"],
|
|
318
|
-
"entities":
|
|
319
|
-
"
|
|
346
|
+
"entities": value["entities"].map(DetectRuleEntitiesInnerToJSON),
|
|
347
|
+
"replacement": value["replacement"],
|
|
348
|
+
"key": value["key"],
|
|
349
|
+
"masking_char": value["masking_char"],
|
|
350
|
+
"chars_to_mask": value["chars_to_mask"],
|
|
351
|
+
"from_end": value["from_end"]
|
|
320
352
|
};
|
|
321
353
|
}
|
|
322
354
|
|
|
323
355
|
//#endregion
|
|
324
|
-
//#region src/models/
|
|
356
|
+
//#region src/models/AnonymizeRequestBody.ts
|
|
357
|
+
/**
|
|
358
|
+
* Check if a given object implements the AnonymizeRequestBody interface.
|
|
359
|
+
*/
|
|
360
|
+
function instanceOfAnonymizeRequestBody(value) {
|
|
361
|
+
if (!("text" in value) || value["text"] === void 0) return false;
|
|
362
|
+
return true;
|
|
363
|
+
}
|
|
364
|
+
function AnonymizeRequestBodyFromJSON(json) {
|
|
365
|
+
return AnonymizeRequestBodyFromJSONTyped(json, false);
|
|
366
|
+
}
|
|
367
|
+
function AnonymizeRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
368
|
+
if (json == null) return json;
|
|
369
|
+
return {
|
|
370
|
+
"text": json["text"],
|
|
371
|
+
"rules": json["rules"] == null ? void 0 : json["rules"].map(AnonymizeRequestBodyRulesInnerFromJSON),
|
|
372
|
+
"confidence_threshold": json["confidence_threshold"] == null ? void 0 : json["confidence_threshold"],
|
|
373
|
+
"policy": json["policy"] == null ? void 0 : json["policy"]
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
function AnonymizeRequestBodyToJSON(json) {
|
|
377
|
+
return AnonymizeRequestBodyToJSONTyped(json, false);
|
|
378
|
+
}
|
|
379
|
+
function AnonymizeRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
380
|
+
if (value == null) return value;
|
|
381
|
+
return {
|
|
382
|
+
"text": value["text"],
|
|
383
|
+
"rules": value["rules"] == null ? void 0 : value["rules"].map(AnonymizeRequestBodyRulesInnerToJSON),
|
|
384
|
+
"confidence_threshold": value["confidence_threshold"],
|
|
385
|
+
"policy": value["policy"]
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
//#endregion
|
|
390
|
+
//#region src/models/Usage.ts
|
|
391
|
+
/**
|
|
392
|
+
* Check if a given object implements the Usage interface.
|
|
393
|
+
*/
|
|
394
|
+
function instanceOfUsage(value) {
|
|
395
|
+
if (!("input_tokens" in value) || value["input_tokens"] === void 0) return false;
|
|
396
|
+
if (!("inference_ms" in value) || value["inference_ms"] === void 0) return false;
|
|
397
|
+
return true;
|
|
398
|
+
}
|
|
399
|
+
function UsageFromJSON(json) {
|
|
400
|
+
return UsageFromJSONTyped(json, false);
|
|
401
|
+
}
|
|
402
|
+
function UsageFromJSONTyped(json, ignoreDiscriminator) {
|
|
403
|
+
if (json == null) return json;
|
|
404
|
+
return {
|
|
405
|
+
"input_tokens": json["input_tokens"],
|
|
406
|
+
"inference_ms": json["inference_ms"]
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
function UsageToJSON(json) {
|
|
410
|
+
return UsageToJSONTyped(json, false);
|
|
411
|
+
}
|
|
412
|
+
function UsageToJSONTyped(value, ignoreDiscriminator = false) {
|
|
413
|
+
if (value == null) return value;
|
|
414
|
+
return {
|
|
415
|
+
"input_tokens": value["input_tokens"],
|
|
416
|
+
"inference_ms": value["inference_ms"]
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
//#endregion
|
|
421
|
+
//#region src/models/TextRange.ts
|
|
422
|
+
/**
|
|
423
|
+
* Check if a given object implements the TextRange interface.
|
|
424
|
+
*/
|
|
425
|
+
function instanceOfTextRange(value) {
|
|
426
|
+
if (!("start" in value) || value["start"] === void 0) return false;
|
|
427
|
+
if (!("end" in value) || value["end"] === void 0) return false;
|
|
428
|
+
if (!("value" in value) || value["value"] === void 0) return false;
|
|
429
|
+
return true;
|
|
430
|
+
}
|
|
431
|
+
function TextRangeFromJSON(json) {
|
|
432
|
+
return TextRangeFromJSONTyped(json, false);
|
|
433
|
+
}
|
|
434
|
+
function TextRangeFromJSONTyped(json, ignoreDiscriminator) {
|
|
435
|
+
if (json == null) return json;
|
|
436
|
+
return {
|
|
437
|
+
"start": json["start"],
|
|
438
|
+
"end": json["end"],
|
|
439
|
+
"value": json["value"]
|
|
440
|
+
};
|
|
441
|
+
}
|
|
442
|
+
function TextRangeToJSON(json) {
|
|
443
|
+
return TextRangeToJSONTyped(json, false);
|
|
444
|
+
}
|
|
445
|
+
function TextRangeToJSONTyped(value, ignoreDiscriminator = false) {
|
|
446
|
+
if (value == null) return value;
|
|
447
|
+
return {
|
|
448
|
+
"start": value["start"],
|
|
449
|
+
"end": value["end"],
|
|
450
|
+
"value": value["value"]
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
//#endregion
|
|
455
|
+
//#region src/models/AnonymizeResponseBodyResultsInner.ts
|
|
325
456
|
/**
|
|
326
457
|
* @export
|
|
327
458
|
*/
|
|
328
|
-
const
|
|
459
|
+
const AnonymizeResponseBodyResultsInnerTypeEnum = {
|
|
460
|
+
model: "model",
|
|
461
|
+
regex: "regex"
|
|
462
|
+
};
|
|
329
463
|
/**
|
|
330
|
-
* Check if a given object implements the
|
|
464
|
+
* Check if a given object implements the AnonymizeResponseBodyResultsInner interface.
|
|
331
465
|
*/
|
|
332
|
-
function
|
|
466
|
+
function instanceOfAnonymizeResponseBodyResultsInner(value) {
|
|
467
|
+
if (!("rule" in value) || value["rule"] === void 0) return false;
|
|
468
|
+
if (!("value" in value) || value["value"] === void 0) return false;
|
|
469
|
+
if (!("input" in value) || value["input"] === void 0) return false;
|
|
470
|
+
if (!("output" in value) || value["output"] === void 0) return false;
|
|
471
|
+
return true;
|
|
472
|
+
}
|
|
473
|
+
function AnonymizeResponseBodyResultsInnerFromJSON(json) {
|
|
474
|
+
return AnonymizeResponseBodyResultsInnerFromJSONTyped(json, false);
|
|
475
|
+
}
|
|
476
|
+
function AnonymizeResponseBodyResultsInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
477
|
+
if (json == null) return json;
|
|
478
|
+
return {
|
|
479
|
+
"type": json["type"] == null ? void 0 : json["type"],
|
|
480
|
+
"rule": json["rule"],
|
|
481
|
+
"value": json["value"],
|
|
482
|
+
"input": TextRangeFromJSON(json["input"]),
|
|
483
|
+
"output": TextRangeFromJSON(json["output"]),
|
|
484
|
+
"score": json["score"] == null ? void 0 : json["score"]
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
function AnonymizeResponseBodyResultsInnerToJSON(json) {
|
|
488
|
+
return AnonymizeResponseBodyResultsInnerToJSONTyped(json, false);
|
|
489
|
+
}
|
|
490
|
+
function AnonymizeResponseBodyResultsInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
491
|
+
if (value == null) return value;
|
|
492
|
+
return {
|
|
493
|
+
"type": value["type"],
|
|
494
|
+
"rule": value["rule"],
|
|
495
|
+
"value": value["value"],
|
|
496
|
+
"input": TextRangeToJSON(value["input"]),
|
|
497
|
+
"output": TextRangeToJSON(value["output"]),
|
|
498
|
+
"score": value["score"]
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
//#endregion
|
|
503
|
+
//#region src/models/AnonymizeResponseBody.ts
|
|
504
|
+
/**
|
|
505
|
+
* Check if a given object implements the AnonymizeResponseBody interface.
|
|
506
|
+
*/
|
|
507
|
+
function instanceOfAnonymizeResponseBody(value) {
|
|
508
|
+
if (!("text" in value) || value["text"] === void 0) return false;
|
|
509
|
+
if (!("usage" in value) || value["usage"] === void 0) return false;
|
|
510
|
+
return true;
|
|
511
|
+
}
|
|
512
|
+
function AnonymizeResponseBodyFromJSON(json) {
|
|
513
|
+
return AnonymizeResponseBodyFromJSONTyped(json, false);
|
|
514
|
+
}
|
|
515
|
+
function AnonymizeResponseBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
516
|
+
if (json == null) return json;
|
|
517
|
+
return {
|
|
518
|
+
"text": json["text"],
|
|
519
|
+
"results": json["results"] == null ? void 0 : json["results"].map(AnonymizeResponseBodyResultsInnerFromJSON),
|
|
520
|
+
"usage": UsageFromJSON(json["usage"])
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
function AnonymizeResponseBodyToJSON(json) {
|
|
524
|
+
return AnonymizeResponseBodyToJSONTyped(json, false);
|
|
525
|
+
}
|
|
526
|
+
function AnonymizeResponseBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
527
|
+
if (value == null) return value;
|
|
528
|
+
return {
|
|
529
|
+
"text": value["text"],
|
|
530
|
+
"results": value["results"] == null ? void 0 : value["results"].map(AnonymizeResponseBodyResultsInnerToJSON),
|
|
531
|
+
"usage": UsageToJSON(value["usage"])
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
//#endregion
|
|
536
|
+
//#region src/models/PolicyDocumentRulesInner.ts
|
|
537
|
+
/**
|
|
538
|
+
* @export
|
|
539
|
+
*/
|
|
540
|
+
const PolicyDocumentRulesInnerTypeEnum = {
|
|
541
|
+
detect: "detect",
|
|
542
|
+
redact: "redact",
|
|
543
|
+
replace: "replace",
|
|
544
|
+
mask: "mask",
|
|
545
|
+
sha256: "sha256",
|
|
546
|
+
sha512: "sha512",
|
|
547
|
+
encrypt: "encrypt"
|
|
548
|
+
};
|
|
549
|
+
/**
|
|
550
|
+
* Check if a given object implements the PolicyDocumentRulesInner interface.
|
|
551
|
+
*/
|
|
552
|
+
function instanceOfPolicyDocumentRulesInner(value) {
|
|
333
553
|
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
334
554
|
return true;
|
|
335
555
|
}
|
|
336
|
-
function
|
|
337
|
-
return
|
|
556
|
+
function PolicyDocumentRulesInnerFromJSON(json) {
|
|
557
|
+
return PolicyDocumentRulesInnerFromJSONTyped(json, false);
|
|
338
558
|
}
|
|
339
|
-
function
|
|
559
|
+
function PolicyDocumentRulesInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
340
560
|
if (json == null) return json;
|
|
341
561
|
return {
|
|
342
562
|
"type": json["type"] == null ? void 0 : json["type"],
|
|
343
|
-
"entities":
|
|
563
|
+
"entities": json["entities"].map(DetectRuleEntitiesInnerFromJSON),
|
|
564
|
+
"replacement": json["replacement"] == null ? void 0 : json["replacement"],
|
|
344
565
|
"masking_char": json["masking_char"] == null ? void 0 : json["masking_char"],
|
|
345
566
|
"chars_to_mask": json["chars_to_mask"] == null ? void 0 : json["chars_to_mask"],
|
|
346
|
-
"from_end": json["from_end"] == null ? void 0 : json["from_end"]
|
|
567
|
+
"from_end": json["from_end"] == null ? void 0 : json["from_end"],
|
|
568
|
+
"key": json["key"] == null ? void 0 : json["key"]
|
|
347
569
|
};
|
|
348
570
|
}
|
|
349
|
-
function
|
|
350
|
-
return
|
|
571
|
+
function PolicyDocumentRulesInnerToJSON(json) {
|
|
572
|
+
return PolicyDocumentRulesInnerToJSONTyped(json, false);
|
|
351
573
|
}
|
|
352
|
-
function
|
|
574
|
+
function PolicyDocumentRulesInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
353
575
|
if (value == null) return value;
|
|
354
576
|
return {
|
|
355
577
|
"type": value["type"],
|
|
356
|
-
"entities":
|
|
578
|
+
"entities": value["entities"].map(DetectRuleEntitiesInnerToJSON),
|
|
579
|
+
"replacement": value["replacement"],
|
|
357
580
|
"masking_char": value["masking_char"],
|
|
358
581
|
"chars_to_mask": value["chars_to_mask"],
|
|
359
|
-
"from_end": value["from_end"]
|
|
582
|
+
"from_end": value["from_end"],
|
|
583
|
+
"key": value["key"]
|
|
360
584
|
};
|
|
361
585
|
}
|
|
362
586
|
|
|
363
587
|
//#endregion
|
|
364
|
-
//#region src/models/
|
|
588
|
+
//#region src/models/PolicyDocument.ts
|
|
365
589
|
/**
|
|
366
590
|
* @export
|
|
367
591
|
*/
|
|
368
|
-
const
|
|
592
|
+
const PolicyDocumentSchemaVersionEnum = { NUMBER_1: 1 };
|
|
369
593
|
/**
|
|
370
|
-
* Check if a given object implements the
|
|
594
|
+
* Check if a given object implements the PolicyDocument interface.
|
|
371
595
|
*/
|
|
372
|
-
function
|
|
373
|
-
if (!("
|
|
596
|
+
function instanceOfPolicyDocument(value) {
|
|
597
|
+
if (!("schema_version" in value) || value["schema_version"] === void 0) return false;
|
|
598
|
+
if (!("rules" in value) || value["rules"] === void 0) return false;
|
|
374
599
|
return true;
|
|
375
600
|
}
|
|
376
|
-
function
|
|
377
|
-
return
|
|
601
|
+
function PolicyDocumentFromJSON(json) {
|
|
602
|
+
return PolicyDocumentFromJSONTyped(json, false);
|
|
378
603
|
}
|
|
379
|
-
function
|
|
604
|
+
function PolicyDocumentFromJSONTyped(json, ignoreDiscriminator) {
|
|
380
605
|
if (json == null) return json;
|
|
381
606
|
return {
|
|
382
|
-
"
|
|
383
|
-
"
|
|
607
|
+
"schema_version": json["schema_version"],
|
|
608
|
+
"name": json["name"] == null ? void 0 : json["name"],
|
|
609
|
+
"confidence_threshold": json["confidence_threshold"] == null ? void 0 : json["confidence_threshold"],
|
|
610
|
+
"rules": json["rules"].map(PolicyDocumentRulesInnerFromJSON)
|
|
384
611
|
};
|
|
385
612
|
}
|
|
386
|
-
function
|
|
387
|
-
return
|
|
613
|
+
function PolicyDocumentToJSON(json) {
|
|
614
|
+
return PolicyDocumentToJSONTyped(json, false);
|
|
388
615
|
}
|
|
389
|
-
function
|
|
616
|
+
function PolicyDocumentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
390
617
|
if (value == null) return value;
|
|
391
618
|
return {
|
|
392
|
-
"
|
|
393
|
-
"
|
|
619
|
+
"schema_version": value["schema_version"],
|
|
620
|
+
"name": value["name"],
|
|
621
|
+
"confidence_threshold": value["confidence_threshold"],
|
|
622
|
+
"rules": value["rules"].map(PolicyDocumentRulesInnerToJSON)
|
|
394
623
|
};
|
|
395
624
|
}
|
|
396
625
|
|
|
397
626
|
//#endregion
|
|
398
|
-
//#region src/models/
|
|
627
|
+
//#region src/models/CreatePolicyRequest.ts
|
|
628
|
+
/**
|
|
629
|
+
* Check if a given object implements the CreatePolicyRequest interface.
|
|
630
|
+
*/
|
|
631
|
+
function instanceOfCreatePolicyRequest(value) {
|
|
632
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
633
|
+
if (!("document" in value) || value["document"] === void 0) return false;
|
|
634
|
+
return true;
|
|
635
|
+
}
|
|
636
|
+
function CreatePolicyRequestFromJSON(json) {
|
|
637
|
+
return CreatePolicyRequestFromJSONTyped(json, false);
|
|
638
|
+
}
|
|
639
|
+
function CreatePolicyRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
640
|
+
if (json == null) return json;
|
|
641
|
+
return {
|
|
642
|
+
"name": json["name"],
|
|
643
|
+
"document": PolicyDocumentFromJSON(json["document"])
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
function CreatePolicyRequestToJSON(json) {
|
|
647
|
+
return CreatePolicyRequestToJSONTyped(json, false);
|
|
648
|
+
}
|
|
649
|
+
function CreatePolicyRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
650
|
+
if (value == null) return value;
|
|
651
|
+
return {
|
|
652
|
+
"name": value["name"],
|
|
653
|
+
"document": PolicyDocumentToJSON(value["document"])
|
|
654
|
+
};
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
//#endregion
|
|
658
|
+
//#region src/models/DetectRule.ts
|
|
399
659
|
/**
|
|
400
660
|
* @export
|
|
401
661
|
*/
|
|
402
|
-
const
|
|
662
|
+
const DetectRuleTypeEnum = { detect: "detect" };
|
|
403
663
|
/**
|
|
404
|
-
* Check if a given object implements the
|
|
664
|
+
* Check if a given object implements the DetectRule interface.
|
|
405
665
|
*/
|
|
406
|
-
function
|
|
666
|
+
function instanceOfDetectRule(value) {
|
|
407
667
|
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
408
668
|
return true;
|
|
409
669
|
}
|
|
410
|
-
function
|
|
411
|
-
return
|
|
670
|
+
function DetectRuleFromJSON(json) {
|
|
671
|
+
return DetectRuleFromJSONTyped(json, false);
|
|
412
672
|
}
|
|
413
|
-
function
|
|
673
|
+
function DetectRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
414
674
|
if (json == null) return json;
|
|
415
675
|
return {
|
|
416
676
|
"type": json["type"] == null ? void 0 : json["type"],
|
|
417
|
-
"entities":
|
|
418
|
-
"replacement": json["replacement"] == null ? void 0 : json["replacement"]
|
|
677
|
+
"entities": json["entities"].map(DetectRuleEntitiesInnerFromJSON)
|
|
419
678
|
};
|
|
420
679
|
}
|
|
421
|
-
function
|
|
422
|
-
return
|
|
680
|
+
function DetectRuleToJSON(json) {
|
|
681
|
+
return DetectRuleToJSONTyped(json, false);
|
|
423
682
|
}
|
|
424
|
-
function
|
|
683
|
+
function DetectRuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
425
684
|
if (value == null) return value;
|
|
426
685
|
return {
|
|
427
686
|
"type": value["type"],
|
|
428
|
-
"entities":
|
|
429
|
-
"replacement": value["replacement"]
|
|
687
|
+
"entities": value["entities"].map(DetectRuleEntitiesInnerToJSON)
|
|
430
688
|
};
|
|
431
689
|
}
|
|
432
690
|
|
|
433
691
|
//#endregion
|
|
434
|
-
//#region src/models/
|
|
692
|
+
//#region src/models/EncryptRule.ts
|
|
435
693
|
/**
|
|
436
694
|
* @export
|
|
437
695
|
*/
|
|
438
|
-
const
|
|
696
|
+
const EncryptRuleTypeEnum = { encrypt: "encrypt" };
|
|
439
697
|
/**
|
|
440
|
-
* Check if a given object implements the
|
|
698
|
+
* Check if a given object implements the EncryptRule interface.
|
|
441
699
|
*/
|
|
442
|
-
function
|
|
700
|
+
function instanceOfEncryptRule(value) {
|
|
443
701
|
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
444
702
|
return true;
|
|
445
703
|
}
|
|
446
|
-
function
|
|
447
|
-
return
|
|
704
|
+
function EncryptRuleFromJSON(json) {
|
|
705
|
+
return EncryptRuleFromJSONTyped(json, false);
|
|
448
706
|
}
|
|
449
|
-
function
|
|
707
|
+
function EncryptRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
450
708
|
if (json == null) return json;
|
|
451
709
|
return {
|
|
452
710
|
"type": json["type"] == null ? void 0 : json["type"],
|
|
453
|
-
"entities":
|
|
711
|
+
"entities": json["entities"].map(DetectRuleEntitiesInnerFromJSON),
|
|
712
|
+
"key": json["key"] == null ? void 0 : json["key"]
|
|
454
713
|
};
|
|
455
714
|
}
|
|
456
|
-
function
|
|
457
|
-
return
|
|
715
|
+
function EncryptRuleToJSON(json) {
|
|
716
|
+
return EncryptRuleToJSONTyped(json, false);
|
|
458
717
|
}
|
|
459
|
-
function
|
|
718
|
+
function EncryptRuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
460
719
|
if (value == null) return value;
|
|
461
720
|
return {
|
|
462
721
|
"type": value["type"],
|
|
463
|
-
"entities":
|
|
722
|
+
"entities": value["entities"].map(DetectRuleEntitiesInnerToJSON),
|
|
723
|
+
"key": value["key"]
|
|
464
724
|
};
|
|
465
725
|
}
|
|
466
726
|
|
|
467
727
|
//#endregion
|
|
468
|
-
//#region src/models/
|
|
728
|
+
//#region src/models/ValidationErrorLocInner.ts
|
|
469
729
|
/**
|
|
470
|
-
*
|
|
730
|
+
* Check if a given object implements the ValidationErrorLocInner interface.
|
|
471
731
|
*/
|
|
472
|
-
|
|
732
|
+
function instanceOfValidationErrorLocInner(value) {
|
|
733
|
+
return true;
|
|
734
|
+
}
|
|
735
|
+
function ValidationErrorLocInnerFromJSON(json) {
|
|
736
|
+
return ValidationErrorLocInnerFromJSONTyped(json, false);
|
|
737
|
+
}
|
|
738
|
+
function ValidationErrorLocInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
739
|
+
return json;
|
|
740
|
+
}
|
|
741
|
+
function ValidationErrorLocInnerToJSON(json) {
|
|
742
|
+
return ValidationErrorLocInnerToJSONTyped(json, false);
|
|
743
|
+
}
|
|
744
|
+
function ValidationErrorLocInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
745
|
+
return value;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
//#endregion
|
|
749
|
+
//#region src/models/ValidationError.ts
|
|
473
750
|
/**
|
|
474
|
-
* Check if a given object implements the
|
|
751
|
+
* Check if a given object implements the ValidationError interface.
|
|
475
752
|
*/
|
|
476
|
-
function
|
|
477
|
-
if (!("
|
|
753
|
+
function instanceOfValidationError(value) {
|
|
754
|
+
if (!("loc" in value) || value["loc"] === void 0) return false;
|
|
755
|
+
if (!("msg" in value) || value["msg"] === void 0) return false;
|
|
756
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
478
757
|
return true;
|
|
479
758
|
}
|
|
480
|
-
function
|
|
481
|
-
return
|
|
759
|
+
function ValidationErrorFromJSON(json) {
|
|
760
|
+
return ValidationErrorFromJSONTyped(json, false);
|
|
482
761
|
}
|
|
483
|
-
function
|
|
762
|
+
function ValidationErrorFromJSONTyped(json, ignoreDiscriminator) {
|
|
484
763
|
if (json == null) return json;
|
|
485
764
|
return {
|
|
486
|
-
"
|
|
487
|
-
"
|
|
765
|
+
"loc": json["loc"].map(ValidationErrorLocInnerFromJSON),
|
|
766
|
+
"msg": json["msg"],
|
|
767
|
+
"type": json["type"],
|
|
768
|
+
"input": json["input"] == null ? void 0 : json["input"],
|
|
769
|
+
"ctx": json["ctx"] == null ? void 0 : json["ctx"]
|
|
488
770
|
};
|
|
489
771
|
}
|
|
490
|
-
function
|
|
491
|
-
return
|
|
772
|
+
function ValidationErrorToJSON(json) {
|
|
773
|
+
return ValidationErrorToJSONTyped(json, false);
|
|
492
774
|
}
|
|
493
|
-
function
|
|
775
|
+
function ValidationErrorToJSONTyped(value, ignoreDiscriminator = false) {
|
|
494
776
|
if (value == null) return value;
|
|
495
777
|
return {
|
|
778
|
+
"loc": value["loc"].map(ValidationErrorLocInnerToJSON),
|
|
779
|
+
"msg": value["msg"],
|
|
496
780
|
"type": value["type"],
|
|
497
|
-
"
|
|
781
|
+
"input": value["input"],
|
|
782
|
+
"ctx": value["ctx"]
|
|
498
783
|
};
|
|
499
784
|
}
|
|
500
785
|
|
|
501
786
|
//#endregion
|
|
502
|
-
//#region src/models/
|
|
503
|
-
|
|
504
|
-
|
|
787
|
+
//#region src/models/HTTPValidationError.ts
|
|
788
|
+
/**
|
|
789
|
+
* Check if a given object implements the HTTPValidationError interface.
|
|
790
|
+
*/
|
|
791
|
+
function instanceOfHTTPValidationError(value) {
|
|
792
|
+
return true;
|
|
505
793
|
}
|
|
506
|
-
function
|
|
794
|
+
function HTTPValidationErrorFromJSON(json) {
|
|
795
|
+
return HTTPValidationErrorFromJSONTyped(json, false);
|
|
796
|
+
}
|
|
797
|
+
function HTTPValidationErrorFromJSONTyped(json, ignoreDiscriminator) {
|
|
507
798
|
if (json == null) return json;
|
|
508
|
-
|
|
509
|
-
case "encrypt": return Object.assign({}, EncryptRuleFromJSONTyped(json, true), { type: "encrypt" });
|
|
510
|
-
case "mask": return Object.assign({}, MaskRuleFromJSONTyped(json, true), { type: "mask" });
|
|
511
|
-
case "redact": return Object.assign({}, RedactRuleFromJSONTyped(json, true), { type: "redact" });
|
|
512
|
-
case "replace": return Object.assign({}, ReplaceRuleFromJSONTyped(json, true), { type: "replace" });
|
|
513
|
-
case "sha256": return Object.assign({}, SHA256RuleFromJSONTyped(json, true), { type: "sha256" });
|
|
514
|
-
case "sha512": return Object.assign({}, SHA512RuleFromJSONTyped(json, true), { type: "sha512" });
|
|
515
|
-
default: return json;
|
|
516
|
-
}
|
|
799
|
+
return { "detail": json["detail"] == null ? void 0 : json["detail"].map(ValidationErrorFromJSON) };
|
|
517
800
|
}
|
|
518
|
-
function
|
|
519
|
-
return
|
|
801
|
+
function HTTPValidationErrorToJSON(json) {
|
|
802
|
+
return HTTPValidationErrorToJSONTyped(json, false);
|
|
520
803
|
}
|
|
521
|
-
function
|
|
804
|
+
function HTTPValidationErrorToJSONTyped(value, ignoreDiscriminator = false) {
|
|
522
805
|
if (value == null) return value;
|
|
523
|
-
|
|
524
|
-
case "encrypt": return Object.assign({}, EncryptRuleToJSON(value), { type: "encrypt" });
|
|
525
|
-
case "mask": return Object.assign({}, MaskRuleToJSON(value), { type: "mask" });
|
|
526
|
-
case "redact": return Object.assign({}, RedactRuleToJSON(value), { type: "redact" });
|
|
527
|
-
case "replace": return Object.assign({}, ReplaceRuleToJSON(value), { type: "replace" });
|
|
528
|
-
case "sha256": return Object.assign({}, SHA256RuleToJSON(value), { type: "sha256" });
|
|
529
|
-
case "sha512": return Object.assign({}, SHA512RuleToJSON(value), { type: "sha512" });
|
|
530
|
-
default: return value;
|
|
531
|
-
}
|
|
806
|
+
return { "detail": value["detail"] == null ? void 0 : value["detail"].map(ValidationErrorToJSON) };
|
|
532
807
|
}
|
|
533
808
|
|
|
534
809
|
//#endregion
|
|
535
|
-
//#region src/models/
|
|
810
|
+
//#region src/models/PolicySummary.ts
|
|
536
811
|
/**
|
|
537
|
-
* Check if a given object implements the
|
|
812
|
+
* Check if a given object implements the PolicySummary interface.
|
|
538
813
|
*/
|
|
539
|
-
function
|
|
540
|
-
if (!("
|
|
541
|
-
if (!("
|
|
814
|
+
function instanceOfPolicySummary(value) {
|
|
815
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
816
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
817
|
+
if (!("versionId" in value) || value["versionId"] === void 0) return false;
|
|
818
|
+
if (!("createdAt" in value) || value["createdAt"] === void 0) return false;
|
|
819
|
+
if (!("updatedAt" in value) || value["updatedAt"] === void 0) return false;
|
|
542
820
|
return true;
|
|
543
821
|
}
|
|
544
|
-
function
|
|
545
|
-
return
|
|
822
|
+
function PolicySummaryFromJSON(json) {
|
|
823
|
+
return PolicySummaryFromJSONTyped(json, false);
|
|
546
824
|
}
|
|
547
|
-
function
|
|
825
|
+
function PolicySummaryFromJSONTyped(json, ignoreDiscriminator) {
|
|
548
826
|
if (json == null) return json;
|
|
549
827
|
return {
|
|
550
|
-
"
|
|
551
|
-
"
|
|
552
|
-
"
|
|
828
|
+
"id": json["id"],
|
|
829
|
+
"name": json["name"],
|
|
830
|
+
"versionId": json["versionId"],
|
|
831
|
+
"createdAt": json["createdAt"],
|
|
832
|
+
"updatedAt": json["updatedAt"]
|
|
553
833
|
};
|
|
554
834
|
}
|
|
555
|
-
function
|
|
556
|
-
return
|
|
835
|
+
function PolicySummaryToJSON(json) {
|
|
836
|
+
return PolicySummaryToJSONTyped(json, false);
|
|
557
837
|
}
|
|
558
|
-
function
|
|
838
|
+
function PolicySummaryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
559
839
|
if (value == null) return value;
|
|
560
840
|
return {
|
|
561
|
-
"
|
|
562
|
-
"
|
|
563
|
-
"
|
|
841
|
+
"id": value["id"],
|
|
842
|
+
"name": value["name"],
|
|
843
|
+
"versionId": value["versionId"],
|
|
844
|
+
"createdAt": value["createdAt"],
|
|
845
|
+
"updatedAt": value["updatedAt"]
|
|
564
846
|
};
|
|
565
847
|
}
|
|
566
848
|
|
|
567
849
|
//#endregion
|
|
568
|
-
//#region src/models/
|
|
850
|
+
//#region src/models/ListPolicies200Response.ts
|
|
569
851
|
/**
|
|
570
|
-
* Check if a given object implements the
|
|
852
|
+
* Check if a given object implements the ListPolicies200Response interface.
|
|
571
853
|
*/
|
|
572
|
-
function
|
|
573
|
-
if (!("
|
|
574
|
-
if (!("end" in value) || value["end"] === void 0) return false;
|
|
575
|
-
if (!("value" in value) || value["value"] === void 0) return false;
|
|
854
|
+
function instanceOfListPolicies200Response(value) {
|
|
855
|
+
if (!("policies" in value) || value["policies"] === void 0) return false;
|
|
576
856
|
return true;
|
|
577
857
|
}
|
|
578
|
-
function
|
|
579
|
-
return
|
|
858
|
+
function ListPolicies200ResponseFromJSON(json) {
|
|
859
|
+
return ListPolicies200ResponseFromJSONTyped(json, false);
|
|
580
860
|
}
|
|
581
|
-
function
|
|
861
|
+
function ListPolicies200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
862
|
+
if (json == null) return json;
|
|
863
|
+
return { "policies": json["policies"].map(PolicySummaryFromJSON) };
|
|
864
|
+
}
|
|
865
|
+
function ListPolicies200ResponseToJSON(json) {
|
|
866
|
+
return ListPolicies200ResponseToJSONTyped(json, false);
|
|
867
|
+
}
|
|
868
|
+
function ListPolicies200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
869
|
+
if (value == null) return value;
|
|
870
|
+
return { "policies": value["policies"].map(PolicySummaryToJSON) };
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
//#endregion
|
|
874
|
+
//#region src/models/MaskRule.ts
|
|
875
|
+
/**
|
|
876
|
+
* @export
|
|
877
|
+
*/
|
|
878
|
+
const MaskRuleTypeEnum = { mask: "mask" };
|
|
879
|
+
/**
|
|
880
|
+
* Check if a given object implements the MaskRule interface.
|
|
881
|
+
*/
|
|
882
|
+
function instanceOfMaskRule(value) {
|
|
883
|
+
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
884
|
+
return true;
|
|
885
|
+
}
|
|
886
|
+
function MaskRuleFromJSON(json) {
|
|
887
|
+
return MaskRuleFromJSONTyped(json, false);
|
|
888
|
+
}
|
|
889
|
+
function MaskRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
582
890
|
if (json == null) return json;
|
|
583
891
|
return {
|
|
584
|
-
"
|
|
585
|
-
"
|
|
586
|
-
"
|
|
892
|
+
"type": json["type"] == null ? void 0 : json["type"],
|
|
893
|
+
"entities": json["entities"].map(DetectRuleEntitiesInnerFromJSON),
|
|
894
|
+
"masking_char": json["masking_char"] == null ? void 0 : json["masking_char"],
|
|
895
|
+
"chars_to_mask": json["chars_to_mask"] == null ? void 0 : json["chars_to_mask"],
|
|
896
|
+
"from_end": json["from_end"] == null ? void 0 : json["from_end"]
|
|
587
897
|
};
|
|
588
898
|
}
|
|
589
|
-
function
|
|
590
|
-
return
|
|
899
|
+
function MaskRuleToJSON(json) {
|
|
900
|
+
return MaskRuleToJSONTyped(json, false);
|
|
591
901
|
}
|
|
592
|
-
function
|
|
902
|
+
function MaskRuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
593
903
|
if (value == null) return value;
|
|
594
904
|
return {
|
|
595
|
-
"
|
|
596
|
-
"
|
|
597
|
-
"
|
|
905
|
+
"type": value["type"],
|
|
906
|
+
"entities": value["entities"].map(DetectRuleEntitiesInnerToJSON),
|
|
907
|
+
"masking_char": value["masking_char"],
|
|
908
|
+
"chars_to_mask": value["chars_to_mask"],
|
|
909
|
+
"from_end": value["from_end"]
|
|
598
910
|
};
|
|
599
911
|
}
|
|
600
912
|
|
|
601
913
|
//#endregion
|
|
602
|
-
//#region src/models/
|
|
914
|
+
//#region src/models/ModelEntity.ts
|
|
603
915
|
/**
|
|
604
916
|
* @export
|
|
605
917
|
*/
|
|
606
|
-
const
|
|
918
|
+
const ModelEntityTypeEnum = { model: "model" };
|
|
607
919
|
/**
|
|
608
|
-
* Check if a given object implements the
|
|
920
|
+
* Check if a given object implements the ModelEntity interface.
|
|
609
921
|
*/
|
|
610
|
-
function
|
|
611
|
-
if (!("rule" in value) || value["rule"] === void 0) return false;
|
|
922
|
+
function instanceOfModelEntity(value) {
|
|
612
923
|
if (!("value" in value) || value["value"] === void 0) return false;
|
|
613
|
-
if (!("input" in value) || value["input"] === void 0) return false;
|
|
614
|
-
if (!("output" in value) || value["output"] === void 0) return false;
|
|
615
924
|
return true;
|
|
616
925
|
}
|
|
617
|
-
function
|
|
618
|
-
return
|
|
926
|
+
function ModelEntityFromJSON(json) {
|
|
927
|
+
return ModelEntityFromJSONTyped(json, false);
|
|
619
928
|
}
|
|
620
|
-
function
|
|
929
|
+
function ModelEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
621
930
|
if (json == null) return json;
|
|
622
931
|
return {
|
|
623
932
|
"type": json["type"] == null ? void 0 : json["type"],
|
|
624
|
-
"
|
|
625
|
-
"value": json["value"],
|
|
626
|
-
"input": TextRangeFromJSON(json["input"]),
|
|
627
|
-
"output": TextRangeFromJSON(json["output"]),
|
|
628
|
-
"score": json["score"] == null ? void 0 : json["score"]
|
|
933
|
+
"value": json["value"]
|
|
629
934
|
};
|
|
630
935
|
}
|
|
631
|
-
function
|
|
632
|
-
return
|
|
936
|
+
function ModelEntityToJSON(json) {
|
|
937
|
+
return ModelEntityToJSONTyped(json, false);
|
|
633
938
|
}
|
|
634
|
-
function
|
|
939
|
+
function ModelEntityToJSONTyped(value, ignoreDiscriminator = false) {
|
|
635
940
|
if (value == null) return value;
|
|
636
941
|
return {
|
|
637
942
|
"type": value["type"],
|
|
638
|
-
"
|
|
639
|
-
"value": value["value"],
|
|
640
|
-
"input": TextRangeToJSON(value["input"]),
|
|
641
|
-
"output": TextRangeToJSON(value["output"]),
|
|
642
|
-
"score": value["score"]
|
|
943
|
+
"value": value["value"]
|
|
643
944
|
};
|
|
644
945
|
}
|
|
645
946
|
|
|
646
947
|
//#endregion
|
|
647
|
-
//#region src/models/
|
|
948
|
+
//#region src/models/ModelResult.ts
|
|
648
949
|
/**
|
|
649
950
|
* @export
|
|
650
951
|
*/
|
|
651
|
-
const
|
|
952
|
+
const ModelResultTypeEnum = { model: "model" };
|
|
652
953
|
/**
|
|
653
|
-
* Check if a given object implements the
|
|
954
|
+
* Check if a given object implements the ModelResult interface.
|
|
654
955
|
*/
|
|
655
|
-
function
|
|
956
|
+
function instanceOfModelResult(value) {
|
|
656
957
|
if (!("rule" in value) || value["rule"] === void 0) return false;
|
|
657
958
|
if (!("value" in value) || value["value"] === void 0) return false;
|
|
658
959
|
if (!("input" in value) || value["input"] === void 0) return false;
|
|
659
960
|
if (!("output" in value) || value["output"] === void 0) return false;
|
|
660
961
|
return true;
|
|
661
962
|
}
|
|
662
|
-
function
|
|
663
|
-
return
|
|
963
|
+
function ModelResultFromJSON(json) {
|
|
964
|
+
return ModelResultFromJSONTyped(json, false);
|
|
664
965
|
}
|
|
665
|
-
function
|
|
966
|
+
function ModelResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
666
967
|
if (json == null) return json;
|
|
667
968
|
return {
|
|
668
969
|
"type": json["type"] == null ? void 0 : json["type"],
|
|
669
970
|
"rule": json["rule"],
|
|
670
971
|
"value": json["value"],
|
|
671
972
|
"input": TextRangeFromJSON(json["input"]),
|
|
672
|
-
"output": TextRangeFromJSON(json["output"])
|
|
973
|
+
"output": TextRangeFromJSON(json["output"]),
|
|
974
|
+
"score": json["score"] == null ? void 0 : json["score"]
|
|
673
975
|
};
|
|
674
976
|
}
|
|
675
|
-
function
|
|
676
|
-
return
|
|
977
|
+
function ModelResultToJSON(json) {
|
|
978
|
+
return ModelResultToJSONTyped(json, false);
|
|
677
979
|
}
|
|
678
|
-
function
|
|
980
|
+
function ModelResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
679
981
|
if (value == null) return value;
|
|
680
982
|
return {
|
|
681
983
|
"type": value["type"],
|
|
682
984
|
"rule": value["rule"],
|
|
683
985
|
"value": value["value"],
|
|
684
986
|
"input": TextRangeToJSON(value["input"]),
|
|
685
|
-
"output": TextRangeToJSON(value["output"])
|
|
987
|
+
"output": TextRangeToJSON(value["output"]),
|
|
988
|
+
"score": value["score"]
|
|
686
989
|
};
|
|
687
990
|
}
|
|
688
991
|
|
|
689
992
|
//#endregion
|
|
690
|
-
//#region src/models/
|
|
691
|
-
function AnonymizeResponseBodySpansInnerFromJSON(json) {
|
|
692
|
-
return AnonymizeResponseBodySpansInnerFromJSONTyped(json, false);
|
|
693
|
-
}
|
|
694
|
-
function AnonymizeResponseBodySpansInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
695
|
-
if (json == null) return json;
|
|
696
|
-
switch (json["type"]) {
|
|
697
|
-
case "model": return Object.assign({}, ModelResultFromJSONTyped(json, true), { type: "model" });
|
|
698
|
-
case "regex": return Object.assign({}, RegexResultFromJSONTyped(json, true), { type: "regex" });
|
|
699
|
-
default: return json;
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
function AnonymizeResponseBodySpansInnerToJSON(json) {
|
|
703
|
-
return AnonymizeResponseBodySpansInnerToJSONTyped(json, false);
|
|
704
|
-
}
|
|
705
|
-
function AnonymizeResponseBodySpansInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
706
|
-
if (value == null) return value;
|
|
707
|
-
switch (value["type"]) {
|
|
708
|
-
case "model": return Object.assign({}, ModelResultToJSON(value), { type: "model" });
|
|
709
|
-
case "regex": return Object.assign({}, RegexResultToJSON(value), { type: "regex" });
|
|
710
|
-
default: return value;
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
//#endregion
|
|
715
|
-
//#region src/models/AnonymizeResponseBody.ts
|
|
993
|
+
//#region src/models/Policy.ts
|
|
716
994
|
/**
|
|
717
|
-
* Check if a given object implements the
|
|
995
|
+
* Check if a given object implements the Policy interface.
|
|
718
996
|
*/
|
|
719
|
-
function
|
|
720
|
-
if (!("
|
|
997
|
+
function instanceOfPolicy(value) {
|
|
998
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
999
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
1000
|
+
if (!("versionId" in value) || value["versionId"] === void 0) return false;
|
|
1001
|
+
if (!("document" in value) || value["document"] === void 0) return false;
|
|
1002
|
+
if (!("createdAt" in value) || value["createdAt"] === void 0) return false;
|
|
1003
|
+
if (!("updatedAt" in value) || value["updatedAt"] === void 0) return false;
|
|
721
1004
|
return true;
|
|
722
1005
|
}
|
|
723
|
-
function
|
|
724
|
-
return
|
|
1006
|
+
function PolicyFromJSON(json) {
|
|
1007
|
+
return PolicyFromJSONTyped(json, false);
|
|
725
1008
|
}
|
|
726
|
-
function
|
|
1009
|
+
function PolicyFromJSONTyped(json, ignoreDiscriminator) {
|
|
727
1010
|
if (json == null) return json;
|
|
728
1011
|
return {
|
|
729
|
-
"
|
|
730
|
-
"
|
|
1012
|
+
"id": json["id"],
|
|
1013
|
+
"name": json["name"],
|
|
1014
|
+
"versionId": json["versionId"],
|
|
1015
|
+
"document": PolicyDocumentFromJSON(json["document"]),
|
|
1016
|
+
"createdAt": json["createdAt"],
|
|
1017
|
+
"updatedAt": json["updatedAt"]
|
|
731
1018
|
};
|
|
732
1019
|
}
|
|
733
|
-
function
|
|
734
|
-
return
|
|
1020
|
+
function PolicyToJSON(json) {
|
|
1021
|
+
return PolicyToJSONTyped(json, false);
|
|
735
1022
|
}
|
|
736
|
-
function
|
|
1023
|
+
function PolicyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
737
1024
|
if (value == null) return value;
|
|
738
1025
|
return {
|
|
739
|
-
"
|
|
740
|
-
"
|
|
1026
|
+
"id": value["id"],
|
|
1027
|
+
"name": value["name"],
|
|
1028
|
+
"versionId": value["versionId"],
|
|
1029
|
+
"document": PolicyDocumentToJSON(value["document"]),
|
|
1030
|
+
"createdAt": value["createdAt"],
|
|
1031
|
+
"updatedAt": value["updatedAt"]
|
|
741
1032
|
};
|
|
742
1033
|
}
|
|
743
1034
|
|
|
744
1035
|
//#endregion
|
|
745
|
-
//#region src/models/
|
|
1036
|
+
//#region src/models/RedactRule.ts
|
|
746
1037
|
/**
|
|
747
1038
|
* @export
|
|
748
1039
|
*/
|
|
749
|
-
const
|
|
1040
|
+
const RedactRuleTypeEnum = { redact: "redact" };
|
|
750
1041
|
/**
|
|
751
|
-
* Check if a given object implements the
|
|
1042
|
+
* Check if a given object implements the RedactRule interface.
|
|
752
1043
|
*/
|
|
753
|
-
function
|
|
754
|
-
if (!("
|
|
1044
|
+
function instanceOfRedactRule(value) {
|
|
1045
|
+
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
755
1046
|
return true;
|
|
756
1047
|
}
|
|
757
|
-
function
|
|
758
|
-
return
|
|
1048
|
+
function RedactRuleFromJSON(json) {
|
|
1049
|
+
return RedactRuleFromJSONTyped(json, false);
|
|
759
1050
|
}
|
|
760
|
-
function
|
|
1051
|
+
function RedactRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
761
1052
|
if (json == null) return json;
|
|
762
1053
|
return {
|
|
763
1054
|
"type": json["type"] == null ? void 0 : json["type"],
|
|
764
|
-
"
|
|
1055
|
+
"entities": json["entities"].map(DetectRuleEntitiesInnerFromJSON)
|
|
765
1056
|
};
|
|
766
1057
|
}
|
|
767
|
-
function
|
|
768
|
-
return
|
|
1058
|
+
function RedactRuleToJSON(json) {
|
|
1059
|
+
return RedactRuleToJSONTyped(json, false);
|
|
769
1060
|
}
|
|
770
|
-
function
|
|
1061
|
+
function RedactRuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
771
1062
|
if (value == null) return value;
|
|
772
1063
|
return {
|
|
773
1064
|
"type": value["type"],
|
|
774
|
-
"
|
|
1065
|
+
"entities": value["entities"].map(DetectRuleEntitiesInnerToJSON)
|
|
775
1066
|
};
|
|
776
1067
|
}
|
|
777
1068
|
|
|
@@ -810,106 +1101,150 @@ function RegexEntityToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
810
1101
|
}
|
|
811
1102
|
|
|
812
1103
|
//#endregion
|
|
813
|
-
//#region src/models/
|
|
814
|
-
|
|
815
|
-
|
|
1104
|
+
//#region src/models/RegexResult.ts
|
|
1105
|
+
/**
|
|
1106
|
+
* @export
|
|
1107
|
+
*/
|
|
1108
|
+
const RegexResultTypeEnum = { regex: "regex" };
|
|
1109
|
+
/**
|
|
1110
|
+
* Check if a given object implements the RegexResult interface.
|
|
1111
|
+
*/
|
|
1112
|
+
function instanceOfRegexResult(value) {
|
|
1113
|
+
if (!("rule" in value) || value["rule"] === void 0) return false;
|
|
1114
|
+
if (!("value" in value) || value["value"] === void 0) return false;
|
|
1115
|
+
if (!("input" in value) || value["input"] === void 0) return false;
|
|
1116
|
+
if (!("output" in value) || value["output"] === void 0) return false;
|
|
1117
|
+
return true;
|
|
1118
|
+
}
|
|
1119
|
+
function RegexResultFromJSON(json) {
|
|
1120
|
+
return RegexResultFromJSONTyped(json, false);
|
|
816
1121
|
}
|
|
817
|
-
function
|
|
1122
|
+
function RegexResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
818
1123
|
if (json == null) return json;
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
1124
|
+
return {
|
|
1125
|
+
"type": json["type"] == null ? void 0 : json["type"],
|
|
1126
|
+
"rule": json["rule"],
|
|
1127
|
+
"value": json["value"],
|
|
1128
|
+
"input": TextRangeFromJSON(json["input"]),
|
|
1129
|
+
"output": TextRangeFromJSON(json["output"])
|
|
1130
|
+
};
|
|
824
1131
|
}
|
|
825
|
-
function
|
|
826
|
-
return
|
|
1132
|
+
function RegexResultToJSON(json) {
|
|
1133
|
+
return RegexResultToJSONTyped(json, false);
|
|
827
1134
|
}
|
|
828
|
-
function
|
|
1135
|
+
function RegexResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
829
1136
|
if (value == null) return value;
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
1137
|
+
return {
|
|
1138
|
+
"type": value["type"],
|
|
1139
|
+
"rule": value["rule"],
|
|
1140
|
+
"value": value["value"],
|
|
1141
|
+
"input": TextRangeToJSON(value["input"]),
|
|
1142
|
+
"output": TextRangeToJSON(value["output"])
|
|
1143
|
+
};
|
|
835
1144
|
}
|
|
836
1145
|
|
|
837
1146
|
//#endregion
|
|
838
|
-
//#region src/models/
|
|
1147
|
+
//#region src/models/ReplaceRule.ts
|
|
839
1148
|
/**
|
|
840
|
-
*
|
|
1149
|
+
* @export
|
|
841
1150
|
*/
|
|
842
|
-
|
|
1151
|
+
const ReplaceRuleTypeEnum = { replace: "replace" };
|
|
1152
|
+
/**
|
|
1153
|
+
* Check if a given object implements the ReplaceRule interface.
|
|
1154
|
+
*/
|
|
1155
|
+
function instanceOfReplaceRule(value) {
|
|
1156
|
+
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
843
1157
|
return true;
|
|
844
1158
|
}
|
|
845
|
-
function
|
|
846
|
-
return
|
|
1159
|
+
function ReplaceRuleFromJSON(json) {
|
|
1160
|
+
return ReplaceRuleFromJSONTyped(json, false);
|
|
847
1161
|
}
|
|
848
|
-
function
|
|
849
|
-
return json;
|
|
1162
|
+
function ReplaceRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
1163
|
+
if (json == null) return json;
|
|
1164
|
+
return {
|
|
1165
|
+
"type": json["type"] == null ? void 0 : json["type"],
|
|
1166
|
+
"entities": json["entities"].map(DetectRuleEntitiesInnerFromJSON),
|
|
1167
|
+
"replacement": json["replacement"] == null ? void 0 : json["replacement"]
|
|
1168
|
+
};
|
|
850
1169
|
}
|
|
851
|
-
function
|
|
852
|
-
return
|
|
1170
|
+
function ReplaceRuleToJSON(json) {
|
|
1171
|
+
return ReplaceRuleToJSONTyped(json, false);
|
|
853
1172
|
}
|
|
854
|
-
function
|
|
855
|
-
return value;
|
|
1173
|
+
function ReplaceRuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1174
|
+
if (value == null) return value;
|
|
1175
|
+
return {
|
|
1176
|
+
"type": value["type"],
|
|
1177
|
+
"entities": value["entities"].map(DetectRuleEntitiesInnerToJSON),
|
|
1178
|
+
"replacement": value["replacement"]
|
|
1179
|
+
};
|
|
856
1180
|
}
|
|
857
1181
|
|
|
858
1182
|
//#endregion
|
|
859
|
-
//#region src/models/
|
|
1183
|
+
//#region src/models/SHA256Rule.ts
|
|
860
1184
|
/**
|
|
861
|
-
*
|
|
1185
|
+
* @export
|
|
862
1186
|
*/
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
1187
|
+
const SHA256RuleTypeEnum = { sha256: "sha256" };
|
|
1188
|
+
/**
|
|
1189
|
+
* Check if a given object implements the SHA256Rule interface.
|
|
1190
|
+
*/
|
|
1191
|
+
function instanceOfSHA256Rule(value) {
|
|
1192
|
+
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
867
1193
|
return true;
|
|
868
1194
|
}
|
|
869
|
-
function
|
|
870
|
-
return
|
|
1195
|
+
function SHA256RuleFromJSON(json) {
|
|
1196
|
+
return SHA256RuleFromJSONTyped(json, false);
|
|
871
1197
|
}
|
|
872
|
-
function
|
|
1198
|
+
function SHA256RuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
873
1199
|
if (json == null) return json;
|
|
874
1200
|
return {
|
|
875
|
-
"
|
|
876
|
-
"
|
|
877
|
-
"type": json["type"]
|
|
1201
|
+
"type": json["type"] == null ? void 0 : json["type"],
|
|
1202
|
+
"entities": json["entities"].map(DetectRuleEntitiesInnerFromJSON)
|
|
878
1203
|
};
|
|
879
1204
|
}
|
|
880
|
-
function
|
|
881
|
-
return
|
|
1205
|
+
function SHA256RuleToJSON(json) {
|
|
1206
|
+
return SHA256RuleToJSONTyped(json, false);
|
|
882
1207
|
}
|
|
883
|
-
function
|
|
1208
|
+
function SHA256RuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
884
1209
|
if (value == null) return value;
|
|
885
1210
|
return {
|
|
886
|
-
"
|
|
887
|
-
"
|
|
888
|
-
"type": value["type"]
|
|
1211
|
+
"type": value["type"],
|
|
1212
|
+
"entities": value["entities"].map(DetectRuleEntitiesInnerToJSON)
|
|
889
1213
|
};
|
|
890
1214
|
}
|
|
891
1215
|
|
|
892
1216
|
//#endregion
|
|
893
|
-
//#region src/models/
|
|
1217
|
+
//#region src/models/SHA512Rule.ts
|
|
894
1218
|
/**
|
|
895
|
-
*
|
|
1219
|
+
* @export
|
|
896
1220
|
*/
|
|
897
|
-
|
|
1221
|
+
const SHA512RuleTypeEnum = { sha512: "sha512" };
|
|
1222
|
+
/**
|
|
1223
|
+
* Check if a given object implements the SHA512Rule interface.
|
|
1224
|
+
*/
|
|
1225
|
+
function instanceOfSHA512Rule(value) {
|
|
1226
|
+
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
898
1227
|
return true;
|
|
899
1228
|
}
|
|
900
|
-
function
|
|
901
|
-
return
|
|
1229
|
+
function SHA512RuleFromJSON(json) {
|
|
1230
|
+
return SHA512RuleFromJSONTyped(json, false);
|
|
902
1231
|
}
|
|
903
|
-
function
|
|
1232
|
+
function SHA512RuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
904
1233
|
if (json == null) return json;
|
|
905
|
-
return {
|
|
1234
|
+
return {
|
|
1235
|
+
"type": json["type"] == null ? void 0 : json["type"],
|
|
1236
|
+
"entities": json["entities"].map(DetectRuleEntitiesInnerFromJSON)
|
|
1237
|
+
};
|
|
906
1238
|
}
|
|
907
|
-
function
|
|
908
|
-
return
|
|
1239
|
+
function SHA512RuleToJSON(json) {
|
|
1240
|
+
return SHA512RuleToJSONTyped(json, false);
|
|
909
1241
|
}
|
|
910
|
-
function
|
|
1242
|
+
function SHA512RuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
911
1243
|
if (value == null) return value;
|
|
912
|
-
return {
|
|
1244
|
+
return {
|
|
1245
|
+
"type": value["type"],
|
|
1246
|
+
"entities": value["entities"].map(DetectRuleEntitiesInnerToJSON)
|
|
1247
|
+
};
|
|
913
1248
|
}
|
|
914
1249
|
|
|
915
1250
|
//#endregion
|
|
@@ -990,6 +1325,7 @@ function ScanResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
990
1325
|
*/
|
|
991
1326
|
function instanceOfScanResponseBody(value) {
|
|
992
1327
|
if (!("results" in value) || value["results"] === void 0) return false;
|
|
1328
|
+
if (!("usage" in value) || value["usage"] === void 0) return false;
|
|
993
1329
|
return true;
|
|
994
1330
|
}
|
|
995
1331
|
function ScanResponseBodyFromJSON(json) {
|
|
@@ -997,23 +1333,200 @@ function ScanResponseBodyFromJSON(json) {
|
|
|
997
1333
|
}
|
|
998
1334
|
function ScanResponseBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
999
1335
|
if (json == null) return json;
|
|
1000
|
-
return {
|
|
1336
|
+
return {
|
|
1337
|
+
"results": json["results"].map(ScanResultFromJSON),
|
|
1338
|
+
"usage": UsageFromJSON(json["usage"])
|
|
1339
|
+
};
|
|
1001
1340
|
}
|
|
1002
1341
|
function ScanResponseBodyToJSON(json) {
|
|
1003
1342
|
return ScanResponseBodyToJSONTyped(json, false);
|
|
1004
1343
|
}
|
|
1005
1344
|
function ScanResponseBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1006
1345
|
if (value == null) return value;
|
|
1007
|
-
return {
|
|
1346
|
+
return {
|
|
1347
|
+
"results": value["results"].map(ScanResultToJSON),
|
|
1348
|
+
"usage": UsageToJSON(value["usage"])
|
|
1349
|
+
};
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
//#endregion
|
|
1353
|
+
//#region src/models/UpdatePolicyRequest.ts
|
|
1354
|
+
/**
|
|
1355
|
+
* Check if a given object implements the UpdatePolicyRequest interface.
|
|
1356
|
+
*/
|
|
1357
|
+
function instanceOfUpdatePolicyRequest(value) {
|
|
1358
|
+
return true;
|
|
1359
|
+
}
|
|
1360
|
+
function UpdatePolicyRequestFromJSON(json) {
|
|
1361
|
+
return UpdatePolicyRequestFromJSONTyped(json, false);
|
|
1362
|
+
}
|
|
1363
|
+
function UpdatePolicyRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
1364
|
+
if (json == null) return json;
|
|
1365
|
+
return {
|
|
1366
|
+
"name": json["name"] == null ? void 0 : json["name"],
|
|
1367
|
+
"document": json["document"] == null ? void 0 : PolicyDocumentFromJSON(json["document"])
|
|
1368
|
+
};
|
|
1369
|
+
}
|
|
1370
|
+
function UpdatePolicyRequestToJSON(json) {
|
|
1371
|
+
return UpdatePolicyRequestToJSONTyped(json, false);
|
|
1372
|
+
}
|
|
1373
|
+
function UpdatePolicyRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1374
|
+
if (value == null) return value;
|
|
1375
|
+
return {
|
|
1376
|
+
"name": value["name"],
|
|
1377
|
+
"document": PolicyDocumentToJSON(value["document"])
|
|
1378
|
+
};
|
|
1008
1379
|
}
|
|
1009
1380
|
|
|
1381
|
+
//#endregion
|
|
1382
|
+
//#region src/apis/PoliciesApi.ts
|
|
1383
|
+
/**
|
|
1384
|
+
* Sensitive Data Protection API
|
|
1385
|
+
* Detect and de-identify sensitive data (PII) in text. Use `scan` to locate sensitive entities such as emails, phone numbers, and names, and `anonymize` to transform them using configurable rules (redact, mask, replace, hash, or encrypt).
|
|
1386
|
+
*
|
|
1387
|
+
* The version of the OpenAPI document: 0.1.0
|
|
1388
|
+
*
|
|
1389
|
+
*
|
|
1390
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
1391
|
+
* https://openapi-generator.tech
|
|
1392
|
+
* Do not edit the class manually.
|
|
1393
|
+
*/
|
|
1394
|
+
/**
|
|
1395
|
+
*
|
|
1396
|
+
*/
|
|
1397
|
+
var PoliciesApi = class extends BaseAPI {
|
|
1398
|
+
/**
|
|
1399
|
+
* Create a policy
|
|
1400
|
+
*/
|
|
1401
|
+
async createPolicyRaw(requestParameters, initOverrides) {
|
|
1402
|
+
if (requestParameters["CreatePolicyRequest"] == null) throw new RequiredError("CreatePolicyRequest", "Required parameter \"CreatePolicyRequest\" was null or undefined when calling createPolicy().");
|
|
1403
|
+
const queryParameters = {};
|
|
1404
|
+
const headerParameters = {};
|
|
1405
|
+
headerParameters["Content-Type"] = "application/json";
|
|
1406
|
+
if (this.configuration && this.configuration.apiKey) headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key");
|
|
1407
|
+
const response = await this.request({
|
|
1408
|
+
path: `/policies`,
|
|
1409
|
+
method: "POST",
|
|
1410
|
+
headers: headerParameters,
|
|
1411
|
+
query: queryParameters,
|
|
1412
|
+
body: CreatePolicyRequestToJSON(requestParameters["CreatePolicyRequest"])
|
|
1413
|
+
}, initOverrides);
|
|
1414
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyFromJSON(jsonValue));
|
|
1415
|
+
}
|
|
1416
|
+
/**
|
|
1417
|
+
* Create a policy
|
|
1418
|
+
*/
|
|
1419
|
+
async createPolicy(CreatePolicyRequest, initOverrides) {
|
|
1420
|
+
return await (await this.createPolicyRaw({ CreatePolicyRequest }, initOverrides)).value();
|
|
1421
|
+
}
|
|
1422
|
+
/**
|
|
1423
|
+
* Delete a policy
|
|
1424
|
+
*/
|
|
1425
|
+
async deletePolicyRaw(requestParameters, initOverrides) {
|
|
1426
|
+
if (requestParameters["id"] == null) throw new RequiredError("id", "Required parameter \"id\" was null or undefined when calling deletePolicy().");
|
|
1427
|
+
const queryParameters = {};
|
|
1428
|
+
const headerParameters = {};
|
|
1429
|
+
if (this.configuration && this.configuration.apiKey) headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key");
|
|
1430
|
+
let urlPath = `/policies/{id}`;
|
|
1431
|
+
urlPath = urlPath.replace(`{id}`, encodeURIComponent(String(requestParameters["id"])));
|
|
1432
|
+
const response = await this.request({
|
|
1433
|
+
path: urlPath,
|
|
1434
|
+
method: "DELETE",
|
|
1435
|
+
headers: headerParameters,
|
|
1436
|
+
query: queryParameters
|
|
1437
|
+
}, initOverrides);
|
|
1438
|
+
return new VoidApiResponse(response);
|
|
1439
|
+
}
|
|
1440
|
+
/**
|
|
1441
|
+
* Delete a policy
|
|
1442
|
+
*/
|
|
1443
|
+
async deletePolicy(id, initOverrides) {
|
|
1444
|
+
await this.deletePolicyRaw({ id }, initOverrides);
|
|
1445
|
+
}
|
|
1446
|
+
/**
|
|
1447
|
+
* Read a policy
|
|
1448
|
+
*/
|
|
1449
|
+
async getPolicyRaw(requestParameters, initOverrides) {
|
|
1450
|
+
if (requestParameters["id"] == null) throw new RequiredError("id", "Required parameter \"id\" was null or undefined when calling getPolicy().");
|
|
1451
|
+
const queryParameters = {};
|
|
1452
|
+
const headerParameters = {};
|
|
1453
|
+
if (this.configuration && this.configuration.apiKey) headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key");
|
|
1454
|
+
let urlPath = `/policies/{id}`;
|
|
1455
|
+
urlPath = urlPath.replace(`{id}`, encodeURIComponent(String(requestParameters["id"])));
|
|
1456
|
+
const response = await this.request({
|
|
1457
|
+
path: urlPath,
|
|
1458
|
+
method: "GET",
|
|
1459
|
+
headers: headerParameters,
|
|
1460
|
+
query: queryParameters
|
|
1461
|
+
}, initOverrides);
|
|
1462
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyFromJSON(jsonValue));
|
|
1463
|
+
}
|
|
1464
|
+
/**
|
|
1465
|
+
* Read a policy
|
|
1466
|
+
*/
|
|
1467
|
+
async getPolicy(id, initOverrides) {
|
|
1468
|
+
return await (await this.getPolicyRaw({ id }, initOverrides)).value();
|
|
1469
|
+
}
|
|
1470
|
+
/**
|
|
1471
|
+
* List policies
|
|
1472
|
+
*/
|
|
1473
|
+
async listPoliciesRaw(initOverrides) {
|
|
1474
|
+
const queryParameters = {};
|
|
1475
|
+
const headerParameters = {};
|
|
1476
|
+
if (this.configuration && this.configuration.apiKey) headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key");
|
|
1477
|
+
const response = await this.request({
|
|
1478
|
+
path: `/policies`,
|
|
1479
|
+
method: "GET",
|
|
1480
|
+
headers: headerParameters,
|
|
1481
|
+
query: queryParameters
|
|
1482
|
+
}, initOverrides);
|
|
1483
|
+
return new JSONApiResponse(response, (jsonValue) => ListPolicies200ResponseFromJSON(jsonValue));
|
|
1484
|
+
}
|
|
1485
|
+
/**
|
|
1486
|
+
* List policies
|
|
1487
|
+
*/
|
|
1488
|
+
async listPolicies(initOverrides) {
|
|
1489
|
+
return await (await this.listPoliciesRaw(initOverrides)).value();
|
|
1490
|
+
}
|
|
1491
|
+
/**
|
|
1492
|
+
* Update a policy
|
|
1493
|
+
*/
|
|
1494
|
+
async updatePolicyRaw(requestParameters, initOverrides) {
|
|
1495
|
+
if (requestParameters["id"] == null) throw new RequiredError("id", "Required parameter \"id\" was null or undefined when calling updatePolicy().");
|
|
1496
|
+
if (requestParameters["UpdatePolicyRequest"] == null) throw new RequiredError("UpdatePolicyRequest", "Required parameter \"UpdatePolicyRequest\" was null or undefined when calling updatePolicy().");
|
|
1497
|
+
const queryParameters = {};
|
|
1498
|
+
const headerParameters = {};
|
|
1499
|
+
headerParameters["Content-Type"] = "application/json";
|
|
1500
|
+
if (this.configuration && this.configuration.apiKey) headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key");
|
|
1501
|
+
let urlPath = `/policies/{id}`;
|
|
1502
|
+
urlPath = urlPath.replace(`{id}`, encodeURIComponent(String(requestParameters["id"])));
|
|
1503
|
+
const response = await this.request({
|
|
1504
|
+
path: urlPath,
|
|
1505
|
+
method: "PUT",
|
|
1506
|
+
headers: headerParameters,
|
|
1507
|
+
query: queryParameters,
|
|
1508
|
+
body: UpdatePolicyRequestToJSON(requestParameters["UpdatePolicyRequest"])
|
|
1509
|
+
}, initOverrides);
|
|
1510
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyFromJSON(jsonValue));
|
|
1511
|
+
}
|
|
1512
|
+
/**
|
|
1513
|
+
* Update a policy
|
|
1514
|
+
*/
|
|
1515
|
+
async updatePolicy(id, UpdatePolicyRequest, initOverrides) {
|
|
1516
|
+
return await (await this.updatePolicyRaw({
|
|
1517
|
+
id,
|
|
1518
|
+
UpdatePolicyRequest
|
|
1519
|
+
}, initOverrides)).value();
|
|
1520
|
+
}
|
|
1521
|
+
};
|
|
1522
|
+
|
|
1010
1523
|
//#endregion
|
|
1011
1524
|
//#region src/apis/SensitiveDataProtectionApi.ts
|
|
1012
1525
|
/**
|
|
1013
1526
|
* Sensitive Data Protection API
|
|
1014
|
-
*
|
|
1527
|
+
* Detect and de-identify sensitive data (PII) in text. Use `scan` to locate sensitive entities such as emails, phone numbers, and names, and `anonymize` to transform them using configurable rules (redact, mask, replace, hash, or encrypt).
|
|
1015
1528
|
*
|
|
1016
|
-
* The version of the OpenAPI document: 0.0
|
|
1529
|
+
* The version of the OpenAPI document: 0.1.0
|
|
1017
1530
|
*
|
|
1018
1531
|
*
|
|
1019
1532
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -1025,7 +1538,7 @@ function ScanResponseBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1025
1538
|
*/
|
|
1026
1539
|
var SensitiveDataProtectionApi = class extends BaseAPI {
|
|
1027
1540
|
/**
|
|
1028
|
-
* Anonymize the
|
|
1541
|
+
* Anonymize sensitive data in text. Scans the request text for the entities targeted by each supplied rule and applies that rule\'s operation (replace, redact, mask, hash, or encrypt) to every match. Returns the anonymized text together with a record of each transformation, including the original and resulting character ranges.
|
|
1029
1542
|
* Anonymize Text
|
|
1030
1543
|
*/
|
|
1031
1544
|
async anonymizeTextRaw(requestParameters, initOverrides) {
|
|
@@ -1033,6 +1546,7 @@ var SensitiveDataProtectionApi = class extends BaseAPI {
|
|
|
1033
1546
|
const queryParameters = {};
|
|
1034
1547
|
const headerParameters = {};
|
|
1035
1548
|
headerParameters["Content-Type"] = "application/json";
|
|
1549
|
+
if (this.configuration && this.configuration.apiKey) headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key");
|
|
1036
1550
|
const response = await this.request({
|
|
1037
1551
|
path: `/anonymize`,
|
|
1038
1552
|
method: "POST",
|
|
@@ -1043,35 +1557,38 @@ var SensitiveDataProtectionApi = class extends BaseAPI {
|
|
|
1043
1557
|
return new JSONApiResponse(response, (jsonValue) => AnonymizeResponseBodyFromJSON(jsonValue));
|
|
1044
1558
|
}
|
|
1045
1559
|
/**
|
|
1046
|
-
* Anonymize the
|
|
1560
|
+
* Anonymize sensitive data in text. Scans the request text for the entities targeted by each supplied rule and applies that rule\'s operation (replace, redact, mask, hash, or encrypt) to every match. Returns the anonymized text together with a record of each transformation, including the original and resulting character ranges.
|
|
1047
1561
|
* Anonymize Text
|
|
1048
1562
|
*/
|
|
1049
1563
|
async anonymizeText(AnonymizeRequestBody, initOverrides) {
|
|
1050
1564
|
return await (await this.anonymizeTextRaw({ AnonymizeRequestBody }, initOverrides)).value();
|
|
1051
1565
|
}
|
|
1052
1566
|
/**
|
|
1053
|
-
*
|
|
1567
|
+
* Health check. Returns a plain-text message confirming the service is running. Use this as a liveness/readiness probe.
|
|
1054
1568
|
* Health
|
|
1055
1569
|
*/
|
|
1056
1570
|
async healthCheckRaw(initOverrides) {
|
|
1571
|
+
const queryParameters = {};
|
|
1572
|
+
const headerParameters = {};
|
|
1573
|
+
if (this.configuration && this.configuration.apiKey) headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key");
|
|
1057
1574
|
const response = await this.request({
|
|
1058
1575
|
path: `/health`,
|
|
1059
1576
|
method: "GET",
|
|
1060
|
-
headers:
|
|
1061
|
-
query:
|
|
1577
|
+
headers: headerParameters,
|
|
1578
|
+
query: queryParameters
|
|
1062
1579
|
}, initOverrides);
|
|
1063
1580
|
if (this.isJsonMime(response.headers.get("content-type"))) return new JSONApiResponse(response);
|
|
1064
1581
|
else return new TextApiResponse(response);
|
|
1065
1582
|
}
|
|
1066
1583
|
/**
|
|
1067
|
-
*
|
|
1584
|
+
* Health check. Returns a plain-text message confirming the service is running. Use this as a liveness/readiness probe.
|
|
1068
1585
|
* Health
|
|
1069
1586
|
*/
|
|
1070
1587
|
async healthCheck(initOverrides) {
|
|
1071
1588
|
return await (await this.healthCheckRaw(initOverrides)).value();
|
|
1072
1589
|
}
|
|
1073
1590
|
/**
|
|
1074
|
-
* Scan
|
|
1591
|
+
* Scan text for sensitive data. Runs the configured detection entities over the request text and returns every match as a character range with its entity type and confidence score. Detections below the confidence threshold are omitted.
|
|
1075
1592
|
* Scan Text
|
|
1076
1593
|
*/
|
|
1077
1594
|
async scanTextRaw(requestParameters, initOverrides) {
|
|
@@ -1079,6 +1596,7 @@ var SensitiveDataProtectionApi = class extends BaseAPI {
|
|
|
1079
1596
|
const queryParameters = {};
|
|
1080
1597
|
const headerParameters = {};
|
|
1081
1598
|
headerParameters["Content-Type"] = "application/json";
|
|
1599
|
+
if (this.configuration && this.configuration.apiKey) headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key");
|
|
1082
1600
|
const response = await this.request({
|
|
1083
1601
|
path: `/scan`,
|
|
1084
1602
|
method: "POST",
|
|
@@ -1089,7 +1607,7 @@ var SensitiveDataProtectionApi = class extends BaseAPI {
|
|
|
1089
1607
|
return new JSONApiResponse(response, (jsonValue) => ScanResponseBodyFromJSON(jsonValue));
|
|
1090
1608
|
}
|
|
1091
1609
|
/**
|
|
1092
|
-
* Scan
|
|
1610
|
+
* Scan text for sensitive data. Runs the configured detection entities over the request text and returns every match as a character range with its entity type and confidence score. Detections below the confidence threshold are omitted.
|
|
1093
1611
|
* Scan Text
|
|
1094
1612
|
*/
|
|
1095
1613
|
async scanText(ScanRequestBody, initOverrides) {
|
|
@@ -1104,14 +1622,16 @@ exports.AnonymizeRequestBodyRulesInnerFromJSON = AnonymizeRequestBodyRulesInnerF
|
|
|
1104
1622
|
exports.AnonymizeRequestBodyRulesInnerFromJSONTyped = AnonymizeRequestBodyRulesInnerFromJSONTyped;
|
|
1105
1623
|
exports.AnonymizeRequestBodyRulesInnerToJSON = AnonymizeRequestBodyRulesInnerToJSON;
|
|
1106
1624
|
exports.AnonymizeRequestBodyRulesInnerToJSONTyped = AnonymizeRequestBodyRulesInnerToJSONTyped;
|
|
1625
|
+
exports.AnonymizeRequestBodyRulesInnerTypeEnum = AnonymizeRequestBodyRulesInnerTypeEnum;
|
|
1107
1626
|
exports.AnonymizeRequestBodyToJSON = AnonymizeRequestBodyToJSON;
|
|
1108
1627
|
exports.AnonymizeRequestBodyToJSONTyped = AnonymizeRequestBodyToJSONTyped;
|
|
1109
1628
|
exports.AnonymizeResponseBodyFromJSON = AnonymizeResponseBodyFromJSON;
|
|
1110
1629
|
exports.AnonymizeResponseBodyFromJSONTyped = AnonymizeResponseBodyFromJSONTyped;
|
|
1111
|
-
exports.
|
|
1112
|
-
exports.
|
|
1113
|
-
exports.
|
|
1114
|
-
exports.
|
|
1630
|
+
exports.AnonymizeResponseBodyResultsInnerFromJSON = AnonymizeResponseBodyResultsInnerFromJSON;
|
|
1631
|
+
exports.AnonymizeResponseBodyResultsInnerFromJSONTyped = AnonymizeResponseBodyResultsInnerFromJSONTyped;
|
|
1632
|
+
exports.AnonymizeResponseBodyResultsInnerToJSON = AnonymizeResponseBodyResultsInnerToJSON;
|
|
1633
|
+
exports.AnonymizeResponseBodyResultsInnerToJSONTyped = AnonymizeResponseBodyResultsInnerToJSONTyped;
|
|
1634
|
+
exports.AnonymizeResponseBodyResultsInnerTypeEnum = AnonymizeResponseBodyResultsInnerTypeEnum;
|
|
1115
1635
|
exports.AnonymizeResponseBodyToJSON = AnonymizeResponseBodyToJSON;
|
|
1116
1636
|
exports.AnonymizeResponseBodyToJSONTyped = AnonymizeResponseBodyToJSONTyped;
|
|
1117
1637
|
exports.BASE_PATH = BASE_PATH;
|
|
@@ -1119,26 +1639,36 @@ exports.BaseAPI = BaseAPI;
|
|
|
1119
1639
|
exports.BlobApiResponse = BlobApiResponse;
|
|
1120
1640
|
exports.COLLECTION_FORMATS = COLLECTION_FORMATS;
|
|
1121
1641
|
exports.Configuration = Configuration;
|
|
1642
|
+
exports.CreatePolicyRequestFromJSON = CreatePolicyRequestFromJSON;
|
|
1643
|
+
exports.CreatePolicyRequestFromJSONTyped = CreatePolicyRequestFromJSONTyped;
|
|
1644
|
+
exports.CreatePolicyRequestToJSON = CreatePolicyRequestToJSON;
|
|
1645
|
+
exports.CreatePolicyRequestToJSONTyped = CreatePolicyRequestToJSONTyped;
|
|
1122
1646
|
exports.DefaultConfig = DefaultConfig;
|
|
1647
|
+
exports.DetectRuleEntitiesInnerFromJSON = DetectRuleEntitiesInnerFromJSON;
|
|
1648
|
+
exports.DetectRuleEntitiesInnerFromJSONTyped = DetectRuleEntitiesInnerFromJSONTyped;
|
|
1649
|
+
exports.DetectRuleEntitiesInnerToJSON = DetectRuleEntitiesInnerToJSON;
|
|
1650
|
+
exports.DetectRuleEntitiesInnerToJSONTyped = DetectRuleEntitiesInnerToJSONTyped;
|
|
1651
|
+
exports.DetectRuleEntitiesInnerTypeEnum = DetectRuleEntitiesInnerTypeEnum;
|
|
1652
|
+
exports.DetectRuleFromJSON = DetectRuleFromJSON;
|
|
1653
|
+
exports.DetectRuleFromJSONTyped = DetectRuleFromJSONTyped;
|
|
1654
|
+
exports.DetectRuleToJSON = DetectRuleToJSON;
|
|
1655
|
+
exports.DetectRuleToJSONTyped = DetectRuleToJSONTyped;
|
|
1656
|
+
exports.DetectRuleTypeEnum = DetectRuleTypeEnum;
|
|
1123
1657
|
exports.EncryptRuleFromJSON = EncryptRuleFromJSON;
|
|
1124
1658
|
exports.EncryptRuleFromJSONTyped = EncryptRuleFromJSONTyped;
|
|
1125
1659
|
exports.EncryptRuleToJSON = EncryptRuleToJSON;
|
|
1126
1660
|
exports.EncryptRuleToJSONTyped = EncryptRuleToJSONTyped;
|
|
1127
1661
|
exports.EncryptRuleTypeEnum = EncryptRuleTypeEnum;
|
|
1128
|
-
exports.EntitiesAnyOfInnerFromJSON = EntitiesAnyOfInnerFromJSON;
|
|
1129
|
-
exports.EntitiesAnyOfInnerFromJSONTyped = EntitiesAnyOfInnerFromJSONTyped;
|
|
1130
|
-
exports.EntitiesAnyOfInnerToJSON = EntitiesAnyOfInnerToJSON;
|
|
1131
|
-
exports.EntitiesAnyOfInnerToJSONTyped = EntitiesAnyOfInnerToJSONTyped;
|
|
1132
|
-
exports.EntitiesFromJSON = EntitiesFromJSON;
|
|
1133
|
-
exports.EntitiesFromJSONTyped = EntitiesFromJSONTyped;
|
|
1134
|
-
exports.EntitiesToJSON = EntitiesToJSON;
|
|
1135
|
-
exports.EntitiesToJSONTyped = EntitiesToJSONTyped;
|
|
1136
1662
|
exports.FetchError = FetchError;
|
|
1137
1663
|
exports.HTTPValidationErrorFromJSON = HTTPValidationErrorFromJSON;
|
|
1138
1664
|
exports.HTTPValidationErrorFromJSONTyped = HTTPValidationErrorFromJSONTyped;
|
|
1139
1665
|
exports.HTTPValidationErrorToJSON = HTTPValidationErrorToJSON;
|
|
1140
1666
|
exports.HTTPValidationErrorToJSONTyped = HTTPValidationErrorToJSONTyped;
|
|
1141
1667
|
exports.JSONApiResponse = JSONApiResponse;
|
|
1668
|
+
exports.ListPolicies200ResponseFromJSON = ListPolicies200ResponseFromJSON;
|
|
1669
|
+
exports.ListPolicies200ResponseFromJSONTyped = ListPolicies200ResponseFromJSONTyped;
|
|
1670
|
+
exports.ListPolicies200ResponseToJSON = ListPolicies200ResponseToJSON;
|
|
1671
|
+
exports.ListPolicies200ResponseToJSONTyped = ListPolicies200ResponseToJSONTyped;
|
|
1142
1672
|
exports.MaskRuleFromJSON = MaskRuleFromJSON;
|
|
1143
1673
|
exports.MaskRuleFromJSONTyped = MaskRuleFromJSONTyped;
|
|
1144
1674
|
exports.MaskRuleToJSON = MaskRuleToJSON;
|
|
@@ -1154,6 +1684,25 @@ exports.ModelResultFromJSONTyped = ModelResultFromJSONTyped;
|
|
|
1154
1684
|
exports.ModelResultToJSON = ModelResultToJSON;
|
|
1155
1685
|
exports.ModelResultToJSONTyped = ModelResultToJSONTyped;
|
|
1156
1686
|
exports.ModelResultTypeEnum = ModelResultTypeEnum;
|
|
1687
|
+
exports.PoliciesApi = PoliciesApi;
|
|
1688
|
+
exports.PolicyDocumentFromJSON = PolicyDocumentFromJSON;
|
|
1689
|
+
exports.PolicyDocumentFromJSONTyped = PolicyDocumentFromJSONTyped;
|
|
1690
|
+
exports.PolicyDocumentRulesInnerFromJSON = PolicyDocumentRulesInnerFromJSON;
|
|
1691
|
+
exports.PolicyDocumentRulesInnerFromJSONTyped = PolicyDocumentRulesInnerFromJSONTyped;
|
|
1692
|
+
exports.PolicyDocumentRulesInnerToJSON = PolicyDocumentRulesInnerToJSON;
|
|
1693
|
+
exports.PolicyDocumentRulesInnerToJSONTyped = PolicyDocumentRulesInnerToJSONTyped;
|
|
1694
|
+
exports.PolicyDocumentRulesInnerTypeEnum = PolicyDocumentRulesInnerTypeEnum;
|
|
1695
|
+
exports.PolicyDocumentSchemaVersionEnum = PolicyDocumentSchemaVersionEnum;
|
|
1696
|
+
exports.PolicyDocumentToJSON = PolicyDocumentToJSON;
|
|
1697
|
+
exports.PolicyDocumentToJSONTyped = PolicyDocumentToJSONTyped;
|
|
1698
|
+
exports.PolicyFromJSON = PolicyFromJSON;
|
|
1699
|
+
exports.PolicyFromJSONTyped = PolicyFromJSONTyped;
|
|
1700
|
+
exports.PolicySummaryFromJSON = PolicySummaryFromJSON;
|
|
1701
|
+
exports.PolicySummaryFromJSONTyped = PolicySummaryFromJSONTyped;
|
|
1702
|
+
exports.PolicySummaryToJSON = PolicySummaryToJSON;
|
|
1703
|
+
exports.PolicySummaryToJSONTyped = PolicySummaryToJSONTyped;
|
|
1704
|
+
exports.PolicyToJSON = PolicyToJSON;
|
|
1705
|
+
exports.PolicyToJSONTyped = PolicyToJSONTyped;
|
|
1157
1706
|
exports.RedactRuleFromJSON = RedactRuleFromJSON;
|
|
1158
1707
|
exports.RedactRuleFromJSONTyped = RedactRuleFromJSONTyped;
|
|
1159
1708
|
exports.RedactRuleToJSON = RedactRuleToJSON;
|
|
@@ -1204,6 +1753,14 @@ exports.TextRangeFromJSON = TextRangeFromJSON;
|
|
|
1204
1753
|
exports.TextRangeFromJSONTyped = TextRangeFromJSONTyped;
|
|
1205
1754
|
exports.TextRangeToJSON = TextRangeToJSON;
|
|
1206
1755
|
exports.TextRangeToJSONTyped = TextRangeToJSONTyped;
|
|
1756
|
+
exports.UpdatePolicyRequestFromJSON = UpdatePolicyRequestFromJSON;
|
|
1757
|
+
exports.UpdatePolicyRequestFromJSONTyped = UpdatePolicyRequestFromJSONTyped;
|
|
1758
|
+
exports.UpdatePolicyRequestToJSON = UpdatePolicyRequestToJSON;
|
|
1759
|
+
exports.UpdatePolicyRequestToJSONTyped = UpdatePolicyRequestToJSONTyped;
|
|
1760
|
+
exports.UsageFromJSON = UsageFromJSON;
|
|
1761
|
+
exports.UsageFromJSONTyped = UsageFromJSONTyped;
|
|
1762
|
+
exports.UsageToJSON = UsageToJSON;
|
|
1763
|
+
exports.UsageToJSONTyped = UsageToJSONTyped;
|
|
1207
1764
|
exports.ValidationErrorFromJSON = ValidationErrorFromJSON;
|
|
1208
1765
|
exports.ValidationErrorFromJSONTyped = ValidationErrorFromJSONTyped;
|
|
1209
1766
|
exports.ValidationErrorLocInnerFromJSON = ValidationErrorLocInnerFromJSON;
|
|
@@ -1216,13 +1773,22 @@ exports.VoidApiResponse = VoidApiResponse;
|
|
|
1216
1773
|
exports.canConsumeForm = canConsumeForm;
|
|
1217
1774
|
exports.exists = exists;
|
|
1218
1775
|
exports.instanceOfAnonymizeRequestBody = instanceOfAnonymizeRequestBody;
|
|
1776
|
+
exports.instanceOfAnonymizeRequestBodyRulesInner = instanceOfAnonymizeRequestBodyRulesInner;
|
|
1219
1777
|
exports.instanceOfAnonymizeResponseBody = instanceOfAnonymizeResponseBody;
|
|
1778
|
+
exports.instanceOfAnonymizeResponseBodyResultsInner = instanceOfAnonymizeResponseBodyResultsInner;
|
|
1779
|
+
exports.instanceOfCreatePolicyRequest = instanceOfCreatePolicyRequest;
|
|
1780
|
+
exports.instanceOfDetectRule = instanceOfDetectRule;
|
|
1781
|
+
exports.instanceOfDetectRuleEntitiesInner = instanceOfDetectRuleEntitiesInner;
|
|
1220
1782
|
exports.instanceOfEncryptRule = instanceOfEncryptRule;
|
|
1221
|
-
exports.instanceOfEntities = instanceOfEntities;
|
|
1222
1783
|
exports.instanceOfHTTPValidationError = instanceOfHTTPValidationError;
|
|
1784
|
+
exports.instanceOfListPolicies200Response = instanceOfListPolicies200Response;
|
|
1223
1785
|
exports.instanceOfMaskRule = instanceOfMaskRule;
|
|
1224
1786
|
exports.instanceOfModelEntity = instanceOfModelEntity;
|
|
1225
1787
|
exports.instanceOfModelResult = instanceOfModelResult;
|
|
1788
|
+
exports.instanceOfPolicy = instanceOfPolicy;
|
|
1789
|
+
exports.instanceOfPolicyDocument = instanceOfPolicyDocument;
|
|
1790
|
+
exports.instanceOfPolicyDocumentRulesInner = instanceOfPolicyDocumentRulesInner;
|
|
1791
|
+
exports.instanceOfPolicySummary = instanceOfPolicySummary;
|
|
1226
1792
|
exports.instanceOfRedactRule = instanceOfRedactRule;
|
|
1227
1793
|
exports.instanceOfRegexEntity = instanceOfRegexEntity;
|
|
1228
1794
|
exports.instanceOfRegexResult = instanceOfRegexResult;
|
|
@@ -1233,6 +1799,8 @@ exports.instanceOfScanRequestBody = instanceOfScanRequestBody;
|
|
|
1233
1799
|
exports.instanceOfScanResponseBody = instanceOfScanResponseBody;
|
|
1234
1800
|
exports.instanceOfScanResult = instanceOfScanResult;
|
|
1235
1801
|
exports.instanceOfTextRange = instanceOfTextRange;
|
|
1802
|
+
exports.instanceOfUpdatePolicyRequest = instanceOfUpdatePolicyRequest;
|
|
1803
|
+
exports.instanceOfUsage = instanceOfUsage;
|
|
1236
1804
|
exports.instanceOfValidationError = instanceOfValidationError;
|
|
1237
1805
|
exports.instanceOfValidationErrorLocInner = instanceOfValidationErrorLocInner;
|
|
1238
1806
|
exports.mapValues = mapValues;
|