@deepbounty/sdk 1.2.2 → 1.2.4

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +18 -1
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Alert, ModuleSetting, TaskContent, TaskResult, Tool, ModuleCallback, CallbackHandler, CreateCallbackOptions } from "./types";
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
4
  info: (...args: any[]) => void;
@@ -194,6 +194,22 @@ export interface CallbackAPI {
194
194
  */
195
195
  deleteAll(): Promise<number>;
196
196
  }
197
+ /**
198
+ * TargetAPI provides access to target information for modules.
199
+ */
200
+ export interface TargetAPI {
201
+ /**
202
+ * Get all targets with their information
203
+ * @returns Array of all targets with complete information
204
+ */
205
+ getTargets(): Promise<Target[]>;
206
+ /**
207
+ * Get target ID by hostname
208
+ * @param hostname The hostname to look up
209
+ * @returns The target ID or null if not found
210
+ */
211
+ getTargetIdByHostname(hostname: string): Promise<number | null>;
212
+ }
197
213
  export interface ServerAPI {
198
214
  version: string;
199
215
  logger: Logger;
@@ -202,6 +218,7 @@ export interface ServerAPI {
202
218
  files: FilesAPI;
203
219
  events: IEventBus;
204
220
  callbacks: CallbackAPI;
221
+ targets: TargetAPI;
205
222
  /** Check if a hostname is in scope based on targets_subdomains */
206
223
  isHostnameInScope(hostname: string): Promise<boolean>;
207
224
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepbounty/sdk",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "DeepBounty SDK for module development",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",