@deepbounty/sdk 1.1.7 → 1.1.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 +4 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -90,11 +90,12 @@ export interface ServerAPI {
|
|
|
90
90
|
* @param description Task description
|
|
91
91
|
* @param taskContent The task content including commands and tools
|
|
92
92
|
* @param interval Interval in seconds between task executions
|
|
93
|
-
* @param schedulingType How to schedule tasks: "TARGET_BASED" (one per target), "GLOBAL" (single instance), or "CUSTOM" (
|
|
94
|
-
* @param onComplete Optional callback executed when
|
|
93
|
+
* @param schedulingType How to schedule tasks: "TARGET_BASED" (one per target), "GLOBAL" (single instance), or "CUSTOM" (callback-based)
|
|
94
|
+
* @param onComplete Optional callback executed when a task instance completes
|
|
95
|
+
* @param onSchedule Optional callback for CUSTOM mode, invoked at interval to create instances
|
|
95
96
|
* @returns The ID of the registered task template
|
|
96
97
|
*/
|
|
97
|
-
registerTaskTemplate(uniqueKey: string, name: string, description: string, taskContent: TaskContent, interval: number, schedulingType?: "TARGET_BASED" | "GLOBAL" | "CUSTOM", onComplete?: (result: TaskResult) => void): Promise<number>;
|
|
98
|
+
registerTaskTemplate(uniqueKey: string, name: string, description: string, taskContent: TaskContent, interval: number, schedulingType?: "TARGET_BASED" | "GLOBAL" | "CUSTOM", onComplete?: (result: TaskResult) => void, onSchedule?: (templateId: number) => void | Promise<void>): Promise<number>;
|
|
98
99
|
/**
|
|
99
100
|
* Unregister a task template
|
|
100
101
|
* @param templateId The ID of the task template to unregister
|