@sigmatech/pergamo 0.1.3 → 0.1.5
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,6 +1,6 @@
|
|
|
1
|
-
import { GlobalBase } from
|
|
2
|
-
import { Chat } from
|
|
3
|
-
import { User } from
|
|
1
|
+
import { GlobalBase } from "../base/_global-base";
|
|
2
|
+
import { Chat } from "./chat.entity";
|
|
3
|
+
import { User } from "../user.entity";
|
|
4
4
|
export declare enum MessageType {
|
|
5
5
|
TEXT = "TEXT",
|
|
6
6
|
IMAGE = "IMAGE",
|
|
@@ -21,6 +21,7 @@ export declare class ChatMessage extends GlobalBase {
|
|
|
21
21
|
fileName?: string;
|
|
22
22
|
deliveredAt?: Date;
|
|
23
23
|
readAt?: Date;
|
|
24
|
+
thumbnailUrl?: string;
|
|
24
25
|
isEdited: boolean;
|
|
25
26
|
editedAt?: Date;
|
|
26
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-message.entity.d.ts","sourceRoot":"","sources":["../../../src/entities/chat/chat-message.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,oBAAY,WAAW;IACrB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAED;;;GAGG;AACH,qBAKa,WAAY,SAAQ,UAAU;IAKzC,IAAI,EAAG,IAAI,CAAC;IAIZ,MAAM,EAAG,IAAI,CAAC;IAGd,OAAO,EAAG,MAAM,CAAC;IAOjB,IAAI,EAAG,WAAW,CAAC;IAInB,OAAO,CAAC,EAAE,WAAW,CAAC;IAGtB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,WAAW,CAAC,EAAE,IAAI,CAAC;IAGnB,MAAM,CAAC,EAAE,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"chat-message.entity.d.ts","sourceRoot":"","sources":["../../../src/entities/chat/chat-message.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,oBAAY,WAAW;IACrB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAED;;;GAGG;AACH,qBAKa,WAAY,SAAQ,UAAU;IAKzC,IAAI,EAAG,IAAI,CAAC;IAIZ,MAAM,EAAG,IAAI,CAAC;IAGd,OAAO,EAAG,MAAM,CAAC;IAOjB,IAAI,EAAG,WAAW,CAAC;IAInB,OAAO,CAAC,EAAE,WAAW,CAAC;IAGtB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,WAAW,CAAC,EAAE,IAAI,CAAC;IAGnB,MAAM,CAAC,EAAE,IAAI,CAAC;IAQd,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,QAAQ,EAAG,OAAO,CAAC;IAGnB,QAAQ,CAAC,EAAE,IAAI,CAAC;CACjB"}
|
|
@@ -30,23 +30,23 @@ let ChatMessage = class ChatMessage extends _global_base_1.GlobalBase {
|
|
|
30
30
|
exports.ChatMessage = ChatMessage;
|
|
31
31
|
__decorate([
|
|
32
32
|
(0, typeorm_1.ManyToOne)(() => chat_entity_1.Chat, (chat) => chat.messages, {
|
|
33
|
-
onDelete:
|
|
33
|
+
onDelete: "CASCADE",
|
|
34
34
|
}),
|
|
35
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
35
|
+
(0, typeorm_1.JoinColumn)({ name: "chat_id" }),
|
|
36
36
|
__metadata("design:type", chat_entity_1.Chat)
|
|
37
37
|
], ChatMessage.prototype, "chat", void 0);
|
|
38
38
|
__decorate([
|
|
39
39
|
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { eager: true }),
|
|
40
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
40
|
+
(0, typeorm_1.JoinColumn)({ name: "sender_id" }),
|
|
41
41
|
__metadata("design:type", user_entity_1.User)
|
|
42
42
|
], ChatMessage.prototype, "sender", void 0);
|
|
43
43
|
__decorate([
|
|
44
|
-
(0, typeorm_1.Column)({ type:
|
|
44
|
+
(0, typeorm_1.Column)({ type: "text" }),
|
|
45
45
|
__metadata("design:type", String)
|
|
46
46
|
], ChatMessage.prototype, "content", void 0);
|
|
47
47
|
__decorate([
|
|
48
48
|
(0, typeorm_1.Column)({
|
|
49
|
-
type:
|
|
49
|
+
type: "enum",
|
|
50
50
|
enum: MessageType,
|
|
51
51
|
default: MessageType.TEXT,
|
|
52
52
|
}),
|
|
@@ -54,38 +54,47 @@ __decorate([
|
|
|
54
54
|
], ChatMessage.prototype, "type", void 0);
|
|
55
55
|
__decorate([
|
|
56
56
|
(0, typeorm_1.ManyToOne)(() => ChatMessage, { nullable: true }),
|
|
57
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
57
|
+
(0, typeorm_1.JoinColumn)({ name: "reply_to_id" }),
|
|
58
58
|
__metadata("design:type", ChatMessage)
|
|
59
59
|
], ChatMessage.prototype, "replyTo", void 0);
|
|
60
60
|
__decorate([
|
|
61
|
-
(0, typeorm_1.Column)({ type:
|
|
61
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: true, name: "file_url" }),
|
|
62
62
|
__metadata("design:type", String)
|
|
63
63
|
], ChatMessage.prototype, "fileUrl", void 0);
|
|
64
64
|
__decorate([
|
|
65
|
-
(0, typeorm_1.Column)({ type:
|
|
65
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 200, nullable: true, name: "file_name" }),
|
|
66
66
|
__metadata("design:type", String)
|
|
67
67
|
], ChatMessage.prototype, "fileName", void 0);
|
|
68
68
|
__decorate([
|
|
69
|
-
(0, typeorm_1.Column)({ type:
|
|
69
|
+
(0, typeorm_1.Column)({ type: "timestamp", nullable: true, name: "delivered_at" }),
|
|
70
70
|
__metadata("design:type", Date)
|
|
71
71
|
], ChatMessage.prototype, "deliveredAt", void 0);
|
|
72
72
|
__decorate([
|
|
73
|
-
(0, typeorm_1.Column)({ type:
|
|
73
|
+
(0, typeorm_1.Column)({ type: "timestamp", nullable: true, name: "read_at" }),
|
|
74
74
|
__metadata("design:type", Date)
|
|
75
75
|
], ChatMessage.prototype, "readAt", void 0);
|
|
76
76
|
__decorate([
|
|
77
|
-
(0, typeorm_1.Column)({
|
|
77
|
+
(0, typeorm_1.Column)({
|
|
78
|
+
type: "varchar",
|
|
79
|
+
length: 500,
|
|
80
|
+
nullable: true,
|
|
81
|
+
name: "thumbnail_url",
|
|
82
|
+
}),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], ChatMessage.prototype, "thumbnailUrl", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typeorm_1.Column)({ type: "boolean", default: false, name: "is_edited" }),
|
|
78
87
|
__metadata("design:type", Boolean)
|
|
79
88
|
], ChatMessage.prototype, "isEdited", void 0);
|
|
80
89
|
__decorate([
|
|
81
|
-
(0, typeorm_1.Column)({ type:
|
|
90
|
+
(0, typeorm_1.Column)({ type: "timestamp", nullable: true, name: "edited_at" }),
|
|
82
91
|
__metadata("design:type", Date)
|
|
83
92
|
], ChatMessage.prototype, "editedAt", void 0);
|
|
84
93
|
exports.ChatMessage = ChatMessage = __decorate([
|
|
85
|
-
(0, typeorm_1.Entity)(
|
|
86
|
-
(0, typeorm_1.Index)(
|
|
87
|
-
(0, typeorm_1.Index)(
|
|
88
|
-
(0, typeorm_1.Index)(
|
|
89
|
-
(0, typeorm_1.Index)(
|
|
94
|
+
(0, typeorm_1.Entity)("chat_message"),
|
|
95
|
+
(0, typeorm_1.Index)("chat_message_chat_idx", ["chat"]),
|
|
96
|
+
(0, typeorm_1.Index)("chat_message_sender_idx", ["sender"]),
|
|
97
|
+
(0, typeorm_1.Index)("chat_message_created_at_idx", ["createdAt"]),
|
|
98
|
+
(0, typeorm_1.Index)("chat_message_chat_created_idx", ["chat", "createdAt"])
|
|
90
99
|
], ChatMessage);
|
|
91
100
|
//# sourceMappingURL=chat-message.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-message.entity.js","sourceRoot":"","sources":["../../../src/entities/chat/chat-message.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAuE;AACvE,uDAAkD;AAClD,+CAAqC;AACrC,gDAAsC;AAEtC,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,4BAAa,CAAA;IACb,gCAAiB,CAAA;AACnB,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AAED;;;GAGG;AAMI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,yBAAU;
|
|
1
|
+
{"version":3,"file":"chat-message.entity.js","sourceRoot":"","sources":["../../../src/entities/chat/chat-message.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAuE;AACvE,uDAAkD;AAClD,+CAAqC;AACrC,gDAAsC;AAEtC,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,4BAAa,CAAA;IACb,gCAAiB,CAAA;AACnB,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AAED;;;GAGG;AAMI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,yBAAU;CAkD1C,CAAA;AAlDY,kCAAW;AAKtB;IAJC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE;QAC9C,QAAQ,EAAE,SAAS;KACp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2CAAC;AAQd;IANC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,GAAG;QACX,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,eAAe;KACtB,CAAC;;iDACoB;AAGtB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;;6CAC5C;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;8BACtD,IAAI;6CAAC;sBAjDL,WAAW;IALvB,IAAA,gBAAM,EAAC,cAAc,CAAC;IACtB,IAAA,eAAK,EAAC,uBAAuB,EAAE,CAAC,MAAM,CAAC,CAAC;IACxC,IAAA,eAAK,EAAC,yBAAyB,EAAE,CAAC,QAAQ,CAAC,CAAC;IAC5C,IAAA,eAAK,EAAC,6BAA6B,EAAE,CAAC,WAAW,CAAC,CAAC;IACnD,IAAA,eAAK,EAAC,+BAA+B,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;GACjD,WAAW,CAkDvB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sigmatech/pergamo",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Shared TypeORM entities and utilities for Dataven intelligence system - Named after the ancient library of Pergamon",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"build:watch": "tsc -p tsconfig.build.json --watch",
|
|
13
13
|
"prepublishOnly": "pnpm build",
|
|
14
14
|
"publish:local": "pnpm build && npm pack",
|
|
15
|
-
"publish:npm": "pnpm build && npm publish --access public"
|
|
15
|
+
"publish:npm": "npm version patch && pnpm build && npm publish --access public"
|
|
16
16
|
},
|
|
17
17
|
"keywords": [
|
|
18
18
|
"typeorm",
|