@felloh-org/lambda-wrapper 1.1.54 → 1.1.57
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/entity/agent-data/booking/index.js +1 -2
- package/dist/entity/user/user-activity/index.js +25 -3
- package/dist/event/user/password/reset/index.js +24 -0
- package/dist/migration/user/1659017792935-audit.js +1 -1
- package/dist/migration/user/1659081328054-uuid_id_string.js +19 -0
- package/package.json +1 -1
|
@@ -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)({
|
|
@@ -35,7 +35,8 @@ let UserActivity = (_dec = (0, _typeorm.Entity)({
|
|
|
35
35
|
length: 40
|
|
36
36
|
}), _dec8 = (0, _typeorm.Column)({
|
|
37
37
|
type: "varchar",
|
|
38
|
-
length: 100
|
|
38
|
+
length: 100,
|
|
39
|
+
nullable: true
|
|
39
40
|
}), _dec9 = (0, _typeorm.CreateDateColumn)({
|
|
40
41
|
type: 'timestamp with time zone'
|
|
41
42
|
}), _dec(_class = (_class2 = class UserActivity {
|
|
@@ -53,11 +54,32 @@ let UserActivity = (_dec = (0, _typeorm.Entity)({
|
|
|
53
54
|
_initializerDefineProperty(this, "created_at", _descriptor6, this);
|
|
54
55
|
}
|
|
55
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
|
+
|
|
56
76
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
57
77
|
configurable: true,
|
|
58
78
|
enumerable: true,
|
|
59
79
|
writable: true,
|
|
60
|
-
initializer:
|
|
80
|
+
initializer: function () {
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
61
83
|
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "user", [_dec3, _dec4], {
|
|
62
84
|
configurable: true,
|
|
63
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;
|
|
@@ -4,7 +4,7 @@ module.exports = class audit1659017792935 {
|
|
|
4
4
|
name = 'audit1659017792935'
|
|
5
5
|
|
|
6
6
|
async up(queryRunner) {
|
|
7
|
-
await queryRunner.query(`ALTER TABLE "user"."user_activity" ADD "entity_id" character varying(100)
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "user"."user_activity" ADD "entity_id" character varying(100)`);
|
|
8
8
|
await queryRunner.query(`ALTER TABLE "user"."user_activity" ADD "organisation_id" character varying(150)`);
|
|
9
9
|
await queryRunner.query(`ALTER TABLE "user"."user_activity" DROP CONSTRAINT "FK_11108754ec780c670440e32baad"`);
|
|
10
10
|
await queryRunner.query(`ALTER TABLE "user"."user_activity" DROP COLUMN "created_at"`);
|
|
@@ -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
|
+
}
|