56 lines
1.2 KiB
TypeScript
56 lines
1.2 KiB
TypeScript
export type EntityType = 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 }>;
|
|
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;
|
|
};
|