@aurispec/core-backend 1.0.51 → 1.0.52
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/database/migrations/1775755738044-modified_push_notifications_table.d.ts +7 -0
- package/dist/database/migrations/1775755738044-modified_push_notifications_table.d.ts.map +1 -0
- package/dist/database/migrations/1775755738044-modified_push_notifications_table.js +21 -0
- package/dist/database/migrations/1775756044735-modified_push_notifications_table.d.ts +7 -0
- package/dist/database/migrations/1775756044735-modified_push_notifications_table.d.ts.map +1 -0
- package/dist/database/migrations/1775756044735-modified_push_notifications_table.js +15 -0
- package/dist/models/NotificationModel.d.ts +2 -1
- package/dist/models/NotificationModel.d.ts.map +1 -1
- package/dist/models/NotificationModel.js +8 -3
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
export declare class ModifiedPushNotificationsTable1775755738044 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1775755738044-modified_push_notifications_table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1775755738044-modified_push_notifications_table.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1775755738044-modified_push_notifications_table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,2CAA4C,YAAW,kBAAkB;IAClF,IAAI,SAAgD;IAEvC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAQ7D"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModifiedPushNotificationsTable1775755738044 = void 0;
|
|
4
|
+
class ModifiedPushNotificationsTable1775755738044 {
|
|
5
|
+
name = 'ModifiedPushNotificationsTable1775755738044';
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "notifications" DROP COLUMN "type"`);
|
|
8
|
+
await queryRunner.query(`DROP TYPE "public"."notifications_type_enum"`);
|
|
9
|
+
await queryRunner.query(`CREATE TYPE "public"."notifications_key_enum" AS ENUM('NEW_CONNECTION_REQUEST', 'NEW_CHAT_MESSAGE', 'CANCELLED_CONNECTION_REQUEST', 'ACCEPTED_CONNECTION_REQUESTION')`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "notifications" ADD "key" "public"."notifications_key_enum" NOT NULL DEFAULT 'NEW_CONNECTION_REQUEST'`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "notifications" ADD "title" character varying NOT NULL DEFAULT ''`);
|
|
12
|
+
}
|
|
13
|
+
async down(queryRunner) {
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "notifications" DROP COLUMN "title"`);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE "notifications" DROP COLUMN "key"`);
|
|
16
|
+
await queryRunner.query(`DROP TYPE "public"."notifications_key_enum"`);
|
|
17
|
+
await queryRunner.query(`CREATE TYPE "public"."notifications_type_enum" AS ENUM('ACCEPTED_CONNECTION_REQUESTION', 'CANCELLED_CONNECTION_REQUEST', 'NEW_CHAT_MESSAGE', 'NEW_CONNECTION_REQUEST')`);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE "notifications" ADD "type" "public"."notifications_type_enum" NOT NULL`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.ModifiedPushNotificationsTable1775755738044 = ModifiedPushNotificationsTable1775755738044;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
export declare class ModifiedPushNotificationsTable1775756044735 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1775756044735-modified_push_notifications_table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1775756044735-modified_push_notifications_table.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1775756044735-modified_push_notifications_table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,2CAA4C,YAAW,kBAAkB;IAClF,IAAI,SAAgD;IAEvC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAK3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAK7D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModifiedPushNotificationsTable1775756044735 = void 0;
|
|
4
|
+
class ModifiedPushNotificationsTable1775756044735 {
|
|
5
|
+
name = 'ModifiedPushNotificationsTable1775756044735';
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "notifications" ALTER COLUMN "key" DROP DEFAULT`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "notifications" ALTER COLUMN "title" DROP DEFAULT`);
|
|
9
|
+
}
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "notifications" ALTER COLUMN "title" SET DEFAULT ''`);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "notifications" ALTER COLUMN "key" SET DEFAULT 'NEW_CONNECTION_REQUEST'`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.ModifiedPushNotificationsTable1775756044735 = ModifiedPushNotificationsTable1775756044735;
|
|
@@ -5,8 +5,9 @@ import { SYS_MODELS } from "../common/enums";
|
|
|
5
5
|
export declare class NotificationModel extends BaseModel {
|
|
6
6
|
user_id: number;
|
|
7
7
|
user: UserModel;
|
|
8
|
-
|
|
8
|
+
key: NotificationType;
|
|
9
9
|
notifiable_id: number;
|
|
10
|
+
title: string;
|
|
10
11
|
notifiable_type: SYS_MODELS;
|
|
11
12
|
message: string;
|
|
12
13
|
read: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationModel.d.ts","sourceRoot":"","sources":["../../src/models/NotificationModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,qBACa,iBAAkB,SAAQ,SAAS;IAE5C,OAAO,EAAG,MAAM,CAAC;IAIjB,IAAI,EAAG,SAAS,CAAC;IAMjB,
|
|
1
|
+
{"version":3,"file":"NotificationModel.d.ts","sourceRoot":"","sources":["../../src/models/NotificationModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,qBACa,iBAAkB,SAAQ,SAAS;IAE5C,OAAO,EAAG,MAAM,CAAC;IAIjB,IAAI,EAAG,SAAS,CAAC;IAMjB,GAAG,EAAG,gBAAgB,CAAC;IAGvB,aAAa,EAAG,MAAM,CAAC;IAGvB,KAAK,EAAG,MAAM,CAAC;IAOf,eAAe,EAAG,UAAU,CAAC;IAG7B,OAAO,EAAG,MAAM,CAAC;IAGjB,IAAI,EAAG,OAAO,CAAC;CAClB"}
|
|
@@ -18,8 +18,9 @@ const enums_1 = require("../common/enums");
|
|
|
18
18
|
let NotificationModel = class NotificationModel extends BaseModel_1.BaseModel {
|
|
19
19
|
user_id;
|
|
20
20
|
user;
|
|
21
|
-
|
|
21
|
+
key;
|
|
22
22
|
notifiable_id;
|
|
23
|
+
title;
|
|
23
24
|
notifiable_type;
|
|
24
25
|
message;
|
|
25
26
|
read;
|
|
@@ -37,14 +38,18 @@ __decorate([
|
|
|
37
38
|
__decorate([
|
|
38
39
|
(0, typeorm_1.Column)({
|
|
39
40
|
type: "enum",
|
|
40
|
-
enum: NotificationEnum_1.NotificationType
|
|
41
|
+
enum: NotificationEnum_1.NotificationType
|
|
41
42
|
}),
|
|
42
43
|
__metadata("design:type", String)
|
|
43
|
-
], NotificationModel.prototype, "
|
|
44
|
+
], NotificationModel.prototype, "key", void 0);
|
|
44
45
|
__decorate([
|
|
45
46
|
(0, typeorm_1.Column)(),
|
|
46
47
|
__metadata("design:type", Number)
|
|
47
48
|
], NotificationModel.prototype, "notifiable_id", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)(),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], NotificationModel.prototype, "title", void 0);
|
|
48
53
|
__decorate([
|
|
49
54
|
(0, typeorm_1.Column)({
|
|
50
55
|
type: "enum",
|