@felloh-org/lambda-wrapper 1.1.55 → 1.1.58
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.
|
@@ -24,7 +24,7 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
|
|
|
24
24
|
let UserActivity = (_dec = (0, _typeorm.Entity)({
|
|
25
25
|
name: 'user_activity',
|
|
26
26
|
schema: 'user'
|
|
27
|
-
}), _dec2 = (0, _typeorm.
|
|
27
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.ManyToOne)(() => _user.default), _dec4 = (0, _typeorm.JoinColumn)({
|
|
28
28
|
name: 'user_id',
|
|
29
29
|
referencedColumnName: 'id'
|
|
30
30
|
}), _dec5 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec6 = (0, _typeorm.JoinColumn)({
|
|
@@ -54,11 +54,32 @@ let UserActivity = (_dec = (0, _typeorm.Entity)({
|
|
|
54
54
|
_initializerDefineProperty(this, "created_at", _descriptor6, this);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
getPublicData() {
|
|
58
|
+
const response = {
|
|
59
|
+
id: this.id,
|
|
60
|
+
type: this.type,
|
|
61
|
+
entity_id: this.entity_id,
|
|
62
|
+
created_at: this.created_at
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
if (this.user !== null && typeof this.user.id !== 'undefined') {
|
|
66
|
+
response.user = this.user.getPublicCompactData();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (this.organisation !== null && typeof this.organisation.id !== 'undefined') {
|
|
70
|
+
response.organisation = this.organisation.getPublicCompactData();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return response;
|
|
74
|
+
}
|
|
75
|
+
|
|
57
76
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
58
77
|
configurable: true,
|
|
59
78
|
enumerable: true,
|
|
60
79
|
writable: true,
|
|
61
|
-
initializer:
|
|
80
|
+
initializer: function () {
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
62
83
|
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "user", [_dec3, _dec4], {
|
|
63
84
|
configurable: true,
|
|
64
85
|
enumerable: true,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _baseEvent = _interopRequireDefault(require("../../../base-event"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
const EVENT_TYPE = 'user:password:reset';
|
|
13
|
+
|
|
14
|
+
class UserPasswordReset extends _baseEvent.default {
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
this.setDetailType(EVENT_TYPE);
|
|
18
|
+
this.setDetailParam('user', {});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
var _default = UserPasswordReset;
|
|
24
|
+
exports.default = _default;
|
package/dist/index.js
CHANGED
|
@@ -393,6 +393,12 @@ Object.defineProperty(exports, "UserPasswordChangedEvent", {
|
|
|
393
393
|
return _changed.default;
|
|
394
394
|
}
|
|
395
395
|
});
|
|
396
|
+
Object.defineProperty(exports, "UserPasswordResetEvent", {
|
|
397
|
+
enumerable: true,
|
|
398
|
+
get: function () {
|
|
399
|
+
return _reset.default;
|
|
400
|
+
}
|
|
401
|
+
});
|
|
396
402
|
Object.defineProperty(exports, "UserRegistrationEvent", {
|
|
397
403
|
enumerable: true,
|
|
398
404
|
get: function () {
|
|
@@ -532,6 +538,8 @@ var _registration = _interopRequireDefault(require("./event/user/registration"))
|
|
|
532
538
|
|
|
533
539
|
var _changed = _interopRequireDefault(require("./event/user/password/changed"));
|
|
534
540
|
|
|
541
|
+
var _reset = _interopRequireDefault(require("./event/user/password/reset"));
|
|
542
|
+
|
|
535
543
|
var _model = _interopRequireDefault(require("./model"));
|
|
536
544
|
|
|
537
545
|
var _response = _interopRequireDefault(require("./model/response"));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class uuidIdString1659081328054 {
|
|
4
|
+
name = 'uuidIdString1659081328054'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "user"."user_activity" DROP CONSTRAINT "PK_daec6d19443689bda7d7785dff5"`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "user"."user_activity" DROP COLUMN "id"`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "user"."user_activity" ADD "id" character varying NOT NULL`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "user"."user_activity" ADD CONSTRAINT "PK_daec6d19443689bda7d7785dff5" PRIMARY KEY ("id")`);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async down(queryRunner) {
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "user"."user_activity" DROP CONSTRAINT "PK_daec6d19443689bda7d7785dff5"`);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE "user"."user_activity" DROP COLUMN "id"`);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "user"."user_activity" ADD "id" uuid NOT NULL DEFAULT uuid_generate_v4()`);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE "user"."user_activity" ADD CONSTRAINT "PK_daec6d19443689bda7d7785dff5" PRIMARY KEY ("id")`);
|
|
18
|
+
}
|
|
19
|
+
}
|