@deepbounty/sdk 1.2.4 → 1.2.6
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 +10 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Alert, ModuleSetting, TaskContent, TaskResult, Tool, ModuleCallback, CallbackHandler, CreateCallbackOptions, Target } from "./types";
|
|
2
2
|
import { IEventBus } from "./events";
|
|
3
3
|
export interface Logger {
|
|
4
|
-
info: (
|
|
5
|
-
warn: (
|
|
6
|
-
error: (
|
|
4
|
+
info: (message: string) => void;
|
|
5
|
+
warn: (message: string) => void;
|
|
6
|
+
error: (message: string, error?: any) => void;
|
|
7
7
|
}
|
|
8
8
|
export interface ConfigAPI {
|
|
9
9
|
/** Get a configuration value by key
|
|
@@ -209,6 +209,13 @@ export interface TargetAPI {
|
|
|
209
209
|
* @returns The target ID or null if not found
|
|
210
210
|
*/
|
|
211
211
|
getTargetIdByHostname(hostname: string): Promise<number | null>;
|
|
212
|
+
/**
|
|
213
|
+
* Get all targets with their information
|
|
214
|
+
* Only targets enabled for the given task template are returned.
|
|
215
|
+
* @param taskTemplateId The task template ID
|
|
216
|
+
* @returns Array of targets enabled for the task template
|
|
217
|
+
*/
|
|
218
|
+
getTargetsForTask(taskTemplateId: number): Promise<Target[]>;
|
|
212
219
|
}
|
|
213
220
|
export interface ServerAPI {
|
|
214
221
|
version: string;
|