@deepbounty/sdk 1.2.1 → 1.2.3

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 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,16 @@ 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
+ }
197
207
  export interface ServerAPI {
198
208
  version: string;
199
209
  logger: Logger;
@@ -202,6 +212,7 @@ export interface ServerAPI {
202
212
  files: FilesAPI;
203
213
  events: IEventBus;
204
214
  callbacks: CallbackAPI;
215
+ targets: TargetAPI;
205
216
  /** Check if a hostname is in scope based on targets_subdomains */
206
217
  isHostnameInScope(hostname: string): Promise<boolean>;
207
218
  /**
@@ -8,6 +8,8 @@
8
8
  export interface CreateCallbackOptions {
9
9
  /** Time-to-live in seconds. If not set, the callback never expires */
10
10
  expiresIn?: number;
11
+ /** Delay before the callback becomes active, in seconds (default: 0 = active immediately) */
12
+ effectiveIn?: number;
11
13
  /** Whether the callback can be triggered multiple times (default: true) */
12
14
  allowMultipleTriggers?: boolean;
13
15
  }
@@ -25,6 +27,8 @@ export interface ModuleCallback {
25
27
  metadata: Record<string, any>;
26
28
  /** When the callback was created */
27
29
  createdAt: string;
30
+ /** When the callback becomes active (callbacks before this time are ignored) */
31
+ effectiveAt: string;
28
32
  /** When the callback expires (null = never) */
29
33
  expiresAt: string | null;
30
34
  /** Whether multiple triggers are allowed */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepbounty/sdk",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "DeepBounty SDK for module development",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",