@hed-hog/core 0.0.370 → 0.0.373
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/LICENSE.md +21 -0
- package/README.md +2 -0
- package/dist/ai/ai.service.d.ts.map +1 -1
- package/dist/ai/ai.service.js +10 -7
- package/dist/ai/ai.service.js.map +1 -1
- package/dist/app-command/app-command.module.d.ts +3 -0
- package/dist/app-command/app-command.module.d.ts.map +1 -0
- package/dist/app-command/app-command.module.js +22 -0
- package/dist/app-command/app-command.module.js.map +1 -0
- package/dist/app-command/app-command.registry.d.ts +22 -0
- package/dist/app-command/app-command.registry.d.ts.map +1 -0
- package/dist/{webhook-integration/webhook-command.registry.js → app-command/app-command.registry.js} +6 -6
- package/dist/app-command/app-command.registry.js.map +1 -0
- package/dist/auth/auth.controller.d.ts +2 -2
- package/dist/auth/auth.controller.d.ts.map +1 -1
- package/dist/auth/auth.controller.js +20 -7
- package/dist/auth/auth.controller.js.map +1 -1
- package/dist/auth/auth.service.d.ts +3 -3
- package/dist/auth/auth.service.d.ts.map +1 -1
- package/dist/auth/auth.service.js +10 -36
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/auth/dto/forget.dto.d.ts +1 -0
- package/dist/auth/dto/forget.dto.d.ts.map +1 -1
- package/dist/auth/dto/forget.dto.js +5 -0
- package/dist/auth/dto/forget.dto.js.map +1 -1
- package/dist/auth/guards/auth.guard.d.ts.map +1 -1
- package/dist/auth/guards/auth.guard.js +4 -1
- package/dist/auth/guards/auth.guard.js.map +1 -1
- package/dist/challenge/challenge.service.d.ts +8 -7
- package/dist/challenge/challenge.service.d.ts.map +1 -1
- package/dist/challenge/challenge.service.js +27 -19
- package/dist/challenge/challenge.service.js.map +1 -1
- package/dist/file/dto/upload.dto.d.ts +3 -0
- package/dist/file/dto/upload.dto.d.ts.map +1 -1
- package/dist/file/dto/upload.dto.js +22 -0
- package/dist/file/dto/upload.dto.js.map +1 -1
- package/dist/file/file.controller.d.ts +2 -1
- package/dist/file/file.controller.d.ts.map +1 -1
- package/dist/file/file.controller.js +29 -16
- package/dist/file/file.controller.js.map +1 -1
- package/dist/file/file.service.d.ts +51 -1
- package/dist/file/file.service.d.ts.map +1 -1
- package/dist/file/file.service.js +250 -18
- package/dist/file/file.service.js.map +1 -1
- package/dist/file/image-optimization.service.d.ts +17 -4
- package/dist/file/image-optimization.service.d.ts.map +1 -1
- package/dist/file/image-optimization.service.js +101 -46
- package/dist/file/image-optimization.service.js.map +1 -1
- package/dist/file/provider/s3.provider.d.ts.map +1 -1
- package/dist/file/provider/s3.provider.js +15 -7
- package/dist/file/provider/s3.provider.js.map +1 -1
- package/dist/file/provider/spaces.provider.d.ts.map +1 -1
- package/dist/file/provider/spaces.provider.js +18 -8
- package/dist/file/provider/spaces.provider.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/integration/services/event-subscriber.registry.d.ts +5 -0
- package/dist/integration/services/event-subscriber.registry.d.ts.map +1 -1
- package/dist/integration/services/event-subscriber.registry.js +15 -0
- package/dist/integration/services/event-subscriber.registry.js.map +1 -1
- package/dist/integration/services/outbox.processor.d.ts.map +1 -1
- package/dist/integration/services/outbox.processor.js +2 -4
- package/dist/integration/services/outbox.processor.js.map +1 -1
- package/dist/integration/services/outbox.service.d.ts +4 -2
- package/dist/integration/services/outbox.service.d.ts.map +1 -1
- package/dist/integration/services/outbox.service.js +26 -15
- package/dist/integration/services/outbox.service.js.map +1 -1
- package/dist/integration-profile/integration-credential-crypto.service.d.ts +43 -0
- package/dist/integration-profile/integration-credential-crypto.service.d.ts.map +1 -0
- package/dist/integration-profile/integration-credential-crypto.service.js +142 -0
- package/dist/integration-profile/integration-credential-crypto.service.js.map +1 -0
- package/dist/integration-profile/integration-profile.controller.d.ts +6 -7
- package/dist/integration-profile/integration-profile.controller.d.ts.map +1 -1
- package/dist/integration-profile/integration-profile.controller.js +4 -3
- package/dist/integration-profile/integration-profile.controller.js.map +1 -1
- package/dist/integration-profile/integration-profile.module.d.ts.map +1 -1
- package/dist/integration-profile/integration-profile.module.js +5 -2
- package/dist/integration-profile/integration-profile.module.js.map +1 -1
- package/dist/integration-profile/integration-profile.secrets.d.ts +16 -0
- package/dist/integration-profile/integration-profile.secrets.d.ts.map +1 -0
- package/dist/integration-profile/integration-profile.secrets.js +56 -0
- package/dist/integration-profile/integration-profile.secrets.js.map +1 -0
- package/dist/integration-profile/integration-profile.service.d.ts +125 -8
- package/dist/integration-profile/integration-profile.service.d.ts.map +1 -1
- package/dist/integration-profile/integration-profile.service.js +257 -68
- package/dist/integration-profile/integration-profile.service.js.map +1 -1
- package/dist/integration-profile/integration-profile.utils.d.ts +17 -0
- package/dist/integration-profile/integration-profile.utils.d.ts.map +1 -1
- package/dist/integration-profile/integration-profile.utils.js +31 -0
- package/dist/integration-profile/integration-profile.utils.js.map +1 -1
- package/dist/language/en.json +178 -0
- package/dist/language/pt.json +178 -0
- package/dist/mail/mail.controller.d.ts.map +1 -1
- package/dist/mail/mail.controller.js +5 -28
- package/dist/mail/mail.controller.js.map +1 -1
- package/dist/mail/mail.module.js +18 -18
- package/dist/mail/mail.module.js.map +1 -1
- package/dist/mail/mail.service.d.ts +13 -2
- package/dist/mail/mail.service.d.ts.map +1 -1
- package/dist/mail/mail.service.js +25 -15
- package/dist/mail/mail.service.js.map +1 -1
- package/dist/mcp-chat/mcp-chat.service.js +6 -5
- package/dist/mcp-chat/mcp-chat.service.js.map +1 -1
- package/dist/oauth/providers/facebook.provider.js +5 -5
- package/dist/oauth/providers/facebook.provider.js.map +1 -1
- package/dist/oauth/providers/github.provider.js +5 -5
- package/dist/oauth/providers/github.provider.js.map +1 -1
- package/dist/oauth/providers/google.provider.js +5 -5
- package/dist/oauth/providers/google.provider.js.map +1 -1
- package/dist/oauth/providers/microsoft-entra-id.provider.js +5 -5
- package/dist/oauth/providers/microsoft-entra-id.provider.js.map +1 -1
- package/dist/oauth/providers/microsoft.provider.js +5 -5
- package/dist/oauth/providers/microsoft.provider.js.map +1 -1
- package/dist/pdf/pdf.service.d.ts +4 -0
- package/dist/pdf/pdf.service.d.ts.map +1 -1
- package/dist/pdf/pdf.service.js +16 -9
- package/dist/pdf/pdf.service.js.map +1 -1
- package/dist/profile/profile.controller.d.ts +7 -7
- package/dist/profile/profile.controller.d.ts.map +1 -1
- package/dist/profile/profile.controller.js +28 -21
- package/dist/profile/profile.controller.js.map +1 -1
- package/dist/profile/profile.service.d.ts +7 -7
- package/dist/profile/profile.service.d.ts.map +1 -1
- package/dist/profile/profile.service.js +21 -25
- package/dist/profile/profile.service.js.map +1 -1
- package/dist/setting/setting.service.d.ts +1 -0
- package/dist/setting/setting.service.d.ts.map +1 -1
- package/dist/setting/setting.service.js +15 -2
- package/dist/setting/setting.service.js.map +1 -1
- package/dist/token/token.service.d.ts.map +1 -1
- package/dist/token/token.service.js +2 -1
- package/dist/token/token.service.js.map +1 -1
- package/dist/user/user.controller.d.ts +9 -0
- package/dist/user/user.controller.d.ts.map +1 -1
- package/dist/user/user.controller.js +13 -0
- package/dist/user/user.controller.js.map +1 -1
- package/dist/user/user.service.d.ts +7 -0
- package/dist/user/user.service.d.ts.map +1 -1
- package/dist/user/user.service.js +19 -0
- package/dist/user/user.service.js.map +1 -1
- package/dist/utils/webauthn-origin.d.ts +11 -0
- package/dist/utils/webauthn-origin.d.ts.map +1 -0
- package/dist/utils/webauthn-origin.js +37 -0
- package/dist/utils/webauthn-origin.js.map +1 -0
- package/dist/webhook-integration/webhook-integration.controller.d.ts +13 -0
- package/dist/webhook-integration/webhook-integration.controller.d.ts.map +1 -1
- package/dist/webhook-integration/webhook-integration.controller.js +29 -0
- package/dist/webhook-integration/webhook-integration.controller.js.map +1 -1
- package/dist/webhook-integration/webhook-integration.module.js +3 -3
- package/dist/webhook-integration/webhook-integration.module.js.map +1 -1
- package/dist/webhook-integration/webhook-integration.service.d.ts +18 -2
- package/dist/webhook-integration/webhook-integration.service.d.ts.map +1 -1
- package/dist/webhook-integration/webhook-integration.service.js +110 -6
- package/dist/webhook-integration/webhook-integration.service.js.map +1 -1
- package/hedhog/data/integration_provider.yaml +9 -0
- package/hedhog/data/integration_type.yaml +6 -0
- package/hedhog/data/menu.yaml +6 -0
- package/hedhog/data/role.yaml +7 -0
- package/hedhog/data/route.yaml +36 -0
- package/hedhog/data/setting_group.yaml +119 -13
- package/hedhog/frontend/app/access-log/page.tsx.ejs +35 -3
- package/hedhog/frontend/app/account/components/active-sessions.tsx.ejs +36 -3
- package/hedhog/frontend/app/account/components/mcp-tokens.tsx.ejs +39 -4
- package/hedhog/frontend/app/account/components/tokens.tsx.ejs +39 -4
- package/hedhog/frontend/app/ai_agent/page.tsx.ejs +35 -2
- package/hedhog/frontend/app/configurations/[slug]/components/byte-size-input.tsx.ejs +160 -0
- package/hedhog/frontend/app/configurations/[slug]/components/duration-input.tsx.ejs +157 -0
- package/hedhog/frontend/app/configurations/[slug]/components/setting-field.tsx.ejs +244 -63
- package/hedhog/frontend/app/dashboard/[slug]/dashboard-content.tsx.ejs +33 -1
- package/hedhog/frontend/app/dashboard/management/tabs/component-roles-tab.tsx.ejs +35 -3
- package/hedhog/frontend/app/dashboard/management/tabs/components-tab.tsx.ejs +36 -4
- package/hedhog/frontend/app/dashboard/management/tabs/dashboard-roles-tab.tsx.ejs +35 -3
- package/hedhog/frontend/app/dashboard/management/tabs/dashboards-tab.tsx.ejs +36 -4
- package/hedhog/frontend/app/dashboard/management/tabs/items-tab.tsx.ejs +35 -3
- package/hedhog/frontend/app/integration/profiles/page.tsx.ejs +156 -38
- package/hedhog/frontend/app/integrations-webhooks/page.tsx.ejs +118 -11
- package/hedhog/frontend/app/mail/log/page.tsx.ejs +37 -4
- package/hedhog/frontend/app/menu/page.tsx.ejs +34 -2
- package/hedhog/frontend/app/preferences/page.tsx.ejs +77 -0
- package/hedhog/frontend/app/roles/menus.tsx.ejs +35 -3
- package/hedhog/frontend/app/roles/page.tsx.ejs +34 -2
- package/hedhog/frontend/app/roles/routes.tsx.ejs +36 -4
- package/hedhog/frontend/app/roles/users.tsx.ejs +36 -4
- package/hedhog/frontend/app/routes/page.tsx.ejs +34 -2
- package/hedhog/frontend/app/setting-list/page.tsx.ejs +34 -2
- package/hedhog/frontend/app/users/page.tsx.ejs +51 -21
- package/hedhog/frontend/messages/en.json +69 -4
- package/hedhog/frontend/messages/pt.json +69 -4
- package/hedhog/table/setting.yaml +2 -0
- package/hedhog/table/webhook_call_log.yaml +49 -46
- package/package.json +9 -4
- package/src/ai/ai.service.ts +9 -6
- package/src/app-command/app-command.module.ts +9 -0
- package/src/{webhook-integration/webhook-command.registry.ts → app-command/app-command.registry.ts} +9 -9
- package/src/auth/auth.controller.ts +20 -4
- package/src/auth/auth.service.ts +10 -36
- package/src/auth/dto/forget.dto.ts +5 -1
- package/src/auth/guards/auth.guard.ts +4 -1
- package/src/challenge/challenge.service.ts +30 -19
- package/src/file/dto/upload.dto.ts +25 -1
- package/src/file/file.controller.ts +31 -18
- package/src/file/file.service.ts +341 -16
- package/src/file/image-optimization.service.ts +111 -46
- package/src/file/provider/s3.provider.ts +16 -7
- package/src/file/provider/spaces.provider.ts +15 -5
- package/src/index.ts +4 -1
- package/src/integration/services/event-subscriber.registry.ts +15 -0
- package/src/integration/services/outbox.processor.ts +2 -5
- package/src/integration/services/outbox.service.ts +35 -17
- package/src/integration-profile/integration-credential-crypto.service.ts +146 -0
- package/src/integration-profile/integration-profile.controller.ts +2 -0
- package/src/integration-profile/integration-profile.module.ts +5 -2
- package/src/integration-profile/integration-profile.secrets.ts +51 -0
- package/src/integration-profile/integration-profile.service.ts +335 -54
- package/src/integration-profile/integration-profile.utils.ts +56 -0
- package/src/language/en.json +5 -1
- package/src/language/pt.json +5 -1
- package/src/mail/mail.controller.ts +5 -29
- package/src/mail/mail.module.ts +5 -5
- package/src/mail/mail.service.ts +37 -13
- package/src/mcp-chat/mcp-chat.service.ts +5 -5
- package/src/oauth/oauth-callback-coordinator.service.spec.ts +159 -0
- package/src/oauth/providers/facebook.provider.ts +3 -3
- package/src/oauth/providers/github.provider.ts +3 -3
- package/src/oauth/providers/google.provider.ts +3 -3
- package/src/oauth/providers/microsoft-entra-id.provider.ts +3 -3
- package/src/oauth/providers/microsoft.provider.ts +3 -3
- package/src/pdf/pdf.service.ts +19 -6
- package/src/profile/profile.controller.ts +21 -14
- package/src/profile/profile.service.ts +23 -20
- package/src/security/security.service.spec.ts +222 -0
- package/src/setting/setting.service.ts +15 -2
- package/src/token/token.service.ts +2 -1
- package/src/user/user.controller.ts +26 -16
- package/src/user/user.service.ts +25 -0
- package/src/utils/webauthn-origin.ts +38 -0
- package/src/webhook-integration/webhook-integration.controller.ts +23 -0
- package/src/webhook-integration/webhook-integration.module.ts +3 -3
- package/src/webhook-integration/webhook-integration.service.ts +115 -5
- package/dist/webhook-integration/webhook-command.registry.d.ts +0 -22
- package/dist/webhook-integration/webhook-command.registry.d.ts.map +0 -1
- package/dist/webhook-integration/webhook-command.registry.js.map +0 -1
- package/src/menu/menu.service.spec.ts +0 -247
- package/src/route/route.service.spec.ts +0 -300
- package/src/screen/screen.service.spec.ts +0 -298
- package/src/user/user.service.spec.ts +0 -294
|
@@ -7,6 +7,8 @@ exports.buildStorageConfigFromIntegration = buildStorageConfigFromIntegration;
|
|
|
7
7
|
exports.resolveStorageEnumProvider = resolveStorageEnumProvider;
|
|
8
8
|
exports.resolveFileProviderSlug = resolveFileProviderSlug;
|
|
9
9
|
exports.buildOAuthConfigFromIntegration = buildOAuthConfigFromIntegration;
|
|
10
|
+
exports.buildDigitalOceanConfigFromIntegration = buildDigitalOceanConfigFromIntegration;
|
|
11
|
+
exports.buildKubernetesConfigFromIntegration = buildKubernetesConfigFromIntegration;
|
|
10
12
|
exports.buildAiConfigFromIntegration = buildAiConfigFromIntegration;
|
|
11
13
|
const common_1 = require("@nestjs/common");
|
|
12
14
|
const provider_enum_1 = require("../file/provider/provider.enum");
|
|
@@ -138,6 +140,35 @@ function buildOAuthConfigFromIntegration(_providerSlug, config) {
|
|
|
138
140
|
const cfg = (_a = config) !== null && _a !== void 0 ? _a : {};
|
|
139
141
|
return Object.assign({ clientId: String((_b = cfg.client_id) !== null && _b !== void 0 ? _b : ''), clientSecret: String((_c = cfg.client_secret) !== null && _c !== void 0 ? _c : '') }, (cfg.tenant_id ? { tenantId: String(cfg.tenant_id) } : {}));
|
|
140
142
|
}
|
|
143
|
+
/** Maps an integration_profile config JSON to the DigitalOcean API credentials/targets. */
|
|
144
|
+
function buildDigitalOceanConfigFromIntegration(providerSlug, config) {
|
|
145
|
+
var _a, _b, _c, _d, _e, _f;
|
|
146
|
+
if (providerSlug.toLowerCase() !== 'digitalocean') {
|
|
147
|
+
throw new common_1.BadRequestException(`Unsupported infrastructure provider: ${providerSlug}`);
|
|
148
|
+
}
|
|
149
|
+
const cfg = (_a = config) !== null && _a !== void 0 ? _a : {};
|
|
150
|
+
return {
|
|
151
|
+
apiToken: String((_b = cfg.api_token) !== null && _b !== void 0 ? _b : ''),
|
|
152
|
+
clusterId: String((_c = cfg.cluster_id) !== null && _c !== void 0 ? _c : ''),
|
|
153
|
+
region: String((_d = cfg.region) !== null && _d !== void 0 ? _d : ''),
|
|
154
|
+
videoNodePoolId: String((_e = cfg.video_node_pool_id) !== null && _e !== void 0 ? _e : ''),
|
|
155
|
+
videoNodePoolName: String((_f = cfg.video_node_pool_name) !== null && _f !== void 0 ? _f : ''),
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
/** Maps an integration_profile config JSON to read-only Kubernetes API access (opcional). */
|
|
159
|
+
function buildKubernetesConfigFromIntegration(providerSlug, config) {
|
|
160
|
+
var _a, _b, _c, _d, _e;
|
|
161
|
+
if (providerSlug.toLowerCase() !== 'kubernetes') {
|
|
162
|
+
throw new common_1.BadRequestException(`Unsupported infrastructure provider: ${providerSlug}`);
|
|
163
|
+
}
|
|
164
|
+
const cfg = (_a = config) !== null && _a !== void 0 ? _a : {};
|
|
165
|
+
return {
|
|
166
|
+
apiServer: String((_b = cfg.api_server) !== null && _b !== void 0 ? _b : ''),
|
|
167
|
+
token: String((_c = cfg.token) !== null && _c !== void 0 ? _c : ''),
|
|
168
|
+
caCert: String((_d = cfg.ca_cert) !== null && _d !== void 0 ? _d : ''),
|
|
169
|
+
namespace: String((_e = cfg.namespace) !== null && _e !== void 0 ? _e : 'hcode'),
|
|
170
|
+
};
|
|
171
|
+
}
|
|
141
172
|
// ─── AI utilities ─────────────────────────────────────────────────────────────
|
|
142
173
|
/** Maps an integration_profile config JSON to the API key and optional org needed by AI providers. */
|
|
143
174
|
function buildAiConfigFromIntegration(providerSlug, config) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration-profile.utils.js","sourceRoot":"","sources":["../../src/integration-profile/integration-profile.utils.ts"],"names":[],"mappings":";;AAKA,wEAsCC;AAED,wCAKC;AAED,8CAMC;AAaD,8EAwCC;AAGD,gEAUC;AAGD,0DAMC;AAOD,0EAUC;AAKD,oEAiBC;
|
|
1
|
+
{"version":3,"file":"integration-profile.utils.js","sourceRoot":"","sources":["../../src/integration-profile/integration-profile.utils.ts"],"names":[],"mappings":";;AAKA,wEAsCC;AAED,wCAKC;AAED,8CAMC;AAaD,8EAwCC;AAGD,gEAUC;AAGD,0DAMC;AAOD,0EAUC;AAaD,wFAiBC;AAUD,oFAgBC;AAKD,oEAiBC;AApOD,2CAAqD;AACrD,kEAA8D;AAI9D,SAAgB,8BAA8B,CAC5C,YAAoB,EACpB,MAAe;;IAEf,MAAM,GAAG,GAAG,MAAC,MAAc,mCAAI,EAAE,CAAC;IAElC,QAAQ,YAAY,CAAC,WAAW,EAAE,EAAE,CAAC;QACnC,KAAK,MAAM;YACT,OAAO;gBACL,MAAM,EAAE,IAAI;gBACZ,IAAI,EAAE,MAAe;gBACrB,IAAI,EAAE,MAAM,CAAC,MAAA,GAAG,CAAC,IAAI,mCAAI,EAAE,CAAC;gBAC5B,IAAI,EAAE,M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tG,SAAgB,4BAA4B,CAC1C,YAAoB,EACpB,MAAe;;IAEf,MAAM,GAAG,GAAG,MAAC,MAAc,mCAAI,EAAE,CAAC;IAClC,QAAQ,YAAY,CAAC,WAAW,EAAE,EAAE,CAAC;QACnC,KAAK,QAAQ;YACX,uBACE,MAAM,EAAE,MAAM,CAAC,MAAA,GAAG,CAAC,OAAO,mCAAI,EAAE,CAAC,IAC9B,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EACvE;QACJ,KAAK,QAAQ,CAAC;QACd,KAAK,QAAQ;YACX,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,MAAA,GAAG,CAAC,OAAO,mCAAI,EAAE,CAAC,EAAE,CAAC;QAC/C;YACE,MAAM,IAAI,4BAAmB,CAAC,4BAA4B,YAAY,EAAE,CAAC,CAAC;IAC9E,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
{
|
|
2
|
+
"settingNotFound": "Setting not found or user cannot override.",
|
|
3
|
+
"userNotFound": "User not found.",
|
|
4
|
+
"roleNotFound": "Role not found.",
|
|
5
|
+
"accessDenied": "Access denied.",
|
|
6
|
+
"defaultRoleNotFound": "Default user role not found.",
|
|
7
|
+
"defaultNameMfaEmail": "Default E-mail MFA",
|
|
8
|
+
"urlSettingMissing": "URL setting is missing.",
|
|
9
|
+
"userIdentifierNotFound": "User identifier not found.",
|
|
10
|
+
"invalidMfaCode": "Invalid MFA code.",
|
|
11
|
+
"invalidRecoveryCode": "Invalid recovery code.",
|
|
12
|
+
"noEmailMfaFound": "No email MFA method found for this user.",
|
|
13
|
+
"webauthnNotConfigured": "WebAuthn not configured.",
|
|
14
|
+
"challengeNotFound": "Challenge not found or expired.",
|
|
15
|
+
"verificationFailed": "Verification failed.",
|
|
16
|
+
"userIdsRequired": "At least one User ID is required to delete users.",
|
|
17
|
+
"invalidIds": "Invalid IDs.",
|
|
18
|
+
"invalidCode": "Invalid code.",
|
|
19
|
+
"totpNotFound": "TOTP method not found.",
|
|
20
|
+
"invalidMfaToken": "Invalid MFA token.",
|
|
21
|
+
"invalidJsonFile": "File does not contain valid JSON.",
|
|
22
|
+
"invalidJsonArray": "The JSON file must contain an array of settings.",
|
|
23
|
+
"deleteItemsRequired": "You must select at least one item to delete.",
|
|
24
|
+
"signup": {
|
|
25
|
+
"emailExists": "Email already in use."
|
|
26
|
+
},
|
|
27
|
+
"forgot": {
|
|
28
|
+
"rateLimit": "Too many requests. Please try again later.",
|
|
29
|
+
"userNotFound": "User not found."
|
|
30
|
+
},
|
|
31
|
+
"challenge": {
|
|
32
|
+
"invalidOrExpired": "The provided code is invalid or has expired."
|
|
33
|
+
},
|
|
34
|
+
"reset": {
|
|
35
|
+
"password": {
|
|
36
|
+
"required": "Password is required.",
|
|
37
|
+
"minLength": "Password must be at least 8 characters long."
|
|
38
|
+
},
|
|
39
|
+
"code": {
|
|
40
|
+
"required": "Reset code is required."
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"session": {
|
|
44
|
+
"userIdRequired": "User ID is required to create a session.",
|
|
45
|
+
"ipAddressRequired": "IP address is required to create a session.",
|
|
46
|
+
"userAgentRequired": "User agent is required to create a session."
|
|
47
|
+
},
|
|
48
|
+
"profile": {
|
|
49
|
+
"update": {
|
|
50
|
+
"nameRequired": "Name is required."
|
|
51
|
+
},
|
|
52
|
+
"emailIdentifierNotFound": "Email identifier not found.",
|
|
53
|
+
"defaultNameMfaEmail": "Email Verification",
|
|
54
|
+
"emailVerification": {
|
|
55
|
+
"pinInvalid": "PIN must be exactly 6 digits.",
|
|
56
|
+
"pinIsString": "PIN must be a string."
|
|
57
|
+
},
|
|
58
|
+
"changePassword": {
|
|
59
|
+
"currentPasswordIsString": "Current password must be a string.",
|
|
60
|
+
"newPasswordIsString": "New password must be a string."
|
|
61
|
+
},
|
|
62
|
+
"sendEmailVerification": {
|
|
63
|
+
"emailIsString": "Email must be a string."
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"password": {
|
|
67
|
+
"weakPassword": "Password does not meet the security requirements defined in system settings.",
|
|
68
|
+
"required": "Password is required.",
|
|
69
|
+
"minLength": "Password must be at least {minLength} characters long.",
|
|
70
|
+
"minLowercase": "Password must contain at least {minLowercase} lowercase letter(s).",
|
|
71
|
+
"minUppercase": "Password must contain at least {minUppercase} uppercase letter(s).",
|
|
72
|
+
"minNumbers": "Password must contain at least {minNumbers} number(s).",
|
|
73
|
+
"minSymbols": "Password must contain at least {minSymbols} special character(s)."
|
|
74
|
+
},
|
|
75
|
+
"createUser": {
|
|
76
|
+
"nameRequired": "Name is required."
|
|
77
|
+
},
|
|
78
|
+
"pinCode": {
|
|
79
|
+
"invalidLength": "PIN code must be exactly {length} digits long.",
|
|
80
|
+
"required": "PIN code is required."
|
|
81
|
+
},
|
|
82
|
+
"validation": {
|
|
83
|
+
"emailRequired": "Email is required.",
|
|
84
|
+
"emailInvalid": "The provided email is invalid.",
|
|
85
|
+
"currentEmailRequired": "Current email is required.",
|
|
86
|
+
"currentEmailInvalid": "The current email provided is invalid.",
|
|
87
|
+
"newEmailRequired": "New email is required.",
|
|
88
|
+
"newEmailInvalid": "The new email provided is invalid.",
|
|
89
|
+
"passwordRequired": "Password is required.",
|
|
90
|
+
"passwordMinLength": "Password must be at least 8 characters long.",
|
|
91
|
+
"passwordStrength": "Password must be at least 6 characters long and contain at least 1 lowercase letter.",
|
|
92
|
+
"codeMustBeString": "Code must be a string.",
|
|
93
|
+
"codeRequired": "Code is required.",
|
|
94
|
+
"tokenInvalid": "Invalid token.",
|
|
95
|
+
"tokenMustBeJWT": "Token must be a valid JWT.",
|
|
96
|
+
"methodTypeInvalid": "Method type must be totp, email, or recovery.",
|
|
97
|
+
"streetMustBeString": "Street must be a string.",
|
|
98
|
+
"numberMustBeString": "Number must be a string.",
|
|
99
|
+
"complementMustBeString": "Complement must be a string.",
|
|
100
|
+
"districtMustBeString": "District must be a string.",
|
|
101
|
+
"cityMustBeString": "City must be a string.",
|
|
102
|
+
"stateMustBeString": "State must be a string.",
|
|
103
|
+
"postalCodeMustBeString": "Postal code must be a string.",
|
|
104
|
+
"nameMustBeString": "Name must be a string.",
|
|
105
|
+
"nameRequired": "Name is required.",
|
|
106
|
+
"slugMustBeString": "Slug must be a string.",
|
|
107
|
+
"slugRequired": "Slug is required.",
|
|
108
|
+
"descriptionMustBeString": "Description must be a string.",
|
|
109
|
+
"descriptionRequired": "Description is required.",
|
|
110
|
+
"urlMustBeString": "URL must be a string.",
|
|
111
|
+
"urlRequired": "URL is required.",
|
|
112
|
+
"methodMustBeString": "Method must be a string.",
|
|
113
|
+
"methodMustBeValid": "Method must be a valid HTTP method (GET, POST, PUT, DELETE, PATCH, OPTIONS, or HEAD).",
|
|
114
|
+
"iconMustBeString": "Icon must be a string.",
|
|
115
|
+
"orderMustBeNumber": "Order must be a number.",
|
|
116
|
+
"tokenMustBe6Digits": "Token must be a 6-digit numeric string.",
|
|
117
|
+
"stringRequired": "This field must be a string.",
|
|
118
|
+
"numberRequired": "This field must be a number.",
|
|
119
|
+
"booleanRequired": "This field must be a boolean.",
|
|
120
|
+
"arrayRequired": "This field must be an array.",
|
|
121
|
+
"arrayNotEmpty": "Array must not be empty.",
|
|
122
|
+
"objectRequired": "This field must be an object.",
|
|
123
|
+
"fieldRequired": "This field is required.",
|
|
124
|
+
"minLength": "Minimum length is {min} characters.",
|
|
125
|
+
"maxLength": "Maximum length is {max} characters.",
|
|
126
|
+
"dateInvalid": "Invalid date format.",
|
|
127
|
+
"emailMustBeValid": "Email must be valid.",
|
|
128
|
+
"colorMustBeString": "Color must be a string.",
|
|
129
|
+
"colorRequired": "Color is required.",
|
|
130
|
+
"colorMustBeHex": "Color must be a valid hexadecimal color.",
|
|
131
|
+
"statusMustBeEnum": "Status must be a valid enum value.",
|
|
132
|
+
"statusMustBeString": "Status must be a string.",
|
|
133
|
+
"typeMustBeEnum": "Type must be a valid enum value.",
|
|
134
|
+
"localeMustBeObject": "Locale must be an object.",
|
|
135
|
+
"localeRequired": "Locale is required.",
|
|
136
|
+
"categoryIdMustBeNumber": "Category ID must be a number.",
|
|
137
|
+
"addressesMustBeArray": "Addresses must be an array.",
|
|
138
|
+
"addressTypeIdMustBeInteger": "Address type ID must be an integer.",
|
|
139
|
+
"contactsMustBeArray": "Contacts must be an array.",
|
|
140
|
+
"contactTypeIdMustBeInteger": "Contact type ID must be an integer.",
|
|
141
|
+
"countryCodeMustBeString": "Country code must be a string.",
|
|
142
|
+
"documentsMustBeArray": "Documents must be an array.",
|
|
143
|
+
"documentTypeIdMustBeInteger": "Document type ID must be an integer.",
|
|
144
|
+
"genderInvalid": "Gender must be a valid value.",
|
|
145
|
+
"idMustBeInteger": "ID must be an integer.",
|
|
146
|
+
"isPrimaryMustBeBoolean": "Is primary must be a boolean.",
|
|
147
|
+
"languageLength": "Language must be exactly 2 characters long.",
|
|
148
|
+
"line1MustBeString": "Address line 1 must be a string.",
|
|
149
|
+
"messageMustBeString": "Message must be a string.",
|
|
150
|
+
"responseMustBeString": "Response must be a string.",
|
|
151
|
+
"themeInvalid": "Theme must be one of: light, dark, or system.",
|
|
152
|
+
"tokenFormat": "Token must be in the correct format."
|
|
153
|
+
},
|
|
154
|
+
"file": {
|
|
155
|
+
"download": {
|
|
156
|
+
"not_found": "File not found.",
|
|
157
|
+
"invalid_token": "Invalid or expired download token.",
|
|
158
|
+
"error_title": "Download Failed",
|
|
159
|
+
"error_message": "We encountered an error while trying to download your file. The download link may have expired or is invalid.",
|
|
160
|
+
"error_details": "Error Details:",
|
|
161
|
+
"go_back": "Go Back"
|
|
162
|
+
},
|
|
163
|
+
"delete": {
|
|
164
|
+
"some_not_found": "Some files were not found."
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"mail": {
|
|
168
|
+
"template": {
|
|
169
|
+
"not_found": "Mail template with id {id} not found."
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"mail_sent_not_found": "Mail sent record not found.",
|
|
173
|
+
"validationSslugMustBeString": "Slug must be a string.",
|
|
174
|
+
"sessionRevoked": "Session has been revoked or expired.",
|
|
175
|
+
"dashboardNotFound": "Dashboard not found.",
|
|
176
|
+
"dashboardComponentNotFound": "Dashboard component not found.",
|
|
177
|
+
"dashboardItemNotFound": "Dashboard item not found."
|
|
178
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
{
|
|
2
|
+
"settingNotFound": "Configuração não encontrada ou o usuário não pode substituir.",
|
|
3
|
+
"userNotFound": "Usuário não encontrado.",
|
|
4
|
+
"roleNotFound": "Função não encontrada.",
|
|
5
|
+
"accessDenied": "Acesso negado.",
|
|
6
|
+
"defaultRoleNotFound": "Função de usuário padrão não encontrada.",
|
|
7
|
+
"defaultNameMfaEmail": "MFA de E-mail Padrão",
|
|
8
|
+
"urlSettingMissing": "Configuração de URL está faltando.",
|
|
9
|
+
"userIdentifierNotFound": "Identificador de usuário não encontrado.",
|
|
10
|
+
"invalidMfaCode": "Código MFA inválido.",
|
|
11
|
+
"invalidRecoveryCode": "Código de recuperação inválido.",
|
|
12
|
+
"noEmailMfaFound": "Nenhum método de MFA por e-mail encontrado para este usuário.",
|
|
13
|
+
"webauthnNotConfigured": "WebAuthn não configurado.",
|
|
14
|
+
"challengeNotFound": "Desafio não encontrado ou expirado.",
|
|
15
|
+
"verificationFailed": "Verificação falhou.",
|
|
16
|
+
"userIdsRequired": "Pelo menos um ID de usuário é necessário para excluir usuários.",
|
|
17
|
+
"invalidIds": "IDs inválidos.",
|
|
18
|
+
"invalidCode": "Código inválido.",
|
|
19
|
+
"totpNotFound": "Método TOTP não encontrado.",
|
|
20
|
+
"invalidMfaToken": "Token MFA inválido.",
|
|
21
|
+
"invalidJsonFile": "Arquivo não contém um JSON válido.",
|
|
22
|
+
"invalidJsonArray": "O arquivo JSON deve conter um array de settings.",
|
|
23
|
+
"deleteItemsRequired": "Você deve selecionar pelo menos um item para excluir.",
|
|
24
|
+
"signup": {
|
|
25
|
+
"emailExists": "E-mail já está em uso."
|
|
26
|
+
},
|
|
27
|
+
"forgot": {
|
|
28
|
+
"rateLimit": "Muitas solicitações. Por favor, tente novamente mais tarde.",
|
|
29
|
+
"userNotFound": "Usuário não encontrado."
|
|
30
|
+
},
|
|
31
|
+
"challenge": {
|
|
32
|
+
"invalidOrExpired": "O código informado é inválido ou expirou."
|
|
33
|
+
},
|
|
34
|
+
"reset": {
|
|
35
|
+
"password": {
|
|
36
|
+
"required": "Senha é obrigatória.",
|
|
37
|
+
"minLength": "A senha deve ter no mínimo 8 caracteres."
|
|
38
|
+
},
|
|
39
|
+
"code": {
|
|
40
|
+
"required": "Código de redefinição é obrigatório."
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"session": {
|
|
44
|
+
"userIdRequired": "O ID do usuário é necessário para criar uma sessão.",
|
|
45
|
+
"ipAddressRequired": "O endereço IP é necessário para criar uma sessão.",
|
|
46
|
+
"userAgentRequired": "O agente do usuário é necessário para criar uma sessão."
|
|
47
|
+
},
|
|
48
|
+
"profile": {
|
|
49
|
+
"update": {
|
|
50
|
+
"nameRequired": "Nome é obrigatório."
|
|
51
|
+
},
|
|
52
|
+
"emailIdentifierNotFound": "Identificador de email não encontrado.",
|
|
53
|
+
"defaultNameMfaEmail": "Verificação de Email",
|
|
54
|
+
"emailVerification": {
|
|
55
|
+
"pinInvalid": "O PIN deve conter exatamente 6 dígitos.",
|
|
56
|
+
"pinIsString": "O PIN deve ser uma string."
|
|
57
|
+
},
|
|
58
|
+
"changePassword": {
|
|
59
|
+
"currentPasswordIsString": "A senha atual deve ser uma string.",
|
|
60
|
+
"newPasswordIsString": "A nova senha deve ser uma string."
|
|
61
|
+
},
|
|
62
|
+
"sendEmailVerification": {
|
|
63
|
+
"emailIsString": "O email deve ser uma string."
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"password": {
|
|
67
|
+
"weakPassword": "A senha não atende aos requisitos de segurança definidos nas configurações do sistema.",
|
|
68
|
+
"required": "A senha é obrigatória.",
|
|
69
|
+
"minLength": "A senha deve ter no mínimo {minLength} caracteres.",
|
|
70
|
+
"minLowercase": "A senha deve conter pelo menos {minLowercase} letra(s) minúscula(s).",
|
|
71
|
+
"minUppercase": "A senha deve conter pelo menos {minUppercase} letra(s) maiúscula(s).",
|
|
72
|
+
"minNumbers": "A senha deve conter pelo menos {minNumbers} número(s).",
|
|
73
|
+
"minSymbols": "A senha deve conter pelo menos {minSymbols} caractere(s) especial(is)."
|
|
74
|
+
},
|
|
75
|
+
"createUser": {
|
|
76
|
+
"nameRequired": "Nome é obrigatório."
|
|
77
|
+
},
|
|
78
|
+
"pinCode": {
|
|
79
|
+
"invalidLength": "O código PIN deve conter exatamente {length} dígitos.",
|
|
80
|
+
"required": "O código PIN é obrigatório."
|
|
81
|
+
},
|
|
82
|
+
"validation": {
|
|
83
|
+
"emailRequired": "E-mail é obrigatório.",
|
|
84
|
+
"emailInvalid": "O e-mail fornecido não é válido.",
|
|
85
|
+
"currentEmailRequired": "O e-mail atual é obrigatório.",
|
|
86
|
+
"currentEmailInvalid": "O e-mail atual informado não é válido.",
|
|
87
|
+
"newEmailRequired": "O novo e-mail é obrigatório.",
|
|
88
|
+
"newEmailInvalid": "O novo e-mail informado não é válido.",
|
|
89
|
+
"passwordRequired": "A senha é obrigatória.",
|
|
90
|
+
"passwordMinLength": "A senha deve ter pelo menos 8 caracteres.",
|
|
91
|
+
"passwordStrength": "A senha deve ter pelo menos 6 caracteres e conter pelo menos 1 letra minúscula.",
|
|
92
|
+
"codeMustBeString": "O código deve ser uma string.",
|
|
93
|
+
"codeRequired": "Código é obrigatório.",
|
|
94
|
+
"tokenInvalid": "Token inválido.",
|
|
95
|
+
"tokenMustBeJWT": "Token deve ser um JWT válido.",
|
|
96
|
+
"methodTypeInvalid": "Tipo de método deve ser totp, email ou recovery.",
|
|
97
|
+
"streetMustBeString": "O endereço deve ser uma string.",
|
|
98
|
+
"numberMustBeString": "O número deve ser uma string.",
|
|
99
|
+
"complementMustBeString": "O complemento deve ser uma string.",
|
|
100
|
+
"districtMustBeString": "O bairro deve ser uma string.",
|
|
101
|
+
"cityMustBeString": "A cidade deve ser uma string.",
|
|
102
|
+
"stateMustBeString": "O estado deve ser uma string.",
|
|
103
|
+
"postalCodeMustBeString": "O CEP deve ser uma string.",
|
|
104
|
+
"nameMustBeString": "O nome deve ser uma string.",
|
|
105
|
+
"nameRequired": "Nome é obrigatório.",
|
|
106
|
+
"slugMustBeString": "O slug deve ser uma string.",
|
|
107
|
+
"slugRequired": "O slug é obrigatório.",
|
|
108
|
+
"descriptionMustBeString": "A descrição deve ser uma string.",
|
|
109
|
+
"descriptionRequired": "A descrição é obrigatória.",
|
|
110
|
+
"urlMustBeString": "A URL deve ser uma string.",
|
|
111
|
+
"urlRequired": "A URL é obrigatória.",
|
|
112
|
+
"methodMustBeString": "O método deve ser uma string.",
|
|
113
|
+
"methodMustBeValid": "O método deve ser um método HTTP válido (GET, POST, PUT, DELETE, PATCH, OPTIONS ou HEAD).",
|
|
114
|
+
"iconMustBeString": "O ícone deve ser uma string.",
|
|
115
|
+
"orderMustBeNumber": "A ordem deve ser um número.",
|
|
116
|
+
"tokenMustBe6Digits": "Token deve ser uma string numérica de 6 dígitos.",
|
|
117
|
+
"stringRequired": "Este campo deve ser uma string.",
|
|
118
|
+
"numberRequired": "Este campo deve ser um número.",
|
|
119
|
+
"booleanRequired": "Este campo deve ser um booleano.",
|
|
120
|
+
"arrayRequired": "Este campo deve ser um array.",
|
|
121
|
+
"arrayNotEmpty": "Array não pode estar vazio.",
|
|
122
|
+
"objectRequired": "Este campo deve ser um objeto.",
|
|
123
|
+
"fieldRequired": "Este campo é obrigatório.",
|
|
124
|
+
"minLength": "O comprimento mínimo é de {min} caracteres.",
|
|
125
|
+
"maxLength": "O comprimento máximo é de {max} caracteres.",
|
|
126
|
+
"dateInvalid": "Formato de data inválido.",
|
|
127
|
+
"emailMustBeValid": "E-mail deve ser válido.",
|
|
128
|
+
"colorMustBeString": "Cor deve ser uma string.",
|
|
129
|
+
"colorRequired": "Cor é obrigatória.",
|
|
130
|
+
"colorMustBeHex": "Cor deve ser um código hexadecimal válido.",
|
|
131
|
+
"statusMustBeEnum": "Status deve ser um valor enum válido.",
|
|
132
|
+
"statusMustBeString": "Status deve ser uma string.",
|
|
133
|
+
"typeMustBeEnum": "Tipo deve ser um valor enum válido.",
|
|
134
|
+
"localeMustBeObject": "Locale deve ser um objeto.",
|
|
135
|
+
"localeRequired": "Locale é obrigatório.",
|
|
136
|
+
"categoryIdMustBeNumber": "ID da categoria deve ser um número.",
|
|
137
|
+
"addressesMustBeArray": "Endereços devem ser um array.",
|
|
138
|
+
"addressTypeIdMustBeInteger": "ID do tipo de endereço deve ser um inteiro.",
|
|
139
|
+
"contactsMustBeArray": "Contatos devem ser um array.",
|
|
140
|
+
"contactTypeIdMustBeInteger": "ID do tipo de contato deve ser um inteiro.",
|
|
141
|
+
"countryCodeMustBeString": "Código do país deve ser uma string.",
|
|
142
|
+
"documentsMustBeArray": "Documentos devem ser um array.",
|
|
143
|
+
"documentTypeIdMustBeInteger": "ID do tipo de documento deve ser um inteiro.",
|
|
144
|
+
"genderInvalid": "Gênero deve ser um valor válido.",
|
|
145
|
+
"idMustBeInteger": "ID deve ser um inteiro.",
|
|
146
|
+
"isPrimaryMustBeBoolean": "É primário deve ser um booleano.",
|
|
147
|
+
"languageLength": "Idioma deve ter exatamente 2 caracteres.",
|
|
148
|
+
"line1MustBeString": "Linha 1 do endereço deve ser uma string.",
|
|
149
|
+
"messageMustBeString": "Mensagem deve ser uma string.",
|
|
150
|
+
"responseMustBeString": "Resposta deve ser uma string.",
|
|
151
|
+
"themeInvalid": "Tema deve ser um dos seguintes: light, dark ou system.",
|
|
152
|
+
"tokenFormat": "Token deve estar no formato correto."
|
|
153
|
+
},
|
|
154
|
+
"file": {
|
|
155
|
+
"download": {
|
|
156
|
+
"not_found": "Arquivo não encontrado.",
|
|
157
|
+
"invalid_token": "Token de download inválido ou expirado.",
|
|
158
|
+
"error_title": "Falha no Download",
|
|
159
|
+
"error_message": "Encontramos um erro ao tentar baixar seu arquivo. O link de download pode ter expirado ou é inválido.",
|
|
160
|
+
"error_details": "Detalhes do Erro:",
|
|
161
|
+
"go_back": "Voltar"
|
|
162
|
+
},
|
|
163
|
+
"delete": {
|
|
164
|
+
"some_not_found": "Alguns arquivos não foram encontrados."
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"mail": {
|
|
168
|
+
"template": {
|
|
169
|
+
"not_found": "Modelo de e-mail com id {id} não encontrado."
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"mail_sent_not_found": "Registro de e-mail enviado não encontrado.",
|
|
173
|
+
"validationSslugMustBeString": "O slug deve ser uma string.",
|
|
174
|
+
"sessionRevoked": "Sessão foi revogada ou expirou.",
|
|
175
|
+
"dashboardNotFound": "Dashboard não encontrado.",
|
|
176
|
+
"dashboardComponentNotFound": "Componente de dashboard não encontrado.",
|
|
177
|
+
"dashboardItemNotFound": "Item de dashboard não encontrado."
|
|
178
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mail.controller.d.ts","sourceRoot":"","sources":["../../src/mail/mail.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAQ,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"mail.controller.d.ts","sourceRoot":"","sources":["../../src/mail/mail.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAQ,MAAM,cAAc,CAAC;AAmB/C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,qBAEa,cAAc;IAGvB,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,WAAW;IAIrC,IAAI,CAAW,MAAM,KAAA,EAAgB,gBAAgB,KAAA;;;;;;;;;IAKrD,GAAG,CACoB,EAAE,EAAE,MAAM,EACpB,WAAW,CAAC,EAAE,MAAM,EAC3B,eAAe,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;IAQ9B,OAAO,CACgB,EAAE,EAAE,MAAM,EAC9B,GAAG,EAAE,QAAQ,EACH,WAAW,CAAC,EAAE,MAAM,EAC3B,eAAe,CAAC,EAAE,MAAM;IAc9B,MAAM,CAAS,IAAI,EAAE,SAAS;;;;;;;;;;;;;;;;;;;;;;;IAK9B,YAAY;;;;;;IAKZ,MAAM,CAA4B,EAAE,EAAE,MAAM,EAAU,IAAI,EAAE,SAAS;;;;;;;;;;;;;;;;;;;;;;;IAQrE,MAAM,CAAS,IAAI,EAAE,SAAS;;;IAK9B,YAAY,CAAW,MAAM,EAAE,MAAM,EAAU,IAAI,EAAE,WAAW;IAKhE,MAAM,CAAS,IAAI,EAAE,SAAS;;;;;;;;;;;CAGrC"}
|
|
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.MailController = void 0;
|
|
16
16
|
const api_1 = require("@hed-hog/api");
|
|
17
17
|
const api_locale_1 = require("@hed-hog/api-locale");
|
|
18
|
+
const api_mail_1 = require("@hed-hog/api-mail");
|
|
18
19
|
const api_pagination_1 = require("@hed-hog/api-pagination");
|
|
19
20
|
const common_1 = require("@nestjs/common");
|
|
20
21
|
const create_dto_1 = require("./dto/create.dto");
|
|
@@ -36,34 +37,10 @@ let MailController = class MailController {
|
|
|
36
37
|
async getHtml(id, res, queryLocale, decoratorLocale) {
|
|
37
38
|
const locale = queryLocale || decoratorLocale;
|
|
38
39
|
const mail = await this.mailService.get(locale, id);
|
|
39
|
-
const html =
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
44
|
-
<title>${mail.subject}</title>
|
|
45
|
-
<style>
|
|
46
|
-
body {
|
|
47
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
48
|
-
line-height: 1.6;
|
|
49
|
-
color: #333;
|
|
50
|
-
max-width: 600px;
|
|
51
|
-
margin: 0 auto;
|
|
52
|
-
padding: 20px;
|
|
53
|
-
}
|
|
54
|
-
a {
|
|
55
|
-
color: #0066cc;
|
|
56
|
-
text-decoration: none;
|
|
57
|
-
}
|
|
58
|
-
a:hover {
|
|
59
|
-
text-decoration: underline;
|
|
60
|
-
}
|
|
61
|
-
</style>
|
|
62
|
-
</head>
|
|
63
|
-
<body>
|
|
64
|
-
${mail.body}
|
|
65
|
-
</body>
|
|
66
|
-
</html>`;
|
|
40
|
+
const html = (0, api_mail_1.renderMailTemplate)({
|
|
41
|
+
subject: mail.subject,
|
|
42
|
+
body: mail.body,
|
|
43
|
+
});
|
|
67
44
|
res.setHeader('Content-Disposition', `attachment; filename="${mail.slug}-${locale}.html"`);
|
|
68
45
|
res.send(html);
|
|
69
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mail.controller.js","sourceRoot":"","sources":["../../src/mail/mail.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAA+C;AAC/C,oDAA6C;AAC7C,4DAAqD;AACrD,2CAcwB;AAExB,iDAA6C;AAC7C,iDAA6C;AAC7C,uDAAkD;AAClD,iDAA6C;AAC7C,iDAA6C;AAItC,IAAM,cAAc,GAApB,MAAM,cAAc;IACzB,YAEmB,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;IACxC,CAAC;IAGE,AAAN,KAA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A;;6CAAO,2BAAW;;kDAErE;AAGK;IADL,IAAA,aAAI,EAAC,QAAQ,CAAC;IACD,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;4CAEnC;yBAvEU,cAAc;IAF1B,IAAA,UAAI,GAAE;IACN,IAAA,mBAAU,EAAC,MAAM,CAAC;IAGd,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,0BAAW,CAAC,CAAC,CAAA;qCACR,0BAAW;GAHhC,cAAc,CAwE1B"}
|
package/dist/mail/mail.module.js
CHANGED
|
@@ -26,7 +26,7 @@ exports.MailModule = MailModule = __decorate([
|
|
|
26
26
|
imports: [api_prisma_1.PrismaModule],
|
|
27
27
|
inject: [api_prisma_1.PrismaService],
|
|
28
28
|
useFactory: async (prisma) => {
|
|
29
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
29
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
30
30
|
try {
|
|
31
31
|
const profileSettings = await prisma.setting.findMany({
|
|
32
32
|
where: {
|
|
@@ -37,12 +37,12 @@ exports.MailModule = MailModule = __decorate([
|
|
|
37
37
|
select: { slug: true, value: true },
|
|
38
38
|
});
|
|
39
39
|
const profileSettingsMap = new Map(profileSettings.map((item) => [item.slug, item.value]));
|
|
40
|
-
const
|
|
41
|
-
if (!
|
|
40
|
+
const profileSlug = String((_a = profileSettingsMap.get('mail-integration-profile-id')) !== null && _a !== void 0 ? _a : '').trim();
|
|
41
|
+
if (!profileSlug) {
|
|
42
42
|
return { global: true, type: 'SMTP', host: 'localhost', port: 1025, secure: false, username: '', password: '' };
|
|
43
43
|
}
|
|
44
44
|
const profile = await prisma.integration_profile.findUnique({
|
|
45
|
-
where: {
|
|
45
|
+
where: { slug: profileSlug },
|
|
46
46
|
include: {
|
|
47
47
|
integration_provider: { select: { slug: true } },
|
|
48
48
|
integration_type: { select: { slug: true } },
|
|
@@ -51,36 +51,36 @@ exports.MailModule = MailModule = __decorate([
|
|
|
51
51
|
if (!profile) {
|
|
52
52
|
return { global: true, type: 'SMTP', host: 'localhost', port: 1025, secure: false, username: '', password: '' };
|
|
53
53
|
}
|
|
54
|
-
if (((
|
|
54
|
+
if (((_b = profile.integration_type) === null || _b === void 0 ? void 0 : _b.slug) !== 'email') {
|
|
55
55
|
return { global: true, type: 'SMTP', host: 'localhost', port: 1025, secure: false, username: '', password: '' };
|
|
56
56
|
}
|
|
57
|
-
const cfg = (
|
|
57
|
+
const cfg = (_c = profile.config) !== null && _c !== void 0 ? _c : {};
|
|
58
58
|
const base = { global: true };
|
|
59
59
|
switch (profile.integration_provider.slug) {
|
|
60
60
|
case 'gmail':
|
|
61
61
|
return Object.assign(base, {
|
|
62
62
|
type: 'GMAIL',
|
|
63
|
-
clientId: String((
|
|
64
|
-
clientSecret: String((
|
|
65
|
-
refreshToken: String((
|
|
66
|
-
from: String((
|
|
63
|
+
clientId: String((_d = cfg.client_id) !== null && _d !== void 0 ? _d : ''),
|
|
64
|
+
clientSecret: String((_e = cfg.client_secret) !== null && _e !== void 0 ? _e : ''),
|
|
65
|
+
refreshToken: String((_f = cfg.refresh_token) !== null && _f !== void 0 ? _f : ''),
|
|
66
|
+
from: String((_g = cfg.from_email) !== null && _g !== void 0 ? _g : ''),
|
|
67
67
|
});
|
|
68
68
|
case 'smtp':
|
|
69
69
|
return Object.assign(base, {
|
|
70
70
|
type: 'SMTP',
|
|
71
|
-
host: String((
|
|
72
|
-
port: Number((
|
|
71
|
+
host: String((_h = cfg.host) !== null && _h !== void 0 ? _h : 'localhost'),
|
|
72
|
+
port: Number((_j = cfg.port) !== null && _j !== void 0 ? _j : 1025),
|
|
73
73
|
secure: Boolean(cfg.secure),
|
|
74
|
-
username: String((
|
|
75
|
-
password: String((
|
|
74
|
+
username: String((_k = cfg.username) !== null && _k !== void 0 ? _k : ''),
|
|
75
|
+
password: String((_l = cfg.password) !== null && _l !== void 0 ? _l : ''),
|
|
76
76
|
});
|
|
77
77
|
case 'ses':
|
|
78
78
|
return Object.assign(base, {
|
|
79
79
|
type: 'SES',
|
|
80
|
-
region: String((
|
|
81
|
-
accessKeyId: String((
|
|
82
|
-
secretAccessKey: String((
|
|
83
|
-
from: String((
|
|
80
|
+
region: String((_m = cfg.region) !== null && _m !== void 0 ? _m : ''),
|
|
81
|
+
accessKeyId: String((_o = cfg.access_key_id) !== null && _o !== void 0 ? _o : ''),
|
|
82
|
+
secretAccessKey: String((_p = cfg.secret_access_key) !== null && _p !== void 0 ? _p : ''),
|
|
83
|
+
from: String((_q = cfg.from_email) !== null && _q !== void 0 ? _q : ''),
|
|
84
84
|
});
|
|
85
85
|
default:
|
|
86
86
|
return { global: true, type: 'SMTP', host: 'localhost', port: 1025, secure: false, username: '', password: '' };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mail.module.js","sourceRoot":"","sources":["../../src/mail/mail.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAmD;AACnD,gDAAoF;AACpF,4DAA2D;AAC3D,oDAAkE;AAClE,2CAAoD;AACpD,oEAA+D;AAC/D,8DAA0D;AAC1D,uDAAmD;AACnD,iDAA6C;AA8FtC,IAAM,UAAU,GAAhB,MAAM,UAAU;CAAI,CAAA;AAAd,gCAAU;qBAAV,UAAU;IA5FtB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qBAAc,CAAC,YAAY,CAAC;gBAC3C,OAAO,EAAE,CAAC,yBAAY,CAAC;gBACvB,MAAM,EAAE,CAAC,0BAAa,CAAC;gBACvB,UAAU,EAAE,KAAK,EAAE,MAAqB,EAAE,EAAE;;oBAC1C,IAAI,CAAC;wBACH,MAAM,eAAe,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;4BACpD,KAAK,EAAE;gCACL,IAAI,EAAE;oCACJ,EAAE,EAAE,CAA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BAAW,CAAC;QACxB,OAAO,EAAE,CAAC,0BAAW,CAAC;KACvB,CAAC;GACW,UAAU,CAAI"}
|
|
@@ -27,16 +27,27 @@ export declare class MailService implements OnModuleInit {
|
|
|
27
27
|
private syncConfiguredMailFlag;
|
|
28
28
|
/**
|
|
29
29
|
* Reload mail configuration from database and update MailMainService.
|
|
30
|
-
* When
|
|
30
|
+
* When profileSlug is provided, that profile is used directly.
|
|
31
31
|
* Otherwise the global integration profile setting is read.
|
|
32
32
|
* Returns the active from address and the built config object.
|
|
33
33
|
*/
|
|
34
|
-
reloadConfig(
|
|
34
|
+
reloadConfig(profileSlug?: string): Promise<{
|
|
35
35
|
success: boolean;
|
|
36
36
|
provider: string;
|
|
37
37
|
from: string;
|
|
38
38
|
config: any;
|
|
39
39
|
}>;
|
|
40
|
+
/**
|
|
41
|
+
* Sends an ad-hoc HTML email using the configured (or given) mail profile,
|
|
42
|
+
* without requiring a stored template. Used by other modules (e.g. agent
|
|
43
|
+
* human-approval notifications).
|
|
44
|
+
*/
|
|
45
|
+
sendRawMail({ to, subject, html, profileSlug, }: {
|
|
46
|
+
to: string;
|
|
47
|
+
subject: string;
|
|
48
|
+
html: string;
|
|
49
|
+
profileSlug?: string;
|
|
50
|
+
}): Promise<any>;
|
|
40
51
|
list(locale: string, paginationParams: PaginationDTO): Promise<{
|
|
41
52
|
total: any;
|
|
42
53
|
lastPage: number;
|