@aurispec/core-backend 1.0.68 → 1.0.69
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/1776809381824-updated_some_enums_for_notifications_table.d.ts +7 -0
- package/dist/database/migrations/1776809381824-updated_some_enums_for_notifications_table.d.ts.map +1 -0
- package/dist/database/migrations/1776809381824-updated_some_enums_for_notifications_table.js +35 -0
- package/dist/database/migrations/1777392080172-modified_notifications_table.d.ts +7 -0
- package/dist/database/migrations/1777392080172-modified_notifications_table.d.ts.map +1 -0
- package/dist/database/migrations/1777392080172-modified_notifications_table.js +19 -0
- package/dist/models/NotificationModel.d.ts +1 -0
- package/dist/models/NotificationModel.d.ts.map +1 -1
- package/dist/models/NotificationModel.js +6 -1
- package/package.json +1 -1
package/dist/database/migrations/1776809381824-updated_some_enums_for_notifications_table.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
export declare class UpdatedSomeEnumsForNotificationsTable1776809381824 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1776809381824-updated_some_enums_for_notifications_table.d.ts.map
|
package/dist/database/migrations/1776809381824-updated_some_enums_for_notifications_table.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1776809381824-updated_some_enums_for_notifications_table.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1776809381824-updated_some_enums_for_notifications_table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,kDAAmD,YAAW,kBAAkB;IACzF,IAAI,SAAuD;IAE9C,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAe3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAe7D"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdatedSomeEnumsForNotificationsTable1776809381824 = void 0;
|
|
4
|
+
class UpdatedSomeEnumsForNotificationsTable1776809381824 {
|
|
5
|
+
name = 'UpdatedSomeEnumsForNotificationsTable1776809381824';
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TYPE "public"."market_listing_categories_type_enum" RENAME TO "market_listing_categories_type_enum_old"`);
|
|
8
|
+
await queryRunner.query(`CREATE TYPE "public"."market_listing_categories_type_enum" AS ENUM('PostModel', 'ArticleModel', 'CommentModel', 'ArticleCommentModel', 'ConnectionModel', 'EventModel', 'BusinessModel', 'CategoryModel', 'OutlookModel', 'UserModel', 'ProductModel', 'ChatMessageModel', 'LikeModel', 'ServiceProviderModel')`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "market_listing_categories" ALTER COLUMN "type" DROP DEFAULT`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "market_listing_categories" ALTER COLUMN "type" TYPE "public"."market_listing_categories_type_enum" USING "type"::"text"::"public"."market_listing_categories_type_enum"`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "market_listing_categories" ALTER COLUMN "type" SET DEFAULT 'ProductModel'`);
|
|
12
|
+
await queryRunner.query(`DROP TYPE "public"."market_listing_categories_type_enum_old"`);
|
|
13
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_6bc030c54a48f96fd543b56a35"`);
|
|
14
|
+
await queryRunner.query(`ALTER TYPE "public"."bookmarks_bookmarkable_type_enum" RENAME TO "bookmarks_bookmarkable_type_enum_old"`);
|
|
15
|
+
await queryRunner.query(`CREATE TYPE "public"."bookmarks_bookmarkable_type_enum" AS ENUM('PostModel', 'ArticleModel', 'CommentModel', 'ArticleCommentModel', 'ConnectionModel', 'EventModel', 'BusinessModel', 'CategoryModel', 'OutlookModel', 'UserModel', 'ProductModel', 'ChatMessageModel', 'LikeModel', 'ServiceProviderModel')`);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "bookmarks" ALTER COLUMN "bookmarkable_type" TYPE "public"."bookmarks_bookmarkable_type_enum" USING "bookmarkable_type"::"text"::"public"."bookmarks_bookmarkable_type_enum"`);
|
|
17
|
+
await queryRunner.query(`DROP TYPE "public"."bookmarks_bookmarkable_type_enum_old"`);
|
|
18
|
+
await queryRunner.query(`CREATE INDEX "IDX_6bc030c54a48f96fd543b56a35" ON "bookmarks" ("bookmarkable_id", "user_id", "bookmarkable_type") `);
|
|
19
|
+
}
|
|
20
|
+
async down(queryRunner) {
|
|
21
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_6bc030c54a48f96fd543b56a35"`);
|
|
22
|
+
await queryRunner.query(`CREATE TYPE "public"."bookmarks_bookmarkable_type_enum_old" AS ENUM('PostModel', 'ArticleModel', 'CommentModel', 'ArticleCommentModel', 'ConnectionModel', 'EventModel', 'BusinessModel', 'CategoryModel', 'OutlookModel', 'ProductModel', 'ChatMessageModel', 'LikeModel', 'ServiceProviderModel')`);
|
|
23
|
+
await queryRunner.query(`ALTER TABLE "bookmarks" ALTER COLUMN "bookmarkable_type" TYPE "public"."bookmarks_bookmarkable_type_enum_old" USING "bookmarkable_type"::"text"::"public"."bookmarks_bookmarkable_type_enum_old"`);
|
|
24
|
+
await queryRunner.query(`DROP TYPE "public"."bookmarks_bookmarkable_type_enum"`);
|
|
25
|
+
await queryRunner.query(`ALTER TYPE "public"."bookmarks_bookmarkable_type_enum_old" RENAME TO "bookmarks_bookmarkable_type_enum"`);
|
|
26
|
+
await queryRunner.query(`CREATE INDEX "IDX_6bc030c54a48f96fd543b56a35" ON "bookmarks" ("user_id", "bookmarkable_id", "bookmarkable_type") `);
|
|
27
|
+
await queryRunner.query(`CREATE TYPE "public"."market_listing_categories_type_enum_old" AS ENUM('PostModel', 'ArticleModel', 'CommentModel', 'ArticleCommentModel', 'ConnectionModel', 'EventModel', 'BusinessModel', 'CategoryModel', 'OutlookModel', 'ProductModel', 'ChatMessageModel', 'LikeModel', 'ServiceProviderModel')`);
|
|
28
|
+
await queryRunner.query(`ALTER TABLE "market_listing_categories" ALTER COLUMN "type" DROP DEFAULT`);
|
|
29
|
+
await queryRunner.query(`ALTER TABLE "market_listing_categories" ALTER COLUMN "type" TYPE "public"."market_listing_categories_type_enum_old" USING "type"::"text"::"public"."market_listing_categories_type_enum_old"`);
|
|
30
|
+
await queryRunner.query(`ALTER TABLE "market_listing_categories" ALTER COLUMN "type" SET DEFAULT 'ProductModel'`);
|
|
31
|
+
await queryRunner.query(`DROP TYPE "public"."market_listing_categories_type_enum"`);
|
|
32
|
+
await queryRunner.query(`ALTER TYPE "public"."market_listing_categories_type_enum_old" RENAME TO "market_listing_categories_type_enum"`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.UpdatedSomeEnumsForNotificationsTable1776809381824 = UpdatedSomeEnumsForNotificationsTable1776809381824;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
export declare class ModifiedNotificationsTable1777392080172 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1777392080172-modified_notifications_table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1777392080172-modified_notifications_table.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1777392080172-modified_notifications_table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,uCAAwC,YAAW,kBAAkB;IAC9E,IAAI,SAA4C;IAEnC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAO3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAO7D"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModifiedNotificationsTable1777392080172 = void 0;
|
|
4
|
+
class ModifiedNotificationsTable1777392080172 {
|
|
5
|
+
name = 'ModifiedNotificationsTable1777392080172';
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "notifications" ADD "metadata" jsonb`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "notifications" DROP COLUMN "notifiable_type"`);
|
|
9
|
+
await queryRunner.query(`CREATE TYPE "public"."notifications_notifiable_type_enum" AS ENUM('PostModel', 'ArticleModel', 'CommentModel', 'ArticleCommentModel', 'ConnectionModel', 'EventModel', 'BusinessModel', 'CategoryModel', 'OutlookModel', 'UserModel', 'ProductModel', 'ChatMessageModel', 'LikeModel', 'ServiceProviderModel')`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "notifications" ADD "notifiable_type" "public"."notifications_notifiable_type_enum" NOT NULL DEFAULT 'ConnectionModel'`);
|
|
11
|
+
}
|
|
12
|
+
async down(queryRunner) {
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "notifications" DROP COLUMN "notifiable_type"`);
|
|
14
|
+
await queryRunner.query(`DROP TYPE "public"."notifications_notifiable_type_enum"`);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE "notifications" ADD "notifiable_type" character varying NOT NULL`);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "notifications" DROP COLUMN "metadata"`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.ModifiedNotificationsTable1777392080172 = ModifiedNotificationsTable1777392080172;
|
|
@@ -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,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"}
|
|
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;IAGf,QAAQ,CAAC,EAAE,GAAG,CAAC;IAOf,eAAe,EAAG,UAAU,CAAC;IAG7B,OAAO,EAAG,MAAM,CAAC;IAGjB,IAAI,EAAG,OAAO,CAAC;CAClB"}
|
|
@@ -21,6 +21,7 @@ let NotificationModel = class NotificationModel extends BaseModel_1.BaseModel {
|
|
|
21
21
|
key;
|
|
22
22
|
notifiable_id;
|
|
23
23
|
title;
|
|
24
|
+
metadata;
|
|
24
25
|
notifiable_type;
|
|
25
26
|
message;
|
|
26
27
|
read;
|
|
@@ -50,12 +51,16 @@ __decorate([
|
|
|
50
51
|
(0, typeorm_1.Column)(),
|
|
51
52
|
__metadata("design:type", String)
|
|
52
53
|
], NotificationModel.prototype, "title", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: "jsonb", nullable: true }),
|
|
56
|
+
__metadata("design:type", Object)
|
|
57
|
+
], NotificationModel.prototype, "metadata", void 0);
|
|
53
58
|
__decorate([
|
|
54
59
|
(0, typeorm_1.Column)({
|
|
55
60
|
type: "enum",
|
|
56
61
|
enum: enums_1.SYS_MODELS,
|
|
62
|
+
default: enums_1.SYS_MODELS.CONNECTION_MODEL,
|
|
57
63
|
}),
|
|
58
|
-
(0, typeorm_1.Column)(),
|
|
59
64
|
__metadata("design:type", String)
|
|
60
65
|
], NotificationModel.prototype, "notifiable_type", void 0);
|
|
61
66
|
__decorate([
|