mirror of
https://github.com/zadam/trilium.git
synced 2025-11-29 12:04:23 +01:00
50 lines
1.1 KiB
TypeScript
50 lines
1.1 KiB
TypeScript
export type ActionHandlers = {
|
|
addLabel: {
|
|
labelName: string;
|
|
labelValue?: string;
|
|
},
|
|
addRelation: {
|
|
relationName: string;
|
|
targetNoteId: string;
|
|
},
|
|
deleteNote: {},
|
|
deleteRevisions: {},
|
|
deleteLabel: {
|
|
labelName: string;
|
|
},
|
|
deleteRelation: {
|
|
relationName: string;
|
|
},
|
|
renameNote: {
|
|
newTitle: string;
|
|
},
|
|
renameLabel: {
|
|
oldLabelName: string;
|
|
newLabelName: string;
|
|
},
|
|
renameRelation: {
|
|
oldRelationName: string;
|
|
newRelationName: string;
|
|
},
|
|
updateLabelValue: {
|
|
labelName: string;
|
|
labelValue: string;
|
|
},
|
|
updateRelationTarget: {
|
|
relationName: string;
|
|
targetNoteId: string;
|
|
},
|
|
moveNote: {
|
|
targetParentNoteId: string;
|
|
},
|
|
executeScript: {
|
|
script: string;
|
|
}
|
|
};
|
|
|
|
export type BulkActionData<T extends keyof ActionHandlers> = ActionHandlers[T] & { name: T };
|
|
|
|
export type BulkAction = {
|
|
[K in keyof ActionHandlers]: { name: K; } & ActionHandlers[K];
|
|
}[keyof ActionHandlers];
|