@deepbounty/sdk 1.0.7 → 1.0.8
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/index.d.ts +9 -9
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ModuleSetting, TaskContent } from "./types";
|
|
1
|
+
import { ModuleSetting, TaskContent, Tool } from "./types";
|
|
2
2
|
export interface Logger {
|
|
3
3
|
info: (...args: any[]) => void;
|
|
4
4
|
warn: (...args: any[]) => void;
|
|
@@ -39,7 +39,10 @@ export interface ConfigAPI {
|
|
|
39
39
|
*/
|
|
40
40
|
getAllSettings(): Promise<ModuleSetting[]>;
|
|
41
41
|
}
|
|
42
|
-
export interface
|
|
42
|
+
export interface ServerAPI {
|
|
43
|
+
version: string;
|
|
44
|
+
logger: Logger;
|
|
45
|
+
config: ConfigAPI;
|
|
43
46
|
/**
|
|
44
47
|
* Register a scheduled task that runs at a specific interval
|
|
45
48
|
* @param taskContent The task content including commands and required tools
|
|
@@ -53,13 +56,10 @@ export interface TasksAPI {
|
|
|
53
56
|
* @returns true if the task was unregistered, false if it didn't exist
|
|
54
57
|
*/
|
|
55
58
|
unregisterScheduledTask(taskId: number): boolean;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
logger: Logger;
|
|
61
|
-
config: ConfigAPI;
|
|
62
|
-
tasks: TasksAPI;
|
|
59
|
+
/** Register a tool
|
|
60
|
+
* @param tool The tool to register
|
|
61
|
+
*/
|
|
62
|
+
registerTool(tool: Tool): void;
|
|
63
63
|
}
|
|
64
64
|
export interface PluginLifecycle {
|
|
65
65
|
run?(api: ServerAPI): Promise<void> | void;
|