58 lines
1006 B
TypeScript
58 lines
1006 B
TypeScript
export type KeePassEntry = {
|
|
title: string;
|
|
username: string;
|
|
password: string;
|
|
url: string;
|
|
notes: string;
|
|
groupPath?: string;
|
|
otp?: string;
|
|
};
|
|
|
|
export type KeePassGroup = {
|
|
name: string;
|
|
path: string;
|
|
};
|
|
|
|
export type KeePassOpenOptions = {
|
|
password: string;
|
|
keyFile?: string;
|
|
};
|
|
|
|
export type KeePassFindQuery = {
|
|
title?: string;
|
|
username?: string;
|
|
url?: string;
|
|
groupPath?: string;
|
|
};
|
|
|
|
export type KeePassEntryInput = {
|
|
title: string;
|
|
username?: string;
|
|
password?: string;
|
|
url?: string;
|
|
notes?: string;
|
|
groupPath?: string;
|
|
};
|
|
|
|
export type KeePassGroupInput = {
|
|
name: string;
|
|
path?: string;
|
|
};
|
|
|
|
export type KeePassCommand =
|
|
| { command: "list-entries" }
|
|
| { command: "find-entries"; query: KeePassFindQuery }
|
|
| { command: "list-groups" }
|
|
| { command: "create-entry"; entry: KeePassEntryInput }
|
|
| { command: "create-group"; group: KeePassGroupInput }
|
|
| { command: "save" };
|
|
|
|
export type KeePassResponse<T> =
|
|
| {
|
|
ok: true;
|
|
data: T;
|
|
}
|
|
| {
|
|
ok: false;
|
|
error: string;
|
|
}; |