@cosmicdrift/kumiko-bundled-features 0.412.0 → 0.413.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/dist/admin-shell/feature.d.ts +1 -1
- package/dist/agent-tools/api-docs/anchors.js +1 -1
- package/dist/auth-email-password/boot-rules.d.ts +7 -0
- package/dist/auth-email-password/boot-rules.js +7 -0
- package/dist/auth-email-password/feature.js +6 -13
- package/dist/auth-email-password/validate-options.d.ts +5 -0
- package/dist/auth-email-password/validate-options.js +15 -0
- package/dist/billing-foundation/boot-rules.d.ts +22 -0
- package/dist/billing-foundation/boot-rules.js +22 -0
- package/dist/billing-foundation/validate-options.js +56 -18
- package/dist/cap-overview/boot-rules.d.ts +12 -0
- package/dist/cap-overview/boot-rules.js +12 -0
- package/dist/cap-overview/feature.js +8 -3
- package/dist/documents/boot-rules.d.ts +12 -0
- package/dist/documents/boot-rules.js +12 -0
- package/dist/documents/feature.js +8 -3
- package/dist/file-derivatives/boot-rules.d.ts +7 -0
- package/dist/file-derivatives/boot-rules.js +7 -0
- package/dist/file-derivatives/feature.js +5 -2
- package/dist/folders/boot-rules.d.ts +7 -0
- package/dist/folders/boot-rules.js +7 -0
- package/dist/folders/feature.js +8 -5
- package/dist/helpdesk/boot-rules.d.ts +7 -0
- package/dist/helpdesk/boot-rules.js +7 -0
- package/dist/{contact → helpdesk}/challenge.js +2 -2
- package/dist/helpdesk/client/helpdesk-client-source.d.ts +1 -0
- package/dist/{contact/client/contact-client-source.js → helpdesk/client/helpdesk-client-source.js} +4 -4
- package/dist/helpdesk/client/helpdesk-website-client.d.ts +26 -0
- package/dist/helpdesk/client/index.d.ts +2 -0
- package/dist/helpdesk/client/index.js +1 -0
- package/dist/{contact → helpdesk}/entity.d.ts +6 -6
- package/dist/{contact → helpdesk}/entity.js +31 -27
- package/dist/helpdesk/feature.d.ts +3 -0
- package/dist/{contact → helpdesk}/feature.js +43 -39
- package/dist/{contact → helpdesk}/handlers/attempts.d.ts +2 -2
- package/dist/helpdesk/handlers/challenge.query.d.ts +9 -0
- package/dist/{contact → helpdesk}/handlers/challenge.query.js +5 -5
- package/dist/helpdesk/handlers/forward-request.write.d.ts +9 -0
- package/dist/{contact → helpdesk}/handlers/forward-request.write.js +17 -15
- package/dist/{contact → helpdesk}/handlers/mark-done.write.d.ts +2 -2
- package/dist/{contact → helpdesk}/handlers/mark-done.write.js +8 -8
- package/dist/{contact → helpdesk}/handlers/notify-reporter-in-app.write.d.ts +2 -2
- package/dist/{contact → helpdesk}/handlers/notify-reporter-in-app.write.js +11 -11
- package/dist/{contact → helpdesk}/handlers/open-count.js +2 -2
- package/dist/{contact → helpdesk}/handlers/open-count.query.js +4 -4
- package/dist/{contact → helpdesk}/handlers/replies.query.js +6 -6
- package/dist/{contact → helpdesk}/handlers/reply.write.d.ts +4 -4
- package/dist/{contact → helpdesk}/handlers/reply.write.js +16 -16
- package/dist/helpdesk/handlers/report.write.d.ts +16 -0
- package/dist/{contact → helpdesk}/handlers/report.write.js +17 -17
- package/dist/helpdesk/handlers/request-delivery.query.d.ts +16 -0
- package/dist/{contact → helpdesk}/handlers/request-delivery.query.js +24 -24
- package/dist/{contact → helpdesk}/handlers/request-detail.query.d.ts +3 -3
- package/dist/{contact → helpdesk}/handlers/request-detail.query.js +10 -10
- package/dist/{contact → helpdesk}/handlers/request-list.query.js +2 -2
- package/dist/helpdesk/handlers/send-reply-mail.write.d.ts +8 -0
- package/dist/{contact → helpdesk}/handlers/send-reply-mail.write.js +15 -15
- package/dist/helpdesk/handlers/send-test.write.d.ts +5 -0
- package/dist/{contact → helpdesk}/handlers/send-test.write.js +10 -10
- package/dist/{contact → helpdesk}/handlers/submit.write.d.ts +4 -4
- package/dist/{contact → helpdesk}/handlers/submit.write.js +17 -17
- package/dist/{contact → helpdesk}/handlers/take-over-uploads.js +5 -5
- package/dist/{contact → helpdesk}/i18n.d.ts +1 -1
- package/dist/{contact → helpdesk}/i18n.js +78 -75
- package/dist/helpdesk/index.d.ts +5 -0
- package/dist/helpdesk/index.js +4 -0
- package/dist/{contact → helpdesk}/lib.d.ts +5 -5
- package/dist/{contact → helpdesk}/lib.js +16 -16
- package/dist/{contact → helpdesk}/mail.d.ts +20 -20
- package/dist/{contact → helpdesk}/mail.js +47 -47
- package/dist/{contact → helpdesk}/options.d.ts +6 -6
- package/dist/helpdesk/options.js +36 -0
- package/dist/helpdesk/panels.d.ts +2 -0
- package/dist/helpdesk/panels.js +21 -0
- package/dist/{contact → helpdesk}/payloads.d.ts +11 -11
- package/dist/{contact → helpdesk}/payloads.js +28 -28
- package/dist/helpdesk/screens.d.ts +5 -0
- package/dist/{contact → helpdesk}/screens.js +87 -87
- package/dist/{contact → helpdesk}/subject.js +3 -3
- package/dist/helpdesk/user-data-hooks.d.ts +3 -0
- package/dist/{contact → helpdesk}/user-data-hooks.js +15 -15
- package/dist/helpdesk/web/constants.d.ts +127 -0
- package/dist/helpdesk/web/constants.js +126 -0
- package/dist/helpdesk/web/index.d.ts +1 -0
- package/dist/helpdesk/web/index.js +1 -0
- package/dist/host-routing/boot-rules.d.ts +22 -0
- package/dist/host-routing/boot-rules.js +22 -0
- package/dist/host-routing/validate-options.js +35 -11
- package/dist/jobs/boot-rules.d.ts +7 -0
- package/dist/jobs/boot-rules.js +7 -0
- package/dist/jobs/feature.js +5 -2
- package/dist/legal-pages/boot-rules.d.ts +17 -0
- package/dist/legal-pages/boot-rules.js +17 -0
- package/dist/legal-pages/feature.js +5 -2
- package/dist/legal-pages/lib/validate-routes.js +11 -3
- package/dist/metrics/boot-rules.d.ts +12 -0
- package/dist/metrics/boot-rules.js +12 -0
- package/dist/metrics/validate.js +8 -2
- package/dist/notes-history/boot-rules.d.ts +7 -0
- package/dist/notes-history/boot-rules.js +7 -0
- package/dist/notes-history/feature.js +7 -4
- package/dist/personal-access-tokens/boot-rules.d.ts +7 -0
- package/dist/personal-access-tokens/boot-rules.js +7 -0
- package/dist/personal-access-tokens/scope-events-check.js +7 -4
- package/dist/presence/boot-rules.d.ts +7 -0
- package/dist/presence/boot-rules.js +7 -0
- package/dist/presence/options.js +5 -1
- package/dist/readiness/boot-rules.d.ts +12 -0
- package/dist/readiness/boot-rules.js +12 -0
- package/dist/readiness/probe-boot-check.js +8 -3
- package/dist/shared/assert-no-where-rule-in-ownership-write.d.ts +1 -1
- package/dist/shared/assert-no-where-rule-in-ownership-write.js +11 -7
- package/dist/shared/boot-rules.d.ts +7 -0
- package/dist/shared/boot-rules.js +7 -0
- package/dist/subscription-mollie/boot-rules.d.ts +17 -0
- package/dist/subscription-mollie/boot-rules.js +17 -0
- package/dist/subscription-mollie/feature.js +13 -6
- package/dist/tags/boot-rules.d.ts +7 -0
- package/dist/tags/boot-rules.js +7 -0
- package/dist/tags/feature.js +8 -5
- package/dist/template-resolver/boot-rules.d.ts +17 -0
- package/dist/template-resolver/boot-rules.js +17 -0
- package/dist/template-resolver/feature.js +14 -5
- package/dist/tenant/boot-rules.d.ts +7 -0
- package/dist/tenant/boot-rules.js +7 -0
- package/dist/tenant/feature.js +5 -2
- package/kumiko-es-tables.json +4 -4
- package/package.json +29 -29
- package/src/{contact → helpdesk}/changes.json +6 -0
- package/dist/contact/client/contact-client-source.d.ts +0 -1
- package/dist/contact/client/contact-website-client.d.ts +0 -26
- package/dist/contact/client/index.d.ts +0 -2
- package/dist/contact/client/index.js +0 -1
- package/dist/contact/feature.d.ts +0 -3
- package/dist/contact/handlers/challenge.query.d.ts +0 -9
- package/dist/contact/handlers/forward-request.write.d.ts +0 -9
- package/dist/contact/handlers/report.write.d.ts +0 -16
- package/dist/contact/handlers/request-delivery.query.d.ts +0 -16
- package/dist/contact/handlers/send-reply-mail.write.d.ts +0 -8
- package/dist/contact/handlers/send-test.write.d.ts +0 -5
- package/dist/contact/index.d.ts +0 -5
- package/dist/contact/index.js +0 -4
- package/dist/contact/options.js +0 -32
- package/dist/contact/panels.d.ts +0 -2
- package/dist/contact/panels.js +0 -21
- package/dist/contact/screens.d.ts +0 -5
- package/dist/contact/user-data-hooks.d.ts +0 -3
- package/dist/contact/web/constants.d.ts +0 -127
- package/dist/contact/web/constants.js +0 -126
- package/dist/contact/web/index.d.ts +0 -1
- package/dist/contact/web/index.js +0 -1
- /package/dist/{contact → helpdesk}/challenge.d.ts +0 -0
- /package/dist/{contact/client/contact-website-client.js → helpdesk/client/helpdesk-website-client.js} +0 -0
- /package/dist/{contact → helpdesk}/handlers/access.d.ts +0 -0
- /package/dist/{contact → helpdesk}/handlers/access.js +0 -0
- /package/dist/{contact → helpdesk}/handlers/attempts.js +0 -0
- /package/dist/{contact → helpdesk}/handlers/open-count.d.ts +0 -0
- /package/dist/{contact → helpdesk}/handlers/open-count.query.d.ts +0 -0
- /package/dist/{contact → helpdesk}/handlers/replies.query.d.ts +0 -0
- /package/dist/{contact → helpdesk}/handlers/request-list.query.d.ts +0 -0
- /package/dist/{contact → helpdesk}/handlers/take-over-uploads.d.ts +0 -0
- /package/dist/{contact → helpdesk}/pow.d.ts +0 -0
- /package/dist/{contact → helpdesk}/pow.js +0 -0
- /package/dist/{contact → helpdesk}/subject.d.ts +0 -0
- /package/dist/{contact → helpdesk}/user-agent.d.ts +0 -0
- /package/dist/{contact → helpdesk}/user-agent.js +0 -0
|
@@ -4,14 +4,14 @@ import { InternalError, isKumikoError, UnprocessableError, writeFailure, } from
|
|
|
4
4
|
import { normalizePayloadBucketValue } from "@cosmicdrift/kumiko-framework/pipeline";
|
|
5
5
|
import { generateId } from "@cosmicdrift/kumiko-framework/utils";
|
|
6
6
|
import { consumeChallenge } from "../challenge.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { helpdeskDb, normalizeEmail, phoneProblem, platformActor, requestExecutor, sendBestEffort, } from "../lib.js";
|
|
8
|
+
import { helpdeskAcknowledgementVariables, resolveHelpdeskMailLocale } from "../mail.js";
|
|
9
9
|
import { DEFAULT_SUBMIT_EMAIL_RATE_LIMITS, DEFAULT_SUBMIT_RATE_LIMIT, } from "../options.js";
|
|
10
|
-
import {
|
|
10
|
+
import { HelpdeskSubmitSchema } from "../payloads.js";
|
|
11
11
|
import { verifyProofOfWork } from "../pow.js";
|
|
12
12
|
import { deriveSubjectFromMessage } from "../subject.js";
|
|
13
13
|
import { summarizeUserAgent } from "../user-agent.js";
|
|
14
|
-
import {
|
|
14
|
+
import { HELPDESK_NOTIFICATION_TYPES, HELPDESK_SOURCE, HELPDESK_STATUS, HelpdeskHandlers, helpdeskIdempotencyKeys, } from "../web/constants.js";
|
|
15
15
|
import { SUBMIT_ROLES } from "./access.js";
|
|
16
16
|
// Identical body for stored and silently dropped submits, so a bot learns nothing from it.
|
|
17
17
|
const SUBMITTED = {
|
|
@@ -31,7 +31,7 @@ async function findDropReason(payload, ctx, settings) {
|
|
|
31
31
|
const redis = ctx.services.redis;
|
|
32
32
|
if (!redis) {
|
|
33
33
|
throw new InternalError({
|
|
34
|
-
message: "
|
|
34
|
+
message: "helpdesk:submit requires ctx.services.redis for the challenge store",
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
const issued = await consumeChallenge(redis, payload.challenge);
|
|
@@ -53,11 +53,11 @@ async function enforceEmailLimits(ctx, payload, limits) {
|
|
|
53
53
|
const { rateLimit } = ctx.services;
|
|
54
54
|
if (!rateLimit || !ctx.rateLimitDigest) {
|
|
55
55
|
throw new InternalError({
|
|
56
|
-
message: "
|
|
56
|
+
message: "helpdesk:submit declares an email rate limit but no rate limiter or digest is wired",
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
const requests = limits.map(({ per, limit, windowSeconds, cost, normalize }) => ({
|
|
60
|
-
bucket: `
|
|
60
|
+
bucket: `helpdesk-submit:${per.payloadField}:${ctx.rateLimitDigest?.(normalizePayloadBucketValue(payload.email, normalize))}`,
|
|
61
61
|
config: { limit, windowSeconds, ...(cost !== undefined && { cost }) },
|
|
62
62
|
}));
|
|
63
63
|
try {
|
|
@@ -74,7 +74,7 @@ export function createSubmitHandler(opts, settings) {
|
|
|
74
74
|
const emailRateLimits = opts.emailRateLimits ?? DEFAULT_SUBMIT_EMAIL_RATE_LIMITS;
|
|
75
75
|
return defineWriteHandler({
|
|
76
76
|
name: "submit",
|
|
77
|
-
schema:
|
|
77
|
+
schema: HelpdeskSubmitSchema,
|
|
78
78
|
access: { roles: SUBMIT_ROLES, personalData: "public-intake", anySignedIn: true },
|
|
79
79
|
rateLimit: opts.rateLimit ?? DEFAULT_SUBMIT_RATE_LIMIT,
|
|
80
80
|
agent: { expose: false },
|
|
@@ -83,7 +83,7 @@ export function createSubmitHandler(opts, settings) {
|
|
|
83
83
|
const payload = event.payload;
|
|
84
84
|
const dropReason = await findDropReason(payload, ctx, settings);
|
|
85
85
|
if (dropReason !== null) {
|
|
86
|
-
ctx.obs.log?.info("[
|
|
86
|
+
ctx.obs.log?.info("[helpdesk:submit] dropped", { reason: dropReason });
|
|
87
87
|
return SUBMITTED;
|
|
88
88
|
}
|
|
89
89
|
// Before the email limit, so a mistyped phone number does not use up the sender's quota.
|
|
@@ -99,8 +99,8 @@ export function createSubmitHandler(opts, settings) {
|
|
|
99
99
|
const created = await requestExecutor.create({
|
|
100
100
|
id: requestId,
|
|
101
101
|
kind: payload.kind,
|
|
102
|
-
status:
|
|
103
|
-
source:
|
|
102
|
+
status: HELPDESK_STATUS.Open,
|
|
103
|
+
source: HELPDESK_SOURCE.Website,
|
|
104
104
|
subject: deriveSubjectFromMessage(payload.message),
|
|
105
105
|
message: payload.message,
|
|
106
106
|
name: payload.name,
|
|
@@ -112,24 +112,24 @@ export function createSubmitHandler(opts, settings) {
|
|
|
112
112
|
submittedAt: ctx.tz.now(),
|
|
113
113
|
fileCount: 0,
|
|
114
114
|
replyCount: 0,
|
|
115
|
-
}, platformActor(),
|
|
115
|
+
}, platformActor(), helpdeskDb(ctx));
|
|
116
116
|
if (!created.isSuccess)
|
|
117
117
|
return created;
|
|
118
118
|
await sendBestEffort(ctx, "forward request", async () => {
|
|
119
|
-
const forwarded = await ctx.dispatch.writeAs(platformActor(),
|
|
119
|
+
const forwarded = await ctx.dispatch.writeAs(platformActor(), HelpdeskHandlers.forwardRequest, { requestId });
|
|
120
120
|
if (!forwarded.isSuccess)
|
|
121
121
|
throw new Error(forwarded.error.message);
|
|
122
122
|
});
|
|
123
|
-
await sendBestEffort(ctx, "confirmation mail", (notify) => notify(
|
|
123
|
+
await sendBestEffort(ctx, "confirmation mail", (notify) => notify(HELPDESK_NOTIFICATION_TYPES.acknowledgement, {
|
|
124
124
|
route: { email },
|
|
125
125
|
recipientId: requestId,
|
|
126
|
-
data:
|
|
126
|
+
data: helpdeskAcknowledgementVariables({
|
|
127
127
|
appName: opts.appName,
|
|
128
128
|
locale: payload.locale,
|
|
129
129
|
}),
|
|
130
|
-
idempotencyKey:
|
|
130
|
+
idempotencyKey: helpdeskIdempotencyKeys.confirmation(requestId),
|
|
131
131
|
priority: "normal",
|
|
132
|
-
locale:
|
|
132
|
+
locale: resolveHelpdeskMailLocale(payload.locale),
|
|
133
133
|
}));
|
|
134
134
|
return SUBMITTED;
|
|
135
135
|
},
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { SYSTEM_TENANT_ID, } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import { copyPendingFileRefsToTenant } from "@cosmicdrift/kumiko-framework/files";
|
|
3
3
|
import { fileContextForTenant } from "../../file-foundation/index.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { helpdeskDb, platformActor } from "../lib.js";
|
|
5
|
+
import { HELPDESK_UPLOAD_FIELD } from "../web/constants.js";
|
|
6
6
|
// The form uploads into the submitter's tenant; the request or reply lives in the system tenant.
|
|
7
7
|
export async function takeOverUploads(ctx, args) {
|
|
8
8
|
if (args.fileIds.length === 0)
|
|
9
9
|
return { isSuccess: true, data: [] };
|
|
10
|
-
const db =
|
|
10
|
+
const db = helpdeskDb(ctx);
|
|
11
11
|
const submitterTenantId = args.user.tenantId;
|
|
12
12
|
return copyPendingFileRefsToTenant({
|
|
13
13
|
source: {
|
|
@@ -15,7 +15,7 @@ export async function takeOverUploads(ctx, args) {
|
|
|
15
15
|
user: args.user,
|
|
16
16
|
files: fileContextForTenant(ctx, submitterTenantId, submitterTenantId),
|
|
17
17
|
entityType: args.screen,
|
|
18
|
-
fieldName:
|
|
18
|
+
fieldName: HELPDESK_UPLOAD_FIELD,
|
|
19
19
|
},
|
|
20
20
|
target: {
|
|
21
21
|
db,
|
|
@@ -24,7 +24,7 @@ export async function takeOverUploads(ctx, args) {
|
|
|
24
24
|
files: fileContextForTenant(ctx, submitterTenantId, SYSTEM_TENANT_ID),
|
|
25
25
|
attachTo: {
|
|
26
26
|
entityType: args.entityType,
|
|
27
|
-
fieldName:
|
|
27
|
+
fieldName: HELPDESK_UPLOAD_FIELD,
|
|
28
28
|
entityId: args.entityId,
|
|
29
29
|
},
|
|
30
30
|
},
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
const DELIVERY_FIELD = "
|
|
2
|
-
const REQUEST_FIELD = "
|
|
3
|
-
const REPLY_ENTITY_FIELD = "
|
|
1
|
+
const DELIVERY_FIELD = "helpdesk:entity:helpdesk-delivery:field";
|
|
2
|
+
const REQUEST_FIELD = "helpdesk:entity:helpdesk-request:field";
|
|
3
|
+
const REPLY_ENTITY_FIELD = "helpdesk:entity:helpdesk-reply:field";
|
|
4
4
|
// Option labels of an actionForm select resolve against the renderer's pseudo-entity, not a real one.
|
|
5
|
-
const FORM_FIELD = "
|
|
6
|
-
export function
|
|
5
|
+
const FORM_FIELD = "helpdesk:entity:__action-form__:field";
|
|
6
|
+
export function createHelpdeskI18n() {
|
|
7
7
|
return {
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
8
|
+
"helpdesk:feature.label": { en: "Contact", de: "Kontakt" },
|
|
9
|
+
"helpdesk:notify.new-request.label": { en: "New contact request", de: "Neue Meldung" },
|
|
10
|
+
"helpdesk:notify.confirmation.label": {
|
|
11
11
|
en: "Contact confirmation",
|
|
12
12
|
de: "Bestätigung der Meldung",
|
|
13
13
|
},
|
|
14
|
-
"
|
|
14
|
+
"helpdesk:notify.acknowledgement.label": {
|
|
15
15
|
en: "Contact acknowledgement",
|
|
16
16
|
de: "Eingangsbestätigung der Meldung",
|
|
17
17
|
},
|
|
18
|
-
"
|
|
18
|
+
"helpdesk:notify.reply.label": {
|
|
19
19
|
en: "Reply to a contact request",
|
|
20
20
|
de: "Antwort auf eine Meldung",
|
|
21
21
|
},
|
|
22
|
-
"
|
|
22
|
+
"helpdesk:notify.reply-in-app.label": {
|
|
23
23
|
en: "Reply note in the app",
|
|
24
24
|
de: "Hinweis auf eine Antwort in der App",
|
|
25
25
|
},
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
26
|
+
"helpdesk:notify.test.label": { en: "Contact test message", de: "Testnachricht Kontakt" },
|
|
27
|
+
"helpdesk:report.submit": { en: "Send report", de: "Meldung senden" },
|
|
28
|
+
"helpdesk:reply.submit": { en: "Send reply", de: "Antwort senden" },
|
|
29
|
+
"helpdesk:overview.open": { en: "Open requests", de: "Offene Meldungen" },
|
|
30
|
+
"helpdesk:filter.open": { en: "Open", de: "Offen" },
|
|
31
|
+
"helpdesk:config.reply-to.label": { en: "Reply-To address", de: "Antwortadresse" },
|
|
32
|
+
"helpdesk:config.telegram-chat.label": { en: "Chat id or @channel", de: "Chat-ID oder @Kanal" },
|
|
33
|
+
"helpdesk:entity:helpdesk-request:field:kind": { en: "Kind", de: "Art" },
|
|
34
|
+
"helpdesk:entity:helpdesk-request:field:status": { en: "Status", de: "Status" },
|
|
35
|
+
"helpdesk:entity:helpdesk-request:field:source": { en: "Source", de: "Quelle" },
|
|
36
|
+
"helpdesk:entity:helpdesk-request:field:subject": { en: "Subject", de: "Betreff" },
|
|
37
|
+
"helpdesk:entity:helpdesk-request:field:message": { en: "Message", de: "Nachricht" },
|
|
38
|
+
"helpdesk:entity:helpdesk-request:field:name": { en: "Name", de: "Name" },
|
|
39
|
+
"helpdesk:entity:helpdesk-request:field:email": { en: "Email", de: "E-Mail" },
|
|
40
|
+
"helpdesk:entity:helpdesk-request:field:phone": { en: "Phone", de: "Telefon" },
|
|
41
|
+
"helpdesk:entity:helpdesk-request:field:submittedAt": { en: "Received", de: "Eingang" },
|
|
42
|
+
"helpdesk:entity:helpdesk-request:field:answeredAt": { en: "Answered", de: "Beantwortet" },
|
|
43
|
+
"helpdesk:entity:helpdesk-request:field:closedAt": { en: "Closed", de: "Abgeschlossen" },
|
|
44
|
+
"helpdesk:entity:helpdesk-request:field:replyCount": { en: "Replies", de: "Antworten" },
|
|
45
|
+
"helpdesk:report.hint": {
|
|
46
46
|
en: "Goes straight to the {appName} team",
|
|
47
47
|
de: "Geht direkt an das Team von {appName}",
|
|
48
48
|
},
|
|
49
|
-
"
|
|
49
|
+
"helpdesk:config.send-test.description": {
|
|
50
50
|
en: "Now sends a test message to the chat.",
|
|
51
51
|
de: "Schickt jetzt eine Testnachricht an den Chat.",
|
|
52
52
|
},
|
|
@@ -56,24 +56,24 @@ export function createContactI18n() {
|
|
|
56
56
|
"screen:reply.title": { en: "Reply", de: "Antworten" },
|
|
57
57
|
"screen:reply-mail.title": { en: "Reply", de: "Antworten" },
|
|
58
58
|
"screen:forwarding.title": { en: "Forwarding of requests", de: "Weiterleitung von Meldungen" },
|
|
59
|
-
"
|
|
59
|
+
"helpdesk:report.summary": {
|
|
60
60
|
en: "The answer comes by email to your account address, usually the same working day.",
|
|
61
61
|
de: "Die Antwort kommt per Mail an die Adresse deines Kontos, meist am selben Werktag.",
|
|
62
62
|
},
|
|
63
|
-
"
|
|
64
|
-
"
|
|
63
|
+
"helpdesk:report.section": { en: "Your report", de: "Deine Meldung" },
|
|
64
|
+
"helpdesk:report.section.description": {
|
|
65
65
|
en: "We attach account, tenant, app version and browser automatically.",
|
|
66
66
|
de: "Konto, Mandant, App-Version und Browser hängen wir automatisch an.",
|
|
67
67
|
},
|
|
68
|
-
"
|
|
68
|
+
"helpdesk:report.success": {
|
|
69
69
|
en: "Thanks, your report has arrived. The answer comes by email.",
|
|
70
70
|
de: "Danke, deine Meldung ist angekommen. Die Antwort kommt per Mail.",
|
|
71
71
|
},
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
72
|
+
"helpdesk:report.field.kind": { en: "Kind", de: "Art" },
|
|
73
|
+
"helpdesk:report.field.phone": { en: "Phone", de: "Telefon" },
|
|
74
|
+
"helpdesk:report.field.subject": { en: "Subject", de: "Betreff" },
|
|
75
|
+
"helpdesk:report.field.message": { en: "What happened?", de: "Was ist passiert?" },
|
|
76
|
+
"helpdesk:report.field.files": { en: "Files", de: "Dateien" },
|
|
77
77
|
[`${FORM_FIELD}:name`]: { en: "Reporter", de: "Absender" },
|
|
78
78
|
[`${FORM_FIELD}:email`]: { en: "Email", de: "E-Mail" },
|
|
79
79
|
[`${FORM_FIELD}:replyTo`]: { en: "Replies go to", de: "Rückantworten an" },
|
|
@@ -81,40 +81,40 @@ export function createContactI18n() {
|
|
|
81
81
|
[`${FORM_FIELD}:kind:option:question`]: { en: "Question", de: "Frage" },
|
|
82
82
|
[`${FORM_FIELD}:kind:option:bug`]: { en: "Bug", de: "Fehler" },
|
|
83
83
|
[`${FORM_FIELD}:kind:option:wish`]: { en: "Wish", de: "Wunsch" },
|
|
84
|
-
"
|
|
85
|
-
"
|
|
84
|
+
"helpdesk:reply.title": { en: "To {name}", de: "An {name}" },
|
|
85
|
+
"helpdesk:reply.summary.in-app": {
|
|
86
86
|
en: "By email to {email} and in the app. Replies go to {replyTo}.",
|
|
87
87
|
de: "Per E-Mail an {email} und in der App. Rückantworten gehen an {replyTo}.",
|
|
88
88
|
},
|
|
89
|
-
"
|
|
89
|
+
"helpdesk:reply.summary.mail": {
|
|
90
90
|
en: "By email to {email}. Replies go to {replyTo}.",
|
|
91
91
|
de: "Per E-Mail an {email}. Rückantworten gehen an {replyTo}.",
|
|
92
92
|
},
|
|
93
|
-
"
|
|
94
|
-
"
|
|
93
|
+
"helpdesk:reply.section": { en: "Reply", de: "Antwort" },
|
|
94
|
+
"helpdesk:reply.section.description": {
|
|
95
95
|
en: "The request is quoted below in the mail.",
|
|
96
96
|
de: "Die Meldung wird unten in der Mail zitiert.",
|
|
97
97
|
},
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
98
|
+
"helpdesk:reply.field.message": { en: "Message", de: "Nachricht" },
|
|
99
|
+
"helpdesk:reply.field.files": { en: "Files", de: "Dateien" },
|
|
100
|
+
"helpdesk:reply.field.mark-done": {
|
|
101
101
|
en: "Mark the request as done afterwards",
|
|
102
102
|
de: "Meldung danach als erledigt markieren",
|
|
103
103
|
},
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
104
|
+
"helpdesk:filter.all": { en: "All", de: "Alle" },
|
|
105
|
+
"helpdesk:list.from": { en: "From", de: "Von" },
|
|
106
|
+
"helpdesk:action.open": { en: "Open", de: "Öffnen" },
|
|
107
|
+
"helpdesk:action.mark-done": { en: "Mark as done", de: "Als erledigt markieren" },
|
|
108
|
+
"helpdesk:action.reply": { en: "Reply", de: "Antworten" },
|
|
109
|
+
"helpdesk:detail.attachments": { en: "Attachments", de: "Anhänge" },
|
|
110
|
+
"helpdesk:detail.section.message": { en: "Request", de: "Anliegen" },
|
|
111
|
+
"helpdesk:detail.section.replies": { en: "Replies", de: "Antworten" },
|
|
112
|
+
"helpdesk:detail.section.files": { en: "Files", de: "Dateien" },
|
|
113
|
+
"helpdesk:detail.section.sender": { en: "Sender", de: "Absender" },
|
|
114
|
+
"helpdesk:detail.section.origin": { en: "Origin", de: "Herkunft" },
|
|
115
|
+
"helpdesk:detail.section.delivery": { en: "Delivery", de: "Zustellung" },
|
|
116
|
+
"helpdesk:detail.delivery-log": { en: "Delivery log", de: "Zustellprotokoll" },
|
|
117
|
+
"helpdesk:detail.section.notes": { en: "Notes", de: "Notizen" },
|
|
118
118
|
[`${REQUEST_FIELD}:reporterTenantName`]: { en: "Tenant", de: "Mandant" },
|
|
119
119
|
[`${REQUEST_FIELD}:reporterTenantPlan`]: { en: "Tenant plan", de: "Plan des Mandanten" },
|
|
120
120
|
[`${REQUEST_FIELD}:fileCount`]: { en: "Files", de: "Dateien" },
|
|
@@ -134,33 +134,36 @@ export function createContactI18n() {
|
|
|
134
134
|
[`${REPLY_ENTITY_FIELD}:sentAt`]: { en: "Sent", de: "Gesendet" },
|
|
135
135
|
[`${REPLY_ENTITY_FIELD}:authorName`]: { en: "From", de: "Von" },
|
|
136
136
|
[`${REPLY_ENTITY_FIELD}:message`]: { en: "Message", de: "Nachricht" },
|
|
137
|
-
"
|
|
138
|
-
"
|
|
137
|
+
"helpdesk:forwarding.email": { en: "Email", de: "E-Mail" },
|
|
138
|
+
"helpdesk:forwarding.email.description": {
|
|
139
139
|
en: "Every new request goes by email to all SystemAdmins of this app. Turning it off per person goes through delivery; there is no screen for that yet.",
|
|
140
140
|
de: "Jede neue Meldung geht per Mail an alle SystemAdmins dieser App. Abschalten pro Person geht über die Zustellung, eine Maske dafür gibt es noch nicht.",
|
|
141
141
|
},
|
|
142
|
-
"
|
|
143
|
-
"
|
|
142
|
+
"helpdesk:forwarding.telegram": { en: "Telegram", de: "Telegram" },
|
|
143
|
+
"helpdesk:forwarding.telegram.description": {
|
|
144
144
|
en: "Optional. Requests also go as a message to a Telegram chat or channel.",
|
|
145
145
|
de: "Optional. Meldungen gehen zusätzlich als Nachricht in einen Telegram-Chat oder Kanal.",
|
|
146
146
|
},
|
|
147
|
-
"
|
|
148
|
-
"
|
|
147
|
+
"helpdesk:forwarding.submit": { en: "Save", de: "Speichern" },
|
|
148
|
+
"helpdesk:config.reply-to.description": {
|
|
149
149
|
en: "Used as Reply-To in every answer. Empty means the address of the SystemAdmin who replies.",
|
|
150
150
|
de: "Steht als Reply-To in jeder Antwort. Leer heißt: Adresse des SystemAdmins, der antwortet.",
|
|
151
151
|
},
|
|
152
|
-
"
|
|
152
|
+
"helpdesk:config.telegram-chat.description": {
|
|
153
153
|
en: "Leave empty to not use Telegram.",
|
|
154
154
|
de: "Leer lassen, um Telegram nicht zu nutzen.",
|
|
155
155
|
},
|
|
156
|
-
"
|
|
157
|
-
"
|
|
156
|
+
"helpdesk:config.bot-token.label": { en: "Bot token", de: "Bot-Token" },
|
|
157
|
+
"helpdesk:config.bot-token.description": {
|
|
158
158
|
en: "From @BotFather. Stored encrypted and never shown again.",
|
|
159
159
|
de: "Von @BotFather. Wird verschlüsselt gespeichert und nie wieder angezeigt.",
|
|
160
160
|
},
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
"
|
|
161
|
+
"helpdesk:config.send-test.label": { en: "Test message", de: "Testnachricht" },
|
|
162
|
+
"helpdesk:config.send-test.button": { en: "Send test message", de: "Testnachricht senden" },
|
|
163
|
+
"helpdesk:config.send-test.success": {
|
|
164
|
+
en: "Test message sent.",
|
|
165
|
+
de: "Testnachricht gesendet.",
|
|
166
|
+
},
|
|
164
167
|
[`${REQUEST_FIELD}:origin:option:website`]: { en: "Website", de: "Website" },
|
|
165
168
|
[`${REQUEST_FIELD}:origin:option:admin-report`]: {
|
|
166
169
|
en: "Admin, report a problem",
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { helpdeskReplyEntity, helpdeskReplyTable, helpdeskRequestEntity, helpdeskRequestTable, } from "./entity.ts";
|
|
2
|
+
export { createHelpdeskFeature } from "./feature.ts";
|
|
3
|
+
export type { HelpdeskOptions } from "./options.ts";
|
|
4
|
+
export { helpdeskOpenRequestsPanels } from "./panels.ts";
|
|
5
|
+
export { HELPDESK_ADMIN_KINDS, HELPDESK_CLIENT_PATH, HELPDESK_DELIVERY_CHANNEL, HELPDESK_DELIVERY_STATUS, HELPDESK_FEATURE, HELPDESK_FIELD_LIMITS, HELPDESK_KIND, HELPDESK_NOTIFICATION_TYPES, HELPDESK_ORIGIN, HELPDESK_REPLY_CHANNELS, HELPDESK_SOURCE, HELPDESK_STATUS, HELPDESK_WEBSITE_KINDS, HelpdeskConfigKeys, HelpdeskErrors, HelpdeskHandlers, HelpdeskQueries, HelpdeskScreens, } from "./web/constants.ts";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { helpdeskReplyEntity, helpdeskReplyTable, helpdeskRequestEntity, helpdeskRequestTable, } from "./entity.js";
|
|
2
|
+
export { createHelpdeskFeature } from "./feature.js";
|
|
3
|
+
export { helpdeskOpenRequestsPanels } from "./panels.js";
|
|
4
|
+
export { HELPDESK_ADMIN_KINDS, HELPDESK_CLIENT_PATH, HELPDESK_DELIVERY_CHANNEL, HELPDESK_DELIVERY_STATUS, HELPDESK_FEATURE, HELPDESK_FIELD_LIMITS, HELPDESK_KIND, HELPDESK_NOTIFICATION_TYPES, HELPDESK_ORIGIN, HELPDESK_REPLY_CHANNELS, HELPDESK_SOURCE, HELPDESK_STATUS, HELPDESK_WEBSITE_KINDS, HelpdeskConfigKeys, HelpdeskErrors, HelpdeskHandlers, HelpdeskQueries, HelpdeskScreens, } from "./web/constants.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type TenantDb } from "@cosmicdrift/kumiko-framework/db";
|
|
2
2
|
import { type AppContext, type HandlerContext, type SessionUser } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
|
-
import {
|
|
3
|
+
import { HelpdeskErrors, type HelpdeskPhoneMode, type HelpdeskReplyChannels } from "./web/constants.ts";
|
|
4
4
|
export declare const IN_APP_FEATURE = "channel-in-app";
|
|
5
5
|
export declare const TELEGRAM_FEATURE = "channel-telegram";
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const HELPDESK_CROSS_TENANT_REASON = "helpdesk is platform-wide (systemScope)";
|
|
7
7
|
export declare const SYSTEM_ADMIN_ROLE = "SystemAdmin";
|
|
8
8
|
export declare const adminAccess: {
|
|
9
9
|
readonly roles: readonly string[];
|
|
@@ -86,7 +86,7 @@ export declare function listRepliesOf(db: TenantDb, requestId: string): Promise<
|
|
|
86
86
|
readonly sentAt: Temporal.Instant;
|
|
87
87
|
}[]>;
|
|
88
88
|
export declare function normalizeEmail(email: string): string;
|
|
89
|
-
export declare function
|
|
89
|
+
export declare function helpdeskDb(ctx: Pick<AppContext, "systemDb">): TenantDb;
|
|
90
90
|
export declare function platformActor(): SessionUser;
|
|
91
91
|
export declare function listSystemAdminIds(db: TenantDb): Promise<readonly string[]>;
|
|
92
92
|
export type UserLabel = {
|
|
@@ -95,7 +95,7 @@ export type UserLabel = {
|
|
|
95
95
|
};
|
|
96
96
|
export declare function loadUserLabel(db: TenantDb, userId: string): Promise<UserLabel | null>;
|
|
97
97
|
export declare function sendBestEffort(ctx: Pick<HandlerContext, "notify" | "obs">, label: string, send: (notify: NonNullable<HandlerContext["notify"]>) => Promise<unknown>): Promise<void>;
|
|
98
|
-
export declare function pickReplyChannels(ctx: Pick<HandlerContext, "hasFeature">, reporterUserId: string | null | undefined): Promise<
|
|
99
|
-
export declare function phoneProblem(mode:
|
|
98
|
+
export declare function pickReplyChannels(ctx: Pick<HandlerContext, "hasFeature">, reporterUserId: string | null | undefined): Promise<HelpdeskReplyChannels>;
|
|
99
|
+
export declare function phoneProblem(mode: HelpdeskPhoneMode, phone: string | undefined): (typeof HelpdeskErrors)[keyof typeof HelpdeskErrors] | null;
|
|
100
100
|
export declare function loadTenantName(db: TenantDb, tenantId: string): Promise<string | null>;
|
|
101
101
|
export declare function loadTenantPlan(ctx: Pick<HandlerContext, "dispatch" | "registry" | "obs">, tenantId: string): Promise<string | null>;
|
|
@@ -6,20 +6,20 @@ import { decryptStoredPii } from "../shared/index.js";
|
|
|
6
6
|
import { tenantTable } from "../tenant/index.js";
|
|
7
7
|
import { TierEngineQueries } from "../tier-engine/index.js";
|
|
8
8
|
import { USER_STATUS, userTable } from "../user/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { helpdeskReplyEntity, helpdeskReplyTable, helpdeskRequestEntity, helpdeskRequestTable, } from "./entity.js";
|
|
10
|
+
import { HELPDESK_REPLY_CHANNELS, HELPDESK_REPLY_ENTITY, HELPDESK_REQUEST_ENTITY, HelpdeskErrors, } from "./web/constants.js";
|
|
11
11
|
export const IN_APP_FEATURE = "channel-in-app";
|
|
12
12
|
export const TELEGRAM_FEATURE = "channel-telegram";
|
|
13
|
-
export const
|
|
13
|
+
export const HELPDESK_CROSS_TENANT_REASON = "helpdesk is platform-wide (systemScope)";
|
|
14
14
|
export const SYSTEM_ADMIN_ROLE = "SystemAdmin";
|
|
15
|
-
const PII_DECRYPT_REASON = "
|
|
15
|
+
const PII_DECRYPT_REASON = "helpdesk:user-lookup";
|
|
16
16
|
export const adminAccess = { roles: access.systemAdmin };
|
|
17
17
|
export const internalAccess = { roles: access.system };
|
|
18
|
-
export const requestExecutor = createEventStoreExecutor(
|
|
19
|
-
entityName:
|
|
18
|
+
export const requestExecutor = createEventStoreExecutor(helpdeskRequestTable, helpdeskRequestEntity, {
|
|
19
|
+
entityName: HELPDESK_REQUEST_ENTITY,
|
|
20
20
|
});
|
|
21
|
-
export const replyExecutor = createEventStoreExecutor(
|
|
22
|
-
entityName:
|
|
21
|
+
export const replyExecutor = createEventStoreExecutor(helpdeskReplyTable, helpdeskReplyEntity, {
|
|
22
|
+
entityName: HELPDESK_REPLY_ENTITY,
|
|
23
23
|
});
|
|
24
24
|
const MAX_REPLIES_PER_REQUEST = 200;
|
|
25
25
|
export async function listRepliesOf(db, requestId) {
|
|
@@ -34,13 +34,13 @@ export async function listRepliesOf(db, requestId) {
|
|
|
34
34
|
export function normalizeEmail(email) {
|
|
35
35
|
return email.toLowerCase();
|
|
36
36
|
}
|
|
37
|
-
export function
|
|
37
|
+
export function helpdeskDb(ctx) {
|
|
38
38
|
if (!ctx.systemDb) {
|
|
39
39
|
throw new InternalError({
|
|
40
|
-
message: "
|
|
40
|
+
message: "helpdesk requires ctx.systemDb — is r.systemScope() set on the feature?",
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
return ctx.systemDb.acknowledgeCrossTenant(
|
|
43
|
+
return ctx.systemDb.acknowledgeCrossTenant(HELPDESK_CROSS_TENANT_REASON);
|
|
44
44
|
}
|
|
45
45
|
// Requests and replies are systemStream rows, so every write targets the system tenant's stream.
|
|
46
46
|
export function platformActor() {
|
|
@@ -66,21 +66,21 @@ export async function sendBestEffort(ctx, label, send) {
|
|
|
66
66
|
await send(ctx.notify);
|
|
67
67
|
}
|
|
68
68
|
catch (err) {
|
|
69
|
-
ctx.obs.log?.warn(`[
|
|
69
|
+
ctx.obs.log?.warn(`[helpdesk] ${label} failed`, {
|
|
70
70
|
error: err instanceof Error ? err.message : String(err),
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
export async function pickReplyChannels(ctx, reporterUserId) {
|
|
75
75
|
const hasInApp = reporterUserId && (await ctx.hasFeature(IN_APP_FEATURE));
|
|
76
|
-
return hasInApp ?
|
|
76
|
+
return hasInApp ? HELPDESK_REPLY_CHANNELS.EmailAndInApp : HELPDESK_REPLY_CHANNELS.Email;
|
|
77
77
|
}
|
|
78
78
|
export function phoneProblem(mode, phone) {
|
|
79
79
|
const present = phone !== undefined && phone !== "";
|
|
80
80
|
if (mode === "off")
|
|
81
|
-
return present ?
|
|
81
|
+
return present ? HelpdeskErrors.phoneNotAllowed : null;
|
|
82
82
|
if (mode === "required")
|
|
83
|
-
return present ? null :
|
|
83
|
+
return present ? null : HelpdeskErrors.phoneRequired;
|
|
84
84
|
return null;
|
|
85
85
|
}
|
|
86
86
|
export async function loadTenantName(db, tenantId) {
|
|
@@ -101,7 +101,7 @@ export async function loadTenantPlan(ctx, tenantId) {
|
|
|
101
101
|
return typeof tier === "string" && tier !== "" ? planDisplayName(tier) : null;
|
|
102
102
|
}
|
|
103
103
|
catch (err) {
|
|
104
|
-
ctx.obs.log?.warn("[
|
|
104
|
+
ctx.obs.log?.warn("[helpdesk] tenant plan lookup failed", {
|
|
105
105
|
error: err instanceof Error ? err.message : String(err),
|
|
106
106
|
});
|
|
107
107
|
return null;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { type NotificationLocalizedTemplate, type TemplateVariables } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
-
export type
|
|
3
|
-
export declare function
|
|
2
|
+
export type HelpdeskMailLocale = "en" | "de";
|
|
3
|
+
export declare function resolveHelpdeskMailLocale(locale: string | undefined): HelpdeskMailLocale;
|
|
4
4
|
export declare function truncateText(text: string, maxChars: number): string;
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
7
|
-
export declare const
|
|
5
|
+
export declare function helpdeskKindLabel(kind: string, locale: string | undefined): string;
|
|
6
|
+
export declare function formatHelpdeskDate(atEpochMs: number, locale: string | undefined): string;
|
|
7
|
+
export declare const HELPDESK_NEW_REQUEST_VARIABLES: TemplateVariables;
|
|
8
8
|
export type NewRequestMailArgs = {
|
|
9
9
|
readonly kind: string;
|
|
10
10
|
readonly appName: string;
|
|
11
11
|
readonly link: string | undefined;
|
|
12
12
|
readonly locale: string | undefined;
|
|
13
13
|
};
|
|
14
|
-
export declare function
|
|
14
|
+
export declare function helpdeskNewRequestVariables(args: NewRequestMailArgs): {
|
|
15
15
|
subject: string;
|
|
16
16
|
intro: string;
|
|
17
17
|
requestUrl?: string | undefined;
|
|
@@ -20,9 +20,9 @@ export declare function contactNewRequestVariables(args: NewRequestMailArgs): {
|
|
|
20
20
|
telegramTitle: string;
|
|
21
21
|
telegramBody: string;
|
|
22
22
|
};
|
|
23
|
-
export declare function
|
|
24
|
-
export declare const
|
|
25
|
-
export declare function
|
|
23
|
+
export declare function helpdeskNewRequestTemplate(): NotificationLocalizedTemplate;
|
|
24
|
+
export declare const HELPDESK_CONFIRMATION_VARIABLES: TemplateVariables;
|
|
25
|
+
export declare function helpdeskConfirmationVariables(args: {
|
|
26
26
|
readonly appName: string;
|
|
27
27
|
readonly message: string;
|
|
28
28
|
readonly locale: string | undefined;
|
|
@@ -34,18 +34,18 @@ export declare function contactConfirmationVariables(args: {
|
|
|
34
34
|
readonly text: string;
|
|
35
35
|
}[];
|
|
36
36
|
};
|
|
37
|
-
export declare const
|
|
38
|
-
export declare function
|
|
37
|
+
export declare const HELPDESK_ACKNOWLEDGEMENT_VARIABLES: TemplateVariables;
|
|
38
|
+
export declare function helpdeskAcknowledgementVariables(args: {
|
|
39
39
|
readonly appName: string;
|
|
40
40
|
readonly locale: string | undefined;
|
|
41
41
|
}): {
|
|
42
42
|
appName: string;
|
|
43
43
|
intro: string;
|
|
44
44
|
};
|
|
45
|
-
export declare function
|
|
46
|
-
export declare function
|
|
47
|
-
export declare const
|
|
48
|
-
export declare function
|
|
45
|
+
export declare function helpdeskAcknowledgementTemplate(): NotificationLocalizedTemplate;
|
|
46
|
+
export declare function helpdeskConfirmationTemplate(): NotificationLocalizedTemplate;
|
|
47
|
+
export declare const HELPDESK_REPLY_VARIABLES: TemplateVariables;
|
|
48
|
+
export declare function helpdeskReplyVariables(args: {
|
|
49
49
|
readonly requestSubject: string;
|
|
50
50
|
readonly requestMessage: string;
|
|
51
51
|
readonly requestSubmittedAt: number;
|
|
@@ -63,9 +63,9 @@ export declare function contactReplyVariables(args: {
|
|
|
63
63
|
quote: string;
|
|
64
64
|
footer: string;
|
|
65
65
|
};
|
|
66
|
-
export declare function
|
|
67
|
-
export declare const
|
|
68
|
-
export declare function
|
|
66
|
+
export declare function helpdeskReplyTemplate(): NotificationLocalizedTemplate;
|
|
67
|
+
export declare const HELPDESK_TEST_VARIABLES: TemplateVariables;
|
|
68
|
+
export declare function helpdeskTestVariables(args: {
|
|
69
69
|
readonly appName: string;
|
|
70
70
|
readonly locale: string | undefined;
|
|
71
71
|
}): {
|
|
@@ -73,8 +73,8 @@ export declare function contactTestVariables(args: {
|
|
|
73
73
|
telegramTitle: string;
|
|
74
74
|
telegramBody: string;
|
|
75
75
|
};
|
|
76
|
-
export declare function
|
|
77
|
-
export declare function
|
|
76
|
+
export declare function helpdeskTestTemplate(): NotificationLocalizedTemplate;
|
|
77
|
+
export declare function helpdeskReplyInAppData(args: {
|
|
78
78
|
readonly authorName: string;
|
|
79
79
|
readonly locale: string | undefined;
|
|
80
80
|
}): {
|