powr-sdk-api 3.0.0 → 3.0.1
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 +4 -2
- package/dist/routes/index.js +11 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14,7 +14,8 @@ const {
|
|
|
14
14
|
createSwaggerSpec
|
|
15
15
|
} = require("./swagger");
|
|
16
16
|
const {
|
|
17
|
-
createPowrRoutes
|
|
17
|
+
createPowrRoutes,
|
|
18
|
+
initializePlexx
|
|
18
19
|
} = require("./routes");
|
|
19
20
|
module.exports = {
|
|
20
21
|
errorCatcher,
|
|
@@ -22,5 +23,6 @@ module.exports = {
|
|
|
22
23
|
requestHandler,
|
|
23
24
|
createSwaggerSpec,
|
|
24
25
|
notFoundHandler,
|
|
25
|
-
createPowrRoutes
|
|
26
|
+
createPowrRoutes,
|
|
27
|
+
initializePlexx
|
|
26
28
|
};
|
package/dist/routes/index.js
CHANGED
|
@@ -25,11 +25,10 @@ const slidesRoutes = require('./slides');
|
|
|
25
25
|
const notificationsRoutes = require('./notifications');
|
|
26
26
|
const profilesRoutes = require('./profiles');
|
|
27
27
|
const chatRoutes = require('./chat');
|
|
28
|
-
const createPowrRoutes = async (options = {}) => {
|
|
29
|
-
const router = express.Router();
|
|
30
28
|
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
// Synchronous router creation
|
|
30
|
+
const createPowrRoutes = (options = {}) => {
|
|
31
|
+
const router = express.Router();
|
|
33
32
|
|
|
34
33
|
// Use the dedicated projectId injection middleware
|
|
35
34
|
router.use(injectProjectId(options));
|
|
@@ -50,6 +49,13 @@ const createPowrRoutes = async (options = {}) => {
|
|
|
50
49
|
router.use('/chat', verifyToken, chatRoutes);
|
|
51
50
|
return router;
|
|
52
51
|
};
|
|
52
|
+
|
|
53
|
+
// Async Plexx initialization function
|
|
54
|
+
const initializePlexx = async (options = {}) => {
|
|
55
|
+
// Initialize Plexx manager with options
|
|
56
|
+
await plexxManager.initialize(options);
|
|
57
|
+
};
|
|
53
58
|
module.exports = {
|
|
54
|
-
createPowrRoutes
|
|
59
|
+
createPowrRoutes,
|
|
60
|
+
initializePlexx
|
|
55
61
|
};
|