@steedos/process 2.1.60 → 2.1.64

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.
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.processExpress = void 0;
4
- const core_1 = require("@steedos/core");
4
+ const auth_1 = require("@steedos/auth");
5
5
  const submit_1 = require("./submit");
6
6
  const approve_1 = require("./approve");
7
7
  const reject_1 = require("./reject");
@@ -10,13 +10,13 @@ const recall_1 = require("./recall");
10
10
  const permission_1 = require("./permission");
11
11
  const express = require('express');
12
12
  exports.processExpress = express.Router();
13
- exports.processExpress.post('/api/v4/process/submit/:objectName/:record', core_1.requireAuthentication, submit_1.submit);
14
- exports.processExpress.post('/api/v4/process/approve/:objectName/:record', core_1.requireAuthentication, approve_1.approve);
15
- exports.processExpress.post('/api/v4/process/reject/:objectName/:record', core_1.requireAuthentication, reject_1.reject);
16
- exports.processExpress.post('/api/v4/process/reassign/:objectName/:record', core_1.requireAuthentication, reassign_1.reassign);
13
+ exports.processExpress.post('/api/v4/process/submit/:objectName/:record', auth_1.requireAuthentication, submit_1.submit);
14
+ exports.processExpress.post('/api/v4/process/approve/:objectName/:record', auth_1.requireAuthentication, approve_1.approve);
15
+ exports.processExpress.post('/api/v4/process/reject/:objectName/:record', auth_1.requireAuthentication, reject_1.reject);
16
+ exports.processExpress.post('/api/v4/process/reassign/:objectName/:record', auth_1.requireAuthentication, reassign_1.reassign);
17
17
  // processExpress.post('/api/v4/process/recall/:objectName/:record', requireAuthentication, recall);
18
- exports.processExpress.post('/api/v4/process/recall/:objectName/:record', core_1.requireAuthentication, recall_1.recall);
19
- exports.processExpress.get('/api/v4/process/permission/recall/:objectName/:record', core_1.requireAuthentication, permission_1.allowRecallByProcessInstance);
20
- exports.processExpress.get('/api/v4/process/permission/approver/:objectName/:record', core_1.requireAuthentication, permission_1.allowApproverByInstanceHistoryId);
21
- exports.processExpress.get('/api/v4/process/permission/submit/:objectName/:record', core_1.requireAuthentication, permission_1.allowObjectSubmit);
18
+ exports.processExpress.post('/api/v4/process/recall/:objectName/:record', auth_1.requireAuthentication, recall_1.recall);
19
+ exports.processExpress.get('/api/v4/process/permission/recall/:objectName/:record', auth_1.requireAuthentication, permission_1.allowRecallByProcessInstance);
20
+ exports.processExpress.get('/api/v4/process/permission/approver/:objectName/:record', auth_1.requireAuthentication, permission_1.allowApproverByInstanceHistoryId);
21
+ exports.processExpress.get('/api/v4/process/permission/submit/:objectName/:record', auth_1.requireAuthentication, permission_1.allowObjectSubmit);
22
22
  //# sourceMappingURL=express-middleware.js.map
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sendNotifications = void 0;
4
4
  const objectql = require('@steedos/objectql');
5
- const core_1 = require("@steedos/core");
5
+ const objectql_1 = require("@steedos/objectql");
6
6
  const Fiber = require('fibers');
7
7
  exports.sendNotifications = async (from, to, { instanceHistory = null, instance = null, status }) => {
8
8
  if (!to) {
@@ -16,7 +16,7 @@ exports.sendNotifications = async (from, to, { instanceHistory = null, instance
16
16
  const targetObject = objectql.getObject(targetObjectName);
17
17
  var relatedDoc = await targetObject.findOne(instance.target_object.ids[0]);
18
18
  let relatedDocName = relatedDoc.name; //TODO
19
- const lng = core_1.Util.getUserLocale(fromUser);
19
+ const lng = objectql_1.getUserLocale(fromUser);
20
20
  var notificationTitle = TAPi18n.__(`process_notification_${status}_title`, { submitter: fromUser.name, recordName: relatedDocName }, lng);
21
21
  var notificationBody = targetObject.label;
22
22
  let linkToObjectName, linkToId;
@@ -1 +1 @@
1
- {"version":3,"file":"notifications.js","sourceRoot":"","sources":["../src/notifications.ts"],"names":[],"mappings":";;;AAAA,MAAM,QAAQ,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC9C,wCAAqC;AACrC,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAInB,QAAA,iBAAiB,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D,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;AACb,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/process",
3
- "version": "2.1.60",
3
+ "version": "2.1.64",
4
4
  "main": "lib/index.js",
5
5
  "repository": "https://github.com/steedos/steedos-platform.git",
6
6
  "scripts": {
@@ -17,8 +17,8 @@
17
17
  "typescript": "3.5.3"
18
18
  },
19
19
  "dependencies": {
20
- "@steedos/core": "2.1.60",
21
- "@steedos/objectql": "2.1.60"
20
+ "@steedos/auth": "2.1.64",
21
+ "@steedos/objectql": "2.1.64"
22
22
  },
23
- "gitHead": "3b8634d6eca4edc89e991b9dfa130b16493aa30d"
23
+ "gitHead": "c5b63dd483aa29bd9c179e8d59a73c675b3a0ba1"
24
24
  }
@@ -1,4 +1,4 @@
1
- import { requireAuthentication } from '@steedos/core';
1
+ import { requireAuthentication } from '@steedos/auth';
2
2
 
3
3
  import { submit } from './submit';
4
4
  import { approve } from './approve';
@@ -1,5 +1,5 @@
1
1
  const objectql = require('@steedos/objectql');
2
- import { Util } from '@steedos/core';
2
+ import { getUserLocale } from '@steedos/objectql';
3
3
  const Fiber = require('fibers');
4
4
  declare var Creator;
5
5
  declare var TAPi18n;
@@ -16,7 +16,7 @@ export const sendNotifications = async (from: string, to: string, {instanceHisto
16
16
  const targetObject = objectql.getObject(targetObjectName);
17
17
  var relatedDoc = await targetObject.findOne(instance.target_object.ids[0]);
18
18
  let relatedDocName = relatedDoc.name; //TODO
19
- const lng = Util.getUserLocale(fromUser);
19
+ const lng = getUserLocale(fromUser);
20
20
  var notificationTitle = TAPi18n.__(`process_notification_${status}_title`, {submitter: fromUser.name, recordName: relatedDocName}, lng);
21
21
  var notificationBody = targetObject.label;
22
22
  let linkToObjectName, linkToId;