@quba/sensitive-data-protection 0.2.2 → 0.2.4

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 CHANGED
@@ -69,6 +69,7 @@ All URIs are relative to *https://www.quba.co/api/sdp*
69
69
  ### Models
70
70
 
71
71
  - [Action](docs/Action.md)
72
+ - [AllowRule](docs/AllowRule.md)
72
73
  - [AnonymizeFileResponseBody](docs/AnonymizeFileResponseBody.md)
73
74
  - [AnonymizeRequestBody](docs/AnonymizeRequestBody.md)
74
75
  - [AnonymizeResponseBody](docs/AnonymizeResponseBody.md)
package/dist/index.cjs CHANGED
@@ -306,6 +306,140 @@ function ActionToJSONTyped(value, ignoreDiscriminator) {
306
306
  return value;
307
307
  }
308
308
 
309
+ //#endregion
310
+ //#region src/models/ModelEntity.ts
311
+ /**
312
+ * @export
313
+ */
314
+ const ModelEntityTypeEnum = { model: "model" };
315
+ /**
316
+ * Check if a given object implements the ModelEntity interface.
317
+ */
318
+ function instanceOfModelEntity(value) {
319
+ if (!("type" in value) || value["type"] === void 0) return false;
320
+ if (!("value" in value) || value["value"] === void 0) return false;
321
+ return true;
322
+ }
323
+ function ModelEntityFromJSON(json) {
324
+ return ModelEntityFromJSONTyped(json, false);
325
+ }
326
+ function ModelEntityFromJSONTyped(json, ignoreDiscriminator) {
327
+ if (json == null) return json;
328
+ return {
329
+ "type": json["type"],
330
+ "value": json["value"],
331
+ "threshold": json["threshold"] == null ? void 0 : json["threshold"]
332
+ };
333
+ }
334
+ function ModelEntityToJSON(json) {
335
+ return ModelEntityToJSONTyped(json, false);
336
+ }
337
+ function ModelEntityToJSONTyped(value, ignoreDiscriminator = false) {
338
+ if (value == null) return value;
339
+ return {
340
+ "type": value["type"],
341
+ "value": value["value"],
342
+ "threshold": value["threshold"]
343
+ };
344
+ }
345
+
346
+ //#endregion
347
+ //#region src/models/RegexEntity.ts
348
+ /**
349
+ * @export
350
+ */
351
+ const RegexEntityTypeEnum = { regex: "regex" };
352
+ /**
353
+ * Check if a given object implements the RegexEntity interface.
354
+ */
355
+ function instanceOfRegexEntity(value) {
356
+ if (!("type" in value) || value["type"] === void 0) return false;
357
+ if (!("value" in value) || value["value"] === void 0) return false;
358
+ return true;
359
+ }
360
+ function RegexEntityFromJSON(json) {
361
+ return RegexEntityFromJSONTyped(json, false);
362
+ }
363
+ function RegexEntityFromJSONTyped(json, ignoreDiscriminator) {
364
+ if (json == null) return json;
365
+ return {
366
+ "type": json["type"],
367
+ "value": json["value"]
368
+ };
369
+ }
370
+ function RegexEntityToJSON(json) {
371
+ return RegexEntityToJSONTyped(json, false);
372
+ }
373
+ function RegexEntityToJSONTyped(value, ignoreDiscriminator = false) {
374
+ if (value == null) return value;
375
+ return {
376
+ "type": value["type"],
377
+ "value": value["value"]
378
+ };
379
+ }
380
+
381
+ //#endregion
382
+ //#region src/models/EntityBody.ts
383
+ function EntityBodyFromJSON(json) {
384
+ return EntityBodyFromJSONTyped(json, false);
385
+ }
386
+ function EntityBodyFromJSONTyped(json, ignoreDiscriminator) {
387
+ if (json == null) return json;
388
+ switch (json["type"]) {
389
+ case "model": return Object.assign({}, ModelEntityFromJSONTyped(json, true), { type: "model" });
390
+ case "regex": return Object.assign({}, RegexEntityFromJSONTyped(json, true), { type: "regex" });
391
+ default: return json;
392
+ }
393
+ }
394
+ function EntityBodyToJSON(json) {
395
+ return EntityBodyToJSONTyped(json, false);
396
+ }
397
+ function EntityBodyToJSONTyped(value, ignoreDiscriminator = false) {
398
+ if (value == null) return value;
399
+ switch (value["type"]) {
400
+ case "model": return Object.assign({}, ModelEntityToJSON(value), { type: "model" });
401
+ case "regex": return Object.assign({}, RegexEntityToJSON(value), { type: "regex" });
402
+ default: return value;
403
+ }
404
+ }
405
+
406
+ //#endregion
407
+ //#region src/models/AllowRule.ts
408
+ /**
409
+ * @export
410
+ */
411
+ const AllowRuleTypeEnum = { allow: "allow" };
412
+ /**
413
+ * Check if a given object implements the AllowRule interface.
414
+ */
415
+ function instanceOfAllowRule(value) {
416
+ if (!("type" in value) || value["type"] === void 0) return false;
417
+ if (!("entities" in value) || value["entities"] === void 0) return false;
418
+ return true;
419
+ }
420
+ function AllowRuleFromJSON(json) {
421
+ return AllowRuleFromJSONTyped(json, false);
422
+ }
423
+ function AllowRuleFromJSONTyped(json, ignoreDiscriminator) {
424
+ if (json == null) return json;
425
+ return {
426
+ "type": json["type"],
427
+ "entities": json["entities"].map(EntityBodyFromJSON),
428
+ "when": json["when"] == null ? void 0 : json["when"]
429
+ };
430
+ }
431
+ function AllowRuleToJSON(json) {
432
+ return AllowRuleToJSONTyped(json, false);
433
+ }
434
+ function AllowRuleToJSONTyped(value, ignoreDiscriminator = false) {
435
+ if (value == null) return value;
436
+ return {
437
+ "type": value["type"],
438
+ "entities": value["entities"].map(EntityBodyToJSON),
439
+ "when": value["when"]
440
+ };
441
+ }
442
+
309
443
  //#endregion
310
444
  //#region src/models/Usage.ts
311
445
  /**
@@ -463,7 +597,8 @@ function FileModelResultFromJSONTyped(json, ignoreDiscriminator) {
463
597
  "score": json["score"],
464
598
  "input": json["input"],
465
599
  "output": json["output"],
466
- "path": json["path"]
600
+ "path": json["path"],
601
+ "action": json["action"] == null ? void 0 : ActionFromJSON(json["action"])
467
602
  };
468
603
  }
469
604
  function FileModelResultToJSON(json) {
@@ -479,7 +614,8 @@ function FileModelResultToJSONTyped(value, ignoreDiscriminator = false) {
479
614
  "score": value["score"],
480
615
  "input": value["input"],
481
616
  "output": value["output"],
482
- "path": value["path"]
617
+ "path": value["path"],
618
+ "action": ActionToJSON(value["action"])
483
619
  };
484
620
  }
485
621
 
@@ -514,7 +650,8 @@ function FileRegexResultFromJSONTyped(json, ignoreDiscriminator) {
514
650
  "value": json["value"],
515
651
  "input": json["input"],
516
652
  "output": json["output"],
517
- "path": json["path"]
653
+ "path": json["path"],
654
+ "action": json["action"] == null ? void 0 : ActionFromJSON(json["action"])
518
655
  };
519
656
  }
520
657
  function FileRegexResultToJSON(json) {
@@ -529,7 +666,8 @@ function FileRegexResultToJSONTyped(value, ignoreDiscriminator = false) {
529
666
  "value": value["value"],
530
667
  "input": value["input"],
531
668
  "output": value["output"],
532
- "path": value["path"]
669
+ "path": value["path"],
670
+ "action": ActionToJSON(value["action"])
533
671
  };
534
672
  }
535
673
 
@@ -602,101 +740,6 @@ function AnonymizeFileResponseBodyToJSONTyped(value, ignoreDiscriminator = false
602
740
  };
603
741
  }
604
742
 
605
- //#endregion
606
- //#region src/models/ModelEntity.ts
607
- /**
608
- * @export
609
- */
610
- const ModelEntityTypeEnum = { model: "model" };
611
- /**
612
- * Check if a given object implements the ModelEntity interface.
613
- */
614
- function instanceOfModelEntity(value) {
615
- if (!("type" in value) || value["type"] === void 0) return false;
616
- if (!("value" in value) || value["value"] === void 0) return false;
617
- return true;
618
- }
619
- function ModelEntityFromJSON(json) {
620
- return ModelEntityFromJSONTyped(json, false);
621
- }
622
- function ModelEntityFromJSONTyped(json, ignoreDiscriminator) {
623
- if (json == null) return json;
624
- return {
625
- "type": json["type"],
626
- "value": json["value"]
627
- };
628
- }
629
- function ModelEntityToJSON(json) {
630
- return ModelEntityToJSONTyped(json, false);
631
- }
632
- function ModelEntityToJSONTyped(value, ignoreDiscriminator = false) {
633
- if (value == null) return value;
634
- return {
635
- "type": value["type"],
636
- "value": value["value"]
637
- };
638
- }
639
-
640
- //#endregion
641
- //#region src/models/RegexEntity.ts
642
- /**
643
- * @export
644
- */
645
- const RegexEntityTypeEnum = { regex: "regex" };
646
- /**
647
- * Check if a given object implements the RegexEntity interface.
648
- */
649
- function instanceOfRegexEntity(value) {
650
- if (!("type" in value) || value["type"] === void 0) return false;
651
- if (!("value" in value) || value["value"] === void 0) return false;
652
- return true;
653
- }
654
- function RegexEntityFromJSON(json) {
655
- return RegexEntityFromJSONTyped(json, false);
656
- }
657
- function RegexEntityFromJSONTyped(json, ignoreDiscriminator) {
658
- if (json == null) return json;
659
- return {
660
- "type": json["type"],
661
- "value": json["value"]
662
- };
663
- }
664
- function RegexEntityToJSON(json) {
665
- return RegexEntityToJSONTyped(json, false);
666
- }
667
- function RegexEntityToJSONTyped(value, ignoreDiscriminator = false) {
668
- if (value == null) return value;
669
- return {
670
- "type": value["type"],
671
- "value": value["value"]
672
- };
673
- }
674
-
675
- //#endregion
676
- //#region src/models/EntityBody.ts
677
- function EntityBodyFromJSON(json) {
678
- return EntityBodyFromJSONTyped(json, false);
679
- }
680
- function EntityBodyFromJSONTyped(json, ignoreDiscriminator) {
681
- if (json == null) return json;
682
- switch (json["type"]) {
683
- case "model": return Object.assign({}, ModelEntityFromJSONTyped(json, true), { type: "model" });
684
- case "regex": return Object.assign({}, RegexEntityFromJSONTyped(json, true), { type: "regex" });
685
- default: return json;
686
- }
687
- }
688
- function EntityBodyToJSON(json) {
689
- return EntityBodyToJSONTyped(json, false);
690
- }
691
- function EntityBodyToJSONTyped(value, ignoreDiscriminator = false) {
692
- if (value == null) return value;
693
- switch (value["type"]) {
694
- case "model": return Object.assign({}, ModelEntityToJSON(value), { type: "model" });
695
- case "regex": return Object.assign({}, RegexEntityToJSON(value), { type: "regex" });
696
- default: return value;
697
- }
698
- }
699
-
700
743
  //#endregion
701
744
  //#region src/models/DetectRule.ts
702
745
  /**
@@ -719,7 +762,8 @@ function DetectRuleFromJSONTyped(json, ignoreDiscriminator) {
719
762
  return {
720
763
  "type": json["type"],
721
764
  "entities": json["entities"].map(EntityBodyFromJSON),
722
- "action": json["action"] == null ? void 0 : ActionFromJSON(json["action"])
765
+ "action": json["action"] == null ? void 0 : ActionFromJSON(json["action"]),
766
+ "when": json["when"] == null ? void 0 : json["when"]
723
767
  };
724
768
  }
725
769
  function DetectRuleToJSON(json) {
@@ -730,7 +774,8 @@ function DetectRuleToJSONTyped(value, ignoreDiscriminator = false) {
730
774
  return {
731
775
  "type": value["type"],
732
776
  "entities": value["entities"].map(EntityBodyToJSON),
733
- "action": ActionToJSON(value["action"])
777
+ "action": ActionToJSON(value["action"]),
778
+ "when": value["when"]
734
779
  };
735
780
  }
736
781
 
@@ -757,6 +802,7 @@ function EncryptRuleFromJSONTyped(json, ignoreDiscriminator) {
757
802
  "type": json["type"],
758
803
  "entities": json["entities"].map(EntityBodyFromJSON),
759
804
  "action": json["action"] == null ? void 0 : ActionFromJSON(json["action"]),
805
+ "when": json["when"] == null ? void 0 : json["when"],
760
806
  "key": json["key"] == null ? void 0 : json["key"]
761
807
  };
762
808
  }
@@ -769,6 +815,7 @@ function EncryptRuleToJSONTyped(value, ignoreDiscriminator = false) {
769
815
  "type": value["type"],
770
816
  "entities": value["entities"].map(EntityBodyToJSON),
771
817
  "action": ActionToJSON(value["action"]),
818
+ "when": value["when"],
772
819
  "key": value["key"]
773
820
  };
774
821
  }
@@ -797,6 +844,7 @@ function HMACRuleFromJSONTyped(json, ignoreDiscriminator) {
797
844
  "type": json["type"],
798
845
  "entities": json["entities"].map(EntityBodyFromJSON),
799
846
  "action": json["action"] == null ? void 0 : ActionFromJSON(json["action"]),
847
+ "when": json["when"] == null ? void 0 : json["when"],
800
848
  "key": json["key"],
801
849
  "length": json["length"] == null ? void 0 : json["length"]
802
850
  };
@@ -810,6 +858,7 @@ function HMACRuleToJSONTyped(value, ignoreDiscriminator = false) {
810
858
  "type": value["type"],
811
859
  "entities": value["entities"].map(EntityBodyToJSON),
812
860
  "action": ActionToJSON(value["action"]),
861
+ "when": value["when"],
813
862
  "key": value["key"],
814
863
  "length": value["length"]
815
864
  };
@@ -838,6 +887,7 @@ function MaskRuleFromJSONTyped(json, ignoreDiscriminator) {
838
887
  "type": json["type"],
839
888
  "entities": json["entities"].map(EntityBodyFromJSON),
840
889
  "action": json["action"] == null ? void 0 : ActionFromJSON(json["action"]),
890
+ "when": json["when"] == null ? void 0 : json["when"],
841
891
  "masking_char": json["masking_char"] == null ? void 0 : json["masking_char"],
842
892
  "chars_to_mask": json["chars_to_mask"] == null ? void 0 : json["chars_to_mask"],
843
893
  "from_end": json["from_end"] == null ? void 0 : json["from_end"]
@@ -852,6 +902,7 @@ function MaskRuleToJSONTyped(value, ignoreDiscriminator = false) {
852
902
  "type": value["type"],
853
903
  "entities": value["entities"].map(EntityBodyToJSON),
854
904
  "action": ActionToJSON(value["action"]),
905
+ "when": value["when"],
855
906
  "masking_char": value["masking_char"],
856
907
  "chars_to_mask": value["chars_to_mask"],
857
908
  "from_end": value["from_end"]
@@ -881,6 +932,7 @@ function PseudonymizeRuleFromJSONTyped(json, ignoreDiscriminator) {
881
932
  "type": json["type"],
882
933
  "entities": json["entities"].map(EntityBodyFromJSON),
883
934
  "action": json["action"] == null ? void 0 : ActionFromJSON(json["action"]),
935
+ "when": json["when"] == null ? void 0 : json["when"],
884
936
  "tag": json["tag"] == null ? void 0 : json["tag"]
885
937
  };
886
938
  }
@@ -893,6 +945,7 @@ function PseudonymizeRuleToJSONTyped(value, ignoreDiscriminator = false) {
893
945
  "type": value["type"],
894
946
  "entities": value["entities"].map(EntityBodyToJSON),
895
947
  "action": ActionToJSON(value["action"]),
948
+ "when": value["when"],
896
949
  "tag": value["tag"]
897
950
  };
898
951
  }
@@ -919,7 +972,8 @@ function RedactRuleFromJSONTyped(json, ignoreDiscriminator) {
919
972
  return {
920
973
  "type": json["type"],
921
974
  "entities": json["entities"].map(EntityBodyFromJSON),
922
- "action": json["action"] == null ? void 0 : ActionFromJSON(json["action"])
975
+ "action": json["action"] == null ? void 0 : ActionFromJSON(json["action"]),
976
+ "when": json["when"] == null ? void 0 : json["when"]
923
977
  };
924
978
  }
925
979
  function RedactRuleToJSON(json) {
@@ -930,7 +984,8 @@ function RedactRuleToJSONTyped(value, ignoreDiscriminator = false) {
930
984
  return {
931
985
  "type": value["type"],
932
986
  "entities": value["entities"].map(EntityBodyToJSON),
933
- "action": ActionToJSON(value["action"])
987
+ "action": ActionToJSON(value["action"]),
988
+ "when": value["when"]
934
989
  };
935
990
  }
936
991
 
@@ -957,6 +1012,7 @@ function ReplaceRuleFromJSONTyped(json, ignoreDiscriminator) {
957
1012
  "type": json["type"],
958
1013
  "entities": json["entities"].map(EntityBodyFromJSON),
959
1014
  "action": json["action"] == null ? void 0 : ActionFromJSON(json["action"]),
1015
+ "when": json["when"] == null ? void 0 : json["when"],
960
1016
  "replacement": json["replacement"] == null ? void 0 : json["replacement"]
961
1017
  };
962
1018
  }
@@ -969,6 +1025,7 @@ function ReplaceRuleToJSONTyped(value, ignoreDiscriminator = false) {
969
1025
  "type": value["type"],
970
1026
  "entities": value["entities"].map(EntityBodyToJSON),
971
1027
  "action": ActionToJSON(value["action"]),
1028
+ "when": value["when"],
972
1029
  "replacement": value["replacement"]
973
1030
  };
974
1031
  }
@@ -995,7 +1052,8 @@ function SHA256RuleFromJSONTyped(json, ignoreDiscriminator) {
995
1052
  return {
996
1053
  "type": json["type"],
997
1054
  "entities": json["entities"].map(EntityBodyFromJSON),
998
- "action": json["action"] == null ? void 0 : ActionFromJSON(json["action"])
1055
+ "action": json["action"] == null ? void 0 : ActionFromJSON(json["action"]),
1056
+ "when": json["when"] == null ? void 0 : json["when"]
999
1057
  };
1000
1058
  }
1001
1059
  function SHA256RuleToJSON(json) {
@@ -1006,7 +1064,8 @@ function SHA256RuleToJSONTyped(value, ignoreDiscriminator = false) {
1006
1064
  return {
1007
1065
  "type": value["type"],
1008
1066
  "entities": value["entities"].map(EntityBodyToJSON),
1009
- "action": ActionToJSON(value["action"])
1067
+ "action": ActionToJSON(value["action"]),
1068
+ "when": value["when"]
1010
1069
  };
1011
1070
  }
1012
1071
 
@@ -1032,7 +1091,8 @@ function SHA512RuleFromJSONTyped(json, ignoreDiscriminator) {
1032
1091
  return {
1033
1092
  "type": json["type"],
1034
1093
  "entities": json["entities"].map(EntityBodyFromJSON),
1035
- "action": json["action"] == null ? void 0 : ActionFromJSON(json["action"])
1094
+ "action": json["action"] == null ? void 0 : ActionFromJSON(json["action"]),
1095
+ "when": json["when"] == null ? void 0 : json["when"]
1036
1096
  };
1037
1097
  }
1038
1098
  function SHA512RuleToJSON(json) {
@@ -1043,7 +1103,8 @@ function SHA512RuleToJSONTyped(value, ignoreDiscriminator = false) {
1043
1103
  return {
1044
1104
  "type": value["type"],
1045
1105
  "entities": value["entities"].map(EntityBodyToJSON),
1046
- "action": ActionToJSON(value["action"])
1106
+ "action": ActionToJSON(value["action"]),
1107
+ "when": value["when"]
1047
1108
  };
1048
1109
  }
1049
1110
 
@@ -1055,6 +1116,7 @@ function RuleBodyFromJSON(json) {
1055
1116
  function RuleBodyFromJSONTyped(json, ignoreDiscriminator) {
1056
1117
  if (json == null) return json;
1057
1118
  switch (json["type"]) {
1119
+ case "allow": return Object.assign({}, AllowRuleFromJSONTyped(json, true), { type: "allow" });
1058
1120
  case "detect": return Object.assign({}, DetectRuleFromJSONTyped(json, true), { type: "detect" });
1059
1121
  case "encrypt": return Object.assign({}, EncryptRuleFromJSONTyped(json, true), { type: "encrypt" });
1060
1122
  case "hmac": return Object.assign({}, HMACRuleFromJSONTyped(json, true), { type: "hmac" });
@@ -1073,6 +1135,7 @@ function RuleBodyToJSON(json) {
1073
1135
  function RuleBodyToJSONTyped(value, ignoreDiscriminator = false) {
1074
1136
  if (value == null) return value;
1075
1137
  switch (value["type"]) {
1138
+ case "allow": return Object.assign({}, AllowRuleToJSON(value), { type: "allow" });
1076
1139
  case "detect": return Object.assign({}, DetectRuleToJSON(value), { type: "detect" });
1077
1140
  case "encrypt": return Object.assign({}, EncryptRuleToJSON(value), { type: "encrypt" });
1078
1141
  case "hmac": return Object.assign({}, HMACRuleToJSON(value), { type: "hmac" });
@@ -2692,6 +2755,7 @@ function PolicyDocumentRulesInnerFromJSON(json) {
2692
2755
  function PolicyDocumentRulesInnerFromJSONTyped(json, ignoreDiscriminator) {
2693
2756
  if (json == null) return json;
2694
2757
  switch (json["type"]) {
2758
+ case "allow": return Object.assign({}, AllowRuleFromJSONTyped(json, true), { type: "allow" });
2695
2759
  case "detect": return Object.assign({}, DetectRuleFromJSONTyped(json, true), { type: "detect" });
2696
2760
  case "encrypt": return Object.assign({}, EncryptRuleFromJSONTyped(json, true), { type: "encrypt" });
2697
2761
  case "hmac": return Object.assign({}, HMACRuleFromJSONTyped(json, true), { type: "hmac" });
@@ -2710,6 +2774,7 @@ function PolicyDocumentRulesInnerToJSON(json) {
2710
2774
  function PolicyDocumentRulesInnerToJSONTyped(value, ignoreDiscriminator = false) {
2711
2775
  if (value == null) return value;
2712
2776
  switch (value["type"]) {
2777
+ case "allow": return Object.assign({}, AllowRuleToJSON(value), { type: "allow" });
2713
2778
  case "detect": return Object.assign({}, DetectRuleToJSON(value), { type: "detect" });
2714
2779
  case "encrypt": return Object.assign({}, EncryptRuleToJSON(value), { type: "encrypt" });
2715
2780
  case "hmac": return Object.assign({}, HMACRuleToJSON(value), { type: "hmac" });
@@ -2730,6 +2795,15 @@ function PolicyDocumentRulesInnerToJSONTyped(value, ignoreDiscriminator = false)
2730
2795
  */
2731
2796
  const PolicyDocumentSchemaVersionEnum = { NUMBER_1: 1 };
2732
2797
  /**
2798
+ * @export
2799
+ */
2800
+ const PolicyDocumentEmbeddedRulesEnum = {
2801
+ anonymize: "anonymize",
2802
+ anonymize_or_keep: "anonymize_or_keep",
2803
+ remove: "remove",
2804
+ keep: "keep"
2805
+ };
2806
+ /**
2733
2807
  * Check if a given object implements the PolicyDocument interface.
2734
2808
  */
2735
2809
  function instanceOfPolicyDocument(value) {
@@ -2746,6 +2820,8 @@ function PolicyDocumentFromJSONTyped(json, ignoreDiscriminator) {
2746
2820
  "schema_version": json["schema_version"],
2747
2821
  "name": json["name"] == null ? void 0 : json["name"],
2748
2822
  "confidence_threshold": json["confidence_threshold"] == null ? void 0 : json["confidence_threshold"],
2823
+ "embedded_rules": json["embedded_rules"] == null ? void 0 : json["embedded_rules"],
2824
+ "models": json["models"] == null ? void 0 : json["models"],
2749
2825
  "rules": json["rules"].map(PolicyDocumentRulesInnerFromJSON)
2750
2826
  };
2751
2827
  }
@@ -2758,6 +2834,8 @@ function PolicyDocumentToJSONTyped(value, ignoreDiscriminator = false) {
2758
2834
  "schema_version": value["schema_version"],
2759
2835
  "name": value["name"],
2760
2836
  "confidence_threshold": value["confidence_threshold"],
2837
+ "embedded_rules": value["embedded_rules"],
2838
+ "models": value["models"],
2761
2839
  "rules": value["rules"].map(PolicyDocumentRulesInnerToJSON)
2762
2840
  };
2763
2841
  }
@@ -2885,7 +2963,8 @@ function FieldErrorPathInnerToJSONTyped(value, ignoreDiscriminator = false) {
2885
2963
  * `limit`); `too_few`/`too_many` items (see `limit`); `out_of_range` (see
2886
2964
  * `min`, `max`); `blank`: only whitespace; `unknown_type` (see `allowed`);
2887
2965
  * `invalid_pattern`: not a regular expression the engine runs;
2888
- * `invalid_key`: not a Fernet key; `labels_over_budget`: the labels leave
2966
+ * `invalid_key`: not a Fernet key; `invalid_condition`: not a `when` the
2967
+ * engine runs; `labels_over_budget`: the labels leave
2889
2968
  * the model too little room for text (see `tokens`, `limit`).
2890
2969
  * @export
2891
2970
  */
@@ -2902,6 +2981,7 @@ const FieldErrorCode = {
2902
2981
  unknown_type: "unknown_type",
2903
2982
  invalid_pattern: "invalid_pattern",
2904
2983
  invalid_key: "invalid_key",
2984
+ invalid_condition: "invalid_condition",
2905
2985
  labels_over_budget: "labels_over_budget"
2906
2986
  };
2907
2987
  function instanceOfFieldErrorCode(value) {
@@ -3688,6 +3768,11 @@ exports.ActionFromJSON = ActionFromJSON;
3688
3768
  exports.ActionFromJSONTyped = ActionFromJSONTyped;
3689
3769
  exports.ActionToJSON = ActionToJSON;
3690
3770
  exports.ActionToJSONTyped = ActionToJSONTyped;
3771
+ exports.AllowRuleFromJSON = AllowRuleFromJSON;
3772
+ exports.AllowRuleFromJSONTyped = AllowRuleFromJSONTyped;
3773
+ exports.AllowRuleToJSON = AllowRuleToJSON;
3774
+ exports.AllowRuleToJSONTyped = AllowRuleToJSONTyped;
3775
+ exports.AllowRuleTypeEnum = AllowRuleTypeEnum;
3691
3776
  exports.AnonymizeFileEmbeddedRulesEnum = AnonymizeFileEmbeddedRulesEnum;
3692
3777
  exports.AnonymizeFileResponseBodyFromJSON = AnonymizeFileResponseBodyFromJSON;
3693
3778
  exports.AnonymizeFileResponseBodyFromJSONTyped = AnonymizeFileResponseBodyFromJSONTyped;
@@ -3925,6 +4010,7 @@ exports.PathSegmentFromJSONTyped = PathSegmentFromJSONTyped;
3925
4010
  exports.PathSegmentToJSON = PathSegmentToJSON;
3926
4011
  exports.PathSegmentToJSONTyped = PathSegmentToJSONTyped;
3927
4012
  exports.PoliciesApi = PoliciesApi;
4013
+ exports.PolicyDocumentEmbeddedRulesEnum = PolicyDocumentEmbeddedRulesEnum;
3928
4014
  exports.PolicyDocumentFromJSON = PolicyDocumentFromJSON;
3929
4015
  exports.PolicyDocumentFromJSONTyped = PolicyDocumentFromJSONTyped;
3930
4016
  exports.PolicyDocumentRulesInnerFromJSON = PolicyDocumentRulesInnerFromJSON;
@@ -4081,6 +4167,7 @@ exports.VoidApiResponse = VoidApiResponse;
4081
4167
  exports.canConsumeForm = canConsumeForm;
4082
4168
  exports.exists = exists;
4083
4169
  exports.instanceOfAction = instanceOfAction;
4170
+ exports.instanceOfAllowRule = instanceOfAllowRule;
4084
4171
  exports.instanceOfAnonymizeFileResponseBody = instanceOfAnonymizeFileResponseBody;
4085
4172
  exports.instanceOfAnonymizeRequestBody = instanceOfAnonymizeRequestBody;
4086
4173
  exports.instanceOfAnonymizeResponseBody = instanceOfAnonymizeResponseBody;