@aglyn/tenant-data-admin 1.0.0-beta.264 → 1.0.0-beta.266
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 +7 -7
- package/src/lib/server/host-console-link.d.ts +25 -0
- package/src/lib/server/host-console-link.js +47 -0
- package/src/lib/server/host-console-link.js.map +1 -0
- package/src/lib/server/host-email-tokens.js +25 -2
- package/src/lib/server/host-email-tokens.js.map +1 -1
- package/src/lib/server/mobile-push-switch.d.ts +2 -0
- package/src/lib/server/mobile-push-switch.js.map +1 -1
- package/src/lib/server/notifications.d.ts +10 -4
- package/src/lib/server/notifications.js +34 -9
- package/src/lib/server/notifications.js.map +1 -1
- package/src/lib/server/operator-alerts.d.ts +11 -0
- package/src/lib/server/operator-alerts.js +29 -7
- package/src/lib/server/operator-alerts.js.map +1 -1
- package/src/lib/server/org-member-notice.d.ts +10 -0
- package/src/lib/server/org-member-notice.js +6 -1
- package/src/lib/server/org-member-notice.js.map +1 -1
- package/src/lib/server/push-apns.d.ts +7 -2
- package/src/lib/server/push-apns.js +8 -4
- package/src/lib/server/push-apns.js.map +1 -1
- package/src/lib/server/push-delivery.d.ts +5 -0
- package/src/lib/server/push-delivery.js +9 -4
- package/src/lib/server/push-delivery.js.map +1 -1
- package/src/lib/server/push-fcm.d.ts +8 -1
- package/src/lib/server/push-fcm.js +11 -3
- package/src/lib/server/push-fcm.js.map +1 -1
- package/src/lib/server/render-system-email.js +7 -1
- package/src/lib/server/render-system-email.js.map +1 -1
- package/src/lib/server/risk-notice.js +23 -1
- package/src/lib/server/risk-notice.js.map +1 -1
- package/src/lib/server/staff-alert-email.d.ts +10 -0
- package/src/lib/server/staff-alert-email.js +10 -3
- package/src/lib/server/staff-alert-email.js.map +1 -1
|
@@ -726,6 +726,10 @@ function isAlreadyExists(error) {
|
|
|
726
726
|
const code = error == null ? void 0 : error.code;
|
|
727
727
|
return code === 6 || code === 'already-exists' || code === 'ALREADY_EXISTS';
|
|
728
728
|
}
|
|
729
|
+
/** What a notice email shows above its title: whose it is, under the safety team's name. */ function riskNoticeEyebrow(workspaceName) {
|
|
730
|
+
const name = String(workspaceName != null ? workspaceName : '').trim();
|
|
731
|
+
return name ? `${name} · Account safety` : 'Account safety';
|
|
732
|
+
}
|
|
729
733
|
/** The flat merge map a notice email renders with. */ function emailMerge(input) {
|
|
730
734
|
var _links_find, _ref, _ref1, _input_workspaceName, _input_lockMessage, _input_reference;
|
|
731
735
|
const links = input.actions.flatMap((action)=>{
|
|
@@ -748,6 +752,14 @@ function isAlreadyExists(error) {
|
|
|
748
752
|
'notice.actions': links.map((link)=>`${link.label}: ${link.url}`).join('\n'),
|
|
749
753
|
'notice.primaryActionLabel': (_ref = primary == null ? void 0 : primary.label) != null ? _ref : '',
|
|
750
754
|
'notice.primaryActionUrl': (_ref1 = primary == null ? void 0 : primary.url) != null ? _ref1 : '',
|
|
755
|
+
// The rest of the actions, as links under the button.
|
|
756
|
+
'notice.otherActions': links.filter((link)=>link !== primary).map((link)=>`${link.label}: ${link.url}`).join('\n'),
|
|
757
|
+
'notice.eyebrow': riskNoticeEyebrow(input.workspaceName),
|
|
758
|
+
'notice.details': [
|
|
759
|
+
input.workspaceName ? `Workspace: ${input.workspaceName}` : '',
|
|
760
|
+
input.reference ? `Reference: ${input.reference}` : '',
|
|
761
|
+
input.lockMessage ? `Message from our team: ${input.lockMessage}` : ''
|
|
762
|
+
].filter(Boolean).join('\n'),
|
|
751
763
|
'workspace.name': (_input_workspaceName = input.workspaceName) != null ? _input_workspaceName : '',
|
|
752
764
|
'lock.message': (_input_lockMessage = input.lockMessage) != null ? _input_lockMessage : '',
|
|
753
765
|
reference: (_input_reference = input.reference) != null ? _input_reference : '',
|
|
@@ -921,7 +933,10 @@ function isAlreadyExists(error) {
|
|
|
921
933
|
'holds.url': holdsPath ? absolute(holdsPath) : '',
|
|
922
934
|
'help.url': riskNoticeHelpUrl(),
|
|
923
935
|
reference: '',
|
|
924
|
-
'workspace.name': (_context_orgName1 = context.orgName) != null ? _context_orgName1 : ''
|
|
936
|
+
'workspace.name': (_context_orgName1 = context.orgName) != null ? _context_orgName1 : '',
|
|
937
|
+
'notice.eyebrow': riskNoticeEyebrow(context.orgName),
|
|
938
|
+
'notice.otherActions': '',
|
|
939
|
+
'notice.details': context.orgName ? `Workspace: ${context.orgName}` : ''
|
|
925
940
|
});
|
|
926
941
|
await emailPeople(deps, recipients, rendered, (_abuseReportContactEmail = abuseReportContactEmail('support')) != null ? _abuseReportContactEmail : '');
|
|
927
942
|
}
|
|
@@ -1116,6 +1131,13 @@ function isAlreadyExists(error) {
|
|
|
1116
1131
|
'notice.primaryActionUrl': holdsUrl,
|
|
1117
1132
|
'holds.url': holdsUrl,
|
|
1118
1133
|
'workspace.name': orgName != null ? orgName : '',
|
|
1134
|
+
'notice.eyebrow': riskNoticeEyebrow(orgName),
|
|
1135
|
+
'notice.details': [
|
|
1136
|
+
orgName ? `Workspace: ${orgName}` : '',
|
|
1137
|
+
`Item: ${itemLabel != null ? itemLabel : 'The held or flagged item'}`,
|
|
1138
|
+
outcome.reference ? `Reference: ${outcome.reference}` : '',
|
|
1139
|
+
'Status: Waiting for review'
|
|
1140
|
+
].filter(Boolean).join('\n'),
|
|
1119
1141
|
reference: (_outcome_reference = outcome.reference) != null ? _outcome_reference : '',
|
|
1120
1142
|
'help.url': riskNoticeHelpUrl('requesting-a-review')
|
|
1121
1143
|
});
|