Show exact matches in red and add categorized custom terms to hit review. Move session administration into the translation tables command.
58 lines
1.3 KiB
TypeScript
58 lines
1.3 KiB
TypeScript
export type EntityType = string;
|
|
export type CustomTerm = { type: EntityType; value: string };
|
|
|
|
export type MappingEntry = {
|
|
original: string;
|
|
type: EntityType;
|
|
merged_into?: string | null;
|
|
};
|
|
|
|
export type PlaceholderMapping = Record<string, MappingEntry>;
|
|
|
|
export type PseudonymizeResponse = {
|
|
pseudonymized_text: string;
|
|
selected_entity_types: EntityType[];
|
|
mapping: PlaceholderMapping;
|
|
spans: Array<{
|
|
start: number;
|
|
end: number;
|
|
type: EntityType;
|
|
score: number;
|
|
placeholder: string;
|
|
original: string;
|
|
}>;
|
|
entity_count: number;
|
|
};
|
|
|
|
export type DepseudonymizeResponse = {
|
|
original_text: string;
|
|
replacements_made: number;
|
|
};
|
|
|
|
export type VelumSession = {
|
|
id: string;
|
|
name: string;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
mapping: PlaceholderMapping;
|
|
entityTypes?: EntityType[];
|
|
excludedTerms?: Array<{ type: string; original: string }>;
|
|
customTerms?: CustomTerm[];
|
|
mappingCreatedAt?: Record<string, string>;
|
|
};
|
|
|
|
export type QuickOutput = "copy" | "paste";
|
|
|
|
export type ExtensionPreferences = {
|
|
velumBaseUrl: string;
|
|
authentikTokenUrl: string;
|
|
clientId: string;
|
|
serviceAccountUsername: string;
|
|
serviceAccountPassword: string;
|
|
scope?: string;
|
|
quickOutput: QuickOutput;
|
|
userFullName?: string;
|
|
maxSessions: string;
|
|
closeAfterAction: boolean;
|
|
};
|