powr-sdk-api 4.3.8 → 4.3.9

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.js CHANGED
@@ -20,7 +20,8 @@ const {
20
20
  initializeFunctions,
21
21
  initializeTools,
22
22
  executeTasks,
23
- executeTool
23
+ executeTool,
24
+ createTask
24
25
  } = require("./managers");
25
26
  const {
26
27
  verifyToken
@@ -36,5 +37,6 @@ module.exports = {
36
37
  initializeTools,
37
38
  verifyToken,
38
39
  executeTasks,
39
- executeTool
40
+ executeTool,
41
+ createTask
40
42
  };
@@ -23,14 +23,15 @@ const executeTasks = async (options = {}) => {
23
23
  // Execute scheduled tasks
24
24
  await scheduledTasksManager.executeScheduledTasks(options);
25
25
  };
26
+ const createTask = async taskData => {
27
+ // Create a new task/workflow
28
+ return await scheduledTasksManager.createTask(taskData);
29
+ };
26
30
  module.exports = {
27
31
  // Initialization/Execution methods
28
32
  initializeFunctions,
29
33
  initializeTools,
30
34
  executeTasks,
31
35
  executeTool,
32
- // Export manager instances
33
- functionsManager,
34
- toolsManager,
35
- scheduledTasksManager
36
+ createTask
36
37
  };
@@ -2,9 +2,7 @@
2
2
 
3
3
  const express = require("express");
4
4
  const router = express.Router();
5
- const {
6
- functionsManager
7
- } = require("../managers");
5
+ const functionsManager = require("../managers/functions");
8
6
  const {
9
7
  getDb
10
8
  } = require("../services/mongo");
@@ -2,9 +2,7 @@
2
2
 
3
3
  const express = require("express");
4
4
  const router = express.Router();
5
- const {
6
- toolsManager
7
- } = require("../managers");
5
+ const toolsManager = require("../managers/tools");
8
6
  const {
9
7
  getDb
10
8
  } = require("../services/mongo");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "powr-sdk-api",
3
- "version": "4.3.8",
3
+ "version": "4.3.9",
4
4
  "description": "Shared API core library for PowrStack projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",