@company-semantics/contracts 27.13.1 → 27.14.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.
- package/package.json +1 -1
- package/src/email/render/__tests__/__snapshots__/render-snapshot.test.ts.snap +155 -146
- package/src/email/render/auth-otp.ts +8 -9
- package/src/email/render/blocks.ts +115 -97
- package/src/email/render/chat-shared.ts +8 -23
- package/src/email/render/company-md-access-approved.ts +2 -2
- package/src/email/render/company-md-access-denied.ts +6 -11
- package/src/email/render/company-md-access-requested.ts +8 -13
- package/src/email/render/constants.ts +0 -6
- package/src/email/render/index.ts +5 -13
- package/src/email/render/org-invite.ts +11 -11
- package/src/email/render/ownership-transfer.ts +2 -2
- package/src/email/render/share-granted.ts +8 -13
- package/src/email/render/unit-owner-granted.ts +8 -13
|
@@ -8,15 +8,15 @@ import { baseTextLayout } from "./base-text";
|
|
|
8
8
|
import {
|
|
9
9
|
ACCESS_PHRASE,
|
|
10
10
|
asciiCtaBox,
|
|
11
|
-
|
|
11
|
+
paragraph,
|
|
12
12
|
ctaBox,
|
|
13
13
|
footer,
|
|
14
14
|
greeting,
|
|
15
15
|
htmlShell,
|
|
16
16
|
NOTICE,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
chatUserBubble,
|
|
18
|
+
chatUserBoxText,
|
|
19
|
+
signature,
|
|
20
20
|
} from "./blocks";
|
|
21
21
|
import { COMPANY_NAME } from "./constants";
|
|
22
22
|
import { escapeHtml } from "./escape-html";
|
|
@@ -42,7 +42,7 @@ export function renderShareGrantedBody(payload: ShareGrantedPayload): string {
|
|
|
42
42
|
|
|
43
43
|
if (message) {
|
|
44
44
|
sections.push("");
|
|
45
|
-
sections.push(
|
|
45
|
+
sections.push(chatUserBoxText(message, `Message from ${granterName}`));
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
sections.push("");
|
|
@@ -73,15 +73,10 @@ export function renderShareGrantedHtml(payload: ShareGrantedPayload): string {
|
|
|
73
73
|
|
|
74
74
|
return htmlShell([
|
|
75
75
|
greeting(recipientName),
|
|
76
|
-
|
|
76
|
+
paragraph(
|
|
77
77
|
`<b>${escapeHtml(granterName)}</b> shared ${entityHtml} with you — you ${ACCESS_PHRASE[accessLevel]}.`,
|
|
78
78
|
),
|
|
79
|
-
message
|
|
80
|
-
? quoteBlock(
|
|
81
|
-
`Message from ${escapeHtml(granterName)}:`,
|
|
82
|
-
escapeHtml(message),
|
|
83
|
-
)
|
|
84
|
-
: "",
|
|
79
|
+
message ? chatUserBubble(message, `Message from ${granterName}`) : "",
|
|
85
80
|
ctaBox({
|
|
86
81
|
label: "OPEN",
|
|
87
82
|
href: ctaUrl,
|
|
@@ -90,6 +85,6 @@ export function renderShareGrantedHtml(payload: ShareGrantedPayload): string {
|
|
|
90
85
|
maxWidth: "220px",
|
|
91
86
|
}),
|
|
92
87
|
footer(`This notification was sent via ${COMPANY_NAME}.`, NOTICE),
|
|
93
|
-
|
|
88
|
+
signature(),
|
|
94
89
|
]);
|
|
95
90
|
}
|
|
@@ -7,15 +7,15 @@ import type { EmailPayloads } from "../types";
|
|
|
7
7
|
import { baseTextLayout } from "./base-text";
|
|
8
8
|
import {
|
|
9
9
|
asciiCtaBox,
|
|
10
|
-
|
|
10
|
+
paragraph,
|
|
11
11
|
ctaBox,
|
|
12
12
|
footer,
|
|
13
13
|
greeting,
|
|
14
14
|
htmlShell,
|
|
15
15
|
NOTICE,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
chatUserBubble,
|
|
17
|
+
chatUserBoxText,
|
|
18
|
+
signature,
|
|
19
19
|
} from "./blocks";
|
|
20
20
|
import { COMPANY_NAME } from "./constants";
|
|
21
21
|
import { escapeHtml } from "./escape-html";
|
|
@@ -35,7 +35,7 @@ export function renderUnitOwnerGrantedBody(
|
|
|
35
35
|
|
|
36
36
|
if (message) {
|
|
37
37
|
sections.push("");
|
|
38
|
-
sections.push(
|
|
38
|
+
sections.push(chatUserBoxText(message, `Message from ${granterName}`));
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
sections.push("");
|
|
@@ -57,15 +57,10 @@ export function renderUnitOwnerGrantedHtml(
|
|
|
57
57
|
|
|
58
58
|
return htmlShell([
|
|
59
59
|
greeting(recipientName),
|
|
60
|
-
|
|
60
|
+
paragraph(
|
|
61
61
|
`<b>${escapeHtml(granterName)}</b> added you as a <b>${escapeHtml(roleLabel)}</b> of <b>${escapeHtml(unitName)}</b>.`,
|
|
62
62
|
),
|
|
63
|
-
message
|
|
64
|
-
? quoteBlock(
|
|
65
|
-
`Message from ${escapeHtml(granterName)}:`,
|
|
66
|
-
escapeHtml(message),
|
|
67
|
-
)
|
|
68
|
-
: "",
|
|
63
|
+
message ? chatUserBubble(message, `Message from ${granterName}`) : "",
|
|
69
64
|
ctaBox({
|
|
70
65
|
label: "VIEW TEAM",
|
|
71
66
|
href: ctaUrl,
|
|
@@ -74,6 +69,6 @@ export function renderUnitOwnerGrantedHtml(
|
|
|
74
69
|
maxWidth: "220px",
|
|
75
70
|
}),
|
|
76
71
|
footer(`This notification was sent via ${COMPANY_NAME}.`, NOTICE),
|
|
77
|
-
|
|
72
|
+
signature(),
|
|
78
73
|
]);
|
|
79
74
|
}
|