@builder6/rooms 0.10.7 → 0.11.0

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 (112) hide show
  1. package/dist/emails/UnreadMention.d.ts +9 -0
  2. package/dist/emails/UnreadMention.js +54 -0
  3. package/dist/emails/UnreadMention.js.map +1 -0
  4. package/dist/emails/UnreadReplies.d.ts +9 -0
  5. package/dist/emails/UnreadReplies.js +68 -0
  6. package/dist/emails/UnreadReplies.js.map +1 -0
  7. package/dist/emails/_components/comment.d.ts +1 -0
  8. package/dist/emails/_components/comment.js +32 -0
  9. package/dist/emails/_components/comment.js.map +1 -0
  10. package/dist/emails/_components/header.d.ts +2 -0
  11. package/dist/emails/_components/header.js +15 -0
  12. package/dist/emails/_components/header.js.map +1 -0
  13. package/dist/emails/_components/headline.d.ts +5 -0
  14. package/dist/emails/_components/headline.js +17 -0
  15. package/dist/emails/_components/headline.js.map +1 -0
  16. package/dist/emails/_components/layout.d.ts +5 -0
  17. package/dist/emails/_components/layout.js +24 -0
  18. package/dist/emails/_components/layout.js.map +1 -0
  19. package/dist/emails/_lib/types.d.ts +9 -0
  20. package/dist/emails/_lib/types.js +3 -0
  21. package/dist/emails/_lib/types.js.map +1 -0
  22. package/dist/emails/_styles/colors.d.ts +2 -0
  23. package/dist/emails/_styles/colors.js +7 -0
  24. package/dist/emails/_styles/colors.js.map +1 -0
  25. package/dist/emails/_utils/cn.d.ts +2 -0
  26. package/dist/emails/_utils/cn.js +10 -0
  27. package/dist/emails/_utils/cn.js.map +1 -0
  28. package/dist/emails/_utils/comments.d.ts +7 -0
  29. package/dist/emails/_utils/comments.js +29 -0
  30. package/dist/emails/_utils/comments.js.map +1 -0
  31. package/dist/emails/_utils/getProps.d.ts +1 -0
  32. package/dist/emails/_utils/getProps.js +11 -0
  33. package/dist/emails/_utils/getProps.js.map +1 -0
  34. package/dist/rooms/app.controller.d.ts +3 -1
  35. package/dist/rooms/app.controller.js +61 -46
  36. package/dist/rooms/app.controller.js.map +1 -1
  37. package/dist/rooms/emailNotification.service.d.ts +17 -0
  38. package/dist/rooms/emailNotification.service.js +113 -0
  39. package/dist/rooms/emailNotification.service.js.map +1 -0
  40. package/dist/rooms/emails/comment-body.d.ts +44 -0
  41. package/dist/rooms/emails/comment-body.js +138 -0
  42. package/dist/rooms/emails/comment-body.js.map +1 -0
  43. package/dist/rooms/emails/comment-with-body.d.ts +6 -0
  44. package/dist/rooms/emails/comment-with-body.js +17 -0
  45. package/dist/rooms/emails/comment-with-body.js.map +1 -0
  46. package/dist/rooms/emails/index.d.ts +4 -0
  47. package/dist/rooms/emails/index.js +7 -0
  48. package/dist/rooms/emails/index.js.map +1 -0
  49. package/dist/rooms/emails/lib/batch-users-resolver.d.ts +9 -0
  50. package/dist/rooms/emails/lib/batch-users-resolver.js +67 -0
  51. package/dist/rooms/emails/lib/batch-users-resolver.js.map +1 -0
  52. package/dist/rooms/emails/lib/css-properties.d.ts +3 -0
  53. package/dist/rooms/emails/lib/css-properties.js +96 -0
  54. package/dist/rooms/emails/lib/css-properties.js.map +1 -0
  55. package/dist/rooms/emails/lib/warning.d.ts +1 -0
  56. package/dist/rooms/emails/lib/warning.js +20 -0
  57. package/dist/rooms/emails/lib/warning.js.map +1 -0
  58. package/dist/rooms/emails/thread-notification.d.ts +90 -0
  59. package/dist/rooms/emails/thread-notification.js +297 -0
  60. package/dist/rooms/emails/thread-notification.js.map +1 -0
  61. package/dist/rooms/globals/augmentation.d.ts +0 -5
  62. package/dist/rooms/lib/utils.js +21 -10
  63. package/dist/rooms/lib/utils.js.map +1 -1
  64. package/dist/rooms/liveblocks.service.d.ts +16 -0
  65. package/dist/rooms/liveblocks.service.js +54 -0
  66. package/dist/rooms/liveblocks.service.js.map +1 -0
  67. package/dist/rooms/notifications.service.d.ts +4 -0
  68. package/dist/rooms/notifications.service.js +107 -80
  69. package/dist/rooms/notifications.service.js.map +1 -1
  70. package/dist/rooms/rooms.controller.d.ts +6 -4
  71. package/dist/rooms/rooms.controller.js +323 -244
  72. package/dist/rooms/rooms.controller.js.map +1 -1
  73. package/dist/rooms/rooms.gateway.js +132 -109
  74. package/dist/rooms/rooms.gateway.js.map +1 -1
  75. package/dist/rooms/rooms.guard.js +31 -19
  76. package/dist/rooms/rooms.guard.js.map +1 -1
  77. package/dist/rooms/rooms.module.js +12 -3
  78. package/dist/rooms/rooms.module.js.map +1 -1
  79. package/dist/rooms/rooms.moleculer.js +85 -66
  80. package/dist/rooms/rooms.moleculer.js.map +1 -1
  81. package/dist/rooms/rooms.service.d.ts +17 -4
  82. package/dist/rooms/rooms.service.js +408 -340
  83. package/dist/rooms/rooms.service.js.map +1 -1
  84. package/package.json +18 -6
  85. package/src/emails/UnreadMention.tsx +76 -0
  86. package/src/emails/UnreadReplies.tsx +106 -0
  87. package/src/emails/_components/comment.tsx +70 -0
  88. package/src/emails/_components/header.tsx +27 -0
  89. package/src/emails/_components/headline.tsx +20 -0
  90. package/src/emails/_components/layout.tsx +45 -0
  91. package/src/emails/_lib/types.ts +10 -0
  92. package/src/emails/_styles/colors.ts +7 -0
  93. package/src/emails/_utils/cn.ts +6 -0
  94. package/src/emails/_utils/comments.ts +61 -0
  95. package/src/emails/_utils/getProps.ts +7 -0
  96. package/src/rooms/app.controller.ts +7 -2
  97. package/src/rooms/emailNotification.service.tsx +152 -0
  98. package/src/rooms/emails/comment-body.tsx +342 -0
  99. package/src/rooms/emails/comment-with-body.ts +24 -0
  100. package/src/rooms/emails/index.ts +25 -0
  101. package/src/rooms/emails/lib/batch-users-resolver.ts +120 -0
  102. package/src/rooms/emails/lib/css-properties.ts +123 -0
  103. package/src/rooms/emails/lib/warning.ts +25 -0
  104. package/src/rooms/emails/thread-notification.tsx +583 -0
  105. package/src/rooms/globals/augmentation.ts +8 -8
  106. package/src/rooms/liveblocks.service.ts +25 -0
  107. package/src/rooms/notifications.service.ts +22 -10
  108. package/src/rooms/rooms.controller.ts +24 -5
  109. package/src/rooms/rooms.module.ts +11 -2
  110. package/src/rooms/rooms.service.ts +35 -20
  111. package/tsconfig.json +2 -0
  112. package/yarn-error.log +17218 -0
@@ -0,0 +1,9 @@
1
+ import type { CommentEmailAsReactData } from "@liveblocks/emails";
2
+ import type { CompanyInfo, RoomInfo } from "./_lib/types";
3
+ type UnreadMentionEmailProps = {
4
+ company: CompanyInfo;
5
+ room: RoomInfo;
6
+ comment: CommentEmailAsReactData;
7
+ };
8
+ export default function UnreadMentionEmail(props: UnreadMentionEmailProps): any;
9
+ export {};
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const components_1 = require("@react-email/components");
4
+ const getProps_1 = require("./_utils/getProps");
5
+ const layout_1 = require("./_components/layout");
6
+ const header_1 = require("./_components/header");
7
+ const headline_1 = require("./_components/headline");
8
+ const comment_1 = require("./_components/comment");
9
+ const comments_1 = require("./_utils/comments");
10
+ const React = require("react");
11
+ const previewProps = {
12
+ company: {
13
+ name: "Acme Inc.",
14
+ url: "https://liveblocks.io/comments",
15
+ },
16
+ room: {
17
+ name: "User Research Strategy",
18
+ url: "https://liveblocks.io/comments?room_id=project-proposal-q4",
19
+ },
20
+ comment: {
21
+ id: "cm_2",
22
+ threadId: "th_1",
23
+ createdAt: new Date(2024, 2, 4, 4, 6, 47),
24
+ author: {
25
+ id: "emil-joyce@my-liveblocks-app.com",
26
+ info: {
27
+ name: "Emil Joyce",
28
+ color: "#8594F0",
29
+ avatar: "https://liveblocks.io/avatars/avatar-6.png",
30
+ },
31
+ },
32
+ reactBody: (React.createElement(components_1.Text, { className: "text-sm m-0 text-black" },
33
+ React.createElement("span", null,
34
+ "For the user research phase, we'll need",
35
+ " ",
36
+ React.createElement("span", { "data-mention": true, className: "text-email-accent font-medium" }, "@Quinn Elton"),
37
+ " ",
38
+ "to lead the interviews and compile the findings. His expertise in qualitative research will be crucial for this stage."))),
39
+ url: "https://liveblocks.io/comments?room_id=project-proposal-q4#cm_2",
40
+ roomId: "project-proposal-q4",
41
+ },
42
+ };
43
+ function UnreadMentionEmail(props) {
44
+ const { company, room, comment } = (0, getProps_1.getProps)(props, previewProps);
45
+ const previewText = (0, comments_1.getUnreadMentionPreviewText)(comment, room.name);
46
+ const headlineParts = (0, comments_1.getUnreadMentionHeadlineParts)(comment, room.name);
47
+ return (React.createElement(layout_1.Layout, { preview: previewText },
48
+ React.createElement(header_1.Header, Object.assign({}, company)),
49
+ React.createElement(components_1.Section, null,
50
+ React.createElement(headline_1.Headline, { className: "mb-4", parts: headlineParts }),
51
+ React.createElement(comment_1.Comment, Object.assign({}, comment, { isHighlighted: true })))));
52
+ }
53
+ exports.default = UnreadMentionEmail;
54
+ //# sourceMappingURL=UnreadMention.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnreadMention.js","sourceRoot":"","sources":["../../src/emails/UnreadMention.tsx"],"names":[],"mappings":";;AAAA,wDAAwD;AAGxD,gDAA6C;AAG7C,iDAA8C;AAC9C,iDAA8C;AAC9C,qDAAkD;AAClD,mDAAgD;AAChD,gDAG2B;AAC3B,+BAA+B;AAQ/B,MAAM,YAAY,GAA4B;IAC5C,OAAO,EAAE;QACP,IAAI,EAAE,WAAW;QACjB,GAAG,EAAE,gCAAgC;KACtC;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,wBAAwB;QAC9B,GAAG,EAAE,4DAA4D;KAClE;IACD,OAAO,EAAE;QACP,EAAE,EAAE,MAAM;QACV,QAAQ,EAAE,MAAM;QAChB,SAAS,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACzC,MAAM,EAAE;YACN,EAAE,EAAE,kCAAkC;YACtC,IAAI,EAAE;gBACJ,IAAI,EAAE,YAAY;gBAClB,KAAK,EAAE,SAAS;gBAChB,MAAM,EAAE,4CAA4C;aACrD;SACF;QACD,SAAS,EAAE,CACT,oBAAC,iBAAI,IAAC,SAAS,EAAC,wBAAwB;YACtC;;gBAC0C,GAAG;gBAC3C,oDAAmB,SAAS,EAAC,+BAA+B,mBAErD;gBAAC,GAAG;yIAGN,CACF,CACR;QACD,GAAG,EAAE,iEAAiE;QACtE,MAAM,EAAE,qBAAqB;KAC9B;CACF,CAAC;AAEF,SAAwB,kBAAkB,CAAC,KAA8B;IACvE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,IAAA,mBAAQ,EAAC,KAAK,EAAE,YAAY,CAAC,CAAC;IAEjE,MAAM,WAAW,GAAG,IAAA,sCAA2B,EAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpE,MAAM,aAAa,GAAG,IAAA,wCAA6B,EAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAExE,OAAO,CACL,oBAAC,eAAM,IAAC,OAAO,EAAE,WAAW;QAC1B,oBAAC,eAAM,oBAAK,OAAO,EAAI;QACvB,oBAAC,oBAAO;YACN,oBAAC,mBAAQ,IAAC,SAAS,EAAC,MAAM,EAAC,KAAK,EAAE,aAAa,GAAI;YACnD,oBAAC,iBAAO,oBAAK,OAAO,IAAE,aAAa,UAAG,CAC9B,CACH,CACV,CAAC;AACJ,CAAC;AAfD,qCAeC"}
@@ -0,0 +1,9 @@
1
+ import type { CommentEmailAsReactData } from "@liveblocks/emails";
2
+ import type { CompanyInfo, RoomInfo } from "./_lib/types";
3
+ type UnreadRepliesEmailProps = {
4
+ company: CompanyInfo;
5
+ room: RoomInfo;
6
+ comments: CommentEmailAsReactData[];
7
+ };
8
+ declare const UnreadRepliesEmail: (props: UnreadRepliesEmailProps) => React.ReactElement;
9
+ export default UnreadRepliesEmail;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const components_1 = require("@react-email/components");
4
+ const getProps_1 = require("./_utils/getProps");
5
+ const layout_1 = require("./_components/layout");
6
+ const header_1 = require("./_components/header");
7
+ const headline_1 = require("./_components/headline");
8
+ const comment_1 = require("./_components/comment");
9
+ const comments_1 = require("./_utils/comments");
10
+ const React = require("react");
11
+ const previewProps = {
12
+ company: {
13
+ name: "Acme Inc.",
14
+ url: "https://liveblocks.io/comments",
15
+ },
16
+ room: {
17
+ name: "Project Proposal - Q4",
18
+ url: "https://liveblocks.io/comments?room_id=project-proposal-q4",
19
+ },
20
+ comments: [
21
+ {
22
+ id: "cm_0",
23
+ threadId: "th_0",
24
+ createdAt: new Date(2024, 2, 4, 4, 6, 47),
25
+ author: {
26
+ id: "tatum-paolo@example.com",
27
+ info: {
28
+ name: "Tatum Paolo",
29
+ color: "#F0D885",
30
+ avatar: "https://liveblocks.io/avatars/avatar-3.png",
31
+ },
32
+ },
33
+ reactBody: (React.createElement(components_1.Text, { className: "text-sm m-0 text-black" },
34
+ React.createElement("span", null, "I've reviewed this section and think we need a more detailed breakdown of the budget. It might help if we add a few more figures to illustrate the cost distribution over the next six months. Let me know if you'd like me to draft a version for you."))),
35
+ url: "https://liveblocks.io/comments?room_id=project-proposal-q4#cm_0",
36
+ roomId: "project-proposal-q4",
37
+ },
38
+ {
39
+ id: "cm_1",
40
+ threadId: "th_0",
41
+ createdAt: new Date(2024, 2, 4, 5, 12, 35),
42
+ author: {
43
+ id: "anjali-wanda@example.com",
44
+ info: {
45
+ name: "Anjali Wanda",
46
+ color: "#85EED6",
47
+ avatar: "https://liveblocks.io/avatars/avatar-4.png",
48
+ },
49
+ },
50
+ reactBody: (React.createElement(components_1.Text, { className: "text-sm text-black m-0" },
51
+ React.createElement("span", null, "Looks good overall. Just a quick note on the timeline."))),
52
+ url: "https://liveblocks.io/comments?room_id=project-proposal-q4#cm_1",
53
+ roomId: "project-proposal-q4",
54
+ },
55
+ ],
56
+ };
57
+ const UnreadRepliesEmail = (props) => {
58
+ const { company, room, comments } = (0, getProps_1.getProps)(props, previewProps);
59
+ const previewText = (0, comments_1.getUnreadRepliesPreviewText)(comments, room.name);
60
+ const headlineParts = (0, comments_1.getUnreadRepliesHeadlineParts)(comments, room.name);
61
+ return (React.createElement(layout_1.Layout, { preview: previewText },
62
+ React.createElement(header_1.Header, Object.assign({}, company)),
63
+ React.createElement(components_1.Section, null,
64
+ React.createElement(headline_1.Headline, { className: "mb-4", parts: headlineParts }),
65
+ comments.map((comment, index) => (React.createElement(comment_1.Comment, Object.assign({ key: comment.id, className: index > 0 ? "mt-3" : undefined }, comment, { isHighlighted: comments.length === 1 })))))));
66
+ };
67
+ exports.default = UnreadRepliesEmail;
68
+ //# sourceMappingURL=UnreadReplies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnreadReplies.js","sourceRoot":"","sources":["../../src/emails/UnreadReplies.tsx"],"names":[],"mappings":";;AAAA,wDAAwD;AAIxD,gDAA6C;AAC7C,iDAA8C;AAC9C,iDAA8C;AAC9C,qDAAkD;AAClD,mDAAgD;AAChD,gDAG2B;AAO3B,+BAA+B;AAE/B,MAAM,YAAY,GAA4B;IAC5C,OAAO,EAAE;QACP,IAAI,EAAE,WAAW;QACjB,GAAG,EAAE,gCAAgC;KACtC;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,uBAAuB;QAC7B,GAAG,EAAE,4DAA4D;KAClE;IACD,QAAQ,EAAE;QACR;YACE,EAAE,EAAE,MAAM;YACV,QAAQ,EAAE,MAAM;YAChB,SAAS,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACzC,MAAM,EAAE;gBACN,EAAE,EAAE,yBAAyB;gBAC7B,IAAI,EAAE;oBACJ,IAAI,EAAE,aAAa;oBACnB,KAAK,EAAE,SAAS;oBAChB,MAAM,EAAE,4CAA4C;iBACrD;aACF;YACD,SAAS,EAAE,CACT,oBAAC,iBAAI,IAAC,SAAS,EAAC,wBAAwB;gBACtC,4RAKO,CACF,CACR;YACD,GAAG,EAAE,iEAAiE;YACtE,MAAM,EAAE,qBAAqB;SAC9B;QACD;YACE,EAAE,E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E,QAAQ,CAAC,MAAM,KAAK,CAAC,IACpC,CACH,CAAC,CACM,CACH,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,kBAAkB,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function Comment({ id, author, createdAt, reactBody, url, isHighlighted, className, }: any): any;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Comment = void 0;
4
+ const components_1 = require("@react-email/components");
5
+ const cn_1 = require("../_utils/cn");
6
+ const React = require("react");
7
+ function Comment({ id, author, createdAt, reactBody, url, isHighlighted, className, }) {
8
+ const creationDate = createdAt
9
+ .toLocaleString("en-US", {
10
+ year: "numeric",
11
+ month: "short",
12
+ day: "numeric",
13
+ hour: "numeric",
14
+ minute: "2-digit",
15
+ hour12: true,
16
+ })
17
+ .replace(",", "");
18
+ return (React.createElement(components_1.Section, { key: id, className: (0, cn_1.cn)("rounded-md py-4 pl-4 pr-8", className), style: { border: "solid 1px rgba(23, 23, 23, 0.10)" } },
19
+ React.createElement(components_1.Row, null,
20
+ React.createElement(components_1.Column, { className: "w-10" },
21
+ React.createElement(components_1.Img, { className: "rounded-full bg-black/5", width: 28, height: 28, src: author.info.avatar })),
22
+ React.createElement(components_1.Column, { className: "text-black" },
23
+ React.createElement("span", { className: "text-sm font-medium" }, author.info.name),
24
+ React.createElement("span", { className: "ml-1.5 opacity-60 text-xs" }, creationDate))),
25
+ React.createElement(components_1.Row, null,
26
+ React.createElement(components_1.Column, { className: "w-10" }),
27
+ React.createElement(components_1.Column, null,
28
+ reactBody,
29
+ React.createElement(components_1.Button, { className: (0, cn_1.cn)("rounded px-3.5 py-2 text-sm font-medium w-max mt-4", isHighlighted ? "bg-black text-white" : "bg-black/5 text-black"), href: url }, "View comment")))));
30
+ }
31
+ exports.Comment = Comment;
32
+ //# sourceMappingURL=comment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comment.js","sourceRoot":"","sources":["../../../src/emails/_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C,uBAAuB,CAChE,EACD,IAAI,EAAE,GAAG,mBAGF,CACF,CACL,CACE,CACX,CAAC;AACJ,CAAC;AA3DD,0BA2DC"}
@@ -0,0 +1,2 @@
1
+ import { CompanyInfo } from "../_lib/types";
2
+ export declare function Header(company: CompanyInfo): any;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Header = void 0;
4
+ const components_1 = require("@react-email/components");
5
+ const React = require("react");
6
+ function Header(company) {
7
+ return (React.createElement(components_1.Row, { className: "mb-10" },
8
+ React.createElement(components_1.Column, { className: "w-10" },
9
+ React.createElement(components_1.Link, { href: company.url, target: "_blank" },
10
+ React.createElement(components_1.Img, { src: company.logoUrl, alt: "Company logo", className: "rounded-md", width: 28, height: 28 }))),
11
+ React.createElement(components_1.Column, null,
12
+ React.createElement(components_1.Heading, { as: "h1", className: "m-0 text-lg text-black" }, company.name))));
13
+ }
14
+ exports.Header = Header;
15
+ //# sourceMappingURL=header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header.js","sourceRoot":"","sources":["../../../src/emails/_components/header.tsx"],"names":[],"mappings":";;;AAAA,wDAA0E;AAE1E,+BAA+B;AAE/B,SAAgB,MAAM,CAAC,OAAoB;IACzC,OAAO,CACL,oBAAC,gBAAG,IAAC,SAAS,EAAC,OAAO;QACpB,oBAAC,mBAAM,IAAC,SAAS,EAAC,MAAM;YACtB,oBAAC,iBAAI,IAAC,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,MAAM,EAAC,QAAQ;gBAEtC,oBAAC,gBAAG,IACF,GAAG,EAAE,OAAO,CAAC,OAAO,EACpB,GAAG,EAAC,cAAc,EAClB,SAAS,EAAC,YAAY,EACtB,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,GACV,CACG,CACA;QACT,oBAAC,mBAAM;YACL,oBAAC,oBAAO,IAAC,EAAE,EAAC,IAAI,EAAC,SAAS,EAAC,wBAAwB,IAChD,OAAO,CAAC,IAAI,CACL,CACH,CACL,CACP,CAAC;AACJ,CAAC;AAtBD,wBAsBC"}
@@ -0,0 +1,5 @@
1
+ import type { HeadlineParts } from "../_utils/comments";
2
+ export declare function Headline({ parts, className, }: {
3
+ parts: HeadlineParts;
4
+ className?: string;
5
+ }): any;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Headline = void 0;
4
+ const components_1 = require("@react-email/components");
5
+ const cn_1 = require("../_utils/cn");
6
+ const React = require("react");
7
+ function Headline({ parts, className, }) {
8
+ const [start, middle, end] = parts;
9
+ return (React.createElement(components_1.Text, { className: (0, cn_1.cn)("text-sm text-black font-medium m-0", className) },
10
+ start,
11
+ " ",
12
+ React.createElement("span", { className: "font-normal" }, middle),
13
+ " ",
14
+ end));
15
+ }
16
+ exports.Headline = Headline;
17
+ //# sourceMappingURL=headline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"headline.js","sourceRoot":"","sources":["../../../src/emails/_components/headline.tsx"],"names":[],"mappings":";;;AAAA,wDAA+C;AAC/C,qCAAkC;AAElC,+BAA+B;AAE/B,SAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,SAAS,GAIV;IACC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC;IAEnC,OAAO,CACL,oBAAC,iBAAI,IAAC,SAAS,EAAE,IAAA,OAAE,EAAC,oCAAoC,EAAE,SAAS,CAAC;QACjE,KAAK;;QAAE,8BAAM,SAAS,EAAC,aAAa,IAAE,MAAM,CAAQ;;QAAE,GAAG,CACrD,CACR,CAAC;AACJ,CAAC;AAdD,4BAcC"}
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ export declare function Layout({ preview, children, }: {
3
+ preview: string;
4
+ children?: React.ReactNode;
5
+ }): any;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Layout = void 0;
4
+ const components_1 = require("@react-email/components");
5
+ const colors_1 = require("../_styles/colors");
6
+ const React = require("react");
7
+ function Layout({ preview, children, }) {
8
+ return (React.createElement(components_1.Html, { lang: "en" },
9
+ React.createElement(components_1.Head, null),
10
+ React.createElement(components_1.Preview, null, preview),
11
+ React.createElement(components_1.Tailwind, { config: {
12
+ theme: {
13
+ extend: {
14
+ colors: {
15
+ email: Object.assign({}, colors_1.emailColors),
16
+ },
17
+ },
18
+ },
19
+ } },
20
+ React.createElement(components_1.Body, { className: "bg-white my-auto mx-auto font-sans antialiased px-5" },
21
+ React.createElement(components_1.Container, { className: "py-8" }, children)))));
22
+ }
23
+ exports.Layout = Layout;
24
+ //# sourceMappingURL=layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/emails/_components/layout.tsx"],"names":[],"mappings":";;;AAAA,wDAOiC;AACjC,8CAAgD;AAChD,+BAA+B;AAE/B,SAAgB,MAAM,CAAC,EACrB,OAAO,EACP,QAAQ,GAIT;IACC,OAAO,CACL,oBAAC,iBAAI,IAAC,IAAI,EAAC,IAAI;QACb,oBAAC,iBAAI,OAAG;QACR,oBAAC,oBAAO,QAAE,OAAO,CAAW;QAM5B,oBAAC,qBAAQ,IACP,MAAM,EAAE;gBACN,KAAK,EAAE;oBACL,MAAM,EAAE;wBACN,MAAM,EAAE;4BACN,KAAK,oBAAO,oBAAW,CAAE;yBAC1B;qBACF;iBACF;aACF;YAED,oBAAC,iBAAI,IAAC,SAAS,EAAC,qDAAqD;gBACnE,oBAAC,sBAAS,IAAC,SAAS,EAAC,MAAM,IAAE,QAAQ,CAAa,CAC7C,CACE,CACN,CACR,CAAC;AACJ,CAAC;AAjCD,wBAiCC"}
@@ -0,0 +1,9 @@
1
+ export type RoomInfo = {
2
+ name?: string;
3
+ url?: string;
4
+ };
5
+ export type CompanyInfo = {
6
+ name: string;
7
+ url: string;
8
+ logoUrl?: string;
9
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/emails/_lib/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import type { RecursiveKeyValuePair } from "tailwindcss/types/config";
2
+ export declare const emailColors: RecursiveKeyValuePair;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.emailColors = void 0;
4
+ exports.emailColors = {
5
+ accent: "#1667FF",
6
+ };
7
+ //# sourceMappingURL=colors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.js","sourceRoot":"","sources":["../../../src/emails/_styles/colors.ts"],"names":[],"mappings":";;;AAIa,QAAA,WAAW,GAA0B;IAChD,MAAM,EAAE,SAAS;CAClB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { type ClassValue } from "clsx";
2
+ export declare function cn(...inputs: ClassValue[]): string;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cn = void 0;
4
+ const clsx_1 = require("clsx");
5
+ const tailwind_merge_1 = require("tailwind-merge");
6
+ function cn(...inputs) {
7
+ return (0, tailwind_merge_1.twMerge)((0, clsx_1.clsx)(inputs));
8
+ }
9
+ exports.cn = cn;
10
+ //# sourceMappingURL=cn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cn.js","sourceRoot":"","sources":["../../../src/emails/_utils/cn.ts"],"names":[],"mappings":";;;AAAA,+BAA6C;AAC7C,mDAAyC;AAEzC,SAAgB,EAAE,CAAC,GAAG,MAAoB;IACxC,OAAO,IAAA,wBAAO,EAAC,IAAA,WAAI,EAAC,MAAM,CAAC,CAAC,CAAC;AAC/B,CAAC;AAFD,gBAEC"}
@@ -0,0 +1,7 @@
1
+ import type { CommentEmailAsReactData } from "@liveblocks/emails";
2
+ import { RoomInfo } from "../_lib/types";
3
+ export type HeadlineParts = [string, string, string];
4
+ export declare const getUnreadMentionPreviewText: (comment: CommentEmailAsReactData, roomName: RoomInfo["name"]) => string;
5
+ export declare const getUnreadMentionHeadlineParts: (comment: CommentEmailAsReactData, roomName: RoomInfo["name"]) => HeadlineParts;
6
+ export declare const getUnreadRepliesPreviewText: (comments: CommentEmailAsReactData[], roomName: RoomInfo["name"]) => string;
7
+ export declare const getUnreadRepliesHeadlineParts: (comments: CommentEmailAsReactData[], roomName: RoomInfo["name"]) => HeadlineParts;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getUnreadRepliesHeadlineParts = exports.getUnreadRepliesPreviewText = exports.getUnreadMentionHeadlineParts = exports.getUnreadMentionPreviewText = void 0;
4
+ const UNKNOWN_ROOM = "Unknown room";
5
+ const getDisplayName = (author) => author.info.name;
6
+ const getRoomName = (roomName) => roomName !== null && roomName !== void 0 ? roomName : UNKNOWN_ROOM;
7
+ const createMentionPreview = (authorName, roomName) => `${authorName} mentioned you in ${roomName}`;
8
+ const createRepliesPreview = (commentCount, authorName, roomName) => commentCount === 1
9
+ ? `${authorName} left a comment in ${roomName}`
10
+ : `${commentCount} new comments in ${roomName}`;
11
+ const getUnreadMentionPreviewText = (comment, roomName) => createMentionPreview(getDisplayName(comment.author), getRoomName(roomName));
12
+ exports.getUnreadMentionPreviewText = getUnreadMentionPreviewText;
13
+ const getUnreadMentionHeadlineParts = (comment, roomName) => [
14
+ getDisplayName(comment.author),
15
+ "mentioned you in",
16
+ getRoomName(roomName),
17
+ ];
18
+ exports.getUnreadMentionHeadlineParts = getUnreadMentionHeadlineParts;
19
+ const getUnreadRepliesPreviewText = (comments, roomName) => createRepliesPreview(comments.length, getDisplayName(comments[0].author), getRoomName(roomName));
20
+ exports.getUnreadRepliesPreviewText = getUnreadRepliesPreviewText;
21
+ const getUnreadRepliesHeadlineParts = (comments, roomName) => {
22
+ const commentCount = comments.length;
23
+ const displayRoomName = getRoomName(roomName);
24
+ return commentCount === 1
25
+ ? [getDisplayName(comments[0].author), "left a comment in", displayRoomName]
26
+ : [`${commentCount} new comments`, "in", displayRoomName];
27
+ };
28
+ exports.getUnreadRepliesHeadlineParts = getUnreadRepliesHeadlineParts;
29
+ //# sourceMappingURL=comments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comments.js","sourceRoot":"","sources":["../../../src/emails/_utils/comments.ts"],"names":[],"mappings":";;;AAGA,MAAM,YAAY,GAAG,cAAuB,CAAC;AAI7C,MAAM,cAAc,GAAG,CAAC,MAAyC,EAAU,EAAE,CAC3E,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;AAEnB,MAAM,WAAW,GAAG,CAAC,QAA0B,EAAU,EAAE,CACzD,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,YAAY,CAAC;AAE3B,MAAM,oBAAoB,GAAG,CAAC,UAAkB,EAAE,QAAgB,EAAU,EAAE,CAC5E,GAAG,UAAU,qBAAqB,QAAQ,EAAE,CAAC;AAE/C,MAAM,oBAAoB,GAAG,CAC3B,YAAoB,EACpB,UAAkB,EAClB,QAAgB,EACR,EAAE,CACV,YAAY,KAAK,CAAC;IAChB,CAAC,CAAC,GAAG,UAAU,sBAAsB,QAAQ,EAAE;IAC/C,CAAC,CAAC,GAAG,YAAY,oBAAoB,QAAQ,EAAE,CAAC;AAE7C,MAAM,2BAA2B,GAAG,CACzC,OAAgC,EAChC,QAA0B,EAClB,EAAE,CACV,oBAAoB,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;AAJjE,QAAA,2BAA2B,+BAIsC;AAEvE,MAAM,6BAA6B,GAAG,CAC3C,OAAgC,EAChC,QAA0B,EACX,EAAE,CAAC;IAClB,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC;IAC9B,kBAAkB;IAClB,WAAW,CAAC,QAAQ,CAAC;CACtB,CAAC;AAPW,QAAA,6BAA6B,iCAOxC;AAEK,MAAM,2BAA2B,GAAG,CACzC,QAAmC,EACnC,QAA0B,EAClB,EAAE,CACV,oBAAoB,CAClB,QAAQ,CAAC,MAAM,EACf,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAClC,WAAW,CAAC,QAAQ,CAAC,CACtB,CAAC;AARS,QAAA,2BAA2B,+BAQpC;AAEG,MAAM,6BAA6B,GAAG,CAC3C,QAAmC,EACnC,QAA0B,EACX,EAAE;IACjB,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAC;IACrC,MAAM,eAAe,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IAE9C,OAAO,YAAY,KAAK,CAAC;QACvB,CAAC,CAAC,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,mBAAmB,EAAE,eAAe,CAAC;QAC5E,CAAC,CAAC,CAAC,GAAG,YAAY,eAAe,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;AAC9D,CAAC,CAAC;AAVW,QAAA,6BAA6B,iCAUxC"}
@@ -0,0 +1 @@
1
+ export declare const getProps: <P>(external: P, preview: P) => P;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getProps = void 0;
4
+ const getProps = (external, preview) => {
5
+ if (!external || Object.keys(external).length <= 0) {
6
+ return preview;
7
+ }
8
+ return external;
9
+ };
10
+ exports.getProps = getProps;
11
+ //# sourceMappingURL=getProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getProps.js","sourceRoot":"","sources":["../../../src/emails/_utils/getProps.ts"],"names":[],"mappings":";;;AAAO,MAAM,QAAQ,GAAG,CAAI,QAAW,EAAE,OAAU,EAAK,EAAE;IACxD,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,IAAI,CAAC,EAAE;QAClD,OAAO,OAAO,CAAC;KAChB;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AANW,QAAA,QAAQ,YAMnB"}
@@ -1,8 +1,10 @@
1
1
  import { Response } from 'express';
2
+ import { ConfigService } from '@nestjs/config';
2
3
  import { PagesService } from '@builder6/pages';
3
4
  export declare class RoomsAppController {
4
5
  private readonly pagesService;
5
- constructor(pagesService: PagesService);
6
+ private configService;
7
+ constructor(pagesService: PagesService, configService: ConfigService);
6
8
  getRooms(roomId: string, query: Record<string, any>, req: Request, res: Response): Promise<{
7
9
  error: string;
8
10
  details: any;
@@ -11,59 +11,73 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  var __param = (this && this.__param) || function (paramIndex, decorator) {
12
12
  return function (target, key) { decorator(target, key, paramIndex); }
13
13
  };
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
14
23
  Object.defineProperty(exports, "__esModule", { value: true });
15
24
  exports.RoomsAppController = void 0;
16
25
  const common_1 = require("@nestjs/common");
26
+ const config_1 = require("@nestjs/config");
17
27
  const core_1 = require("@builder6/core");
18
28
  const pages_1 = require("@builder6/pages");
19
29
  let RoomsAppController = class RoomsAppController {
20
- constructor(pagesService) {
30
+ constructor(pagesService, configService) {
21
31
  this.pagesService = pagesService;
32
+ this.configService = configService;
22
33
  }
23
- async getRooms(roomId = 'test', query, req, res) {
24
- const user = req['user'];
25
- try {
26
- const schema = {
27
- type: 'page',
28
- toolbar: [
29
- {
30
- type: 'rooms-provider',
31
- baseUrl: '',
32
- body: [
33
- {
34
- type: 'rooms-inbox-popover',
35
- className: 'flex flex-col m-3 gap-3',
36
- },
37
- ],
38
- },
39
- ],
40
- body: [
41
- {
42
- type: 'rooms-provider',
43
- baseUrl: '',
44
- body: [
45
- {
46
- type: 'rooms-comments',
47
- className: 'flex flex-col m-3 gap-3',
48
- roomId: `${roomId}`,
49
- },
50
- ],
51
- },
52
- ],
53
- };
54
- const data = {};
55
- const env = {
56
- assetUrls: [
57
- 'https://unpkg.com/@steedos-widgets/liveblocks@6.3.12-beta.4/dist/assets.json',
58
- ],
59
- };
60
- const rendered = await this.pagesService.renderAmis(schema, data, env, user);
61
- res.status(200).send(rendered);
62
- }
63
- catch (error) {
64
- console.log(error);
65
- return { error: 'Rooms rendering failed', details: error.message };
66
- }
34
+ getRooms(roomId = 'test', query, req, res) {
35
+ return __awaiter(this, void 0, void 0, function* () {
36
+ const user = req['user'];
37
+ const unpkgUrl = this.configService.get('unpkg.url');
38
+ try {
39
+ const schema = {
40
+ type: 'page',
41
+ toolbar: [
42
+ {
43
+ type: 'rooms-provider',
44
+ baseUrl: '',
45
+ body: [
46
+ {
47
+ type: 'rooms-inbox-popover',
48
+ className: 'flex flex-col m-3 gap-3',
49
+ },
50
+ ],
51
+ },
52
+ ],
53
+ body: [
54
+ {
55
+ type: 'rooms-provider',
56
+ baseUrl: '',
57
+ body: [
58
+ {
59
+ type: 'rooms-comments',
60
+ className: 'flex flex-col m-3 gap-3',
61
+ roomId: `${roomId}`,
62
+ },
63
+ ],
64
+ },
65
+ ],
66
+ };
67
+ const data = {};
68
+ const env = {
69
+ assetUrls: [
70
+ `${unpkgUrl}/@steedos-widgets/liveblocks@6.3.12-beta.4/dist/assets.json`,
71
+ ],
72
+ };
73
+ const rendered = yield this.pagesService.renderAmis(schema, data, env, user);
74
+ res.status(200).send(rendered);
75
+ }
76
+ catch (error) {
77
+ console.log(error);
78
+ return { error: 'Rooms rendering failed', details: error.message };
79
+ }
80
+ });
67
81
  }
68
82
  };
69
83
  __decorate([
@@ -79,7 +93,8 @@ __decorate([
79
93
  RoomsAppController = __decorate([
80
94
  (0, common_1.Controller)('b6/rooms/'),
81
95
  (0, common_1.UseGuards)(core_1.AuthGuard),
82
- __metadata("design:paramtypes", [pages_1.PagesService])
96
+ __metadata("design:paramtypes", [pages_1.PagesService,
97
+ config_1.ConfigService])
83
98
  ], RoomsAppController);
84
99
  exports.RoomsAppController = RoomsAppController;
85
100
  //# sourceMappingURL=app.controller.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../../src/rooms/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAQwB;AAExB,yCAA2C;AAC3C,2CAA+C;AAKxC,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,YAA6B,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAAG,CAAC;IAGrD,AAAN,KAAK,CAAC,QAAQ,CACK,SAAiB,MAAM,EAC/B,KAA0B,EAC5B,GAAY,EACZ,GAAa;QAEpB,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;QACzB,IAAI;YACF,MAAM,MAAM,GAAG;gBACb,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,gBAAgB;wBACtB,OAAO,EAAE,EAAE;wBACX,IAAI,EAAE;4BACJ;gCACE,IAAI,EAAE,qBAAqB;gCAC3B,SAAS,EAAE,yBAAyB;6BACrC;yBACF;qBACF;iBACF;gBACD,IAAI,EAAE;oBACJ;wBACE,IAAI,EAAE,gBAAgB;wBACtB,OAAO,EAAE,EAAE;wBACX,IAAI,EAAE;4BACJ;gCACE,IAAI,EAAE,gBAAgB;gCACtB,SAAS,EAAE,yBAAyB;gCACpC,MAAM,EAAE,GAAG,MAAM,EAAE;6BACpB;yBACF;qBACF;iBACF;aACF,CAAC;YACF,MAAM,IAAI,GAAG,EAAE,C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IAAA,cAAK,GAAE,CAAA;IACP,WAAA,IAAA,YAAG,GAAE,CAAA;IACL,WAAA,IAAA,YAAG,GAAE,CAAA;;qDADM,OAAO;;kDAoDpB;AA9DU,kBAAkB;IAF9B,IAAA,mBAAU,EAAC,WAAW,CAAC;IACvB,IAAA,kBAAS,EAAC,gBAAS,CAAC;qCAGc,oBAAY;QACpB,sBAAa;GAH3B,kBAAkB,CA+D9B;AA/DY,gDAAkB"}
@@ -0,0 +1,17 @@
1
+ import { ConfigService } from '@nestjs/config';
2
+ import { EmailService } from '@builder6/email';
3
+ import { RoomsService } from './rooms.service';
4
+ export declare class EmailNotificationService {
5
+ private roomsService;
6
+ private configService;
7
+ private emailService;
8
+ private readonly logger;
9
+ constructor(roomsService: RoomsService, configService: ConfigService, emailService: EmailService);
10
+ sendThreadNotificationEmail({ roomId, threadId, userId, fromUserId, inboxNotificationId, }: {
11
+ roomId: string;
12
+ threadId: string;
13
+ userId: string;
14
+ fromUserId?: string;
15
+ inboxNotificationId: string;
16
+ }): Promise<string>;
17
+ }