@stll/anonymize-wasm 2.0.1 → 2.0.2

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/dist/wasm.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as OPERATOR_TYPES, i as DetectionSource, n as DETECTION_SOURCES, o as OperatorType, r as DETECTOR_PRIORITY, t as DEFAULT_ENTITY_LABELS } from "./constants2.mjs";
2
-
1
+ import { a as DetectionSource, c as ENTITY_SELECTIONS, d as EntitySelection, f as OPERATOR_TYPES, i as DefaultEntityLabel, l as EntityCapability, n as DETECTION_SOURCES, o as ENTITY_CAPABILITIES, p as OperatorType, r as DETECTOR_PRIORITY, s as ENTITY_LABELS, t as DEFAULT_ENTITY_LABELS, u as EntityLabel } from "./constants2.mjs";
2
+ import { CAPABILITY_MANIFEST, CAPABILITY_MANIFEST_SCHEMA_VERSION, CAPABILITY_RUNTIMES, CapabilityManifest, CapabilityRuntime } from "./capabilities.mjs";
3
3
  //#region src/native-search-config.d.ts
4
4
  /**
5
5
  * Structural type for the prepared static-search config the native binding
@@ -344,7 +344,8 @@ type DetectedEntity = EntityBase & {
344
344
  * write — or that a later pass could clear.
345
345
  */
346
346
  type CorefAliasEntity = EntityBase & {
347
- source: typeof DETECTION_SOURCES.COREFERENCE; /** Full text of the source entity this alias refers to. */
347
+ source: typeof DETECTION_SOURCES.COREFERENCE;
348
+ /** Full text of the source entity this alias refers to. */
348
349
  corefSourceText: string;
349
350
  };
350
351
  /**
@@ -375,12 +376,22 @@ type GazetteerEntry = {
375
376
  source: "manual" | "confirmed-from-model";
376
377
  };
377
378
  /** Per-label operator selection. Key is the entity label. */
379
+ type MaskDirection = "start" | "end";
380
+ type MaskOperatorConfig = {
381
+ type: "mask";
382
+ maskingCharacter: string;
383
+ charactersToMask: number;
384
+ direction: MaskDirection;
385
+ };
386
+ type OperatorSelection = Exclude<OperatorType, "mask"> | MaskOperatorConfig;
378
387
  type OperatorConfig = {
379
- /** Operator per label. Missing labels default to "replace". */operators: Record<string, OperatorType>; /** Custom replacement string for the redact operator. */
388
+ /** Operator per label. Missing labels default to "replace". */
389
+ operators: Record<string, OperatorSelection>;
390
+ /** Custom replacement string for the redact operator. */
380
391
  redactString: string;
381
392
  };
382
393
  /** Whether an operator produces a reversible redaction entry. */
383
- type OperatorReversibility = "reversible" | "irreversible";
394
+ type OperatorReversibility = "reversible" | "irreversible" | "preserving";
384
395
  type AnonymisationOperator = {
385
396
  type: OperatorType;
386
397
  reversibility: OperatorReversibility;
@@ -388,7 +399,7 @@ type AnonymisationOperator = {
388
399
  * Apply the operator to a single entity occurrence.
389
400
  * Returns the replacement string to embed in the document.
390
401
  */
391
- apply: (text: string, label: string, placeholder: string, redactString: string) => string;
402
+ apply: (text: string, label: string, placeholder: string, redactString: string, selection: OperatorSelection) => string;
392
403
  };
393
404
  /**
394
405
  * Redacted document output with stable entity mapping.
@@ -397,9 +408,10 @@ type RedactionResult = {
397
408
  redactedText: string;
398
409
  /**
399
410
  * Maps placeholder to original text. Only populated for
400
- * reversible operators (replace). Empty for redact.
411
+ * reversible operators (replace). Empty for redact, keep, and mask.
401
412
  */
402
- redactionMap: Map<string, string>; /** Maps placeholder to the operator that produced it. */
413
+ redactionMap: Map<string, string>;
414
+ /** Maps placeholder to the operator that produced it. */
403
415
  operatorMap: Map<string, OperatorType>;
404
416
  entityCount: number;
405
417
  };
@@ -560,15 +572,21 @@ type PipelineConfig = {
560
572
  * additions (Dutch, Russian, Chinese, Arabic, etc.).
561
573
  */
562
574
  enableCountries?: boolean;
563
- enableNer: boolean;
575
+ /**
576
+ * Reserved for compatibility with the removed TypeScript pipeline.
577
+ * The native pipeline rejects `true`; supply deterministic custom rules today
578
+ * and use the future caller-detection API for model-produced spans.
579
+ *
580
+ * @deprecated Native NER is not implemented.
581
+ */
582
+ enableNer?: boolean;
564
583
  enableConfidenceBoost: boolean;
565
584
  enableCoreference: boolean;
566
585
  enableZoneClassification?: boolean;
567
586
  enableHotwordRules?: boolean;
568
587
  /**
569
588
  * Requested output labels. An empty array means
570
- * "do not filter by label" for deterministic
571
- * detectors; NER falls back to DEFAULT_ENTITY_LABELS.
589
+ * "do not filter by label" for deterministic detectors.
572
590
  */
573
591
  labels: string[];
574
592
  workspaceId: string;
@@ -583,9 +601,28 @@ type PipelineConfig = {
583
601
  //#endregion
584
602
  //#region src/native.d.ts
585
603
  type NativeBindingOperatorConfig = {
586
- operators?: Record<string, OperatorType>;
604
+ operators?: Record<string, OperatorSelection>;
587
605
  redactString?: string;
588
606
  };
607
+ type NativeBindingCallerRedactionOptions = {
608
+ requestJson: string;
609
+ operators?: NativeBindingOperatorConfig;
610
+ };
611
+ type NativeBindingSessionCallerRedactionInput = {
612
+ fullText: string;
613
+ requestJson: string;
614
+ };
615
+ type NativeBindingSessionCallerRedactionPlanOptions = {
616
+ inputs: NativeBindingSessionCallerRedactionInput[];
617
+ operators?: NativeBindingOperatorConfig;
618
+ observedAtEpochSeconds?: number;
619
+ };
620
+ type NativeBindingOpenSessionArchiveOptions = {
621
+ archive: Uint8Array;
622
+ key: Uint8Array;
623
+ expectedSessionId: string;
624
+ observedAtEpochSeconds?: number;
625
+ };
589
626
  type NativeDiagnosticsBatchCallback = (diagnosticsJson: string) => void;
590
627
  type NativeResultEventCallback = (eventJson: string) => void;
591
628
  type NativeBindingRedactionEntry = {
@@ -604,6 +641,8 @@ type NativeBindingPipelineEntity = {
604
641
  score: number;
605
642
  source: string;
606
643
  sourceDetail?: string | null;
644
+ providerId?: string | null;
645
+ detectionId?: string | null;
607
646
  };
608
647
  type NativeBindingRedactionResult = {
609
648
  redactedText: string;
@@ -615,14 +654,69 @@ type NativeBindingStaticRedactionResult = {
615
654
  resolvedEntities: NativeBindingPipelineEntity[];
616
655
  redaction: NativeBindingRedactionResult;
617
656
  };
657
+ type NativeSessionStatus = "active" | "not_yet_active" | "expired" | "deleted";
658
+ type NativeSessionLifecycle = {
659
+ createdAtEpochSeconds: number;
660
+ expiresAtEpochSeconds?: number;
661
+ };
662
+ type NativeSessionMetadata = {
663
+ sessionId: string;
664
+ createdAtEpochSeconds: number | null;
665
+ expiresAtEpochSeconds: number | null;
666
+ mappingCount: number;
667
+ status: NativeSessionStatus;
668
+ };
669
+ type NativeSessionDeletionSummary = {
670
+ sessionId: string;
671
+ deletedMappingCount: number;
672
+ };
673
+ type NativeSessionRedactionAtOptions = {
674
+ fullText: string;
675
+ observedAtEpochSeconds: number;
676
+ operators?: NativeOperatorConfig;
677
+ };
678
+ type NativeCreateSessionWithLifecycleOptions = NativeSessionLifecycle & {
679
+ sessionId: string;
680
+ };
681
+ type NativeOpenSessionArchiveOptions = {
682
+ archive: Uint8Array;
683
+ key: Uint8Array;
684
+ expectedSessionId: string;
685
+ observedAtEpochSeconds?: number;
686
+ };
687
+ type NativePreparedRedactionSessionBinding = {
688
+ sessionId: () => string;
689
+ mappingCount: () => number;
690
+ restoreText?: (fullText: string) => string;
691
+ restoreTextAt?: (fullText: string, observedAtEpochSeconds: number) => string;
692
+ toPlaintextJson: () => string;
693
+ toPlaintextJsonAt?: (observedAtEpochSeconds: number) => string;
694
+ toEncryptedArchive?: (key: Uint8Array) => Uint8Array;
695
+ toEncryptedArchiveAt?: (key: Uint8Array, observedAtEpochSeconds: number) => Uint8Array;
696
+ inspectJson?: (observedAtEpochSeconds?: number) => string;
697
+ deleteJson?: () => string;
698
+ redactStaticEntitiesJson: (fullText: string, operators?: NativeBindingOperatorConfig) => string;
699
+ redactStaticEntitiesJsonAt?: (fullText: string, observedAtEpochSeconds: number, operators?: NativeBindingOperatorConfig) => string;
700
+ planStaticEntitiesWithCallerDetections?: (options: NativeBindingSessionCallerRedactionPlanOptions) => NativePreparedSessionRedactionPlanBinding;
701
+ };
702
+ type NativePreparedSessionRedactionPlanBinding = {
703
+ resultJson: () => string;
704
+ commit: () => void;
705
+ };
618
706
  type NativePreparedSearchBinding = {
619
707
  prepareDiagnosticsJson?: () => string;
620
708
  warmLazyRegex?: () => void;
621
709
  warm_lazy_regex?: () => void;
622
710
  warmLazyRegexDiagnosticsJson?: () => string;
623
711
  warm_lazy_regex_diagnostics_json?: () => string;
712
+ createRedactionSession?: (sessionId: string) => NativePreparedRedactionSessionBinding;
713
+ createRedactionSessionWithLifecycle?: (sessionId: string, createdAtEpochSeconds: number, expiresAtEpochSeconds?: number) => NativePreparedRedactionSessionBinding;
714
+ restoreRedactionSession?: (plaintextJson: string) => NativePreparedRedactionSessionBinding;
715
+ restoreEncryptedRedactionSession?: (options: NativeBindingOpenSessionArchiveOptions) => NativePreparedRedactionSessionBinding;
624
716
  redactStaticEntities: (fullText: string, operators?: NativeBindingOperatorConfig) => NativeBindingStaticRedactionResult;
625
717
  redactStaticEntitiesJson?: (fullText: string, operators?: NativeBindingOperatorConfig) => string;
718
+ redactStaticEntitiesWithCallerDetectionsJson?: (fullText: string, options: NativeBindingCallerRedactionOptions) => string;
719
+ redactStaticEntitiesWithCallerDetectionsDiagnosticsJson?: (fullText: string, options: NativeBindingCallerRedactionOptions) => string;
626
720
  redactStaticEntitiesResultStreamJson?: (fullText: string, operators: NativeBindingOperatorConfig | undefined, onEvent: NativeResultEventCallback) => string;
627
721
  redactStaticEntitiesDiagnosticsJson?: (fullText: string, operators?: NativeBindingOperatorConfig) => string;
628
722
  redactStaticEntitiesDiagnosticsStreamJson?: (fullText: string, operators: NativeBindingOperatorConfig | undefined, onBatch: NativeDiagnosticsBatchCallback) => string;
@@ -645,9 +739,41 @@ type NativeAnonymizeBinding = {
645
739
  assembleStaticSearchCompressedPackageBytes?: (pipelineConfigJson: Uint8Array, dictionariesJson?: Uint8Array, gazetteerJson?: Uint8Array) => Uint8Array;
646
740
  };
647
741
  type NativeOperatorConfig = {
648
- operators?: Record<string, OperatorType>;
742
+ operators?: Record<string, OperatorSelection>;
649
743
  redactString?: string;
650
744
  };
745
+ declare const CALLER_DETECTION_CONTRACT_VERSION = 2;
746
+ type NativeCallerDetection = {
747
+ start: number;
748
+ end: number;
749
+ label: string;
750
+ score: number;
751
+ providerId: string;
752
+ detectionId: string;
753
+ };
754
+ type NativeCallerRedactionOptions = {
755
+ detections: readonly NativeCallerDetection[];
756
+ operators?: NativeOperatorConfig;
757
+ };
758
+ type NativeSessionCallerRedactionInput = {
759
+ fullText: string;
760
+ detections: readonly NativeCallerDetection[];
761
+ };
762
+ type NativeSessionCallerRedactionPlanOptions = {
763
+ inputs: readonly NativeSessionCallerRedactionInput[];
764
+ operators?: NativeOperatorConfig;
765
+ observedAtEpochSeconds?: number;
766
+ };
767
+ type NativeTextReplacement = {
768
+ start: number;
769
+ end: number;
770
+ replacement: string;
771
+ };
772
+ type NativeSessionBlockRedactionPlan = {
773
+ replacements: readonly NativeTextReplacement[];
774
+ entityCount: number;
775
+ callerEntityCount: number;
776
+ };
651
777
  type NativePipelineEntity = {
652
778
  start: number;
653
779
  end: number;
@@ -656,6 +782,8 @@ type NativePipelineEntity = {
656
782
  score: number;
657
783
  source: string;
658
784
  sourceDetail?: string;
785
+ providerId?: string;
786
+ detectionId?: string;
659
787
  };
660
788
  type NativeRedactionResult = {
661
789
  redactedText: string;
@@ -713,6 +841,44 @@ type NativeBindingVersionOptions = {
713
841
  binding: NativeAnonymizeBinding;
714
842
  expectedVersion: string;
715
843
  };
844
+ declare class PreparedNativeRedactionSession {
845
+ #private;
846
+ constructor(session: NativePreparedRedactionSessionBinding);
847
+ sessionId(): string;
848
+ session_id(): string;
849
+ mappingCount(): number;
850
+ mapping_count(): number;
851
+ restoreText(fullText: string, observedAtEpochSeconds?: number): string;
852
+ restore_text(fullText: string, observedAtEpochSeconds?: number): string;
853
+ toPlaintextJson(): string;
854
+ to_plaintext_json(): string;
855
+ toPlaintextJsonAt(observedAtEpochSeconds: number): string;
856
+ to_plaintext_json_at(observedAtEpochSeconds: number): string;
857
+ toEncryptedArchive(key: Uint8Array): Uint8Array;
858
+ to_encrypted_archive(key: Uint8Array): Uint8Array;
859
+ toEncryptedArchiveAt(key: Uint8Array, observedAtEpochSeconds: number): Uint8Array;
860
+ to_encrypted_archive_at(key: Uint8Array, observedAtEpochSeconds: number): Uint8Array;
861
+ inspect(observedAtEpochSeconds?: number): NativeSessionMetadata;
862
+ delete(): NativeSessionDeletionSummary;
863
+ redactStaticEntities(fullText: string, operators?: NativeOperatorConfig): NativeStaticRedactionResult;
864
+ redactText(fullText: string, operators?: NativeOperatorConfig): NativeStaticRedactionResult;
865
+ redact_text(fullText: string, operators?: NativeOperatorConfig): NativeStaticRedactionResult;
866
+ redactTextJson(fullText: string, operators?: NativeOperatorConfig): string;
867
+ redact_text_json(fullText: string, operators?: NativeOperatorConfig): string;
868
+ redactStaticEntitiesAt(options: NativeSessionRedactionAtOptions): NativeStaticRedactionResult;
869
+ redactTextAt(options: NativeSessionRedactionAtOptions): NativeStaticRedactionResult;
870
+ redact_text_at(options: NativeSessionRedactionAtOptions): NativeStaticRedactionResult;
871
+ redact_static_entities_at(options: NativeSessionRedactionAtOptions): NativeStaticRedactionResult;
872
+ redactTextJsonAt({ fullText, observedAtEpochSeconds, operators }: NativeSessionRedactionAtOptions): string;
873
+ redact_text_json_at(options: NativeSessionRedactionAtOptions): string;
874
+ planTextBatchWithCallerDetections({ inputs, operators, observedAtEpochSeconds }: NativeSessionCallerRedactionPlanOptions): PreparedNativeSessionRedactionPlan;
875
+ }
876
+ declare class PreparedNativeSessionRedactionPlan {
877
+ #private;
878
+ readonly blocks: readonly NativeSessionBlockRedactionPlan[];
879
+ constructor(plan: NativePreparedSessionRedactionPlanBinding);
880
+ commit(): void;
881
+ }
716
882
  declare class PreparedNativeAnonymizer {
717
883
  #private;
718
884
  constructor(prepared: NativePreparedSearchBinding);
@@ -722,9 +888,21 @@ declare class PreparedNativeAnonymizer {
722
888
  warm_lazy_regex(): void;
723
889
  warmLazyRegexDiagnosticsJson(): string | null;
724
890
  warm_lazy_regex_diagnostics_json(): string | null;
891
+ createRedactionSession(sessionId: string): PreparedNativeRedactionSession;
892
+ create_redaction_session(sessionId: string): PreparedNativeRedactionSession;
893
+ createRedactionSessionWithLifecycle({ sessionId, createdAtEpochSeconds, expiresAtEpochSeconds }: NativeCreateSessionWithLifecycleOptions): PreparedNativeRedactionSession;
894
+ create_redaction_session_with_lifecycle(options: NativeCreateSessionWithLifecycleOptions): PreparedNativeRedactionSession;
895
+ restoreRedactionSession(plaintextJson: string): PreparedNativeRedactionSession;
896
+ restore_redaction_session(plaintextJson: string): PreparedNativeRedactionSession;
897
+ restoreEncryptedRedactionSession({ archive, key, expectedSessionId, observedAtEpochSeconds }: NativeOpenSessionArchiveOptions): PreparedNativeRedactionSession;
898
+ restore_encrypted_redaction_session(options: NativeOpenSessionArchiveOptions): PreparedNativeRedactionSession;
725
899
  redactStaticEntities(fullText: string, operators?: NativeOperatorConfig): NativeStaticRedactionResult;
726
900
  redact_text(fullText: string, operators?: NativeOperatorConfig): NativeStaticRedactionResult;
727
901
  redact_text_json(fullText: string, operators?: NativeOperatorConfig): string;
902
+ redactStaticEntitiesWithCallerDetections(fullText: string, options: NativeCallerRedactionOptions): NativeStaticRedactionResult;
903
+ redact_text_with_caller_detections(fullText: string, options: NativeCallerRedactionOptions): NativeStaticRedactionResult;
904
+ redactStaticEntitiesWithCallerDetectionsDiagnosticsJson(fullText: string, options: NativeCallerRedactionOptions): string | null;
905
+ redact_static_entities_with_caller_detections_diagnostics_json(fullText: string, options: NativeCallerRedactionOptions): string | null;
728
906
  redactTextJson(fullText: string, operators?: NativeOperatorConfig): string;
729
907
  redactTextStreamJson(fullText: string, onEvent: NativeResultEventCallback, operators?: NativeOperatorConfig): string | null;
730
908
  redact_text_stream_json(fullText: string, onEvent: NativeResultEventCallback, operators?: NativeOperatorConfig): string | null;
@@ -744,9 +922,21 @@ declare class PreparedNativePipeline {
744
922
  warm_lazy_regex(): void;
745
923
  warmLazyRegexDiagnosticsJson(): string | null;
746
924
  warm_lazy_regex_diagnostics_json(): string | null;
925
+ createRedactionSession(sessionId: string): PreparedNativeRedactionSession;
926
+ create_redaction_session(sessionId: string): PreparedNativeRedactionSession;
927
+ createRedactionSessionWithLifecycle(options: NativeCreateSessionWithLifecycleOptions): PreparedNativeRedactionSession;
928
+ create_redaction_session_with_lifecycle(options: NativeCreateSessionWithLifecycleOptions): PreparedNativeRedactionSession;
929
+ restoreRedactionSession(plaintextJson: string): PreparedNativeRedactionSession;
930
+ restore_redaction_session(plaintextJson: string): PreparedNativeRedactionSession;
931
+ restoreEncryptedRedactionSession(options: NativeOpenSessionArchiveOptions): PreparedNativeRedactionSession;
932
+ restore_encrypted_redaction_session(options: NativeOpenSessionArchiveOptions): PreparedNativeRedactionSession;
747
933
  redactText(fullText: string, operators?: NativeOperatorConfig): NativeStaticRedactionResult;
748
934
  redact_text(fullText: string, operators?: NativeOperatorConfig): NativeStaticRedactionResult;
749
935
  redact_text_json(fullText: string, operators?: NativeOperatorConfig): string;
936
+ redactTextWithCallerDetections(fullText: string, options: NativeCallerRedactionOptions): NativeStaticRedactionResult;
937
+ redact_text_with_caller_detections(fullText: string, options: NativeCallerRedactionOptions): NativeStaticRedactionResult;
938
+ redactTextWithCallerDetectionsDiagnosticsJson(fullText: string, options: NativeCallerRedactionOptions): string | null;
939
+ redact_text_with_caller_detections_diagnostics_json(fullText: string, options: NativeCallerRedactionOptions): string | null;
750
940
  redactTextJson(fullText: string, operators?: NativeOperatorConfig): string;
751
941
  redactTextStreamJson(fullText: string, onEvent: NativeResultEventCallback, operators?: NativeOperatorConfig): string | null;
752
942
  redact_text_stream_json(fullText: string, onEvent: NativeResultEventCallback, operators?: NativeOperatorConfig): string | null;
@@ -760,27 +950,11 @@ declare class PreparedNativePipeline {
760
950
  declare const encodeNativeSearchConfig: (config: NativePreparedSearchConfig) => Uint8Array;
761
951
  declare const encodeNativeSearchConfigInput: (config: NativeSearchPackageInput) => Uint8Array;
762
952
  declare const getNativeBindingVersion: (binding: NativeAnonymizeBinding) => string;
763
- declare const assertNativeBindingVersion: ({
764
- binding,
765
- expectedVersion
766
- }: NativeBindingVersionOptions) => void;
767
- declare const prepareNativeSearchPackage: ({
768
- binding,
769
- config,
770
- compressed
771
- }: NativeSearchPackageOptions) => Uint8Array;
772
- declare const createNativeAnonymizerFromConfig: ({
773
- binding,
774
- config
775
- }: NativeAnonymizerFromConfigOptions) => PreparedNativeAnonymizer;
776
- declare const createNativeAnonymizerFromPackage: ({
777
- binding,
778
- packageBytes
779
- }: NativeAnonymizerFromPackageOptions) => PreparedNativeAnonymizer;
780
- declare const createNativePipelineFromPackage: ({
781
- binding,
782
- packageBytes
783
- }: NativePipelineFromPackageOptions) => PreparedNativePipeline;
953
+ declare const assertNativeBindingVersion: ({ binding, expectedVersion }: NativeBindingVersionOptions) => void;
954
+ declare const prepareNativeSearchPackage: ({ binding, config, compressed }: NativeSearchPackageOptions) => Uint8Array;
955
+ declare const createNativeAnonymizerFromConfig: ({ binding, config }: NativeAnonymizerFromConfigOptions) => PreparedNativeAnonymizer;
956
+ declare const createNativeAnonymizerFromPackage: ({ binding, packageBytes }: NativeAnonymizerFromPackageOptions) => PreparedNativeAnonymizer;
957
+ declare const createNativePipelineFromPackage: ({ binding, packageBytes }: NativePipelineFromPackageOptions) => PreparedNativePipeline;
784
958
  declare const PreparedSearch: typeof PreparedNativeAnonymizer;
785
959
  type PreparedSearch = PreparedNativeAnonymizer;
786
960
  declare const PreparedAnonymizer: typeof PreparedNativeAnonymizer;
@@ -834,24 +1008,9 @@ type NativePipelinePackageOptions = NativePipelineBuildOptions & {
834
1008
  };
835
1009
  declare const getNativePipelineCompatibility: (config: PipelineConfig) => NativePipelineCompatibility;
836
1010
  declare const assertNativePipelineSupported: (config: PipelineConfig) => void;
837
- declare const prepareNativePipelineConfig: ({
838
- binding,
839
- config,
840
- gazetteerEntries
841
- }: Omit<NativePipelineBuildOptions, "context">) => Promise<NativePreparedSearchConfig>;
842
- declare const prepareNativePipelinePackage: ({
843
- binding,
844
- config,
845
- gazetteerEntries,
846
- context,
847
- compressed
848
- }: NativePipelinePackageOptions) => Promise<Uint8Array>;
849
- declare const createNativePipelineFromConfig: ({
850
- binding,
851
- config,
852
- gazetteerEntries,
853
- context
854
- }: NativePipelineBuildOptions) => Promise<PreparedNativePipeline>;
1011
+ declare const prepareNativePipelineConfig: ({ binding, config, gazetteerEntries }: Omit<NativePipelineBuildOptions, "context">) => Promise<NativePreparedSearchConfig>;
1012
+ declare const prepareNativePipelinePackage: ({ binding, config, gazetteerEntries, context, compressed }: NativePipelinePackageOptions) => Promise<Uint8Array>;
1013
+ declare const createNativePipelineFromConfig: ({ binding, config, gazetteerEntries, context }: NativePipelineBuildOptions) => Promise<PreparedNativePipeline>;
855
1014
  //#endregion
856
1015
  //#region src/wasm.d.ts
857
1016
  /** A prepared package the caller supplies: raw bytes, an ArrayBuffer, or a URL
@@ -897,10 +1056,7 @@ declare const normalize_for_search: (text: string, options?: WasmBindingOptions)
897
1056
  type PrepareSearchPackageOptions = WasmBindingOptions & {
898
1057
  compressed?: boolean;
899
1058
  };
900
- declare const prepare_search_package: (config: NativeSearchPackageInput, {
901
- compressed,
902
- ...options
903
- }?: PrepareSearchPackageOptions) => Promise<Uint8Array>;
1059
+ declare const prepare_search_package: (config: NativeSearchPackageInput, { compressed, ...options }?: PrepareSearchPackageOptions) => Promise<Uint8Array>;
904
1060
  declare const redact_text: (config: NativeSearchPackageInput, fullText: string, operators?: NativeOperatorConfig, options?: WasmBindingOptions) => Promise<NativeStaticRedactionResult>;
905
1061
  declare const redact_text_json: (config: NativeSearchPackageInput, fullText: string, operators?: NativeOperatorConfig, options?: WasmBindingOptions) => Promise<string>;
906
1062
  declare const redact_text_stream_json: (config: NativeSearchPackageInput, fullText: string, onEvent: NativeResultEventCallback, operators?: NativeOperatorConfig, options?: WasmBindingOptions) => Promise<string | null>;
@@ -908,5 +1064,5 @@ declare const diagnostics_json: (config: NativeSearchPackageInput, fullText: str
908
1064
  declare const diagnostics_stream_json: (config: NativeSearchPackageInput, fullText: string, onBatch: NativeDiagnosticsBatchCallback, operators?: NativeOperatorConfig, options?: WasmBindingOptions) => Promise<string | null>;
909
1065
  declare const summary_diagnostics_json: (config: NativeSearchPackageInput, fullText: string, operators?: NativeOperatorConfig, options?: WasmBindingOptions) => Promise<string | null>;
910
1066
  //#endregion
911
- export { type AnonymisationOperator, DEFAULT_ENTITY_LABELS, DETECTION_SOURCES, DETECTOR_PRIORITY, type DetectionSource, type Dictionaries, type Entity, type GazetteerEntry, LoadPreparedPackageOptions, NativeAnonymizeBinding, NativeAnonymizerFromConfigOptions, NativeAnonymizerFromPackageOptions, NativeBindingVersionOptions, NativeDiagnosticsBatchCallback, NativeNormalizeOptions, NativeOperatorConfig, type NativePipelineBuildOptions, type NativePipelineCompatibility, NativePipelineEntity, NativePipelineFromPackageOptions, type NativePipelinePackageOptions, type NativePipelineUnsupportedFeature, NativePreparedSearchBinding, type NativePreparedSearchConfig, NativeRedactionResult, NativeResultEventCallback, NativeSearchPackageInput, NativeSearchPackageOptions, NativeStaticRedactionResult, OPERATOR_TYPES, type OperatorConfig, type OperatorType, type PipelineConfig, type PipelineContext, PrepareSearchPackageOptions, PreparedAnonymizer, PreparedNativeAnonymizer, PreparedNativePipeline, PreparedPackageSource, PreparedSearch, type RedactionResult, type ReviewDecision, type ReviewedEntity, SharedNativeDiagnosticsJsonOptions, SharedNativeDiagnosticsStreamJsonOptions, SharedNativePreparedPackageOptions, SharedNativeRedactTextJsonOptions, SharedNativeRedactTextOptions, SharedNativeRedactTextStreamJsonOptions, SharedNativeSearchPackageOptions, WasmBindingOptions, assertNativeBindingVersion, assertNativePipelineSupported, createNativeAnonymizerFromConfig, createNativeAnonymizerFromPackage, createNativePipelineFromConfig, createNativePipelineFromPackage, createPipelineContext, deanonymise, defaultPackageUrl, diagnostics_json, diagnostics_stream_json, encodeNativeSearchConfig, encodeNativeSearchConfigInput, exportRedactionKey, getBinding, getDefaultPipeline, getNativeBindingVersion, getNativePipelineCompatibility, loadDefaultPipeline, loadPipeline, load_prepared_package, native_package_version, normalize_for_search, prepareNativePipelineConfig, prepareNativePipelinePackage, prepareNativeSearchPackage, prepare_search_package, redactDefaultText, redactDefaultTextJson, redact_text, redact_text_json, redact_text_stream_json, summary_diagnostics_json };
1067
+ export { type AnonymisationOperator, CALLER_DETECTION_CONTRACT_VERSION, CAPABILITY_MANIFEST, CAPABILITY_MANIFEST_SCHEMA_VERSION, CAPABILITY_RUNTIMES, type CapabilityManifest, type CapabilityRuntime, DEFAULT_ENTITY_LABELS, DETECTION_SOURCES, DETECTOR_PRIORITY, type DefaultEntityLabel, type DetectionSource, type Dictionaries, ENTITY_CAPABILITIES, ENTITY_LABELS, ENTITY_SELECTIONS, type Entity, type EntityCapability, type EntityLabel, type EntitySelection, type GazetteerEntry, LoadPreparedPackageOptions, NativeAnonymizeBinding, NativeAnonymizerFromConfigOptions, NativeAnonymizerFromPackageOptions, NativeBindingVersionOptions, NativeCallerDetection, NativeCallerRedactionOptions, NativeCreateSessionWithLifecycleOptions, NativeDiagnosticsBatchCallback, NativeNormalizeOptions, NativeOpenSessionArchiveOptions, NativeOperatorConfig, type NativePipelineBuildOptions, type NativePipelineCompatibility, NativePipelineEntity, NativePipelineFromPackageOptions, type NativePipelinePackageOptions, type NativePipelineUnsupportedFeature, NativePreparedRedactionSessionBinding, NativePreparedSearchBinding, type NativePreparedSearchConfig, NativePreparedSessionRedactionPlanBinding, NativeRedactionResult, NativeResultEventCallback, NativeSearchPackageInput, NativeSearchPackageOptions, NativeSessionBlockRedactionPlan, NativeSessionCallerRedactionInput, NativeSessionCallerRedactionPlanOptions, NativeSessionDeletionSummary, NativeSessionLifecycle, NativeSessionMetadata, NativeSessionRedactionAtOptions, NativeSessionStatus, NativeStaticRedactionResult, NativeTextReplacement, OPERATOR_TYPES, type OperatorConfig, type OperatorType, type PipelineConfig, type PipelineContext, PrepareSearchPackageOptions, PreparedAnonymizer, PreparedNativeAnonymizer, PreparedNativePipeline, PreparedNativeRedactionSession, PreparedNativeSessionRedactionPlan, PreparedPackageSource, PreparedSearch, type RedactionResult, type ReviewDecision, type ReviewedEntity, SharedNativeDiagnosticsJsonOptions, SharedNativeDiagnosticsStreamJsonOptions, SharedNativePreparedPackageOptions, SharedNativeRedactTextJsonOptions, SharedNativeRedactTextOptions, SharedNativeRedactTextStreamJsonOptions, SharedNativeSearchPackageOptions, WasmBindingOptions, assertNativeBindingVersion, assertNativePipelineSupported, createNativeAnonymizerFromConfig, createNativeAnonymizerFromPackage, createNativePipelineFromConfig, createNativePipelineFromPackage, createPipelineContext, deanonymise, defaultPackageUrl, diagnostics_json, diagnostics_stream_json, encodeNativeSearchConfig, encodeNativeSearchConfigInput, exportRedactionKey, getBinding, getDefaultPipeline, getNativeBindingVersion, getNativePipelineCompatibility, loadDefaultPipeline, loadPipeline, load_prepared_package, native_package_version, normalize_for_search, prepareNativePipelineConfig, prepareNativePipelinePackage, prepareNativeSearchPackage, prepare_search_package, redactDefaultText, redactDefaultTextJson, redact_text, redact_text_json, redact_text_stream_json, summary_diagnostics_json };
912
1068
  //# sourceMappingURL=wasm.d.mts.map