@builder6/server 0.6.5 → 0.7.1

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.
Files changed (111) hide show
  1. package/dist/app.express.js +0 -1
  2. package/dist/app.express.js.map +1 -1
  3. package/dist/app.module.js +12 -10
  4. package/dist/app.module.js.map +1 -1
  5. package/dist/b6.server.js +11 -134
  6. package/dist/b6.server.js.map +1 -1
  7. package/dist/oidc/oidc.service.js +1 -1
  8. package/dist/oidc/oidc.service.js.map +1 -1
  9. package/package.json +10 -8
  10. package/dist/app.config.d.ts +0 -2
  11. package/dist/app.config.js +0 -55
  12. package/dist/app.config.js.map +0 -1
  13. package/dist/b6.config.d.ts +0 -0
  14. package/dist/b6.config.js +0 -4
  15. package/dist/b6.config.js.map +0 -1
  16. package/dist/files/files.controller.d.ts +0 -11
  17. package/dist/files/files.controller.js +0 -148
  18. package/dist/files/files.controller.js.map +0 -1
  19. package/dist/files/files.module.d.ts +0 -2
  20. package/dist/files/files.module.js +0 -26
  21. package/dist/files/files.module.js.map +0 -1
  22. package/dist/files/files.moleculer.d.ts +0 -10
  23. package/dist/files/files.moleculer.js +0 -53
  24. package/dist/files/files.moleculer.js.map +0 -1
  25. package/dist/files/files.service.d.ts +0 -30
  26. package/dist/files/files.service.js +0 -207
  27. package/dist/files/files.service.js.map +0 -1
  28. package/dist/files/index.d.ts +0 -3
  29. package/dist/files/index.js +0 -20
  30. package/dist/files/index.js.map +0 -1
  31. package/dist/index.d.ts +0 -3
  32. package/dist/index.js +0 -26
  33. package/dist/index.js.map +0 -1
  34. package/dist/moleculer.config.d.ts +0 -2
  35. package/dist/moleculer.config.js +0 -74
  36. package/dist/moleculer.config.js.map +0 -1
  37. package/dist/plugin/moleculer.service.d.ts +0 -11
  38. package/dist/plugin/moleculer.service.js +0 -96
  39. package/dist/plugin/moleculer.service.js.map +0 -1
  40. package/dist/plugin/plugin.module.d.ts +0 -14
  41. package/dist/plugin/plugin.module.js +0 -72
  42. package/dist/plugin/plugin.module.js.map +0 -1
  43. package/dist/plugin/plugin.service.d.ts +0 -3
  44. package/dist/plugin/plugin.service.js +0 -21
  45. package/dist/plugin/plugin.service.js.map +0 -1
  46. package/dist/rooms/globals/augmentation.d.ts +0 -25
  47. package/dist/rooms/globals/augmentation.js +0 -3
  48. package/dist/rooms/globals/augmentation.js.map +0 -1
  49. package/dist/rooms/lib/DateToString.d.ts +0 -3
  50. package/dist/rooms/lib/DateToString.js +0 -3
  51. package/dist/rooms/lib/DateToString.js.map +0 -1
  52. package/dist/rooms/lib/Json.d.ts +0 -9
  53. package/dist/rooms/lib/Json.js +0 -18
  54. package/dist/rooms/lib/Json.js.map +0 -1
  55. package/dist/rooms/lib/utils.d.ts +0 -33
  56. package/dist/rooms/lib/utils.js +0 -122
  57. package/dist/rooms/lib/utils.js.map +0 -1
  58. package/dist/rooms/protocol/AuthToken.d.ts +0 -50
  59. package/dist/rooms/protocol/AuthToken.js +0 -49
  60. package/dist/rooms/protocol/AuthToken.js.map +0 -1
  61. package/dist/rooms/protocol/Authentication.d.ts +0 -22
  62. package/dist/rooms/protocol/Authentication.js +0 -3
  63. package/dist/rooms/protocol/Authentication.js.map +0 -1
  64. package/dist/rooms/protocol/BaseActivitiesData.d.ts +0 -4
  65. package/dist/rooms/protocol/BaseActivitiesData.js +0 -3
  66. package/dist/rooms/protocol/BaseActivitiesData.js.map +0 -1
  67. package/dist/rooms/protocol/BaseRoomInfo.d.ts +0 -6
  68. package/dist/rooms/protocol/BaseRoomInfo.js +0 -3
  69. package/dist/rooms/protocol/BaseRoomInfo.js.map +0 -1
  70. package/dist/rooms/protocol/BaseUserMeta.d.ts +0 -10
  71. package/dist/rooms/protocol/BaseUserMeta.js +0 -3
  72. package/dist/rooms/protocol/BaseUserMeta.js.map +0 -1
  73. package/dist/rooms/protocol/ClientMsg.d.ts +0 -41
  74. package/dist/rooms/protocol/ClientMsg.js +0 -13
  75. package/dist/rooms/protocol/ClientMsg.js.map +0 -1
  76. package/dist/rooms/protocol/Comments.d.ts +0 -146
  77. package/dist/rooms/protocol/Comments.js +0 -3
  78. package/dist/rooms/protocol/Comments.js.map +0 -1
  79. package/dist/rooms/protocol/InboxNotifications.d.ts +0 -49
  80. package/dist/rooms/protocol/InboxNotifications.js +0 -3
  81. package/dist/rooms/protocol/InboxNotifications.js.map +0 -1
  82. package/dist/rooms/protocol/Op.d.ts +0 -82
  83. package/dist/rooms/protocol/Op.js +0 -28
  84. package/dist/rooms/protocol/Op.js.map +0 -1
  85. package/dist/rooms/protocol/SerializedCrdt.d.ts +0 -40
  86. package/dist/rooms/protocol/SerializedCrdt.js +0 -19
  87. package/dist/rooms/protocol/SerializedCrdt.js.map +0 -1
  88. package/dist/rooms/protocol/ServerMsg.d.ts +0 -128
  89. package/dist/rooms/protocol/ServerMsg.js +0 -25
  90. package/dist/rooms/protocol/ServerMsg.js.map +0 -1
  91. package/dist/rooms/protocol/VersionHistory.d.ts +0 -9
  92. package/dist/rooms/protocol/VersionHistory.js +0 -3
  93. package/dist/rooms/protocol/VersionHistory.js.map +0 -1
  94. package/dist/rooms/rooms.controller.d.ts +0 -64
  95. package/dist/rooms/rooms.controller.js +0 -401
  96. package/dist/rooms/rooms.controller.js.map +0 -1
  97. package/dist/rooms/rooms.gateway.d.ts +0 -30
  98. package/dist/rooms/rooms.gateway.js +0 -188
  99. package/dist/rooms/rooms.gateway.js.map +0 -1
  100. package/dist/rooms/rooms.guard.d.ts +0 -9
  101. package/dist/rooms/rooms.guard.js +0 -48
  102. package/dist/rooms/rooms.guard.js.map +0 -1
  103. package/dist/rooms/rooms.module.d.ts +0 -2
  104. package/dist/rooms/rooms.module.js +0 -36
  105. package/dist/rooms/rooms.module.js.map +0 -1
  106. package/dist/rooms/rooms.service.d.ts +0 -51
  107. package/dist/rooms/rooms.service.js +0 -225
  108. package/dist/rooms/rooms.service.js.map +0 -1
  109. package/views/ag-grid/README.md +0 -15
  110. package/views/ag-grid/ag-grid.hbs +0 -1099
  111. package/views/devextreme/datagrid.hbs +0 -240
@@ -1,146 +0,0 @@
1
- import type { DM } from '../globals/augmentation';
2
- import type { DateToString } from '../lib/DateToString';
3
- export type BaseMetadata = Record<string, string | boolean | number | undefined>;
4
- export type CommentReaction = {
5
- emoji: string;
6
- createdAt: Date;
7
- users: {
8
- id: string;
9
- }[];
10
- };
11
- export type CommentAttachment = {
12
- type: 'attachment';
13
- id: string;
14
- name: string;
15
- size: number;
16
- mimeType: string;
17
- };
18
- export type CommentLocalAttachmentIdle = {
19
- type: 'localAttachment';
20
- status: 'idle';
21
- id: string;
22
- name: string;
23
- size: number;
24
- mimeType: string;
25
- file: File;
26
- };
27
- export type CommentLocalAttachmentUploading = {
28
- type: 'localAttachment';
29
- status: 'uploading';
30
- id: string;
31
- name: string;
32
- size: number;
33
- mimeType: string;
34
- file: File;
35
- };
36
- export type CommentLocalAttachmentUploaded = {
37
- type: 'localAttachment';
38
- status: 'uploaded';
39
- id: string;
40
- name: string;
41
- size: number;
42
- mimeType: string;
43
- file: File;
44
- };
45
- export type CommentLocalAttachmentError = {
46
- type: 'localAttachment';
47
- status: 'error';
48
- id: string;
49
- name: string;
50
- size: number;
51
- mimeType: string;
52
- file: File;
53
- error: Error;
54
- };
55
- export type CommentLocalAttachment = CommentLocalAttachmentIdle | CommentLocalAttachmentUploading | CommentLocalAttachmentUploaded | CommentLocalAttachmentError;
56
- export type CommentMixedAttachment = CommentAttachment | CommentLocalAttachment;
57
- export type CommentData = {
58
- type: 'comment';
59
- id: string;
60
- threadId: string;
61
- roomId: string;
62
- userId: string;
63
- createdAt: Date;
64
- editedAt?: Date;
65
- reactions: CommentReaction[];
66
- attachments: CommentAttachment[];
67
- } & ({
68
- body: CommentBody;
69
- deletedAt?: never;
70
- } | {
71
- body?: never;
72
- deletedAt: Date;
73
- });
74
- export type CommentDataPlain = Omit<DateToString<CommentData>, 'reactions' | 'body'> & {
75
- reactions: DateToString<CommentReaction>[];
76
- } & ({
77
- body: CommentBody;
78
- deletedAt?: never;
79
- } | {
80
- body?: never;
81
- deletedAt: string;
82
- });
83
- export type CommentBodyBlockElement = CommentBodyParagraph;
84
- export type CommentBodyInlineElement = CommentBodyText | CommentBodyMention | CommentBodyLink;
85
- export type CommentBodyElement = CommentBodyBlockElement | CommentBodyInlineElement;
86
- export type CommentBodyParagraph = {
87
- type: 'paragraph';
88
- children: CommentBodyInlineElement[];
89
- };
90
- export type CommentBodyMention = {
91
- type: 'mention';
92
- id: string;
93
- };
94
- export type CommentBodyLink = {
95
- type: 'link';
96
- url: string;
97
- text?: string;
98
- };
99
- export type CommentBodyText = {
100
- bold?: boolean;
101
- italic?: boolean;
102
- strikethrough?: boolean;
103
- code?: boolean;
104
- text: string;
105
- };
106
- export type CommentBody = {
107
- version: 1;
108
- content: CommentBodyBlockElement[];
109
- };
110
- export type CommentUserReaction = {
111
- emoji: string;
112
- createdAt: Date;
113
- userId: string;
114
- };
115
- export type CommentUserReactionPlain = DateToString<CommentUserReaction>;
116
- export type ThreadData<M extends BaseMetadata = DM> = {
117
- type: 'thread';
118
- id: string;
119
- roomId: string;
120
- createdAt: Date;
121
- updatedAt: Date;
122
- comments: CommentData[];
123
- metadata: M;
124
- resolved: boolean;
125
- };
126
- export interface ThreadDataWithDeleteInfo<M extends BaseMetadata = DM> extends ThreadData<M> {
127
- deletedAt?: Date;
128
- }
129
- export type ThreadDataPlain<M extends BaseMetadata> = Omit<DateToString<ThreadData<M>>, 'comments' | 'metadata'> & {
130
- comments: CommentDataPlain[];
131
- metadata: M;
132
- };
133
- export type ThreadDeleteInfo = {
134
- type: 'deletedThread';
135
- id: string;
136
- roomId: string;
137
- deletedAt: Date;
138
- };
139
- export type ThreadDeleteInfoPlain = DateToString<ThreadDeleteInfo>;
140
- type StringOperators<T> = T | {
141
- startsWith: string;
142
- };
143
- export type QueryMetadata<M extends BaseMetadata> = {
144
- [K in keyof M]: string extends M[K] ? StringOperators<M[K]> : M[K];
145
- };
146
- export {};
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=Comments.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Comments.js","sourceRoot":"","sources":["../../../src/rooms/protocol/Comments.ts"],"names":[],"mappings":""}
@@ -1,49 +0,0 @@
1
- import type { DAD } from '../globals/augmentation';
2
- import type { DateToString } from '../lib/DateToString';
3
- export type InboxNotificationThreadData = {
4
- kind: 'thread';
5
- id: string;
6
- roomId: string;
7
- threadId: string;
8
- notifiedAt: Date;
9
- readAt: Date | null;
10
- };
11
- export type InboxNotificationTextMentionData = {
12
- kind: 'textMention';
13
- id: string;
14
- roomId: string;
15
- notifiedAt: Date;
16
- readAt: Date | null;
17
- createdBy: string;
18
- mentionId: string;
19
- };
20
- export type InboxNotificationTextMentionDataPlain = DateToString<InboxNotificationTextMentionData>;
21
- export type ActivityData = Record<string, string | boolean | number | undefined>;
22
- type InboxNotificationActivity<K extends keyof DAD = keyof DAD> = {
23
- id: string;
24
- createdAt: Date;
25
- data: DAD[K];
26
- };
27
- export type InboxNotificationCustomData<K extends keyof DAD = keyof DAD> = {
28
- kind: K;
29
- id: string;
30
- roomId?: string;
31
- subjectId: string;
32
- notifiedAt: Date;
33
- readAt: Date | null;
34
- activities: InboxNotificationActivity<K>[];
35
- };
36
- export type InboxNotificationData = InboxNotificationThreadData | InboxNotificationCustomData | InboxNotificationTextMentionData;
37
- export type InboxNotificationThreadDataPlain = DateToString<InboxNotificationThreadData>;
38
- export type InboxNotificationCustomDataPlain = Omit<DateToString<InboxNotificationCustomData>, 'activities'> & {
39
- activities: DateToString<InboxNotificationActivity>[];
40
- };
41
- export type InboxNotificationDataPlain = InboxNotificationThreadDataPlain | InboxNotificationCustomDataPlain | InboxNotificationTextMentionDataPlain;
42
- export type InboxNotificationDeleteInfo = {
43
- type: 'deletedInboxNotification';
44
- id: string;
45
- roomId: string;
46
- deletedAt: Date;
47
- };
48
- export type InboxNotificationDeleteInfoPlain = DateToString<InboxNotificationDeleteInfo>;
49
- export {};
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=InboxNotifications.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InboxNotifications.js","sourceRoot":"","sources":["../../../src/rooms/protocol/InboxNotifications.ts"],"names":[],"mappings":""}
@@ -1,82 +0,0 @@
1
- import type { Json, JsonObject } from '../lib/Json';
2
- export declare enum OpCode {
3
- INIT = 0,
4
- SET_PARENT_KEY = 1,
5
- CREATE_LIST = 2,
6
- UPDATE_OBJECT = 3,
7
- CREATE_OBJECT = 4,
8
- DELETE_CRDT = 5,
9
- DELETE_OBJECT_KEY = 6,
10
- CREATE_MAP = 7,
11
- CREATE_REGISTER = 8
12
- }
13
- export type Op = AckOp | CreateOp | UpdateObjectOp | DeleteCrdtOp | SetParentKeyOp | DeleteObjectKeyOp;
14
- export type CreateOp = CreateObjectOp | CreateRegisterOp | CreateMapOp | CreateListOp;
15
- export type UpdateObjectOp = {
16
- readonly opId?: string;
17
- readonly id: string;
18
- readonly type: OpCode.UPDATE_OBJECT;
19
- readonly data: Partial<JsonObject>;
20
- };
21
- export type CreateObjectOp = {
22
- readonly opId?: string;
23
- readonly id: string;
24
- readonly intent?: 'set';
25
- readonly deletedId?: string;
26
- readonly type: OpCode.CREATE_OBJECT;
27
- readonly parentId: string;
28
- readonly parentKey: string;
29
- readonly data: JsonObject;
30
- };
31
- export type CreateListOp = {
32
- readonly opId?: string;
33
- readonly id: string;
34
- readonly intent?: 'set';
35
- readonly deletedId?: string;
36
- readonly type: OpCode.CREATE_LIST;
37
- readonly parentId: string;
38
- readonly parentKey: string;
39
- };
40
- export type CreateMapOp = {
41
- readonly opId?: string;
42
- readonly id: string;
43
- readonly intent?: 'set';
44
- readonly deletedId?: string;
45
- readonly type: OpCode.CREATE_MAP;
46
- readonly parentId: string;
47
- readonly parentKey: string;
48
- };
49
- export type CreateRegisterOp = {
50
- readonly opId?: string;
51
- readonly id: string;
52
- readonly intent?: 'set';
53
- readonly deletedId?: string;
54
- readonly type: OpCode.CREATE_REGISTER;
55
- readonly parentId: string;
56
- readonly parentKey: string;
57
- readonly data: Json;
58
- };
59
- export type DeleteCrdtOp = {
60
- readonly opId?: string;
61
- readonly id: string;
62
- readonly type: OpCode.DELETE_CRDT;
63
- };
64
- export type AckOp = {
65
- readonly type: OpCode.DELETE_CRDT;
66
- readonly id: 'ACK';
67
- readonly opId: string;
68
- };
69
- export declare function ackOp(opId: string): AckOp;
70
- export declare function isAckOp(op: Op): op is AckOp;
71
- export type SetParentKeyOp = {
72
- readonly opId?: string;
73
- readonly id: string;
74
- readonly type: OpCode.SET_PARENT_KEY;
75
- readonly parentKey: string;
76
- };
77
- export type DeleteObjectKeyOp = {
78
- readonly opId?: string;
79
- readonly id: string;
80
- readonly type: OpCode.DELETE_OBJECT_KEY;
81
- readonly key: string;
82
- };
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OpCode = void 0;
4
- exports.ackOp = ackOp;
5
- exports.isAckOp = isAckOp;
6
- var OpCode;
7
- (function (OpCode) {
8
- OpCode[OpCode["INIT"] = 0] = "INIT";
9
- OpCode[OpCode["SET_PARENT_KEY"] = 1] = "SET_PARENT_KEY";
10
- OpCode[OpCode["CREATE_LIST"] = 2] = "CREATE_LIST";
11
- OpCode[OpCode["UPDATE_OBJECT"] = 3] = "UPDATE_OBJECT";
12
- OpCode[OpCode["CREATE_OBJECT"] = 4] = "CREATE_OBJECT";
13
- OpCode[OpCode["DELETE_CRDT"] = 5] = "DELETE_CRDT";
14
- OpCode[OpCode["DELETE_OBJECT_KEY"] = 6] = "DELETE_OBJECT_KEY";
15
- OpCode[OpCode["CREATE_MAP"] = 7] = "CREATE_MAP";
16
- OpCode[OpCode["CREATE_REGISTER"] = 8] = "CREATE_REGISTER";
17
- })(OpCode || (exports.OpCode = OpCode = {}));
18
- function ackOp(opId) {
19
- return {
20
- type: OpCode.DELETE_CRDT,
21
- id: 'ACK',
22
- opId,
23
- };
24
- }
25
- function isAckOp(op) {
26
- return op.type === OpCode.DELETE_CRDT && op.id === 'ACK';
27
- }
28
- //# sourceMappingURL=Op.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Op.js","sourceRoot":"","sources":["../../../src/rooms/protocol/Op.ts"],"names":[],"mappings":";;;AAsHA,sBAMC;AAED,0BAEC;AA9HD,IAAY,MAUX;AAVD,WAAY,MAAM;IAChB,mCAAQ,CAAA;IACR,uDAAkB,CAAA;IAClB,iDAAe,CAAA;IACf,qDAAiB,CAAA;IACjB,qDAAiB,CAAA;IACjB,iDAAe,CAAA;IACf,6DAAqB,CAAA;IACrB,+CAAc,CAAA;IACd,yDAAmB,CAAA;AACrB,CAAC,EAVW,MAAM,sBAAN,MAAM,QAUjB;AA0GD,SAAgB,KAAK,CAAC,IAAY;IAChC,OAAO;QACL,IAAI,EAAE,MAAM,CAAC,WAAW;QACxB,EAAE,EAAE,KAAK;QACT,IAAI;KACL,CAAC;AACJ,CAAC;AAED,SAAgB,OAAO,CAAC,EAAM;IAC5B,OAAO,EAAE,CAAC,IAAI,KAAK,MAAM,CAAC,WAAW,IAAI,EAAE,CAAC,EAAE,KAAK,KAAK,CAAC;AAC3D,CAAC"}
@@ -1,40 +0,0 @@
1
- import type { Json, JsonObject } from '../lib/Json';
2
- export type IdTuple<T> = [id: string, value: T];
3
- export declare enum CrdtType {
4
- OBJECT = 0,
5
- LIST = 1,
6
- MAP = 2,
7
- REGISTER = 3
8
- }
9
- export type SerializedCrdt = SerializedRootObject | SerializedChild;
10
- export type SerializedChild = SerializedObject | SerializedList | SerializedMap | SerializedRegister;
11
- export type SerializedRootObject = {
12
- readonly type: CrdtType.OBJECT;
13
- readonly data: JsonObject;
14
- readonly parentId?: never;
15
- readonly parentKey?: never;
16
- };
17
- export type SerializedObject = {
18
- readonly type: CrdtType.OBJECT;
19
- readonly parentId: string;
20
- readonly parentKey: string;
21
- readonly data: JsonObject;
22
- };
23
- export type SerializedList = {
24
- readonly type: CrdtType.LIST;
25
- readonly parentId: string;
26
- readonly parentKey: string;
27
- };
28
- export type SerializedMap = {
29
- readonly type: CrdtType.MAP;
30
- readonly parentId: string;
31
- readonly parentKey: string;
32
- };
33
- export type SerializedRegister = {
34
- readonly type: CrdtType.REGISTER;
35
- readonly parentId: string;
36
- readonly parentKey: string;
37
- readonly data: Json;
38
- };
39
- export declare function isRootCrdt(crdt: SerializedCrdt): crdt is SerializedRootObject;
40
- export declare function isChildCrdt(crdt: SerializedCrdt): crdt is SerializedChild;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CrdtType = void 0;
4
- exports.isRootCrdt = isRootCrdt;
5
- exports.isChildCrdt = isChildCrdt;
6
- var CrdtType;
7
- (function (CrdtType) {
8
- CrdtType[CrdtType["OBJECT"] = 0] = "OBJECT";
9
- CrdtType[CrdtType["LIST"] = 1] = "LIST";
10
- CrdtType[CrdtType["MAP"] = 2] = "MAP";
11
- CrdtType[CrdtType["REGISTER"] = 3] = "REGISTER";
12
- })(CrdtType || (exports.CrdtType = CrdtType = {}));
13
- function isRootCrdt(crdt) {
14
- return crdt.type === CrdtType.OBJECT && !isChildCrdt(crdt);
15
- }
16
- function isChildCrdt(crdt) {
17
- return crdt.parentId !== undefined && crdt.parentKey !== undefined;
18
- }
19
- //# sourceMappingURL=SerializedCrdt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SerializedCrdt.js","sourceRoot":"","sources":["../../../src/rooms/protocol/SerializedCrdt.ts"],"names":[],"mappings":";;;AAsDA,gCAEC;AAED,kCAEC;AAxDD,IAAY,QAKX;AALD,WAAY,QAAQ;IAClB,2CAAU,CAAA;IACV,uCAAQ,CAAA;IACR,qCAAO,CAAA;IACP,+CAAY,CAAA;AACd,CAAC,EALW,QAAQ,wBAAR,QAAQ,QAKnB;AA6CD,SAAgB,UAAU,CAAC,IAAoB;IAC7C,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AAC7D,CAAC;AAED,SAAgB,WAAW,CAAC,IAAoB;IAC9C,OAAO,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,CAAC;AACrE,CAAC"}
@@ -1,128 +0,0 @@
1
- import type { Json, JsonObject } from '../lib/Json';
2
- import type { BaseUserMeta } from './BaseUserMeta';
3
- import type { Op } from './Op';
4
- import type { IdTuple, SerializedCrdt } from './SerializedCrdt';
5
- export declare enum ServerMsgCode {
6
- UPDATE_PRESENCE = 100,
7
- USER_JOINED = 101,
8
- USER_LEFT = 102,
9
- BROADCASTED_EVENT = 103,
10
- ROOM_STATE = 104,
11
- INITIAL_STORAGE_STATE = 200,
12
- UPDATE_STORAGE = 201,
13
- REJECT_STORAGE_OP = 299,
14
- UPDATE_YDOC = 300,
15
- THREAD_CREATED = 400,
16
- THREAD_DELETED = 407,
17
- THREAD_METADATA_UPDATED = 401,
18
- THREAD_UPDATED = 408,
19
- COMMENT_CREATED = 402,
20
- COMMENT_EDITED = 403,
21
- COMMENT_DELETED = 404,
22
- COMMENT_REACTION_ADDED = 405,
23
- COMMENT_REACTION_REMOVED = 406
24
- }
25
- export type ServerMsg<P extends JsonObject, U extends BaseUserMeta, E extends Json> = UpdatePresenceServerMsg<P> | UserJoinServerMsg<U> | UserLeftServerMsg | BroadcastedEventServerMsg<E> | RoomStateServerMsg<U> | InitialDocumentStateServerMsg | UpdateStorageServerMsg | RejectedStorageOpServerMsg | YDocUpdateServerMsg | CommentsEventServerMsg;
26
- export type CommentsEventServerMsg = ThreadCreatedEvent | ThreadDeletedEvent | ThreadMetadataUpdatedEvent | ThreadUpdatedEvent | CommentCreatedEvent | CommentEditedEvent | CommentDeletedEvent | CommentReactionAdded | CommentReactionRemoved;
27
- type ThreadCreatedEvent = {
28
- type: ServerMsgCode.THREAD_CREATED;
29
- threadId: string;
30
- };
31
- type ThreadDeletedEvent = {
32
- type: ServerMsgCode.THREAD_DELETED;
33
- threadId: string;
34
- };
35
- type ThreadMetadataUpdatedEvent = {
36
- type: ServerMsgCode.THREAD_METADATA_UPDATED;
37
- threadId: string;
38
- };
39
- type ThreadUpdatedEvent = {
40
- type: ServerMsgCode.THREAD_UPDATED;
41
- threadId: string;
42
- };
43
- type CommentCreatedEvent = {
44
- type: ServerMsgCode.COMMENT_CREATED;
45
- threadId: string;
46
- commentId: string;
47
- };
48
- type CommentEditedEvent = {
49
- type: ServerMsgCode.COMMENT_EDITED;
50
- threadId: string;
51
- commentId: string;
52
- };
53
- type CommentDeletedEvent = {
54
- type: ServerMsgCode.COMMENT_DELETED;
55
- threadId: string;
56
- commentId: string;
57
- };
58
- type CommentReactionAdded = {
59
- type: ServerMsgCode.COMMENT_REACTION_ADDED;
60
- threadId: string;
61
- commentId: string;
62
- emoji: string;
63
- };
64
- type CommentReactionRemoved = {
65
- type: ServerMsgCode.COMMENT_REACTION_REMOVED;
66
- threadId: string;
67
- commentId: string;
68
- emoji: string;
69
- };
70
- export type UpdatePresenceServerMsg<P extends JsonObject> = {
71
- readonly type: ServerMsgCode.UPDATE_PRESENCE;
72
- readonly actor: number;
73
- readonly targetActor: number;
74
- readonly data: P;
75
- } | {
76
- readonly type: ServerMsgCode.UPDATE_PRESENCE;
77
- readonly actor: number;
78
- readonly targetActor?: undefined;
79
- readonly data: Partial<P>;
80
- };
81
- export type UserJoinServerMsg<U extends BaseUserMeta> = {
82
- readonly type: ServerMsgCode.USER_JOINED;
83
- readonly actor: number;
84
- readonly id: U['id'];
85
- readonly info: U['info'];
86
- readonly scopes: string[];
87
- };
88
- export type UserLeftServerMsg = {
89
- readonly type: ServerMsgCode.USER_LEFT;
90
- readonly actor: number;
91
- };
92
- export type YDocUpdateServerMsg = {
93
- readonly type: ServerMsgCode.UPDATE_YDOC;
94
- readonly update: string;
95
- readonly isSync: boolean;
96
- readonly stateVector: string | null;
97
- readonly guid?: string;
98
- };
99
- export type BroadcastedEventServerMsg<E extends Json> = {
100
- readonly type: ServerMsgCode.BROADCASTED_EVENT;
101
- readonly actor: number;
102
- readonly event: E;
103
- };
104
- export type RoomStateServerMsg<U extends BaseUserMeta> = {
105
- readonly type: ServerMsgCode.ROOM_STATE;
106
- readonly actor: number;
107
- readonly nonce: string;
108
- readonly scopes: string[];
109
- readonly users: {
110
- readonly [otherActor: number]: U & {
111
- scopes: string[];
112
- };
113
- };
114
- };
115
- export type InitialDocumentStateServerMsg = {
116
- readonly type: ServerMsgCode.INITIAL_STORAGE_STATE;
117
- readonly items: IdTuple<SerializedCrdt>[];
118
- };
119
- export type UpdateStorageServerMsg = {
120
- readonly type: ServerMsgCode.UPDATE_STORAGE;
121
- readonly ops: Op[];
122
- };
123
- export type RejectedStorageOpServerMsg = {
124
- readonly type: ServerMsgCode.REJECT_STORAGE_OP;
125
- readonly opIds: string[];
126
- readonly reason: string;
127
- };
128
- export {};
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ServerMsgCode = void 0;
4
- var ServerMsgCode;
5
- (function (ServerMsgCode) {
6
- ServerMsgCode[ServerMsgCode["UPDATE_PRESENCE"] = 100] = "UPDATE_PRESENCE";
7
- ServerMsgCode[ServerMsgCode["USER_JOINED"] = 101] = "USER_JOINED";
8
- ServerMsgCode[ServerMsgCode["USER_LEFT"] = 102] = "USER_LEFT";
9
- ServerMsgCode[ServerMsgCode["BROADCASTED_EVENT"] = 103] = "BROADCASTED_EVENT";
10
- ServerMsgCode[ServerMsgCode["ROOM_STATE"] = 104] = "ROOM_STATE";
11
- ServerMsgCode[ServerMsgCode["INITIAL_STORAGE_STATE"] = 200] = "INITIAL_STORAGE_STATE";
12
- ServerMsgCode[ServerMsgCode["UPDATE_STORAGE"] = 201] = "UPDATE_STORAGE";
13
- ServerMsgCode[ServerMsgCode["REJECT_STORAGE_OP"] = 299] = "REJECT_STORAGE_OP";
14
- ServerMsgCode[ServerMsgCode["UPDATE_YDOC"] = 300] = "UPDATE_YDOC";
15
- ServerMsgCode[ServerMsgCode["THREAD_CREATED"] = 400] = "THREAD_CREATED";
16
- ServerMsgCode[ServerMsgCode["THREAD_DELETED"] = 407] = "THREAD_DELETED";
17
- ServerMsgCode[ServerMsgCode["THREAD_METADATA_UPDATED"] = 401] = "THREAD_METADATA_UPDATED";
18
- ServerMsgCode[ServerMsgCode["THREAD_UPDATED"] = 408] = "THREAD_UPDATED";
19
- ServerMsgCode[ServerMsgCode["COMMENT_CREATED"] = 402] = "COMMENT_CREATED";
20
- ServerMsgCode[ServerMsgCode["COMMENT_EDITED"] = 403] = "COMMENT_EDITED";
21
- ServerMsgCode[ServerMsgCode["COMMENT_DELETED"] = 404] = "COMMENT_DELETED";
22
- ServerMsgCode[ServerMsgCode["COMMENT_REACTION_ADDED"] = 405] = "COMMENT_REACTION_ADDED";
23
- ServerMsgCode[ServerMsgCode["COMMENT_REACTION_REMOVED"] = 406] = "COMMENT_REACTION_REMOVED";
24
- })(ServerMsgCode || (exports.ServerMsgCode = ServerMsgCode = {}));
25
- //# sourceMappingURL=ServerMsg.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ServerMsg.js","sourceRoot":"","sources":["../../../src/rooms/protocol/ServerMsg.ts"],"names":[],"mappings":";;;AAKA,IAAY,aA0BX;AA1BD,WAAY,aAAa;IAEvB,yEAAqB,CAAA;IACrB,iEAAiB,CAAA;IACjB,6DAAe,CAAA;IACf,6EAAuB,CAAA;IACvB,+DAAgB,CAAA;IAGhB,qFAA2B,CAAA;IAC3B,uEAAoB,CAAA;IACpB,6EAAuB,CAAA;IAGvB,iEAAiB,CAAA;IAGjB,uEAAoB,CAAA;IACpB,uEAAoB,CAAA;IACpB,yFAA6B,CAAA;IAC7B,uEAAoB,CAAA;IACpB,yEAAqB,CAAA;IACrB,uEAAoB,CAAA;IACpB,yEAAqB,CAAA;IACrB,uFAA4B,CAAA;IAC5B,2FAA8B,CAAA;AAChC,CAAC,EA1BW,aAAa,6BAAb,aAAa,QA0BxB"}
@@ -1,9 +0,0 @@
1
- export type HistoryVersion = {
2
- type: 'historyVersion';
3
- kind: 'yjs';
4
- createdAt: Date;
5
- id: string;
6
- authors: {
7
- id: string;
8
- }[];
9
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=VersionHistory.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VersionHistory.js","sourceRoot":"","sources":["../../../src/rooms/protocol/VersionHistory.ts"],"names":[],"mappings":""}
@@ -1,64 +0,0 @@
1
- import { RoomsService } from './rooms.service';
2
- import { JwtService } from '@nestjs/jwt';
3
- import { Request } from 'express';
4
- import { FilesService } from '@/files/files.service';
5
- import { RoomsGateway } from './rooms.gateway';
6
- export declare class RoomsController {
7
- private roomsService;
8
- private filesService;
9
- private jwtService;
10
- private roomsGateway;
11
- constructor(roomsService: RoomsService, filesService: FilesService, jwtService: JwtService, roomsGateway: RoomsGateway);
12
- getAuthToken(body: {
13
- room: string;
14
- }, req: Request): Promise<{
15
- token: string;
16
- }>;
17
- getUsers(userIds: string | string[]): Promise<any[]>;
18
- searchUsers(req: Request, keyword: string, roomdId: string): Promise<string[]>;
19
- getThreads(roomId: string): Promise<{
20
- data: any;
21
- inboxNotifications: any[];
22
- meta: {
23
- nextCursor: any;
24
- requestedAt: string;
25
- permissionHints: {
26
- [x: string]: string[];
27
- };
28
- };
29
- deletedThreads: any[];
30
- deletedInboxNotifications: any[];
31
- }>;
32
- getThreadsDelta(roomId: string, since: string): Promise<{
33
- data: any;
34
- inboxNotifications: any[];
35
- meta: {
36
- nextCursor: any;
37
- requestedAt: string;
38
- permissionHints: {
39
- [x: string]: string[];
40
- };
41
- };
42
- deletedThreads: any[];
43
- deletedInboxNotifications: any[];
44
- }>;
45
- createThread(req: Request, roomId: string, record: Record<string, any>): Promise<any>;
46
- threadWithNotification(req: Request, roomId: string, threadId: string): Promise<{
47
- thread: any;
48
- }>;
49
- threadMarkasResolved(req: Request, roomId: string, threadId: string): Promise<any>;
50
- threadMarkasUnResolved(req: Request, roomId: string, threadId: string): Promise<any>;
51
- createComment(req: Request, roomId: string, threadId: string, record: Record<string, any>): Promise<any>;
52
- updateComment(req: Request, roomId: string, threadId: string, commentId: string, record: Record<string, any>): Promise<any>;
53
- deleteComment(req: Request, roomId: string, threadId: string, commentId: string): Promise<{}>;
54
- presignedUrls(attachmentIds: string[]): Promise<{
55
- urls: string[];
56
- }>;
57
- uploadFile(roomId: string, attachmentId: string, fileName: string, fileSize: number, req: Request): Promise<object>;
58
- createReaction(req: Request, roomId: string, threadId: string, commentId: string, emoji: string): Promise<{
59
- emoji: string;
60
- createdAt: any;
61
- userId: string;
62
- }>;
63
- deleteReaction(req: Request, roomId: string, threadId: string, commentId: string, emoji: string): Promise<{}>;
64
- }