@solidxai/core 0.1.12-beta.1 → 0.1.12-beta.10
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/dist/commands/seed.command.d.ts.map +1 -1
- package/dist/commands/seed.command.js +10 -2
- package/dist/commands/seed.command.js.map +1 -1
- package/dist/constants/media-file-types.d.ts +5 -0
- package/dist/constants/media-file-types.d.ts.map +1 -0
- package/dist/constants/media-file-types.js +27 -0
- package/dist/constants/media-file-types.js.map +1 -0
- package/dist/controllers/media.controller.d.ts +14 -11
- package/dist/controllers/media.controller.d.ts.map +1 -1
- package/dist/controllers/media.controller.js +72 -33
- package/dist/controllers/media.controller.js.map +1 -1
- package/dist/dtos/create-chatter-message.dto.d.ts +1 -0
- package/dist/dtos/create-chatter-message.dto.d.ts.map +1 -1
- package/dist/dtos/create-chatter-message.dto.js +7 -1
- package/dist/dtos/create-chatter-message.dto.js.map +1 -1
- package/dist/dtos/create-media.dto.d.ts +1 -0
- package/dist/dtos/create-media.dto.d.ts.map +1 -1
- package/dist/dtos/create-media.dto.js +7 -1
- package/dist/dtos/create-media.dto.js.map +1 -1
- package/dist/dtos/create-role-metadata.dto.d.ts +2 -0
- package/dist/dtos/create-role-metadata.dto.d.ts.map +1 -1
- package/dist/dtos/create-role-metadata.dto.js +3 -1
- package/dist/dtos/create-role-metadata.dto.js.map +1 -1
- package/dist/dtos/post-chatter-message.dto.d.ts +1 -0
- package/dist/dtos/post-chatter-message.dto.d.ts.map +1 -1
- package/dist/dtos/post-chatter-message.dto.js +6 -1
- package/dist/dtos/post-chatter-message.dto.js.map +1 -1
- package/dist/dtos/update-chatter-message.dto.d.ts +1 -0
- package/dist/dtos/update-chatter-message.dto.d.ts.map +1 -1
- package/dist/dtos/update-chatter-message.dto.js +8 -1
- package/dist/dtos/update-chatter-message.dto.js.map +1 -1
- package/dist/dtos/update-chatter-note-message.dto.d.ts +1 -0
- package/dist/dtos/update-chatter-note-message.dto.d.ts.map +1 -1
- package/dist/dtos/update-chatter-note-message.dto.js +7 -1
- package/dist/dtos/update-chatter-note-message.dto.js.map +1 -1
- package/dist/dtos/update-media.dto.d.ts +1 -0
- package/dist/dtos/update-media.dto.d.ts.map +1 -1
- package/dist/dtos/update-media.dto.js +7 -1
- package/dist/dtos/update-media.dto.js.map +1 -1
- package/dist/entities/chatter-message.entity.d.ts +1 -0
- package/dist/entities/chatter-message.entity.d.ts.map +1 -1
- package/dist/entities/chatter-message.entity.js +5 -1
- package/dist/entities/chatter-message.entity.js.map +1 -1
- package/dist/entities/media.entity.js.map +1 -1
- package/dist/enums/auth-type.enum.d.ts +2 -1
- package/dist/enums/auth-type.enum.d.ts.map +1 -1
- package/dist/enums/auth-type.enum.js +1 -0
- package/dist/enums/auth-type.enum.js.map +1 -1
- package/dist/guards/authentication.guard.d.ts +3 -1
- package/dist/guards/authentication.guard.d.ts.map +1 -1
- package/dist/guards/authentication.guard.js +5 -1
- package/dist/guards/authentication.guard.js.map +1 -1
- package/dist/guards/media-signed-url.guard.d.ts +9 -0
- package/dist/guards/media-signed-url.guard.d.ts.map +1 -0
- package/dist/guards/media-signed-url.guard.js +49 -0
- package/dist/guards/media-signed-url.guard.js.map +1 -0
- package/dist/helpers/field-crud-managers/MediaFieldCrudManager.d.ts.map +1 -1
- package/dist/helpers/field-crud-managers/MediaFieldCrudManager.js +10 -13
- package/dist/helpers/field-crud-managers/MediaFieldCrudManager.js.map +1 -1
- package/dist/interfaces/chatter-mention-notification.interface.d.ts +27 -0
- package/dist/interfaces/chatter-mention-notification.interface.d.ts.map +1 -0
- package/dist/interfaces/chatter-mention-notification.interface.js +3 -0
- package/dist/interfaces/chatter-mention-notification.interface.js.map +1 -0
- package/dist/interfaces.d.ts +19 -1
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.js +2 -0
- package/dist/interfaces.js.map +1 -1
- package/dist/jobs/chatter-mention-notification-email-queue-handler.service.d.ts +17 -0
- package/dist/jobs/chatter-mention-notification-email-queue-handler.service.d.ts.map +1 -0
- package/dist/jobs/chatter-mention-notification-email-queue-handler.service.js +106 -0
- package/dist/jobs/chatter-mention-notification-email-queue-handler.service.js.map +1 -0
- package/dist/jobs/database/chatter-mention-notification-email-publisher-database.service.d.ts +12 -0
- package/dist/jobs/database/chatter-mention-notification-email-publisher-database.service.d.ts.map +1 -0
- package/dist/jobs/database/chatter-mention-notification-email-publisher-database.service.js +39 -0
- package/dist/jobs/database/chatter-mention-notification-email-publisher-database.service.js.map +1 -0
- package/dist/jobs/database/chatter-mention-notification-email-queue-options-database.d.ts +8 -0
- package/dist/jobs/database/chatter-mention-notification-email-queue-options-database.d.ts.map +1 -0
- package/dist/jobs/database/chatter-mention-notification-email-queue-options-database.js +10 -0
- package/dist/jobs/database/chatter-mention-notification-email-queue-options-database.js.map +1 -0
- package/dist/jobs/database/chatter-mention-notification-email-subscriber-database.service.d.ts +20 -0
- package/dist/jobs/database/chatter-mention-notification-email-subscriber-database.service.d.ts.map +1 -0
- package/dist/jobs/database/chatter-mention-notification-email-subscriber-database.service.js +48 -0
- package/dist/jobs/database/chatter-mention-notification-email-subscriber-database.service.js.map +1 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-publisher.service.d.ts +12 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-publisher.service.d.ts.map +1 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-publisher.service.js +39 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-publisher.service.js.map +1 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-queue-options.d.ts +8 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-queue-options.d.ts.map +1 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-queue-options.js +10 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-queue-options.js.map +1 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-subscriber.service.d.ts +18 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-subscriber.service.d.ts.map +1 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-subscriber.service.js +45 -0
- package/dist/jobs/rabbitmq/chatter-mention-notification-email-subscriber.service.js.map +1 -0
- package/dist/jobs/redis/chatter-mention-notification-email-publisher-redis.service.d.ts +12 -0
- package/dist/jobs/redis/chatter-mention-notification-email-publisher-redis.service.d.ts.map +1 -0
- package/dist/jobs/redis/chatter-mention-notification-email-publisher-redis.service.js +39 -0
- package/dist/jobs/redis/chatter-mention-notification-email-publisher-redis.service.js.map +1 -0
- package/dist/jobs/redis/chatter-mention-notification-email-queue-options-redis.d.ts +8 -0
- package/dist/jobs/redis/chatter-mention-notification-email-queue-options-redis.d.ts.map +1 -0
- package/dist/jobs/redis/chatter-mention-notification-email-queue-options-redis.js +10 -0
- package/dist/jobs/redis/chatter-mention-notification-email-queue-options-redis.js.map +1 -0
- package/dist/jobs/redis/chatter-mention-notification-email-subscriber-redis.service.d.ts +18 -0
- package/dist/jobs/redis/chatter-mention-notification-email-subscriber-redis.service.d.ts.map +1 -0
- package/dist/jobs/redis/chatter-mention-notification-email-subscriber-redis.service.js +45 -0
- package/dist/jobs/redis/chatter-mention-notification-email-subscriber-redis.service.js.map +1 -0
- package/dist/repository/media.repository.d.ts.map +1 -1
- package/dist/repository/media.repository.js.map +1 -1
- package/dist/seeders/module-metadata-seeder.service.d.ts +7 -1
- package/dist/seeders/module-metadata-seeder.service.d.ts.map +1 -1
- package/dist/seeders/module-metadata-seeder.service.js +87 -3
- package/dist/seeders/module-metadata-seeder.service.js.map +1 -1
- package/dist/seeders/permission-metadata-seeder.service.d.ts +1 -0
- package/dist/seeders/permission-metadata-seeder.service.d.ts.map +1 -1
- package/dist/seeders/permission-metadata-seeder.service.js +6 -1
- package/dist/seeders/permission-metadata-seeder.service.js.map +1 -1
- package/dist/seeders/seed-data/solid-core-metadata.json +95 -13
- package/dist/services/authentication.service.d.ts +2 -2
- package/dist/services/authentication.service.d.ts.map +1 -1
- package/dist/services/authentication.service.js +52 -43
- package/dist/services/authentication.service.js.map +1 -1
- package/dist/services/chatter-message.service.d.ts +7 -1
- package/dist/services/chatter-message.service.d.ts.map +1 -1
- package/dist/services/chatter-message.service.js +85 -4
- package/dist/services/chatter-message.service.js.map +1 -1
- package/dist/services/media-download-url.service.d.ts +22 -0
- package/dist/services/media-download-url.service.d.ts.map +1 -0
- package/dist/services/media-download-url.service.js +70 -0
- package/dist/services/media-download-url.service.js.map +1 -0
- package/dist/services/media-storage.utils.d.ts +24 -0
- package/dist/services/media-storage.utils.d.ts.map +1 -0
- package/dist/services/media-storage.utils.js +73 -0
- package/dist/services/media-storage.utils.js.map +1 -0
- package/dist/services/media.service.d.ts +20 -4
- package/dist/services/media.service.d.ts.map +1 -1
- package/dist/services/media.service.js +155 -55
- package/dist/services/media.service.js.map +1 -1
- package/dist/services/mediaStorageProviders/file-s3-storage-provider.d.ts +4 -4
- package/dist/services/mediaStorageProviders/file-s3-storage-provider.d.ts.map +1 -1
- package/dist/services/mediaStorageProviders/file-s3-storage-provider.js +34 -63
- package/dist/services/mediaStorageProviders/file-s3-storage-provider.js.map +1 -1
- package/dist/services/mediaStorageProviders/file-storage-provider.d.ts +5 -5
- package/dist/services/mediaStorageProviders/file-storage-provider.d.ts.map +1 -1
- package/dist/services/mediaStorageProviders/file-storage-provider.js +34 -38
- package/dist/services/mediaStorageProviders/file-storage-provider.js.map +1 -1
- package/dist/services/role-metadata.service.d.ts +1 -0
- package/dist/services/role-metadata.service.d.ts.map +1 -1
- package/dist/services/role-metadata.service.js +8 -5
- package/dist/services/role-metadata.service.js.map +1 -1
- package/dist/solid-core.module.d.ts.map +1 -1
- package/dist/solid-core.module.js +25 -1
- package/dist/solid-core.module.js.map +1 -1
- package/dist/subscribers/audit.subscriber.js +1 -1
- package/dist/subscribers/audit.subscriber.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/seed.command.ts +12 -3
- package/src/constants/media-file-types.ts +44 -0
- package/src/controllers/media.controller.ts +44 -24
- package/src/dtos/create-chatter-message.dto.ts +5 -0
- package/src/dtos/create-media.dto.ts +8 -3
- package/src/dtos/create-role-metadata.dto.ts +2 -0
- package/src/dtos/post-chatter-message.dto.ts +4 -0
- package/src/dtos/update-chatter-message.dto.ts +6 -0
- package/src/dtos/update-chatter-note-message.dto.ts +5 -0
- package/src/dtos/update-media.dto.ts +8 -3
- package/src/entities/chatter-message.entity.ts +3 -0
- package/src/entities/media.entity.ts +1 -1
- package/src/enums/auth-type.enum.ts +1 -0
- package/src/guards/authentication.guard.ts +3 -0
- package/src/guards/media-signed-url.guard.ts +41 -0
- package/src/helpers/field-crud-managers/MediaFieldCrudManager.ts +12 -24
- package/src/interfaces/chatter-mention-notification.interface.ts +29 -0
- package/src/interfaces.ts +20 -0
- package/src/jobs/chatter-mention-notification-email-queue-handler.service.ts +114 -0
- package/src/jobs/database/chatter-mention-notification-email-publisher-database.service.ts +23 -0
- package/src/jobs/database/chatter-mention-notification-email-queue-options-database.ts +9 -0
- package/src/jobs/database/chatter-mention-notification-email-subscriber-database.service.ts +32 -0
- package/src/jobs/rabbitmq/chatter-mention-notification-email-publisher.service.ts +23 -0
- package/src/jobs/rabbitmq/chatter-mention-notification-email-queue-options.ts +9 -0
- package/src/jobs/rabbitmq/chatter-mention-notification-email-subscriber.service.ts +30 -0
- package/src/jobs/redis/chatter-mention-notification-email-publisher-redis.service.ts +23 -0
- package/src/jobs/redis/chatter-mention-notification-email-queue-options-redis.ts +9 -0
- package/src/jobs/redis/chatter-mention-notification-email-subscriber-redis.service.ts +30 -0
- package/src/repository/media.repository.ts +1 -0
- package/src/seeders/module-metadata-seeder.service.ts +109 -3
- package/src/seeders/permission-metadata-seeder.service.ts +6 -1
- package/src/seeders/seed-data/email-templates/chatter-mention-notification.handlebars.html +200 -0
- package/src/seeders/seed-data/solid-core-metadata.json +95 -13
- package/src/services/authentication.service.ts +66 -55
- package/src/services/chatter-message.service.ts +97 -2
- package/src/services/media-download-url.service.ts +74 -0
- package/src/services/media-storage.utils.ts +70 -0
- package/src/services/media.service.ts +187 -59
- package/src/services/mediaStorageProviders/file-s3-storage-provider.ts +49 -76
- package/src/services/mediaStorageProviders/file-storage-provider.ts +41 -48
- package/src/services/role-metadata.service.ts +17 -5
- package/src/solid-core.module.ts +35 -2
- package/src/subscribers/audit.subscriber.ts +1 -1
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8" />
|
|
6
|
+
<title>You were mentioned in a note</title>
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
8
|
+
|
|
9
|
+
<style>
|
|
10
|
+
@import url("https://fonts.googleapis.com/css?family=Nunito+Sans:400,700&display=swap");
|
|
11
|
+
|
|
12
|
+
body {
|
|
13
|
+
margin: 0;
|
|
14
|
+
padding: 0;
|
|
15
|
+
background-color: #f4f4f7;
|
|
16
|
+
font-family: "Nunito Sans", Helvetica, Arial, sans-serif;
|
|
17
|
+
color: #333;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.email-wrapper {
|
|
21
|
+
max-width: 600px;
|
|
22
|
+
margin: 0 auto;
|
|
23
|
+
padding: 20px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.logo {
|
|
27
|
+
text-align: center;
|
|
28
|
+
margin-bottom: 20px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.logo img {
|
|
32
|
+
height: 50px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.content-box {
|
|
36
|
+
background-color: #ffffff;
|
|
37
|
+
padding: 40px;
|
|
38
|
+
border-radius: 8px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.title {
|
|
42
|
+
font-size: 22px;
|
|
43
|
+
margin-bottom: 10px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.intro {
|
|
47
|
+
font-size: 16px;
|
|
48
|
+
line-height: 1.6;
|
|
49
|
+
margin: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.note-box {
|
|
53
|
+
background-color: #f7f3ff;
|
|
54
|
+
border-left: 4px solid #722ED1;
|
|
55
|
+
padding: 16px;
|
|
56
|
+
border-radius: 5px;
|
|
57
|
+
margin: 24px 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.note-label {
|
|
61
|
+
margin: 0 0 8px;
|
|
62
|
+
font-size: 13px;
|
|
63
|
+
font-weight: 700;
|
|
64
|
+
color: #722ED1;
|
|
65
|
+
text-transform: uppercase;
|
|
66
|
+
letter-spacing: 0.04em;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.note-box p {
|
|
70
|
+
margin: 0;
|
|
71
|
+
font-size: 16px;
|
|
72
|
+
line-height: 1.6;
|
|
73
|
+
white-space: pre-wrap;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.note-body {
|
|
77
|
+
font-weight: 700;
|
|
78
|
+
font-style: italic;
|
|
79
|
+
color: #2f2450;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.record-summary {
|
|
83
|
+
background-color: #fbfbfd;
|
|
84
|
+
border: 1px solid #ececf1;
|
|
85
|
+
padding: 14px;
|
|
86
|
+
border-radius: 5px;
|
|
87
|
+
margin-bottom: 24px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.record-summary p {
|
|
91
|
+
margin: 0 0 8px;
|
|
92
|
+
font-size: 14px;
|
|
93
|
+
line-height: 1.5;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.button-container {
|
|
97
|
+
text-align: center;
|
|
98
|
+
margin-bottom: 30px;
|
|
99
|
+
margin-top: 20px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.button {
|
|
103
|
+
display: inline-block;
|
|
104
|
+
padding: 12px 24px;
|
|
105
|
+
background-color: #722ED1;
|
|
106
|
+
color: #ffffff;
|
|
107
|
+
text-decoration: none;
|
|
108
|
+
font-weight: bold;
|
|
109
|
+
border-radius: 5px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.footer-text {
|
|
113
|
+
font-size: 16px;
|
|
114
|
+
line-height: 1.6;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.footer {
|
|
118
|
+
text-align: center;
|
|
119
|
+
font-size: 12px;
|
|
120
|
+
color: #6b6e76;
|
|
121
|
+
margin-top: 40px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@media only screen and (max-width: 600px) {
|
|
125
|
+
.email-wrapper {
|
|
126
|
+
width: 100% !important;
|
|
127
|
+
padding: 20px 0 !important;
|
|
128
|
+
margin: 0;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.content-box {
|
|
132
|
+
padding: 20px !important;
|
|
133
|
+
border-radius: 0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.title {
|
|
137
|
+
font-size: 18px !important;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.button {
|
|
141
|
+
padding: 10px !important;
|
|
142
|
+
font-size: 14px;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
</style>
|
|
146
|
+
</head>
|
|
147
|
+
|
|
148
|
+
<body>
|
|
149
|
+
<div class="email-wrapper">
|
|
150
|
+
{{#if companyLogoUrl}}
|
|
151
|
+
<div class="logo">
|
|
152
|
+
<img src="{{companyLogoUrl}}" alt="Company Logo" />
|
|
153
|
+
</div>
|
|
154
|
+
{{/if}}
|
|
155
|
+
|
|
156
|
+
<div class="content-box">
|
|
157
|
+
<h2 class="title">Hi {{ mentionedUserDisplayName }},</h2>
|
|
158
|
+
<p class="intro">
|
|
159
|
+
<strong>{{ mentionedByDisplayName }}</strong> mentioned you in a note on
|
|
160
|
+
<strong>{{ entityDisplayName }}</strong>{{#if entityUserKey}} <strong>{{ entityUserKey }}</strong>{{/if}}.
|
|
161
|
+
</p>
|
|
162
|
+
|
|
163
|
+
<div class="note-box">
|
|
164
|
+
<p class="note-label" style="margin: 0 0 8px; font-size: 13px; font-weight: 700; color: #722ED1; text-transform: uppercase; letter-spacing: 0.04em;">
|
|
165
|
+
Note
|
|
166
|
+
</p>
|
|
167
|
+
<p class="note-body" style="margin: 0; font-size: 16px; line-height: 1.6; white-space: pre-wrap; font-weight: 700; font-style: italic; color: #2f2450;">
|
|
168
|
+
{{ noteBody }}
|
|
169
|
+
</p>
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
<div class="record-summary">
|
|
173
|
+
<p><strong>Record:</strong> {{ entityDisplayName }}{{#if entityUserKey}} - {{ entityUserKey }}{{/if}}</p>
|
|
174
|
+
<p><strong>Mentioned by:</strong> {{ mentionedByDisplayName }}{{#if mentionedByEmail}} ({{ mentionedByEmail }}){{/if}}</p>
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
<p class="intro">
|
|
178
|
+
To view the note and reply to {{ mentionedByDisplayName }}, open the record below.
|
|
179
|
+
</p>
|
|
180
|
+
|
|
181
|
+
<div class="button-container">
|
|
182
|
+
<a href="{{ entityFormUrl }}" class="button" target="_blank">
|
|
183
|
+
Open Record
|
|
184
|
+
</a>
|
|
185
|
+
</div>
|
|
186
|
+
|
|
187
|
+
<p class="intro">
|
|
188
|
+
Regards,
|
|
189
|
+
<br />
|
|
190
|
+
The {{ solidAppName }} Team.
|
|
191
|
+
</p>
|
|
192
|
+
</div>
|
|
193
|
+
|
|
194
|
+
<div class="footer">
|
|
195
|
+
© 2025 <a href="{{ solidAppWebsiteUrl }}" target="_blank">{{ solidAppName }}</a>. All rights reserved.
|
|
196
|
+
</div>
|
|
197
|
+
</div>
|
|
198
|
+
</body>
|
|
199
|
+
|
|
200
|
+
</html>
|
|
@@ -3911,6 +3911,18 @@
|
|
|
3911
3911
|
"encrypt": false,
|
|
3912
3912
|
"isSystem": false
|
|
3913
3913
|
},
|
|
3914
|
+
{
|
|
3915
|
+
"name": "messageBodyMentions",
|
|
3916
|
+
"displayName": "Message Body Mentions",
|
|
3917
|
+
"type": "longText",
|
|
3918
|
+
"ormType": "text",
|
|
3919
|
+
"required": false,
|
|
3920
|
+
"unique": false,
|
|
3921
|
+
"index": false,
|
|
3922
|
+
"private": false,
|
|
3923
|
+
"encrypt": false,
|
|
3924
|
+
"isSystem": false
|
|
3925
|
+
},
|
|
3914
3926
|
{
|
|
3915
3927
|
"name": "coModelEntityId",
|
|
3916
3928
|
"displayName": "CoModel Entity Id",
|
|
@@ -5294,6 +5306,9 @@
|
|
|
5294
5306
|
"FieldMetadataController.getSelectionDynamicValues",
|
|
5295
5307
|
"FieldMetadataController.getSelectionDynamicValue",
|
|
5296
5308
|
"FieldMetadataController.findFieldDefaultMetaData",
|
|
5309
|
+
"MediaController.findMany",
|
|
5310
|
+
"MediaController.findOne",
|
|
5311
|
+
"MediaController.download",
|
|
5297
5312
|
"SavedFiltersController.delete",
|
|
5298
5313
|
"SavedFiltersController.deleteMany",
|
|
5299
5314
|
"SavedFiltersController.findOne",
|
|
@@ -5309,14 +5324,6 @@
|
|
|
5309
5324
|
"ChatterMessageController.findMany",
|
|
5310
5325
|
"ChatterMessageController.markCompleted",
|
|
5311
5326
|
"ChatterMessageController.updateCustomNoteMessage",
|
|
5312
|
-
"ImportTransactionController.getImportTemplate",
|
|
5313
|
-
"ImportTransactionController.getImportInstructions",
|
|
5314
|
-
"ImportTransactionController.getImportMappingInfo",
|
|
5315
|
-
"ImportTransactionController.startImportSync",
|
|
5316
|
-
"ImportTransactionController.startImportAsync",
|
|
5317
|
-
"ImportTransactionController.exportFailedImportedImports",
|
|
5318
|
-
"ExportTemplateController.startExportSync",
|
|
5319
|
-
"ExportTemplateController.startExportAsync",
|
|
5320
5327
|
"ListOfValuesController.findMany",
|
|
5321
5328
|
"ListOfValuesController.findOne",
|
|
5322
5329
|
"SettingController.getAllSettings",
|
|
@@ -5336,6 +5343,31 @@
|
|
|
5336
5343
|
"agent:invoke"
|
|
5337
5344
|
]
|
|
5338
5345
|
},
|
|
5346
|
+
{
|
|
5347
|
+
"name": "Allowed To Import",
|
|
5348
|
+
"permissions": [
|
|
5349
|
+
"ImportTransactionController.create",
|
|
5350
|
+
"ImportTransactionController.delete",
|
|
5351
|
+
"ImportTransactionController.deleteMany",
|
|
5352
|
+
"ImportTransactionController.getImportTemplate",
|
|
5353
|
+
"ImportTransactionController.getImportInstructions",
|
|
5354
|
+
"ImportTransactionController.getImportMappingInfo",
|
|
5355
|
+
"ImportTransactionController.partialUpdate",
|
|
5356
|
+
"ImportTransactionController.startImportSync",
|
|
5357
|
+
"ImportTransactionController.startImportAsync",
|
|
5358
|
+
"ImportTransactionController.exportFailedImportedImports"
|
|
5359
|
+
]
|
|
5360
|
+
},
|
|
5361
|
+
{
|
|
5362
|
+
"name": "Allowed To Export",
|
|
5363
|
+
"permissions": [
|
|
5364
|
+
"ExportTemplateController.create",
|
|
5365
|
+
"ExportTemplateController.delete",
|
|
5366
|
+
"ExportTemplateController.findMany",
|
|
5367
|
+
"ExportTemplateController.startExportSync",
|
|
5368
|
+
"ExportTemplateController.startExportAsync"
|
|
5369
|
+
]
|
|
5370
|
+
},
|
|
5339
5371
|
{
|
|
5340
5372
|
"name": "Public",
|
|
5341
5373
|
"permissions": [
|
|
@@ -8595,16 +8627,15 @@
|
|
|
8595
8627
|
"attrs": {
|
|
8596
8628
|
"name": "roles",
|
|
8597
8629
|
"widget": "checkbox",
|
|
8598
|
-
"inlineCreateAutoSave": "
|
|
8630
|
+
"inlineCreateAutoSave": "false",
|
|
8599
8631
|
"renderModeCheckboxPreprocessor": "MenuItemMetadataRolesFormFieldPreprocessor",
|
|
8600
|
-
"inlineCreate": "
|
|
8632
|
+
"inlineCreate": "false",
|
|
8601
8633
|
"inlineCreateLayout": {
|
|
8602
8634
|
"type": "form",
|
|
8603
8635
|
"attrs": {
|
|
8604
8636
|
"name": "form-1",
|
|
8605
8637
|
"label": "User",
|
|
8606
|
-
"className": "grid"
|
|
8607
|
-
"width": "20vw"
|
|
8638
|
+
"className": "grid"
|
|
8608
8639
|
},
|
|
8609
8640
|
"children": [
|
|
8610
8641
|
{
|
|
@@ -14461,6 +14492,15 @@
|
|
|
14461
14492
|
"description": "Welcome email sent to users after signup.",
|
|
14462
14493
|
"active": true,
|
|
14463
14494
|
"type": "text"
|
|
14495
|
+
},
|
|
14496
|
+
{
|
|
14497
|
+
"name": "chatter-mention-notification",
|
|
14498
|
+
"displayName": "Default: Chatter Mention Notification",
|
|
14499
|
+
"body": "chatter-mention-notification.handlebars.html",
|
|
14500
|
+
"subject": "{{mentionedByDisplayName}} mentioned you in {{entityDisplayName}}",
|
|
14501
|
+
"description": "This template notifies users when they are mentioned in a custom chatter note.",
|
|
14502
|
+
"active": true,
|
|
14503
|
+
"type": "text"
|
|
14464
14504
|
}
|
|
14465
14505
|
],
|
|
14466
14506
|
"smsTemplates": [
|
|
@@ -14504,7 +14544,8 @@
|
|
|
14504
14544
|
"mediaStorageProviders": [
|
|
14505
14545
|
{
|
|
14506
14546
|
"name": "default-filesystem",
|
|
14507
|
-
"type": "filesystem"
|
|
14547
|
+
"type": "filesystem",
|
|
14548
|
+
"isPublic": true
|
|
14508
14549
|
},
|
|
14509
14550
|
{
|
|
14510
14551
|
"name": "default-aws-s3",
|
|
@@ -14540,6 +14581,47 @@
|
|
|
14540
14581
|
}
|
|
14541
14582
|
}
|
|
14542
14583
|
}
|
|
14584
|
+
},
|
|
14585
|
+
{
|
|
14586
|
+
"name": "model:Media-role:Internal User-own",
|
|
14587
|
+
"description": "Show Media records owned by the current user",
|
|
14588
|
+
"roleUserKey": "Internal User",
|
|
14589
|
+
"modelMetadataUserKey": "media",
|
|
14590
|
+
"securityRuleConfig": {
|
|
14591
|
+
"filters": {
|
|
14592
|
+
"createdBy": {
|
|
14593
|
+
"$eq": "$activeUserId"
|
|
14594
|
+
}
|
|
14595
|
+
}
|
|
14596
|
+
}
|
|
14597
|
+
},
|
|
14598
|
+
{
|
|
14599
|
+
"name": "model:Media-role:Internal User-public",
|
|
14600
|
+
"description": "Show public Media records",
|
|
14601
|
+
"roleUserKey": "Internal User",
|
|
14602
|
+
"modelMetadataUserKey": "media",
|
|
14603
|
+
"securityRuleConfig": {
|
|
14604
|
+
"filters": {
|
|
14605
|
+
"mediaStorageProviderMetadata": {
|
|
14606
|
+
"isPublic": {
|
|
14607
|
+
"$eq": true
|
|
14608
|
+
}
|
|
14609
|
+
}
|
|
14610
|
+
}
|
|
14611
|
+
}
|
|
14612
|
+
},
|
|
14613
|
+
{
|
|
14614
|
+
"name": "model:Media-role:Admin",
|
|
14615
|
+
"description": "Show All Media records",
|
|
14616
|
+
"roleUserKey": "Admin",
|
|
14617
|
+
"modelMetadataUserKey": "media",
|
|
14618
|
+
"securityRuleConfig": {
|
|
14619
|
+
"filters": {
|
|
14620
|
+
"id": {
|
|
14621
|
+
"$ne": "0"
|
|
14622
|
+
}
|
|
14623
|
+
}
|
|
14624
|
+
}
|
|
14543
14625
|
}
|
|
14544
14626
|
],
|
|
14545
14627
|
"modelSequences": [],
|
|
@@ -109,6 +109,26 @@ export class AuthenticationService {
|
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
private async resolveUserForPasswordSignIn(username: string, email: string) {
|
|
113
|
+
const normalizedEmail = email?.trim().toLowerCase();
|
|
114
|
+
const query = (await this.userRepository
|
|
115
|
+
.createSecurityRuleAwareQueryBuilder("u"))
|
|
116
|
+
.leftJoinAndSelect("u.roles", "roles");
|
|
117
|
+
|
|
118
|
+
if (username) {
|
|
119
|
+
query.where("u.username = :username", { username });
|
|
120
|
+
}
|
|
121
|
+
if (normalizedEmail) {
|
|
122
|
+
if (username) {
|
|
123
|
+
query.orWhere("LOWER(u.email) = :email", { email: normalizedEmail });
|
|
124
|
+
} else {
|
|
125
|
+
query.where("LOWER(u.email) = :email", { email: normalizedEmail });
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return await query.getOne();
|
|
130
|
+
}
|
|
131
|
+
|
|
112
132
|
async updatePasswordDetails(user: User, newPassword: string) {
|
|
113
133
|
user.password = await this.hashingService.hash(newPassword);
|
|
114
134
|
user.passwordScheme = this.hashingService.name();
|
|
@@ -192,6 +212,7 @@ export class AuthenticationService {
|
|
|
192
212
|
effectiveDto,
|
|
193
213
|
entity,
|
|
194
214
|
provider.repo as Repository<User>,
|
|
215
|
+
true,
|
|
195
216
|
);
|
|
196
217
|
}
|
|
197
218
|
return this.performSignUp(signUpDto, new User(), this.userRepository);
|
|
@@ -201,6 +222,7 @@ export class AuthenticationService {
|
|
|
201
222
|
signUpDto: SignUpDto,
|
|
202
223
|
entity: T,
|
|
203
224
|
repo: Repository<T>,
|
|
225
|
+
preferEntityApiKeyFlag: boolean = false,
|
|
204
226
|
): Promise<T> {
|
|
205
227
|
try {
|
|
206
228
|
const onForcePasswordChange =
|
|
@@ -221,7 +243,10 @@ export class AuthenticationService {
|
|
|
221
243
|
onForcePasswordChange,
|
|
222
244
|
);
|
|
223
245
|
const privateDto = signUpDto as { isAllowedToGenerateApiKeys?: boolean };
|
|
224
|
-
if (
|
|
246
|
+
if (
|
|
247
|
+
!preferEntityApiKeyFlag &&
|
|
248
|
+
privateDto.isAllowedToGenerateApiKeys !== undefined
|
|
249
|
+
) {
|
|
225
250
|
user.isAllowedToGenerateApiKeys = privateDto.isAllowedToGenerateApiKeys;
|
|
226
251
|
}
|
|
227
252
|
const savedUser = await repo.save(user);
|
|
@@ -985,7 +1010,10 @@ export class AuthenticationService {
|
|
|
985
1010
|
}
|
|
986
1011
|
|
|
987
1012
|
async signIn(signInDto: SignInDto) {
|
|
988
|
-
const user = await this.
|
|
1013
|
+
const user = await this.resolveUserForPasswordSignIn(
|
|
1014
|
+
signInDto.username,
|
|
1015
|
+
signInDto.email,
|
|
1016
|
+
);
|
|
989
1017
|
if (!user) {
|
|
990
1018
|
throw new UnauthorizedException(ERROR_MESSAGES.INVALID_CREDENTIALS);
|
|
991
1019
|
}
|
|
@@ -1044,15 +1072,13 @@ export class AuthenticationService {
|
|
|
1044
1072
|
}
|
|
1045
1073
|
|
|
1046
1074
|
const type = this.resolveLoginType(signInDto);
|
|
1047
|
-
const user = await this.
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
await this.notifyUserOnOtpInititateLogin(user, type);
|
|
1053
|
-
}
|
|
1075
|
+
const user = await this.findUserForLogin(type, signInDto.identifier);
|
|
1076
|
+
const dummyOtp = this.getDummyOtpForUser(user);
|
|
1077
|
+
if (!dummyOtp) {
|
|
1078
|
+
await this.assignLoginOtp(user, type);
|
|
1079
|
+
await this.notifyUserOnOtpInititateLogin(user, type);
|
|
1054
1080
|
}
|
|
1055
|
-
return this.buildLoginOtpResponse(
|
|
1081
|
+
return this.buildLoginOtpResponse(user, type);
|
|
1056
1082
|
}
|
|
1057
1083
|
|
|
1058
1084
|
private resolveLoginType(
|
|
@@ -1082,19 +1108,36 @@ export class AuthenticationService {
|
|
|
1082
1108
|
throw new BadRequestException(ERROR_MESSAGES.INVALID_VERIFICATION_TYPE);
|
|
1083
1109
|
}
|
|
1084
1110
|
|
|
1111
|
+
private async resolveUserForOtpEmailSignIn(identifier: string,options: { withRoles?: boolean } = {},): Promise<User | null> {
|
|
1112
|
+
const normalizedEmail = identifier?.trim().toLowerCase();
|
|
1113
|
+
const query =
|
|
1114
|
+
await this.userRepository.createSecurityRuleAwareQueryBuilder("u");
|
|
1115
|
+
|
|
1116
|
+
if (options.withRoles) {
|
|
1117
|
+
query.leftJoinAndSelect("u.roles", "roles");
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
query.where("u.username = :username", { username: identifier });
|
|
1121
|
+
|
|
1122
|
+
if (normalizedEmail) {
|
|
1123
|
+
query.orWhere("LOWER(u.email) = :email", { email: normalizedEmail });
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
return await query.getOne();
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1085
1129
|
private async findUserForLogin(
|
|
1086
1130
|
type: PasswordlessLoginValidateWhatSources,
|
|
1087
1131
|
identifier: string,
|
|
1088
1132
|
options: { withRoles?: boolean } = {},
|
|
1089
1133
|
): Promise<User> {
|
|
1090
|
-
const
|
|
1134
|
+
const user =
|
|
1091
1135
|
type === PasswordlessLoginValidateWhatSources.EMAIL
|
|
1092
|
-
?
|
|
1093
|
-
: {
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
});
|
|
1136
|
+
? await this.resolveUserForOtpEmailSignIn(identifier, options)
|
|
1137
|
+
: await this.userRepository.findOne({
|
|
1138
|
+
where: [{ username: identifier }, { mobile: identifier }],
|
|
1139
|
+
...(options.withRoles ? { relations: { roles: true } } : {}),
|
|
1140
|
+
});
|
|
1098
1141
|
if (!user) {
|
|
1099
1142
|
throw new UnauthorizedException(ERROR_MESSAGES.USER_NOT_FOUND);
|
|
1100
1143
|
}
|
|
@@ -1104,25 +1147,6 @@ export class AuthenticationService {
|
|
|
1104
1147
|
return user;
|
|
1105
1148
|
}
|
|
1106
1149
|
|
|
1107
|
-
private async findUserForLoginOrNull(
|
|
1108
|
-
type: PasswordlessLoginValidateWhatSources,
|
|
1109
|
-
identifier: string,
|
|
1110
|
-
options: { withRoles?: boolean } = {},
|
|
1111
|
-
): Promise<User | null> {
|
|
1112
|
-
try {
|
|
1113
|
-
return await this.findUserForLogin(type, identifier, options);
|
|
1114
|
-
} catch (error) {
|
|
1115
|
-
if (
|
|
1116
|
-
error instanceof UnauthorizedException &&
|
|
1117
|
-
(error.message === ERROR_MESSAGES.USER_NOT_FOUND ||
|
|
1118
|
-
error.message === ERROR_MESSAGES.USER_INACTIVE)
|
|
1119
|
-
) {
|
|
1120
|
-
return null;
|
|
1121
|
-
}
|
|
1122
|
-
throw error;
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
1150
|
private async assignLoginOtp(
|
|
1127
1151
|
user: User,
|
|
1128
1152
|
type: PasswordlessLoginValidateWhatSources,
|
|
@@ -1146,29 +1170,19 @@ export class AuthenticationService {
|
|
|
1146
1170
|
}
|
|
1147
1171
|
|
|
1148
1172
|
private buildLoginOtpResponse(
|
|
1173
|
+
user: User,
|
|
1149
1174
|
type: PasswordlessLoginValidateWhatSources,
|
|
1150
|
-
identifier: string,
|
|
1151
|
-
user?: User | null,
|
|
1152
1175
|
) {
|
|
1153
|
-
const maskedIdentifier =
|
|
1154
|
-
type
|
|
1155
|
-
|
|
1156
|
-
|
|
1176
|
+
const maskedIdentifier =
|
|
1177
|
+
type === PasswordlessLoginValidateWhatSources.EMAIL
|
|
1178
|
+
? { email: this.maskEmail(user.email) }
|
|
1179
|
+
: { mobile: this.maskMobile(user.mobile) };
|
|
1157
1180
|
return {
|
|
1158
1181
|
message: SUCCESS_MESSAGES.OTP_SENT_SUCCESS_LOGIN,
|
|
1159
1182
|
user: maskedIdentifier,
|
|
1160
1183
|
};
|
|
1161
1184
|
}
|
|
1162
1185
|
|
|
1163
|
-
private buildMaskedLoginIdentifier(
|
|
1164
|
-
type: PasswordlessLoginValidateWhatSources,
|
|
1165
|
-
identifier: string,
|
|
1166
|
-
) {
|
|
1167
|
-
return type === PasswordlessLoginValidateWhatSources.EMAIL
|
|
1168
|
-
? { email: this.maskEmail(identifier) }
|
|
1169
|
-
: { mobile: this.maskMobile(identifier) };
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
1186
|
private async notifyUserOnOtpInititateLogin(
|
|
1173
1187
|
user: User,
|
|
1174
1188
|
loginType: PasswordlessLoginValidateWhatSources,
|
|
@@ -1306,12 +1320,9 @@ export class AuthenticationService {
|
|
|
1306
1320
|
throw new BadRequestException(ERROR_MESSAGES.INVALID_VERIFICATION_TYPE);
|
|
1307
1321
|
}
|
|
1308
1322
|
|
|
1309
|
-
const user = await this.
|
|
1323
|
+
const user = await this.findUserForLogin(type, identifier, {
|
|
1310
1324
|
withRoles: true,
|
|
1311
1325
|
});
|
|
1312
|
-
if (!user) {
|
|
1313
|
-
throw new UnauthorizedException(ERROR_MESSAGES.INVALID_OTP);
|
|
1314
|
-
}
|
|
1315
1326
|
this.checkAccountBlocked(user);
|
|
1316
1327
|
const dummyOtp = this.getDummyOtpForUser(user);
|
|
1317
1328
|
|