@steedos/service-ui 2.2.52-beta.5 → 2.2.52-beta.50

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/LICENSE.txt CHANGED
@@ -6,14 +6,11 @@ To determine under which license you may use a file from the Steedos source code
6
6
  please resort to the header of that file.
7
7
 
8
8
  If the file has no header, the following rules apply
9
- 1. project templates are licensed under MIT, see License.MIT.txt
10
- 2. enterprise features are licensed under Steedos Enterprise Terms, see License.enterprise.txt
11
- 3. source code that is neither (1) nor (2) is licensed under AGPL, see License.AGPL.txt
9
+ 1. enterprise features are licensed under Steedos Enterprise Terms, see License.enterprise.txt
10
+ 2. source code that is neither (1) is licensed under MIT, see https://opensource.org/licenses/MIT
12
11
 
13
12
  On request, licenses under different terms are available.
14
13
 
15
- Project templates can be found in the folders steedos-projects/
16
-
17
14
  Source code of enterprise features are files that
18
15
  * are in folders named "ee" or start with "ee_", or in subfolders of such folders.
19
16
  * contain the strings "ee_" in its filename name.
@@ -0,0 +1 @@
1
+ export {};
@@ -13,7 +13,7 @@ const core_1 = require("@steedos/core");
13
13
  const objectql_1 = require("@steedos/objectql");
14
14
  const router = express.Router();
15
15
  router.get('/service/api/apps/menus', core_1.requireAuthentication, function (req, res) {
16
- return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
16
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
17
17
  const userSession = req.user;
18
18
  try {
19
19
  const result = yield (0, objectql_1.getSteedosSchema)().broker.call('apps.getMenus', {}, { meta: { user: userSession } });
@@ -0,0 +1,2 @@
1
+ export declare function getSpaceBootStrap(req: any, res: any): Promise<any>;
2
+ export declare function getSpaceObjectBootStrap(req: any, res: any): Promise<any>;
@@ -13,7 +13,7 @@ const _ = require('underscore');
13
13
  var express = require('express');
14
14
  const bootStrapExpress = express.Router();
15
15
  function getUserProfileObjectsLayout(userId, spaceId, objectName) {
16
- return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
16
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
17
17
  let spaceUser;
18
18
  let spaceUsers = yield (0, objectql_1.getObject)("space_users").directFind({ filters: [['space', '=', spaceId], ['user', '=', userId]] });
19
19
  if (spaceUsers.length > 0) {
@@ -31,7 +31,7 @@ function getUserProfileObjectsLayout(userId, spaceId, objectName) {
31
31
  }
32
32
  ;
33
33
  function getUserObjects(userId, spaceId, objects) {
34
- return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
34
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
35
35
  const objectsLayout = yield getUserProfileObjectsLayout(userId, spaceId);
36
36
  for (const objectName in objects) {
37
37
  // objects[objectName].list_views = await getUserObjectListViews(userId, spaceId, objectName)
@@ -51,7 +51,7 @@ function getUserObjects(userId, spaceId, objects) {
51
51
  });
52
52
  }
53
53
  function getUserObject(userId, spaceId, object, layout) {
54
- return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
54
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
55
55
  if (!layout) {
56
56
  const layouts = yield getUserProfileObjectsLayout(userId, spaceId, object.name);
57
57
  if (layouts && layouts.length > 0) {
@@ -138,9 +138,9 @@ function getUserObject(userId, spaceId, object, layout) {
138
138
  });
139
139
  }
140
140
  function getSpaceBootStrap(req, res) {
141
- return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
141
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
142
142
  return Fiber(function () {
143
- return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
143
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
144
144
  let userSession = req.user;
145
145
  if (!userSession) {
146
146
  return res.status(500).send();
@@ -310,7 +310,7 @@ function getSpaceBootStrap(req, res) {
310
310
  }
311
311
  exports.getSpaceBootStrap = getSpaceBootStrap;
312
312
  function getObjectConfig(objectName, spaceId, userSession) {
313
- return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
313
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
314
314
  let objectConfig = {};
315
315
  try {
316
316
  let object = (0, objectql_1.getObject)(objectName);
@@ -338,7 +338,7 @@ function getObjectConfig(objectName, spaceId, userSession) {
338
338
  });
339
339
  }
340
340
  function getUserObjectsListViews(userId, spaceId) {
341
- return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
341
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
342
342
  const listViews = {};
343
343
  const objectsViews = yield (0, objectql_1.getObject)("object_listviews").find({ filters: [['space', '=', spaceId], [["owner", "=", userId], "or", ["shared", "=", true]]] });
344
344
  let objectNames = _.pluck(objectsViews, 'object_name');
@@ -374,9 +374,9 @@ function getUserObjectsListViews(userId, spaceId) {
374
374
  // return _user_object_list_views;
375
375
  // }
376
376
  function getSpaceObjectBootStrap(req, res) {
377
- return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
377
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
378
378
  return Fiber(function () {
379
- return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
379
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
380
380
  let userSession = req.user;
381
381
  let userId = userSession.userId;
382
382
  let urlParams = req.params;
@@ -0,0 +1 @@
1
+ export {};
@@ -13,13 +13,13 @@ const express = require("express");
13
13
  const router = express.Router();
14
14
  const core = require('@steedos/core');
15
15
  const callObjectServiceAction = function (actionName, userSession, data) {
16
- return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
16
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
17
17
  const broker = (0, objectql_1.getSteedosSchema)().broker;
18
18
  return broker.call(actionName, data, { meta: { user: userSession } });
19
19
  });
20
20
  };
21
21
  router.get('/service/api/:objectServiceName/fields', core.requireAuthentication, function (req, res) {
22
- return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
22
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
23
23
  const userSession = req.user;
24
24
  try {
25
25
  const { objectServiceName } = req.params;
@@ -32,7 +32,7 @@ router.get('/service/api/:objectServiceName/fields', core.requireAuthentication,
32
32
  });
33
33
  });
34
34
  router.get('/service/api/:objectServiceName/getUserObjectPermission', core.requireAuthentication, function (req, res) {
35
- return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
35
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
36
36
  const userSession = req.user;
37
37
  try {
38
38
  const { objectServiceName } = req.params;
@@ -45,7 +45,7 @@ router.get('/service/api/:objectServiceName/getUserObjectPermission', core.requi
45
45
  });
46
46
  });
47
47
  router.get('/service/api/:objectServiceName/recordPermissions/:recordId', core.requireAuthentication, function (req, res) {
48
- return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
48
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
49
49
  const userSession = req.user;
50
50
  try {
51
51
  const { objectServiceName, recordId } = req.params;
@@ -60,7 +60,7 @@ router.get('/service/api/:objectServiceName/recordPermissions/:recordId', core.r
60
60
  });
61
61
  });
62
62
  router.get('/service/api/:objectServiceName/uiSchema', core.requireAuthentication, function (req, res) {
63
- return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
63
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
64
64
  const userSession = req.user;
65
65
  try {
66
66
  const { objectServiceName } = req.params;
@@ -73,7 +73,7 @@ router.get('/service/api/:objectServiceName/uiSchema', core.requireAuthenticatio
73
73
  });
74
74
  });
75
75
  router.post('/service/api/:objectServiceName/defUiSchema', core.requireAuthentication, function (req, res) {
76
- return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
76
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
77
77
  const userSession = req.user;
78
78
  try {
79
79
  const { objectServiceName } = req.params;
@@ -86,7 +86,7 @@ router.post('/service/api/:objectServiceName/defUiSchema', core.requireAuthentic
86
86
  });
87
87
  });
88
88
  router.get('/service/api/:objectServiceName/uiSchemaTemplate', core.requireAuthentication, function (req, res) {
89
- return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
89
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
90
90
  const userSession = req.user;
91
91
  try {
92
92
  const { objectServiceName } = req.params;
@@ -99,7 +99,7 @@ router.get('/service/api/:objectServiceName/uiSchemaTemplate', core.requireAuthe
99
99
  });
100
100
  });
101
101
  router.get('/service/api/:objectServiceName/relateds', core.requireAuthentication, function (req, res) {
102
- return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
102
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
103
103
  const userSession = req.user;
104
104
  try {
105
105
  const { objectServiceName } = req.params;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/service-ui",
3
- "version": "2.2.52-beta.5",
3
+ "version": "2.2.52-beta.50",
4
4
  "keywords": [
5
5
  "steedos"
6
6
  ],
@@ -10,13 +10,13 @@
10
10
  "description": "steedos package",
11
11
  "repository": {},
12
12
  "dependencies": {
13
- "@steedos/core": "2.2.52-beta.5",
14
- "@steedos/objectql": "2.2.52-beta.5"
13
+ "@steedos/core": "2.2.52-beta.50",
14
+ "@steedos/objectql": "2.2.52-beta.50"
15
15
  },
16
16
  "license": "MIT",
17
17
  "private": false,
18
18
  "publishConfig": {
19
19
  "access": "public"
20
20
  },
21
- "gitHead": "de3312b303c5f5e9baedd3b88aa746a5bb966436"
21
+ "gitHead": "7f4c08f68a7835a05456c7f56935e630b965dc66"
22
22
  }
package/tsconfig.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "sourceMap": false,
11
11
  "declarationMap": false,
12
12
  "noImplicitAny": false,
13
- "declaration": false,
13
+ "declaration": true,
14
14
  "noFallthroughCasesInSwitch": true,
15
15
  //"noImplicitReturns": true,
16
16
  "stripInternal": true,